1*b5677b36Schristos# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 2*b5677b36Schristos## Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, 2007, 3*b5677b36Schristos## 2008 Free Software Foundation, Inc. 4*b5677b36Schristos## Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 5*b5677b36Schristos## 6*b5677b36Schristos## This file is free software; the Free Software Foundation gives 7*b5677b36Schristos## unlimited permission to copy and/or distribute it, with or without 8*b5677b36Schristos## modifications, as long as this notice is preserved. 9*b5677b36Schristos 10*b5677b36Schristos# serial 52 AC_PROG_LIBTOOL 11*b5677b36Schristos 12*b5677b36Schristos 13*b5677b36Schristos# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED) 14*b5677b36Schristos# ----------------------------------------------------------- 15*b5677b36Schristos# If this macro is not defined by Autoconf, define it here. 16*b5677b36Schristosm4_ifdef([AC_PROVIDE_IFELSE], 17*b5677b36Schristos [], 18*b5677b36Schristos [m4_define([AC_PROVIDE_IFELSE], 19*b5677b36Schristos [m4_ifdef([AC_PROVIDE_$1], 20*b5677b36Schristos [$2], [$3])])]) 21*b5677b36Schristos 22*b5677b36Schristos 23*b5677b36Schristos# AC_PROG_LIBTOOL 24*b5677b36Schristos# --------------- 25*b5677b36SchristosAC_DEFUN([AC_PROG_LIBTOOL], 26*b5677b36Schristos[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl 27*b5677b36Schristosdnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX 28*b5677b36Schristosdnl immediately, otherwise, hook it in at the end of AC_PROG_CXX. 29*b5677b36Schristos AC_PROVIDE_IFELSE([AC_PROG_CXX], 30*b5677b36Schristos [AC_LIBTOOL_CXX], 31*b5677b36Schristos [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX 32*b5677b36Schristos ])]) 33*b5677b36Schristosdnl And a similar setup for Fortran 77 support 34*b5677b36Schristos AC_PROVIDE_IFELSE([AC_PROG_F77], 35*b5677b36Schristos [AC_LIBTOOL_F77], 36*b5677b36Schristos [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77 37*b5677b36Schristos])]) 38*b5677b36Schristos 39*b5677b36Schristosdnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly. 40*b5677b36Schristosdnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run 41*b5677b36Schristosdnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both. 42*b5677b36Schristos AC_PROVIDE_IFELSE([AC_PROG_GCJ], 43*b5677b36Schristos [AC_LIBTOOL_GCJ], 44*b5677b36Schristos [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 45*b5677b36Schristos [AC_LIBTOOL_GCJ], 46*b5677b36Schristos [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ], 47*b5677b36Schristos [AC_LIBTOOL_GCJ], 48*b5677b36Schristos [ifdef([AC_PROG_GCJ], 49*b5677b36Schristos [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])]) 50*b5677b36Schristos ifdef([A][M_PROG_GCJ], 51*b5677b36Schristos [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])]) 52*b5677b36Schristos ifdef([LT_AC_PROG_GCJ], 53*b5677b36Schristos [define([LT_AC_PROG_GCJ], 54*b5677b36Schristos defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])]) 55*b5677b36Schristos])])# AC_PROG_LIBTOOL 56*b5677b36Schristos 57*b5677b36Schristos 58*b5677b36Schristos# _AC_PROG_LIBTOOL 59*b5677b36Schristos# ---------------- 60*b5677b36SchristosAC_DEFUN([_AC_PROG_LIBTOOL], 61*b5677b36Schristos[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl 62*b5677b36SchristosAC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl 63*b5677b36SchristosAC_BEFORE([$0],[AC_LIBTOOL_F77])dnl 64*b5677b36SchristosAC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl 65*b5677b36Schristos 66*b5677b36Schristos# This can be used to rebuild libtool when needed 67*b5677b36SchristosLIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" 68*b5677b36Schristos 69*b5677b36Schristos# Always use our own libtool. 70*b5677b36SchristosLIBTOOL='$(SHELL) $(top_builddir)/libtool' 71*b5677b36SchristosAC_SUBST(LIBTOOL)dnl 72*b5677b36Schristos 73*b5677b36Schristos# Prevent multiple expansion 74*b5677b36Schristosdefine([AC_PROG_LIBTOOL], []) 75*b5677b36Schristos])# _AC_PROG_LIBTOOL 76*b5677b36Schristos 77*b5677b36Schristos 78*b5677b36Schristos# AC_LIBTOOL_SETUP 79*b5677b36Schristos# ---------------- 80*b5677b36SchristosAC_DEFUN([AC_LIBTOOL_SETUP], 81*b5677b36Schristos[AC_PREREQ(2.50)dnl 82*b5677b36SchristosAC_REQUIRE([AC_ENABLE_SHARED])dnl 83*b5677b36SchristosAC_REQUIRE([AC_ENABLE_STATIC])dnl 84*b5677b36SchristosAC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl 85*b5677b36SchristosAC_REQUIRE([AC_CANONICAL_HOST])dnl 86*b5677b36SchristosAC_REQUIRE([AC_CANONICAL_BUILD])dnl 87*b5677b36SchristosAC_REQUIRE([AC_PROG_CC])dnl 88*b5677b36SchristosAC_REQUIRE([AC_PROG_LD])dnl 89*b5677b36SchristosAC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl 90*b5677b36SchristosAC_REQUIRE([AC_PROG_NM])dnl 91*b5677b36Schristos 92*b5677b36SchristosAC_REQUIRE([AC_PROG_LN_S])dnl 93*b5677b36SchristosAC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl 94*b5677b36Schristos# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! 95*b5677b36SchristosAC_REQUIRE([AC_OBJEXT])dnl 96*b5677b36SchristosAC_REQUIRE([AC_EXEEXT])dnl 97*b5677b36Schristosdnl 98*b5677b36SchristosAC_LIBTOOL_SYS_MAX_CMD_LEN 99*b5677b36SchristosAC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE 100*b5677b36SchristosAC_LIBTOOL_OBJDIR 101*b5677b36Schristos 102*b5677b36SchristosAC_REQUIRE([_LT_AC_SYS_COMPILER])dnl 103*b5677b36Schristos_LT_AC_PROG_ECHO_BACKSLASH 104*b5677b36Schristos 105*b5677b36Schristoscase $host_os in 106*b5677b36Schristosaix3*) 107*b5677b36Schristos # AIX sometimes has problems with the GCC collect2 program. For some 108*b5677b36Schristos # reason, if we set the COLLECT_NAMES environment variable, the problems 109*b5677b36Schristos # vanish in a puff of smoke. 110*b5677b36Schristos if test "X${COLLECT_NAMES+set}" != Xset; then 111*b5677b36Schristos COLLECT_NAMES= 112*b5677b36Schristos export COLLECT_NAMES 113*b5677b36Schristos fi 114*b5677b36Schristos ;; 115*b5677b36Schristosesac 116*b5677b36Schristos 117*b5677b36Schristos# Sed substitution that helps us do robust quoting. It backslashifies 118*b5677b36Schristos# metacharacters that are still active within double-quoted strings. 119*b5677b36SchristosXsed='sed -e 1s/^X//' 120*b5677b36Schristos[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'] 121*b5677b36Schristos 122*b5677b36Schristos# Same as above, but do not quote variable references. 123*b5677b36Schristos[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'] 124*b5677b36Schristos 125*b5677b36Schristos# Sed substitution to delay expansion of an escaped shell variable in a 126*b5677b36Schristos# double_quote_subst'ed string. 127*b5677b36Schristosdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 128*b5677b36Schristos 129*b5677b36Schristos# Sed substitution to avoid accidental globbing in evaled expressions 130*b5677b36Schristosno_glob_subst='s/\*/\\\*/g' 131*b5677b36Schristos 132*b5677b36Schristos# Constants: 133*b5677b36Schristosrm="rm -f" 134*b5677b36Schristos 135*b5677b36Schristos# Global variables: 136*b5677b36Schristosdefault_ofile=libtool 137*b5677b36Schristoscan_build_shared=yes 138*b5677b36Schristos 139*b5677b36Schristos# All known linkers require a `.a' archive for static linking (except MSVC, 140*b5677b36Schristos# which needs '.lib'). 141*b5677b36Schristoslibext=a 142*b5677b36Schristosltmain="$ac_aux_dir/ltmain.sh" 143*b5677b36Schristosofile="$default_ofile" 144*b5677b36Schristoswith_gnu_ld="$lt_cv_prog_gnu_ld" 145*b5677b36Schristos 146*b5677b36SchristosAC_CHECK_TOOL(AR, ar, false) 147*b5677b36SchristosAC_CHECK_TOOL(RANLIB, ranlib, :) 148*b5677b36SchristosAC_CHECK_TOOL(STRIP, strip, :) 149*b5677b36Schristos 150*b5677b36Schristosold_CC="$CC" 151*b5677b36Schristosold_CFLAGS="$CFLAGS" 152*b5677b36Schristos 153*b5677b36Schristos# Set sane defaults for various variables 154*b5677b36Schristostest -z "$AR" && AR=ar 155*b5677b36Schristostest -z "$AR_FLAGS" && AR_FLAGS=cru 156*b5677b36Schristostest -z "$AS" && AS=as 157*b5677b36Schristostest -z "$CC" && CC=cc 158*b5677b36Schristostest -z "$LTCC" && LTCC=$CC 159*b5677b36Schristostest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 160*b5677b36Schristostest -z "$DLLTOOL" && DLLTOOL=dlltool 161*b5677b36Schristostest -z "$LD" && LD=ld 162*b5677b36Schristostest -z "$LN_S" && LN_S="ln -s" 163*b5677b36Schristostest -z "$MAGIC_CMD" && MAGIC_CMD=file 164*b5677b36Schristostest -z "$NM" && NM=nm 165*b5677b36Schristostest -z "$SED" && SED=sed 166*b5677b36Schristostest -z "$OBJDUMP" && OBJDUMP=objdump 167*b5677b36Schristostest -z "$RANLIB" && RANLIB=: 168*b5677b36Schristostest -z "$STRIP" && STRIP=: 169*b5677b36Schristostest -z "$ac_objext" && ac_objext=o 170*b5677b36Schristos 171*b5677b36Schristos# Determine commands to create old-style static archives. 172*b5677b36Schristosold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 173*b5677b36Schristosold_postinstall_cmds='chmod 644 $oldlib' 174*b5677b36Schristosold_postuninstall_cmds= 175*b5677b36Schristos 176*b5677b36Schristosif test -n "$RANLIB"; then 177*b5677b36Schristos case $host_os in 178*b5677b36Schristos openbsd*) 179*b5677b36Schristos old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" 180*b5677b36Schristos ;; 181*b5677b36Schristos *) 182*b5677b36Schristos old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" 183*b5677b36Schristos ;; 184*b5677b36Schristos esac 185*b5677b36Schristos old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" 186*b5677b36Schristosfi 187*b5677b36Schristos 188*b5677b36Schristos_LT_CC_BASENAME([$compiler]) 189*b5677b36Schristos 190*b5677b36Schristos# Only perform the check for file, if the check method requires it 191*b5677b36Schristoscase $deplibs_check_method in 192*b5677b36Schristosfile_magic*) 193*b5677b36Schristos if test "$file_magic_cmd" = '$MAGIC_CMD'; then 194*b5677b36Schristos AC_PATH_MAGIC 195*b5677b36Schristos fi 196*b5677b36Schristos ;; 197*b5677b36Schristosesac 198*b5677b36Schristos 199*b5677b36Schristos_LT_REQUIRED_DARWIN_CHECKS 200*b5677b36Schristos 201*b5677b36SchristosAC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no) 202*b5677b36SchristosAC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], 203*b5677b36Schristosenable_win32_dll=yes, enable_win32_dll=no) 204*b5677b36Schristos 205*b5677b36SchristosAC_ARG_ENABLE([libtool-lock], 206*b5677b36Schristos [AC_HELP_STRING([--disable-libtool-lock], 207*b5677b36Schristos [avoid locking (might break parallel builds)])]) 208*b5677b36Schristostest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes 209*b5677b36Schristos 210*b5677b36SchristosAC_ARG_WITH([pic], 211*b5677b36Schristos [AC_HELP_STRING([--with-pic], 212*b5677b36Schristos [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 213*b5677b36Schristos [pic_mode="$withval"], 214*b5677b36Schristos [pic_mode=default]) 215*b5677b36Schristostest -z "$pic_mode" && pic_mode=default 216*b5677b36Schristos 217*b5677b36Schristos# Use C for the default configuration in the libtool script 218*b5677b36Schristostagname= 219*b5677b36SchristosAC_LIBTOOL_LANG_C_CONFIG 220*b5677b36Schristos_LT_AC_TAGCONFIG 221*b5677b36Schristos])# AC_LIBTOOL_SETUP 222*b5677b36Schristos 223*b5677b36Schristos 224*b5677b36Schristos# _LT_AC_SYS_COMPILER 225*b5677b36Schristos# ------------------- 226*b5677b36SchristosAC_DEFUN([_LT_AC_SYS_COMPILER], 227*b5677b36Schristos[AC_REQUIRE([AC_PROG_CC])dnl 228*b5677b36Schristos 229*b5677b36Schristos# If no C compiler was specified, use CC. 230*b5677b36SchristosLTCC=${LTCC-"$CC"} 231*b5677b36Schristos 232*b5677b36Schristos# If no C compiler flags were specified, use CFLAGS. 233*b5677b36SchristosLTCFLAGS=${LTCFLAGS-"$CFLAGS"} 234*b5677b36Schristos 235*b5677b36Schristos# Allow CC to be a program name with arguments. 236*b5677b36Schristoscompiler=$CC 237*b5677b36Schristos])# _LT_AC_SYS_COMPILER 238*b5677b36Schristos 239*b5677b36Schristos 240*b5677b36Schristos# _LT_CC_BASENAME(CC) 241*b5677b36Schristos# ------------------- 242*b5677b36Schristos# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 243*b5677b36SchristosAC_DEFUN([_LT_CC_BASENAME], 244*b5677b36Schristos[for cc_temp in $1""; do 245*b5677b36Schristos case $cc_temp in 246*b5677b36Schristos compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 247*b5677b36Schristos distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 248*b5677b36Schristos \-*) ;; 249*b5677b36Schristos *) break;; 250*b5677b36Schristos esac 251*b5677b36Schristosdone 252*b5677b36Schristoscc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` 253*b5677b36Schristos]) 254*b5677b36Schristos 255*b5677b36Schristos 256*b5677b36Schristos# _LT_COMPILER_BOILERPLATE 257*b5677b36Schristos# ------------------------ 258*b5677b36Schristos# Check for compiler boilerplate output or warnings with 259*b5677b36Schristos# the simple compiler test code. 260*b5677b36SchristosAC_DEFUN([_LT_COMPILER_BOILERPLATE], 261*b5677b36Schristos[AC_REQUIRE([LT_AC_PROG_SED])dnl 262*b5677b36Schristosac_outfile=conftest.$ac_objext 263*b5677b36Schristosecho "$lt_simple_compile_test_code" >conftest.$ac_ext 264*b5677b36Schristoseval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 265*b5677b36Schristos_lt_compiler_boilerplate=`cat conftest.err` 266*b5677b36Schristos$rm conftest* 267*b5677b36Schristos])# _LT_COMPILER_BOILERPLATE 268*b5677b36Schristos 269*b5677b36Schristos 270*b5677b36Schristos# _LT_LINKER_BOILERPLATE 271*b5677b36Schristos# ---------------------- 272*b5677b36Schristos# Check for linker boilerplate output or warnings with 273*b5677b36Schristos# the simple link test code. 274*b5677b36SchristosAC_DEFUN([_LT_LINKER_BOILERPLATE], 275*b5677b36Schristos[AC_REQUIRE([LT_AC_PROG_SED])dnl 276*b5677b36Schristosac_outfile=conftest.$ac_objext 277*b5677b36Schristosecho "$lt_simple_link_test_code" >conftest.$ac_ext 278*b5677b36Schristoseval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 279*b5677b36Schristos_lt_linker_boilerplate=`cat conftest.err` 280*b5677b36Schristos$rm -r conftest* 281*b5677b36Schristos])# _LT_LINKER_BOILERPLATE 282*b5677b36Schristos 283*b5677b36Schristos# _LT_REQUIRED_DARWIN_CHECKS 284*b5677b36Schristos# -------------------------- 285*b5677b36Schristos# Check for some things on darwin 286*b5677b36SchristosAC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS],[ 287*b5677b36Schristos case $host_os in 288*b5677b36Schristos rhapsody* | darwin*) 289*b5677b36Schristos AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) 290*b5677b36Schristos AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) 291*b5677b36Schristos 292*b5677b36Schristos AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], 293*b5677b36Schristos [lt_cv_apple_cc_single_mod=no 294*b5677b36Schristos if test -z "${LT_MULTI_MODULE}"; then 295*b5677b36Schristos # By default we will add the -single_module flag. You can override 296*b5677b36Schristos # by either setting the environment variable LT_MULTI_MODULE 297*b5677b36Schristos # non-empty at configure time, or by adding -multi_module to the 298*b5677b36Schristos # link flags. 299*b5677b36Schristos echo "int foo(void){return 1;}" > conftest.c 300*b5677b36Schristos $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 301*b5677b36Schristos -dynamiclib ${wl}-single_module conftest.c 302*b5677b36Schristos if test -f libconftest.dylib; then 303*b5677b36Schristos lt_cv_apple_cc_single_mod=yes 304*b5677b36Schristos rm -rf libconftest.dylib* 305*b5677b36Schristos fi 306*b5677b36Schristos rm conftest.c 307*b5677b36Schristos fi]) 308*b5677b36Schristos AC_CACHE_CHECK([for -exported_symbols_list linker flag], 309*b5677b36Schristos [lt_cv_ld_exported_symbols_list], 310*b5677b36Schristos [lt_cv_ld_exported_symbols_list=no 311*b5677b36Schristos save_LDFLAGS=$LDFLAGS 312*b5677b36Schristos echo "_main" > conftest.sym 313*b5677b36Schristos LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" 314*b5677b36Schristos AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 315*b5677b36Schristos [lt_cv_ld_exported_symbols_list=yes], 316*b5677b36Schristos [lt_cv_ld_exported_symbols_list=no]) 317*b5677b36Schristos LDFLAGS="$save_LDFLAGS" 318*b5677b36Schristos ]) 319*b5677b36Schristos case $host_os in 320*b5677b36Schristos rhapsody* | darwin1.[[0123]]) 321*b5677b36Schristos _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; 322*b5677b36Schristos darwin1.*) 323*b5677b36Schristos _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 324*b5677b36Schristos darwin*) 325*b5677b36Schristos # if running on 10.5 or later, the deployment target defaults 326*b5677b36Schristos # to the OS version, if on x86, and 10.4, the deployment 327*b5677b36Schristos # target defaults to 10.4. Don't you love it? 328*b5677b36Schristos case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 329*b5677b36Schristos 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) 330*b5677b36Schristos _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 331*b5677b36Schristos 10.[[012]]*) 332*b5677b36Schristos _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 333*b5677b36Schristos 10.*) 334*b5677b36Schristos _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 335*b5677b36Schristos esac 336*b5677b36Schristos ;; 337*b5677b36Schristos esac 338*b5677b36Schristos if test "$lt_cv_apple_cc_single_mod" = "yes"; then 339*b5677b36Schristos _lt_dar_single_mod='$single_module' 340*b5677b36Schristos fi 341*b5677b36Schristos if test "$lt_cv_ld_exported_symbols_list" = "yes"; then 342*b5677b36Schristos _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' 343*b5677b36Schristos else 344*b5677b36Schristos _lt_dar_export_syms="~$NMEDIT -s \$output_objdir/\${libname}-symbols.expsym \${lib}" 345*b5677b36Schristos fi 346*b5677b36Schristos if test "$DSYMUTIL" != ":"; then 347*b5677b36Schristos _lt_dsymutil="~$DSYMUTIL \$lib || :" 348*b5677b36Schristos else 349*b5677b36Schristos _lt_dsymutil= 350*b5677b36Schristos fi 351*b5677b36Schristos ;; 352*b5677b36Schristos esac 353*b5677b36Schristos]) 354*b5677b36Schristos 355*b5677b36Schristos# _LT_AC_SYS_LIBPATH_AIX 356*b5677b36Schristos# ---------------------- 357*b5677b36Schristos# Links a minimal program and checks the executable 358*b5677b36Schristos# for the system default hardcoded library path. In most cases, 359*b5677b36Schristos# this is /usr/lib:/lib, but when the MPI compilers are used 360*b5677b36Schristos# the location of the communication and MPI libs are included too. 361*b5677b36Schristos# If we don't find anything, use the default library path according 362*b5677b36Schristos# to the aix ld manual. 363*b5677b36SchristosAC_DEFUN([_LT_AC_SYS_LIBPATH_AIX], 364*b5677b36Schristos[AC_REQUIRE([LT_AC_PROG_SED])dnl 365*b5677b36SchristosAC_LINK_IFELSE(AC_LANG_PROGRAM,[ 366*b5677b36Schristoslt_aix_libpath_sed=' 367*b5677b36Schristos /Import File Strings/,/^$/ { 368*b5677b36Schristos /^0/ { 369*b5677b36Schristos s/^0 *\(.*\)$/\1/ 370*b5677b36Schristos p 371*b5677b36Schristos } 372*b5677b36Schristos }' 373*b5677b36Schristosaix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 374*b5677b36Schristos# Check for a 64-bit object if we didn't find anything. 375*b5677b36Schristosif test -z "$aix_libpath"; then 376*b5677b36Schristos aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 377*b5677b36Schristosfi],[]) 378*b5677b36Schristosif test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi 379*b5677b36Schristos])# _LT_AC_SYS_LIBPATH_AIX 380*b5677b36Schristos 381*b5677b36Schristos 382*b5677b36Schristos# _LT_AC_SHELL_INIT(ARG) 383*b5677b36Schristos# ---------------------- 384*b5677b36SchristosAC_DEFUN([_LT_AC_SHELL_INIT], 385*b5677b36Schristos[ifdef([AC_DIVERSION_NOTICE], 386*b5677b36Schristos [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], 387*b5677b36Schristos [AC_DIVERT_PUSH(NOTICE)]) 388*b5677b36Schristos$1 389*b5677b36SchristosAC_DIVERT_POP 390*b5677b36Schristos])# _LT_AC_SHELL_INIT 391*b5677b36Schristos 392*b5677b36Schristos 393*b5677b36Schristos# _LT_AC_PROG_ECHO_BACKSLASH 394*b5677b36Schristos# -------------------------- 395*b5677b36Schristos# Add some code to the start of the generated configure script which 396*b5677b36Schristos# will find an echo command which doesn't interpret backslashes. 397*b5677b36SchristosAC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH], 398*b5677b36Schristos[_LT_AC_SHELL_INIT([ 399*b5677b36Schristos# Check that we are running under the correct shell. 400*b5677b36SchristosSHELL=${CONFIG_SHELL-/bin/sh} 401*b5677b36Schristos 402*b5677b36Schristoscase X$ECHO in 403*b5677b36SchristosX*--fallback-echo) 404*b5677b36Schristos # Remove one level of quotation (which was required for Make). 405*b5677b36Schristos ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` 406*b5677b36Schristos ;; 407*b5677b36Schristosesac 408*b5677b36Schristos 409*b5677b36Schristosecho=${ECHO-echo} 410*b5677b36Schristosif test "X[$]1" = X--no-reexec; then 411*b5677b36Schristos # Discard the --no-reexec flag, and continue. 412*b5677b36Schristos shift 413*b5677b36Schristoselif test "X[$]1" = X--fallback-echo; then 414*b5677b36Schristos # Avoid inline document here, it may be left over 415*b5677b36Schristos : 416*b5677b36Schristoselif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then 417*b5677b36Schristos # Yippee, $echo works! 418*b5677b36Schristos : 419*b5677b36Schristoselse 420*b5677b36Schristos # Restart under the correct shell. 421*b5677b36Schristos exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} 422*b5677b36Schristosfi 423*b5677b36Schristos 424*b5677b36Schristosif test "X[$]1" = X--fallback-echo; then 425*b5677b36Schristos # used as fallback echo 426*b5677b36Schristos shift 427*b5677b36Schristos cat <<EOF 428*b5677b36Schristos[$]* 429*b5677b36SchristosEOF 430*b5677b36Schristos exit 0 431*b5677b36Schristosfi 432*b5677b36Schristos 433*b5677b36Schristos# The HP-UX ksh and POSIX shell print the target directory to stdout 434*b5677b36Schristos# if CDPATH is set. 435*b5677b36Schristos(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 436*b5677b36Schristos 437*b5677b36Schristosif test -z "$ECHO"; then 438*b5677b36Schristosif test "X${echo_test_string+set}" != Xset; then 439*b5677b36Schristos# find a string as large as possible, as long as the shell can cope with it 440*b5677b36Schristos for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do 441*b5677b36Schristos # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... 442*b5677b36Schristos if (echo_test_string=`eval $cmd`) 2>/dev/null && 443*b5677b36Schristos echo_test_string=`eval $cmd` && 444*b5677b36Schristos (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null 445*b5677b36Schristos then 446*b5677b36Schristos break 447*b5677b36Schristos fi 448*b5677b36Schristos done 449*b5677b36Schristosfi 450*b5677b36Schristos 451*b5677b36Schristosif test "X`($echo '\t') 2>/dev/null`" = 'X\t' && 452*b5677b36Schristos echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && 453*b5677b36Schristos test "X$echo_testing_string" = "X$echo_test_string"; then 454*b5677b36Schristos : 455*b5677b36Schristoselse 456*b5677b36Schristos # The Solaris, AIX, and Digital Unix default echo programs unquote 457*b5677b36Schristos # backslashes. This makes it impossible to quote backslashes using 458*b5677b36Schristos # echo "$something" | sed 's/\\/\\\\/g' 459*b5677b36Schristos # 460*b5677b36Schristos # So, first we look for a working echo in the user's PATH. 461*b5677b36Schristos 462*b5677b36Schristos lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 463*b5677b36Schristos for dir in $PATH /usr/ucb; do 464*b5677b36Schristos IFS="$lt_save_ifs" 465*b5677b36Schristos if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && 466*b5677b36Schristos test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && 467*b5677b36Schristos echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && 468*b5677b36Schristos test "X$echo_testing_string" = "X$echo_test_string"; then 469*b5677b36Schristos echo="$dir/echo" 470*b5677b36Schristos break 471*b5677b36Schristos fi 472*b5677b36Schristos done 473*b5677b36Schristos IFS="$lt_save_ifs" 474*b5677b36Schristos 475*b5677b36Schristos if test "X$echo" = Xecho; then 476*b5677b36Schristos # We didn't find a better echo, so look for alternatives. 477*b5677b36Schristos if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && 478*b5677b36Schristos echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && 479*b5677b36Schristos test "X$echo_testing_string" = "X$echo_test_string"; then 480*b5677b36Schristos # This shell has a builtin print -r that does the trick. 481*b5677b36Schristos echo='print -r' 482*b5677b36Schristos elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && 483*b5677b36Schristos test "X$CONFIG_SHELL" != X/bin/ksh; then 484*b5677b36Schristos # If we have ksh, try running configure again with it. 485*b5677b36Schristos ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} 486*b5677b36Schristos export ORIGINAL_CONFIG_SHELL 487*b5677b36Schristos CONFIG_SHELL=/bin/ksh 488*b5677b36Schristos export CONFIG_SHELL 489*b5677b36Schristos exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} 490*b5677b36Schristos else 491*b5677b36Schristos # Try using printf. 492*b5677b36Schristos echo='printf %s\n' 493*b5677b36Schristos if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && 494*b5677b36Schristos echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && 495*b5677b36Schristos test "X$echo_testing_string" = "X$echo_test_string"; then 496*b5677b36Schristos # Cool, printf works 497*b5677b36Schristos : 498*b5677b36Schristos elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && 499*b5677b36Schristos test "X$echo_testing_string" = 'X\t' && 500*b5677b36Schristos echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && 501*b5677b36Schristos test "X$echo_testing_string" = "X$echo_test_string"; then 502*b5677b36Schristos CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL 503*b5677b36Schristos export CONFIG_SHELL 504*b5677b36Schristos SHELL="$CONFIG_SHELL" 505*b5677b36Schristos export SHELL 506*b5677b36Schristos echo="$CONFIG_SHELL [$]0 --fallback-echo" 507*b5677b36Schristos elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && 508*b5677b36Schristos test "X$echo_testing_string" = 'X\t' && 509*b5677b36Schristos echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && 510*b5677b36Schristos test "X$echo_testing_string" = "X$echo_test_string"; then 511*b5677b36Schristos echo="$CONFIG_SHELL [$]0 --fallback-echo" 512*b5677b36Schristos else 513*b5677b36Schristos # maybe with a smaller string... 514*b5677b36Schristos prev=: 515*b5677b36Schristos 516*b5677b36Schristos for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do 517*b5677b36Schristos if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null 518*b5677b36Schristos then 519*b5677b36Schristos break 520*b5677b36Schristos fi 521*b5677b36Schristos prev="$cmd" 522*b5677b36Schristos done 523*b5677b36Schristos 524*b5677b36Schristos if test "$prev" != 'sed 50q "[$]0"'; then 525*b5677b36Schristos echo_test_string=`eval $prev` 526*b5677b36Schristos export echo_test_string 527*b5677b36Schristos exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} 528*b5677b36Schristos else 529*b5677b36Schristos # Oops. We lost completely, so just stick with echo. 530*b5677b36Schristos echo=echo 531*b5677b36Schristos fi 532*b5677b36Schristos fi 533*b5677b36Schristos fi 534*b5677b36Schristos fi 535*b5677b36Schristosfi 536*b5677b36Schristosfi 537*b5677b36Schristos 538*b5677b36Schristos# Copy echo and quote the copy suitably for passing to libtool from 539*b5677b36Schristos# the Makefile, instead of quoting the original, which is used later. 540*b5677b36SchristosECHO=$echo 541*b5677b36Schristosif test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then 542*b5677b36Schristos ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" 543*b5677b36Schristosfi 544*b5677b36Schristos 545*b5677b36SchristosAC_SUBST(ECHO) 546*b5677b36Schristos])])# _LT_AC_PROG_ECHO_BACKSLASH 547*b5677b36Schristos 548*b5677b36Schristos 549*b5677b36Schristos# _LT_AC_LOCK 550*b5677b36Schristos# ----------- 551*b5677b36SchristosAC_DEFUN([_LT_AC_LOCK], 552*b5677b36Schristos[AC_ARG_ENABLE([libtool-lock], 553*b5677b36Schristos [AC_HELP_STRING([--disable-libtool-lock], 554*b5677b36Schristos [avoid locking (might break parallel builds)])]) 555*b5677b36Schristostest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes 556*b5677b36Schristos 557*b5677b36Schristos# Some flags need to be propagated to the compiler or linker for good 558*b5677b36Schristos# libtool support. 559*b5677b36Schristoscase $host in 560*b5677b36Schristosia64-*-hpux*) 561*b5677b36Schristos # Find out which ABI we are using. 562*b5677b36Schristos echo 'int i;' > conftest.$ac_ext 563*b5677b36Schristos if AC_TRY_EVAL(ac_compile); then 564*b5677b36Schristos case `/usr/bin/file conftest.$ac_objext` in 565*b5677b36Schristos *ELF-32*) 566*b5677b36Schristos HPUX_IA64_MODE="32" 567*b5677b36Schristos ;; 568*b5677b36Schristos *ELF-64*) 569*b5677b36Schristos HPUX_IA64_MODE="64" 570*b5677b36Schristos ;; 571*b5677b36Schristos esac 572*b5677b36Schristos fi 573*b5677b36Schristos rm -rf conftest* 574*b5677b36Schristos ;; 575*b5677b36Schristos*-*-irix6*) 576*b5677b36Schristos # Find out which ABI we are using. 577*b5677b36Schristos echo '[#]line __oline__ "configure"' > conftest.$ac_ext 578*b5677b36Schristos if AC_TRY_EVAL(ac_compile); then 579*b5677b36Schristos if test "$lt_cv_prog_gnu_ld" = yes; then 580*b5677b36Schristos case `/usr/bin/file conftest.$ac_objext` in 581*b5677b36Schristos *32-bit*) 582*b5677b36Schristos LD="${LD-ld} -melf32bsmip" 583*b5677b36Schristos ;; 584*b5677b36Schristos *N32*) 585*b5677b36Schristos LD="${LD-ld} -melf32bmipn32" 586*b5677b36Schristos ;; 587*b5677b36Schristos *64-bit*) 588*b5677b36Schristos LD="${LD-ld} -melf64bmip" 589*b5677b36Schristos ;; 590*b5677b36Schristos esac 591*b5677b36Schristos else 592*b5677b36Schristos case `/usr/bin/file conftest.$ac_objext` in 593*b5677b36Schristos *32-bit*) 594*b5677b36Schristos LD="${LD-ld} -32" 595*b5677b36Schristos ;; 596*b5677b36Schristos *N32*) 597*b5677b36Schristos LD="${LD-ld} -n32" 598*b5677b36Schristos ;; 599*b5677b36Schristos *64-bit*) 600*b5677b36Schristos LD="${LD-ld} -64" 601*b5677b36Schristos ;; 602*b5677b36Schristos esac 603*b5677b36Schristos fi 604*b5677b36Schristos fi 605*b5677b36Schristos rm -rf conftest* 606*b5677b36Schristos ;; 607*b5677b36Schristos 608*b5677b36Schristosx86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ 609*b5677b36Schristoss390*-*linux*|sparc*-*linux*) 610*b5677b36Schristos # Find out which ABI we are using. 611*b5677b36Schristos echo 'int i;' > conftest.$ac_ext 612*b5677b36Schristos if AC_TRY_EVAL(ac_compile); then 613*b5677b36Schristos case `/usr/bin/file conftest.o` in 614*b5677b36Schristos *32-bit*) 615*b5677b36Schristos case $host in 616*b5677b36Schristos x86_64-*kfreebsd*-gnu) 617*b5677b36Schristos LD="${LD-ld} -m elf_i386_fbsd" 618*b5677b36Schristos ;; 619*b5677b36Schristos x86_64-*linux*) 620*b5677b36Schristos LD="${LD-ld} -m elf_i386" 621*b5677b36Schristos ;; 622*b5677b36Schristos ppc64-*linux*|powerpc64-*linux*) 623*b5677b36Schristos LD="${LD-ld} -m elf32ppclinux" 624*b5677b36Schristos ;; 625*b5677b36Schristos s390x-*linux*) 626*b5677b36Schristos LD="${LD-ld} -m elf_s390" 627*b5677b36Schristos ;; 628*b5677b36Schristos sparc64-*linux*) 629*b5677b36Schristos LD="${LD-ld} -m elf32_sparc" 630*b5677b36Schristos ;; 631*b5677b36Schristos esac 632*b5677b36Schristos ;; 633*b5677b36Schristos *64-bit*) 634*b5677b36Schristos case $host in 635*b5677b36Schristos x86_64-*kfreebsd*-gnu) 636*b5677b36Schristos LD="${LD-ld} -m elf_x86_64_fbsd" 637*b5677b36Schristos ;; 638*b5677b36Schristos x86_64-*linux*) 639*b5677b36Schristos LD="${LD-ld} -m elf_x86_64" 640*b5677b36Schristos ;; 641*b5677b36Schristos ppc*-*linux*|powerpc*-*linux*) 642*b5677b36Schristos LD="${LD-ld} -m elf64ppc" 643*b5677b36Schristos ;; 644*b5677b36Schristos s390*-*linux*) 645*b5677b36Schristos LD="${LD-ld} -m elf64_s390" 646*b5677b36Schristos ;; 647*b5677b36Schristos sparc*-*linux*) 648*b5677b36Schristos LD="${LD-ld} -m elf64_sparc" 649*b5677b36Schristos ;; 650*b5677b36Schristos esac 651*b5677b36Schristos ;; 652*b5677b36Schristos esac 653*b5677b36Schristos fi 654*b5677b36Schristos rm -rf conftest* 655*b5677b36Schristos ;; 656*b5677b36Schristos 657*b5677b36Schristos*-*-sco3.2v5*) 658*b5677b36Schristos # On SCO OpenServer 5, we need -belf to get full-featured binaries. 659*b5677b36Schristos SAVE_CFLAGS="$CFLAGS" 660*b5677b36Schristos CFLAGS="$CFLAGS -belf" 661*b5677b36Schristos AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 662*b5677b36Schristos [AC_LANG_PUSH(C) 663*b5677b36Schristos AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 664*b5677b36Schristos AC_LANG_POP]) 665*b5677b36Schristos if test x"$lt_cv_cc_needs_belf" != x"yes"; then 666*b5677b36Schristos # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 667*b5677b36Schristos CFLAGS="$SAVE_CFLAGS" 668*b5677b36Schristos fi 669*b5677b36Schristos ;; 670*b5677b36Schristossparc*-*solaris*) 671*b5677b36Schristos # Find out which ABI we are using. 672*b5677b36Schristos echo 'int i;' > conftest.$ac_ext 673*b5677b36Schristos if AC_TRY_EVAL(ac_compile); then 674*b5677b36Schristos case `/usr/bin/file conftest.o` in 675*b5677b36Schristos *64-bit*) 676*b5677b36Schristos case $lt_cv_prog_gnu_ld in 677*b5677b36Schristos yes*) LD="${LD-ld} -m elf64_sparc" ;; 678*b5677b36Schristos *) 679*b5677b36Schristos if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then 680*b5677b36Schristos LD="${LD-ld} -64" 681*b5677b36Schristos fi 682*b5677b36Schristos ;; 683*b5677b36Schristos esac 684*b5677b36Schristos ;; 685*b5677b36Schristos esac 686*b5677b36Schristos fi 687*b5677b36Schristos rm -rf conftest* 688*b5677b36Schristos ;; 689*b5677b36Schristos 690*b5677b36SchristosAC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], 691*b5677b36Schristos[*-*-cygwin* | *-*-mingw* | *-*-pw32*) 692*b5677b36Schristos AC_CHECK_TOOL(DLLTOOL, dlltool, false) 693*b5677b36Schristos AC_CHECK_TOOL(AS, as, false) 694*b5677b36Schristos AC_CHECK_TOOL(OBJDUMP, objdump, false) 695*b5677b36Schristos ;; 696*b5677b36Schristos ]) 697*b5677b36Schristosesac 698*b5677b36Schristos 699*b5677b36Schristosneed_locks="$enable_libtool_lock" 700*b5677b36Schristos 701*b5677b36Schristos])# _LT_AC_LOCK 702*b5677b36Schristos 703*b5677b36Schristos 704*b5677b36Schristos# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 705*b5677b36Schristos# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 706*b5677b36Schristos# ---------------------------------------------------------------- 707*b5677b36Schristos# Check whether the given compiler option works 708*b5677b36SchristosAC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], 709*b5677b36Schristos[AC_REQUIRE([LT_AC_PROG_SED]) 710*b5677b36SchristosAC_CACHE_CHECK([$1], [$2], 711*b5677b36Schristos [$2=no 712*b5677b36Schristos ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 713*b5677b36Schristos echo "$lt_simple_compile_test_code" > conftest.$ac_ext 714*b5677b36Schristos lt_compiler_flag="$3" 715*b5677b36Schristos # Insert the option either (1) after the last *FLAGS variable, or 716*b5677b36Schristos # (2) before a word containing "conftest.", or (3) at the end. 717*b5677b36Schristos # Note that $ac_compile itself does not contain backslashes and begins 718*b5677b36Schristos # with a dollar sign (not a hyphen), so the echo should work correctly. 719*b5677b36Schristos # The option is referenced via a variable to avoid confusing sed. 720*b5677b36Schristos lt_compile=`echo "$ac_compile" | $SED \ 721*b5677b36Schristos -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 722*b5677b36Schristos -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 723*b5677b36Schristos -e 's:$: $lt_compiler_flag:'` 724*b5677b36Schristos (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 725*b5677b36Schristos (eval "$lt_compile" 2>conftest.err) 726*b5677b36Schristos ac_status=$? 727*b5677b36Schristos cat conftest.err >&AS_MESSAGE_LOG_FD 728*b5677b36Schristos echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 729*b5677b36Schristos if (exit $ac_status) && test -s "$ac_outfile"; then 730*b5677b36Schristos # The compiler can only warn and ignore the option if not recognized 731*b5677b36Schristos # So say no if there are warnings other than the usual output. 732*b5677b36Schristos $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp 733*b5677b36Schristos $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 734*b5677b36Schristos if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 735*b5677b36Schristos $2=yes 736*b5677b36Schristos fi 737*b5677b36Schristos fi 738*b5677b36Schristos $rm conftest* 739*b5677b36Schristos]) 740*b5677b36Schristos 741*b5677b36Schristosif test x"[$]$2" = xyes; then 742*b5677b36Schristos ifelse([$5], , :, [$5]) 743*b5677b36Schristoselse 744*b5677b36Schristos ifelse([$6], , :, [$6]) 745*b5677b36Schristosfi 746*b5677b36Schristos])# AC_LIBTOOL_COMPILER_OPTION 747*b5677b36Schristos 748*b5677b36Schristos 749*b5677b36Schristos# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 750*b5677b36Schristos# [ACTION-SUCCESS], [ACTION-FAILURE]) 751*b5677b36Schristos# ------------------------------------------------------------ 752*b5677b36Schristos# Check whether the given compiler option works 753*b5677b36SchristosAC_DEFUN([AC_LIBTOOL_LINKER_OPTION], 754*b5677b36Schristos[AC_REQUIRE([LT_AC_PROG_SED])dnl 755*b5677b36SchristosAC_CACHE_CHECK([$1], [$2], 756*b5677b36Schristos [$2=no 757*b5677b36Schristos save_LDFLAGS="$LDFLAGS" 758*b5677b36Schristos LDFLAGS="$LDFLAGS $3" 759*b5677b36Schristos echo "$lt_simple_link_test_code" > conftest.$ac_ext 760*b5677b36Schristos if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 761*b5677b36Schristos # The linker can only warn and ignore the option if not recognized 762*b5677b36Schristos # So say no if there are warnings 763*b5677b36Schristos if test -s conftest.err; then 764*b5677b36Schristos # Append any errors to the config.log. 765*b5677b36Schristos cat conftest.err 1>&AS_MESSAGE_LOG_FD 766*b5677b36Schristos $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp 767*b5677b36Schristos $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 768*b5677b36Schristos if diff conftest.exp conftest.er2 >/dev/null; then 769*b5677b36Schristos $2=yes 770*b5677b36Schristos fi 771*b5677b36Schristos else 772*b5677b36Schristos $2=yes 773*b5677b36Schristos fi 774*b5677b36Schristos fi 775*b5677b36Schristos $rm -r conftest* 776*b5677b36Schristos LDFLAGS="$save_LDFLAGS" 777*b5677b36Schristos]) 778*b5677b36Schristos 779*b5677b36Schristosif test x"[$]$2" = xyes; then 780*b5677b36Schristos ifelse([$4], , :, [$4]) 781*b5677b36Schristoselse 782*b5677b36Schristos ifelse([$5], , :, [$5]) 783*b5677b36Schristosfi 784*b5677b36Schristos])# AC_LIBTOOL_LINKER_OPTION 785*b5677b36Schristos 786*b5677b36Schristos 787*b5677b36Schristos# AC_LIBTOOL_SYS_MAX_CMD_LEN 788*b5677b36Schristos# -------------------------- 789*b5677b36SchristosAC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], 790*b5677b36Schristos[# find the maximum length of command line arguments 791*b5677b36SchristosAC_MSG_CHECKING([the maximum length of command line arguments]) 792*b5677b36SchristosAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 793*b5677b36Schristos i=0 794*b5677b36Schristos teststring="ABCD" 795*b5677b36Schristos 796*b5677b36Schristos case $build_os in 797*b5677b36Schristos msdosdjgpp*) 798*b5677b36Schristos # On DJGPP, this test can blow up pretty badly due to problems in libc 799*b5677b36Schristos # (any single argument exceeding 2000 bytes causes a buffer overrun 800*b5677b36Schristos # during glob expansion). Even if it were fixed, the result of this 801*b5677b36Schristos # check would be larger than it should be. 802*b5677b36Schristos lt_cv_sys_max_cmd_len=12288; # 12K is about right 803*b5677b36Schristos ;; 804*b5677b36Schristos 805*b5677b36Schristos gnu*) 806*b5677b36Schristos # Under GNU Hurd, this test is not required because there is 807*b5677b36Schristos # no limit to the length of command line arguments. 808*b5677b36Schristos # Libtool will interpret -1 as no limit whatsoever 809*b5677b36Schristos lt_cv_sys_max_cmd_len=-1; 810*b5677b36Schristos ;; 811*b5677b36Schristos 812*b5677b36Schristos cygwin* | mingw*) 813*b5677b36Schristos # On Win9x/ME, this test blows up -- it succeeds, but takes 814*b5677b36Schristos # about 5 minutes as the teststring grows exponentially. 815*b5677b36Schristos # Worse, since 9x/ME are not pre-emptively multitasking, 816*b5677b36Schristos # you end up with a "frozen" computer, even though with patience 817*b5677b36Schristos # the test eventually succeeds (with a max line length of 256k). 818*b5677b36Schristos # Instead, let's just punt: use the minimum linelength reported by 819*b5677b36Schristos # all of the supported platforms: 8192 (on NT/2K/XP). 820*b5677b36Schristos lt_cv_sys_max_cmd_len=8192; 821*b5677b36Schristos ;; 822*b5677b36Schristos 823*b5677b36Schristos amigaos*) 824*b5677b36Schristos # On AmigaOS with pdksh, this test takes hours, literally. 825*b5677b36Schristos # So we just punt and use a minimum line length of 8192. 826*b5677b36Schristos lt_cv_sys_max_cmd_len=8192; 827*b5677b36Schristos ;; 828*b5677b36Schristos 829*b5677b36Schristos netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) 830*b5677b36Schristos # This has been around since 386BSD, at least. Likely further. 831*b5677b36Schristos if test -x /sbin/sysctl; then 832*b5677b36Schristos lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 833*b5677b36Schristos elif test -x /usr/sbin/sysctl; then 834*b5677b36Schristos lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 835*b5677b36Schristos else 836*b5677b36Schristos lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 837*b5677b36Schristos fi 838*b5677b36Schristos # And add a safety zone 839*b5677b36Schristos lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 840*b5677b36Schristos lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 841*b5677b36Schristos ;; 842*b5677b36Schristos 843*b5677b36Schristos interix*) 844*b5677b36Schristos # We know the value 262144 and hardcode it with a safety zone (like BSD) 845*b5677b36Schristos lt_cv_sys_max_cmd_len=196608 846*b5677b36Schristos ;; 847*b5677b36Schristos 848*b5677b36Schristos osf*) 849*b5677b36Schristos # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 850*b5677b36Schristos # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 851*b5677b36Schristos # nice to cause kernel panics so lets avoid the loop below. 852*b5677b36Schristos # First set a reasonable default. 853*b5677b36Schristos lt_cv_sys_max_cmd_len=16384 854*b5677b36Schristos # 855*b5677b36Schristos if test -x /sbin/sysconfig; then 856*b5677b36Schristos case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 857*b5677b36Schristos *1*) lt_cv_sys_max_cmd_len=-1 ;; 858*b5677b36Schristos esac 859*b5677b36Schristos fi 860*b5677b36Schristos ;; 861*b5677b36Schristos sco3.2v5*) 862*b5677b36Schristos lt_cv_sys_max_cmd_len=102400 863*b5677b36Schristos ;; 864*b5677b36Schristos sysv5* | sco5v6* | sysv4.2uw2*) 865*b5677b36Schristos kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 866*b5677b36Schristos if test -n "$kargmax"; then 867*b5677b36Schristos lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` 868*b5677b36Schristos else 869*b5677b36Schristos lt_cv_sys_max_cmd_len=32768 870*b5677b36Schristos fi 871*b5677b36Schristos ;; 872*b5677b36Schristos *) 873*b5677b36Schristos lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 874*b5677b36Schristos if test -n "$lt_cv_sys_max_cmd_len"; then 875*b5677b36Schristos lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 876*b5677b36Schristos lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 877*b5677b36Schristos else 878*b5677b36Schristos SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 879*b5677b36Schristos while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \ 880*b5677b36Schristos = "XX$teststring") >/dev/null 2>&1 && 881*b5677b36Schristos new_result=`expr "X$teststring" : ".*" 2>&1` && 882*b5677b36Schristos lt_cv_sys_max_cmd_len=$new_result && 883*b5677b36Schristos test $i != 17 # 1/2 MB should be enough 884*b5677b36Schristos do 885*b5677b36Schristos i=`expr $i + 1` 886*b5677b36Schristos teststring=$teststring$teststring 887*b5677b36Schristos done 888*b5677b36Schristos teststring= 889*b5677b36Schristos # Add a significant safety factor because C++ compilers can tack on massive 890*b5677b36Schristos # amounts of additional arguments before passing them to the linker. 891*b5677b36Schristos # It appears as though 1/2 is a usable value. 892*b5677b36Schristos lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 893*b5677b36Schristos fi 894*b5677b36Schristos ;; 895*b5677b36Schristos esac 896*b5677b36Schristos]) 897*b5677b36Schristosif test -n $lt_cv_sys_max_cmd_len ; then 898*b5677b36Schristos AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 899*b5677b36Schristoselse 900*b5677b36Schristos AC_MSG_RESULT(none) 901*b5677b36Schristosfi 902*b5677b36Schristos])# AC_LIBTOOL_SYS_MAX_CMD_LEN 903*b5677b36Schristos 904*b5677b36Schristos 905*b5677b36Schristos# _LT_AC_CHECK_DLFCN 906*b5677b36Schristos# ------------------ 907*b5677b36SchristosAC_DEFUN([_LT_AC_CHECK_DLFCN], 908*b5677b36Schristos[AC_CHECK_HEADERS(dlfcn.h)dnl 909*b5677b36Schristos])# _LT_AC_CHECK_DLFCN 910*b5677b36Schristos 911*b5677b36Schristos 912*b5677b36Schristos# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 913*b5677b36Schristos# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 914*b5677b36Schristos# --------------------------------------------------------------------- 915*b5677b36SchristosAC_DEFUN([_LT_AC_TRY_DLOPEN_SELF], 916*b5677b36Schristos[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl 917*b5677b36Schristosif test "$cross_compiling" = yes; then : 918*b5677b36Schristos [$4] 919*b5677b36Schristoselse 920*b5677b36Schristos lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 921*b5677b36Schristos lt_status=$lt_dlunknown 922*b5677b36Schristos cat > conftest.$ac_ext <<EOF 923*b5677b36Schristos[#line __oline__ "configure" 924*b5677b36Schristos#include "confdefs.h" 925*b5677b36Schristos 926*b5677b36Schristos#if HAVE_DLFCN_H 927*b5677b36Schristos#include <dlfcn.h> 928*b5677b36Schristos#endif 929*b5677b36Schristos 930*b5677b36Schristos#include <stdio.h> 931*b5677b36Schristos 932*b5677b36Schristos#ifdef RTLD_GLOBAL 933*b5677b36Schristos# define LT_DLGLOBAL RTLD_GLOBAL 934*b5677b36Schristos#else 935*b5677b36Schristos# ifdef DL_GLOBAL 936*b5677b36Schristos# define LT_DLGLOBAL DL_GLOBAL 937*b5677b36Schristos# else 938*b5677b36Schristos# define LT_DLGLOBAL 0 939*b5677b36Schristos# endif 940*b5677b36Schristos#endif 941*b5677b36Schristos 942*b5677b36Schristos/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 943*b5677b36Schristos find out it does not work in some platform. */ 944*b5677b36Schristos#ifndef LT_DLLAZY_OR_NOW 945*b5677b36Schristos# ifdef RTLD_LAZY 946*b5677b36Schristos# define LT_DLLAZY_OR_NOW RTLD_LAZY 947*b5677b36Schristos# else 948*b5677b36Schristos# ifdef DL_LAZY 949*b5677b36Schristos# define LT_DLLAZY_OR_NOW DL_LAZY 950*b5677b36Schristos# else 951*b5677b36Schristos# ifdef RTLD_NOW 952*b5677b36Schristos# define LT_DLLAZY_OR_NOW RTLD_NOW 953*b5677b36Schristos# else 954*b5677b36Schristos# ifdef DL_NOW 955*b5677b36Schristos# define LT_DLLAZY_OR_NOW DL_NOW 956*b5677b36Schristos# else 957*b5677b36Schristos# define LT_DLLAZY_OR_NOW 0 958*b5677b36Schristos# endif 959*b5677b36Schristos# endif 960*b5677b36Schristos# endif 961*b5677b36Schristos# endif 962*b5677b36Schristos#endif 963*b5677b36Schristos 964*b5677b36Schristos#ifdef __cplusplus 965*b5677b36Schristosextern "C" void exit (int); 966*b5677b36Schristos#endif 967*b5677b36Schristos 968*b5677b36Schristosvoid fnord() { int i=42;} 969*b5677b36Schristosint main () 970*b5677b36Schristos{ 971*b5677b36Schristos void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 972*b5677b36Schristos int status = $lt_dlunknown; 973*b5677b36Schristos 974*b5677b36Schristos if (self) 975*b5677b36Schristos { 976*b5677b36Schristos if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 977*b5677b36Schristos else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 978*b5677b36Schristos /* dlclose (self); */ 979*b5677b36Schristos } 980*b5677b36Schristos else 981*b5677b36Schristos puts (dlerror ()); 982*b5677b36Schristos 983*b5677b36Schristos exit (status); 984*b5677b36Schristos}] 985*b5677b36SchristosEOF 986*b5677b36Schristos if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then 987*b5677b36Schristos (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 988*b5677b36Schristos lt_status=$? 989*b5677b36Schristos case x$lt_status in 990*b5677b36Schristos x$lt_dlno_uscore) $1 ;; 991*b5677b36Schristos x$lt_dlneed_uscore) $2 ;; 992*b5677b36Schristos x$lt_dlunknown|x*) $3 ;; 993*b5677b36Schristos esac 994*b5677b36Schristos else : 995*b5677b36Schristos # compilation failed 996*b5677b36Schristos $3 997*b5677b36Schristos fi 998*b5677b36Schristosfi 999*b5677b36Schristosrm -fr conftest* 1000*b5677b36Schristos])# _LT_AC_TRY_DLOPEN_SELF 1001*b5677b36Schristos 1002*b5677b36Schristos 1003*b5677b36Schristos# AC_LIBTOOL_DLOPEN_SELF 1004*b5677b36Schristos# ---------------------- 1005*b5677b36SchristosAC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], 1006*b5677b36Schristos[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl 1007*b5677b36Schristosif test "x$enable_dlopen" != xyes; then 1008*b5677b36Schristos enable_dlopen=unknown 1009*b5677b36Schristos enable_dlopen_self=unknown 1010*b5677b36Schristos enable_dlopen_self_static=unknown 1011*b5677b36Schristoselse 1012*b5677b36Schristos lt_cv_dlopen=no 1013*b5677b36Schristos lt_cv_dlopen_libs= 1014*b5677b36Schristos 1015*b5677b36Schristos case $host_os in 1016*b5677b36Schristos beos*) 1017*b5677b36Schristos lt_cv_dlopen="load_add_on" 1018*b5677b36Schristos lt_cv_dlopen_libs= 1019*b5677b36Schristos lt_cv_dlopen_self=yes 1020*b5677b36Schristos ;; 1021*b5677b36Schristos 1022*b5677b36Schristos mingw* | pw32*) 1023*b5677b36Schristos lt_cv_dlopen="LoadLibrary" 1024*b5677b36Schristos lt_cv_dlopen_libs= 1025*b5677b36Schristos ;; 1026*b5677b36Schristos 1027*b5677b36Schristos cygwin*) 1028*b5677b36Schristos lt_cv_dlopen="dlopen" 1029*b5677b36Schristos lt_cv_dlopen_libs= 1030*b5677b36Schristos ;; 1031*b5677b36Schristos 1032*b5677b36Schristos darwin*) 1033*b5677b36Schristos # if libdl is installed we need to link against it 1034*b5677b36Schristos AC_CHECK_LIB([dl], [dlopen], 1035*b5677b36Schristos [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ 1036*b5677b36Schristos lt_cv_dlopen="dyld" 1037*b5677b36Schristos lt_cv_dlopen_libs= 1038*b5677b36Schristos lt_cv_dlopen_self=yes 1039*b5677b36Schristos ]) 1040*b5677b36Schristos ;; 1041*b5677b36Schristos 1042*b5677b36Schristos *) 1043*b5677b36Schristos AC_CHECK_FUNC([shl_load], 1044*b5677b36Schristos [lt_cv_dlopen="shl_load"], 1045*b5677b36Schristos [AC_CHECK_LIB([dld], [shl_load], 1046*b5677b36Schristos [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], 1047*b5677b36Schristos [AC_CHECK_FUNC([dlopen], 1048*b5677b36Schristos [lt_cv_dlopen="dlopen"], 1049*b5677b36Schristos [AC_CHECK_LIB([dl], [dlopen], 1050*b5677b36Schristos [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], 1051*b5677b36Schristos [AC_CHECK_LIB([svld], [dlopen], 1052*b5677b36Schristos [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], 1053*b5677b36Schristos [AC_CHECK_LIB([dld], [dld_link], 1054*b5677b36Schristos [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) 1055*b5677b36Schristos ]) 1056*b5677b36Schristos ]) 1057*b5677b36Schristos ]) 1058*b5677b36Schristos ]) 1059*b5677b36Schristos ]) 1060*b5677b36Schristos ;; 1061*b5677b36Schristos esac 1062*b5677b36Schristos 1063*b5677b36Schristos if test "x$lt_cv_dlopen" != xno; then 1064*b5677b36Schristos enable_dlopen=yes 1065*b5677b36Schristos else 1066*b5677b36Schristos enable_dlopen=no 1067*b5677b36Schristos fi 1068*b5677b36Schristos 1069*b5677b36Schristos case $lt_cv_dlopen in 1070*b5677b36Schristos dlopen) 1071*b5677b36Schristos save_CPPFLAGS="$CPPFLAGS" 1072*b5677b36Schristos test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 1073*b5677b36Schristos 1074*b5677b36Schristos save_LDFLAGS="$LDFLAGS" 1075*b5677b36Schristos wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 1076*b5677b36Schristos 1077*b5677b36Schristos save_LIBS="$LIBS" 1078*b5677b36Schristos LIBS="$lt_cv_dlopen_libs $LIBS" 1079*b5677b36Schristos 1080*b5677b36Schristos AC_CACHE_CHECK([whether a program can dlopen itself], 1081*b5677b36Schristos lt_cv_dlopen_self, [dnl 1082*b5677b36Schristos _LT_AC_TRY_DLOPEN_SELF( 1083*b5677b36Schristos lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 1084*b5677b36Schristos lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 1085*b5677b36Schristos ]) 1086*b5677b36Schristos 1087*b5677b36Schristos if test "x$lt_cv_dlopen_self" = xyes; then 1088*b5677b36Schristos wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 1089*b5677b36Schristos AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 1090*b5677b36Schristos lt_cv_dlopen_self_static, [dnl 1091*b5677b36Schristos _LT_AC_TRY_DLOPEN_SELF( 1092*b5677b36Schristos lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 1093*b5677b36Schristos lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 1094*b5677b36Schristos ]) 1095*b5677b36Schristos fi 1096*b5677b36Schristos 1097*b5677b36Schristos CPPFLAGS="$save_CPPFLAGS" 1098*b5677b36Schristos LDFLAGS="$save_LDFLAGS" 1099*b5677b36Schristos LIBS="$save_LIBS" 1100*b5677b36Schristos ;; 1101*b5677b36Schristos esac 1102*b5677b36Schristos 1103*b5677b36Schristos case $lt_cv_dlopen_self in 1104*b5677b36Schristos yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 1105*b5677b36Schristos *) enable_dlopen_self=unknown ;; 1106*b5677b36Schristos esac 1107*b5677b36Schristos 1108*b5677b36Schristos case $lt_cv_dlopen_self_static in 1109*b5677b36Schristos yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 1110*b5677b36Schristos *) enable_dlopen_self_static=unknown ;; 1111*b5677b36Schristos esac 1112*b5677b36Schristosfi 1113*b5677b36Schristos])# AC_LIBTOOL_DLOPEN_SELF 1114*b5677b36Schristos 1115*b5677b36Schristos 1116*b5677b36Schristos# AC_LIBTOOL_PROG_CC_C_O([TAGNAME]) 1117*b5677b36Schristos# --------------------------------- 1118*b5677b36Schristos# Check to see if options -c and -o are simultaneously supported by compiler 1119*b5677b36SchristosAC_DEFUN([AC_LIBTOOL_PROG_CC_C_O], 1120*b5677b36Schristos[AC_REQUIRE([LT_AC_PROG_SED])dnl 1121*b5677b36SchristosAC_REQUIRE([_LT_AC_SYS_COMPILER])dnl 1122*b5677b36SchristosAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 1123*b5677b36Schristos [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 1124*b5677b36Schristos [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 1125*b5677b36Schristos $rm -r conftest 2>/dev/null 1126*b5677b36Schristos mkdir conftest 1127*b5677b36Schristos cd conftest 1128*b5677b36Schristos mkdir out 1129*b5677b36Schristos echo "$lt_simple_compile_test_code" > conftest.$ac_ext 1130*b5677b36Schristos 1131*b5677b36Schristos lt_compiler_flag="-o out/conftest2.$ac_objext" 1132*b5677b36Schristos # Insert the option either (1) after the last *FLAGS variable, or 1133*b5677b36Schristos # (2) before a word containing "conftest.", or (3) at the end. 1134*b5677b36Schristos # Note that $ac_compile itself does not contain backslashes and begins 1135*b5677b36Schristos # with a dollar sign (not a hyphen), so the echo should work correctly. 1136*b5677b36Schristos lt_compile=`echo "$ac_compile" | $SED \ 1137*b5677b36Schristos -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 1138*b5677b36Schristos -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 1139*b5677b36Schristos -e 's:$: $lt_compiler_flag:'` 1140*b5677b36Schristos (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 1141*b5677b36Schristos (eval "$lt_compile" 2>out/conftest.err) 1142*b5677b36Schristos ac_status=$? 1143*b5677b36Schristos cat out/conftest.err >&AS_MESSAGE_LOG_FD 1144*b5677b36Schristos echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 1145*b5677b36Schristos if (exit $ac_status) && test -s out/conftest2.$ac_objext 1146*b5677b36Schristos then 1147*b5677b36Schristos # The compiler can only warn and ignore the option if not recognized 1148*b5677b36Schristos # So say no if there are warnings 1149*b5677b36Schristos $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp 1150*b5677b36Schristos $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 1151*b5677b36Schristos if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 1152*b5677b36Schristos _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 1153*b5677b36Schristos fi 1154*b5677b36Schristos fi 1155*b5677b36Schristos chmod u+w . 2>&AS_MESSAGE_LOG_FD 1156*b5677b36Schristos $rm conftest* 1157*b5677b36Schristos # SGI C++ compiler will create directory out/ii_files/ for 1158*b5677b36Schristos # template instantiation 1159*b5677b36Schristos test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files 1160*b5677b36Schristos $rm out/* && rmdir out 1161*b5677b36Schristos cd .. 1162*b5677b36Schristos rmdir conftest 1163*b5677b36Schristos $rm conftest* 1164*b5677b36Schristos]) 1165*b5677b36Schristos])# AC_LIBTOOL_PROG_CC_C_O 1166*b5677b36Schristos 1167*b5677b36Schristos 1168*b5677b36Schristos# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME]) 1169*b5677b36Schristos# ----------------------------------------- 1170*b5677b36Schristos# Check to see if we can do hard links to lock some files if needed 1171*b5677b36SchristosAC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], 1172*b5677b36Schristos[AC_REQUIRE([_LT_AC_LOCK])dnl 1173*b5677b36Schristos 1174*b5677b36Schristoshard_links="nottested" 1175*b5677b36Schristosif test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then 1176*b5677b36Schristos # do not overwrite the value of need_locks provided by the user 1177*b5677b36Schristos AC_MSG_CHECKING([if we can lock with hard links]) 1178*b5677b36Schristos hard_links=yes 1179*b5677b36Schristos $rm conftest* 1180*b5677b36Schristos ln conftest.a conftest.b 2>/dev/null && hard_links=no 1181*b5677b36Schristos touch conftest.a 1182*b5677b36Schristos ln conftest.a conftest.b 2>&5 || hard_links=no 1183*b5677b36Schristos ln conftest.a conftest.b 2>/dev/null && hard_links=no 1184*b5677b36Schristos AC_MSG_RESULT([$hard_links]) 1185*b5677b36Schristos if test "$hard_links" = no; then 1186*b5677b36Schristos AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) 1187*b5677b36Schristos need_locks=warn 1188*b5677b36Schristos fi 1189*b5677b36Schristoselse 1190*b5677b36Schristos need_locks=no 1191*b5677b36Schristosfi 1192*b5677b36Schristos])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS 1193*b5677b36Schristos 1194*b5677b36Schristos 1195*b5677b36Schristos# AC_LIBTOOL_OBJDIR 1196*b5677b36Schristos# ----------------- 1197*b5677b36SchristosAC_DEFUN([AC_LIBTOOL_OBJDIR], 1198*b5677b36Schristos[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 1199*b5677b36Schristos[rm -f .libs 2>/dev/null 1200*b5677b36Schristosmkdir .libs 2>/dev/null 1201*b5677b36Schristosif test -d .libs; then 1202*b5677b36Schristos lt_cv_objdir=.libs 1203*b5677b36Schristoselse 1204*b5677b36Schristos # MS-DOS does not allow filenames that begin with a dot. 1205*b5677b36Schristos lt_cv_objdir=_libs 1206*b5677b36Schristosfi 1207*b5677b36Schristosrmdir .libs 2>/dev/null]) 1208*b5677b36Schristosobjdir=$lt_cv_objdir 1209*b5677b36Schristos])# AC_LIBTOOL_OBJDIR 1210*b5677b36Schristos 1211*b5677b36Schristos 1212*b5677b36Schristos# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME]) 1213*b5677b36Schristos# ---------------------------------------------- 1214*b5677b36Schristos# Check hardcoding attributes. 1215*b5677b36SchristosAC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], 1216*b5677b36Schristos[AC_MSG_CHECKING([how to hardcode library paths into programs]) 1217*b5677b36Schristos_LT_AC_TAGVAR(hardcode_action, $1)= 1218*b5677b36Schristosif test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \ 1219*b5677b36Schristos test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \ 1220*b5677b36Schristos test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then 1221*b5677b36Schristos 1222*b5677b36Schristos # We can hardcode non-existant directories. 1223*b5677b36Schristos if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no && 1224*b5677b36Schristos # If the only mechanism to avoid hardcoding is shlibpath_var, we 1225*b5677b36Schristos # have to relink, otherwise we might link with an installed library 1226*b5677b36Schristos # when we should be linking with a yet-to-be-installed one 1227*b5677b36Schristos ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no && 1228*b5677b36Schristos test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then 1229*b5677b36Schristos # Linking always hardcodes the temporary library directory. 1230*b5677b36Schristos _LT_AC_TAGVAR(hardcode_action, $1)=relink 1231*b5677b36Schristos else 1232*b5677b36Schristos # We can link without hardcoding, and we can hardcode nonexisting dirs. 1233*b5677b36Schristos _LT_AC_TAGVAR(hardcode_action, $1)=immediate 1234*b5677b36Schristos fi 1235*b5677b36Schristoselse 1236*b5677b36Schristos # We cannot hardcode anything, or else we can only hardcode existing 1237*b5677b36Schristos # directories. 1238*b5677b36Schristos _LT_AC_TAGVAR(hardcode_action, $1)=unsupported 1239*b5677b36Schristosfi 1240*b5677b36SchristosAC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)]) 1241*b5677b36Schristos 1242*b5677b36Schristosif test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then 1243*b5677b36Schristos # Fast installation is not supported 1244*b5677b36Schristos enable_fast_install=no 1245*b5677b36Schristoselif test "$shlibpath_overrides_runpath" = yes || 1246*b5677b36Schristos test "$enable_shared" = no; then 1247*b5677b36Schristos # Fast installation is not necessary 1248*b5677b36Schristos enable_fast_install=needless 1249*b5677b36Schristosfi 1250*b5677b36Schristos])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH 1251*b5677b36Schristos 1252*b5677b36Schristos 1253*b5677b36Schristos# AC_LIBTOOL_SYS_LIB_STRIP 1254*b5677b36Schristos# ------------------------ 1255*b5677b36SchristosAC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP], 1256*b5677b36Schristos[striplib= 1257*b5677b36Schristosold_striplib= 1258*b5677b36SchristosAC_MSG_CHECKING([whether stripping libraries is possible]) 1259*b5677b36Schristosif test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then 1260*b5677b36Schristos test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" 1261*b5677b36Schristos test -z "$striplib" && striplib="$STRIP --strip-unneeded" 1262*b5677b36Schristos AC_MSG_RESULT([yes]) 1263*b5677b36Schristoselse 1264*b5677b36Schristos# FIXME - insert some real tests, host_os isn't really good enough 1265*b5677b36Schristos case $host_os in 1266*b5677b36Schristos darwin*) 1267*b5677b36Schristos if test -n "$STRIP" ; then 1268*b5677b36Schristos striplib="$STRIP -x" 1269*b5677b36Schristos old_striplib="$STRIP -S" 1270*b5677b36Schristos AC_MSG_RESULT([yes]) 1271*b5677b36Schristos else 1272*b5677b36Schristos AC_MSG_RESULT([no]) 1273*b5677b36Schristosfi 1274*b5677b36Schristos ;; 1275*b5677b36Schristos *) 1276*b5677b36Schristos AC_MSG_RESULT([no]) 1277*b5677b36Schristos ;; 1278*b5677b36Schristos esac 1279*b5677b36Schristosfi 1280*b5677b36Schristos])# AC_LIBTOOL_SYS_LIB_STRIP 1281*b5677b36Schristos 1282*b5677b36Schristos 1283*b5677b36Schristos# AC_LIBTOOL_SYS_DYNAMIC_LINKER 1284*b5677b36Schristos# ----------------------------- 1285*b5677b36Schristos# PORTME Fill in your ld.so characteristics 1286*b5677b36SchristosAC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER], 1287*b5677b36Schristos[AC_REQUIRE([LT_AC_PROG_SED])dnl 1288*b5677b36SchristosAC_MSG_CHECKING([dynamic linker characteristics]) 1289*b5677b36Schristoslibrary_names_spec= 1290*b5677b36Schristoslibname_spec='lib$name' 1291*b5677b36Schristossoname_spec= 1292*b5677b36Schristosshrext_cmds=".so" 1293*b5677b36Schristospostinstall_cmds= 1294*b5677b36Schristospostuninstall_cmds= 1295*b5677b36Schristosfinish_cmds= 1296*b5677b36Schristosfinish_eval= 1297*b5677b36Schristosshlibpath_var= 1298*b5677b36Schristosshlibpath_overrides_runpath=unknown 1299*b5677b36Schristosversion_type=none 1300*b5677b36Schristosdynamic_linker="$host_os ld.so" 1301*b5677b36Schristossys_lib_dlsearch_path_spec="/lib /usr/lib" 1302*b5677b36Schristosm4_if($1,[],[ 1303*b5677b36Schristosif test "$GCC" = yes; then 1304*b5677b36Schristos case $host_os in 1305*b5677b36Schristos darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; 1306*b5677b36Schristos *) lt_awk_arg="/^libraries:/" ;; 1307*b5677b36Schristos esac 1308*b5677b36Schristos lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` 1309*b5677b36Schristos if echo "$lt_search_path_spec" | grep ';' >/dev/null ; then 1310*b5677b36Schristos # if the path contains ";" then we assume it to be the separator 1311*b5677b36Schristos # otherwise default to the standard path separator (i.e. ":") - it is 1312*b5677b36Schristos # assumed that no part of a normal pathname contains ";" but that should 1313*b5677b36Schristos # okay in the real world where ";" in dirpaths is itself problematic. 1314*b5677b36Schristos lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e 's/;/ /g'` 1315*b5677b36Schristos else 1316*b5677b36Schristos lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 1317*b5677b36Schristos fi 1318*b5677b36Schristos # Ok, now we have the path, separated by spaces, we can step through it 1319*b5677b36Schristos # and add multilib dir if necessary. 1320*b5677b36Schristos lt_tmp_lt_search_path_spec= 1321*b5677b36Schristos lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 1322*b5677b36Schristos for lt_sys_path in $lt_search_path_spec; do 1323*b5677b36Schristos if test -d "$lt_sys_path/$lt_multi_os_dir"; then 1324*b5677b36Schristos lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" 1325*b5677b36Schristos else 1326*b5677b36Schristos test -d "$lt_sys_path" && \ 1327*b5677b36Schristos lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 1328*b5677b36Schristos fi 1329*b5677b36Schristos done 1330*b5677b36Schristos lt_search_path_spec=`echo $lt_tmp_lt_search_path_spec | awk ' 1331*b5677b36SchristosBEGIN {RS=" "; FS="/|\n";} { 1332*b5677b36Schristos lt_foo=""; 1333*b5677b36Schristos lt_count=0; 1334*b5677b36Schristos for (lt_i = NF; lt_i > 0; lt_i--) { 1335*b5677b36Schristos if ($lt_i != "" && $lt_i != ".") { 1336*b5677b36Schristos if ($lt_i == "..") { 1337*b5677b36Schristos lt_count++; 1338*b5677b36Schristos } else { 1339*b5677b36Schristos if (lt_count == 0) { 1340*b5677b36Schristos lt_foo="/" $lt_i lt_foo; 1341*b5677b36Schristos } else { 1342*b5677b36Schristos lt_count--; 1343*b5677b36Schristos } 1344*b5677b36Schristos } 1345*b5677b36Schristos } 1346*b5677b36Schristos } 1347*b5677b36Schristos if (lt_foo != "") { lt_freq[[lt_foo]]++; } 1348*b5677b36Schristos if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 1349*b5677b36Schristos}'` 1350*b5677b36Schristos sys_lib_search_path_spec=`echo $lt_search_path_spec` 1351*b5677b36Schristoselse 1352*b5677b36Schristos sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 1353*b5677b36Schristosfi]) 1354*b5677b36Schristosneed_lib_prefix=unknown 1355*b5677b36Schristoshardcode_into_libs=no 1356*b5677b36Schristos 1357*b5677b36Schristos# when you set need_version to no, make sure it does not cause -set_version 1358*b5677b36Schristos# flags to be left without arguments 1359*b5677b36Schristosneed_version=unknown 1360*b5677b36Schristos 1361*b5677b36Schristoscase $host_os in 1362*b5677b36Schristosaix3*) 1363*b5677b36Schristos version_type=linux 1364*b5677b36Schristos library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' 1365*b5677b36Schristos shlibpath_var=LIBPATH 1366*b5677b36Schristos 1367*b5677b36Schristos # AIX 3 has no versioning support, so we append a major version to the name. 1368*b5677b36Schristos soname_spec='${libname}${release}${shared_ext}$major' 1369*b5677b36Schristos ;; 1370*b5677b36Schristos 1371*b5677b36Schristosaix[[4-9]]*) 1372*b5677b36Schristos version_type=linux 1373*b5677b36Schristos need_lib_prefix=no 1374*b5677b36Schristos need_version=no 1375*b5677b36Schristos hardcode_into_libs=yes 1376*b5677b36Schristos if test "$host_cpu" = ia64; then 1377*b5677b36Schristos # AIX 5 supports IA64 1378*b5677b36Schristos library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' 1379*b5677b36Schristos shlibpath_var=LD_LIBRARY_PATH 1380*b5677b36Schristos else 1381*b5677b36Schristos # With GCC up to 2.95.x, collect2 would create an import file 1382*b5677b36Schristos # for dependence libraries. The import file would start with 1383*b5677b36Schristos # the line `#! .'. This would cause the generated library to 1384*b5677b36Schristos # depend on `.', always an invalid library. This was fixed in 1385*b5677b36Schristos # development snapshots of GCC prior to 3.0. 1386*b5677b36Schristos case $host_os in 1387*b5677b36Schristos aix4 | aix4.[[01]] | aix4.[[01]].*) 1388*b5677b36Schristos if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 1389*b5677b36Schristos echo ' yes ' 1390*b5677b36Schristos echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then 1391*b5677b36Schristos : 1392*b5677b36Schristos else 1393*b5677b36Schristos can_build_shared=no 1394*b5677b36Schristos fi 1395*b5677b36Schristos ;; 1396*b5677b36Schristos esac 1397*b5677b36Schristos # AIX (on Power*) has no versioning support, so currently we can not hardcode correct 1398*b5677b36Schristos # soname into executable. Probably we can add versioning support to 1399*b5677b36Schristos # collect2, so additional links can be useful in future. 1400*b5677b36Schristos if test "$aix_use_runtimelinking" = yes; then 1401*b5677b36Schristos # If using run time linking (on AIX 4.2 or later) use lib<name>.so 1402*b5677b36Schristos # instead of lib<name>.a to let people know that these are not 1403*b5677b36Schristos # typical AIX shared libraries. 1404*b5677b36Schristos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 1405*b5677b36Schristos else 1406*b5677b36Schristos # We preserve .a as extension for shared libraries through AIX4.2 1407*b5677b36Schristos # and later when we are not doing run time linking. 1408*b5677b36Schristos library_names_spec='${libname}${release}.a $libname.a' 1409*b5677b36Schristos soname_spec='${libname}${release}${shared_ext}$major' 1410*b5677b36Schristos fi 1411*b5677b36Schristos shlibpath_var=LIBPATH 1412*b5677b36Schristos fi 1413*b5677b36Schristos ;; 1414*b5677b36Schristos 1415*b5677b36Schristosamigaos*) 1416*b5677b36Schristos library_names_spec='$libname.ixlibrary $libname.a' 1417*b5677b36Schristos # Create ${libname}_ixlibrary.a entries in /sys/libs. 1418*b5677b36Schristos finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''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' 1419*b5677b36Schristos ;; 1420*b5677b36Schristos 1421*b5677b36Schristosbeos*) 1422*b5677b36Schristos library_names_spec='${libname}${shared_ext}' 1423*b5677b36Schristos dynamic_linker="$host_os ld.so" 1424*b5677b36Schristos shlibpath_var=LIBRARY_PATH 1425*b5677b36Schristos ;; 1426*b5677b36Schristos 1427*b5677b36Schristosbsdi[[45]]*) 1428*b5677b36Schristos version_type=linux 1429*b5677b36Schristos need_version=no 1430*b5677b36Schristos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 1431*b5677b36Schristos soname_spec='${libname}${release}${shared_ext}$major' 1432*b5677b36Schristos finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 1433*b5677b36Schristos shlibpath_var=LD_LIBRARY_PATH 1434*b5677b36Schristos sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 1435*b5677b36Schristos sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 1436*b5677b36Schristos # the default ld.so.conf also contains /usr/contrib/lib and 1437*b5677b36Schristos # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 1438*b5677b36Schristos # libtool to hard-code these into programs 1439*b5677b36Schristos ;; 1440*b5677b36Schristos 1441*b5677b36Schristoscygwin* | mingw* | pw32*) 1442*b5677b36Schristos version_type=windows 1443*b5677b36Schristos shrext_cmds=".dll" 1444*b5677b36Schristos need_version=no 1445*b5677b36Schristos need_lib_prefix=no 1446*b5677b36Schristos 1447*b5677b36Schristos case $GCC,$host_os in 1448*b5677b36Schristos yes,cygwin* | yes,mingw* | yes,pw32*) 1449*b5677b36Schristos library_names_spec='$libname.dll.a' 1450*b5677b36Schristos # DLL is installed to $(libdir)/../bin by postinstall_cmds 1451*b5677b36Schristos postinstall_cmds='base_file=`basename \${file}`~ 1452*b5677b36Schristos dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ 1453*b5677b36Schristos dldir=$destdir/`dirname \$dlpath`~ 1454*b5677b36Schristos test -d \$dldir || mkdir -p \$dldir~ 1455*b5677b36Schristos $install_prog $dir/$dlname \$dldir/$dlname~ 1456*b5677b36Schristos chmod a+x \$dldir/$dlname' 1457*b5677b36Schristos postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 1458*b5677b36Schristos dlpath=$dir/\$dldll~ 1459*b5677b36Schristos $rm \$dlpath' 1460*b5677b36Schristos shlibpath_overrides_runpath=yes 1461*b5677b36Schristos 1462*b5677b36Schristos case $host_os in 1463*b5677b36Schristos cygwin*) 1464*b5677b36Schristos # Cygwin DLLs use 'cyg' prefix rather than 'lib' 1465*b5677b36Schristos soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 1466*b5677b36Schristos sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" 1467*b5677b36Schristos ;; 1468*b5677b36Schristos mingw*) 1469*b5677b36Schristos # MinGW DLLs use traditional 'lib' prefix 1470*b5677b36Schristos soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 1471*b5677b36Schristos sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` 1472*b5677b36Schristos if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then 1473*b5677b36Schristos # It is most probably a Windows format PATH printed by 1474*b5677b36Schristos # mingw gcc, but we are running on Cygwin. Gcc prints its search 1475*b5677b36Schristos # path with ; separators, and with drive letters. We can handle the 1476*b5677b36Schristos # drive letters (cygwin fileutils understands them), so leave them, 1477*b5677b36Schristos # especially as we might pass files found there to a mingw objdump, 1478*b5677b36Schristos # which wouldn't understand a cygwinified path. Ahh. 1479*b5677b36Schristos sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 1480*b5677b36Schristos else 1481*b5677b36Schristos sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 1482*b5677b36Schristos fi 1483*b5677b36Schristos ;; 1484*b5677b36Schristos pw32*) 1485*b5677b36Schristos # pw32 DLLs use 'pw' prefix rather than 'lib' 1486*b5677b36Schristos library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 1487*b5677b36Schristos ;; 1488*b5677b36Schristos esac 1489*b5677b36Schristos ;; 1490*b5677b36Schristos 1491*b5677b36Schristos *) 1492*b5677b36Schristos library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' 1493*b5677b36Schristos ;; 1494*b5677b36Schristos esac 1495*b5677b36Schristos dynamic_linker='Win32 ld.exe' 1496*b5677b36Schristos # FIXME: first we should search . and the directory the executable is in 1497*b5677b36Schristos shlibpath_var=PATH 1498*b5677b36Schristos ;; 1499*b5677b36Schristos 1500*b5677b36Schristosdarwin* | rhapsody*) 1501*b5677b36Schristos dynamic_linker="$host_os dyld" 1502*b5677b36Schristos version_type=darwin 1503*b5677b36Schristos need_lib_prefix=no 1504*b5677b36Schristos need_version=no 1505*b5677b36Schristos library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' 1506*b5677b36Schristos soname_spec='${libname}${release}${major}$shared_ext' 1507*b5677b36Schristos shlibpath_overrides_runpath=yes 1508*b5677b36Schristos shlibpath_var=DYLD_LIBRARY_PATH 1509*b5677b36Schristos shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 1510*b5677b36Schristos m4_if([$1], [],[ 1511*b5677b36Schristos sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 1512*b5677b36Schristos sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 1513*b5677b36Schristos ;; 1514*b5677b36Schristos 1515*b5677b36Schristosdgux*) 1516*b5677b36Schristos version_type=linux 1517*b5677b36Schristos need_lib_prefix=no 1518*b5677b36Schristos need_version=no 1519*b5677b36Schristos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' 1520*b5677b36Schristos soname_spec='${libname}${release}${shared_ext}$major' 1521*b5677b36Schristos shlibpath_var=LD_LIBRARY_PATH 1522*b5677b36Schristos ;; 1523*b5677b36Schristos 1524*b5677b36Schristosfreebsd1*) 1525*b5677b36Schristos dynamic_linker=no 1526*b5677b36Schristos ;; 1527*b5677b36Schristos 1528*b5677b36Schristosfreebsd* | dragonfly*) 1529*b5677b36Schristos # DragonFly does not have aout. When/if they implement a new 1530*b5677b36Schristos # versioning mechanism, adjust this. 1531*b5677b36Schristos if test -x /usr/bin/objformat; then 1532*b5677b36Schristos objformat=`/usr/bin/objformat` 1533*b5677b36Schristos else 1534*b5677b36Schristos case $host_os in 1535*b5677b36Schristos freebsd[[123]]*) objformat=aout ;; 1536*b5677b36Schristos *) objformat=elf ;; 1537*b5677b36Schristos esac 1538*b5677b36Schristos fi 1539*b5677b36Schristos version_type=freebsd-$objformat 1540*b5677b36Schristos case $version_type in 1541*b5677b36Schristos freebsd-elf*) 1542*b5677b36Schristos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 1543*b5677b36Schristos need_version=no 1544*b5677b36Schristos need_lib_prefix=no 1545*b5677b36Schristos ;; 1546*b5677b36Schristos freebsd-*) 1547*b5677b36Schristos library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' 1548*b5677b36Schristos need_version=yes 1549*b5677b36Schristos ;; 1550*b5677b36Schristos esac 1551*b5677b36Schristos shlibpath_var=LD_LIBRARY_PATH 1552*b5677b36Schristos case $host_os in 1553*b5677b36Schristos freebsd2*) 1554*b5677b36Schristos shlibpath_overrides_runpath=yes 1555*b5677b36Schristos ;; 1556*b5677b36Schristos freebsd3.[[01]]* | freebsdelf3.[[01]]*) 1557*b5677b36Schristos shlibpath_overrides_runpath=yes 1558*b5677b36Schristos hardcode_into_libs=yes 1559*b5677b36Schristos ;; 1560*b5677b36Schristos freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 1561*b5677b36Schristos freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 1562*b5677b36Schristos shlibpath_overrides_runpath=no 1563*b5677b36Schristos hardcode_into_libs=yes 1564*b5677b36Schristos ;; 1565*b5677b36Schristos *) # from 4.6 on, and DragonFly 1566*b5677b36Schristos shlibpath_overrides_runpath=yes 1567*b5677b36Schristos hardcode_into_libs=yes 1568*b5677b36Schristos ;; 1569*b5677b36Schristos esac 1570*b5677b36Schristos ;; 1571*b5677b36Schristos 1572*b5677b36Schristosgnu*) 1573*b5677b36Schristos version_type=linux 1574*b5677b36Schristos need_lib_prefix=no 1575*b5677b36Schristos need_version=no 1576*b5677b36Schristos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 1577*b5677b36Schristos soname_spec='${libname}${release}${shared_ext}$major' 1578*b5677b36Schristos shlibpath_var=LD_LIBRARY_PATH 1579*b5677b36Schristos hardcode_into_libs=yes 1580*b5677b36Schristos ;; 1581*b5677b36Schristos 1582*b5677b36Schristoshpux9* | hpux10* | hpux11*) 1583*b5677b36Schristos # Give a soname corresponding to the major version so that dld.sl refuses to 1584*b5677b36Schristos # link against other versions. 1585*b5677b36Schristos version_type=sunos 1586*b5677b36Schristos need_lib_prefix=no 1587*b5677b36Schristos need_version=no 1588*b5677b36Schristos case $host_cpu in 1589*b5677b36Schristos ia64*) 1590*b5677b36Schristos shrext_cmds='.so' 1591*b5677b36Schristos hardcode_into_libs=yes 1592*b5677b36Schristos dynamic_linker="$host_os dld.so" 1593*b5677b36Schristos shlibpath_var=LD_LIBRARY_PATH 1594*b5677b36Schristos shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 1595*b5677b36Schristos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 1596*b5677b36Schristos soname_spec='${libname}${release}${shared_ext}$major' 1597*b5677b36Schristos if test "X$HPUX_IA64_MODE" = X32; then 1598*b5677b36Schristos sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 1599*b5677b36Schristos else 1600*b5677b36Schristos sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 1601*b5677b36Schristos fi 1602*b5677b36Schristos sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 1603*b5677b36Schristos ;; 1604*b5677b36Schristos hppa*64*) 1605*b5677b36Schristos shrext_cmds='.sl' 1606*b5677b36Schristos hardcode_into_libs=yes 1607*b5677b36Schristos dynamic_linker="$host_os dld.sl" 1608*b5677b36Schristos shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 1609*b5677b36Schristos shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 1610*b5677b36Schristos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 1611*b5677b36Schristos soname_spec='${libname}${release}${shared_ext}$major' 1612*b5677b36Schristos sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 1613*b5677b36Schristos sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 1614*b5677b36Schristos ;; 1615*b5677b36Schristos *) 1616*b5677b36Schristos shrext_cmds='.sl' 1617*b5677b36Schristos dynamic_linker="$host_os dld.sl" 1618*b5677b36Schristos shlibpath_var=SHLIB_PATH 1619*b5677b36Schristos shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 1620*b5677b36Schristos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 1621*b5677b36Schristos soname_spec='${libname}${release}${shared_ext}$major' 1622*b5677b36Schristos ;; 1623*b5677b36Schristos esac 1624*b5677b36Schristos # HP-UX runs *really* slowly unless shared libraries are mode 555. 1625*b5677b36Schristos postinstall_cmds='chmod 555 $lib' 1626*b5677b36Schristos ;; 1627*b5677b36Schristos 1628*b5677b36Schristosinterix[[3-9]]*) 1629*b5677b36Schristos version_type=linux 1630*b5677b36Schristos need_lib_prefix=no 1631*b5677b36Schristos need_version=no 1632*b5677b36Schristos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 1633*b5677b36Schristos soname_spec='${libname}${release}${shared_ext}$major' 1634*b5677b36Schristos dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 1635*b5677b36Schristos shlibpath_var=LD_LIBRARY_PATH 1636*b5677b36Schristos shlibpath_overrides_runpath=no 1637*b5677b36Schristos hardcode_into_libs=yes 1638*b5677b36Schristos ;; 1639*b5677b36Schristos 1640*b5677b36Schristosirix5* | irix6* | nonstopux*) 1641*b5677b36Schristos case $host_os in 1642*b5677b36Schristos nonstopux*) version_type=nonstopux ;; 1643*b5677b36Schristos *) 1644*b5677b36Schristos if test "$lt_cv_prog_gnu_ld" = yes; then 1645*b5677b36Schristos version_type=linux 1646*b5677b36Schristos else 1647*b5677b36Schristos version_type=irix 1648*b5677b36Schristos fi ;; 1649*b5677b36Schristos esac 1650*b5677b36Schristos need_lib_prefix=no 1651*b5677b36Schristos need_version=no 1652*b5677b36Schristos soname_spec='${libname}${release}${shared_ext}$major' 1653*b5677b36Schristos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' 1654*b5677b36Schristos case $host_os in 1655*b5677b36Schristos irix5* | nonstopux*) 1656*b5677b36Schristos libsuff= shlibsuff= 1657*b5677b36Schristos ;; 1658*b5677b36Schristos *) 1659*b5677b36Schristos case $LD in # libtool.m4 will add one of these switches to LD 1660*b5677b36Schristos *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 1661*b5677b36Schristos libsuff= shlibsuff= libmagic=32-bit;; 1662*b5677b36Schristos *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 1663*b5677b36Schristos libsuff=32 shlibsuff=N32 libmagic=N32;; 1664*b5677b36Schristos *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 1665*b5677b36Schristos libsuff=64 shlibsuff=64 libmagic=64-bit;; 1666*b5677b36Schristos *) libsuff= shlibsuff= libmagic=never-match;; 1667*b5677b36Schristos esac 1668*b5677b36Schristos ;; 1669*b5677b36Schristos esac 1670*b5677b36Schristos shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 1671*b5677b36Schristos shlibpath_overrides_runpath=no 1672*b5677b36Schristos sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" 1673*b5677b36Schristos sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" 1674*b5677b36Schristos hardcode_into_libs=yes 1675*b5677b36Schristos ;; 1676*b5677b36Schristos 1677*b5677b36Schristos# No shared lib support for Linux oldld, aout, or coff. 1678*b5677b36Schristoslinux*oldld* | linux*aout* | linux*coff*) 1679*b5677b36Schristos dynamic_linker=no 1680*b5677b36Schristos ;; 1681*b5677b36Schristos 1682*b5677b36Schristos# This must be Linux ELF. 1683*b5677b36Schristoslinux* | k*bsd*-gnu) 1684*b5677b36Schristos version_type=linux 1685*b5677b36Schristos need_lib_prefix=no 1686*b5677b36Schristos need_version=no 1687*b5677b36Schristos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 1688*b5677b36Schristos soname_spec='${libname}${release}${shared_ext}$major' 1689*b5677b36Schristos finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 1690*b5677b36Schristos shlibpath_var=LD_LIBRARY_PATH 1691*b5677b36Schristos shlibpath_overrides_runpath=no 1692*b5677b36Schristos # This implies no fast_install, which is unacceptable. 1693*b5677b36Schristos # Some rework will be needed to allow for fast_install 1694*b5677b36Schristos # before this can be enabled. 1695*b5677b36Schristos hardcode_into_libs=yes 1696*b5677b36Schristos 1697*b5677b36Schristos # Append ld.so.conf contents to the search path 1698*b5677b36Schristos if test -f /etc/ld.so.conf; then 1699*b5677b36Schristos 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;/^$/d' | tr '\n' ' '` 1700*b5677b36Schristos sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" 1701*b5677b36Schristos fi 1702*b5677b36Schristos 1703*b5677b36Schristos # We used to test for /lib/ld.so.1 and disable shared libraries on 1704*b5677b36Schristos # powerpc, because MkLinux only supported shared libraries with the 1705*b5677b36Schristos # GNU dynamic linker. Since this was broken with cross compilers, 1706*b5677b36Schristos # most powerpc-linux boxes support dynamic linking these days and 1707*b5677b36Schristos # people can always --disable-shared, the test was removed, and we 1708*b5677b36Schristos # assume the GNU/Linux dynamic linker is in use. 1709*b5677b36Schristos dynamic_linker='GNU/Linux ld.so' 1710*b5677b36Schristos ;; 1711*b5677b36Schristos 1712*b5677b36Schristosnetbsd*) 1713*b5677b36Schristos version_type=sunos 1714*b5677b36Schristos need_lib_prefix=no 1715*b5677b36Schristos need_version=no 1716*b5677b36Schristos if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then 1717*b5677b36Schristos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 1718*b5677b36Schristos finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 1719*b5677b36Schristos dynamic_linker='NetBSD (a.out) ld.so' 1720*b5677b36Schristos else 1721*b5677b36Schristos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 1722*b5677b36Schristos soname_spec='${libname}${release}${shared_ext}$major' 1723*b5677b36Schristos dynamic_linker='NetBSD ld.elf_so' 1724*b5677b36Schristos fi 1725*b5677b36Schristos shlibpath_var=LD_LIBRARY_PATH 1726*b5677b36Schristos shlibpath_overrides_runpath=yes 1727*b5677b36Schristos hardcode_into_libs=yes 1728*b5677b36Schristos ;; 1729*b5677b36Schristos 1730*b5677b36Schristosnewsos6) 1731*b5677b36Schristos version_type=linux 1732*b5677b36Schristos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 1733*b5677b36Schristos shlibpath_var=LD_LIBRARY_PATH 1734*b5677b36Schristos shlibpath_overrides_runpath=yes 1735*b5677b36Schristos ;; 1736*b5677b36Schristos 1737*b5677b36Schristosnto-qnx*) 1738*b5677b36Schristos version_type=linux 1739*b5677b36Schristos need_lib_prefix=no 1740*b5677b36Schristos need_version=no 1741*b5677b36Schristos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 1742*b5677b36Schristos soname_spec='${libname}${release}${shared_ext}$major' 1743*b5677b36Schristos shlibpath_var=LD_LIBRARY_PATH 1744*b5677b36Schristos shlibpath_overrides_runpath=yes 1745*b5677b36Schristos ;; 1746*b5677b36Schristos 1747*b5677b36Schristosopenbsd*) 1748*b5677b36Schristos version_type=sunos 1749*b5677b36Schristos sys_lib_dlsearch_path_spec="/usr/lib" 1750*b5677b36Schristos need_lib_prefix=no 1751*b5677b36Schristos # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. 1752*b5677b36Schristos case $host_os in 1753*b5677b36Schristos openbsd3.3 | openbsd3.3.*) need_version=yes ;; 1754*b5677b36Schristos *) need_version=no ;; 1755*b5677b36Schristos esac 1756*b5677b36Schristos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 1757*b5677b36Schristos finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 1758*b5677b36Schristos shlibpath_var=LD_LIBRARY_PATH 1759*b5677b36Schristos if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 1760*b5677b36Schristos case $host_os in 1761*b5677b36Schristos openbsd2.[[89]] | openbsd2.[[89]].*) 1762*b5677b36Schristos shlibpath_overrides_runpath=no 1763*b5677b36Schristos ;; 1764*b5677b36Schristos *) 1765*b5677b36Schristos shlibpath_overrides_runpath=yes 1766*b5677b36Schristos ;; 1767*b5677b36Schristos esac 1768*b5677b36Schristos else 1769*b5677b36Schristos shlibpath_overrides_runpath=yes 1770*b5677b36Schristos fi 1771*b5677b36Schristos ;; 1772*b5677b36Schristos 1773*b5677b36Schristosos2*) 1774*b5677b36Schristos libname_spec='$name' 1775*b5677b36Schristos shrext_cmds=".dll" 1776*b5677b36Schristos need_lib_prefix=no 1777*b5677b36Schristos library_names_spec='$libname${shared_ext} $libname.a' 1778*b5677b36Schristos dynamic_linker='OS/2 ld.exe' 1779*b5677b36Schristos shlibpath_var=LIBPATH 1780*b5677b36Schristos ;; 1781*b5677b36Schristos 1782*b5677b36Schristososf3* | osf4* | osf5*) 1783*b5677b36Schristos version_type=osf 1784*b5677b36Schristos need_lib_prefix=no 1785*b5677b36Schristos need_version=no 1786*b5677b36Schristos soname_spec='${libname}${release}${shared_ext}$major' 1787*b5677b36Schristos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 1788*b5677b36Schristos shlibpath_var=LD_LIBRARY_PATH 1789*b5677b36Schristos sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 1790*b5677b36Schristos sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" 1791*b5677b36Schristos ;; 1792*b5677b36Schristos 1793*b5677b36Schristosrdos*) 1794*b5677b36Schristos dynamic_linker=no 1795*b5677b36Schristos ;; 1796*b5677b36Schristos 1797*b5677b36Schristossolaris*) 1798*b5677b36Schristos version_type=linux 1799*b5677b36Schristos need_lib_prefix=no 1800*b5677b36Schristos need_version=no 1801*b5677b36Schristos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 1802*b5677b36Schristos soname_spec='${libname}${release}${shared_ext}$major' 1803*b5677b36Schristos shlibpath_var=LD_LIBRARY_PATH 1804*b5677b36Schristos shlibpath_overrides_runpath=yes 1805*b5677b36Schristos hardcode_into_libs=yes 1806*b5677b36Schristos # ldd complains unless libraries are executable 1807*b5677b36Schristos postinstall_cmds='chmod +x $lib' 1808*b5677b36Schristos ;; 1809*b5677b36Schristos 1810*b5677b36Schristossunos4*) 1811*b5677b36Schristos version_type=sunos 1812*b5677b36Schristos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 1813*b5677b36Schristos finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 1814*b5677b36Schristos shlibpath_var=LD_LIBRARY_PATH 1815*b5677b36Schristos shlibpath_overrides_runpath=yes 1816*b5677b36Schristos if test "$with_gnu_ld" = yes; then 1817*b5677b36Schristos need_lib_prefix=no 1818*b5677b36Schristos fi 1819*b5677b36Schristos need_version=yes 1820*b5677b36Schristos ;; 1821*b5677b36Schristos 1822*b5677b36Schristossysv4 | sysv4.3*) 1823*b5677b36Schristos version_type=linux 1824*b5677b36Schristos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 1825*b5677b36Schristos soname_spec='${libname}${release}${shared_ext}$major' 1826*b5677b36Schristos shlibpath_var=LD_LIBRARY_PATH 1827*b5677b36Schristos case $host_vendor in 1828*b5677b36Schristos sni) 1829*b5677b36Schristos shlibpath_overrides_runpath=no 1830*b5677b36Schristos need_lib_prefix=no 1831*b5677b36Schristos export_dynamic_flag_spec='${wl}-Blargedynsym' 1832*b5677b36Schristos runpath_var=LD_RUN_PATH 1833*b5677b36Schristos ;; 1834*b5677b36Schristos siemens) 1835*b5677b36Schristos need_lib_prefix=no 1836*b5677b36Schristos ;; 1837*b5677b36Schristos motorola) 1838*b5677b36Schristos need_lib_prefix=no 1839*b5677b36Schristos need_version=no 1840*b5677b36Schristos shlibpath_overrides_runpath=no 1841*b5677b36Schristos sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 1842*b5677b36Schristos ;; 1843*b5677b36Schristos esac 1844*b5677b36Schristos ;; 1845*b5677b36Schristos 1846*b5677b36Schristossysv4*MP*) 1847*b5677b36Schristos if test -d /usr/nec ;then 1848*b5677b36Schristos version_type=linux 1849*b5677b36Schristos library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' 1850*b5677b36Schristos soname_spec='$libname${shared_ext}.$major' 1851*b5677b36Schristos shlibpath_var=LD_LIBRARY_PATH 1852*b5677b36Schristos fi 1853*b5677b36Schristos ;; 1854*b5677b36Schristos 1855*b5677b36Schristossysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 1856*b5677b36Schristos version_type=freebsd-elf 1857*b5677b36Schristos need_lib_prefix=no 1858*b5677b36Schristos need_version=no 1859*b5677b36Schristos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 1860*b5677b36Schristos soname_spec='${libname}${release}${shared_ext}$major' 1861*b5677b36Schristos shlibpath_var=LD_LIBRARY_PATH 1862*b5677b36Schristos hardcode_into_libs=yes 1863*b5677b36Schristos if test "$with_gnu_ld" = yes; then 1864*b5677b36Schristos sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 1865*b5677b36Schristos shlibpath_overrides_runpath=no 1866*b5677b36Schristos else 1867*b5677b36Schristos sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 1868*b5677b36Schristos shlibpath_overrides_runpath=yes 1869*b5677b36Schristos case $host_os in 1870*b5677b36Schristos sco3.2v5*) 1871*b5677b36Schristos sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 1872*b5677b36Schristos ;; 1873*b5677b36Schristos esac 1874*b5677b36Schristos fi 1875*b5677b36Schristos sys_lib_dlsearch_path_spec='/usr/lib' 1876*b5677b36Schristos ;; 1877*b5677b36Schristos 1878*b5677b36Schristosuts4*) 1879*b5677b36Schristos version_type=linux 1880*b5677b36Schristos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 1881*b5677b36Schristos soname_spec='${libname}${release}${shared_ext}$major' 1882*b5677b36Schristos shlibpath_var=LD_LIBRARY_PATH 1883*b5677b36Schristos ;; 1884*b5677b36Schristos 1885*b5677b36Schristos*) 1886*b5677b36Schristos dynamic_linker=no 1887*b5677b36Schristos ;; 1888*b5677b36Schristosesac 1889*b5677b36SchristosAC_MSG_RESULT([$dynamic_linker]) 1890*b5677b36Schristostest "$dynamic_linker" = no && can_build_shared=no 1891*b5677b36Schristos 1892*b5677b36SchristosAC_CACHE_VAL([lt_cv_sys_lib_search_path_spec], 1893*b5677b36Schristos[lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec"]) 1894*b5677b36Schristossys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" 1895*b5677b36SchristosAC_CACHE_VAL([lt_cv_sys_lib_dlsearch_path_spec], 1896*b5677b36Schristos[lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec"]) 1897*b5677b36Schristossys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" 1898*b5677b36Schristos 1899*b5677b36Schristosvariables_saved_for_relink="PATH $shlibpath_var $runpath_var" 1900*b5677b36Schristosif test "$GCC" = yes; then 1901*b5677b36Schristos variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 1902*b5677b36Schristosfi 1903*b5677b36Schristos])# AC_LIBTOOL_SYS_DYNAMIC_LINKER 1904*b5677b36Schristos 1905*b5677b36Schristos 1906*b5677b36Schristos# _LT_AC_TAGCONFIG 1907*b5677b36Schristos# ---------------- 1908*b5677b36SchristosAC_DEFUN([_LT_AC_TAGCONFIG], 1909*b5677b36Schristos[AC_REQUIRE([LT_AC_PROG_SED])dnl 1910*b5677b36SchristosAC_ARG_WITH([tags], 1911*b5677b36Schristos [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@], 1912*b5677b36Schristos [include additional configurations @<:@automatic@:>@])], 1913*b5677b36Schristos [tagnames="$withval"]) 1914*b5677b36Schristos 1915*b5677b36Schristosif test -f "$ltmain" && test -n "$tagnames"; then 1916*b5677b36Schristos if test ! -f "${ofile}"; then 1917*b5677b36Schristos AC_MSG_WARN([output file `$ofile' does not exist]) 1918*b5677b36Schristos fi 1919*b5677b36Schristos 1920*b5677b36Schristos if test -z "$LTCC"; then 1921*b5677b36Schristos eval "`$SHELL ${ofile} --config | grep '^LTCC='`" 1922*b5677b36Schristos if test -z "$LTCC"; then 1923*b5677b36Schristos AC_MSG_WARN([output file `$ofile' does not look like a libtool script]) 1924*b5677b36Schristos else 1925*b5677b36Schristos AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile']) 1926*b5677b36Schristos fi 1927*b5677b36Schristos fi 1928*b5677b36Schristos if test -z "$LTCFLAGS"; then 1929*b5677b36Schristos eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`" 1930*b5677b36Schristos fi 1931*b5677b36Schristos 1932*b5677b36Schristos # Extract list of available tagged configurations in $ofile. 1933*b5677b36Schristos # Note that this assumes the entire list is on one line. 1934*b5677b36Schristos available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` 1935*b5677b36Schristos 1936*b5677b36Schristos lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 1937*b5677b36Schristos for tagname in $tagnames; do 1938*b5677b36Schristos IFS="$lt_save_ifs" 1939*b5677b36Schristos # Check whether tagname contains only valid characters 1940*b5677b36Schristos case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in 1941*b5677b36Schristos "") ;; 1942*b5677b36Schristos *) AC_MSG_ERROR([invalid tag name: $tagname]) 1943*b5677b36Schristos ;; 1944*b5677b36Schristos esac 1945*b5677b36Schristos 1946*b5677b36Schristos if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null 1947*b5677b36Schristos then 1948*b5677b36Schristos AC_MSG_ERROR([tag name \"$tagname\" already exists]) 1949*b5677b36Schristos fi 1950*b5677b36Schristos 1951*b5677b36Schristos # Update the list of available tags. 1952*b5677b36Schristos if test -n "$tagname"; then 1953*b5677b36Schristos echo appending configuration tag \"$tagname\" to $ofile 1954*b5677b36Schristos 1955*b5677b36Schristos case $tagname in 1956*b5677b36Schristos CXX) 1957*b5677b36Schristos if test -n "$CXX" && ( test "X$CXX" != "Xno" && 1958*b5677b36Schristos ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || 1959*b5677b36Schristos (test "X$CXX" != "Xg++"))) ; then 1960*b5677b36Schristos AC_LIBTOOL_LANG_CXX_CONFIG 1961*b5677b36Schristos else 1962*b5677b36Schristos tagname="" 1963*b5677b36Schristos fi 1964*b5677b36Schristos ;; 1965*b5677b36Schristos 1966*b5677b36Schristos F77) 1967*b5677b36Schristos if test -n "$F77" && test "X$F77" != "Xno"; then 1968*b5677b36Schristos AC_LIBTOOL_LANG_F77_CONFIG 1969*b5677b36Schristos else 1970*b5677b36Schristos tagname="" 1971*b5677b36Schristos fi 1972*b5677b36Schristos ;; 1973*b5677b36Schristos 1974*b5677b36Schristos GCJ) 1975*b5677b36Schristos if test -n "$GCJ" && test "X$GCJ" != "Xno"; then 1976*b5677b36Schristos AC_LIBTOOL_LANG_GCJ_CONFIG 1977*b5677b36Schristos else 1978*b5677b36Schristos tagname="" 1979*b5677b36Schristos fi 1980*b5677b36Schristos ;; 1981*b5677b36Schristos 1982*b5677b36Schristos RC) 1983*b5677b36Schristos AC_LIBTOOL_LANG_RC_CONFIG 1984*b5677b36Schristos ;; 1985*b5677b36Schristos 1986*b5677b36Schristos *) 1987*b5677b36Schristos AC_MSG_ERROR([Unsupported tag name: $tagname]) 1988*b5677b36Schristos ;; 1989*b5677b36Schristos esac 1990*b5677b36Schristos 1991*b5677b36Schristos # Append the new tag name to the list of available tags. 1992*b5677b36Schristos if test -n "$tagname" ; then 1993*b5677b36Schristos available_tags="$available_tags $tagname" 1994*b5677b36Schristos fi 1995*b5677b36Schristos fi 1996*b5677b36Schristos done 1997*b5677b36Schristos IFS="$lt_save_ifs" 1998*b5677b36Schristos 1999*b5677b36Schristos # Now substitute the updated list of available tags. 2000*b5677b36Schristos if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then 2001*b5677b36Schristos mv "${ofile}T" "$ofile" 2002*b5677b36Schristos chmod +x "$ofile" 2003*b5677b36Schristos else 2004*b5677b36Schristos rm -f "${ofile}T" 2005*b5677b36Schristos AC_MSG_ERROR([unable to update list of available tagged configurations.]) 2006*b5677b36Schristos fi 2007*b5677b36Schristosfi 2008*b5677b36Schristos])# _LT_AC_TAGCONFIG 2009*b5677b36Schristos 2010*b5677b36Schristos 2011*b5677b36Schristos# AC_LIBTOOL_DLOPEN 2012*b5677b36Schristos# ----------------- 2013*b5677b36Schristos# enable checks for dlopen support 2014*b5677b36SchristosAC_DEFUN([AC_LIBTOOL_DLOPEN], 2015*b5677b36Schristos [AC_BEFORE([$0],[AC_LIBTOOL_SETUP]) 2016*b5677b36Schristos])# AC_LIBTOOL_DLOPEN 2017*b5677b36Schristos 2018*b5677b36Schristos 2019*b5677b36Schristos# AC_LIBTOOL_WIN32_DLL 2020*b5677b36Schristos# -------------------- 2021*b5677b36Schristos# declare package support for building win32 DLLs 2022*b5677b36SchristosAC_DEFUN([AC_LIBTOOL_WIN32_DLL], 2023*b5677b36Schristos[AC_BEFORE([$0], [AC_LIBTOOL_SETUP]) 2024*b5677b36Schristos])# AC_LIBTOOL_WIN32_DLL 2025*b5677b36Schristos 2026*b5677b36Schristos 2027*b5677b36Schristos# AC_ENABLE_SHARED([DEFAULT]) 2028*b5677b36Schristos# --------------------------- 2029*b5677b36Schristos# implement the --enable-shared flag 2030*b5677b36Schristos# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 2031*b5677b36SchristosAC_DEFUN([AC_ENABLE_SHARED], 2032*b5677b36Schristos[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl 2033*b5677b36SchristosAC_ARG_ENABLE([shared], 2034*b5677b36Schristos [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 2035*b5677b36Schristos [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])], 2036*b5677b36Schristos [p=${PACKAGE-default} 2037*b5677b36Schristos case $enableval in 2038*b5677b36Schristos yes) enable_shared=yes ;; 2039*b5677b36Schristos no) enable_shared=no ;; 2040*b5677b36Schristos *) 2041*b5677b36Schristos enable_shared=no 2042*b5677b36Schristos # Look at the argument we got. We use all the common list separators. 2043*b5677b36Schristos lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 2044*b5677b36Schristos for pkg in $enableval; do 2045*b5677b36Schristos IFS="$lt_save_ifs" 2046*b5677b36Schristos if test "X$pkg" = "X$p"; then 2047*b5677b36Schristos enable_shared=yes 2048*b5677b36Schristos fi 2049*b5677b36Schristos done 2050*b5677b36Schristos IFS="$lt_save_ifs" 2051*b5677b36Schristos ;; 2052*b5677b36Schristos esac], 2053*b5677b36Schristos [enable_shared=]AC_ENABLE_SHARED_DEFAULT) 2054*b5677b36Schristos])# AC_ENABLE_SHARED 2055*b5677b36Schristos 2056*b5677b36Schristos 2057*b5677b36Schristos# AC_DISABLE_SHARED 2058*b5677b36Schristos# ----------------- 2059*b5677b36Schristos# set the default shared flag to --disable-shared 2060*b5677b36SchristosAC_DEFUN([AC_DISABLE_SHARED], 2061*b5677b36Schristos[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 2062*b5677b36SchristosAC_ENABLE_SHARED(no) 2063*b5677b36Schristos])# AC_DISABLE_SHARED 2064*b5677b36Schristos 2065*b5677b36Schristos 2066*b5677b36Schristos# AC_ENABLE_STATIC([DEFAULT]) 2067*b5677b36Schristos# --------------------------- 2068*b5677b36Schristos# implement the --enable-static flag 2069*b5677b36Schristos# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 2070*b5677b36SchristosAC_DEFUN([AC_ENABLE_STATIC], 2071*b5677b36Schristos[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl 2072*b5677b36SchristosAC_ARG_ENABLE([static], 2073*b5677b36Schristos [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@], 2074*b5677b36Schristos [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])], 2075*b5677b36Schristos [p=${PACKAGE-default} 2076*b5677b36Schristos case $enableval in 2077*b5677b36Schristos yes) enable_static=yes ;; 2078*b5677b36Schristos no) enable_static=no ;; 2079*b5677b36Schristos *) 2080*b5677b36Schristos enable_static=no 2081*b5677b36Schristos # Look at the argument we got. We use all the common list separators. 2082*b5677b36Schristos lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 2083*b5677b36Schristos for pkg in $enableval; do 2084*b5677b36Schristos IFS="$lt_save_ifs" 2085*b5677b36Schristos if test "X$pkg" = "X$p"; then 2086*b5677b36Schristos enable_static=yes 2087*b5677b36Schristos fi 2088*b5677b36Schristos done 2089*b5677b36Schristos IFS="$lt_save_ifs" 2090*b5677b36Schristos ;; 2091*b5677b36Schristos esac], 2092*b5677b36Schristos [enable_static=]AC_ENABLE_STATIC_DEFAULT) 2093*b5677b36Schristos])# AC_ENABLE_STATIC 2094*b5677b36Schristos 2095*b5677b36Schristos 2096*b5677b36Schristos# AC_DISABLE_STATIC 2097*b5677b36Schristos# ----------------- 2098*b5677b36Schristos# set the default static flag to --disable-static 2099*b5677b36SchristosAC_DEFUN([AC_DISABLE_STATIC], 2100*b5677b36Schristos[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 2101*b5677b36SchristosAC_ENABLE_STATIC(no) 2102*b5677b36Schristos])# AC_DISABLE_STATIC 2103*b5677b36Schristos 2104*b5677b36Schristos 2105*b5677b36Schristos# AC_ENABLE_FAST_INSTALL([DEFAULT]) 2106*b5677b36Schristos# --------------------------------- 2107*b5677b36Schristos# implement the --enable-fast-install flag 2108*b5677b36Schristos# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 2109*b5677b36SchristosAC_DEFUN([AC_ENABLE_FAST_INSTALL], 2110*b5677b36Schristos[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl 2111*b5677b36SchristosAC_ARG_ENABLE([fast-install], 2112*b5677b36Schristos [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 2113*b5677b36Schristos [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 2114*b5677b36Schristos [p=${PACKAGE-default} 2115*b5677b36Schristos case $enableval in 2116*b5677b36Schristos yes) enable_fast_install=yes ;; 2117*b5677b36Schristos no) enable_fast_install=no ;; 2118*b5677b36Schristos *) 2119*b5677b36Schristos enable_fast_install=no 2120*b5677b36Schristos # Look at the argument we got. We use all the common list separators. 2121*b5677b36Schristos lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 2122*b5677b36Schristos for pkg in $enableval; do 2123*b5677b36Schristos IFS="$lt_save_ifs" 2124*b5677b36Schristos if test "X$pkg" = "X$p"; then 2125*b5677b36Schristos enable_fast_install=yes 2126*b5677b36Schristos fi 2127*b5677b36Schristos done 2128*b5677b36Schristos IFS="$lt_save_ifs" 2129*b5677b36Schristos ;; 2130*b5677b36Schristos esac], 2131*b5677b36Schristos [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT) 2132*b5677b36Schristos])# AC_ENABLE_FAST_INSTALL 2133*b5677b36Schristos 2134*b5677b36Schristos 2135*b5677b36Schristos# AC_DISABLE_FAST_INSTALL 2136*b5677b36Schristos# ----------------------- 2137*b5677b36Schristos# set the default to --disable-fast-install 2138*b5677b36SchristosAC_DEFUN([AC_DISABLE_FAST_INSTALL], 2139*b5677b36Schristos[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 2140*b5677b36SchristosAC_ENABLE_FAST_INSTALL(no) 2141*b5677b36Schristos])# AC_DISABLE_FAST_INSTALL 2142*b5677b36Schristos 2143*b5677b36Schristos 2144*b5677b36Schristos# AC_LIBTOOL_PICMODE([MODE]) 2145*b5677b36Schristos# -------------------------- 2146*b5677b36Schristos# implement the --with-pic flag 2147*b5677b36Schristos# MODE is either `yes' or `no'. If omitted, it defaults to `both'. 2148*b5677b36SchristosAC_DEFUN([AC_LIBTOOL_PICMODE], 2149*b5677b36Schristos[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 2150*b5677b36Schristospic_mode=ifelse($#,1,$1,default) 2151*b5677b36Schristos])# AC_LIBTOOL_PICMODE 2152*b5677b36Schristos 2153*b5677b36Schristos 2154*b5677b36Schristos# AC_PROG_EGREP 2155*b5677b36Schristos# ------------- 2156*b5677b36Schristos# This is predefined starting with Autoconf 2.54, so this conditional 2157*b5677b36Schristos# definition can be removed once we require Autoconf 2.54 or later. 2158*b5677b36Schristosm4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP], 2159*b5677b36Schristos[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep], 2160*b5677b36Schristos [if echo a | (grep -E '(a|b)') >/dev/null 2>&1 2161*b5677b36Schristos then ac_cv_prog_egrep='grep -E' 2162*b5677b36Schristos else ac_cv_prog_egrep='egrep' 2163*b5677b36Schristos fi]) 2164*b5677b36Schristos EGREP=$ac_cv_prog_egrep 2165*b5677b36Schristos AC_SUBST([EGREP]) 2166*b5677b36Schristos])]) 2167*b5677b36Schristos 2168*b5677b36Schristos 2169*b5677b36Schristos# AC_PATH_TOOL_PREFIX 2170*b5677b36Schristos# ------------------- 2171*b5677b36Schristos# find a file program which can recognize shared library 2172*b5677b36SchristosAC_DEFUN([AC_PATH_TOOL_PREFIX], 2173*b5677b36Schristos[AC_REQUIRE([AC_PROG_EGREP])dnl 2174*b5677b36SchristosAC_MSG_CHECKING([for $1]) 2175*b5677b36SchristosAC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 2176*b5677b36Schristos[case $MAGIC_CMD in 2177*b5677b36Schristos[[\\/*] | ?:[\\/]*]) 2178*b5677b36Schristos lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. 2179*b5677b36Schristos ;; 2180*b5677b36Schristos*) 2181*b5677b36Schristos lt_save_MAGIC_CMD="$MAGIC_CMD" 2182*b5677b36Schristos lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 2183*b5677b36Schristosdnl $ac_dummy forces splitting on constant user-supplied paths. 2184*b5677b36Schristosdnl POSIX.2 word splitting is done only on the output of word expansions, 2185*b5677b36Schristosdnl not every word. This closes a longstanding sh security hole. 2186*b5677b36Schristos ac_dummy="ifelse([$2], , $PATH, [$2])" 2187*b5677b36Schristos for ac_dir in $ac_dummy; do 2188*b5677b36Schristos IFS="$lt_save_ifs" 2189*b5677b36Schristos test -z "$ac_dir" && ac_dir=. 2190*b5677b36Schristos if test -f $ac_dir/$1; then 2191*b5677b36Schristos lt_cv_path_MAGIC_CMD="$ac_dir/$1" 2192*b5677b36Schristos if test -n "$file_magic_test_file"; then 2193*b5677b36Schristos case $deplibs_check_method in 2194*b5677b36Schristos "file_magic "*) 2195*b5677b36Schristos file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 2196*b5677b36Schristos MAGIC_CMD="$lt_cv_path_MAGIC_CMD" 2197*b5677b36Schristos if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 2198*b5677b36Schristos $EGREP "$file_magic_regex" > /dev/null; then 2199*b5677b36Schristos : 2200*b5677b36Schristos else 2201*b5677b36Schristos cat <<EOF 1>&2 2202*b5677b36Schristos 2203*b5677b36Schristos*** Warning: the command libtool uses to detect shared libraries, 2204*b5677b36Schristos*** $file_magic_cmd, produces output that libtool cannot recognize. 2205*b5677b36Schristos*** The result is that libtool may fail to recognize shared libraries 2206*b5677b36Schristos*** as such. This will affect the creation of libtool libraries that 2207*b5677b36Schristos*** depend on shared libraries, but programs linked with such libtool 2208*b5677b36Schristos*** libraries will work regardless of this problem. Nevertheless, you 2209*b5677b36Schristos*** may want to report the problem to your system manager and/or to 2210*b5677b36Schristos*** bug-libtool@gnu.org 2211*b5677b36Schristos 2212*b5677b36SchristosEOF 2213*b5677b36Schristos fi ;; 2214*b5677b36Schristos esac 2215*b5677b36Schristos fi 2216*b5677b36Schristos break 2217*b5677b36Schristos fi 2218*b5677b36Schristos done 2219*b5677b36Schristos IFS="$lt_save_ifs" 2220*b5677b36Schristos MAGIC_CMD="$lt_save_MAGIC_CMD" 2221*b5677b36Schristos ;; 2222*b5677b36Schristosesac]) 2223*b5677b36SchristosMAGIC_CMD="$lt_cv_path_MAGIC_CMD" 2224*b5677b36Schristosif test -n "$MAGIC_CMD"; then 2225*b5677b36Schristos AC_MSG_RESULT($MAGIC_CMD) 2226*b5677b36Schristoselse 2227*b5677b36Schristos AC_MSG_RESULT(no) 2228*b5677b36Schristosfi 2229*b5677b36Schristos])# AC_PATH_TOOL_PREFIX 2230*b5677b36Schristos 2231*b5677b36Schristos 2232*b5677b36Schristos# AC_PATH_MAGIC 2233*b5677b36Schristos# ------------- 2234*b5677b36Schristos# find a file program which can recognize a shared library 2235*b5677b36SchristosAC_DEFUN([AC_PATH_MAGIC], 2236*b5677b36Schristos[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 2237*b5677b36Schristosif test -z "$lt_cv_path_MAGIC_CMD"; then 2238*b5677b36Schristos if test -n "$ac_tool_prefix"; then 2239*b5677b36Schristos AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 2240*b5677b36Schristos else 2241*b5677b36Schristos MAGIC_CMD=: 2242*b5677b36Schristos fi 2243*b5677b36Schristosfi 2244*b5677b36Schristos])# AC_PATH_MAGIC 2245*b5677b36Schristos 2246*b5677b36Schristos 2247*b5677b36Schristos# AC_PROG_LD 2248*b5677b36Schristos# ---------- 2249*b5677b36Schristos# find the pathname to the GNU or non-GNU linker 2250*b5677b36SchristosAC_DEFUN([AC_PROG_LD], 2251*b5677b36Schristos[AC_ARG_WITH([gnu-ld], 2252*b5677b36Schristos [AC_HELP_STRING([--with-gnu-ld], 2253*b5677b36Schristos [assume the C compiler uses GNU ld @<:@default=no@:>@])], 2254*b5677b36Schristos [test "$withval" = no || with_gnu_ld=yes], 2255*b5677b36Schristos [with_gnu_ld=no]) 2256*b5677b36SchristosAC_REQUIRE([LT_AC_PROG_SED])dnl 2257*b5677b36SchristosAC_REQUIRE([AC_PROG_CC])dnl 2258*b5677b36SchristosAC_REQUIRE([AC_CANONICAL_HOST])dnl 2259*b5677b36SchristosAC_REQUIRE([AC_CANONICAL_BUILD])dnl 2260*b5677b36Schristosac_prog=ld 2261*b5677b36Schristosif test "$GCC" = yes; then 2262*b5677b36Schristos # Check if gcc -print-prog-name=ld gives a path. 2263*b5677b36Schristos AC_MSG_CHECKING([for ld used by $CC]) 2264*b5677b36Schristos case $host in 2265*b5677b36Schristos *-*-mingw*) 2266*b5677b36Schristos # gcc leaves a trailing carriage return which upsets mingw 2267*b5677b36Schristos ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 2268*b5677b36Schristos *) 2269*b5677b36Schristos ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 2270*b5677b36Schristos esac 2271*b5677b36Schristos case $ac_prog in 2272*b5677b36Schristos # Accept absolute paths. 2273*b5677b36Schristos [[\\/]]* | ?:[[\\/]]*) 2274*b5677b36Schristos re_direlt='/[[^/]][[^/]]*/\.\./' 2275*b5677b36Schristos # Canonicalize the pathname of ld 2276*b5677b36Schristos ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` 2277*b5677b36Schristos while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do 2278*b5677b36Schristos ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` 2279*b5677b36Schristos done 2280*b5677b36Schristos test -z "$LD" && LD="$ac_prog" 2281*b5677b36Schristos ;; 2282*b5677b36Schristos "") 2283*b5677b36Schristos # If it fails, then pretend we aren't using GCC. 2284*b5677b36Schristos ac_prog=ld 2285*b5677b36Schristos ;; 2286*b5677b36Schristos *) 2287*b5677b36Schristos # If it is relative, then search for the first ld in PATH. 2288*b5677b36Schristos with_gnu_ld=unknown 2289*b5677b36Schristos ;; 2290*b5677b36Schristos esac 2291*b5677b36Schristoselif test "$with_gnu_ld" = yes; then 2292*b5677b36Schristos AC_MSG_CHECKING([for GNU ld]) 2293*b5677b36Schristoselse 2294*b5677b36Schristos AC_MSG_CHECKING([for non-GNU ld]) 2295*b5677b36Schristosfi 2296*b5677b36SchristosAC_CACHE_VAL(lt_cv_path_LD, 2297*b5677b36Schristos[if test -z "$LD"; then 2298*b5677b36Schristos lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 2299*b5677b36Schristos for ac_dir in $PATH; do 2300*b5677b36Schristos IFS="$lt_save_ifs" 2301*b5677b36Schristos test -z "$ac_dir" && ac_dir=. 2302*b5677b36Schristos if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 2303*b5677b36Schristos lt_cv_path_LD="$ac_dir/$ac_prog" 2304*b5677b36Schristos # Check to see if the program is GNU ld. I'd rather use --version, 2305*b5677b36Schristos # but apparently some variants of GNU ld only accept -v. 2306*b5677b36Schristos # Break only if it was the GNU/non-GNU ld that we prefer. 2307*b5677b36Schristos case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 2308*b5677b36Schristos *GNU* | *'with BFD'*) 2309*b5677b36Schristos test "$with_gnu_ld" != no && break 2310*b5677b36Schristos ;; 2311*b5677b36Schristos *) 2312*b5677b36Schristos test "$with_gnu_ld" != yes && break 2313*b5677b36Schristos ;; 2314*b5677b36Schristos esac 2315*b5677b36Schristos fi 2316*b5677b36Schristos done 2317*b5677b36Schristos IFS="$lt_save_ifs" 2318*b5677b36Schristoselse 2319*b5677b36Schristos lt_cv_path_LD="$LD" # Let the user override the test with a path. 2320*b5677b36Schristosfi]) 2321*b5677b36SchristosLD="$lt_cv_path_LD" 2322*b5677b36Schristosif test -n "$LD"; then 2323*b5677b36Schristos AC_MSG_RESULT($LD) 2324*b5677b36Schristoselse 2325*b5677b36Schristos AC_MSG_RESULT(no) 2326*b5677b36Schristosfi 2327*b5677b36Schristostest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 2328*b5677b36SchristosAC_PROG_LD_GNU 2329*b5677b36Schristos])# AC_PROG_LD 2330*b5677b36Schristos 2331*b5677b36Schristos 2332*b5677b36Schristos# AC_PROG_LD_GNU 2333*b5677b36Schristos# -------------- 2334*b5677b36SchristosAC_DEFUN([AC_PROG_LD_GNU], 2335*b5677b36Schristos[AC_REQUIRE([AC_PROG_EGREP])dnl 2336*b5677b36SchristosAC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 2337*b5677b36Schristos[# I'd rather use --version here, but apparently some GNU lds only accept -v. 2338*b5677b36Schristoscase `$LD -v 2>&1 </dev/null` in 2339*b5677b36Schristos*GNU* | *'with BFD'*) 2340*b5677b36Schristos lt_cv_prog_gnu_ld=yes 2341*b5677b36Schristos ;; 2342*b5677b36Schristos*) 2343*b5677b36Schristos lt_cv_prog_gnu_ld=no 2344*b5677b36Schristos ;; 2345*b5677b36Schristosesac]) 2346*b5677b36Schristoswith_gnu_ld=$lt_cv_prog_gnu_ld 2347*b5677b36Schristos])# AC_PROG_LD_GNU 2348*b5677b36Schristos 2349*b5677b36Schristos 2350*b5677b36Schristos# AC_PROG_LD_RELOAD_FLAG 2351*b5677b36Schristos# ---------------------- 2352*b5677b36Schristos# find reload flag for linker 2353*b5677b36Schristos# -- PORTME Some linkers may need a different reload flag. 2354*b5677b36SchristosAC_DEFUN([AC_PROG_LD_RELOAD_FLAG], 2355*b5677b36Schristos[AC_CACHE_CHECK([for $LD option to reload object files], 2356*b5677b36Schristos lt_cv_ld_reload_flag, 2357*b5677b36Schristos [lt_cv_ld_reload_flag='-r']) 2358*b5677b36Schristosreload_flag=$lt_cv_ld_reload_flag 2359*b5677b36Schristoscase $reload_flag in 2360*b5677b36Schristos"" | " "*) ;; 2361*b5677b36Schristos*) reload_flag=" $reload_flag" ;; 2362*b5677b36Schristosesac 2363*b5677b36Schristosreload_cmds='$LD$reload_flag -o $output$reload_objs' 2364*b5677b36Schristoscase $host_os in 2365*b5677b36Schristos darwin*) 2366*b5677b36Schristos if test "$GCC" = yes; then 2367*b5677b36Schristos reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' 2368*b5677b36Schristos else 2369*b5677b36Schristos reload_cmds='$LD$reload_flag -o $output$reload_objs' 2370*b5677b36Schristos fi 2371*b5677b36Schristos ;; 2372*b5677b36Schristosesac 2373*b5677b36Schristos])# AC_PROG_LD_RELOAD_FLAG 2374*b5677b36Schristos 2375*b5677b36Schristos 2376*b5677b36Schristos# AC_DEPLIBS_CHECK_METHOD 2377*b5677b36Schristos# ----------------------- 2378*b5677b36Schristos# how to check for library dependencies 2379*b5677b36Schristos# -- PORTME fill in with the dynamic library characteristics 2380*b5677b36SchristosAC_DEFUN([AC_DEPLIBS_CHECK_METHOD], 2381*b5677b36Schristos[AC_CACHE_CHECK([how to recognize dependent libraries], 2382*b5677b36Schristoslt_cv_deplibs_check_method, 2383*b5677b36Schristos[lt_cv_file_magic_cmd='$MAGIC_CMD' 2384*b5677b36Schristoslt_cv_file_magic_test_file= 2385*b5677b36Schristoslt_cv_deplibs_check_method='unknown' 2386*b5677b36Schristos# Need to set the preceding variable on all platforms that support 2387*b5677b36Schristos# interlibrary dependencies. 2388*b5677b36Schristos# 'none' -- dependencies not supported. 2389*b5677b36Schristos# `unknown' -- same as none, but documents that we really don't know. 2390*b5677b36Schristos# 'pass_all' -- all dependencies passed with no checks. 2391*b5677b36Schristos# 'test_compile' -- check by making test program. 2392*b5677b36Schristos# 'file_magic [[regex]]' -- check by looking for files in library path 2393*b5677b36Schristos# which responds to the $file_magic_cmd with a given extended regex. 2394*b5677b36Schristos# If you have `file' or equivalent on your system and you're not sure 2395*b5677b36Schristos# whether `pass_all' will *always* work, you probably want this one. 2396*b5677b36Schristos 2397*b5677b36Schristoscase $host_os in 2398*b5677b36Schristosaix[[4-9]]*) 2399*b5677b36Schristos lt_cv_deplibs_check_method=pass_all 2400*b5677b36Schristos ;; 2401*b5677b36Schristos 2402*b5677b36Schristosbeos*) 2403*b5677b36Schristos lt_cv_deplibs_check_method=pass_all 2404*b5677b36Schristos ;; 2405*b5677b36Schristos 2406*b5677b36Schristosbsdi[[45]]*) 2407*b5677b36Schristos lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 2408*b5677b36Schristos lt_cv_file_magic_cmd='/usr/bin/file -L' 2409*b5677b36Schristos lt_cv_file_magic_test_file=/shlib/libc.so 2410*b5677b36Schristos ;; 2411*b5677b36Schristos 2412*b5677b36Schristoscygwin*) 2413*b5677b36Schristos # func_win32_libid is a shell function defined in ltmain.sh 2414*b5677b36Schristos lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 2415*b5677b36Schristos lt_cv_file_magic_cmd='func_win32_libid' 2416*b5677b36Schristos ;; 2417*b5677b36Schristos 2418*b5677b36Schristosmingw* | pw32*) 2419*b5677b36Schristos # Base MSYS/MinGW do not provide the 'file' command needed by 2420*b5677b36Schristos # func_win32_libid shell function, so use a weaker test based on 'objdump', 2421*b5677b36Schristos # unless we find 'file', for example because we are cross-compiling. 2422*b5677b36Schristos if ( file / ) >/dev/null 2>&1; then 2423*b5677b36Schristos lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 2424*b5677b36Schristos lt_cv_file_magic_cmd='func_win32_libid' 2425*b5677b36Schristos else 2426*b5677b36Schristos lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' 2427*b5677b36Schristos lt_cv_file_magic_cmd='$OBJDUMP -f' 2428*b5677b36Schristos fi 2429*b5677b36Schristos ;; 2430*b5677b36Schristos 2431*b5677b36Schristosdarwin* | rhapsody*) 2432*b5677b36Schristos lt_cv_deplibs_check_method=pass_all 2433*b5677b36Schristos ;; 2434*b5677b36Schristos 2435*b5677b36Schristosfreebsd* | dragonfly*) 2436*b5677b36Schristos if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then 2437*b5677b36Schristos case $host_cpu in 2438*b5677b36Schristos i*86 ) 2439*b5677b36Schristos # Not sure whether the presence of OpenBSD here was a mistake. 2440*b5677b36Schristos # Let's accept both of them until this is cleared up. 2441*b5677b36Schristos lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 2442*b5677b36Schristos lt_cv_file_magic_cmd=/usr/bin/file 2443*b5677b36Schristos lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 2444*b5677b36Schristos ;; 2445*b5677b36Schristos esac 2446*b5677b36Schristos else 2447*b5677b36Schristos lt_cv_deplibs_check_method=pass_all 2448*b5677b36Schristos fi 2449*b5677b36Schristos ;; 2450*b5677b36Schristos 2451*b5677b36Schristosgnu*) 2452*b5677b36Schristos lt_cv_deplibs_check_method=pass_all 2453*b5677b36Schristos ;; 2454*b5677b36Schristos 2455*b5677b36Schristoshpux10.20* | hpux11*) 2456*b5677b36Schristos lt_cv_file_magic_cmd=/usr/bin/file 2457*b5677b36Schristos case $host_cpu in 2458*b5677b36Schristos ia64*) 2459*b5677b36Schristos lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 2460*b5677b36Schristos lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 2461*b5677b36Schristos ;; 2462*b5677b36Schristos hppa*64*) 2463*b5677b36Schristos [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'] 2464*b5677b36Schristos lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 2465*b5677b36Schristos ;; 2466*b5677b36Schristos *) 2467*b5677b36Schristos lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' 2468*b5677b36Schristos lt_cv_file_magic_test_file=/usr/lib/libc.sl 2469*b5677b36Schristos ;; 2470*b5677b36Schristos esac 2471*b5677b36Schristos ;; 2472*b5677b36Schristos 2473*b5677b36Schristosinterix[[3-9]]*) 2474*b5677b36Schristos # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 2475*b5677b36Schristos lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 2476*b5677b36Schristos ;; 2477*b5677b36Schristos 2478*b5677b36Schristosirix5* | irix6* | nonstopux*) 2479*b5677b36Schristos case $LD in 2480*b5677b36Schristos *-32|*"-32 ") libmagic=32-bit;; 2481*b5677b36Schristos *-n32|*"-n32 ") libmagic=N32;; 2482*b5677b36Schristos *-64|*"-64 ") libmagic=64-bit;; 2483*b5677b36Schristos *) libmagic=never-match;; 2484*b5677b36Schristos esac 2485*b5677b36Schristos lt_cv_deplibs_check_method=pass_all 2486*b5677b36Schristos ;; 2487*b5677b36Schristos 2488*b5677b36Schristos# This must be Linux ELF. 2489*b5677b36Schristoslinux* | k*bsd*-gnu) 2490*b5677b36Schristos lt_cv_deplibs_check_method=pass_all 2491*b5677b36Schristos ;; 2492*b5677b36Schristos 2493*b5677b36Schristosnetbsd*) 2494*b5677b36Schristos if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then 2495*b5677b36Schristos lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 2496*b5677b36Schristos else 2497*b5677b36Schristos lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 2498*b5677b36Schristos fi 2499*b5677b36Schristos ;; 2500*b5677b36Schristos 2501*b5677b36Schristosnewos6*) 2502*b5677b36Schristos lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 2503*b5677b36Schristos lt_cv_file_magic_cmd=/usr/bin/file 2504*b5677b36Schristos lt_cv_file_magic_test_file=/usr/lib/libnls.so 2505*b5677b36Schristos ;; 2506*b5677b36Schristos 2507*b5677b36Schristosnto-qnx*) 2508*b5677b36Schristos lt_cv_deplibs_check_method=unknown 2509*b5677b36Schristos ;; 2510*b5677b36Schristos 2511*b5677b36Schristosopenbsd*) 2512*b5677b36Schristos if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 2513*b5677b36Schristos lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 2514*b5677b36Schristos else 2515*b5677b36Schristos lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 2516*b5677b36Schristos fi 2517*b5677b36Schristos ;; 2518*b5677b36Schristos 2519*b5677b36Schristososf3* | osf4* | osf5*) 2520*b5677b36Schristos lt_cv_deplibs_check_method=pass_all 2521*b5677b36Schristos ;; 2522*b5677b36Schristos 2523*b5677b36Schristosrdos*) 2524*b5677b36Schristos lt_cv_deplibs_check_method=pass_all 2525*b5677b36Schristos ;; 2526*b5677b36Schristos 2527*b5677b36Schristossolaris*) 2528*b5677b36Schristos lt_cv_deplibs_check_method=pass_all 2529*b5677b36Schristos ;; 2530*b5677b36Schristos 2531*b5677b36Schristossysv4 | sysv4.3*) 2532*b5677b36Schristos case $host_vendor in 2533*b5677b36Schristos motorola) 2534*b5677b36Schristos 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]]' 2535*b5677b36Schristos lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 2536*b5677b36Schristos ;; 2537*b5677b36Schristos ncr) 2538*b5677b36Schristos lt_cv_deplibs_check_method=pass_all 2539*b5677b36Schristos ;; 2540*b5677b36Schristos sequent) 2541*b5677b36Schristos lt_cv_file_magic_cmd='/bin/file' 2542*b5677b36Schristos lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 2543*b5677b36Schristos ;; 2544*b5677b36Schristos sni) 2545*b5677b36Schristos lt_cv_file_magic_cmd='/bin/file' 2546*b5677b36Schristos lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 2547*b5677b36Schristos lt_cv_file_magic_test_file=/lib/libc.so 2548*b5677b36Schristos ;; 2549*b5677b36Schristos siemens) 2550*b5677b36Schristos lt_cv_deplibs_check_method=pass_all 2551*b5677b36Schristos ;; 2552*b5677b36Schristos pc) 2553*b5677b36Schristos lt_cv_deplibs_check_method=pass_all 2554*b5677b36Schristos ;; 2555*b5677b36Schristos esac 2556*b5677b36Schristos ;; 2557*b5677b36Schristos 2558*b5677b36Schristossysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 2559*b5677b36Schristos lt_cv_deplibs_check_method=pass_all 2560*b5677b36Schristos ;; 2561*b5677b36Schristosesac 2562*b5677b36Schristos]) 2563*b5677b36Schristosfile_magic_cmd=$lt_cv_file_magic_cmd 2564*b5677b36Schristosdeplibs_check_method=$lt_cv_deplibs_check_method 2565*b5677b36Schristostest -z "$deplibs_check_method" && deplibs_check_method=unknown 2566*b5677b36Schristos])# AC_DEPLIBS_CHECK_METHOD 2567*b5677b36Schristos 2568*b5677b36Schristos 2569*b5677b36Schristos# AC_PROG_NM 2570*b5677b36Schristos# ---------- 2571*b5677b36Schristos# find the pathname to a BSD-compatible name lister 2572*b5677b36SchristosAC_DEFUN([AC_PROG_NM], 2573*b5677b36Schristos[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM, 2574*b5677b36Schristos[if test -n "$NM"; then 2575*b5677b36Schristos # Let the user override the test. 2576*b5677b36Schristos lt_cv_path_NM="$NM" 2577*b5677b36Schristoselse 2578*b5677b36Schristos lt_nm_to_check="${ac_tool_prefix}nm" 2579*b5677b36Schristos if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 2580*b5677b36Schristos lt_nm_to_check="$lt_nm_to_check nm" 2581*b5677b36Schristos fi 2582*b5677b36Schristos for lt_tmp_nm in $lt_nm_to_check; do 2583*b5677b36Schristos lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 2584*b5677b36Schristos for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 2585*b5677b36Schristos IFS="$lt_save_ifs" 2586*b5677b36Schristos test -z "$ac_dir" && ac_dir=. 2587*b5677b36Schristos tmp_nm="$ac_dir/$lt_tmp_nm" 2588*b5677b36Schristos if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then 2589*b5677b36Schristos # Check to see if the nm accepts a BSD-compat flag. 2590*b5677b36Schristos # Adding the `sed 1q' prevents false positives on HP-UX, which says: 2591*b5677b36Schristos # nm: unknown option "B" ignored 2592*b5677b36Schristos # Tru64's nm complains that /dev/null is an invalid object file 2593*b5677b36Schristos case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in 2594*b5677b36Schristos */dev/null* | *'Invalid file or object type'*) 2595*b5677b36Schristos lt_cv_path_NM="$tmp_nm -B" 2596*b5677b36Schristos break 2597*b5677b36Schristos ;; 2598*b5677b36Schristos *) 2599*b5677b36Schristos case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in 2600*b5677b36Schristos */dev/null*) 2601*b5677b36Schristos lt_cv_path_NM="$tmp_nm -p" 2602*b5677b36Schristos break 2603*b5677b36Schristos ;; 2604*b5677b36Schristos *) 2605*b5677b36Schristos lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 2606*b5677b36Schristos continue # so that we can try to find one that supports BSD flags 2607*b5677b36Schristos ;; 2608*b5677b36Schristos esac 2609*b5677b36Schristos ;; 2610*b5677b36Schristos esac 2611*b5677b36Schristos fi 2612*b5677b36Schristos done 2613*b5677b36Schristos IFS="$lt_save_ifs" 2614*b5677b36Schristos done 2615*b5677b36Schristos test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm 2616*b5677b36Schristosfi]) 2617*b5677b36SchristosNM="$lt_cv_path_NM" 2618*b5677b36Schristos])# AC_PROG_NM 2619*b5677b36Schristos 2620*b5677b36Schristos 2621*b5677b36Schristos# AC_CHECK_LIBM 2622*b5677b36Schristos# ------------- 2623*b5677b36Schristos# check for math library 2624*b5677b36SchristosAC_DEFUN([AC_CHECK_LIBM], 2625*b5677b36Schristos[AC_REQUIRE([AC_CANONICAL_HOST])dnl 2626*b5677b36SchristosLIBM= 2627*b5677b36Schristoscase $host in 2628*b5677b36Schristos*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) 2629*b5677b36Schristos # These system don't have libm, or don't need it 2630*b5677b36Schristos ;; 2631*b5677b36Schristos*-ncr-sysv4.3*) 2632*b5677b36Schristos AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") 2633*b5677b36Schristos AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 2634*b5677b36Schristos ;; 2635*b5677b36Schristos*) 2636*b5677b36Schristos AC_CHECK_LIB(m, cos, LIBM="-lm") 2637*b5677b36Schristos ;; 2638*b5677b36Schristosesac 2639*b5677b36Schristos])# AC_CHECK_LIBM 2640*b5677b36Schristos 2641*b5677b36Schristos 2642*b5677b36Schristos# AC_LIBLTDL_CONVENIENCE([DIRECTORY]) 2643*b5677b36Schristos# ----------------------------------- 2644*b5677b36Schristos# sets LIBLTDL to the link flags for the libltdl convenience library and 2645*b5677b36Schristos# LTDLINCL to the include flags for the libltdl header and adds 2646*b5677b36Schristos# --enable-ltdl-convenience to the configure arguments. Note that 2647*b5677b36Schristos# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, 2648*b5677b36Schristos# it is assumed to be `libltdl'. LIBLTDL will be prefixed with 2649*b5677b36Schristos# '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/' 2650*b5677b36Schristos# (note the single quotes!). If your package is not flat and you're not 2651*b5677b36Schristos# using automake, define top_builddir and top_srcdir appropriately in 2652*b5677b36Schristos# the Makefiles. 2653*b5677b36SchristosAC_DEFUN([AC_LIBLTDL_CONVENIENCE], 2654*b5677b36Schristos[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 2655*b5677b36Schristos case $enable_ltdl_convenience in 2656*b5677b36Schristos no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; 2657*b5677b36Schristos "") enable_ltdl_convenience=yes 2658*b5677b36Schristos ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; 2659*b5677b36Schristos esac 2660*b5677b36Schristos LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la 2661*b5677b36Schristos LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) 2662*b5677b36Schristos # For backwards non-gettext consistent compatibility... 2663*b5677b36Schristos INCLTDL="$LTDLINCL" 2664*b5677b36Schristos])# AC_LIBLTDL_CONVENIENCE 2665*b5677b36Schristos 2666*b5677b36Schristos 2667*b5677b36Schristos# AC_LIBLTDL_INSTALLABLE([DIRECTORY]) 2668*b5677b36Schristos# ----------------------------------- 2669*b5677b36Schristos# sets LIBLTDL to the link flags for the libltdl installable library and 2670*b5677b36Schristos# LTDLINCL to the include flags for the libltdl header and adds 2671*b5677b36Schristos# --enable-ltdl-install to the configure arguments. Note that 2672*b5677b36Schristos# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, 2673*b5677b36Schristos# and an installed libltdl is not found, it is assumed to be `libltdl'. 2674*b5677b36Schristos# LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with 2675*b5677b36Schristos# '${top_srcdir}/' (note the single quotes!). If your package is not 2676*b5677b36Schristos# flat and you're not using automake, define top_builddir and top_srcdir 2677*b5677b36Schristos# appropriately in the Makefiles. 2678*b5677b36Schristos# In the future, this macro may have to be called after AC_PROG_LIBTOOL. 2679*b5677b36SchristosAC_DEFUN([AC_LIBLTDL_INSTALLABLE], 2680*b5677b36Schristos[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 2681*b5677b36Schristos AC_CHECK_LIB(ltdl, lt_dlinit, 2682*b5677b36Schristos [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no], 2683*b5677b36Schristos [if test x"$enable_ltdl_install" = xno; then 2684*b5677b36Schristos AC_MSG_WARN([libltdl not installed, but installation disabled]) 2685*b5677b36Schristos else 2686*b5677b36Schristos enable_ltdl_install=yes 2687*b5677b36Schristos fi 2688*b5677b36Schristos ]) 2689*b5677b36Schristos if test x"$enable_ltdl_install" = x"yes"; then 2690*b5677b36Schristos ac_configure_args="$ac_configure_args --enable-ltdl-install" 2691*b5677b36Schristos LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la 2692*b5677b36Schristos LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) 2693*b5677b36Schristos else 2694*b5677b36Schristos ac_configure_args="$ac_configure_args --enable-ltdl-install=no" 2695*b5677b36Schristos LIBLTDL="-lltdl" 2696*b5677b36Schristos LTDLINCL= 2697*b5677b36Schristos fi 2698*b5677b36Schristos # For backwards non-gettext consistent compatibility... 2699*b5677b36Schristos INCLTDL="$LTDLINCL" 2700*b5677b36Schristos])# AC_LIBLTDL_INSTALLABLE 2701*b5677b36Schristos 2702*b5677b36Schristos 2703*b5677b36Schristos# AC_LIBTOOL_CXX 2704*b5677b36Schristos# -------------- 2705*b5677b36Schristos# enable support for C++ libraries 2706*b5677b36SchristosAC_DEFUN([AC_LIBTOOL_CXX], 2707*b5677b36Schristos[AC_REQUIRE([_LT_AC_LANG_CXX]) 2708*b5677b36Schristos])# AC_LIBTOOL_CXX 2709*b5677b36Schristos 2710*b5677b36Schristos 2711*b5677b36Schristos# _LT_AC_LANG_CXX 2712*b5677b36Schristos# --------------- 2713*b5677b36SchristosAC_DEFUN([_LT_AC_LANG_CXX], 2714*b5677b36Schristos[AC_REQUIRE([AC_PROG_CXX]) 2715*b5677b36SchristosAC_REQUIRE([_LT_AC_PROG_CXXCPP]) 2716*b5677b36Schristos_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX]) 2717*b5677b36Schristos])# _LT_AC_LANG_CXX 2718*b5677b36Schristos 2719*b5677b36Schristos# _LT_AC_PROG_CXXCPP 2720*b5677b36Schristos# ------------------ 2721*b5677b36SchristosAC_DEFUN([_LT_AC_PROG_CXXCPP], 2722*b5677b36Schristos[ 2723*b5677b36SchristosAC_REQUIRE([AC_PROG_CXX]) 2724*b5677b36Schristosif test -n "$CXX" && ( test "X$CXX" != "Xno" && 2725*b5677b36Schristos ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || 2726*b5677b36Schristos (test "X$CXX" != "Xg++"))) ; then 2727*b5677b36Schristos AC_PROG_CXXCPP 2728*b5677b36Schristosfi 2729*b5677b36Schristos])# _LT_AC_PROG_CXXCPP 2730*b5677b36Schristos 2731*b5677b36Schristos# AC_LIBTOOL_F77 2732*b5677b36Schristos# -------------- 2733*b5677b36Schristos# enable support for Fortran 77 libraries 2734*b5677b36SchristosAC_DEFUN([AC_LIBTOOL_F77], 2735*b5677b36Schristos[AC_REQUIRE([_LT_AC_LANG_F77]) 2736*b5677b36Schristos])# AC_LIBTOOL_F77 2737*b5677b36Schristos 2738*b5677b36Schristos 2739*b5677b36Schristos# _LT_AC_LANG_F77 2740*b5677b36Schristos# --------------- 2741*b5677b36SchristosAC_DEFUN([_LT_AC_LANG_F77], 2742*b5677b36Schristos[AC_REQUIRE([AC_PROG_F77]) 2743*b5677b36Schristos_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77]) 2744*b5677b36Schristos])# _LT_AC_LANG_F77 2745*b5677b36Schristos 2746*b5677b36Schristos 2747*b5677b36Schristos# AC_LIBTOOL_GCJ 2748*b5677b36Schristos# -------------- 2749*b5677b36Schristos# enable support for GCJ libraries 2750*b5677b36SchristosAC_DEFUN([AC_LIBTOOL_GCJ], 2751*b5677b36Schristos[AC_REQUIRE([_LT_AC_LANG_GCJ]) 2752*b5677b36Schristos])# AC_LIBTOOL_GCJ 2753*b5677b36Schristos 2754*b5677b36Schristos 2755*b5677b36Schristos# _LT_AC_LANG_GCJ 2756*b5677b36Schristos# --------------- 2757*b5677b36SchristosAC_DEFUN([_LT_AC_LANG_GCJ], 2758*b5677b36Schristos[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[], 2759*b5677b36Schristos [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[], 2760*b5677b36Schristos [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[], 2761*b5677b36Schristos [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])], 2762*b5677b36Schristos [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])], 2763*b5677b36Schristos [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])]) 2764*b5677b36Schristos_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ]) 2765*b5677b36Schristos])# _LT_AC_LANG_GCJ 2766*b5677b36Schristos 2767*b5677b36Schristos 2768*b5677b36Schristos# AC_LIBTOOL_RC 2769*b5677b36Schristos# ------------- 2770*b5677b36Schristos# enable support for Windows resource files 2771*b5677b36SchristosAC_DEFUN([AC_LIBTOOL_RC], 2772*b5677b36Schristos[AC_REQUIRE([LT_AC_PROG_RC]) 2773*b5677b36Schristos_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC]) 2774*b5677b36Schristos])# AC_LIBTOOL_RC 2775*b5677b36Schristos 2776*b5677b36Schristos 2777*b5677b36Schristos# AC_LIBTOOL_LANG_C_CONFIG 2778*b5677b36Schristos# ------------------------ 2779*b5677b36Schristos# Ensure that the configuration vars for the C compiler are 2780*b5677b36Schristos# suitably defined. Those variables are subsequently used by 2781*b5677b36Schristos# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 2782*b5677b36SchristosAC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG]) 2783*b5677b36SchristosAC_DEFUN([_LT_AC_LANG_C_CONFIG], 2784*b5677b36Schristos[lt_save_CC="$CC" 2785*b5677b36SchristosAC_LANG_PUSH(C) 2786*b5677b36Schristos 2787*b5677b36Schristos# Source file extension for C test sources. 2788*b5677b36Schristosac_ext=c 2789*b5677b36Schristos 2790*b5677b36Schristos# Object file extension for compiled C test sources. 2791*b5677b36Schristosobjext=o 2792*b5677b36Schristos_LT_AC_TAGVAR(objext, $1)=$objext 2793*b5677b36Schristos 2794*b5677b36Schristos# Code to be used in simple compile tests 2795*b5677b36Schristoslt_simple_compile_test_code="int some_variable = 0;" 2796*b5677b36Schristos 2797*b5677b36Schristos# Code to be used in simple link tests 2798*b5677b36Schristoslt_simple_link_test_code='int main(){return(0);}' 2799*b5677b36Schristos 2800*b5677b36Schristos_LT_AC_SYS_COMPILER 2801*b5677b36Schristos 2802*b5677b36Schristos# save warnings/boilerplate of simple test code 2803*b5677b36Schristos_LT_COMPILER_BOILERPLATE 2804*b5677b36Schristos_LT_LINKER_BOILERPLATE 2805*b5677b36Schristos 2806*b5677b36Schristos## CAVEAT EMPTOR: 2807*b5677b36Schristos## There is no encapsulation within the following macros, do not change 2808*b5677b36Schristos## the running order or otherwise move them around unless you know exactly 2809*b5677b36Schristos## what you are doing... 2810*b5677b36SchristosAC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) 2811*b5677b36SchristosAC_LIBTOOL_PROG_COMPILER_PIC($1) 2812*b5677b36SchristosAC_LIBTOOL_PROG_CC_C_O($1) 2813*b5677b36SchristosAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) 2814*b5677b36SchristosAC_LIBTOOL_PROG_LD_SHLIBS($1) 2815*b5677b36SchristosAC_LIBTOOL_SYS_DYNAMIC_LINKER($1) 2816*b5677b36SchristosAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) 2817*b5677b36SchristosAC_LIBTOOL_SYS_LIB_STRIP 2818*b5677b36SchristosAC_LIBTOOL_DLOPEN_SELF 2819*b5677b36Schristos 2820*b5677b36Schristos# Report which library types will actually be built 2821*b5677b36SchristosAC_MSG_CHECKING([if libtool supports shared libraries]) 2822*b5677b36SchristosAC_MSG_RESULT([$can_build_shared]) 2823*b5677b36Schristos 2824*b5677b36SchristosAC_MSG_CHECKING([whether to build shared libraries]) 2825*b5677b36Schristostest "$can_build_shared" = "no" && enable_shared=no 2826*b5677b36Schristos 2827*b5677b36Schristos# On AIX, shared libraries and static libraries use the same namespace, and 2828*b5677b36Schristos# are all built from PIC. 2829*b5677b36Schristoscase $host_os in 2830*b5677b36Schristosaix3*) 2831*b5677b36Schristos test "$enable_shared" = yes && enable_static=no 2832*b5677b36Schristos if test -n "$RANLIB"; then 2833*b5677b36Schristos archive_cmds="$archive_cmds~\$RANLIB \$lib" 2834*b5677b36Schristos postinstall_cmds='$RANLIB $lib' 2835*b5677b36Schristos fi 2836*b5677b36Schristos ;; 2837*b5677b36Schristos 2838*b5677b36Schristosaix[[4-9]]*) 2839*b5677b36Schristos if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 2840*b5677b36Schristos test "$enable_shared" = yes && enable_static=no 2841*b5677b36Schristos fi 2842*b5677b36Schristos ;; 2843*b5677b36Schristosesac 2844*b5677b36SchristosAC_MSG_RESULT([$enable_shared]) 2845*b5677b36Schristos 2846*b5677b36SchristosAC_MSG_CHECKING([whether to build static libraries]) 2847*b5677b36Schristos# Make sure either enable_shared or enable_static is yes. 2848*b5677b36Schristostest "$enable_shared" = yes || enable_static=yes 2849*b5677b36SchristosAC_MSG_RESULT([$enable_static]) 2850*b5677b36Schristos 2851*b5677b36SchristosAC_LIBTOOL_CONFIG($1) 2852*b5677b36Schristos 2853*b5677b36SchristosAC_LANG_POP 2854*b5677b36SchristosCC="$lt_save_CC" 2855*b5677b36Schristos])# AC_LIBTOOL_LANG_C_CONFIG 2856*b5677b36Schristos 2857*b5677b36Schristos 2858*b5677b36Schristos# AC_LIBTOOL_LANG_CXX_CONFIG 2859*b5677b36Schristos# -------------------------- 2860*b5677b36Schristos# Ensure that the configuration vars for the C compiler are 2861*b5677b36Schristos# suitably defined. Those variables are subsequently used by 2862*b5677b36Schristos# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 2863*b5677b36SchristosAC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)]) 2864*b5677b36SchristosAC_DEFUN([_LT_AC_LANG_CXX_CONFIG], 2865*b5677b36Schristos[AC_LANG_PUSH(C++) 2866*b5677b36SchristosAC_REQUIRE([AC_PROG_CXX]) 2867*b5677b36SchristosAC_REQUIRE([_LT_AC_PROG_CXXCPP]) 2868*b5677b36Schristos 2869*b5677b36Schristos_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 2870*b5677b36Schristos_LT_AC_TAGVAR(allow_undefined_flag, $1)= 2871*b5677b36Schristos_LT_AC_TAGVAR(always_export_symbols, $1)=no 2872*b5677b36Schristos_LT_AC_TAGVAR(archive_expsym_cmds, $1)= 2873*b5677b36Schristos_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= 2874*b5677b36Schristos_LT_AC_TAGVAR(hardcode_direct, $1)=no 2875*b5677b36Schristos_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= 2876*b5677b36Schristos_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 2877*b5677b36Schristos_LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 2878*b5677b36Schristos_LT_AC_TAGVAR(hardcode_minus_L, $1)=no 2879*b5677b36Schristos_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 2880*b5677b36Schristos_LT_AC_TAGVAR(hardcode_automatic, $1)=no 2881*b5677b36Schristos_LT_AC_TAGVAR(module_cmds, $1)= 2882*b5677b36Schristos_LT_AC_TAGVAR(module_expsym_cmds, $1)= 2883*b5677b36Schristos_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown 2884*b5677b36Schristos_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 2885*b5677b36Schristos_LT_AC_TAGVAR(no_undefined_flag, $1)= 2886*b5677b36Schristos_LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 2887*b5677b36Schristos_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no 2888*b5677b36Schristos 2889*b5677b36Schristos# Dependencies to place before and after the object being linked: 2890*b5677b36Schristos_LT_AC_TAGVAR(predep_objects, $1)= 2891*b5677b36Schristos_LT_AC_TAGVAR(postdep_objects, $1)= 2892*b5677b36Schristos_LT_AC_TAGVAR(predeps, $1)= 2893*b5677b36Schristos_LT_AC_TAGVAR(postdeps, $1)= 2894*b5677b36Schristos_LT_AC_TAGVAR(compiler_lib_search_path, $1)= 2895*b5677b36Schristos_LT_AC_TAGVAR(compiler_lib_search_dirs, $1)= 2896*b5677b36Schristos 2897*b5677b36Schristos# Source file extension for C++ test sources. 2898*b5677b36Schristosac_ext=cpp 2899*b5677b36Schristos 2900*b5677b36Schristos# Object file extension for compiled C++ test sources. 2901*b5677b36Schristosobjext=o 2902*b5677b36Schristos_LT_AC_TAGVAR(objext, $1)=$objext 2903*b5677b36Schristos 2904*b5677b36Schristos# Code to be used in simple compile tests 2905*b5677b36Schristoslt_simple_compile_test_code="int some_variable = 0;" 2906*b5677b36Schristos 2907*b5677b36Schristos# Code to be used in simple link tests 2908*b5677b36Schristoslt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 2909*b5677b36Schristos 2910*b5677b36Schristos# ltmain only uses $CC for tagged configurations so make sure $CC is set. 2911*b5677b36Schristos_LT_AC_SYS_COMPILER 2912*b5677b36Schristos 2913*b5677b36Schristos# save warnings/boilerplate of simple test code 2914*b5677b36Schristos_LT_COMPILER_BOILERPLATE 2915*b5677b36Schristos_LT_LINKER_BOILERPLATE 2916*b5677b36Schristos 2917*b5677b36Schristos# Allow CC to be a program name with arguments. 2918*b5677b36Schristoslt_save_CC=$CC 2919*b5677b36Schristoslt_save_LD=$LD 2920*b5677b36Schristoslt_save_GCC=$GCC 2921*b5677b36SchristosGCC=$GXX 2922*b5677b36Schristoslt_save_with_gnu_ld=$with_gnu_ld 2923*b5677b36Schristoslt_save_path_LD=$lt_cv_path_LD 2924*b5677b36Schristosif test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 2925*b5677b36Schristos lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 2926*b5677b36Schristoselse 2927*b5677b36Schristos $as_unset lt_cv_prog_gnu_ld 2928*b5677b36Schristosfi 2929*b5677b36Schristosif test -n "${lt_cv_path_LDCXX+set}"; then 2930*b5677b36Schristos lt_cv_path_LD=$lt_cv_path_LDCXX 2931*b5677b36Schristoselse 2932*b5677b36Schristos $as_unset lt_cv_path_LD 2933*b5677b36Schristosfi 2934*b5677b36Schristostest -z "${LDCXX+set}" || LD=$LDCXX 2935*b5677b36SchristosCC=${CXX-"c++"} 2936*b5677b36Schristoscompiler=$CC 2937*b5677b36Schristos_LT_AC_TAGVAR(compiler, $1)=$CC 2938*b5677b36Schristos_LT_CC_BASENAME([$compiler]) 2939*b5677b36Schristos 2940*b5677b36Schristos# We don't want -fno-exception wen compiling C++ code, so set the 2941*b5677b36Schristos# no_builtin_flag separately 2942*b5677b36Schristosif test "$GXX" = yes; then 2943*b5677b36Schristos _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 2944*b5677b36Schristoselse 2945*b5677b36Schristos _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 2946*b5677b36Schristosfi 2947*b5677b36Schristos 2948*b5677b36Schristosif test "$GXX" = yes; then 2949*b5677b36Schristos # Set up default GNU C++ configuration 2950*b5677b36Schristos 2951*b5677b36Schristos AC_PROG_LD 2952*b5677b36Schristos 2953*b5677b36Schristos # Check if GNU C++ uses GNU ld as the underlying linker, since the 2954*b5677b36Schristos # archiving commands below assume that GNU ld is being used. 2955*b5677b36Schristos if test "$with_gnu_ld" = yes; then 2956*b5677b36Schristos _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 2957*b5677b36Schristos _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' 2958*b5677b36Schristos 2959*b5677b36Schristos _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 2960*b5677b36Schristos _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 2961*b5677b36Schristos 2962*b5677b36Schristos # If archive_cmds runs LD, not CC, wlarc should be empty 2963*b5677b36Schristos # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 2964*b5677b36Schristos # investigate it a little bit more. (MM) 2965*b5677b36Schristos wlarc='${wl}' 2966*b5677b36Schristos 2967*b5677b36Schristos # ancient GNU ld didn't support --whole-archive et. al. 2968*b5677b36Schristos if eval "`$CC -print-prog-name=ld` --help 2>&1" | \ 2969*b5677b36Schristos grep 'no-whole-archive' > /dev/null; then 2970*b5677b36Schristos _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 2971*b5677b36Schristos else 2972*b5677b36Schristos _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 2973*b5677b36Schristos fi 2974*b5677b36Schristos else 2975*b5677b36Schristos with_gnu_ld=no 2976*b5677b36Schristos wlarc= 2977*b5677b36Schristos 2978*b5677b36Schristos # A generic and very simple default shared library creation 2979*b5677b36Schristos # command for GNU C++ for the case where it uses the native 2980*b5677b36Schristos # linker, instead of GNU ld. If possible, this setting should 2981*b5677b36Schristos # overridden to take advantage of the native linker features on 2982*b5677b36Schristos # the platform it is being used on. 2983*b5677b36Schristos _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 2984*b5677b36Schristos fi 2985*b5677b36Schristos 2986*b5677b36Schristos # Commands to make compiler produce verbose output that lists 2987*b5677b36Schristos # what "hidden" libraries, object files and flags are used when 2988*b5677b36Schristos # linking a shared library. 2989*b5677b36Schristos output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' 2990*b5677b36Schristos 2991*b5677b36Schristoselse 2992*b5677b36Schristos GXX=no 2993*b5677b36Schristos with_gnu_ld=no 2994*b5677b36Schristos wlarc= 2995*b5677b36Schristosfi 2996*b5677b36Schristos 2997*b5677b36Schristos# PORTME: fill in a description of your system's C++ link characteristics 2998*b5677b36SchristosAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 2999*b5677b36Schristos_LT_AC_TAGVAR(ld_shlibs, $1)=yes 3000*b5677b36Schristoscase $host_os in 3001*b5677b36Schristos aix3*) 3002*b5677b36Schristos # FIXME: insert proper C++ library support 3003*b5677b36Schristos _LT_AC_TAGVAR(ld_shlibs, $1)=no 3004*b5677b36Schristos ;; 3005*b5677b36Schristos aix[[4-9]]*) 3006*b5677b36Schristos if test "$host_cpu" = ia64; then 3007*b5677b36Schristos # On IA64, the linker does run time linking by default, so we don't 3008*b5677b36Schristos # have to do anything special. 3009*b5677b36Schristos aix_use_runtimelinking=no 3010*b5677b36Schristos exp_sym_flag='-Bexport' 3011*b5677b36Schristos no_entry_flag="" 3012*b5677b36Schristos else 3013*b5677b36Schristos aix_use_runtimelinking=no 3014*b5677b36Schristos 3015*b5677b36Schristos # Test if we are trying to use run time linking or normal 3016*b5677b36Schristos # AIX style linking. If -brtl is somewhere in LDFLAGS, we 3017*b5677b36Schristos # need to do runtime linking. 3018*b5677b36Schristos case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 3019*b5677b36Schristos for ld_flag in $LDFLAGS; do 3020*b5677b36Schristos case $ld_flag in 3021*b5677b36Schristos *-brtl*) 3022*b5677b36Schristos aix_use_runtimelinking=yes 3023*b5677b36Schristos break 3024*b5677b36Schristos ;; 3025*b5677b36Schristos esac 3026*b5677b36Schristos done 3027*b5677b36Schristos ;; 3028*b5677b36Schristos esac 3029*b5677b36Schristos 3030*b5677b36Schristos exp_sym_flag='-bexport' 3031*b5677b36Schristos no_entry_flag='-bnoentry' 3032*b5677b36Schristos fi 3033*b5677b36Schristos 3034*b5677b36Schristos # When large executables or shared objects are built, AIX ld can 3035*b5677b36Schristos # have problems creating the table of contents. If linking a library 3036*b5677b36Schristos # or program results in "error TOC overflow" add -mminimal-toc to 3037*b5677b36Schristos # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 3038*b5677b36Schristos # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 3039*b5677b36Schristos 3040*b5677b36Schristos _LT_AC_TAGVAR(archive_cmds, $1)='' 3041*b5677b36Schristos _LT_AC_TAGVAR(hardcode_direct, $1)=yes 3042*b5677b36Schristos _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' 3043*b5677b36Schristos _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 3044*b5677b36Schristos 3045*b5677b36Schristos if test "$GXX" = yes; then 3046*b5677b36Schristos case $host_os in aix4.[[012]]|aix4.[[012]].*) 3047*b5677b36Schristos # We only want to do this on AIX 4.2 and lower, the check 3048*b5677b36Schristos # below for broken collect2 doesn't work under 4.3+ 3049*b5677b36Schristos collect2name=`${CC} -print-prog-name=collect2` 3050*b5677b36Schristos if test -f "$collect2name" && \ 3051*b5677b36Schristos strings "$collect2name" | grep resolve_lib_name >/dev/null 3052*b5677b36Schristos then 3053*b5677b36Schristos # We have reworked collect2 3054*b5677b36Schristos : 3055*b5677b36Schristos else 3056*b5677b36Schristos # We have old collect2 3057*b5677b36Schristos _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported 3058*b5677b36Schristos # It fails to find uninstalled libraries when the uninstalled 3059*b5677b36Schristos # path is not listed in the libpath. Setting hardcode_minus_L 3060*b5677b36Schristos # to unsupported forces relinking 3061*b5677b36Schristos _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 3062*b5677b36Schristos _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 3063*b5677b36Schristos _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 3064*b5677b36Schristos fi 3065*b5677b36Schristos ;; 3066*b5677b36Schristos esac 3067*b5677b36Schristos shared_flag='-shared' 3068*b5677b36Schristos if test "$aix_use_runtimelinking" = yes; then 3069*b5677b36Schristos shared_flag="$shared_flag "'${wl}-G' 3070*b5677b36Schristos fi 3071*b5677b36Schristos else 3072*b5677b36Schristos # not using gcc 3073*b5677b36Schristos if test "$host_cpu" = ia64; then 3074*b5677b36Schristos # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 3075*b5677b36Schristos # chokes on -Wl,-G. The following line is correct: 3076*b5677b36Schristos shared_flag='-G' 3077*b5677b36Schristos else 3078*b5677b36Schristos if test "$aix_use_runtimelinking" = yes; then 3079*b5677b36Schristos shared_flag='${wl}-G' 3080*b5677b36Schristos else 3081*b5677b36Schristos shared_flag='${wl}-bM:SRE' 3082*b5677b36Schristos fi 3083*b5677b36Schristos fi 3084*b5677b36Schristos fi 3085*b5677b36Schristos 3086*b5677b36Schristos # It seems that -bexpall does not export symbols beginning with 3087*b5677b36Schristos # underscore (_), so it is better to generate a list of symbols to export. 3088*b5677b36Schristos _LT_AC_TAGVAR(always_export_symbols, $1)=yes 3089*b5677b36Schristos if test "$aix_use_runtimelinking" = yes; then 3090*b5677b36Schristos # Warning - without using the other runtime loading flags (-brtl), 3091*b5677b36Schristos # -berok will link without error, but may produce a broken library. 3092*b5677b36Schristos _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' 3093*b5677b36Schristos # Determine the default libpath from the value encoded in an empty executable. 3094*b5677b36Schristos _LT_AC_SYS_LIBPATH_AIX 3095*b5677b36Schristos _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 3096*b5677b36Schristos 3097*b5677b36Schristos _LT_AC_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 echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" 3098*b5677b36Schristos else 3099*b5677b36Schristos if test "$host_cpu" = ia64; then 3100*b5677b36Schristos _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 3101*b5677b36Schristos _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 3102*b5677b36Schristos _LT_AC_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" 3103*b5677b36Schristos else 3104*b5677b36Schristos # Determine the default libpath from the value encoded in an empty executable. 3105*b5677b36Schristos _LT_AC_SYS_LIBPATH_AIX 3106*b5677b36Schristos _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 3107*b5677b36Schristos # Warning - without using the other run time loading flags, 3108*b5677b36Schristos # -berok will link without error, but may produce a broken library. 3109*b5677b36Schristos _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 3110*b5677b36Schristos _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 3111*b5677b36Schristos # Exported symbols can be pulled into shared objects from archives 3112*b5677b36Schristos _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 3113*b5677b36Schristos _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes 3114*b5677b36Schristos # This is similar to how AIX traditionally builds its shared libraries. 3115*b5677b36Schristos _LT_AC_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' 3116*b5677b36Schristos fi 3117*b5677b36Schristos fi 3118*b5677b36Schristos ;; 3119*b5677b36Schristos 3120*b5677b36Schristos beos*) 3121*b5677b36Schristos if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 3122*b5677b36Schristos _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 3123*b5677b36Schristos # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 3124*b5677b36Schristos # support --undefined. This deserves some investigation. FIXME 3125*b5677b36Schristos _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 3126*b5677b36Schristos else 3127*b5677b36Schristos _LT_AC_TAGVAR(ld_shlibs, $1)=no 3128*b5677b36Schristos fi 3129*b5677b36Schristos ;; 3130*b5677b36Schristos 3131*b5677b36Schristos chorus*) 3132*b5677b36Schristos case $cc_basename in 3133*b5677b36Schristos *) 3134*b5677b36Schristos # FIXME: insert proper C++ library support 3135*b5677b36Schristos _LT_AC_TAGVAR(ld_shlibs, $1)=no 3136*b5677b36Schristos ;; 3137*b5677b36Schristos esac 3138*b5677b36Schristos ;; 3139*b5677b36Schristos 3140*b5677b36Schristos cygwin* | mingw* | pw32*) 3141*b5677b36Schristos # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 3142*b5677b36Schristos # as there is no search path for DLLs. 3143*b5677b36Schristos _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 3144*b5677b36Schristos _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 3145*b5677b36Schristos _LT_AC_TAGVAR(always_export_symbols, $1)=no 3146*b5677b36Schristos _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 3147*b5677b36Schristos 3148*b5677b36Schristos if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then 3149*b5677b36Schristos _LT_AC_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' 3150*b5677b36Schristos # If the export-symbols file already is a .def file (1st line 3151*b5677b36Schristos # is EXPORTS), use it as is; otherwise, prepend... 3152*b5677b36Schristos _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 3153*b5677b36Schristos cp $export_symbols $output_objdir/$soname.def; 3154*b5677b36Schristos else 3155*b5677b36Schristos echo EXPORTS > $output_objdir/$soname.def; 3156*b5677b36Schristos cat $export_symbols >> $output_objdir/$soname.def; 3157*b5677b36Schristos fi~ 3158*b5677b36Schristos $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' 3159*b5677b36Schristos else 3160*b5677b36Schristos _LT_AC_TAGVAR(ld_shlibs, $1)=no 3161*b5677b36Schristos fi 3162*b5677b36Schristos ;; 3163*b5677b36Schristos darwin* | rhapsody*) 3164*b5677b36Schristos _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 3165*b5677b36Schristos _LT_AC_TAGVAR(hardcode_direct, $1)=no 3166*b5677b36Schristos _LT_AC_TAGVAR(hardcode_automatic, $1)=yes 3167*b5677b36Schristos _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 3168*b5677b36Schristos _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' 3169*b5677b36Schristos _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 3170*b5677b36Schristos _LT_AC_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" 3171*b5677b36Schristos if test "$GXX" = yes ; then 3172*b5677b36Schristos output_verbose_link_cmd='echo' 3173*b5677b36Schristos _LT_AC_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}" 3174*b5677b36Schristos _LT_AC_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" 3175*b5677b36Schristos _LT_AC_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}" 3176*b5677b36Schristos _LT_AC_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}" 3177*b5677b36Schristos if test "$lt_cv_apple_cc_single_mod" != "yes"; then 3178*b5677b36Schristos _LT_AC_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}" 3179*b5677b36Schristos _LT_AC_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}" 3180*b5677b36Schristos fi 3181*b5677b36Schristos else 3182*b5677b36Schristos case $cc_basename in 3183*b5677b36Schristos xlc*) 3184*b5677b36Schristos output_verbose_link_cmd='echo' 3185*b5677b36Schristos _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' 3186*b5677b36Schristos _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' 3187*b5677b36Schristos # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds 3188*b5677b36Schristos _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' 3189*b5677b36Schristos _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' 3190*b5677b36Schristos ;; 3191*b5677b36Schristos *) 3192*b5677b36Schristos _LT_AC_TAGVAR(ld_shlibs, $1)=no 3193*b5677b36Schristos ;; 3194*b5677b36Schristos esac 3195*b5677b36Schristos fi 3196*b5677b36Schristos ;; 3197*b5677b36Schristos 3198*b5677b36Schristos dgux*) 3199*b5677b36Schristos case $cc_basename in 3200*b5677b36Schristos ec++*) 3201*b5677b36Schristos # FIXME: insert proper C++ library support 3202*b5677b36Schristos _LT_AC_TAGVAR(ld_shlibs, $1)=no 3203*b5677b36Schristos ;; 3204*b5677b36Schristos ghcx*) 3205*b5677b36Schristos # Green Hills C++ Compiler 3206*b5677b36Schristos # FIXME: insert proper C++ library support 3207*b5677b36Schristos _LT_AC_TAGVAR(ld_shlibs, $1)=no 3208*b5677b36Schristos ;; 3209*b5677b36Schristos *) 3210*b5677b36Schristos # FIXME: insert proper C++ library support 3211*b5677b36Schristos _LT_AC_TAGVAR(ld_shlibs, $1)=no 3212*b5677b36Schristos ;; 3213*b5677b36Schristos esac 3214*b5677b36Schristos ;; 3215*b5677b36Schristos freebsd[[12]]*) 3216*b5677b36Schristos # C++ shared libraries reported to be fairly broken before switch to ELF 3217*b5677b36Schristos _LT_AC_TAGVAR(ld_shlibs, $1)=no 3218*b5677b36Schristos ;; 3219*b5677b36Schristos freebsd-elf*) 3220*b5677b36Schristos _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 3221*b5677b36Schristos ;; 3222*b5677b36Schristos freebsd* | dragonfly*) 3223*b5677b36Schristos # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 3224*b5677b36Schristos # conventions 3225*b5677b36Schristos _LT_AC_TAGVAR(ld_shlibs, $1)=yes 3226*b5677b36Schristos ;; 3227*b5677b36Schristos gnu*) 3228*b5677b36Schristos ;; 3229*b5677b36Schristos hpux9*) 3230*b5677b36Schristos _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 3231*b5677b36Schristos _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 3232*b5677b36Schristos _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 3233*b5677b36Schristos _LT_AC_TAGVAR(hardcode_direct, $1)=yes 3234*b5677b36Schristos _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 3235*b5677b36Schristos # but as the default 3236*b5677b36Schristos # location of the library. 3237*b5677b36Schristos 3238*b5677b36Schristos case $cc_basename in 3239*b5677b36Schristos CC*) 3240*b5677b36Schristos # FIXME: insert proper C++ library support 3241*b5677b36Schristos _LT_AC_TAGVAR(ld_shlibs, $1)=no 3242*b5677b36Schristos ;; 3243*b5677b36Schristos aCC*) 3244*b5677b36Schristos _LT_AC_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' 3245*b5677b36Schristos # Commands to make compiler produce verbose output that lists 3246*b5677b36Schristos # what "hidden" libraries, object files and flags are used when 3247*b5677b36Schristos # linking a shared library. 3248*b5677b36Schristos # 3249*b5677b36Schristos # There doesn't appear to be a way to prevent this compiler from 3250*b5677b36Schristos # explicitly linking system object files so we need to strip them 3251*b5677b36Schristos # from the output so that they don't get included in the library 3252*b5677b36Schristos # dependencies. 3253*b5677b36Schristos 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; echo $list' 3254*b5677b36Schristos ;; 3255*b5677b36Schristos *) 3256*b5677b36Schristos if test "$GXX" = yes; then 3257*b5677b36Schristos _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${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' 3258*b5677b36Schristos else 3259*b5677b36Schristos # FIXME: insert proper C++ library support 3260*b5677b36Schristos _LT_AC_TAGVAR(ld_shlibs, $1)=no 3261*b5677b36Schristos fi 3262*b5677b36Schristos ;; 3263*b5677b36Schristos esac 3264*b5677b36Schristos ;; 3265*b5677b36Schristos hpux10*|hpux11*) 3266*b5677b36Schristos if test $with_gnu_ld = no; then 3267*b5677b36Schristos _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 3268*b5677b36Schristos _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 3269*b5677b36Schristos 3270*b5677b36Schristos case $host_cpu in 3271*b5677b36Schristos hppa*64*|ia64*) ;; 3272*b5677b36Schristos *) 3273*b5677b36Schristos _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 3274*b5677b36Schristos ;; 3275*b5677b36Schristos esac 3276*b5677b36Schristos fi 3277*b5677b36Schristos case $host_cpu in 3278*b5677b36Schristos hppa*64*|ia64*) 3279*b5677b36Schristos _LT_AC_TAGVAR(hardcode_direct, $1)=no 3280*b5677b36Schristos _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 3281*b5677b36Schristos ;; 3282*b5677b36Schristos *) 3283*b5677b36Schristos _LT_AC_TAGVAR(hardcode_direct, $1)=yes 3284*b5677b36Schristos _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 3285*b5677b36Schristos # but as the default 3286*b5677b36Schristos # location of the library. 3287*b5677b36Schristos ;; 3288*b5677b36Schristos esac 3289*b5677b36Schristos 3290*b5677b36Schristos case $cc_basename in 3291*b5677b36Schristos CC*) 3292*b5677b36Schristos # FIXME: insert proper C++ library support 3293*b5677b36Schristos _LT_AC_TAGVAR(ld_shlibs, $1)=no 3294*b5677b36Schristos ;; 3295*b5677b36Schristos aCC*) 3296*b5677b36Schristos case $host_cpu in 3297*b5677b36Schristos hppa*64*) 3298*b5677b36Schristos _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 3299*b5677b36Schristos ;; 3300*b5677b36Schristos ia64*) 3301*b5677b36Schristos _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 3302*b5677b36Schristos ;; 3303*b5677b36Schristos *) 3304*b5677b36Schristos _LT_AC_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' 3305*b5677b36Schristos ;; 3306*b5677b36Schristos esac 3307*b5677b36Schristos # Commands to make compiler produce verbose output that lists 3308*b5677b36Schristos # what "hidden" libraries, object files and flags are used when 3309*b5677b36Schristos # linking a shared library. 3310*b5677b36Schristos # 3311*b5677b36Schristos # There doesn't appear to be a way to prevent this compiler from 3312*b5677b36Schristos # explicitly linking system object files so we need to strip them 3313*b5677b36Schristos # from the output so that they don't get included in the library 3314*b5677b36Schristos # dependencies. 3315*b5677b36Schristos 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; echo $list' 3316*b5677b36Schristos ;; 3317*b5677b36Schristos *) 3318*b5677b36Schristos if test "$GXX" = yes; then 3319*b5677b36Schristos if test $with_gnu_ld = no; then 3320*b5677b36Schristos case $host_cpu in 3321*b5677b36Schristos hppa*64*) 3322*b5677b36Schristos _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 3323*b5677b36Schristos ;; 3324*b5677b36Schristos ia64*) 3325*b5677b36Schristos _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 3326*b5677b36Schristos ;; 3327*b5677b36Schristos *) 3328*b5677b36Schristos _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 3329*b5677b36Schristos ;; 3330*b5677b36Schristos esac 3331*b5677b36Schristos fi 3332*b5677b36Schristos else 3333*b5677b36Schristos # FIXME: insert proper C++ library support 3334*b5677b36Schristos _LT_AC_TAGVAR(ld_shlibs, $1)=no 3335*b5677b36Schristos fi 3336*b5677b36Schristos ;; 3337*b5677b36Schristos esac 3338*b5677b36Schristos ;; 3339*b5677b36Schristos interix[[3-9]]*) 3340*b5677b36Schristos _LT_AC_TAGVAR(hardcode_direct, $1)=no 3341*b5677b36Schristos _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 3342*b5677b36Schristos _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 3343*b5677b36Schristos _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 3344*b5677b36Schristos # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 3345*b5677b36Schristos # Instead, shared libraries are loaded at an image base (0x10000000 by 3346*b5677b36Schristos # default) and relocated if they conflict, which is a slow very memory 3347*b5677b36Schristos # consuming and fragmenting process. To avoid this, we pick a random, 3348*b5677b36Schristos # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 3349*b5677b36Schristos # time. Moving up from 0x10000000 also allows more sbrk(2) space. 3350*b5677b36Schristos _LT_AC_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' 3351*b5677b36Schristos _LT_AC_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' 3352*b5677b36Schristos ;; 3353*b5677b36Schristos irix5* | irix6*) 3354*b5677b36Schristos case $cc_basename in 3355*b5677b36Schristos CC*) 3356*b5677b36Schristos # SGI C++ 3357*b5677b36Schristos _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' 3358*b5677b36Schristos 3359*b5677b36Schristos # Archives containing C++ object files must be created using 3360*b5677b36Schristos # "CC -ar", where "CC" is the IRIX C++ compiler. This is 3361*b5677b36Schristos # necessary to make sure instantiated templates are included 3362*b5677b36Schristos # in the archive. 3363*b5677b36Schristos _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 3364*b5677b36Schristos ;; 3365*b5677b36Schristos *) 3366*b5677b36Schristos if test "$GXX" = yes; then 3367*b5677b36Schristos if test "$with_gnu_ld" = no; then 3368*b5677b36Schristos _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 3369*b5677b36Schristos else 3370*b5677b36Schristos _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib' 3371*b5677b36Schristos fi 3372*b5677b36Schristos fi 3373*b5677b36Schristos _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 3374*b5677b36Schristos ;; 3375*b5677b36Schristos esac 3376*b5677b36Schristos _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 3377*b5677b36Schristos _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 3378*b5677b36Schristos ;; 3379*b5677b36Schristos linux* | k*bsd*-gnu) 3380*b5677b36Schristos case $cc_basename in 3381*b5677b36Schristos KCC*) 3382*b5677b36Schristos # Kuck and Associates, Inc. (KAI) C++ Compiler 3383*b5677b36Schristos 3384*b5677b36Schristos # KCC will only create a shared library if the output file 3385*b5677b36Schristos # ends with ".so" (or ".sl" for HP-UX), so rename the library 3386*b5677b36Schristos # to its proper name (with version) after linking. 3387*b5677b36Schristos _LT_AC_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' 3388*b5677b36Schristos _LT_AC_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' 3389*b5677b36Schristos # Commands to make compiler produce verbose output that lists 3390*b5677b36Schristos # what "hidden" libraries, object files and flags are used when 3391*b5677b36Schristos # linking a shared library. 3392*b5677b36Schristos # 3393*b5677b36Schristos # There doesn't appear to be a way to prevent this compiler from 3394*b5677b36Schristos # explicitly linking system object files so we need to strip them 3395*b5677b36Schristos # from the output so that they don't get included in the library 3396*b5677b36Schristos # dependencies. 3397*b5677b36Schristos 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; echo $list' 3398*b5677b36Schristos 3399*b5677b36Schristos _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir' 3400*b5677b36Schristos _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 3401*b5677b36Schristos 3402*b5677b36Schristos # Archives containing C++ object files must be created using 3403*b5677b36Schristos # "CC -Bstatic", where "CC" is the KAI C++ compiler. 3404*b5677b36Schristos _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 3405*b5677b36Schristos ;; 3406*b5677b36Schristos icpc*) 3407*b5677b36Schristos # Intel C++ 3408*b5677b36Schristos with_gnu_ld=yes 3409*b5677b36Schristos # version 8.0 and above of icpc choke on multiply defined symbols 3410*b5677b36Schristos # if we add $predep_objects and $postdep_objects, however 7.1 and 3411*b5677b36Schristos # earlier do not add the objects themselves. 3412*b5677b36Schristos case `$CC -V 2>&1` in 3413*b5677b36Schristos *"Version 7."*) 3414*b5677b36Schristos _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 3415*b5677b36Schristos _LT_AC_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' 3416*b5677b36Schristos ;; 3417*b5677b36Schristos *) # Version 8.0 or newer 3418*b5677b36Schristos tmp_idyn= 3419*b5677b36Schristos case $host_cpu in 3420*b5677b36Schristos ia64*) tmp_idyn=' -i_dynamic';; 3421*b5677b36Schristos esac 3422*b5677b36Schristos _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 3423*b5677b36Schristos _LT_AC_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' 3424*b5677b36Schristos ;; 3425*b5677b36Schristos esac 3426*b5677b36Schristos _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 3427*b5677b36Schristos _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 3428*b5677b36Schristos _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 3429*b5677b36Schristos _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 3430*b5677b36Schristos ;; 3431*b5677b36Schristos pgCC* | pgcpp*) 3432*b5677b36Schristos # Portland Group C++ compiler 3433*b5677b36Schristos _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 3434*b5677b36Schristos _LT_AC_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' 3435*b5677b36Schristos 3436*b5677b36Schristos _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 3437*b5677b36Schristos _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 3438*b5677b36Schristos _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' 3439*b5677b36Schristos ;; 3440*b5677b36Schristos cxx*) 3441*b5677b36Schristos # Compaq C++ 3442*b5677b36Schristos _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 3443*b5677b36Schristos _LT_AC_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' 3444*b5677b36Schristos 3445*b5677b36Schristos runpath_var=LD_RUN_PATH 3446*b5677b36Schristos _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 3447*b5677b36Schristos _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 3448*b5677b36Schristos 3449*b5677b36Schristos # Commands to make compiler produce verbose output that lists 3450*b5677b36Schristos # what "hidden" libraries, object files and flags are used when 3451*b5677b36Schristos # linking a shared library. 3452*b5677b36Schristos # 3453*b5677b36Schristos # There doesn't appear to be a way to prevent this compiler from 3454*b5677b36Schristos # explicitly linking system object files so we need to strip them 3455*b5677b36Schristos # from the output so that they don't get included in the library 3456*b5677b36Schristos # dependencies. 3457*b5677b36Schristos output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $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; echo $list' 3458*b5677b36Schristos ;; 3459*b5677b36Schristos *) 3460*b5677b36Schristos case `$CC -V 2>&1 | sed 5q` in 3461*b5677b36Schristos *Sun\ C*) 3462*b5677b36Schristos # Sun C++ 5.9 3463*b5677b36Schristos _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' 3464*b5677b36Schristos _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 3465*b5677b36Schristos _LT_AC_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' 3466*b5677b36Schristos _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 3467*b5677b36Schristos _LT_AC_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; $echo \"$new_convenience\"` ${wl}--no-whole-archive' 3468*b5677b36Schristos 3469*b5677b36Schristos # Not sure whether something based on 3470*b5677b36Schristos # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 3471*b5677b36Schristos # would be better. 3472*b5677b36Schristos output_verbose_link_cmd='echo' 3473*b5677b36Schristos 3474*b5677b36Schristos # Archives containing C++ object files must be created using 3475*b5677b36Schristos # "CC -xar", where "CC" is the Sun C++ compiler. This is 3476*b5677b36Schristos # necessary to make sure instantiated templates are included 3477*b5677b36Schristos # in the archive. 3478*b5677b36Schristos _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 3479*b5677b36Schristos ;; 3480*b5677b36Schristos esac 3481*b5677b36Schristos ;; 3482*b5677b36Schristos esac 3483*b5677b36Schristos ;; 3484*b5677b36Schristos lynxos*) 3485*b5677b36Schristos # FIXME: insert proper C++ library support 3486*b5677b36Schristos _LT_AC_TAGVAR(ld_shlibs, $1)=no 3487*b5677b36Schristos ;; 3488*b5677b36Schristos m88k*) 3489*b5677b36Schristos # FIXME: insert proper C++ library support 3490*b5677b36Schristos _LT_AC_TAGVAR(ld_shlibs, $1)=no 3491*b5677b36Schristos ;; 3492*b5677b36Schristos mvs*) 3493*b5677b36Schristos case $cc_basename in 3494*b5677b36Schristos cxx*) 3495*b5677b36Schristos # FIXME: insert proper C++ library support 3496*b5677b36Schristos _LT_AC_TAGVAR(ld_shlibs, $1)=no 3497*b5677b36Schristos ;; 3498*b5677b36Schristos *) 3499*b5677b36Schristos # FIXME: insert proper C++ library support 3500*b5677b36Schristos _LT_AC_TAGVAR(ld_shlibs, $1)=no 3501*b5677b36Schristos ;; 3502*b5677b36Schristos esac 3503*b5677b36Schristos ;; 3504*b5677b36Schristos netbsd*) 3505*b5677b36Schristos if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then 3506*b5677b36Schristos _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 3507*b5677b36Schristos wlarc= 3508*b5677b36Schristos _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 3509*b5677b36Schristos _LT_AC_TAGVAR(hardcode_direct, $1)=yes 3510*b5677b36Schristos _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 3511*b5677b36Schristos fi 3512*b5677b36Schristos # Workaround some broken pre-1.5 toolchains 3513*b5677b36Schristos output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 3514*b5677b36Schristos ;; 3515*b5677b36Schristos openbsd2*) 3516*b5677b36Schristos # C++ shared libraries are fairly broken 3517*b5677b36Schristos _LT_AC_TAGVAR(ld_shlibs, $1)=no 3518*b5677b36Schristos ;; 3519*b5677b36Schristos openbsd*) 3520*b5677b36Schristos if test -f /usr/libexec/ld.so; then 3521*b5677b36Schristos _LT_AC_TAGVAR(hardcode_direct, $1)=yes 3522*b5677b36Schristos _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 3523*b5677b36Schristos _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 3524*b5677b36Schristos _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 3525*b5677b36Schristos if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 3526*b5677b36Schristos _LT_AC_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' 3527*b5677b36Schristos _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 3528*b5677b36Schristos _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 3529*b5677b36Schristos fi 3530*b5677b36Schristos output_verbose_link_cmd='echo' 3531*b5677b36Schristos else 3532*b5677b36Schristos _LT_AC_TAGVAR(ld_shlibs, $1)=no 3533*b5677b36Schristos fi 3534*b5677b36Schristos ;; 3535*b5677b36Schristos osf3*) 3536*b5677b36Schristos case $cc_basename in 3537*b5677b36Schristos KCC*) 3538*b5677b36Schristos # Kuck and Associates, Inc. (KAI) C++ Compiler 3539*b5677b36Schristos 3540*b5677b36Schristos # KCC will only create a shared library if the output file 3541*b5677b36Schristos # ends with ".so" (or ".sl" for HP-UX), so rename the library 3542*b5677b36Schristos # to its proper name (with version) after linking. 3543*b5677b36Schristos _LT_AC_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' 3544*b5677b36Schristos 3545*b5677b36Schristos _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 3546*b5677b36Schristos _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 3547*b5677b36Schristos 3548*b5677b36Schristos # Archives containing C++ object files must be created using 3549*b5677b36Schristos # "CC -Bstatic", where "CC" is the KAI C++ compiler. 3550*b5677b36Schristos _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 3551*b5677b36Schristos 3552*b5677b36Schristos ;; 3553*b5677b36Schristos RCC*) 3554*b5677b36Schristos # Rational C++ 2.4.1 3555*b5677b36Schristos # FIXME: insert proper C++ library support 3556*b5677b36Schristos _LT_AC_TAGVAR(ld_shlibs, $1)=no 3557*b5677b36Schristos ;; 3558*b5677b36Schristos cxx*) 3559*b5677b36Schristos _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 3560*b5677b36Schristos _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' 3561*b5677b36Schristos 3562*b5677b36Schristos _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 3563*b5677b36Schristos _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 3564*b5677b36Schristos 3565*b5677b36Schristos # Commands to make compiler produce verbose output that lists 3566*b5677b36Schristos # what "hidden" libraries, object files and flags are used when 3567*b5677b36Schristos # linking a shared library. 3568*b5677b36Schristos # 3569*b5677b36Schristos # There doesn't appear to be a way to prevent this compiler from 3570*b5677b36Schristos # explicitly linking system object files so we need to strip them 3571*b5677b36Schristos # from the output so that they don't get included in the library 3572*b5677b36Schristos # dependencies. 3573*b5677b36Schristos output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $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; echo $list' 3574*b5677b36Schristos ;; 3575*b5677b36Schristos *) 3576*b5677b36Schristos if test "$GXX" = yes && test "$with_gnu_ld" = no; then 3577*b5677b36Schristos _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 3578*b5677b36Schristos _LT_AC_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" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 3579*b5677b36Schristos 3580*b5677b36Schristos _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 3581*b5677b36Schristos _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 3582*b5677b36Schristos 3583*b5677b36Schristos # Commands to make compiler produce verbose output that lists 3584*b5677b36Schristos # what "hidden" libraries, object files and flags are used when 3585*b5677b36Schristos # linking a shared library. 3586*b5677b36Schristos output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' 3587*b5677b36Schristos 3588*b5677b36Schristos else 3589*b5677b36Schristos # FIXME: insert proper C++ library support 3590*b5677b36Schristos _LT_AC_TAGVAR(ld_shlibs, $1)=no 3591*b5677b36Schristos fi 3592*b5677b36Schristos ;; 3593*b5677b36Schristos esac 3594*b5677b36Schristos ;; 3595*b5677b36Schristos osf4* | osf5*) 3596*b5677b36Schristos case $cc_basename in 3597*b5677b36Schristos KCC*) 3598*b5677b36Schristos # Kuck and Associates, Inc. (KAI) C++ Compiler 3599*b5677b36Schristos 3600*b5677b36Schristos # KCC will only create a shared library if the output file 3601*b5677b36Schristos # ends with ".so" (or ".sl" for HP-UX), so rename the library 3602*b5677b36Schristos # to its proper name (with version) after linking. 3603*b5677b36Schristos _LT_AC_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' 3604*b5677b36Schristos 3605*b5677b36Schristos _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 3606*b5677b36Schristos _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 3607*b5677b36Schristos 3608*b5677b36Schristos # Archives containing C++ object files must be created using 3609*b5677b36Schristos # the KAI C++ compiler. 3610*b5677b36Schristos _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' 3611*b5677b36Schristos ;; 3612*b5677b36Schristos RCC*) 3613*b5677b36Schristos # Rational C++ 2.4.1 3614*b5677b36Schristos # FIXME: insert proper C++ library support 3615*b5677b36Schristos _LT_AC_TAGVAR(ld_shlibs, $1)=no 3616*b5677b36Schristos ;; 3617*b5677b36Schristos cxx*) 3618*b5677b36Schristos _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 3619*b5677b36Schristos _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' 3620*b5677b36Schristos _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 3621*b5677b36Schristos echo "-hidden">> $lib.exp~ 3622*b5677b36Schristos $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~ 3623*b5677b36Schristos $rm $lib.exp' 3624*b5677b36Schristos 3625*b5677b36Schristos _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 3626*b5677b36Schristos _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 3627*b5677b36Schristos 3628*b5677b36Schristos # Commands to make compiler produce verbose output that lists 3629*b5677b36Schristos # what "hidden" libraries, object files and flags are used when 3630*b5677b36Schristos # linking a shared library. 3631*b5677b36Schristos # 3632*b5677b36Schristos # There doesn't appear to be a way to prevent this compiler from 3633*b5677b36Schristos # explicitly linking system object files so we need to strip them 3634*b5677b36Schristos # from the output so that they don't get included in the library 3635*b5677b36Schristos # dependencies. 3636*b5677b36Schristos output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $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; echo $list' 3637*b5677b36Schristos ;; 3638*b5677b36Schristos *) 3639*b5677b36Schristos if test "$GXX" = yes && test "$with_gnu_ld" = no; then 3640*b5677b36Schristos _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 3641*b5677b36Schristos _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 3642*b5677b36Schristos 3643*b5677b36Schristos _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 3644*b5677b36Schristos _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 3645*b5677b36Schristos 3646*b5677b36Schristos # Commands to make compiler produce verbose output that lists 3647*b5677b36Schristos # what "hidden" libraries, object files and flags are used when 3648*b5677b36Schristos # linking a shared library. 3649*b5677b36Schristos output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' 3650*b5677b36Schristos 3651*b5677b36Schristos else 3652*b5677b36Schristos # FIXME: insert proper C++ library support 3653*b5677b36Schristos _LT_AC_TAGVAR(ld_shlibs, $1)=no 3654*b5677b36Schristos fi 3655*b5677b36Schristos ;; 3656*b5677b36Schristos esac 3657*b5677b36Schristos ;; 3658*b5677b36Schristos psos*) 3659*b5677b36Schristos # FIXME: insert proper C++ library support 3660*b5677b36Schristos _LT_AC_TAGVAR(ld_shlibs, $1)=no 3661*b5677b36Schristos ;; 3662*b5677b36Schristos sunos4*) 3663*b5677b36Schristos case $cc_basename in 3664*b5677b36Schristos CC*) 3665*b5677b36Schristos # Sun C++ 4.x 3666*b5677b36Schristos # FIXME: insert proper C++ library support 3667*b5677b36Schristos _LT_AC_TAGVAR(ld_shlibs, $1)=no 3668*b5677b36Schristos ;; 3669*b5677b36Schristos lcc*) 3670*b5677b36Schristos # Lucid 3671*b5677b36Schristos # FIXME: insert proper C++ library support 3672*b5677b36Schristos _LT_AC_TAGVAR(ld_shlibs, $1)=no 3673*b5677b36Schristos ;; 3674*b5677b36Schristos *) 3675*b5677b36Schristos # FIXME: insert proper C++ library support 3676*b5677b36Schristos _LT_AC_TAGVAR(ld_shlibs, $1)=no 3677*b5677b36Schristos ;; 3678*b5677b36Schristos esac 3679*b5677b36Schristos ;; 3680*b5677b36Schristos solaris*) 3681*b5677b36Schristos case $cc_basename in 3682*b5677b36Schristos CC*) 3683*b5677b36Schristos # Sun C++ 4.2, 5.x and Centerline C++ 3684*b5677b36Schristos _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes 3685*b5677b36Schristos _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' 3686*b5677b36Schristos _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 3687*b5677b36Schristos _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 3688*b5677b36Schristos $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' 3689*b5677b36Schristos 3690*b5677b36Schristos _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 3691*b5677b36Schristos _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 3692*b5677b36Schristos case $host_os in 3693*b5677b36Schristos solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 3694*b5677b36Schristos *) 3695*b5677b36Schristos # The compiler driver will combine and reorder linker options, 3696*b5677b36Schristos # but understands `-z linker_flag'. 3697*b5677b36Schristos # Supported since Solaris 2.6 (maybe 2.5.1?) 3698*b5677b36Schristos _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 3699*b5677b36Schristos ;; 3700*b5677b36Schristos esac 3701*b5677b36Schristos _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 3702*b5677b36Schristos 3703*b5677b36Schristos output_verbose_link_cmd='echo' 3704*b5677b36Schristos 3705*b5677b36Schristos # Archives containing C++ object files must be created using 3706*b5677b36Schristos # "CC -xar", where "CC" is the Sun C++ compiler. This is 3707*b5677b36Schristos # necessary to make sure instantiated templates are included 3708*b5677b36Schristos # in the archive. 3709*b5677b36Schristos _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 3710*b5677b36Schristos ;; 3711*b5677b36Schristos gcx*) 3712*b5677b36Schristos # Green Hills C++ Compiler 3713*b5677b36Schristos _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 3714*b5677b36Schristos 3715*b5677b36Schristos # The C++ compiler must be used to create the archive. 3716*b5677b36Schristos _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 3717*b5677b36Schristos ;; 3718*b5677b36Schristos *) 3719*b5677b36Schristos # GNU C++ compiler with Solaris linker 3720*b5677b36Schristos if test "$GXX" = yes && test "$with_gnu_ld" = no; then 3721*b5677b36Schristos _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' 3722*b5677b36Schristos if $CC --version | grep -v '^2\.7' > /dev/null; then 3723*b5677b36Schristos _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 3724*b5677b36Schristos _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 3725*b5677b36Schristos $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' 3726*b5677b36Schristos 3727*b5677b36Schristos # Commands to make compiler produce verbose output that lists 3728*b5677b36Schristos # what "hidden" libraries, object files and flags are used when 3729*b5677b36Schristos # linking a shared library. 3730*b5677b36Schristos output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" 3731*b5677b36Schristos else 3732*b5677b36Schristos # g++ 2.7 appears to require `-G' NOT `-shared' on this 3733*b5677b36Schristos # platform. 3734*b5677b36Schristos _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 3735*b5677b36Schristos _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 3736*b5677b36Schristos $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' 3737*b5677b36Schristos 3738*b5677b36Schristos # Commands to make compiler produce verbose output that lists 3739*b5677b36Schristos # what "hidden" libraries, object files and flags are used when 3740*b5677b36Schristos # linking a shared library. 3741*b5677b36Schristos output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" 3742*b5677b36Schristos fi 3743*b5677b36Schristos 3744*b5677b36Schristos _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' 3745*b5677b36Schristos case $host_os in 3746*b5677b36Schristos solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 3747*b5677b36Schristos *) 3748*b5677b36Schristos _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 3749*b5677b36Schristos ;; 3750*b5677b36Schristos esac 3751*b5677b36Schristos fi 3752*b5677b36Schristos ;; 3753*b5677b36Schristos esac 3754*b5677b36Schristos ;; 3755*b5677b36Schristos sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 3756*b5677b36Schristos _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 3757*b5677b36Schristos _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 3758*b5677b36Schristos _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 3759*b5677b36Schristos runpath_var='LD_RUN_PATH' 3760*b5677b36Schristos 3761*b5677b36Schristos case $cc_basename in 3762*b5677b36Schristos CC*) 3763*b5677b36Schristos _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 3764*b5677b36Schristos _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 3765*b5677b36Schristos ;; 3766*b5677b36Schristos *) 3767*b5677b36Schristos _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 3768*b5677b36Schristos _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 3769*b5677b36Schristos ;; 3770*b5677b36Schristos esac 3771*b5677b36Schristos ;; 3772*b5677b36Schristos sysv5* | sco3.2v5* | sco5v6*) 3773*b5677b36Schristos # Note: We can NOT use -z defs as we might desire, because we do not 3774*b5677b36Schristos # link with -lc, and that would cause any symbols used from libc to 3775*b5677b36Schristos # always be unresolved, which means just about no library would 3776*b5677b36Schristos # ever link correctly. If we're not using GNU ld we use -z text 3777*b5677b36Schristos # though, which does catch some bad symbols but isn't as heavy-handed 3778*b5677b36Schristos # as -z defs. 3779*b5677b36Schristos # For security reasons, it is highly recommended that you always 3780*b5677b36Schristos # use absolute paths for naming shared libraries, and exclude the 3781*b5677b36Schristos # DT_RUNPATH tag from executables and libraries. But doing so 3782*b5677b36Schristos # requires that you compile everything twice, which is a pain. 3783*b5677b36Schristos # So that behaviour is only enabled if SCOABSPATH is set to a 3784*b5677b36Schristos # non-empty value in the environment. Most likely only useful for 3785*b5677b36Schristos # creating official distributions of packages. 3786*b5677b36Schristos # This is a hack until libtool officially supports absolute path 3787*b5677b36Schristos # names for shared libraries. 3788*b5677b36Schristos _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 3789*b5677b36Schristos _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 3790*b5677b36Schristos _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 3791*b5677b36Schristos _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 3792*b5677b36Schristos _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' 3793*b5677b36Schristos _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' 3794*b5677b36Schristos _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 3795*b5677b36Schristos _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 3796*b5677b36Schristos runpath_var='LD_RUN_PATH' 3797*b5677b36Schristos 3798*b5677b36Schristos case $cc_basename in 3799*b5677b36Schristos CC*) 3800*b5677b36Schristos _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' 3801*b5677b36Schristos _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' 3802*b5677b36Schristos ;; 3803*b5677b36Schristos *) 3804*b5677b36Schristos _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' 3805*b5677b36Schristos _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' 3806*b5677b36Schristos ;; 3807*b5677b36Schristos esac 3808*b5677b36Schristos ;; 3809*b5677b36Schristos tandem*) 3810*b5677b36Schristos case $cc_basename in 3811*b5677b36Schristos NCC*) 3812*b5677b36Schristos # NonStop-UX NCC 3.20 3813*b5677b36Schristos # FIXME: insert proper C++ library support 3814*b5677b36Schristos _LT_AC_TAGVAR(ld_shlibs, $1)=no 3815*b5677b36Schristos ;; 3816*b5677b36Schristos *) 3817*b5677b36Schristos # FIXME: insert proper C++ library support 3818*b5677b36Schristos _LT_AC_TAGVAR(ld_shlibs, $1)=no 3819*b5677b36Schristos ;; 3820*b5677b36Schristos esac 3821*b5677b36Schristos ;; 3822*b5677b36Schristos vxworks*) 3823*b5677b36Schristos # FIXME: insert proper C++ library support 3824*b5677b36Schristos _LT_AC_TAGVAR(ld_shlibs, $1)=no 3825*b5677b36Schristos ;; 3826*b5677b36Schristos *) 3827*b5677b36Schristos # FIXME: insert proper C++ library support 3828*b5677b36Schristos _LT_AC_TAGVAR(ld_shlibs, $1)=no 3829*b5677b36Schristos ;; 3830*b5677b36Schristosesac 3831*b5677b36SchristosAC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) 3832*b5677b36Schristostest "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 3833*b5677b36Schristos 3834*b5677b36Schristos_LT_AC_TAGVAR(GCC, $1)="$GXX" 3835*b5677b36Schristos_LT_AC_TAGVAR(LD, $1)="$LD" 3836*b5677b36Schristos 3837*b5677b36Schristos## CAVEAT EMPTOR: 3838*b5677b36Schristos## There is no encapsulation within the following macros, do not change 3839*b5677b36Schristos## the running order or otherwise move them around unless you know exactly 3840*b5677b36Schristos## what you are doing... 3841*b5677b36SchristosAC_LIBTOOL_POSTDEP_PREDEP($1) 3842*b5677b36SchristosAC_LIBTOOL_PROG_COMPILER_PIC($1) 3843*b5677b36SchristosAC_LIBTOOL_PROG_CC_C_O($1) 3844*b5677b36SchristosAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) 3845*b5677b36SchristosAC_LIBTOOL_PROG_LD_SHLIBS($1) 3846*b5677b36SchristosAC_LIBTOOL_SYS_DYNAMIC_LINKER($1) 3847*b5677b36SchristosAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) 3848*b5677b36Schristos 3849*b5677b36SchristosAC_LIBTOOL_CONFIG($1) 3850*b5677b36Schristos 3851*b5677b36SchristosAC_LANG_POP 3852*b5677b36SchristosCC=$lt_save_CC 3853*b5677b36SchristosLDCXX=$LD 3854*b5677b36SchristosLD=$lt_save_LD 3855*b5677b36SchristosGCC=$lt_save_GCC 3856*b5677b36Schristoswith_gnu_ldcxx=$with_gnu_ld 3857*b5677b36Schristoswith_gnu_ld=$lt_save_with_gnu_ld 3858*b5677b36Schristoslt_cv_path_LDCXX=$lt_cv_path_LD 3859*b5677b36Schristoslt_cv_path_LD=$lt_save_path_LD 3860*b5677b36Schristoslt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 3861*b5677b36Schristoslt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 3862*b5677b36Schristos])# AC_LIBTOOL_LANG_CXX_CONFIG 3863*b5677b36Schristos 3864*b5677b36Schristos# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME]) 3865*b5677b36Schristos# ------------------------------------ 3866*b5677b36Schristos# Figure out "hidden" library dependencies from verbose 3867*b5677b36Schristos# compiler output when linking a shared library. 3868*b5677b36Schristos# Parse the compiler output and extract the necessary 3869*b5677b36Schristos# objects, libraries and library flags. 3870*b5677b36SchristosAC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP], 3871*b5677b36Schristos[AC_REQUIRE([LT_AC_PROG_SED])dnl 3872*b5677b36Schristosdnl we can't use the lt_simple_compile_test_code here, 3873*b5677b36Schristosdnl because it contains code intended for an executable, 3874*b5677b36Schristosdnl not a library. It's possible we should let each 3875*b5677b36Schristosdnl tag define a new lt_????_link_test_code variable, 3876*b5677b36Schristosdnl but it's only used here... 3877*b5677b36Schristosifelse([$1],[],[cat > conftest.$ac_ext <<EOF 3878*b5677b36Schristosint a; 3879*b5677b36Schristosvoid foo (void) { a = 0; } 3880*b5677b36SchristosEOF 3881*b5677b36Schristos],[$1],[CXX],[cat > conftest.$ac_ext <<EOF 3882*b5677b36Schristosclass Foo 3883*b5677b36Schristos{ 3884*b5677b36Schristospublic: 3885*b5677b36Schristos Foo (void) { a = 0; } 3886*b5677b36Schristosprivate: 3887*b5677b36Schristos int a; 3888*b5677b36Schristos}; 3889*b5677b36SchristosEOF 3890*b5677b36Schristos],[$1],[F77],[cat > conftest.$ac_ext <<EOF 3891*b5677b36Schristos subroutine foo 3892*b5677b36Schristos implicit none 3893*b5677b36Schristos integer*4 a 3894*b5677b36Schristos a=0 3895*b5677b36Schristos return 3896*b5677b36Schristos end 3897*b5677b36SchristosEOF 3898*b5677b36Schristos],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF 3899*b5677b36Schristospublic class foo { 3900*b5677b36Schristos private int a; 3901*b5677b36Schristos public void bar (void) { 3902*b5677b36Schristos a = 0; 3903*b5677b36Schristos } 3904*b5677b36Schristos}; 3905*b5677b36SchristosEOF 3906*b5677b36Schristos]) 3907*b5677b36Schristosdnl Parse the compiler output and extract the necessary 3908*b5677b36Schristosdnl objects, libraries and library flags. 3909*b5677b36Schristosif AC_TRY_EVAL(ac_compile); then 3910*b5677b36Schristos # Parse the compiler output and extract the necessary 3911*b5677b36Schristos # objects, libraries and library flags. 3912*b5677b36Schristos 3913*b5677b36Schristos # Sentinel used to keep track of whether or not we are before 3914*b5677b36Schristos # the conftest object file. 3915*b5677b36Schristos pre_test_object_deps_done=no 3916*b5677b36Schristos 3917*b5677b36Schristos # The `*' in the case matches for architectures that use `case' in 3918*b5677b36Schristos # $output_verbose_cmd can trigger glob expansion during the loop 3919*b5677b36Schristos # eval without this substitution. 3920*b5677b36Schristos output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"` 3921*b5677b36Schristos 3922*b5677b36Schristos for p in `eval $output_verbose_link_cmd`; do 3923*b5677b36Schristos case $p in 3924*b5677b36Schristos 3925*b5677b36Schristos -L* | -R* | -l*) 3926*b5677b36Schristos # Some compilers place space between "-{L,R}" and the path. 3927*b5677b36Schristos # Remove the space. 3928*b5677b36Schristos if test $p = "-L" \ 3929*b5677b36Schristos || test $p = "-R"; then 3930*b5677b36Schristos prev=$p 3931*b5677b36Schristos continue 3932*b5677b36Schristos else 3933*b5677b36Schristos prev= 3934*b5677b36Schristos fi 3935*b5677b36Schristos 3936*b5677b36Schristos if test "$pre_test_object_deps_done" = no; then 3937*b5677b36Schristos case $p in 3938*b5677b36Schristos -L* | -R*) 3939*b5677b36Schristos # Internal compiler library paths should come after those 3940*b5677b36Schristos # provided the user. The postdeps already come after the 3941*b5677b36Schristos # user supplied libs so there is no need to process them. 3942*b5677b36Schristos if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then 3943*b5677b36Schristos _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" 3944*b5677b36Schristos else 3945*b5677b36Schristos _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" 3946*b5677b36Schristos fi 3947*b5677b36Schristos ;; 3948*b5677b36Schristos # The "-l" case would never come before the object being 3949*b5677b36Schristos # linked, so don't bother handling this case. 3950*b5677b36Schristos esac 3951*b5677b36Schristos else 3952*b5677b36Schristos if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then 3953*b5677b36Schristos _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}" 3954*b5677b36Schristos else 3955*b5677b36Schristos _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}" 3956*b5677b36Schristos fi 3957*b5677b36Schristos fi 3958*b5677b36Schristos ;; 3959*b5677b36Schristos 3960*b5677b36Schristos *.$objext) 3961*b5677b36Schristos # This assumes that the test object file only shows up 3962*b5677b36Schristos # once in the compiler output. 3963*b5677b36Schristos if test "$p" = "conftest.$objext"; then 3964*b5677b36Schristos pre_test_object_deps_done=yes 3965*b5677b36Schristos continue 3966*b5677b36Schristos fi 3967*b5677b36Schristos 3968*b5677b36Schristos if test "$pre_test_object_deps_done" = no; then 3969*b5677b36Schristos if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then 3970*b5677b36Schristos _LT_AC_TAGVAR(predep_objects, $1)="$p" 3971*b5677b36Schristos else 3972*b5677b36Schristos _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p" 3973*b5677b36Schristos fi 3974*b5677b36Schristos else 3975*b5677b36Schristos if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then 3976*b5677b36Schristos _LT_AC_TAGVAR(postdep_objects, $1)="$p" 3977*b5677b36Schristos else 3978*b5677b36Schristos _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p" 3979*b5677b36Schristos fi 3980*b5677b36Schristos fi 3981*b5677b36Schristos ;; 3982*b5677b36Schristos 3983*b5677b36Schristos *) ;; # Ignore the rest. 3984*b5677b36Schristos 3985*b5677b36Schristos esac 3986*b5677b36Schristos done 3987*b5677b36Schristos 3988*b5677b36Schristos # Clean up. 3989*b5677b36Schristos rm -f a.out a.exe 3990*b5677b36Schristoselse 3991*b5677b36Schristos echo "libtool.m4: error: problem compiling $1 test program" 3992*b5677b36Schristosfi 3993*b5677b36Schristos 3994*b5677b36Schristos$rm -f confest.$objext 3995*b5677b36Schristos 3996*b5677b36Schristos_LT_AC_TAGVAR(compiler_lib_search_dirs, $1)= 3997*b5677b36Schristosif test -n "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then 3998*b5677b36Schristos _LT_AC_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_AC_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` 3999*b5677b36Schristosfi 4000*b5677b36Schristos 4001*b5677b36Schristos# PORTME: override above test on systems where it is broken 4002*b5677b36Schristosifelse([$1],[CXX], 4003*b5677b36Schristos[case $host_os in 4004*b5677b36Schristosinterix[[3-9]]*) 4005*b5677b36Schristos # Interix 3.5 installs completely hosed .la files for C++, so rather than 4006*b5677b36Schristos # hack all around it, let's just trust "g++" to DTRT. 4007*b5677b36Schristos _LT_AC_TAGVAR(predep_objects,$1)= 4008*b5677b36Schristos _LT_AC_TAGVAR(postdep_objects,$1)= 4009*b5677b36Schristos _LT_AC_TAGVAR(postdeps,$1)= 4010*b5677b36Schristos ;; 4011*b5677b36Schristos 4012*b5677b36Schristoslinux*) 4013*b5677b36Schristos case `$CC -V 2>&1 | sed 5q` in 4014*b5677b36Schristos *Sun\ C*) 4015*b5677b36Schristos # Sun C++ 5.9 4016*b5677b36Schristos # 4017*b5677b36Schristos # The more standards-conforming stlport4 library is 4018*b5677b36Schristos # incompatible with the Cstd library. Avoid specifying 4019*b5677b36Schristos # it if it's in CXXFLAGS. Ignore libCrun as 4020*b5677b36Schristos # -library=stlport4 depends on it. 4021*b5677b36Schristos case " $CXX $CXXFLAGS " in 4022*b5677b36Schristos *" -library=stlport4 "*) 4023*b5677b36Schristos solaris_use_stlport4=yes 4024*b5677b36Schristos ;; 4025*b5677b36Schristos esac 4026*b5677b36Schristos if test "$solaris_use_stlport4" != yes; then 4027*b5677b36Schristos _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 4028*b5677b36Schristos fi 4029*b5677b36Schristos ;; 4030*b5677b36Schristos esac 4031*b5677b36Schristos ;; 4032*b5677b36Schristos 4033*b5677b36Schristossolaris*) 4034*b5677b36Schristos case $cc_basename in 4035*b5677b36Schristos CC*) 4036*b5677b36Schristos # The more standards-conforming stlport4 library is 4037*b5677b36Schristos # incompatible with the Cstd library. Avoid specifying 4038*b5677b36Schristos # it if it's in CXXFLAGS. Ignore libCrun as 4039*b5677b36Schristos # -library=stlport4 depends on it. 4040*b5677b36Schristos case " $CXX $CXXFLAGS " in 4041*b5677b36Schristos *" -library=stlport4 "*) 4042*b5677b36Schristos solaris_use_stlport4=yes 4043*b5677b36Schristos ;; 4044*b5677b36Schristos esac 4045*b5677b36Schristos 4046*b5677b36Schristos # Adding this requires a known-good setup of shared libraries for 4047*b5677b36Schristos # Sun compiler versions before 5.6, else PIC objects from an old 4048*b5677b36Schristos # archive will be linked into the output, leading to subtle bugs. 4049*b5677b36Schristos if test "$solaris_use_stlport4" != yes; then 4050*b5677b36Schristos _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 4051*b5677b36Schristos fi 4052*b5677b36Schristos ;; 4053*b5677b36Schristos esac 4054*b5677b36Schristos ;; 4055*b5677b36Schristosesac 4056*b5677b36Schristos]) 4057*b5677b36Schristoscase " $_LT_AC_TAGVAR(postdeps, $1) " in 4058*b5677b36Schristos*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;; 4059*b5677b36Schristosesac 4060*b5677b36Schristos])# AC_LIBTOOL_POSTDEP_PREDEP 4061*b5677b36Schristos 4062*b5677b36Schristos# AC_LIBTOOL_LANG_F77_CONFIG 4063*b5677b36Schristos# -------------------------- 4064*b5677b36Schristos# Ensure that the configuration vars for the C compiler are 4065*b5677b36Schristos# suitably defined. Those variables are subsequently used by 4066*b5677b36Schristos# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 4067*b5677b36SchristosAC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)]) 4068*b5677b36SchristosAC_DEFUN([_LT_AC_LANG_F77_CONFIG], 4069*b5677b36Schristos[AC_REQUIRE([AC_PROG_F77]) 4070*b5677b36SchristosAC_LANG_PUSH(Fortran 77) 4071*b5677b36Schristos 4072*b5677b36Schristos_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 4073*b5677b36Schristos_LT_AC_TAGVAR(allow_undefined_flag, $1)= 4074*b5677b36Schristos_LT_AC_TAGVAR(always_export_symbols, $1)=no 4075*b5677b36Schristos_LT_AC_TAGVAR(archive_expsym_cmds, $1)= 4076*b5677b36Schristos_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= 4077*b5677b36Schristos_LT_AC_TAGVAR(hardcode_direct, $1)=no 4078*b5677b36Schristos_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= 4079*b5677b36Schristos_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 4080*b5677b36Schristos_LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 4081*b5677b36Schristos_LT_AC_TAGVAR(hardcode_minus_L, $1)=no 4082*b5677b36Schristos_LT_AC_TAGVAR(hardcode_automatic, $1)=no 4083*b5677b36Schristos_LT_AC_TAGVAR(module_cmds, $1)= 4084*b5677b36Schristos_LT_AC_TAGVAR(module_expsym_cmds, $1)= 4085*b5677b36Schristos_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown 4086*b5677b36Schristos_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 4087*b5677b36Schristos_LT_AC_TAGVAR(no_undefined_flag, $1)= 4088*b5677b36Schristos_LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 4089*b5677b36Schristos_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no 4090*b5677b36Schristos 4091*b5677b36Schristos# Source file extension for f77 test sources. 4092*b5677b36Schristosac_ext=f 4093*b5677b36Schristos 4094*b5677b36Schristos# Object file extension for compiled f77 test sources. 4095*b5677b36Schristosobjext=o 4096*b5677b36Schristos_LT_AC_TAGVAR(objext, $1)=$objext 4097*b5677b36Schristos 4098*b5677b36Schristos# Code to be used in simple compile tests 4099*b5677b36Schristoslt_simple_compile_test_code="\ 4100*b5677b36Schristos subroutine t 4101*b5677b36Schristos return 4102*b5677b36Schristos end 4103*b5677b36Schristos" 4104*b5677b36Schristos 4105*b5677b36Schristos# Code to be used in simple link tests 4106*b5677b36Schristoslt_simple_link_test_code="\ 4107*b5677b36Schristos program t 4108*b5677b36Schristos end 4109*b5677b36Schristos" 4110*b5677b36Schristos 4111*b5677b36Schristos# ltmain only uses $CC for tagged configurations so make sure $CC is set. 4112*b5677b36Schristos_LT_AC_SYS_COMPILER 4113*b5677b36Schristos 4114*b5677b36Schristos# save warnings/boilerplate of simple test code 4115*b5677b36Schristos_LT_COMPILER_BOILERPLATE 4116*b5677b36Schristos_LT_LINKER_BOILERPLATE 4117*b5677b36Schristos 4118*b5677b36Schristos# Allow CC to be a program name with arguments. 4119*b5677b36Schristoslt_save_CC="$CC" 4120*b5677b36SchristosCC=${F77-"f77"} 4121*b5677b36Schristoscompiler=$CC 4122*b5677b36Schristos_LT_AC_TAGVAR(compiler, $1)=$CC 4123*b5677b36Schristos_LT_CC_BASENAME([$compiler]) 4124*b5677b36Schristos 4125*b5677b36SchristosAC_MSG_CHECKING([if libtool supports shared libraries]) 4126*b5677b36SchristosAC_MSG_RESULT([$can_build_shared]) 4127*b5677b36Schristos 4128*b5677b36SchristosAC_MSG_CHECKING([whether to build shared libraries]) 4129*b5677b36Schristostest "$can_build_shared" = "no" && enable_shared=no 4130*b5677b36Schristos 4131*b5677b36Schristos# On AIX, shared libraries and static libraries use the same namespace, and 4132*b5677b36Schristos# are all built from PIC. 4133*b5677b36Schristoscase $host_os in 4134*b5677b36Schristosaix3*) 4135*b5677b36Schristos test "$enable_shared" = yes && enable_static=no 4136*b5677b36Schristos if test -n "$RANLIB"; then 4137*b5677b36Schristos archive_cmds="$archive_cmds~\$RANLIB \$lib" 4138*b5677b36Schristos postinstall_cmds='$RANLIB $lib' 4139*b5677b36Schristos fi 4140*b5677b36Schristos ;; 4141*b5677b36Schristosaix[[4-9]]*) 4142*b5677b36Schristos if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 4143*b5677b36Schristos test "$enable_shared" = yes && enable_static=no 4144*b5677b36Schristos fi 4145*b5677b36Schristos ;; 4146*b5677b36Schristosesac 4147*b5677b36SchristosAC_MSG_RESULT([$enable_shared]) 4148*b5677b36Schristos 4149*b5677b36SchristosAC_MSG_CHECKING([whether to build static libraries]) 4150*b5677b36Schristos# Make sure either enable_shared or enable_static is yes. 4151*b5677b36Schristostest "$enable_shared" = yes || enable_static=yes 4152*b5677b36SchristosAC_MSG_RESULT([$enable_static]) 4153*b5677b36Schristos 4154*b5677b36Schristos_LT_AC_TAGVAR(GCC, $1)="$G77" 4155*b5677b36Schristos_LT_AC_TAGVAR(LD, $1)="$LD" 4156*b5677b36Schristos 4157*b5677b36SchristosAC_LIBTOOL_PROG_COMPILER_PIC($1) 4158*b5677b36SchristosAC_LIBTOOL_PROG_CC_C_O($1) 4159*b5677b36SchristosAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) 4160*b5677b36SchristosAC_LIBTOOL_PROG_LD_SHLIBS($1) 4161*b5677b36SchristosAC_LIBTOOL_SYS_DYNAMIC_LINKER($1) 4162*b5677b36SchristosAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) 4163*b5677b36Schristos 4164*b5677b36SchristosAC_LIBTOOL_CONFIG($1) 4165*b5677b36Schristos 4166*b5677b36SchristosAC_LANG_POP 4167*b5677b36SchristosCC="$lt_save_CC" 4168*b5677b36Schristos])# AC_LIBTOOL_LANG_F77_CONFIG 4169*b5677b36Schristos 4170*b5677b36Schristos 4171*b5677b36Schristos# AC_LIBTOOL_LANG_GCJ_CONFIG 4172*b5677b36Schristos# -------------------------- 4173*b5677b36Schristos# Ensure that the configuration vars for the C compiler are 4174*b5677b36Schristos# suitably defined. Those variables are subsequently used by 4175*b5677b36Schristos# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 4176*b5677b36SchristosAC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)]) 4177*b5677b36SchristosAC_DEFUN([_LT_AC_LANG_GCJ_CONFIG], 4178*b5677b36Schristos[AC_LANG_SAVE 4179*b5677b36Schristos 4180*b5677b36Schristos# Source file extension for Java test sources. 4181*b5677b36Schristosac_ext=java 4182*b5677b36Schristos 4183*b5677b36Schristos# Object file extension for compiled Java test sources. 4184*b5677b36Schristosobjext=o 4185*b5677b36Schristos_LT_AC_TAGVAR(objext, $1)=$objext 4186*b5677b36Schristos 4187*b5677b36Schristos# Code to be used in simple compile tests 4188*b5677b36Schristoslt_simple_compile_test_code="class foo {}" 4189*b5677b36Schristos 4190*b5677b36Schristos# Code to be used in simple link tests 4191*b5677b36Schristoslt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 4192*b5677b36Schristos 4193*b5677b36Schristos# ltmain only uses $CC for tagged configurations so make sure $CC is set. 4194*b5677b36Schristos_LT_AC_SYS_COMPILER 4195*b5677b36Schristos 4196*b5677b36Schristos# save warnings/boilerplate of simple test code 4197*b5677b36Schristos_LT_COMPILER_BOILERPLATE 4198*b5677b36Schristos_LT_LINKER_BOILERPLATE 4199*b5677b36Schristos 4200*b5677b36Schristos# Allow CC to be a program name with arguments. 4201*b5677b36Schristoslt_save_CC="$CC" 4202*b5677b36SchristosCC=${GCJ-"gcj"} 4203*b5677b36Schristoscompiler=$CC 4204*b5677b36Schristos_LT_AC_TAGVAR(compiler, $1)=$CC 4205*b5677b36Schristos_LT_CC_BASENAME([$compiler]) 4206*b5677b36Schristos 4207*b5677b36Schristos# GCJ did not exist at the time GCC didn't implicitly link libc in. 4208*b5677b36Schristos_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 4209*b5677b36Schristos 4210*b5677b36Schristos_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 4211*b5677b36Schristos 4212*b5677b36Schristos## CAVEAT EMPTOR: 4213*b5677b36Schristos## There is no encapsulation within the following macros, do not change 4214*b5677b36Schristos## the running order or otherwise move them around unless you know exactly 4215*b5677b36Schristos## what you are doing... 4216*b5677b36SchristosAC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) 4217*b5677b36SchristosAC_LIBTOOL_PROG_COMPILER_PIC($1) 4218*b5677b36SchristosAC_LIBTOOL_PROG_CC_C_O($1) 4219*b5677b36SchristosAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) 4220*b5677b36SchristosAC_LIBTOOL_PROG_LD_SHLIBS($1) 4221*b5677b36SchristosAC_LIBTOOL_SYS_DYNAMIC_LINKER($1) 4222*b5677b36SchristosAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) 4223*b5677b36Schristos 4224*b5677b36SchristosAC_LIBTOOL_CONFIG($1) 4225*b5677b36Schristos 4226*b5677b36SchristosAC_LANG_RESTORE 4227*b5677b36SchristosCC="$lt_save_CC" 4228*b5677b36Schristos])# AC_LIBTOOL_LANG_GCJ_CONFIG 4229*b5677b36Schristos 4230*b5677b36Schristos 4231*b5677b36Schristos# AC_LIBTOOL_LANG_RC_CONFIG 4232*b5677b36Schristos# ------------------------- 4233*b5677b36Schristos# Ensure that the configuration vars for the Windows resource compiler are 4234*b5677b36Schristos# suitably defined. Those variables are subsequently used by 4235*b5677b36Schristos# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 4236*b5677b36SchristosAC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)]) 4237*b5677b36SchristosAC_DEFUN([_LT_AC_LANG_RC_CONFIG], 4238*b5677b36Schristos[AC_LANG_SAVE 4239*b5677b36Schristos 4240*b5677b36Schristos# Source file extension for RC test sources. 4241*b5677b36Schristosac_ext=rc 4242*b5677b36Schristos 4243*b5677b36Schristos# Object file extension for compiled RC test sources. 4244*b5677b36Schristosobjext=o 4245*b5677b36Schristos_LT_AC_TAGVAR(objext, $1)=$objext 4246*b5677b36Schristos 4247*b5677b36Schristos# Code to be used in simple compile tests 4248*b5677b36Schristoslt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 4249*b5677b36Schristos 4250*b5677b36Schristos# Code to be used in simple link tests 4251*b5677b36Schristoslt_simple_link_test_code="$lt_simple_compile_test_code" 4252*b5677b36Schristos 4253*b5677b36Schristos# ltmain only uses $CC for tagged configurations so make sure $CC is set. 4254*b5677b36Schristos_LT_AC_SYS_COMPILER 4255*b5677b36Schristos 4256*b5677b36Schristos# save warnings/boilerplate of simple test code 4257*b5677b36Schristos_LT_COMPILER_BOILERPLATE 4258*b5677b36Schristos_LT_LINKER_BOILERPLATE 4259*b5677b36Schristos 4260*b5677b36Schristos# Allow CC to be a program name with arguments. 4261*b5677b36Schristoslt_save_CC="$CC" 4262*b5677b36SchristosCC=${RC-"windres"} 4263*b5677b36Schristoscompiler=$CC 4264*b5677b36Schristos_LT_AC_TAGVAR(compiler, $1)=$CC 4265*b5677b36Schristos_LT_CC_BASENAME([$compiler]) 4266*b5677b36Schristos_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 4267*b5677b36Schristos 4268*b5677b36SchristosAC_LIBTOOL_CONFIG($1) 4269*b5677b36Schristos 4270*b5677b36SchristosAC_LANG_RESTORE 4271*b5677b36SchristosCC="$lt_save_CC" 4272*b5677b36Schristos])# AC_LIBTOOL_LANG_RC_CONFIG 4273*b5677b36Schristos 4274*b5677b36Schristos 4275*b5677b36Schristos# AC_LIBTOOL_CONFIG([TAGNAME]) 4276*b5677b36Schristos# ---------------------------- 4277*b5677b36Schristos# If TAGNAME is not passed, then create an initial libtool script 4278*b5677b36Schristos# with a default configuration from the untagged config vars. Otherwise 4279*b5677b36Schristos# add code to config.status for appending the configuration named by 4280*b5677b36Schristos# TAGNAME from the matching tagged config vars. 4281*b5677b36SchristosAC_DEFUN([AC_LIBTOOL_CONFIG], 4282*b5677b36Schristos[# The else clause should only fire when bootstrapping the 4283*b5677b36Schristos# libtool distribution, otherwise you forgot to ship ltmain.sh 4284*b5677b36Schristos# with your package, and you will get complaints that there are 4285*b5677b36Schristos# no rules to generate ltmain.sh. 4286*b5677b36Schristosif test -f "$ltmain"; then 4287*b5677b36Schristos # See if we are running on zsh, and set the options which allow our commands through 4288*b5677b36Schristos # without removal of \ escapes. 4289*b5677b36Schristos if test -n "${ZSH_VERSION+set}" ; then 4290*b5677b36Schristos setopt NO_GLOB_SUBST 4291*b5677b36Schristos fi 4292*b5677b36Schristos # Now quote all the things that may contain metacharacters while being 4293*b5677b36Schristos # careful not to overquote the AC_SUBSTed values. We take copies of the 4294*b5677b36Schristos # variables and quote the copies for generation of the libtool script. 4295*b5677b36Schristos for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ 4296*b5677b36Schristos SED SHELL STRIP \ 4297*b5677b36Schristos libname_spec library_names_spec soname_spec extract_expsyms_cmds \ 4298*b5677b36Schristos old_striplib striplib file_magic_cmd finish_cmds finish_eval \ 4299*b5677b36Schristos deplibs_check_method reload_flag reload_cmds need_locks \ 4300*b5677b36Schristos lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ 4301*b5677b36Schristos lt_cv_sys_global_symbol_to_c_name_address \ 4302*b5677b36Schristos sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ 4303*b5677b36Schristos old_postinstall_cmds old_postuninstall_cmds \ 4304*b5677b36Schristos _LT_AC_TAGVAR(compiler, $1) \ 4305*b5677b36Schristos _LT_AC_TAGVAR(CC, $1) \ 4306*b5677b36Schristos _LT_AC_TAGVAR(LD, $1) \ 4307*b5677b36Schristos _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \ 4308*b5677b36Schristos _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \ 4309*b5677b36Schristos _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \ 4310*b5677b36Schristos _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \ 4311*b5677b36Schristos _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \ 4312*b5677b36Schristos _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \ 4313*b5677b36Schristos _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \ 4314*b5677b36Schristos _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \ 4315*b5677b36Schristos _LT_AC_TAGVAR(old_archive_cmds, $1) \ 4316*b5677b36Schristos _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \ 4317*b5677b36Schristos _LT_AC_TAGVAR(predep_objects, $1) \ 4318*b5677b36Schristos _LT_AC_TAGVAR(postdep_objects, $1) \ 4319*b5677b36Schristos _LT_AC_TAGVAR(predeps, $1) \ 4320*b5677b36Schristos _LT_AC_TAGVAR(postdeps, $1) \ 4321*b5677b36Schristos _LT_AC_TAGVAR(compiler_lib_search_path, $1) \ 4322*b5677b36Schristos _LT_AC_TAGVAR(compiler_lib_search_dirs, $1) \ 4323*b5677b36Schristos _LT_AC_TAGVAR(archive_cmds, $1) \ 4324*b5677b36Schristos _LT_AC_TAGVAR(archive_expsym_cmds, $1) \ 4325*b5677b36Schristos _LT_AC_TAGVAR(postinstall_cmds, $1) \ 4326*b5677b36Schristos _LT_AC_TAGVAR(postuninstall_cmds, $1) \ 4327*b5677b36Schristos _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \ 4328*b5677b36Schristos _LT_AC_TAGVAR(allow_undefined_flag, $1) \ 4329*b5677b36Schristos _LT_AC_TAGVAR(no_undefined_flag, $1) \ 4330*b5677b36Schristos _LT_AC_TAGVAR(export_symbols_cmds, $1) \ 4331*b5677b36Schristos _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \ 4332*b5677b36Schristos _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \ 4333*b5677b36Schristos _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \ 4334*b5677b36Schristos _LT_AC_TAGVAR(hardcode_automatic, $1) \ 4335*b5677b36Schristos _LT_AC_TAGVAR(module_cmds, $1) \ 4336*b5677b36Schristos _LT_AC_TAGVAR(module_expsym_cmds, $1) \ 4337*b5677b36Schristos _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \ 4338*b5677b36Schristos _LT_AC_TAGVAR(fix_srcfile_path, $1) \ 4339*b5677b36Schristos _LT_AC_TAGVAR(exclude_expsyms, $1) \ 4340*b5677b36Schristos _LT_AC_TAGVAR(include_expsyms, $1); do 4341*b5677b36Schristos 4342*b5677b36Schristos case $var in 4343*b5677b36Schristos _LT_AC_TAGVAR(old_archive_cmds, $1) | \ 4344*b5677b36Schristos _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \ 4345*b5677b36Schristos _LT_AC_TAGVAR(archive_cmds, $1) | \ 4346*b5677b36Schristos _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \ 4347*b5677b36Schristos _LT_AC_TAGVAR(module_cmds, $1) | \ 4348*b5677b36Schristos _LT_AC_TAGVAR(module_expsym_cmds, $1) | \ 4349*b5677b36Schristos _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \ 4350*b5677b36Schristos _LT_AC_TAGVAR(export_symbols_cmds, $1) | \ 4351*b5677b36Schristos extract_expsyms_cmds | reload_cmds | finish_cmds | \ 4352*b5677b36Schristos postinstall_cmds | postuninstall_cmds | \ 4353*b5677b36Schristos old_postinstall_cmds | old_postuninstall_cmds | \ 4354*b5677b36Schristos sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) 4355*b5677b36Schristos # Double-quote double-evaled strings. 4356*b5677b36Schristos eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" 4357*b5677b36Schristos ;; 4358*b5677b36Schristos *) 4359*b5677b36Schristos eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" 4360*b5677b36Schristos ;; 4361*b5677b36Schristos esac 4362*b5677b36Schristos done 4363*b5677b36Schristos 4364*b5677b36Schristos case $lt_echo in 4365*b5677b36Schristos *'\[$]0 --fallback-echo"') 4366*b5677b36Schristos lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'` 4367*b5677b36Schristos ;; 4368*b5677b36Schristos esac 4369*b5677b36Schristos 4370*b5677b36Schristosifelse([$1], [], 4371*b5677b36Schristos [cfgfile="${ofile}T" 4372*b5677b36Schristos trap "$rm \"$cfgfile\"; exit 1" 1 2 15 4373*b5677b36Schristos $rm -f "$cfgfile" 4374*b5677b36Schristos AC_MSG_NOTICE([creating $ofile])], 4375*b5677b36Schristos [cfgfile="$ofile"]) 4376*b5677b36Schristos 4377*b5677b36Schristos cat <<__EOF__ >> "$cfgfile" 4378*b5677b36Schristosifelse([$1], [], 4379*b5677b36Schristos[#! $SHELL 4380*b5677b36Schristos 4381*b5677b36Schristos# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. 4382*b5677b36Schristos# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) 4383*b5677b36Schristos# NOTE: Changes made to this file will be lost: look at ltmain.sh. 4384*b5677b36Schristos# 4385*b5677b36Schristos# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 4386*b5677b36Schristos# Free Software Foundation, Inc. 4387*b5677b36Schristos# 4388*b5677b36Schristos# This file is part of GNU Libtool: 4389*b5677b36Schristos# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 4390*b5677b36Schristos# 4391*b5677b36Schristos# This program is free software; you can redistribute it and/or modify 4392*b5677b36Schristos# it under the terms of the GNU General Public License as published by 4393*b5677b36Schristos# the Free Software Foundation; either version 2 of the License, or 4394*b5677b36Schristos# (at your option) any later version. 4395*b5677b36Schristos# 4396*b5677b36Schristos# This program is distributed in the hope that it will be useful, but 4397*b5677b36Schristos# WITHOUT ANY WARRANTY; without even the implied warranty of 4398*b5677b36Schristos# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 4399*b5677b36Schristos# General Public License for more details. 4400*b5677b36Schristos# 4401*b5677b36Schristos# You should have received a copy of the GNU General Public License 4402*b5677b36Schristos# along with this program; if not, write to the Free Software 4403*b5677b36Schristos# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 4404*b5677b36Schristos# 4405*b5677b36Schristos# As a special exception to the GNU General Public License, if you 4406*b5677b36Schristos# distribute this file as part of a program that contains a 4407*b5677b36Schristos# configuration script generated by Autoconf, you may include it under 4408*b5677b36Schristos# the same distribution terms that you use for the rest of that program. 4409*b5677b36Schristos 4410*b5677b36Schristos# A sed program that does not truncate output. 4411*b5677b36SchristosSED=$lt_SED 4412*b5677b36Schristos 4413*b5677b36Schristos# Sed that helps us avoid accidentally triggering echo(1) options like -n. 4414*b5677b36SchristosXsed="$SED -e 1s/^X//" 4415*b5677b36Schristos 4416*b5677b36Schristos# The HP-UX ksh and POSIX shell print the target directory to stdout 4417*b5677b36Schristos# if CDPATH is set. 4418*b5677b36Schristos(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 4419*b5677b36Schristos 4420*b5677b36Schristos# The names of the tagged configurations supported by this script. 4421*b5677b36Schristosavailable_tags= 4422*b5677b36Schristos 4423*b5677b36Schristos# ### BEGIN LIBTOOL CONFIG], 4424*b5677b36Schristos[# ### BEGIN LIBTOOL TAG CONFIG: $tagname]) 4425*b5677b36Schristos 4426*b5677b36Schristos# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 4427*b5677b36Schristos 4428*b5677b36Schristos# Shell to use when invoking shell scripts. 4429*b5677b36SchristosSHELL=$lt_SHELL 4430*b5677b36Schristos 4431*b5677b36Schristos# Whether or not to build shared libraries. 4432*b5677b36Schristosbuild_libtool_libs=$enable_shared 4433*b5677b36Schristos 4434*b5677b36Schristos# Whether or not to build static libraries. 4435*b5677b36Schristosbuild_old_libs=$enable_static 4436*b5677b36Schristos 4437*b5677b36Schristos# Whether or not to add -lc for building shared libraries. 4438*b5677b36Schristosbuild_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1) 4439*b5677b36Schristos 4440*b5677b36Schristos# Whether or not to disallow shared libs when runtime libs are static 4441*b5677b36Schristosallow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) 4442*b5677b36Schristos 4443*b5677b36Schristos# Whether or not to optimize for fast installation. 4444*b5677b36Schristosfast_install=$enable_fast_install 4445*b5677b36Schristos 4446*b5677b36Schristos# The host system. 4447*b5677b36Schristoshost_alias=$host_alias 4448*b5677b36Schristoshost=$host 4449*b5677b36Schristoshost_os=$host_os 4450*b5677b36Schristos 4451*b5677b36Schristos# The build system. 4452*b5677b36Schristosbuild_alias=$build_alias 4453*b5677b36Schristosbuild=$build 4454*b5677b36Schristosbuild_os=$build_os 4455*b5677b36Schristos 4456*b5677b36Schristos# An echo program that does not interpret backslashes. 4457*b5677b36Schristosecho=$lt_echo 4458*b5677b36Schristos 4459*b5677b36Schristos# The archiver. 4460*b5677b36SchristosAR=$lt_AR 4461*b5677b36SchristosAR_FLAGS=$lt_AR_FLAGS 4462*b5677b36Schristos 4463*b5677b36Schristos# A C compiler. 4464*b5677b36SchristosLTCC=$lt_LTCC 4465*b5677b36Schristos 4466*b5677b36Schristos# LTCC compiler flags. 4467*b5677b36SchristosLTCFLAGS=$lt_LTCFLAGS 4468*b5677b36Schristos 4469*b5677b36Schristos# A language-specific compiler. 4470*b5677b36SchristosCC=$lt_[]_LT_AC_TAGVAR(compiler, $1) 4471*b5677b36Schristos 4472*b5677b36Schristos# Is the compiler the GNU C compiler? 4473*b5677b36Schristoswith_gcc=$_LT_AC_TAGVAR(GCC, $1) 4474*b5677b36Schristos 4475*b5677b36Schristos# An ERE matcher. 4476*b5677b36SchristosEGREP=$lt_EGREP 4477*b5677b36Schristos 4478*b5677b36Schristos# The linker used to build libraries. 4479*b5677b36SchristosLD=$lt_[]_LT_AC_TAGVAR(LD, $1) 4480*b5677b36Schristos 4481*b5677b36Schristos# Whether we need hard or soft links. 4482*b5677b36SchristosLN_S=$lt_LN_S 4483*b5677b36Schristos 4484*b5677b36Schristos# A BSD-compatible nm program. 4485*b5677b36SchristosNM=$lt_NM 4486*b5677b36Schristos 4487*b5677b36Schristos# A symbol stripping program 4488*b5677b36SchristosSTRIP=$lt_STRIP 4489*b5677b36Schristos 4490*b5677b36Schristos# Used to examine libraries when file_magic_cmd begins "file" 4491*b5677b36SchristosMAGIC_CMD=$MAGIC_CMD 4492*b5677b36Schristos 4493*b5677b36Schristos# Used on cygwin: DLL creation program. 4494*b5677b36SchristosDLLTOOL="$DLLTOOL" 4495*b5677b36Schristos 4496*b5677b36Schristos# Used on cygwin: object dumper. 4497*b5677b36SchristosOBJDUMP="$OBJDUMP" 4498*b5677b36Schristos 4499*b5677b36Schristos# Used on cygwin: assembler. 4500*b5677b36SchristosAS="$AS" 4501*b5677b36Schristos 4502*b5677b36Schristos# The name of the directory that contains temporary libtool files. 4503*b5677b36Schristosobjdir=$objdir 4504*b5677b36Schristos 4505*b5677b36Schristos# How to create reloadable object files. 4506*b5677b36Schristosreload_flag=$lt_reload_flag 4507*b5677b36Schristosreload_cmds=$lt_reload_cmds 4508*b5677b36Schristos 4509*b5677b36Schristos# How to pass a linker flag through the compiler. 4510*b5677b36Schristoswl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) 4511*b5677b36Schristos 4512*b5677b36Schristos# Object file suffix (normally "o"). 4513*b5677b36Schristosobjext="$ac_objext" 4514*b5677b36Schristos 4515*b5677b36Schristos# Old archive suffix (normally "a"). 4516*b5677b36Schristoslibext="$libext" 4517*b5677b36Schristos 4518*b5677b36Schristos# Shared library suffix (normally ".so"). 4519*b5677b36Schristosshrext_cmds='$shrext_cmds' 4520*b5677b36Schristos 4521*b5677b36Schristos# Executable file suffix (normally ""). 4522*b5677b36Schristosexeext="$exeext" 4523*b5677b36Schristos 4524*b5677b36Schristos# Additional compiler flags for building library objects. 4525*b5677b36Schristospic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) 4526*b5677b36Schristospic_mode=$pic_mode 4527*b5677b36Schristos 4528*b5677b36Schristos# What is the maximum length of a command? 4529*b5677b36Schristosmax_cmd_len=$lt_cv_sys_max_cmd_len 4530*b5677b36Schristos 4531*b5677b36Schristos# Does compiler simultaneously support -c and -o options? 4532*b5677b36Schristoscompiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) 4533*b5677b36Schristos 4534*b5677b36Schristos# Must we lock files when doing compilation? 4535*b5677b36Schristosneed_locks=$lt_need_locks 4536*b5677b36Schristos 4537*b5677b36Schristos# Do we need the lib prefix for modules? 4538*b5677b36Schristosneed_lib_prefix=$need_lib_prefix 4539*b5677b36Schristos 4540*b5677b36Schristos# Do we need a version for libraries? 4541*b5677b36Schristosneed_version=$need_version 4542*b5677b36Schristos 4543*b5677b36Schristos# Whether dlopen is supported. 4544*b5677b36Schristosdlopen_support=$enable_dlopen 4545*b5677b36Schristos 4546*b5677b36Schristos# Whether dlopen of programs is supported. 4547*b5677b36Schristosdlopen_self=$enable_dlopen_self 4548*b5677b36Schristos 4549*b5677b36Schristos# Whether dlopen of statically linked programs is supported. 4550*b5677b36Schristosdlopen_self_static=$enable_dlopen_self_static 4551*b5677b36Schristos 4552*b5677b36Schristos# Compiler flag to prevent dynamic linking. 4553*b5677b36Schristoslink_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1) 4554*b5677b36Schristos 4555*b5677b36Schristos# Compiler flag to turn off builtin functions. 4556*b5677b36Schristosno_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) 4557*b5677b36Schristos 4558*b5677b36Schristos# Compiler flag to allow reflexive dlopens. 4559*b5677b36Schristosexport_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1) 4560*b5677b36Schristos 4561*b5677b36Schristos# Compiler flag to generate shared objects directly from archives. 4562*b5677b36Schristoswhole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1) 4563*b5677b36Schristos 4564*b5677b36Schristos# Compiler flag to generate thread-safe objects. 4565*b5677b36Schristosthread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1) 4566*b5677b36Schristos 4567*b5677b36Schristos# Library versioning type. 4568*b5677b36Schristosversion_type=$version_type 4569*b5677b36Schristos 4570*b5677b36Schristos# Format of library name prefix. 4571*b5677b36Schristoslibname_spec=$lt_libname_spec 4572*b5677b36Schristos 4573*b5677b36Schristos# List of archive names. First name is the real one, the rest are links. 4574*b5677b36Schristos# The last name is the one that the linker finds with -lNAME. 4575*b5677b36Schristoslibrary_names_spec=$lt_library_names_spec 4576*b5677b36Schristos 4577*b5677b36Schristos# The coded name of the library, if different from the real name. 4578*b5677b36Schristossoname_spec=$lt_soname_spec 4579*b5677b36Schristos 4580*b5677b36Schristos# Commands used to build and install an old-style archive. 4581*b5677b36SchristosRANLIB=$lt_RANLIB 4582*b5677b36Schristosold_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1) 4583*b5677b36Schristosold_postinstall_cmds=$lt_old_postinstall_cmds 4584*b5677b36Schristosold_postuninstall_cmds=$lt_old_postuninstall_cmds 4585*b5677b36Schristos 4586*b5677b36Schristos# Create an old-style archive from a shared archive. 4587*b5677b36Schristosold_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1) 4588*b5677b36Schristos 4589*b5677b36Schristos# Create a temporary old-style archive to link instead of a shared archive. 4590*b5677b36Schristosold_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) 4591*b5677b36Schristos 4592*b5677b36Schristos# Commands used to build and install a shared archive. 4593*b5677b36Schristosarchive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1) 4594*b5677b36Schristosarchive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1) 4595*b5677b36Schristospostinstall_cmds=$lt_postinstall_cmds 4596*b5677b36Schristospostuninstall_cmds=$lt_postuninstall_cmds 4597*b5677b36Schristos 4598*b5677b36Schristos# Commands used to build a loadable module (assumed same as above if empty) 4599*b5677b36Schristosmodule_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1) 4600*b5677b36Schristosmodule_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1) 4601*b5677b36Schristos 4602*b5677b36Schristos# Commands to strip libraries. 4603*b5677b36Schristosold_striplib=$lt_old_striplib 4604*b5677b36Schristosstriplib=$lt_striplib 4605*b5677b36Schristos 4606*b5677b36Schristos# Dependencies to place before the objects being linked to create a 4607*b5677b36Schristos# shared library. 4608*b5677b36Schristospredep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1) 4609*b5677b36Schristos 4610*b5677b36Schristos# Dependencies to place after the objects being linked to create a 4611*b5677b36Schristos# shared library. 4612*b5677b36Schristospostdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1) 4613*b5677b36Schristos 4614*b5677b36Schristos# Dependencies to place before the objects being linked to create a 4615*b5677b36Schristos# shared library. 4616*b5677b36Schristospredeps=$lt_[]_LT_AC_TAGVAR(predeps, $1) 4617*b5677b36Schristos 4618*b5677b36Schristos# Dependencies to place after the objects being linked to create a 4619*b5677b36Schristos# shared library. 4620*b5677b36Schristospostdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1) 4621*b5677b36Schristos 4622*b5677b36Schristos# The directories searched by this compiler when creating a shared 4623*b5677b36Schristos# library 4624*b5677b36Schristoscompiler_lib_search_dirs=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_dirs, $1) 4625*b5677b36Schristos 4626*b5677b36Schristos# The library search path used internally by the compiler when linking 4627*b5677b36Schristos# a shared library. 4628*b5677b36Schristoscompiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1) 4629*b5677b36Schristos 4630*b5677b36Schristos# Method to check whether dependent libraries are shared objects. 4631*b5677b36Schristosdeplibs_check_method=$lt_deplibs_check_method 4632*b5677b36Schristos 4633*b5677b36Schristos# Command to use when deplibs_check_method == file_magic. 4634*b5677b36Schristosfile_magic_cmd=$lt_file_magic_cmd 4635*b5677b36Schristos 4636*b5677b36Schristos# Flag that allows shared libraries with undefined symbols to be built. 4637*b5677b36Schristosallow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1) 4638*b5677b36Schristos 4639*b5677b36Schristos# Flag that forces no undefined symbols. 4640*b5677b36Schristosno_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1) 4641*b5677b36Schristos 4642*b5677b36Schristos# Commands used to finish a libtool library installation in a directory. 4643*b5677b36Schristosfinish_cmds=$lt_finish_cmds 4644*b5677b36Schristos 4645*b5677b36Schristos# Same as above, but a single script fragment to be evaled but not shown. 4646*b5677b36Schristosfinish_eval=$lt_finish_eval 4647*b5677b36Schristos 4648*b5677b36Schristos# Take the output of nm and produce a listing of raw symbols and C names. 4649*b5677b36Schristosglobal_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe 4650*b5677b36Schristos 4651*b5677b36Schristos# Transform the output of nm in a proper C declaration 4652*b5677b36Schristosglobal_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl 4653*b5677b36Schristos 4654*b5677b36Schristos# Transform the output of nm in a C name address pair 4655*b5677b36Schristosglobal_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address 4656*b5677b36Schristos 4657*b5677b36Schristos# This is the shared library runtime path variable. 4658*b5677b36Schristosrunpath_var=$runpath_var 4659*b5677b36Schristos 4660*b5677b36Schristos# This is the shared library path variable. 4661*b5677b36Schristosshlibpath_var=$shlibpath_var 4662*b5677b36Schristos 4663*b5677b36Schristos# Is shlibpath searched before the hard-coded library search path? 4664*b5677b36Schristosshlibpath_overrides_runpath=$shlibpath_overrides_runpath 4665*b5677b36Schristos 4666*b5677b36Schristos# How to hardcode a shared library path into an executable. 4667*b5677b36Schristoshardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1) 4668*b5677b36Schristos 4669*b5677b36Schristos# Whether we should hardcode library paths into libraries. 4670*b5677b36Schristoshardcode_into_libs=$hardcode_into_libs 4671*b5677b36Schristos 4672*b5677b36Schristos# Flag to hardcode \$libdir into a binary during linking. 4673*b5677b36Schristos# This must work even if \$libdir does not exist. 4674*b5677b36Schristoshardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) 4675*b5677b36Schristos 4676*b5677b36Schristos# If ld is used when linking, flag to hardcode \$libdir into 4677*b5677b36Schristos# a binary during linking. This must work even if \$libdir does 4678*b5677b36Schristos# not exist. 4679*b5677b36Schristoshardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) 4680*b5677b36Schristos 4681*b5677b36Schristos# Whether we need a single -rpath flag with a separated argument. 4682*b5677b36Schristoshardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1) 4683*b5677b36Schristos 4684*b5677b36Schristos# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the 4685*b5677b36Schristos# resulting binary. 4686*b5677b36Schristoshardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1) 4687*b5677b36Schristos 4688*b5677b36Schristos# Set to yes if using the -LDIR flag during linking hardcodes DIR into the 4689*b5677b36Schristos# resulting binary. 4690*b5677b36Schristoshardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1) 4691*b5677b36Schristos 4692*b5677b36Schristos# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into 4693*b5677b36Schristos# the resulting binary. 4694*b5677b36Schristoshardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1) 4695*b5677b36Schristos 4696*b5677b36Schristos# Set to yes if building a shared library automatically hardcodes DIR into the library 4697*b5677b36Schristos# and all subsequent libraries and executables linked against it. 4698*b5677b36Schristoshardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1) 4699*b5677b36Schristos 4700*b5677b36Schristos# Variables whose values should be saved in libtool wrapper scripts and 4701*b5677b36Schristos# restored at relink time. 4702*b5677b36Schristosvariables_saved_for_relink="$variables_saved_for_relink" 4703*b5677b36Schristos 4704*b5677b36Schristos# Whether libtool must link a program against all its dependency libraries. 4705*b5677b36Schristoslink_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1) 4706*b5677b36Schristos 4707*b5677b36Schristos# Compile-time system search path for libraries 4708*b5677b36Schristossys_lib_search_path_spec=$lt_sys_lib_search_path_spec 4709*b5677b36Schristos 4710*b5677b36Schristos# Run-time system search path for libraries 4711*b5677b36Schristossys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec 4712*b5677b36Schristos 4713*b5677b36Schristos# Fix the shell variable \$srcfile for the compiler. 4714*b5677b36Schristosfix_srcfile_path=$lt_fix_srcfile_path 4715*b5677b36Schristos 4716*b5677b36Schristos# Set to yes if exported symbols are required. 4717*b5677b36Schristosalways_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1) 4718*b5677b36Schristos 4719*b5677b36Schristos# The commands to list exported symbols. 4720*b5677b36Schristosexport_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1) 4721*b5677b36Schristos 4722*b5677b36Schristos# The commands to extract the exported symbol list from a shared archive. 4723*b5677b36Schristosextract_expsyms_cmds=$lt_extract_expsyms_cmds 4724*b5677b36Schristos 4725*b5677b36Schristos# Symbols that should not be listed in the preloaded symbols. 4726*b5677b36Schristosexclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1) 4727*b5677b36Schristos 4728*b5677b36Schristos# Symbols that must always be exported. 4729*b5677b36Schristosinclude_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1) 4730*b5677b36Schristos 4731*b5677b36Schristosifelse([$1],[], 4732*b5677b36Schristos[# ### END LIBTOOL CONFIG], 4733*b5677b36Schristos[# ### END LIBTOOL TAG CONFIG: $tagname]) 4734*b5677b36Schristos 4735*b5677b36Schristos__EOF__ 4736*b5677b36Schristos 4737*b5677b36Schristosifelse([$1],[], [ 4738*b5677b36Schristos case $host_os in 4739*b5677b36Schristos aix3*) 4740*b5677b36Schristos cat <<\EOF >> "$cfgfile" 4741*b5677b36Schristos 4742*b5677b36Schristos# AIX sometimes has problems with the GCC collect2 program. For some 4743*b5677b36Schristos# reason, if we set the COLLECT_NAMES environment variable, the problems 4744*b5677b36Schristos# vanish in a puff of smoke. 4745*b5677b36Schristosif test "X${COLLECT_NAMES+set}" != Xset; then 4746*b5677b36Schristos COLLECT_NAMES= 4747*b5677b36Schristos export COLLECT_NAMES 4748*b5677b36Schristosfi 4749*b5677b36SchristosEOF 4750*b5677b36Schristos ;; 4751*b5677b36Schristos esac 4752*b5677b36Schristos 4753*b5677b36Schristos # We use sed instead of cat because bash on DJGPP gets confused if 4754*b5677b36Schristos # if finds mixed CR/LF and LF-only lines. Since sed operates in 4755*b5677b36Schristos # text mode, it properly converts lines to CR/LF. This bash problem 4756*b5677b36Schristos # is reportedly fixed, but why not run on old versions too? 4757*b5677b36Schristos sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1) 4758*b5677b36Schristos 4759*b5677b36Schristos mv -f "$cfgfile" "$ofile" || \ 4760*b5677b36Schristos (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 4761*b5677b36Schristos chmod +x "$ofile" 4762*b5677b36Schristos]) 4763*b5677b36Schristoselse 4764*b5677b36Schristos # If there is no Makefile yet, we rely on a make rule to execute 4765*b5677b36Schristos # `config.status --recheck' to rerun these tests and create the 4766*b5677b36Schristos # libtool script then. 4767*b5677b36Schristos ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` 4768*b5677b36Schristos if test -f "$ltmain_in"; then 4769*b5677b36Schristos test -f Makefile && make "$ltmain" 4770*b5677b36Schristos fi 4771*b5677b36Schristosfi 4772*b5677b36Schristos])# AC_LIBTOOL_CONFIG 4773*b5677b36Schristos 4774*b5677b36Schristos 4775*b5677b36Schristos# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME]) 4776*b5677b36Schristos# ------------------------------------------- 4777*b5677b36SchristosAC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], 4778*b5677b36Schristos[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl 4779*b5677b36Schristos 4780*b5677b36Schristos_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 4781*b5677b36Schristos 4782*b5677b36Schristosif test "$GCC" = yes; then 4783*b5677b36Schristos _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 4784*b5677b36Schristos 4785*b5677b36Schristos AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 4786*b5677b36Schristos lt_cv_prog_compiler_rtti_exceptions, 4787*b5677b36Schristos [-fno-rtti -fno-exceptions], [], 4788*b5677b36Schristos [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 4789*b5677b36Schristosfi 4790*b5677b36Schristos])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI 4791*b5677b36Schristos 4792*b5677b36Schristos 4793*b5677b36Schristos# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE 4794*b5677b36Schristos# --------------------------------- 4795*b5677b36SchristosAC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], 4796*b5677b36Schristos[AC_REQUIRE([AC_CANONICAL_HOST]) 4797*b5677b36SchristosAC_REQUIRE([LT_AC_PROG_SED]) 4798*b5677b36SchristosAC_REQUIRE([AC_PROG_NM]) 4799*b5677b36SchristosAC_REQUIRE([AC_OBJEXT]) 4800*b5677b36Schristos# Check for command to grab the raw symbol name followed by C symbol from nm. 4801*b5677b36SchristosAC_MSG_CHECKING([command to parse $NM output from $compiler object]) 4802*b5677b36SchristosAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 4803*b5677b36Schristos[ 4804*b5677b36Schristos# These are sane defaults that work on at least a few old systems. 4805*b5677b36Schristos# [They come from Ultrix. What could be older than Ultrix?!! ;)] 4806*b5677b36Schristos 4807*b5677b36Schristos# Character class describing NM global symbol codes. 4808*b5677b36Schristossymcode='[[BCDEGRST]]' 4809*b5677b36Schristos 4810*b5677b36Schristos# Regexp to match symbols that can be accessed directly from C. 4811*b5677b36Schristossympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 4812*b5677b36Schristos 4813*b5677b36Schristos# Transform an extracted symbol line into a proper C declaration 4814*b5677b36Schristoslt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'" 4815*b5677b36Schristos 4816*b5677b36Schristos# Transform an extracted symbol line into symbol name and symbol address 4817*b5677b36Schristoslt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" 4818*b5677b36Schristos 4819*b5677b36Schristos# Define system-specific variables. 4820*b5677b36Schristoscase $host_os in 4821*b5677b36Schristosaix*) 4822*b5677b36Schristos symcode='[[BCDT]]' 4823*b5677b36Schristos ;; 4824*b5677b36Schristoscygwin* | mingw* | pw32*) 4825*b5677b36Schristos symcode='[[ABCDGISTW]]' 4826*b5677b36Schristos ;; 4827*b5677b36Schristoshpux*) # Its linker distinguishes data from code symbols 4828*b5677b36Schristos if test "$host_cpu" = ia64; then 4829*b5677b36Schristos symcode='[[ABCDEGRST]]' 4830*b5677b36Schristos fi 4831*b5677b36Schristos lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 4832*b5677b36Schristos lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" 4833*b5677b36Schristos ;; 4834*b5677b36Schristoslinux* | k*bsd*-gnu) 4835*b5677b36Schristos if test "$host_cpu" = ia64; then 4836*b5677b36Schristos symcode='[[ABCDGIRSTW]]' 4837*b5677b36Schristos lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 4838*b5677b36Schristos lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" 4839*b5677b36Schristos fi 4840*b5677b36Schristos ;; 4841*b5677b36Schristosirix* | nonstopux*) 4842*b5677b36Schristos symcode='[[BCDEGRST]]' 4843*b5677b36Schristos ;; 4844*b5677b36Schristososf*) 4845*b5677b36Schristos symcode='[[BCDEGQRST]]' 4846*b5677b36Schristos ;; 4847*b5677b36Schristossolaris*) 4848*b5677b36Schristos symcode='[[BDRT]]' 4849*b5677b36Schristos ;; 4850*b5677b36Schristossco3.2v5*) 4851*b5677b36Schristos symcode='[[DT]]' 4852*b5677b36Schristos ;; 4853*b5677b36Schristossysv4.2uw2*) 4854*b5677b36Schristos symcode='[[DT]]' 4855*b5677b36Schristos ;; 4856*b5677b36Schristossysv5* | sco5v6* | unixware* | OpenUNIX*) 4857*b5677b36Schristos symcode='[[ABDT]]' 4858*b5677b36Schristos ;; 4859*b5677b36Schristossysv4) 4860*b5677b36Schristos symcode='[[DFNSTU]]' 4861*b5677b36Schristos ;; 4862*b5677b36Schristosesac 4863*b5677b36Schristos 4864*b5677b36Schristos# Handle CRLF in mingw tool chain 4865*b5677b36Schristosopt_cr= 4866*b5677b36Schristoscase $build_os in 4867*b5677b36Schristosmingw*) 4868*b5677b36Schristos opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp 4869*b5677b36Schristos ;; 4870*b5677b36Schristosesac 4871*b5677b36Schristos 4872*b5677b36Schristos# If we're using GNU nm, then use its standard symbol codes. 4873*b5677b36Schristoscase `$NM -V 2>&1` in 4874*b5677b36Schristos*GNU* | *'with BFD'*) 4875*b5677b36Schristos symcode='[[ABCDGIRSTW]]' ;; 4876*b5677b36Schristosesac 4877*b5677b36Schristos 4878*b5677b36Schristos# Try without a prefix undercore, then with it. 4879*b5677b36Schristosfor ac_symprfx in "" "_"; do 4880*b5677b36Schristos 4881*b5677b36Schristos # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 4882*b5677b36Schristos symxfrm="\\1 $ac_symprfx\\2 \\2" 4883*b5677b36Schristos 4884*b5677b36Schristos # Write the raw and C identifiers. 4885*b5677b36Schristos lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 4886*b5677b36Schristos 4887*b5677b36Schristos # Check to see that the pipe works correctly. 4888*b5677b36Schristos pipe_works=no 4889*b5677b36Schristos 4890*b5677b36Schristos rm -f conftest* 4891*b5677b36Schristos cat > conftest.$ac_ext <<EOF 4892*b5677b36Schristos#ifdef __cplusplus 4893*b5677b36Schristosextern "C" { 4894*b5677b36Schristos#endif 4895*b5677b36Schristoschar nm_test_var; 4896*b5677b36Schristosvoid nm_test_func(){} 4897*b5677b36Schristos#ifdef __cplusplus 4898*b5677b36Schristos} 4899*b5677b36Schristos#endif 4900*b5677b36Schristosint main(){nm_test_var='a';nm_test_func();return(0);} 4901*b5677b36SchristosEOF 4902*b5677b36Schristos 4903*b5677b36Schristos if AC_TRY_EVAL(ac_compile); then 4904*b5677b36Schristos # Now try to grab the symbols. 4905*b5677b36Schristos nlist=conftest.nm 4906*b5677b36Schristos if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then 4907*b5677b36Schristos # Try sorting and uniquifying the output. 4908*b5677b36Schristos if sort "$nlist" | uniq > "$nlist"T; then 4909*b5677b36Schristos mv -f "$nlist"T "$nlist" 4910*b5677b36Schristos else 4911*b5677b36Schristos rm -f "$nlist"T 4912*b5677b36Schristos fi 4913*b5677b36Schristos 4914*b5677b36Schristos # Make sure that we snagged all the symbols we need. 4915*b5677b36Schristos if grep ' nm_test_var$' "$nlist" >/dev/null; then 4916*b5677b36Schristos if grep ' nm_test_func$' "$nlist" >/dev/null; then 4917*b5677b36Schristos cat <<EOF > conftest.$ac_ext 4918*b5677b36Schristos#ifdef __cplusplus 4919*b5677b36Schristosextern "C" { 4920*b5677b36Schristos#endif 4921*b5677b36Schristos 4922*b5677b36SchristosEOF 4923*b5677b36Schristos # Now generate the symbol file. 4924*b5677b36Schristos eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' 4925*b5677b36Schristos 4926*b5677b36Schristos cat <<EOF >> conftest.$ac_ext 4927*b5677b36Schristos#if defined (__STDC__) && __STDC__ 4928*b5677b36Schristos# define lt_ptr_t void * 4929*b5677b36Schristos#else 4930*b5677b36Schristos# define lt_ptr_t char * 4931*b5677b36Schristos# define const 4932*b5677b36Schristos#endif 4933*b5677b36Schristos 4934*b5677b36Schristos/* The mapping between symbol names and symbols. */ 4935*b5677b36Schristosconst struct { 4936*b5677b36Schristos const char *name; 4937*b5677b36Schristos lt_ptr_t address; 4938*b5677b36Schristos} 4939*b5677b36Schristoslt_preloaded_symbols[[]] = 4940*b5677b36Schristos{ 4941*b5677b36SchristosEOF 4942*b5677b36Schristos $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext 4943*b5677b36Schristos cat <<\EOF >> conftest.$ac_ext 4944*b5677b36Schristos {0, (lt_ptr_t) 0} 4945*b5677b36Schristos}; 4946*b5677b36Schristos 4947*b5677b36Schristos#ifdef __cplusplus 4948*b5677b36Schristos} 4949*b5677b36Schristos#endif 4950*b5677b36SchristosEOF 4951*b5677b36Schristos # Now try linking the two files. 4952*b5677b36Schristos mv conftest.$ac_objext conftstm.$ac_objext 4953*b5677b36Schristos lt_save_LIBS="$LIBS" 4954*b5677b36Schristos lt_save_CFLAGS="$CFLAGS" 4955*b5677b36Schristos LIBS="conftstm.$ac_objext" 4956*b5677b36Schristos CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 4957*b5677b36Schristos if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then 4958*b5677b36Schristos pipe_works=yes 4959*b5677b36Schristos fi 4960*b5677b36Schristos LIBS="$lt_save_LIBS" 4961*b5677b36Schristos CFLAGS="$lt_save_CFLAGS" 4962*b5677b36Schristos else 4963*b5677b36Schristos echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 4964*b5677b36Schristos fi 4965*b5677b36Schristos else 4966*b5677b36Schristos echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 4967*b5677b36Schristos fi 4968*b5677b36Schristos else 4969*b5677b36Schristos echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 4970*b5677b36Schristos fi 4971*b5677b36Schristos else 4972*b5677b36Schristos echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 4973*b5677b36Schristos cat conftest.$ac_ext >&5 4974*b5677b36Schristos fi 4975*b5677b36Schristos rm -rf conftest* conftst* 4976*b5677b36Schristos 4977*b5677b36Schristos # Do not use the global_symbol_pipe unless it works. 4978*b5677b36Schristos if test "$pipe_works" = yes; then 4979*b5677b36Schristos break 4980*b5677b36Schristos else 4981*b5677b36Schristos lt_cv_sys_global_symbol_pipe= 4982*b5677b36Schristos fi 4983*b5677b36Schristosdone 4984*b5677b36Schristos]) 4985*b5677b36Schristosif test -z "$lt_cv_sys_global_symbol_pipe"; then 4986*b5677b36Schristos lt_cv_sys_global_symbol_to_cdecl= 4987*b5677b36Schristosfi 4988*b5677b36Schristosif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 4989*b5677b36Schristos AC_MSG_RESULT(failed) 4990*b5677b36Schristoselse 4991*b5677b36Schristos AC_MSG_RESULT(ok) 4992*b5677b36Schristosfi 4993*b5677b36Schristos]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE 4994*b5677b36Schristos 4995*b5677b36Schristos 4996*b5677b36Schristos# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME]) 4997*b5677b36Schristos# --------------------------------------- 4998*b5677b36SchristosAC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC], 4999*b5677b36Schristos[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)= 5000*b5677b36Schristos_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 5001*b5677b36Schristos_LT_AC_TAGVAR(lt_prog_compiler_static, $1)= 5002*b5677b36Schristos 5003*b5677b36SchristosAC_MSG_CHECKING([for $compiler option to produce PIC]) 5004*b5677b36Schristos ifelse([$1],[CXX],[ 5005*b5677b36Schristos # C++ specific cases for pic, static, wl, etc. 5006*b5677b36Schristos if test "$GXX" = yes; then 5007*b5677b36Schristos _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5008*b5677b36Schristos _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' 5009*b5677b36Schristos 5010*b5677b36Schristos case $host_os in 5011*b5677b36Schristos aix*) 5012*b5677b36Schristos # All AIX code is PIC. 5013*b5677b36Schristos if test "$host_cpu" = ia64; then 5014*b5677b36Schristos # AIX 5 now supports IA64 processor 5015*b5677b36Schristos _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5016*b5677b36Schristos fi 5017*b5677b36Schristos ;; 5018*b5677b36Schristos amigaos*) 5019*b5677b36Schristos # FIXME: we need at least 68020 code to build shared libraries, but 5020*b5677b36Schristos # adding the `-m68020' flag to GCC prevents building anything better, 5021*b5677b36Schristos # like `-m68040'. 5022*b5677b36Schristos _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 5023*b5677b36Schristos ;; 5024*b5677b36Schristos beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 5025*b5677b36Schristos # PIC is the default for these OSes. 5026*b5677b36Schristos ;; 5027*b5677b36Schristos mingw* | cygwin* | os2* | pw32*) 5028*b5677b36Schristos # This hack is so that the source file can tell whether it is being 5029*b5677b36Schristos # built for inclusion in a dll (and should export symbols for example). 5030*b5677b36Schristos # Although the cygwin gcc ignores -fPIC, still need this for old-style 5031*b5677b36Schristos # (--disable-auto-import) libraries 5032*b5677b36Schristos m4_if([$1], [GCJ], [], 5033*b5677b36Schristos [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 5034*b5677b36Schristos ;; 5035*b5677b36Schristos darwin* | rhapsody*) 5036*b5677b36Schristos # PIC is the default on this platform 5037*b5677b36Schristos # Common symbols not allowed in MH_DYLIB files 5038*b5677b36Schristos _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 5039*b5677b36Schristos ;; 5040*b5677b36Schristos *djgpp*) 5041*b5677b36Schristos # DJGPP does not support shared libraries at all 5042*b5677b36Schristos _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 5043*b5677b36Schristos ;; 5044*b5677b36Schristos interix[[3-9]]*) 5045*b5677b36Schristos # Interix 3.x gcc -fpic/-fPIC options generate broken code. 5046*b5677b36Schristos # Instead, we relocate shared libraries at runtime. 5047*b5677b36Schristos ;; 5048*b5677b36Schristos sysv4*MP*) 5049*b5677b36Schristos if test -d /usr/nec; then 5050*b5677b36Schristos _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 5051*b5677b36Schristos fi 5052*b5677b36Schristos ;; 5053*b5677b36Schristos hpux*) 5054*b5677b36Schristos # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 5055*b5677b36Schristos # not for PA HP-UX. 5056*b5677b36Schristos case $host_cpu in 5057*b5677b36Schristos hppa*64*|ia64*) 5058*b5677b36Schristos ;; 5059*b5677b36Schristos *) 5060*b5677b36Schristos _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5061*b5677b36Schristos ;; 5062*b5677b36Schristos esac 5063*b5677b36Schristos ;; 5064*b5677b36Schristos *) 5065*b5677b36Schristos _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5066*b5677b36Schristos ;; 5067*b5677b36Schristos esac 5068*b5677b36Schristos else 5069*b5677b36Schristos case $host_os in 5070*b5677b36Schristos aix[[4-9]]*) 5071*b5677b36Schristos # All AIX code is PIC. 5072*b5677b36Schristos if test "$host_cpu" = ia64; then 5073*b5677b36Schristos # AIX 5 now supports IA64 processor 5074*b5677b36Schristos _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5075*b5677b36Schristos else 5076*b5677b36Schristos _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 5077*b5677b36Schristos fi 5078*b5677b36Schristos ;; 5079*b5677b36Schristos chorus*) 5080*b5677b36Schristos case $cc_basename in 5081*b5677b36Schristos cxch68*) 5082*b5677b36Schristos # Green Hills C++ Compiler 5083*b5677b36Schristos # _LT_AC_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" 5084*b5677b36Schristos ;; 5085*b5677b36Schristos esac 5086*b5677b36Schristos ;; 5087*b5677b36Schristos darwin*) 5088*b5677b36Schristos # PIC is the default on this platform 5089*b5677b36Schristos # Common symbols not allowed in MH_DYLIB files 5090*b5677b36Schristos case $cc_basename in 5091*b5677b36Schristos xlc*) 5092*b5677b36Schristos _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' 5093*b5677b36Schristos _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5094*b5677b36Schristos ;; 5095*b5677b36Schristos esac 5096*b5677b36Schristos ;; 5097*b5677b36Schristos dgux*) 5098*b5677b36Schristos case $cc_basename in 5099*b5677b36Schristos ec++*) 5100*b5677b36Schristos _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5101*b5677b36Schristos ;; 5102*b5677b36Schristos ghcx*) 5103*b5677b36Schristos # Green Hills C++ Compiler 5104*b5677b36Schristos _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 5105*b5677b36Schristos ;; 5106*b5677b36Schristos *) 5107*b5677b36Schristos ;; 5108*b5677b36Schristos esac 5109*b5677b36Schristos ;; 5110*b5677b36Schristos freebsd* | dragonfly*) 5111*b5677b36Schristos # FreeBSD uses GNU C++ 5112*b5677b36Schristos ;; 5113*b5677b36Schristos hpux9* | hpux10* | hpux11*) 5114*b5677b36Schristos case $cc_basename in 5115*b5677b36Schristos CC*) 5116*b5677b36Schristos _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5117*b5677b36Schristos _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 5118*b5677b36Schristos if test "$host_cpu" != ia64; then 5119*b5677b36Schristos _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 5120*b5677b36Schristos fi 5121*b5677b36Schristos ;; 5122*b5677b36Schristos aCC*) 5123*b5677b36Schristos _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5124*b5677b36Schristos _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 5125*b5677b36Schristos case $host_cpu in 5126*b5677b36Schristos hppa*64*|ia64*) 5127*b5677b36Schristos # +Z the default 5128*b5677b36Schristos ;; 5129*b5677b36Schristos *) 5130*b5677b36Schristos _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 5131*b5677b36Schristos ;; 5132*b5677b36Schristos esac 5133*b5677b36Schristos ;; 5134*b5677b36Schristos *) 5135*b5677b36Schristos ;; 5136*b5677b36Schristos esac 5137*b5677b36Schristos ;; 5138*b5677b36Schristos interix*) 5139*b5677b36Schristos # This is c89, which is MS Visual C++ (no shared libs) 5140*b5677b36Schristos # Anyone wants to do a port? 5141*b5677b36Schristos ;; 5142*b5677b36Schristos irix5* | irix6* | nonstopux*) 5143*b5677b36Schristos case $cc_basename in 5144*b5677b36Schristos CC*) 5145*b5677b36Schristos _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5146*b5677b36Schristos _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5147*b5677b36Schristos # CC pic flag -KPIC is the default. 5148*b5677b36Schristos ;; 5149*b5677b36Schristos *) 5150*b5677b36Schristos ;; 5151*b5677b36Schristos esac 5152*b5677b36Schristos ;; 5153*b5677b36Schristos linux* | k*bsd*-gnu) 5154*b5677b36Schristos case $cc_basename in 5155*b5677b36Schristos KCC*) 5156*b5677b36Schristos # KAI C++ Compiler 5157*b5677b36Schristos _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 5158*b5677b36Schristos _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5159*b5677b36Schristos ;; 5160*b5677b36Schristos icpc* | ecpc*) 5161*b5677b36Schristos # Intel C++ 5162*b5677b36Schristos _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5163*b5677b36Schristos _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5164*b5677b36Schristos _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' 5165*b5677b36Schristos ;; 5166*b5677b36Schristos pgCC* | pgcpp*) 5167*b5677b36Schristos # Portland Group C++ compiler. 5168*b5677b36Schristos _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5169*b5677b36Schristos _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 5170*b5677b36Schristos _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5171*b5677b36Schristos ;; 5172*b5677b36Schristos cxx*) 5173*b5677b36Schristos # Compaq C++ 5174*b5677b36Schristos # Make sure the PIC flag is empty. It appears that all Alpha 5175*b5677b36Schristos # Linux and Compaq Tru64 Unix objects are PIC. 5176*b5677b36Schristos _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 5177*b5677b36Schristos _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5178*b5677b36Schristos ;; 5179*b5677b36Schristos *) 5180*b5677b36Schristos case `$CC -V 2>&1 | sed 5q` in 5181*b5677b36Schristos *Sun\ C*) 5182*b5677b36Schristos # Sun C++ 5.9 5183*b5677b36Schristos _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5184*b5677b36Schristos _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5185*b5677b36Schristos _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 5186*b5677b36Schristos ;; 5187*b5677b36Schristos esac 5188*b5677b36Schristos ;; 5189*b5677b36Schristos esac 5190*b5677b36Schristos ;; 5191*b5677b36Schristos lynxos*) 5192*b5677b36Schristos ;; 5193*b5677b36Schristos m88k*) 5194*b5677b36Schristos ;; 5195*b5677b36Schristos mvs*) 5196*b5677b36Schristos case $cc_basename in 5197*b5677b36Schristos cxx*) 5198*b5677b36Schristos _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 5199*b5677b36Schristos ;; 5200*b5677b36Schristos *) 5201*b5677b36Schristos ;; 5202*b5677b36Schristos esac 5203*b5677b36Schristos ;; 5204*b5677b36Schristos netbsd*) 5205*b5677b36Schristos ;; 5206*b5677b36Schristos osf3* | osf4* | osf5*) 5207*b5677b36Schristos case $cc_basename in 5208*b5677b36Schristos KCC*) 5209*b5677b36Schristos _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 5210*b5677b36Schristos ;; 5211*b5677b36Schristos RCC*) 5212*b5677b36Schristos # Rational C++ 2.4.1 5213*b5677b36Schristos _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 5214*b5677b36Schristos ;; 5215*b5677b36Schristos cxx*) 5216*b5677b36Schristos # Digital/Compaq C++ 5217*b5677b36Schristos _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5218*b5677b36Schristos # Make sure the PIC flag is empty. It appears that all Alpha 5219*b5677b36Schristos # Linux and Compaq Tru64 Unix objects are PIC. 5220*b5677b36Schristos _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 5221*b5677b36Schristos _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5222*b5677b36Schristos ;; 5223*b5677b36Schristos *) 5224*b5677b36Schristos ;; 5225*b5677b36Schristos esac 5226*b5677b36Schristos ;; 5227*b5677b36Schristos psos*) 5228*b5677b36Schristos ;; 5229*b5677b36Schristos solaris*) 5230*b5677b36Schristos case $cc_basename in 5231*b5677b36Schristos CC*) 5232*b5677b36Schristos # Sun C++ 4.2, 5.x and Centerline C++ 5233*b5677b36Schristos _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5234*b5677b36Schristos _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5235*b5677b36Schristos _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 5236*b5677b36Schristos ;; 5237*b5677b36Schristos gcx*) 5238*b5677b36Schristos # Green Hills C++ Compiler 5239*b5677b36Schristos _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 5240*b5677b36Schristos ;; 5241*b5677b36Schristos *) 5242*b5677b36Schristos ;; 5243*b5677b36Schristos esac 5244*b5677b36Schristos ;; 5245*b5677b36Schristos sunos4*) 5246*b5677b36Schristos case $cc_basename in 5247*b5677b36Schristos CC*) 5248*b5677b36Schristos # Sun C++ 4.x 5249*b5677b36Schristos _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 5250*b5677b36Schristos _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5251*b5677b36Schristos ;; 5252*b5677b36Schristos lcc*) 5253*b5677b36Schristos # Lucid 5254*b5677b36Schristos _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 5255*b5677b36Schristos ;; 5256*b5677b36Schristos *) 5257*b5677b36Schristos ;; 5258*b5677b36Schristos esac 5259*b5677b36Schristos ;; 5260*b5677b36Schristos tandem*) 5261*b5677b36Schristos case $cc_basename in 5262*b5677b36Schristos NCC*) 5263*b5677b36Schristos # NonStop-UX NCC 3.20 5264*b5677b36Schristos _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5265*b5677b36Schristos ;; 5266*b5677b36Schristos *) 5267*b5677b36Schristos ;; 5268*b5677b36Schristos esac 5269*b5677b36Schristos ;; 5270*b5677b36Schristos sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 5271*b5677b36Schristos case $cc_basename in 5272*b5677b36Schristos CC*) 5273*b5677b36Schristos _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5274*b5677b36Schristos _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5275*b5677b36Schristos _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5276*b5677b36Schristos ;; 5277*b5677b36Schristos esac 5278*b5677b36Schristos ;; 5279*b5677b36Schristos vxworks*) 5280*b5677b36Schristos ;; 5281*b5677b36Schristos *) 5282*b5677b36Schristos _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 5283*b5677b36Schristos ;; 5284*b5677b36Schristos esac 5285*b5677b36Schristos fi 5286*b5677b36Schristos], 5287*b5677b36Schristos[ 5288*b5677b36Schristos if test "$GCC" = yes; then 5289*b5677b36Schristos _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5290*b5677b36Schristos _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' 5291*b5677b36Schristos 5292*b5677b36Schristos case $host_os in 5293*b5677b36Schristos aix*) 5294*b5677b36Schristos # All AIX code is PIC. 5295*b5677b36Schristos if test "$host_cpu" = ia64; then 5296*b5677b36Schristos # AIX 5 now supports IA64 processor 5297*b5677b36Schristos _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5298*b5677b36Schristos fi 5299*b5677b36Schristos ;; 5300*b5677b36Schristos 5301*b5677b36Schristos amigaos*) 5302*b5677b36Schristos # FIXME: we need at least 68020 code to build shared libraries, but 5303*b5677b36Schristos # adding the `-m68020' flag to GCC prevents building anything better, 5304*b5677b36Schristos # like `-m68040'. 5305*b5677b36Schristos _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 5306*b5677b36Schristos ;; 5307*b5677b36Schristos 5308*b5677b36Schristos beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 5309*b5677b36Schristos # PIC is the default for these OSes. 5310*b5677b36Schristos ;; 5311*b5677b36Schristos 5312*b5677b36Schristos mingw* | cygwin* | pw32* | os2*) 5313*b5677b36Schristos # This hack is so that the source file can tell whether it is being 5314*b5677b36Schristos # built for inclusion in a dll (and should export symbols for example). 5315*b5677b36Schristos # Although the cygwin gcc ignores -fPIC, still need this for old-style 5316*b5677b36Schristos # (--disable-auto-import) libraries 5317*b5677b36Schristos m4_if([$1], [GCJ], [], 5318*b5677b36Schristos [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 5319*b5677b36Schristos ;; 5320*b5677b36Schristos 5321*b5677b36Schristos darwin* | rhapsody*) 5322*b5677b36Schristos # PIC is the default on this platform 5323*b5677b36Schristos # Common symbols not allowed in MH_DYLIB files 5324*b5677b36Schristos _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 5325*b5677b36Schristos ;; 5326*b5677b36Schristos 5327*b5677b36Schristos interix[[3-9]]*) 5328*b5677b36Schristos # Interix 3.x gcc -fpic/-fPIC options generate broken code. 5329*b5677b36Schristos # Instead, we relocate shared libraries at runtime. 5330*b5677b36Schristos ;; 5331*b5677b36Schristos 5332*b5677b36Schristos msdosdjgpp*) 5333*b5677b36Schristos # Just because we use GCC doesn't mean we suddenly get shared libraries 5334*b5677b36Schristos # on systems that don't support them. 5335*b5677b36Schristos _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 5336*b5677b36Schristos enable_shared=no 5337*b5677b36Schristos ;; 5338*b5677b36Schristos 5339*b5677b36Schristos sysv4*MP*) 5340*b5677b36Schristos if test -d /usr/nec; then 5341*b5677b36Schristos _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 5342*b5677b36Schristos fi 5343*b5677b36Schristos ;; 5344*b5677b36Schristos 5345*b5677b36Schristos hpux*) 5346*b5677b36Schristos # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 5347*b5677b36Schristos # not for PA HP-UX. 5348*b5677b36Schristos case $host_cpu in 5349*b5677b36Schristos hppa*64*|ia64*) 5350*b5677b36Schristos # +Z the default 5351*b5677b36Schristos ;; 5352*b5677b36Schristos *) 5353*b5677b36Schristos _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5354*b5677b36Schristos ;; 5355*b5677b36Schristos esac 5356*b5677b36Schristos ;; 5357*b5677b36Schristos 5358*b5677b36Schristos *) 5359*b5677b36Schristos _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5360*b5677b36Schristos ;; 5361*b5677b36Schristos esac 5362*b5677b36Schristos else 5363*b5677b36Schristos # PORTME Check for flag to pass linker flags through the system compiler. 5364*b5677b36Schristos case $host_os in 5365*b5677b36Schristos aix*) 5366*b5677b36Schristos _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5367*b5677b36Schristos if test "$host_cpu" = ia64; then 5368*b5677b36Schristos # AIX 5 now supports IA64 processor 5369*b5677b36Schristos _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5370*b5677b36Schristos else 5371*b5677b36Schristos _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 5372*b5677b36Schristos fi 5373*b5677b36Schristos ;; 5374*b5677b36Schristos darwin*) 5375*b5677b36Schristos # PIC is the default on this platform 5376*b5677b36Schristos # Common symbols not allowed in MH_DYLIB files 5377*b5677b36Schristos case $cc_basename in 5378*b5677b36Schristos xlc*) 5379*b5677b36Schristos _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' 5380*b5677b36Schristos _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5381*b5677b36Schristos ;; 5382*b5677b36Schristos esac 5383*b5677b36Schristos ;; 5384*b5677b36Schristos 5385*b5677b36Schristos mingw* | cygwin* | pw32* | os2*) 5386*b5677b36Schristos # This hack is so that the source file can tell whether it is being 5387*b5677b36Schristos # built for inclusion in a dll (and should export symbols for example). 5388*b5677b36Schristos m4_if([$1], [GCJ], [], 5389*b5677b36Schristos [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 5390*b5677b36Schristos ;; 5391*b5677b36Schristos 5392*b5677b36Schristos hpux9* | hpux10* | hpux11*) 5393*b5677b36Schristos _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5394*b5677b36Schristos # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 5395*b5677b36Schristos # not for PA HP-UX. 5396*b5677b36Schristos case $host_cpu in 5397*b5677b36Schristos hppa*64*|ia64*) 5398*b5677b36Schristos # +Z the default 5399*b5677b36Schristos ;; 5400*b5677b36Schristos *) 5401*b5677b36Schristos _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 5402*b5677b36Schristos ;; 5403*b5677b36Schristos esac 5404*b5677b36Schristos # Is there a better lt_prog_compiler_static that works with the bundled CC? 5405*b5677b36Schristos _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 5406*b5677b36Schristos ;; 5407*b5677b36Schristos 5408*b5677b36Schristos irix5* | irix6* | nonstopux*) 5409*b5677b36Schristos _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5410*b5677b36Schristos # PIC (with -KPIC) is the default. 5411*b5677b36Schristos _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5412*b5677b36Schristos ;; 5413*b5677b36Schristos 5414*b5677b36Schristos newsos6) 5415*b5677b36Schristos _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5416*b5677b36Schristos _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5417*b5677b36Schristos ;; 5418*b5677b36Schristos 5419*b5677b36Schristos linux* | k*bsd*-gnu) 5420*b5677b36Schristos case $cc_basename in 5421*b5677b36Schristos icc* | ecc*) 5422*b5677b36Schristos _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5423*b5677b36Schristos _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5424*b5677b36Schristos _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' 5425*b5677b36Schristos ;; 5426*b5677b36Schristos pgcc* | pgf77* | pgf90* | pgf95*) 5427*b5677b36Schristos # Portland Group compilers (*not* the Pentium gcc compiler, 5428*b5677b36Schristos # which looks to be a dead project) 5429*b5677b36Schristos _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5430*b5677b36Schristos _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 5431*b5677b36Schristos _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5432*b5677b36Schristos ;; 5433*b5677b36Schristos ccc*) 5434*b5677b36Schristos _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5435*b5677b36Schristos # All Alpha code is PIC. 5436*b5677b36Schristos _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5437*b5677b36Schristos ;; 5438*b5677b36Schristos *) 5439*b5677b36Schristos case `$CC -V 2>&1 | sed 5q` in 5440*b5677b36Schristos *Sun\ C*) 5441*b5677b36Schristos # Sun C 5.9 5442*b5677b36Schristos _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5443*b5677b36Schristos _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5444*b5677b36Schristos _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5445*b5677b36Schristos ;; 5446*b5677b36Schristos *Sun\ F*) 5447*b5677b36Schristos # Sun Fortran 8.3 passes all unrecognized flags to the linker 5448*b5677b36Schristos _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5449*b5677b36Schristos _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5450*b5677b36Schristos _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='' 5451*b5677b36Schristos ;; 5452*b5677b36Schristos esac 5453*b5677b36Schristos ;; 5454*b5677b36Schristos esac 5455*b5677b36Schristos ;; 5456*b5677b36Schristos 5457*b5677b36Schristos osf3* | osf4* | osf5*) 5458*b5677b36Schristos _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5459*b5677b36Schristos # All OSF/1 code is PIC. 5460*b5677b36Schristos _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5461*b5677b36Schristos ;; 5462*b5677b36Schristos 5463*b5677b36Schristos rdos*) 5464*b5677b36Schristos _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5465*b5677b36Schristos ;; 5466*b5677b36Schristos 5467*b5677b36Schristos solaris*) 5468*b5677b36Schristos _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5469*b5677b36Schristos _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5470*b5677b36Schristos case $cc_basename in 5471*b5677b36Schristos f77* | f90* | f95*) 5472*b5677b36Schristos _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 5473*b5677b36Schristos *) 5474*b5677b36Schristos _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 5475*b5677b36Schristos esac 5476*b5677b36Schristos ;; 5477*b5677b36Schristos 5478*b5677b36Schristos sunos4*) 5479*b5677b36Schristos _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 5480*b5677b36Schristos _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 5481*b5677b36Schristos _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5482*b5677b36Schristos ;; 5483*b5677b36Schristos 5484*b5677b36Schristos sysv4 | sysv4.2uw2* | sysv4.3*) 5485*b5677b36Schristos _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5486*b5677b36Schristos _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5487*b5677b36Schristos _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5488*b5677b36Schristos ;; 5489*b5677b36Schristos 5490*b5677b36Schristos sysv4*MP*) 5491*b5677b36Schristos if test -d /usr/nec ;then 5492*b5677b36Schristos _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 5493*b5677b36Schristos _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5494*b5677b36Schristos fi 5495*b5677b36Schristos ;; 5496*b5677b36Schristos 5497*b5677b36Schristos sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 5498*b5677b36Schristos _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5499*b5677b36Schristos _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5500*b5677b36Schristos _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5501*b5677b36Schristos ;; 5502*b5677b36Schristos 5503*b5677b36Schristos unicos*) 5504*b5677b36Schristos _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5505*b5677b36Schristos _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 5506*b5677b36Schristos ;; 5507*b5677b36Schristos 5508*b5677b36Schristos uts4*) 5509*b5677b36Schristos _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 5510*b5677b36Schristos _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5511*b5677b36Schristos ;; 5512*b5677b36Schristos 5513*b5677b36Schristos *) 5514*b5677b36Schristos _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 5515*b5677b36Schristos ;; 5516*b5677b36Schristos esac 5517*b5677b36Schristos fi 5518*b5677b36Schristos]) 5519*b5677b36SchristosAC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)]) 5520*b5677b36Schristos 5521*b5677b36Schristos# 5522*b5677b36Schristos# Check to make sure the PIC flag actually works. 5523*b5677b36Schristos# 5524*b5677b36Schristosif test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then 5525*b5677b36Schristos AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works], 5526*b5677b36Schristos _LT_AC_TAGVAR(lt_cv_prog_compiler_pic_works, $1), 5527*b5677b36Schristos [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [], 5528*b5677b36Schristos [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in 5529*b5677b36Schristos "" | " "*) ;; 5530*b5677b36Schristos *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;; 5531*b5677b36Schristos esac], 5532*b5677b36Schristos [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 5533*b5677b36Schristos _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 5534*b5677b36Schristosfi 5535*b5677b36Schristoscase $host_os in 5536*b5677b36Schristos # For platforms which do not support PIC, -DPIC is meaningless: 5537*b5677b36Schristos *djgpp*) 5538*b5677b36Schristos _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 5539*b5677b36Schristos ;; 5540*b5677b36Schristos *) 5541*b5677b36Schristos _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])" 5542*b5677b36Schristos ;; 5543*b5677b36Schristosesac 5544*b5677b36Schristos 5545*b5677b36Schristos# 5546*b5677b36Schristos# Check to make sure the static flag actually works. 5547*b5677b36Schristos# 5548*b5677b36Schristoswl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\" 5549*b5677b36SchristosAC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 5550*b5677b36Schristos _LT_AC_TAGVAR(lt_cv_prog_compiler_static_works, $1), 5551*b5677b36Schristos $lt_tmp_static_flag, 5552*b5677b36Schristos [], 5553*b5677b36Schristos [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=]) 5554*b5677b36Schristos]) 5555*b5677b36Schristos 5556*b5677b36Schristos 5557*b5677b36Schristos# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME]) 5558*b5677b36Schristos# ------------------------------------ 5559*b5677b36Schristos# See if the linker supports building shared libraries. 5560*b5677b36SchristosAC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS], 5561*b5677b36Schristos[AC_REQUIRE([LT_AC_PROG_SED])dnl 5562*b5677b36SchristosAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 5563*b5677b36Schristosifelse([$1],[CXX],[ 5564*b5677b36Schristos _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 5565*b5677b36Schristos case $host_os in 5566*b5677b36Schristos aix[[4-9]]*) 5567*b5677b36Schristos # If we're using GNU nm, then we don't want the "-C" option. 5568*b5677b36Schristos # -C means demangle to AIX nm, but means don't demangle with GNU nm 5569*b5677b36Schristos if $NM -V 2>&1 | grep 'GNU' > /dev/null; then 5570*b5677b36Schristos _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' 5571*b5677b36Schristos else 5572*b5677b36Schristos _LT_AC_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' 5573*b5677b36Schristos fi 5574*b5677b36Schristos ;; 5575*b5677b36Schristos pw32*) 5576*b5677b36Schristos _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" 5577*b5677b36Schristos ;; 5578*b5677b36Schristos cygwin* | mingw*) 5579*b5677b36Schristos _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' 5580*b5677b36Schristos ;; 5581*b5677b36Schristos *) 5582*b5677b36Schristos _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 5583*b5677b36Schristos ;; 5584*b5677b36Schristos esac 5585*b5677b36Schristos _LT_AC_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 5586*b5677b36Schristos],[ 5587*b5677b36Schristos runpath_var= 5588*b5677b36Schristos _LT_AC_TAGVAR(allow_undefined_flag, $1)= 5589*b5677b36Schristos _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no 5590*b5677b36Schristos _LT_AC_TAGVAR(archive_cmds, $1)= 5591*b5677b36Schristos _LT_AC_TAGVAR(archive_expsym_cmds, $1)= 5592*b5677b36Schristos _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)= 5593*b5677b36Schristos _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)= 5594*b5677b36Schristos _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= 5595*b5677b36Schristos _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 5596*b5677b36Schristos _LT_AC_TAGVAR(thread_safe_flag_spec, $1)= 5597*b5677b36Schristos _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= 5598*b5677b36Schristos _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 5599*b5677b36Schristos _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 5600*b5677b36Schristos _LT_AC_TAGVAR(hardcode_direct, $1)=no 5601*b5677b36Schristos _LT_AC_TAGVAR(hardcode_minus_L, $1)=no 5602*b5677b36Schristos _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 5603*b5677b36Schristos _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown 5604*b5677b36Schristos _LT_AC_TAGVAR(hardcode_automatic, $1)=no 5605*b5677b36Schristos _LT_AC_TAGVAR(module_cmds, $1)= 5606*b5677b36Schristos _LT_AC_TAGVAR(module_expsym_cmds, $1)= 5607*b5677b36Schristos _LT_AC_TAGVAR(always_export_symbols, $1)=no 5608*b5677b36Schristos _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 5609*b5677b36Schristos # include_expsyms should be a list of space-separated symbols to be *always* 5610*b5677b36Schristos # included in the symbol list 5611*b5677b36Schristos _LT_AC_TAGVAR(include_expsyms, $1)= 5612*b5677b36Schristos # exclude_expsyms can be an extended regexp of symbols to exclude 5613*b5677b36Schristos # it will be wrapped by ` (' and `)$', so one must not match beginning or 5614*b5677b36Schristos # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', 5615*b5677b36Schristos # as well as any symbol that contains `d'. 5616*b5677b36Schristos _LT_AC_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 5617*b5677b36Schristos # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 5618*b5677b36Schristos # platforms (ab)use it in PIC code, but their linkers get confused if 5619*b5677b36Schristos # the symbol is explicitly referenced. Since portable code cannot 5620*b5677b36Schristos # rely on this symbol name, it's probably fine to never include it in 5621*b5677b36Schristos # preloaded symbol tables. 5622*b5677b36Schristos # Exclude shared library initialization/finalization symbols. 5623*b5677b36Schristosdnl Note also adjust exclude_expsyms for C++ above. 5624*b5677b36Schristos extract_expsyms_cmds= 5625*b5677b36Schristos # Just being paranoid about ensuring that cc_basename is set. 5626*b5677b36Schristos _LT_CC_BASENAME([$compiler]) 5627*b5677b36Schristos case $host_os in 5628*b5677b36Schristos cygwin* | mingw* | pw32*) 5629*b5677b36Schristos # FIXME: the MSVC++ port hasn't been tested in a loooong time 5630*b5677b36Schristos # When not using gcc, we currently assume that we are using 5631*b5677b36Schristos # Microsoft Visual C++. 5632*b5677b36Schristos if test "$GCC" != yes; then 5633*b5677b36Schristos with_gnu_ld=no 5634*b5677b36Schristos fi 5635*b5677b36Schristos ;; 5636*b5677b36Schristos interix*) 5637*b5677b36Schristos # we just hope/assume this is gcc and not c89 (= MSVC++) 5638*b5677b36Schristos with_gnu_ld=yes 5639*b5677b36Schristos ;; 5640*b5677b36Schristos openbsd*) 5641*b5677b36Schristos with_gnu_ld=no 5642*b5677b36Schristos ;; 5643*b5677b36Schristos esac 5644*b5677b36Schristos 5645*b5677b36Schristos _LT_AC_TAGVAR(ld_shlibs, $1)=yes 5646*b5677b36Schristos if test "$with_gnu_ld" = yes; then 5647*b5677b36Schristos # If archive_cmds runs LD, not CC, wlarc should be empty 5648*b5677b36Schristos wlarc='${wl}' 5649*b5677b36Schristos 5650*b5677b36Schristos # Set some defaults for GNU ld with shared library support. These 5651*b5677b36Schristos # are reset later if shared libraries are not supported. Putting them 5652*b5677b36Schristos # here allows them to be overridden if necessary. 5653*b5677b36Schristos runpath_var=LD_RUN_PATH 5654*b5677b36Schristos _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 5655*b5677b36Schristos _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 5656*b5677b36Schristos # ancient GNU ld didn't support --whole-archive et. al. 5657*b5677b36Schristos if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then 5658*b5677b36Schristos _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 5659*b5677b36Schristos else 5660*b5677b36Schristos _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 5661*b5677b36Schristos fi 5662*b5677b36Schristos supports_anon_versioning=no 5663*b5677b36Schristos case `$LD -v 2>/dev/null` in 5664*b5677b36Schristos *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 5665*b5677b36Schristos *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 5666*b5677b36Schristos *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 5667*b5677b36Schristos *\ 2.11.*) ;; # other 2.11 versions 5668*b5677b36Schristos *) supports_anon_versioning=yes ;; 5669*b5677b36Schristos esac 5670*b5677b36Schristos 5671*b5677b36Schristos # See if GNU ld supports shared libraries. 5672*b5677b36Schristos case $host_os in 5673*b5677b36Schristos aix[[3-9]]*) 5674*b5677b36Schristos # On AIX/PPC, the GNU linker is very broken 5675*b5677b36Schristos if test "$host_cpu" != ia64; then 5676*b5677b36Schristos _LT_AC_TAGVAR(ld_shlibs, $1)=no 5677*b5677b36Schristos cat <<EOF 1>&2 5678*b5677b36Schristos 5679*b5677b36Schristos*** Warning: the GNU linker, at least up to release 2.9.1, is reported 5680*b5677b36Schristos*** to be unable to reliably create shared libraries on AIX. 5681*b5677b36Schristos*** Therefore, libtool is disabling shared libraries support. If you 5682*b5677b36Schristos*** really care for shared libraries, you may want to modify your PATH 5683*b5677b36Schristos*** so that a non-GNU linker is found, and then restart. 5684*b5677b36Schristos 5685*b5677b36SchristosEOF 5686*b5677b36Schristos fi 5687*b5677b36Schristos ;; 5688*b5677b36Schristos 5689*b5677b36Schristos amigaos*) 5690*b5677b36Schristos _LT_AC_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)' 5691*b5677b36Schristos _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5692*b5677b36Schristos _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 5693*b5677b36Schristos 5694*b5677b36Schristos # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports 5695*b5677b36Schristos # that the semantics of dynamic libraries on AmigaOS, at least up 5696*b5677b36Schristos # to version 4, is to share data among multiple programs linked 5697*b5677b36Schristos # with the same dynamic library. Since this doesn't match the 5698*b5677b36Schristos # behavior of shared libraries on other platforms, we can't use 5699*b5677b36Schristos # them. 5700*b5677b36Schristos _LT_AC_TAGVAR(ld_shlibs, $1)=no 5701*b5677b36Schristos ;; 5702*b5677b36Schristos 5703*b5677b36Schristos beos*) 5704*b5677b36Schristos if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 5705*b5677b36Schristos _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 5706*b5677b36Schristos # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 5707*b5677b36Schristos # support --undefined. This deserves some investigation. FIXME 5708*b5677b36Schristos _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5709*b5677b36Schristos else 5710*b5677b36Schristos _LT_AC_TAGVAR(ld_shlibs, $1)=no 5711*b5677b36Schristos fi 5712*b5677b36Schristos ;; 5713*b5677b36Schristos 5714*b5677b36Schristos cygwin* | mingw* | pw32*) 5715*b5677b36Schristos # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 5716*b5677b36Schristos # as there is no search path for DLLs. 5717*b5677b36Schristos _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5718*b5677b36Schristos _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 5719*b5677b36Schristos _LT_AC_TAGVAR(always_export_symbols, $1)=no 5720*b5677b36Schristos _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5721*b5677b36Schristos _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' 5722*b5677b36Schristos 5723*b5677b36Schristos if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then 5724*b5677b36Schristos _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 5725*b5677b36Schristos # If the export-symbols file already is a .def file (1st line 5726*b5677b36Schristos # is EXPORTS), use it as is; otherwise, prepend... 5727*b5677b36Schristos _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 5728*b5677b36Schristos cp $export_symbols $output_objdir/$soname.def; 5729*b5677b36Schristos else 5730*b5677b36Schristos echo EXPORTS > $output_objdir/$soname.def; 5731*b5677b36Schristos cat $export_symbols >> $output_objdir/$soname.def; 5732*b5677b36Schristos fi~ 5733*b5677b36Schristos $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 5734*b5677b36Schristos else 5735*b5677b36Schristos _LT_AC_TAGVAR(ld_shlibs, $1)=no 5736*b5677b36Schristos fi 5737*b5677b36Schristos ;; 5738*b5677b36Schristos 5739*b5677b36Schristos interix[[3-9]]*) 5740*b5677b36Schristos _LT_AC_TAGVAR(hardcode_direct, $1)=no 5741*b5677b36Schristos _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 5742*b5677b36Schristos _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 5743*b5677b36Schristos _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 5744*b5677b36Schristos # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 5745*b5677b36Schristos # Instead, shared libraries are loaded at an image base (0x10000000 by 5746*b5677b36Schristos # default) and relocated if they conflict, which is a slow very memory 5747*b5677b36Schristos # consuming and fragmenting process. To avoid this, we pick a random, 5748*b5677b36Schristos # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 5749*b5677b36Schristos # time. Moving up from 0x10000000 also allows more sbrk(2) space. 5750*b5677b36Schristos _LT_AC_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' 5751*b5677b36Schristos _LT_AC_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' 5752*b5677b36Schristos ;; 5753*b5677b36Schristos 5754*b5677b36Schristos gnu* | linux* | k*bsd*-gnu) 5755*b5677b36Schristos if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 5756*b5677b36Schristos tmp_addflag= 5757*b5677b36Schristos case $cc_basename,$host_cpu in 5758*b5677b36Schristos pgcc*) # Portland Group C compiler 5759*b5677b36Schristos _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' 5760*b5677b36Schristos tmp_addflag=' $pic_flag' 5761*b5677b36Schristos ;; 5762*b5677b36Schristos pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers 5763*b5677b36Schristos _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' 5764*b5677b36Schristos tmp_addflag=' $pic_flag -Mnomain' ;; 5765*b5677b36Schristos ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 5766*b5677b36Schristos tmp_addflag=' -i_dynamic' ;; 5767*b5677b36Schristos efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 5768*b5677b36Schristos tmp_addflag=' -i_dynamic -nofor_main' ;; 5769*b5677b36Schristos ifc* | ifort*) # Intel Fortran compiler 5770*b5677b36Schristos tmp_addflag=' -nofor_main' ;; 5771*b5677b36Schristos esac 5772*b5677b36Schristos case `$CC -V 2>&1 | sed 5q` in 5773*b5677b36Schristos *Sun\ C*) # Sun C 5.9 5774*b5677b36Schristos _LT_AC_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; $echo \"$new_convenience\"` ${wl}--no-whole-archive' 5775*b5677b36Schristos tmp_sharedflag='-G' ;; 5776*b5677b36Schristos *Sun\ F*) # Sun Fortran 8.3 5777*b5677b36Schristos tmp_sharedflag='-G' ;; 5778*b5677b36Schristos *) 5779*b5677b36Schristos tmp_sharedflag='-shared' ;; 5780*b5677b36Schristos esac 5781*b5677b36Schristos _LT_AC_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5782*b5677b36Schristos 5783*b5677b36Schristos if test $supports_anon_versioning = yes; then 5784*b5677b36Schristos _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~ 5785*b5677b36Schristos cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 5786*b5677b36Schristos $echo "local: *; };" >> $output_objdir/$libname.ver~ 5787*b5677b36Schristos $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 5788*b5677b36Schristos fi 5789*b5677b36Schristos else 5790*b5677b36Schristos _LT_AC_TAGVAR(ld_shlibs, $1)=no 5791*b5677b36Schristos fi 5792*b5677b36Schristos ;; 5793*b5677b36Schristos 5794*b5677b36Schristos netbsd*) 5795*b5677b36Schristos if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then 5796*b5677b36Schristos _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 5797*b5677b36Schristos wlarc= 5798*b5677b36Schristos else 5799*b5677b36Schristos _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5800*b5677b36Schristos _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' 5801*b5677b36Schristos fi 5802*b5677b36Schristos ;; 5803*b5677b36Schristos 5804*b5677b36Schristos solaris*) 5805*b5677b36Schristos if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then 5806*b5677b36Schristos _LT_AC_TAGVAR(ld_shlibs, $1)=no 5807*b5677b36Schristos cat <<EOF 1>&2 5808*b5677b36Schristos 5809*b5677b36Schristos*** Warning: The releases 2.8.* of the GNU linker cannot reliably 5810*b5677b36Schristos*** create shared libraries on Solaris systems. Therefore, libtool 5811*b5677b36Schristos*** is disabling shared libraries support. We urge you to upgrade GNU 5812*b5677b36Schristos*** binutils to release 2.9.1 or newer. Another option is to modify 5813*b5677b36Schristos*** your PATH or compiler configuration so that the native linker is 5814*b5677b36Schristos*** used, and then restart. 5815*b5677b36Schristos 5816*b5677b36SchristosEOF 5817*b5677b36Schristos elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 5818*b5677b36Schristos _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5819*b5677b36Schristos _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' 5820*b5677b36Schristos else 5821*b5677b36Schristos _LT_AC_TAGVAR(ld_shlibs, $1)=no 5822*b5677b36Schristos fi 5823*b5677b36Schristos ;; 5824*b5677b36Schristos 5825*b5677b36Schristos sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 5826*b5677b36Schristos case `$LD -v 2>&1` in 5827*b5677b36Schristos *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 5828*b5677b36Schristos _LT_AC_TAGVAR(ld_shlibs, $1)=no 5829*b5677b36Schristos cat <<_LT_EOF 1>&2 5830*b5677b36Schristos 5831*b5677b36Schristos*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not 5832*b5677b36Schristos*** reliably create shared libraries on SCO systems. Therefore, libtool 5833*b5677b36Schristos*** is disabling shared libraries support. We urge you to upgrade GNU 5834*b5677b36Schristos*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 5835*b5677b36Schristos*** your PATH or compiler configuration so that the native linker is 5836*b5677b36Schristos*** used, and then restart. 5837*b5677b36Schristos 5838*b5677b36Schristos_LT_EOF 5839*b5677b36Schristos ;; 5840*b5677b36Schristos *) 5841*b5677b36Schristos if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 5842*b5677b36Schristos _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' 5843*b5677b36Schristos _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' 5844*b5677b36Schristos _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' 5845*b5677b36Schristos else 5846*b5677b36Schristos _LT_AC_TAGVAR(ld_shlibs, $1)=no 5847*b5677b36Schristos fi 5848*b5677b36Schristos ;; 5849*b5677b36Schristos esac 5850*b5677b36Schristos ;; 5851*b5677b36Schristos 5852*b5677b36Schristos sunos4*) 5853*b5677b36Schristos _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 5854*b5677b36Schristos wlarc= 5855*b5677b36Schristos _LT_AC_TAGVAR(hardcode_direct, $1)=yes 5856*b5677b36Schristos _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 5857*b5677b36Schristos ;; 5858*b5677b36Schristos 5859*b5677b36Schristos *) 5860*b5677b36Schristos if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 5861*b5677b36Schristos _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5862*b5677b36Schristos _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' 5863*b5677b36Schristos else 5864*b5677b36Schristos _LT_AC_TAGVAR(ld_shlibs, $1)=no 5865*b5677b36Schristos fi 5866*b5677b36Schristos ;; 5867*b5677b36Schristos esac 5868*b5677b36Schristos 5869*b5677b36Schristos if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then 5870*b5677b36Schristos runpath_var= 5871*b5677b36Schristos _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= 5872*b5677b36Schristos _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= 5873*b5677b36Schristos _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 5874*b5677b36Schristos fi 5875*b5677b36Schristos else 5876*b5677b36Schristos # PORTME fill in a description of your system's linker (not GNU ld) 5877*b5677b36Schristos case $host_os in 5878*b5677b36Schristos aix3*) 5879*b5677b36Schristos _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 5880*b5677b36Schristos _LT_AC_TAGVAR(always_export_symbols, $1)=yes 5881*b5677b36Schristos _LT_AC_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' 5882*b5677b36Schristos # Note: this linker hardcodes the directories in LIBPATH if there 5883*b5677b36Schristos # are no directories specified by -L. 5884*b5677b36Schristos _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 5885*b5677b36Schristos if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then 5886*b5677b36Schristos # Neither direct hardcoding nor static linking is supported with a 5887*b5677b36Schristos # broken collect2. 5888*b5677b36Schristos _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported 5889*b5677b36Schristos fi 5890*b5677b36Schristos ;; 5891*b5677b36Schristos 5892*b5677b36Schristos aix[[4-9]]*) 5893*b5677b36Schristos if test "$host_cpu" = ia64; then 5894*b5677b36Schristos # On IA64, the linker does run time linking by default, so we don't 5895*b5677b36Schristos # have to do anything special. 5896*b5677b36Schristos aix_use_runtimelinking=no 5897*b5677b36Schristos exp_sym_flag='-Bexport' 5898*b5677b36Schristos no_entry_flag="" 5899*b5677b36Schristos else 5900*b5677b36Schristos # If we're using GNU nm, then we don't want the "-C" option. 5901*b5677b36Schristos # -C means demangle to AIX nm, but means don't demangle with GNU nm 5902*b5677b36Schristos if $NM -V 2>&1 | grep 'GNU' > /dev/null; then 5903*b5677b36Schristos _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' 5904*b5677b36Schristos else 5905*b5677b36Schristos _LT_AC_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' 5906*b5677b36Schristos fi 5907*b5677b36Schristos aix_use_runtimelinking=no 5908*b5677b36Schristos 5909*b5677b36Schristos # Test if we are trying to use run time linking or normal 5910*b5677b36Schristos # AIX style linking. If -brtl is somewhere in LDFLAGS, we 5911*b5677b36Schristos # need to do runtime linking. 5912*b5677b36Schristos case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 5913*b5677b36Schristos for ld_flag in $LDFLAGS; do 5914*b5677b36Schristos if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then 5915*b5677b36Schristos aix_use_runtimelinking=yes 5916*b5677b36Schristos break 5917*b5677b36Schristos fi 5918*b5677b36Schristos done 5919*b5677b36Schristos ;; 5920*b5677b36Schristos esac 5921*b5677b36Schristos 5922*b5677b36Schristos exp_sym_flag='-bexport' 5923*b5677b36Schristos no_entry_flag='-bnoentry' 5924*b5677b36Schristos fi 5925*b5677b36Schristos 5926*b5677b36Schristos # When large executables or shared objects are built, AIX ld can 5927*b5677b36Schristos # have problems creating the table of contents. If linking a library 5928*b5677b36Schristos # or program results in "error TOC overflow" add -mminimal-toc to 5929*b5677b36Schristos # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 5930*b5677b36Schristos # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 5931*b5677b36Schristos 5932*b5677b36Schristos _LT_AC_TAGVAR(archive_cmds, $1)='' 5933*b5677b36Schristos _LT_AC_TAGVAR(hardcode_direct, $1)=yes 5934*b5677b36Schristos _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' 5935*b5677b36Schristos _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 5936*b5677b36Schristos 5937*b5677b36Schristos if test "$GCC" = yes; then 5938*b5677b36Schristos case $host_os in aix4.[[012]]|aix4.[[012]].*) 5939*b5677b36Schristos # We only want to do this on AIX 4.2 and lower, the check 5940*b5677b36Schristos # below for broken collect2 doesn't work under 4.3+ 5941*b5677b36Schristos collect2name=`${CC} -print-prog-name=collect2` 5942*b5677b36Schristos if test -f "$collect2name" && \ 5943*b5677b36Schristos strings "$collect2name" | grep resolve_lib_name >/dev/null 5944*b5677b36Schristos then 5945*b5677b36Schristos # We have reworked collect2 5946*b5677b36Schristos : 5947*b5677b36Schristos else 5948*b5677b36Schristos # We have old collect2 5949*b5677b36Schristos _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported 5950*b5677b36Schristos # It fails to find uninstalled libraries when the uninstalled 5951*b5677b36Schristos # path is not listed in the libpath. Setting hardcode_minus_L 5952*b5677b36Schristos # to unsupported forces relinking 5953*b5677b36Schristos _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 5954*b5677b36Schristos _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5955*b5677b36Schristos _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 5956*b5677b36Schristos fi 5957*b5677b36Schristos ;; 5958*b5677b36Schristos esac 5959*b5677b36Schristos shared_flag='-shared' 5960*b5677b36Schristos if test "$aix_use_runtimelinking" = yes; then 5961*b5677b36Schristos shared_flag="$shared_flag "'${wl}-G' 5962*b5677b36Schristos fi 5963*b5677b36Schristos else 5964*b5677b36Schristos # not using gcc 5965*b5677b36Schristos if test "$host_cpu" = ia64; then 5966*b5677b36Schristos # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 5967*b5677b36Schristos # chokes on -Wl,-G. The following line is correct: 5968*b5677b36Schristos shared_flag='-G' 5969*b5677b36Schristos else 5970*b5677b36Schristos if test "$aix_use_runtimelinking" = yes; then 5971*b5677b36Schristos shared_flag='${wl}-G' 5972*b5677b36Schristos else 5973*b5677b36Schristos shared_flag='${wl}-bM:SRE' 5974*b5677b36Schristos fi 5975*b5677b36Schristos fi 5976*b5677b36Schristos fi 5977*b5677b36Schristos 5978*b5677b36Schristos # It seems that -bexpall does not export symbols beginning with 5979*b5677b36Schristos # underscore (_), so it is better to generate a list of symbols to export. 5980*b5677b36Schristos _LT_AC_TAGVAR(always_export_symbols, $1)=yes 5981*b5677b36Schristos if test "$aix_use_runtimelinking" = yes; then 5982*b5677b36Schristos # Warning - without using the other runtime loading flags (-brtl), 5983*b5677b36Schristos # -berok will link without error, but may produce a broken library. 5984*b5677b36Schristos _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' 5985*b5677b36Schristos # Determine the default libpath from the value encoded in an empty executable. 5986*b5677b36Schristos _LT_AC_SYS_LIBPATH_AIX 5987*b5677b36Schristos _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 5988*b5677b36Schristos _LT_AC_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 echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" 5989*b5677b36Schristos else 5990*b5677b36Schristos if test "$host_cpu" = ia64; then 5991*b5677b36Schristos _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 5992*b5677b36Schristos _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 5993*b5677b36Schristos _LT_AC_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" 5994*b5677b36Schristos else 5995*b5677b36Schristos # Determine the default libpath from the value encoded in an empty executable. 5996*b5677b36Schristos _LT_AC_SYS_LIBPATH_AIX 5997*b5677b36Schristos _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 5998*b5677b36Schristos # Warning - without using the other run time loading flags, 5999*b5677b36Schristos # -berok will link without error, but may produce a broken library. 6000*b5677b36Schristos _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 6001*b5677b36Schristos _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 6002*b5677b36Schristos # Exported symbols can be pulled into shared objects from archives 6003*b5677b36Schristos _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 6004*b5677b36Schristos _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes 6005*b5677b36Schristos # This is similar to how AIX traditionally builds its shared libraries. 6006*b5677b36Schristos _LT_AC_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' 6007*b5677b36Schristos fi 6008*b5677b36Schristos fi 6009*b5677b36Schristos ;; 6010*b5677b36Schristos 6011*b5677b36Schristos amigaos*) 6012*b5677b36Schristos _LT_AC_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)' 6013*b5677b36Schristos _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6014*b5677b36Schristos _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 6015*b5677b36Schristos # see comment about different semantics on the GNU ld section 6016*b5677b36Schristos _LT_AC_TAGVAR(ld_shlibs, $1)=no 6017*b5677b36Schristos ;; 6018*b5677b36Schristos 6019*b5677b36Schristos bsdi[[45]]*) 6020*b5677b36Schristos _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 6021*b5677b36Schristos ;; 6022*b5677b36Schristos 6023*b5677b36Schristos cygwin* | mingw* | pw32*) 6024*b5677b36Schristos # When not using gcc, we currently assume that we are using 6025*b5677b36Schristos # Microsoft Visual C++. 6026*b5677b36Schristos # hardcode_libdir_flag_spec is actually meaningless, as there is 6027*b5677b36Schristos # no search path for DLLs. 6028*b5677b36Schristos _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 6029*b5677b36Schristos _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 6030*b5677b36Schristos # Tell ltmain to make .lib files, not .a files. 6031*b5677b36Schristos libext=lib 6032*b5677b36Schristos # Tell ltmain to make .dll files, not .so files. 6033*b5677b36Schristos shrext_cmds=".dll" 6034*b5677b36Schristos # FIXME: Setting linknames here is a bad hack. 6035*b5677b36Schristos _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' 6036*b5677b36Schristos # The linker will automatically build a .lib file if we build a DLL. 6037*b5677b36Schristos _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true' 6038*b5677b36Schristos # FIXME: Should let the user specify the lib program. 6039*b5677b36Schristos _LT_AC_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 6040*b5677b36Schristos _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' 6041*b5677b36Schristos _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6042*b5677b36Schristos ;; 6043*b5677b36Schristos 6044*b5677b36Schristos darwin* | rhapsody*) 6045*b5677b36Schristos case $host_os in 6046*b5677b36Schristos rhapsody* | darwin1.[[012]]) 6047*b5677b36Schristos _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' 6048*b5677b36Schristos ;; 6049*b5677b36Schristos *) # Darwin 1.3 on 6050*b5677b36Schristos if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then 6051*b5677b36Schristos _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' 6052*b5677b36Schristos else 6053*b5677b36Schristos case ${MACOSX_DEPLOYMENT_TARGET} in 6054*b5677b36Schristos 10.[[012]]) 6055*b5677b36Schristos _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' 6056*b5677b36Schristos ;; 6057*b5677b36Schristos 10.*) 6058*b5677b36Schristos _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup' 6059*b5677b36Schristos ;; 6060*b5677b36Schristos esac 6061*b5677b36Schristos fi 6062*b5677b36Schristos ;; 6063*b5677b36Schristos esac 6064*b5677b36Schristos _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 6065*b5677b36Schristos _LT_AC_TAGVAR(hardcode_direct, $1)=no 6066*b5677b36Schristos _LT_AC_TAGVAR(hardcode_automatic, $1)=yes 6067*b5677b36Schristos _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 6068*b5677b36Schristos _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' 6069*b5677b36Schristos _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 6070*b5677b36Schristos if test "$GCC" = yes ; then 6071*b5677b36Schristos output_verbose_link_cmd='echo' 6072*b5677b36Schristos _LT_AC_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}" 6073*b5677b36Schristos _LT_AC_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" 6074*b5677b36Schristos _LT_AC_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}" 6075*b5677b36Schristos _LT_AC_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}" 6076*b5677b36Schristos else 6077*b5677b36Schristos case $cc_basename in 6078*b5677b36Schristos xlc*) 6079*b5677b36Schristos output_verbose_link_cmd='echo' 6080*b5677b36Schristos _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' 6081*b5677b36Schristos _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' 6082*b5677b36Schristos # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds 6083*b5677b36Schristos _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' 6084*b5677b36Schristos _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' 6085*b5677b36Schristos ;; 6086*b5677b36Schristos *) 6087*b5677b36Schristos _LT_AC_TAGVAR(ld_shlibs, $1)=no 6088*b5677b36Schristos ;; 6089*b5677b36Schristos esac 6090*b5677b36Schristos fi 6091*b5677b36Schristos ;; 6092*b5677b36Schristos 6093*b5677b36Schristos dgux*) 6094*b5677b36Schristos _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6095*b5677b36Schristos _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6096*b5677b36Schristos _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6097*b5677b36Schristos ;; 6098*b5677b36Schristos 6099*b5677b36Schristos freebsd1*) 6100*b5677b36Schristos _LT_AC_TAGVAR(ld_shlibs, $1)=no 6101*b5677b36Schristos ;; 6102*b5677b36Schristos 6103*b5677b36Schristos # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 6104*b5677b36Schristos # support. Future versions do this automatically, but an explicit c++rt0.o 6105*b5677b36Schristos # does not break anything, and helps significantly (at the cost of a little 6106*b5677b36Schristos # extra space). 6107*b5677b36Schristos freebsd2.2*) 6108*b5677b36Schristos _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 6109*b5677b36Schristos _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6110*b5677b36Schristos _LT_AC_TAGVAR(hardcode_direct, $1)=yes 6111*b5677b36Schristos _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6112*b5677b36Schristos ;; 6113*b5677b36Schristos 6114*b5677b36Schristos # Unfortunately, older versions of FreeBSD 2 do not have this feature. 6115*b5677b36Schristos freebsd2*) 6116*b5677b36Schristos _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 6117*b5677b36Schristos _LT_AC_TAGVAR(hardcode_direct, $1)=yes 6118*b5677b36Schristos _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 6119*b5677b36Schristos _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6120*b5677b36Schristos ;; 6121*b5677b36Schristos 6122*b5677b36Schristos # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 6123*b5677b36Schristos freebsd* | dragonfly*) 6124*b5677b36Schristos _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' 6125*b5677b36Schristos _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6126*b5677b36Schristos _LT_AC_TAGVAR(hardcode_direct, $1)=yes 6127*b5677b36Schristos _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6128*b5677b36Schristos ;; 6129*b5677b36Schristos 6130*b5677b36Schristos hpux9*) 6131*b5677b36Schristos if test "$GCC" = yes; then 6132*b5677b36Schristos _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' 6133*b5677b36Schristos else 6134*b5677b36Schristos _LT_AC_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' 6135*b5677b36Schristos fi 6136*b5677b36Schristos _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 6137*b5677b36Schristos _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 6138*b5677b36Schristos _LT_AC_TAGVAR(hardcode_direct, $1)=yes 6139*b5677b36Schristos 6140*b5677b36Schristos # hardcode_minus_L: Not really in the search PATH, 6141*b5677b36Schristos # but as the default location of the library. 6142*b5677b36Schristos _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 6143*b5677b36Schristos _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6144*b5677b36Schristos ;; 6145*b5677b36Schristos 6146*b5677b36Schristos hpux10*) 6147*b5677b36Schristos if test "$GCC" = yes -a "$with_gnu_ld" = no; then 6148*b5677b36Schristos _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 6149*b5677b36Schristos else 6150*b5677b36Schristos _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 6151*b5677b36Schristos fi 6152*b5677b36Schristos if test "$with_gnu_ld" = no; then 6153*b5677b36Schristos _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 6154*b5677b36Schristos _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 6155*b5677b36Schristos 6156*b5677b36Schristos _LT_AC_TAGVAR(hardcode_direct, $1)=yes 6157*b5677b36Schristos _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6158*b5677b36Schristos 6159*b5677b36Schristos # hardcode_minus_L: Not really in the search PATH, 6160*b5677b36Schristos # but as the default location of the library. 6161*b5677b36Schristos _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 6162*b5677b36Schristos fi 6163*b5677b36Schristos ;; 6164*b5677b36Schristos 6165*b5677b36Schristos hpux11*) 6166*b5677b36Schristos if test "$GCC" = yes -a "$with_gnu_ld" = no; then 6167*b5677b36Schristos case $host_cpu in 6168*b5677b36Schristos hppa*64*) 6169*b5677b36Schristos _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 6170*b5677b36Schristos ;; 6171*b5677b36Schristos ia64*) 6172*b5677b36Schristos _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 6173*b5677b36Schristos ;; 6174*b5677b36Schristos *) 6175*b5677b36Schristos _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 6176*b5677b36Schristos ;; 6177*b5677b36Schristos esac 6178*b5677b36Schristos else 6179*b5677b36Schristos case $host_cpu in 6180*b5677b36Schristos hppa*64*) 6181*b5677b36Schristos _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 6182*b5677b36Schristos ;; 6183*b5677b36Schristos ia64*) 6184*b5677b36Schristos _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 6185*b5677b36Schristos ;; 6186*b5677b36Schristos *) 6187*b5677b36Schristos _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 6188*b5677b36Schristos ;; 6189*b5677b36Schristos esac 6190*b5677b36Schristos fi 6191*b5677b36Schristos if test "$with_gnu_ld" = no; then 6192*b5677b36Schristos _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 6193*b5677b36Schristos _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 6194*b5677b36Schristos 6195*b5677b36Schristos case $host_cpu in 6196*b5677b36Schristos hppa*64*|ia64*) 6197*b5677b36Schristos _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' 6198*b5677b36Schristos _LT_AC_TAGVAR(hardcode_direct, $1)=no 6199*b5677b36Schristos _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6200*b5677b36Schristos ;; 6201*b5677b36Schristos *) 6202*b5677b36Schristos _LT_AC_TAGVAR(hardcode_direct, $1)=yes 6203*b5677b36Schristos _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6204*b5677b36Schristos 6205*b5677b36Schristos # hardcode_minus_L: Not really in the search PATH, 6206*b5677b36Schristos # but as the default location of the library. 6207*b5677b36Schristos _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 6208*b5677b36Schristos ;; 6209*b5677b36Schristos esac 6210*b5677b36Schristos fi 6211*b5677b36Schristos ;; 6212*b5677b36Schristos 6213*b5677b36Schristos irix5* | irix6* | nonstopux*) 6214*b5677b36Schristos if test "$GCC" = yes; then 6215*b5677b36Schristos _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 6216*b5677b36Schristos else 6217*b5677b36Schristos _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' 6218*b5677b36Schristos _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' 6219*b5677b36Schristos fi 6220*b5677b36Schristos _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6221*b5677b36Schristos _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 6222*b5677b36Schristos _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 6223*b5677b36Schristos ;; 6224*b5677b36Schristos 6225*b5677b36Schristos netbsd*) 6226*b5677b36Schristos if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then 6227*b5677b36Schristos _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 6228*b5677b36Schristos else 6229*b5677b36Schristos _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 6230*b5677b36Schristos fi 6231*b5677b36Schristos _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6232*b5677b36Schristos _LT_AC_TAGVAR(hardcode_direct, $1)=yes 6233*b5677b36Schristos _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6234*b5677b36Schristos ;; 6235*b5677b36Schristos 6236*b5677b36Schristos newsos6) 6237*b5677b36Schristos _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6238*b5677b36Schristos _LT_AC_TAGVAR(hardcode_direct, $1)=yes 6239*b5677b36Schristos _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6240*b5677b36Schristos _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 6241*b5677b36Schristos _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6242*b5677b36Schristos ;; 6243*b5677b36Schristos 6244*b5677b36Schristos openbsd*) 6245*b5677b36Schristos if test -f /usr/libexec/ld.so; then 6246*b5677b36Schristos _LT_AC_TAGVAR(hardcode_direct, $1)=yes 6247*b5677b36Schristos _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6248*b5677b36Schristos if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 6249*b5677b36Schristos _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 6250*b5677b36Schristos _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' 6251*b5677b36Schristos _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 6252*b5677b36Schristos _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6253*b5677b36Schristos else 6254*b5677b36Schristos case $host_os in 6255*b5677b36Schristos openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) 6256*b5677b36Schristos _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 6257*b5677b36Schristos _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6258*b5677b36Schristos ;; 6259*b5677b36Schristos *) 6260*b5677b36Schristos _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 6261*b5677b36Schristos _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 6262*b5677b36Schristos ;; 6263*b5677b36Schristos esac 6264*b5677b36Schristos fi 6265*b5677b36Schristos else 6266*b5677b36Schristos _LT_AC_TAGVAR(ld_shlibs, $1)=no 6267*b5677b36Schristos fi 6268*b5677b36Schristos ;; 6269*b5677b36Schristos 6270*b5677b36Schristos os2*) 6271*b5677b36Schristos _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6272*b5677b36Schristos _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 6273*b5677b36Schristos _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 6274*b5677b36Schristos _LT_AC_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' 6275*b5677b36Schristos _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' 6276*b5677b36Schristos ;; 6277*b5677b36Schristos 6278*b5677b36Schristos osf3*) 6279*b5677b36Schristos if test "$GCC" = yes; then 6280*b5677b36Schristos _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 6281*b5677b36Schristos _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 6282*b5677b36Schristos else 6283*b5677b36Schristos _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 6284*b5677b36Schristos _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' 6285*b5677b36Schristos fi 6286*b5677b36Schristos _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6287*b5677b36Schristos _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 6288*b5677b36Schristos ;; 6289*b5677b36Schristos 6290*b5677b36Schristos osf4* | osf5*) # as osf3* with the addition of -msym flag 6291*b5677b36Schristos if test "$GCC" = yes; then 6292*b5677b36Schristos _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 6293*b5677b36Schristos _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 6294*b5677b36Schristos _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6295*b5677b36Schristos else 6296*b5677b36Schristos _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 6297*b5677b36Schristos _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' 6298*b5677b36Schristos _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ 6299*b5677b36Schristos $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' 6300*b5677b36Schristos 6301*b5677b36Schristos # Both c and cxx compiler support -rpath directly 6302*b5677b36Schristos _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 6303*b5677b36Schristos fi 6304*b5677b36Schristos _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 6305*b5677b36Schristos ;; 6306*b5677b36Schristos 6307*b5677b36Schristos solaris*) 6308*b5677b36Schristos _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text' 6309*b5677b36Schristos if test "$GCC" = yes; then 6310*b5677b36Schristos wlarc='${wl}' 6311*b5677b36Schristos _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 6312*b5677b36Schristos _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 6313*b5677b36Schristos $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' 6314*b5677b36Schristos else 6315*b5677b36Schristos wlarc='' 6316*b5677b36Schristos _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' 6317*b5677b36Schristos _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 6318*b5677b36Schristos $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' 6319*b5677b36Schristos fi 6320*b5677b36Schristos _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6321*b5677b36Schristos _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6322*b5677b36Schristos case $host_os in 6323*b5677b36Schristos solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 6324*b5677b36Schristos *) 6325*b5677b36Schristos # The compiler driver will combine and reorder linker options, 6326*b5677b36Schristos # but understands `-z linker_flag'. GCC discards it without `$wl', 6327*b5677b36Schristos # but is careful enough not to reorder. 6328*b5677b36Schristos # Supported since Solaris 2.6 (maybe 2.5.1?) 6329*b5677b36Schristos if test "$GCC" = yes; then 6330*b5677b36Schristos _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 6331*b5677b36Schristos else 6332*b5677b36Schristos _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 6333*b5677b36Schristos fi 6334*b5677b36Schristos ;; 6335*b5677b36Schristos esac 6336*b5677b36Schristos _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 6337*b5677b36Schristos ;; 6338*b5677b36Schristos 6339*b5677b36Schristos sunos4*) 6340*b5677b36Schristos if test "x$host_vendor" = xsequent; then 6341*b5677b36Schristos # Use $CC to link under sequent, because it throws in some extra .o 6342*b5677b36Schristos # files that make .init and .fini sections work. 6343*b5677b36Schristos _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' 6344*b5677b36Schristos else 6345*b5677b36Schristos _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 6346*b5677b36Schristos fi 6347*b5677b36Schristos _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6348*b5677b36Schristos _LT_AC_TAGVAR(hardcode_direct, $1)=yes 6349*b5677b36Schristos _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 6350*b5677b36Schristos _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6351*b5677b36Schristos ;; 6352*b5677b36Schristos 6353*b5677b36Schristos sysv4) 6354*b5677b36Schristos case $host_vendor in 6355*b5677b36Schristos sni) 6356*b5677b36Schristos _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6357*b5677b36Schristos _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 6358*b5677b36Schristos ;; 6359*b5677b36Schristos siemens) 6360*b5677b36Schristos ## LD is ld it makes a PLAMLIB 6361*b5677b36Schristos ## CC just makes a GrossModule. 6362*b5677b36Schristos _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 6363*b5677b36Schristos _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 6364*b5677b36Schristos _LT_AC_TAGVAR(hardcode_direct, $1)=no 6365*b5677b36Schristos ;; 6366*b5677b36Schristos motorola) 6367*b5677b36Schristos _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6368*b5677b36Schristos _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 6369*b5677b36Schristos ;; 6370*b5677b36Schristos esac 6371*b5677b36Schristos runpath_var='LD_RUN_PATH' 6372*b5677b36Schristos _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6373*b5677b36Schristos ;; 6374*b5677b36Schristos 6375*b5677b36Schristos sysv4.3*) 6376*b5677b36Schristos _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6377*b5677b36Schristos _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6378*b5677b36Schristos _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 6379*b5677b36Schristos ;; 6380*b5677b36Schristos 6381*b5677b36Schristos sysv4*MP*) 6382*b5677b36Schristos if test -d /usr/nec; then 6383*b5677b36Schristos _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6384*b5677b36Schristos _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6385*b5677b36Schristos runpath_var=LD_RUN_PATH 6386*b5677b36Schristos hardcode_runpath_var=yes 6387*b5677b36Schristos _LT_AC_TAGVAR(ld_shlibs, $1)=yes 6388*b5677b36Schristos fi 6389*b5677b36Schristos ;; 6390*b5677b36Schristos 6391*b5677b36Schristos sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 6392*b5677b36Schristos _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 6393*b5677b36Schristos _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 6394*b5677b36Schristos _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6395*b5677b36Schristos runpath_var='LD_RUN_PATH' 6396*b5677b36Schristos 6397*b5677b36Schristos if test "$GCC" = yes; then 6398*b5677b36Schristos _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6399*b5677b36Schristos _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6400*b5677b36Schristos else 6401*b5677b36Schristos _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6402*b5677b36Schristos _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6403*b5677b36Schristos fi 6404*b5677b36Schristos ;; 6405*b5677b36Schristos 6406*b5677b36Schristos sysv5* | sco3.2v5* | sco5v6*) 6407*b5677b36Schristos # Note: We can NOT use -z defs as we might desire, because we do not 6408*b5677b36Schristos # link with -lc, and that would cause any symbols used from libc to 6409*b5677b36Schristos # always be unresolved, which means just about no library would 6410*b5677b36Schristos # ever link correctly. If we're not using GNU ld we use -z text 6411*b5677b36Schristos # though, which does catch some bad symbols but isn't as heavy-handed 6412*b5677b36Schristos # as -z defs. 6413*b5677b36Schristos _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 6414*b5677b36Schristos _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 6415*b5677b36Schristos _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 6416*b5677b36Schristos _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6417*b5677b36Schristos _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' 6418*b5677b36Schristos _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' 6419*b5677b36Schristos _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 6420*b5677b36Schristos _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 6421*b5677b36Schristos runpath_var='LD_RUN_PATH' 6422*b5677b36Schristos 6423*b5677b36Schristos if test "$GCC" = yes; then 6424*b5677b36Schristos _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' 6425*b5677b36Schristos _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' 6426*b5677b36Schristos else 6427*b5677b36Schristos _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' 6428*b5677b36Schristos _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' 6429*b5677b36Schristos fi 6430*b5677b36Schristos ;; 6431*b5677b36Schristos 6432*b5677b36Schristos uts4*) 6433*b5677b36Schristos _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6434*b5677b36Schristos _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6435*b5677b36Schristos _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6436*b5677b36Schristos ;; 6437*b5677b36Schristos 6438*b5677b36Schristos *) 6439*b5677b36Schristos _LT_AC_TAGVAR(ld_shlibs, $1)=no 6440*b5677b36Schristos ;; 6441*b5677b36Schristos esac 6442*b5677b36Schristos fi 6443*b5677b36Schristos]) 6444*b5677b36SchristosAC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) 6445*b5677b36Schristostest "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 6446*b5677b36Schristos 6447*b5677b36Schristos# 6448*b5677b36Schristos# Do we need to explicitly link libc? 6449*b5677b36Schristos# 6450*b5677b36Schristoscase "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in 6451*b5677b36Schristosx|xyes) 6452*b5677b36Schristos # Assume -lc should be added 6453*b5677b36Schristos _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes 6454*b5677b36Schristos 6455*b5677b36Schristos if test "$enable_shared" = yes && test "$GCC" = yes; then 6456*b5677b36Schristos case $_LT_AC_TAGVAR(archive_cmds, $1) in 6457*b5677b36Schristos *'~'*) 6458*b5677b36Schristos # FIXME: we may have to deal with multi-command sequences. 6459*b5677b36Schristos ;; 6460*b5677b36Schristos '$CC '*) 6461*b5677b36Schristos # Test whether the compiler implicitly links with -lc since on some 6462*b5677b36Schristos # systems, -lgcc has to come before -lc. If gcc already passes -lc 6463*b5677b36Schristos # to ld, don't add -lc before -lgcc. 6464*b5677b36Schristos AC_MSG_CHECKING([whether -lc should be explicitly linked in]) 6465*b5677b36Schristos $rm conftest* 6466*b5677b36Schristos echo "$lt_simple_compile_test_code" > conftest.$ac_ext 6467*b5677b36Schristos 6468*b5677b36Schristos if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 6469*b5677b36Schristos soname=conftest 6470*b5677b36Schristos lib=conftest 6471*b5677b36Schristos libobjs=conftest.$ac_objext 6472*b5677b36Schristos deplibs= 6473*b5677b36Schristos wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) 6474*b5677b36Schristos pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) 6475*b5677b36Schristos compiler_flags=-v 6476*b5677b36Schristos linker_flags=-v 6477*b5677b36Schristos verstring= 6478*b5677b36Schristos output_objdir=. 6479*b5677b36Schristos libname=conftest 6480*b5677b36Schristos lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1) 6481*b5677b36Schristos _LT_AC_TAGVAR(allow_undefined_flag, $1)= 6482*b5677b36Schristos if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 6483*b5677b36Schristos then 6484*b5677b36Schristos _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 6485*b5677b36Schristos else 6486*b5677b36Schristos _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes 6487*b5677b36Schristos fi 6488*b5677b36Schristos _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 6489*b5677b36Schristos else 6490*b5677b36Schristos cat conftest.err 1>&5 6491*b5677b36Schristos fi 6492*b5677b36Schristos $rm conftest* 6493*b5677b36Schristos AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)]) 6494*b5677b36Schristos ;; 6495*b5677b36Schristos esac 6496*b5677b36Schristos fi 6497*b5677b36Schristos ;; 6498*b5677b36Schristosesac 6499*b5677b36Schristos])# AC_LIBTOOL_PROG_LD_SHLIBS 6500*b5677b36Schristos 6501*b5677b36Schristos 6502*b5677b36Schristos# _LT_AC_FILE_LTDLL_C 6503*b5677b36Schristos# ------------------- 6504*b5677b36Schristos# Be careful that the start marker always follows a newline. 6505*b5677b36SchristosAC_DEFUN([_LT_AC_FILE_LTDLL_C], [ 6506*b5677b36Schristos# /* ltdll.c starts here */ 6507*b5677b36Schristos# #define WIN32_LEAN_AND_MEAN 6508*b5677b36Schristos# #include <windows.h> 6509*b5677b36Schristos# #undef WIN32_LEAN_AND_MEAN 6510*b5677b36Schristos# #include <stdio.h> 6511*b5677b36Schristos# 6512*b5677b36Schristos# #ifndef __CYGWIN__ 6513*b5677b36Schristos# # ifdef __CYGWIN32__ 6514*b5677b36Schristos# # define __CYGWIN__ __CYGWIN32__ 6515*b5677b36Schristos# # endif 6516*b5677b36Schristos# #endif 6517*b5677b36Schristos# 6518*b5677b36Schristos# #ifdef __cplusplus 6519*b5677b36Schristos# extern "C" { 6520*b5677b36Schristos# #endif 6521*b5677b36Schristos# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved); 6522*b5677b36Schristos# #ifdef __cplusplus 6523*b5677b36Schristos# } 6524*b5677b36Schristos# #endif 6525*b5677b36Schristos# 6526*b5677b36Schristos# #ifdef __CYGWIN__ 6527*b5677b36Schristos# #include <cygwin/cygwin_dll.h> 6528*b5677b36Schristos# DECLARE_CYGWIN_DLL( DllMain ); 6529*b5677b36Schristos# #endif 6530*b5677b36Schristos# HINSTANCE __hDllInstance_base; 6531*b5677b36Schristos# 6532*b5677b36Schristos# BOOL APIENTRY 6533*b5677b36Schristos# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved) 6534*b5677b36Schristos# { 6535*b5677b36Schristos# __hDllInstance_base = hInst; 6536*b5677b36Schristos# return TRUE; 6537*b5677b36Schristos# } 6538*b5677b36Schristos# /* ltdll.c ends here */ 6539*b5677b36Schristos])# _LT_AC_FILE_LTDLL_C 6540*b5677b36Schristos 6541*b5677b36Schristos 6542*b5677b36Schristos# _LT_AC_TAGVAR(VARNAME, [TAGNAME]) 6543*b5677b36Schristos# --------------------------------- 6544*b5677b36SchristosAC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])]) 6545*b5677b36Schristos 6546*b5677b36Schristos 6547*b5677b36Schristos# old names 6548*b5677b36SchristosAC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL]) 6549*b5677b36SchristosAC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 6550*b5677b36SchristosAC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 6551*b5677b36SchristosAC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 6552*b5677b36SchristosAC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 6553*b5677b36SchristosAC_DEFUN([AM_PROG_LD], [AC_PROG_LD]) 6554*b5677b36SchristosAC_DEFUN([AM_PROG_NM], [AC_PROG_NM]) 6555*b5677b36Schristos 6556*b5677b36Schristos# This is just to silence aclocal about the macro not being used 6557*b5677b36Schristosifelse([AC_DISABLE_FAST_INSTALL]) 6558*b5677b36Schristos 6559*b5677b36SchristosAC_DEFUN([LT_AC_PROG_GCJ], 6560*b5677b36Schristos[AC_CHECK_TOOL(GCJ, gcj, no) 6561*b5677b36Schristos test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" 6562*b5677b36Schristos AC_SUBST(GCJFLAGS) 6563*b5677b36Schristos]) 6564*b5677b36Schristos 6565*b5677b36SchristosAC_DEFUN([LT_AC_PROG_RC], 6566*b5677b36Schristos[AC_CHECK_TOOL(RC, windres, no) 6567*b5677b36Schristos]) 6568*b5677b36Schristos 6569*b5677b36Schristos 6570*b5677b36Schristos# Cheap backport of AS_EXECUTABLE_P and required macros 6571*b5677b36Schristos# from Autoconf 2.59; we should not use $as_executable_p directly. 6572*b5677b36Schristos 6573*b5677b36Schristos# _AS_TEST_PREPARE 6574*b5677b36Schristos# ---------------- 6575*b5677b36Schristosm4_ifndef([_AS_TEST_PREPARE], 6576*b5677b36Schristos[m4_defun([_AS_TEST_PREPARE], 6577*b5677b36Schristos[if test -x / >/dev/null 2>&1; then 6578*b5677b36Schristos as_executable_p='test -x' 6579*b5677b36Schristoselse 6580*b5677b36Schristos as_executable_p='test -f' 6581*b5677b36Schristosfi 6582*b5677b36Schristos])])# _AS_TEST_PREPARE 6583*b5677b36Schristos 6584*b5677b36Schristos# AS_EXECUTABLE_P 6585*b5677b36Schristos# --------------- 6586*b5677b36Schristos# Check whether a file is executable. 6587*b5677b36Schristosm4_ifndef([AS_EXECUTABLE_P], 6588*b5677b36Schristos[m4_defun([AS_EXECUTABLE_P], 6589*b5677b36Schristos[AS_REQUIRE([_AS_TEST_PREPARE])dnl 6590*b5677b36Schristos$as_executable_p $1[]dnl 6591*b5677b36Schristos])])# AS_EXECUTABLE_P 6592*b5677b36Schristos 6593*b5677b36Schristos############################################################ 6594*b5677b36Schristos# NOTE: This macro has been submitted for inclusion into # 6595*b5677b36Schristos# GNU Autoconf as AC_PROG_SED. When it is available in # 6596*b5677b36Schristos# a released version of Autoconf we should remove this # 6597*b5677b36Schristos# macro and use it instead. # 6598*b5677b36Schristos############################################################ 6599*b5677b36Schristos# LT_AC_PROG_SED 6600*b5677b36Schristos# -------------- 6601*b5677b36Schristos# Check for a fully-functional sed program, that truncates 6602*b5677b36Schristos# as few characters as possible. Prefer GNU sed if found. 6603*b5677b36SchristosAC_DEFUN([LT_AC_PROG_SED], 6604*b5677b36Schristos[AC_MSG_CHECKING([for a sed that does not truncate output]) 6605*b5677b36SchristosAC_CACHE_VAL(lt_cv_path_SED, 6606*b5677b36Schristos[# Loop through the user's path and test for sed and gsed. 6607*b5677b36Schristos# Then use that list of sed's as ones to test for truncation. 6608*b5677b36Schristosas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 6609*b5677b36Schristosfor as_dir in $PATH 6610*b5677b36Schristosdo 6611*b5677b36Schristos IFS=$as_save_IFS 6612*b5677b36Schristos test -z "$as_dir" && as_dir=. 6613*b5677b36Schristos for lt_ac_prog in sed gsed; do 6614*b5677b36Schristos for ac_exec_ext in '' $ac_executable_extensions; do 6615*b5677b36Schristos if AS_EXECUTABLE_P(["$as_dir/$lt_ac_prog$ac_exec_ext"]); then 6616*b5677b36Schristos lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 6617*b5677b36Schristos fi 6618*b5677b36Schristos done 6619*b5677b36Schristos done 6620*b5677b36Schristosdone 6621*b5677b36SchristosIFS=$as_save_IFS 6622*b5677b36Schristoslt_ac_max=0 6623*b5677b36Schristoslt_ac_count=0 6624*b5677b36Schristos# Add /usr/xpg4/bin/sed as it is typically found on Solaris 6625*b5677b36Schristos# along with /bin/sed that truncates output. 6626*b5677b36Schristosfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 6627*b5677b36Schristos test ! -f $lt_ac_sed && continue 6628*b5677b36Schristos cat /dev/null > conftest.in 6629*b5677b36Schristos lt_ac_count=0 6630*b5677b36Schristos echo $ECHO_N "0123456789$ECHO_C" >conftest.in 6631*b5677b36Schristos # Check for GNU sed and select it if it is found. 6632*b5677b36Schristos if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 6633*b5677b36Schristos lt_cv_path_SED=$lt_ac_sed 6634*b5677b36Schristos break 6635*b5677b36Schristos fi 6636*b5677b36Schristos while true; do 6637*b5677b36Schristos cat conftest.in conftest.in >conftest.tmp 6638*b5677b36Schristos mv conftest.tmp conftest.in 6639*b5677b36Schristos cp conftest.in conftest.nl 6640*b5677b36Schristos echo >>conftest.nl 6641*b5677b36Schristos $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 6642*b5677b36Schristos cmp -s conftest.out conftest.nl || break 6643*b5677b36Schristos # 10000 chars as input seems more than enough 6644*b5677b36Schristos test $lt_ac_count -gt 10 && break 6645*b5677b36Schristos lt_ac_count=`expr $lt_ac_count + 1` 6646*b5677b36Schristos if test $lt_ac_count -gt $lt_ac_max; then 6647*b5677b36Schristos lt_ac_max=$lt_ac_count 6648*b5677b36Schristos lt_cv_path_SED=$lt_ac_sed 6649*b5677b36Schristos fi 6650*b5677b36Schristos done 6651*b5677b36Schristosdone 6652*b5677b36Schristos]) 6653*b5677b36SchristosSED=$lt_cv_path_SED 6654*b5677b36SchristosAC_SUBST([SED]) 6655*b5677b36SchristosAC_MSG_RESULT([$SED]) 6656*b5677b36Schristos]) 6657