aclocal.m4 revision 191273
1191273Srwatson# generated automatically by aclocal 1.10.1 -*- Autoconf -*- 2156283Srwatson 3156283Srwatson# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 4191273Srwatson# 2005, 2006, 2007, 2008 Free Software Foundation, Inc. 5156283Srwatson# This file is free software; the Free Software Foundation 6156283Srwatson# gives unlimited permission to copy and/or distribute it, 7156283Srwatson# with or without modifications, as long as this notice is preserved. 8156283Srwatson 9156283Srwatson# This program is distributed in the hope that it will be useful, 10156283Srwatson# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 11156283Srwatson# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 12156283Srwatson# PARTICULAR PURPOSE. 13156283Srwatson 14191273Srwatsonm4_ifndef([AC_AUTOCONF_VERSION], 15191273Srwatson [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 16191273Srwatsonm4_if(AC_AUTOCONF_VERSION, [2.62],, 17191273Srwatson[m4_warning([this file was generated for autoconf 2.62. 18191273SrwatsonYou have another version of autoconf. It may work, but is not guaranteed to. 19191273SrwatsonIf you have problems, you may need to regenerate the build system entirely. 20191273SrwatsonTo do so, use the procedure documented by the package, typically `autoreconf'.])]) 21173143Srwatson 22156283Srwatson# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 23156283Srwatson 24191273Srwatson# serial 52 AC_PROG_LIBTOOL 25156283Srwatson 26156283Srwatson 27156283Srwatson# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED) 28156283Srwatson# ----------------------------------------------------------- 29156283Srwatson# If this macro is not defined by Autoconf, define it here. 30156283Srwatsonm4_ifdef([AC_PROVIDE_IFELSE], 31156283Srwatson [], 32156283Srwatson [m4_define([AC_PROVIDE_IFELSE], 33156283Srwatson [m4_ifdef([AC_PROVIDE_$1], 34156283Srwatson [$2], [$3])])]) 35156283Srwatson 36156283Srwatson 37156283Srwatson# AC_PROG_LIBTOOL 38156283Srwatson# --------------- 39156283SrwatsonAC_DEFUN([AC_PROG_LIBTOOL], 40156283Srwatson[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl 41156283Srwatsondnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX 42156283Srwatsondnl immediately, otherwise, hook it in at the end of AC_PROG_CXX. 43156283Srwatson AC_PROVIDE_IFELSE([AC_PROG_CXX], 44156283Srwatson [AC_LIBTOOL_CXX], 45156283Srwatson [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX 46156283Srwatson ])]) 47156283Srwatsondnl And a similar setup for Fortran 77 support 48156283Srwatson AC_PROVIDE_IFELSE([AC_PROG_F77], 49156283Srwatson [AC_LIBTOOL_F77], 50156283Srwatson [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77 51156283Srwatson])]) 52156283Srwatson 53156283Srwatsondnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly. 54156283Srwatsondnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run 55156283Srwatsondnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both. 56156283Srwatson AC_PROVIDE_IFELSE([AC_PROG_GCJ], 57156283Srwatson [AC_LIBTOOL_GCJ], 58156283Srwatson [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 59156283Srwatson [AC_LIBTOOL_GCJ], 60156283Srwatson [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ], 61156283Srwatson [AC_LIBTOOL_GCJ], 62156283Srwatson [ifdef([AC_PROG_GCJ], 63156283Srwatson [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])]) 64156283Srwatson ifdef([A][M_PROG_GCJ], 65156283Srwatson [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])]) 66156283Srwatson ifdef([LT_AC_PROG_GCJ], 67156283Srwatson [define([LT_AC_PROG_GCJ], 68156283Srwatson defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])]) 69156283Srwatson])])# AC_PROG_LIBTOOL 70156283Srwatson 71156283Srwatson 72156283Srwatson# _AC_PROG_LIBTOOL 73156283Srwatson# ---------------- 74156283SrwatsonAC_DEFUN([_AC_PROG_LIBTOOL], 75156283Srwatson[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl 76156283SrwatsonAC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl 77156283SrwatsonAC_BEFORE([$0],[AC_LIBTOOL_F77])dnl 78156283SrwatsonAC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl 79156283Srwatson 80156283Srwatson# This can be used to rebuild libtool when needed 81156283SrwatsonLIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" 82156283Srwatson 83156283Srwatson# Always use our own libtool. 84156283SrwatsonLIBTOOL='$(SHELL) $(top_builddir)/libtool' 85156283SrwatsonAC_SUBST(LIBTOOL)dnl 86156283Srwatson 87156283Srwatson# Prevent multiple expansion 88156283Srwatsondefine([AC_PROG_LIBTOOL], []) 89156283Srwatson])# _AC_PROG_LIBTOOL 90156283Srwatson 91156283Srwatson 92156283Srwatson# AC_LIBTOOL_SETUP 93156283Srwatson# ---------------- 94156283SrwatsonAC_DEFUN([AC_LIBTOOL_SETUP], 95156283Srwatson[AC_PREREQ(2.50)dnl 96156283SrwatsonAC_REQUIRE([AC_ENABLE_SHARED])dnl 97156283SrwatsonAC_REQUIRE([AC_ENABLE_STATIC])dnl 98156283SrwatsonAC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl 99156283SrwatsonAC_REQUIRE([AC_CANONICAL_HOST])dnl 100156283SrwatsonAC_REQUIRE([AC_CANONICAL_BUILD])dnl 101156283SrwatsonAC_REQUIRE([AC_PROG_CC])dnl 102156283SrwatsonAC_REQUIRE([AC_PROG_LD])dnl 103156283SrwatsonAC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl 104156283SrwatsonAC_REQUIRE([AC_PROG_NM])dnl 105156283Srwatson 106156283SrwatsonAC_REQUIRE([AC_PROG_LN_S])dnl 107156283SrwatsonAC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl 108156283Srwatson# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! 109156283SrwatsonAC_REQUIRE([AC_OBJEXT])dnl 110156283SrwatsonAC_REQUIRE([AC_EXEEXT])dnl 111156283Srwatsondnl 112156283SrwatsonAC_LIBTOOL_SYS_MAX_CMD_LEN 113156283SrwatsonAC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE 114156283SrwatsonAC_LIBTOOL_OBJDIR 115156283Srwatson 116156283SrwatsonAC_REQUIRE([_LT_AC_SYS_COMPILER])dnl 117156283Srwatson_LT_AC_PROG_ECHO_BACKSLASH 118156283Srwatson 119156283Srwatsoncase $host_os in 120156283Srwatsonaix3*) 121156283Srwatson # AIX sometimes has problems with the GCC collect2 program. For some 122156283Srwatson # reason, if we set the COLLECT_NAMES environment variable, the problems 123156283Srwatson # vanish in a puff of smoke. 124156283Srwatson if test "X${COLLECT_NAMES+set}" != Xset; then 125156283Srwatson COLLECT_NAMES= 126156283Srwatson export COLLECT_NAMES 127156283Srwatson fi 128156283Srwatson ;; 129156283Srwatsonesac 130156283Srwatson 131156283Srwatson# Sed substitution that helps us do robust quoting. It backslashifies 132156283Srwatson# metacharacters that are still active within double-quoted strings. 133156283SrwatsonXsed='sed -e 1s/^X//' 134156283Srwatson[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'] 135156283Srwatson 136156283Srwatson# Same as above, but do not quote variable references. 137156283Srwatson[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'] 138156283Srwatson 139156283Srwatson# Sed substitution to delay expansion of an escaped shell variable in a 140156283Srwatson# double_quote_subst'ed string. 141156283Srwatsondelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 142156283Srwatson 143156283Srwatson# Sed substitution to avoid accidental globbing in evaled expressions 144156283Srwatsonno_glob_subst='s/\*/\\\*/g' 145156283Srwatson 146156283Srwatson# Constants: 147156283Srwatsonrm="rm -f" 148156283Srwatson 149156283Srwatson# Global variables: 150156283Srwatsondefault_ofile=libtool 151156283Srwatsoncan_build_shared=yes 152156283Srwatson 153156283Srwatson# All known linkers require a `.a' archive for static linking (except MSVC, 154156283Srwatson# which needs '.lib'). 155156283Srwatsonlibext=a 156156283Srwatsonltmain="$ac_aux_dir/ltmain.sh" 157156283Srwatsonofile="$default_ofile" 158156283Srwatsonwith_gnu_ld="$lt_cv_prog_gnu_ld" 159156283Srwatson 160156283SrwatsonAC_CHECK_TOOL(AR, ar, false) 161156283SrwatsonAC_CHECK_TOOL(RANLIB, ranlib, :) 162156283SrwatsonAC_CHECK_TOOL(STRIP, strip, :) 163156283Srwatson 164156283Srwatsonold_CC="$CC" 165156283Srwatsonold_CFLAGS="$CFLAGS" 166156283Srwatson 167156283Srwatson# Set sane defaults for various variables 168156283Srwatsontest -z "$AR" && AR=ar 169156283Srwatsontest -z "$AR_FLAGS" && AR_FLAGS=cru 170156283Srwatsontest -z "$AS" && AS=as 171156283Srwatsontest -z "$CC" && CC=cc 172156283Srwatsontest -z "$LTCC" && LTCC=$CC 173173143Srwatsontest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 174156283Srwatsontest -z "$DLLTOOL" && DLLTOOL=dlltool 175156283Srwatsontest -z "$LD" && LD=ld 176156283Srwatsontest -z "$LN_S" && LN_S="ln -s" 177156283Srwatsontest -z "$MAGIC_CMD" && MAGIC_CMD=file 178156283Srwatsontest -z "$NM" && NM=nm 179156283Srwatsontest -z "$SED" && SED=sed 180156283Srwatsontest -z "$OBJDUMP" && OBJDUMP=objdump 181156283Srwatsontest -z "$RANLIB" && RANLIB=: 182156283Srwatsontest -z "$STRIP" && STRIP=: 183156283Srwatsontest -z "$ac_objext" && ac_objext=o 184156283Srwatson 185156283Srwatson# Determine commands to create old-style static archives. 186173143Srwatsonold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 187156283Srwatsonold_postinstall_cmds='chmod 644 $oldlib' 188156283Srwatsonold_postuninstall_cmds= 189156283Srwatson 190156283Srwatsonif test -n "$RANLIB"; then 191156283Srwatson case $host_os in 192156283Srwatson openbsd*) 193173143Srwatson old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" 194156283Srwatson ;; 195156283Srwatson *) 196173143Srwatson old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" 197156283Srwatson ;; 198156283Srwatson esac 199156283Srwatson old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" 200156283Srwatsonfi 201156283Srwatson 202156283Srwatson_LT_CC_BASENAME([$compiler]) 203156283Srwatson 204156283Srwatson# Only perform the check for file, if the check method requires it 205156283Srwatsoncase $deplibs_check_method in 206156283Srwatsonfile_magic*) 207156283Srwatson if test "$file_magic_cmd" = '$MAGIC_CMD'; then 208156283Srwatson AC_PATH_MAGIC 209156283Srwatson fi 210156283Srwatson ;; 211156283Srwatsonesac 212156283Srwatson 213191273Srwatson_LT_REQUIRED_DARWIN_CHECKS 214191273Srwatson 215156283SrwatsonAC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no) 216156283SrwatsonAC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], 217156283Srwatsonenable_win32_dll=yes, enable_win32_dll=no) 218156283Srwatson 219156283SrwatsonAC_ARG_ENABLE([libtool-lock], 220156283Srwatson [AC_HELP_STRING([--disable-libtool-lock], 221156283Srwatson [avoid locking (might break parallel builds)])]) 222156283Srwatsontest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes 223156283Srwatson 224156283SrwatsonAC_ARG_WITH([pic], 225156283Srwatson [AC_HELP_STRING([--with-pic], 226156283Srwatson [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 227156283Srwatson [pic_mode="$withval"], 228156283Srwatson [pic_mode=default]) 229156283Srwatsontest -z "$pic_mode" && pic_mode=default 230156283Srwatson 231156283Srwatson# Use C for the default configuration in the libtool script 232156283Srwatsontagname= 233156283SrwatsonAC_LIBTOOL_LANG_C_CONFIG 234156283Srwatson_LT_AC_TAGCONFIG 235156283Srwatson])# AC_LIBTOOL_SETUP 236156283Srwatson 237156283Srwatson 238156283Srwatson# _LT_AC_SYS_COMPILER 239156283Srwatson# ------------------- 240156283SrwatsonAC_DEFUN([_LT_AC_SYS_COMPILER], 241156283Srwatson[AC_REQUIRE([AC_PROG_CC])dnl 242156283Srwatson 243156283Srwatson# If no C compiler was specified, use CC. 244156283SrwatsonLTCC=${LTCC-"$CC"} 245156283Srwatson 246173143Srwatson# If no C compiler flags were specified, use CFLAGS. 247173143SrwatsonLTCFLAGS=${LTCFLAGS-"$CFLAGS"} 248173143Srwatson 249156283Srwatson# Allow CC to be a program name with arguments. 250156283Srwatsoncompiler=$CC 251156283Srwatson])# _LT_AC_SYS_COMPILER 252156283Srwatson 253156283Srwatson 254156283Srwatson# _LT_CC_BASENAME(CC) 255156283Srwatson# ------------------- 256156283Srwatson# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 257156283SrwatsonAC_DEFUN([_LT_CC_BASENAME], 258156283Srwatson[for cc_temp in $1""; do 259156283Srwatson case $cc_temp in 260156283Srwatson compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 261156283Srwatson distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 262156283Srwatson \-*) ;; 263156283Srwatson *) break;; 264156283Srwatson esac 265156283Srwatsondone 266156283Srwatsoncc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` 267156283Srwatson]) 268156283Srwatson 269156283Srwatson 270156283Srwatson# _LT_COMPILER_BOILERPLATE 271156283Srwatson# ------------------------ 272156283Srwatson# Check for compiler boilerplate output or warnings with 273156283Srwatson# the simple compiler test code. 274156283SrwatsonAC_DEFUN([_LT_COMPILER_BOILERPLATE], 275173143Srwatson[AC_REQUIRE([LT_AC_PROG_SED])dnl 276173143Srwatsonac_outfile=conftest.$ac_objext 277173143Srwatsonecho "$lt_simple_compile_test_code" >conftest.$ac_ext 278173143Srwatsoneval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 279156283Srwatson_lt_compiler_boilerplate=`cat conftest.err` 280156283Srwatson$rm conftest* 281156283Srwatson])# _LT_COMPILER_BOILERPLATE 282156283Srwatson 283156283Srwatson 284156283Srwatson# _LT_LINKER_BOILERPLATE 285156283Srwatson# ---------------------- 286156283Srwatson# Check for linker boilerplate output or warnings with 287156283Srwatson# the simple link test code. 288156283SrwatsonAC_DEFUN([_LT_LINKER_BOILERPLATE], 289173143Srwatson[AC_REQUIRE([LT_AC_PROG_SED])dnl 290173143Srwatsonac_outfile=conftest.$ac_objext 291173143Srwatsonecho "$lt_simple_link_test_code" >conftest.$ac_ext 292173143Srwatsoneval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 293156283Srwatson_lt_linker_boilerplate=`cat conftest.err` 294191273Srwatson$rm -r conftest* 295156283Srwatson])# _LT_LINKER_BOILERPLATE 296156283Srwatson 297191273Srwatson# _LT_REQUIRED_DARWIN_CHECKS 298191273Srwatson# -------------------------- 299191273Srwatson# Check for some things on darwin 300191273SrwatsonAC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS],[ 301191273Srwatson case $host_os in 302191273Srwatson rhapsody* | darwin*) 303191273Srwatson AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) 304191273Srwatson AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) 305156283Srwatson 306191273Srwatson AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], 307191273Srwatson [lt_cv_apple_cc_single_mod=no 308191273Srwatson if test -z "${LT_MULTI_MODULE}"; then 309191273Srwatson # By default we will add the -single_module flag. You can override 310191273Srwatson # by either setting the environment variable LT_MULTI_MODULE 311191273Srwatson # non-empty at configure time, or by adding -multi_module to the 312191273Srwatson # link flags. 313191273Srwatson echo "int foo(void){return 1;}" > conftest.c 314191273Srwatson $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 315191273Srwatson -dynamiclib ${wl}-single_module conftest.c 316191273Srwatson if test -f libconftest.dylib; then 317191273Srwatson lt_cv_apple_cc_single_mod=yes 318191273Srwatson rm -rf libconftest.dylib* 319191273Srwatson fi 320191273Srwatson rm conftest.c 321191273Srwatson fi]) 322191273Srwatson AC_CACHE_CHECK([for -exported_symbols_list linker flag], 323191273Srwatson [lt_cv_ld_exported_symbols_list], 324191273Srwatson [lt_cv_ld_exported_symbols_list=no 325191273Srwatson save_LDFLAGS=$LDFLAGS 326191273Srwatson echo "_main" > conftest.sym 327191273Srwatson LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" 328191273Srwatson AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 329191273Srwatson [lt_cv_ld_exported_symbols_list=yes], 330191273Srwatson [lt_cv_ld_exported_symbols_list=no]) 331191273Srwatson LDFLAGS="$save_LDFLAGS" 332191273Srwatson ]) 333191273Srwatson case $host_os in 334191273Srwatson rhapsody* | darwin1.[[0123]]) 335191273Srwatson _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; 336191273Srwatson darwin1.*) 337191273Srwatson _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 338191273Srwatson darwin*) 339191273Srwatson # if running on 10.5 or later, the deployment target defaults 340191273Srwatson # to the OS version, if on x86, and 10.4, the deployment 341191273Srwatson # target defaults to 10.4. Don't you love it? 342191273Srwatson case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 343191273Srwatson 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) 344191273Srwatson _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 345191273Srwatson 10.[[012]]*) 346191273Srwatson _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 347191273Srwatson 10.*) 348191273Srwatson _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 349191273Srwatson esac 350191273Srwatson ;; 351191273Srwatson esac 352191273Srwatson if test "$lt_cv_apple_cc_single_mod" = "yes"; then 353191273Srwatson _lt_dar_single_mod='$single_module' 354191273Srwatson fi 355191273Srwatson if test "$lt_cv_ld_exported_symbols_list" = "yes"; then 356191273Srwatson _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' 357191273Srwatson else 358191273Srwatson _lt_dar_export_syms="~$NMEDIT -s \$output_objdir/\${libname}-symbols.expsym \${lib}" 359191273Srwatson fi 360191273Srwatson if test "$DSYMUTIL" != ":"; then 361191273Srwatson _lt_dsymutil="~$DSYMUTIL \$lib || :" 362191273Srwatson else 363191273Srwatson _lt_dsymutil= 364191273Srwatson fi 365191273Srwatson ;; 366191273Srwatson esac 367191273Srwatson]) 368191273Srwatson 369156283Srwatson# _LT_AC_SYS_LIBPATH_AIX 370156283Srwatson# ---------------------- 371156283Srwatson# Links a minimal program and checks the executable 372156283Srwatson# for the system default hardcoded library path. In most cases, 373156283Srwatson# this is /usr/lib:/lib, but when the MPI compilers are used 374156283Srwatson# the location of the communication and MPI libs are included too. 375156283Srwatson# If we don't find anything, use the default library path according 376156283Srwatson# to the aix ld manual. 377156283SrwatsonAC_DEFUN([_LT_AC_SYS_LIBPATH_AIX], 378173143Srwatson[AC_REQUIRE([LT_AC_PROG_SED])dnl 379173143SrwatsonAC_LINK_IFELSE(AC_LANG_PROGRAM,[ 380173143Srwatsonlt_aix_libpath_sed=' 381173143Srwatson /Import File Strings/,/^$/ { 382173143Srwatson /^0/ { 383173143Srwatson s/^0 *\(.*\)$/\1/ 384173143Srwatson p 385173143Srwatson } 386173143Srwatson }' 387173143Srwatsonaix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 388156283Srwatson# Check for a 64-bit object if we didn't find anything. 389173143Srwatsonif test -z "$aix_libpath"; then 390173143Srwatson aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 391173143Srwatsonfi],[]) 392156283Srwatsonif test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi 393156283Srwatson])# _LT_AC_SYS_LIBPATH_AIX 394156283Srwatson 395156283Srwatson 396156283Srwatson# _LT_AC_SHELL_INIT(ARG) 397156283Srwatson# ---------------------- 398156283SrwatsonAC_DEFUN([_LT_AC_SHELL_INIT], 399156283Srwatson[ifdef([AC_DIVERSION_NOTICE], 400156283Srwatson [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], 401156283Srwatson [AC_DIVERT_PUSH(NOTICE)]) 402156283Srwatson$1 403156283SrwatsonAC_DIVERT_POP 404156283Srwatson])# _LT_AC_SHELL_INIT 405156283Srwatson 406156283Srwatson 407156283Srwatson# _LT_AC_PROG_ECHO_BACKSLASH 408156283Srwatson# -------------------------- 409156283Srwatson# Add some code to the start of the generated configure script which 410156283Srwatson# will find an echo command which doesn't interpret backslashes. 411156283SrwatsonAC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH], 412156283Srwatson[_LT_AC_SHELL_INIT([ 413156283Srwatson# Check that we are running under the correct shell. 414156283SrwatsonSHELL=${CONFIG_SHELL-/bin/sh} 415156283Srwatson 416156283Srwatsoncase X$ECHO in 417156283SrwatsonX*--fallback-echo) 418156283Srwatson # Remove one level of quotation (which was required for Make). 419156283Srwatson ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` 420156283Srwatson ;; 421156283Srwatsonesac 422156283Srwatson 423156283Srwatsonecho=${ECHO-echo} 424156283Srwatsonif test "X[$]1" = X--no-reexec; then 425156283Srwatson # Discard the --no-reexec flag, and continue. 426156283Srwatson shift 427156283Srwatsonelif test "X[$]1" = X--fallback-echo; then 428156283Srwatson # Avoid inline document here, it may be left over 429156283Srwatson : 430156283Srwatsonelif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then 431156283Srwatson # Yippee, $echo works! 432156283Srwatson : 433156283Srwatsonelse 434156283Srwatson # Restart under the correct shell. 435156283Srwatson exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} 436156283Srwatsonfi 437156283Srwatson 438156283Srwatsonif test "X[$]1" = X--fallback-echo; then 439156283Srwatson # used as fallback echo 440156283Srwatson shift 441156283Srwatson cat <<EOF 442156283Srwatson[$]* 443156283SrwatsonEOF 444156283Srwatson exit 0 445156283Srwatsonfi 446156283Srwatson 447156283Srwatson# The HP-UX ksh and POSIX shell print the target directory to stdout 448156283Srwatson# if CDPATH is set. 449156283Srwatson(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 450156283Srwatson 451156283Srwatsonif test -z "$ECHO"; then 452156283Srwatsonif test "X${echo_test_string+set}" != Xset; then 453156283Srwatson# find a string as large as possible, as long as the shell can cope with it 454156283Srwatson for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do 455156283Srwatson # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... 456156283Srwatson if (echo_test_string=`eval $cmd`) 2>/dev/null && 457156283Srwatson echo_test_string=`eval $cmd` && 458156283Srwatson (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null 459156283Srwatson then 460156283Srwatson break 461156283Srwatson fi 462156283Srwatson done 463156283Srwatsonfi 464156283Srwatson 465156283Srwatsonif test "X`($echo '\t') 2>/dev/null`" = 'X\t' && 466156283Srwatson echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && 467156283Srwatson test "X$echo_testing_string" = "X$echo_test_string"; then 468156283Srwatson : 469156283Srwatsonelse 470156283Srwatson # The Solaris, AIX, and Digital Unix default echo programs unquote 471156283Srwatson # backslashes. This makes it impossible to quote backslashes using 472156283Srwatson # echo "$something" | sed 's/\\/\\\\/g' 473156283Srwatson # 474156283Srwatson # So, first we look for a working echo in the user's PATH. 475156283Srwatson 476156283Srwatson lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 477156283Srwatson for dir in $PATH /usr/ucb; do 478156283Srwatson IFS="$lt_save_ifs" 479156283Srwatson if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && 480156283Srwatson test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && 481156283Srwatson echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && 482156283Srwatson test "X$echo_testing_string" = "X$echo_test_string"; then 483156283Srwatson echo="$dir/echo" 484156283Srwatson break 485156283Srwatson fi 486156283Srwatson done 487156283Srwatson IFS="$lt_save_ifs" 488156283Srwatson 489156283Srwatson if test "X$echo" = Xecho; then 490156283Srwatson # We didn't find a better echo, so look for alternatives. 491156283Srwatson if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && 492156283Srwatson echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && 493156283Srwatson test "X$echo_testing_string" = "X$echo_test_string"; then 494156283Srwatson # This shell has a builtin print -r that does the trick. 495156283Srwatson echo='print -r' 496156283Srwatson elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && 497156283Srwatson test "X$CONFIG_SHELL" != X/bin/ksh; then 498156283Srwatson # If we have ksh, try running configure again with it. 499156283Srwatson ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} 500156283Srwatson export ORIGINAL_CONFIG_SHELL 501156283Srwatson CONFIG_SHELL=/bin/ksh 502156283Srwatson export CONFIG_SHELL 503156283Srwatson exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} 504156283Srwatson else 505156283Srwatson # Try using printf. 506156283Srwatson echo='printf %s\n' 507156283Srwatson if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && 508156283Srwatson echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && 509156283Srwatson test "X$echo_testing_string" = "X$echo_test_string"; then 510156283Srwatson # Cool, printf works 511156283Srwatson : 512156283Srwatson elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && 513156283Srwatson test "X$echo_testing_string" = 'X\t' && 514156283Srwatson echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && 515156283Srwatson test "X$echo_testing_string" = "X$echo_test_string"; then 516156283Srwatson CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL 517156283Srwatson export CONFIG_SHELL 518156283Srwatson SHELL="$CONFIG_SHELL" 519156283Srwatson export SHELL 520156283Srwatson echo="$CONFIG_SHELL [$]0 --fallback-echo" 521156283Srwatson elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && 522156283Srwatson test "X$echo_testing_string" = 'X\t' && 523156283Srwatson echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && 524156283Srwatson test "X$echo_testing_string" = "X$echo_test_string"; then 525156283Srwatson echo="$CONFIG_SHELL [$]0 --fallback-echo" 526156283Srwatson else 527156283Srwatson # maybe with a smaller string... 528156283Srwatson prev=: 529156283Srwatson 530156283Srwatson for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do 531156283Srwatson if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null 532156283Srwatson then 533156283Srwatson break 534156283Srwatson fi 535156283Srwatson prev="$cmd" 536156283Srwatson done 537156283Srwatson 538156283Srwatson if test "$prev" != 'sed 50q "[$]0"'; then 539156283Srwatson echo_test_string=`eval $prev` 540156283Srwatson export echo_test_string 541156283Srwatson exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} 542156283Srwatson else 543156283Srwatson # Oops. We lost completely, so just stick with echo. 544156283Srwatson echo=echo 545156283Srwatson fi 546156283Srwatson fi 547156283Srwatson fi 548156283Srwatson fi 549156283Srwatsonfi 550156283Srwatsonfi 551156283Srwatson 552156283Srwatson# Copy echo and quote the copy suitably for passing to libtool from 553156283Srwatson# the Makefile, instead of quoting the original, which is used later. 554156283SrwatsonECHO=$echo 555156283Srwatsonif test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then 556156283Srwatson ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" 557156283Srwatsonfi 558156283Srwatson 559156283SrwatsonAC_SUBST(ECHO) 560156283Srwatson])])# _LT_AC_PROG_ECHO_BACKSLASH 561156283Srwatson 562156283Srwatson 563156283Srwatson# _LT_AC_LOCK 564156283Srwatson# ----------- 565156283SrwatsonAC_DEFUN([_LT_AC_LOCK], 566156283Srwatson[AC_ARG_ENABLE([libtool-lock], 567156283Srwatson [AC_HELP_STRING([--disable-libtool-lock], 568156283Srwatson [avoid locking (might break parallel builds)])]) 569156283Srwatsontest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes 570156283Srwatson 571156283Srwatson# Some flags need to be propagated to the compiler or linker for good 572156283Srwatson# libtool support. 573156283Srwatsoncase $host in 574156283Srwatsonia64-*-hpux*) 575156283Srwatson # Find out which ABI we are using. 576156283Srwatson echo 'int i;' > conftest.$ac_ext 577156283Srwatson if AC_TRY_EVAL(ac_compile); then 578156283Srwatson case `/usr/bin/file conftest.$ac_objext` in 579156283Srwatson *ELF-32*) 580156283Srwatson HPUX_IA64_MODE="32" 581156283Srwatson ;; 582156283Srwatson *ELF-64*) 583156283Srwatson HPUX_IA64_MODE="64" 584156283Srwatson ;; 585156283Srwatson esac 586156283Srwatson fi 587156283Srwatson rm -rf conftest* 588156283Srwatson ;; 589156283Srwatson*-*-irix6*) 590156283Srwatson # Find out which ABI we are using. 591156283Srwatson echo '[#]line __oline__ "configure"' > conftest.$ac_ext 592156283Srwatson if AC_TRY_EVAL(ac_compile); then 593156283Srwatson if test "$lt_cv_prog_gnu_ld" = yes; then 594156283Srwatson case `/usr/bin/file conftest.$ac_objext` in 595156283Srwatson *32-bit*) 596156283Srwatson LD="${LD-ld} -melf32bsmip" 597156283Srwatson ;; 598156283Srwatson *N32*) 599156283Srwatson LD="${LD-ld} -melf32bmipn32" 600156283Srwatson ;; 601156283Srwatson *64-bit*) 602156283Srwatson LD="${LD-ld} -melf64bmip" 603156283Srwatson ;; 604156283Srwatson esac 605156283Srwatson else 606156283Srwatson case `/usr/bin/file conftest.$ac_objext` in 607156283Srwatson *32-bit*) 608156283Srwatson LD="${LD-ld} -32" 609156283Srwatson ;; 610156283Srwatson *N32*) 611156283Srwatson LD="${LD-ld} -n32" 612156283Srwatson ;; 613156283Srwatson *64-bit*) 614156283Srwatson LD="${LD-ld} -64" 615156283Srwatson ;; 616156283Srwatson esac 617156283Srwatson fi 618156283Srwatson fi 619156283Srwatson rm -rf conftest* 620156283Srwatson ;; 621156283Srwatson 622173143Srwatsonx86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ 623173143Srwatsons390*-*linux*|sparc*-*linux*) 624156283Srwatson # Find out which ABI we are using. 625156283Srwatson echo 'int i;' > conftest.$ac_ext 626156283Srwatson if AC_TRY_EVAL(ac_compile); then 627156283Srwatson case `/usr/bin/file conftest.o` in 628156283Srwatson *32-bit*) 629156283Srwatson case $host in 630173143Srwatson x86_64-*kfreebsd*-gnu) 631173143Srwatson LD="${LD-ld} -m elf_i386_fbsd" 632173143Srwatson ;; 633156283Srwatson x86_64-*linux*) 634156283Srwatson LD="${LD-ld} -m elf_i386" 635156283Srwatson ;; 636156283Srwatson ppc64-*linux*|powerpc64-*linux*) 637156283Srwatson LD="${LD-ld} -m elf32ppclinux" 638156283Srwatson ;; 639156283Srwatson s390x-*linux*) 640156283Srwatson LD="${LD-ld} -m elf_s390" 641156283Srwatson ;; 642156283Srwatson sparc64-*linux*) 643156283Srwatson LD="${LD-ld} -m elf32_sparc" 644156283Srwatson ;; 645156283Srwatson esac 646156283Srwatson ;; 647156283Srwatson *64-bit*) 648156283Srwatson case $host in 649173143Srwatson x86_64-*kfreebsd*-gnu) 650173143Srwatson LD="${LD-ld} -m elf_x86_64_fbsd" 651173143Srwatson ;; 652156283Srwatson x86_64-*linux*) 653156283Srwatson LD="${LD-ld} -m elf_x86_64" 654156283Srwatson ;; 655156283Srwatson ppc*-*linux*|powerpc*-*linux*) 656156283Srwatson LD="${LD-ld} -m elf64ppc" 657156283Srwatson ;; 658156283Srwatson s390*-*linux*) 659156283Srwatson LD="${LD-ld} -m elf64_s390" 660156283Srwatson ;; 661156283Srwatson sparc*-*linux*) 662156283Srwatson LD="${LD-ld} -m elf64_sparc" 663156283Srwatson ;; 664156283Srwatson esac 665156283Srwatson ;; 666156283Srwatson esac 667156283Srwatson fi 668156283Srwatson rm -rf conftest* 669156283Srwatson ;; 670156283Srwatson 671156283Srwatson*-*-sco3.2v5*) 672156283Srwatson # On SCO OpenServer 5, we need -belf to get full-featured binaries. 673156283Srwatson SAVE_CFLAGS="$CFLAGS" 674156283Srwatson CFLAGS="$CFLAGS -belf" 675156283Srwatson AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 676156283Srwatson [AC_LANG_PUSH(C) 677156283Srwatson AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 678156283Srwatson AC_LANG_POP]) 679156283Srwatson if test x"$lt_cv_cc_needs_belf" != x"yes"; then 680156283Srwatson # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 681156283Srwatson CFLAGS="$SAVE_CFLAGS" 682156283Srwatson fi 683156283Srwatson ;; 684173143Srwatsonsparc*-*solaris*) 685173143Srwatson # Find out which ABI we are using. 686173143Srwatson echo 'int i;' > conftest.$ac_ext 687173143Srwatson if AC_TRY_EVAL(ac_compile); then 688173143Srwatson case `/usr/bin/file conftest.o` in 689173143Srwatson *64-bit*) 690173143Srwatson case $lt_cv_prog_gnu_ld in 691173143Srwatson yes*) LD="${LD-ld} -m elf64_sparc" ;; 692191273Srwatson *) 693191273Srwatson if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then 694191273Srwatson LD="${LD-ld} -64" 695191273Srwatson fi 696191273Srwatson ;; 697173143Srwatson esac 698173143Srwatson ;; 699173143Srwatson esac 700173143Srwatson fi 701173143Srwatson rm -rf conftest* 702173143Srwatson ;; 703173143Srwatson 704156283SrwatsonAC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], 705156283Srwatson[*-*-cygwin* | *-*-mingw* | *-*-pw32*) 706156283Srwatson AC_CHECK_TOOL(DLLTOOL, dlltool, false) 707156283Srwatson AC_CHECK_TOOL(AS, as, false) 708156283Srwatson AC_CHECK_TOOL(OBJDUMP, objdump, false) 709156283Srwatson ;; 710156283Srwatson ]) 711156283Srwatsonesac 712156283Srwatson 713156283Srwatsonneed_locks="$enable_libtool_lock" 714156283Srwatson 715156283Srwatson])# _LT_AC_LOCK 716156283Srwatson 717156283Srwatson 718156283Srwatson# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 719156283Srwatson# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 720156283Srwatson# ---------------------------------------------------------------- 721156283Srwatson# Check whether the given compiler option works 722156283SrwatsonAC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], 723156283Srwatson[AC_REQUIRE([LT_AC_PROG_SED]) 724156283SrwatsonAC_CACHE_CHECK([$1], [$2], 725156283Srwatson [$2=no 726156283Srwatson ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 727173143Srwatson echo "$lt_simple_compile_test_code" > conftest.$ac_ext 728156283Srwatson lt_compiler_flag="$3" 729156283Srwatson # Insert the option either (1) after the last *FLAGS variable, or 730156283Srwatson # (2) before a word containing "conftest.", or (3) at the end. 731156283Srwatson # Note that $ac_compile itself does not contain backslashes and begins 732156283Srwatson # with a dollar sign (not a hyphen), so the echo should work correctly. 733156283Srwatson # The option is referenced via a variable to avoid confusing sed. 734156283Srwatson lt_compile=`echo "$ac_compile" | $SED \ 735156283Srwatson -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 736156283Srwatson -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 737156283Srwatson -e 's:$: $lt_compiler_flag:'` 738156283Srwatson (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 739156283Srwatson (eval "$lt_compile" 2>conftest.err) 740156283Srwatson ac_status=$? 741156283Srwatson cat conftest.err >&AS_MESSAGE_LOG_FD 742156283Srwatson echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 743156283Srwatson if (exit $ac_status) && test -s "$ac_outfile"; then 744156283Srwatson # The compiler can only warn and ignore the option if not recognized 745156283Srwatson # So say no if there are warnings other than the usual output. 746173143Srwatson $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp 747173143Srwatson $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 748173143Srwatson if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 749156283Srwatson $2=yes 750156283Srwatson fi 751156283Srwatson fi 752156283Srwatson $rm conftest* 753156283Srwatson]) 754156283Srwatson 755156283Srwatsonif test x"[$]$2" = xyes; then 756156283Srwatson ifelse([$5], , :, [$5]) 757156283Srwatsonelse 758156283Srwatson ifelse([$6], , :, [$6]) 759156283Srwatsonfi 760156283Srwatson])# AC_LIBTOOL_COMPILER_OPTION 761156283Srwatson 762156283Srwatson 763156283Srwatson# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 764156283Srwatson# [ACTION-SUCCESS], [ACTION-FAILURE]) 765156283Srwatson# ------------------------------------------------------------ 766156283Srwatson# Check whether the given compiler option works 767156283SrwatsonAC_DEFUN([AC_LIBTOOL_LINKER_OPTION], 768173143Srwatson[AC_REQUIRE([LT_AC_PROG_SED])dnl 769173143SrwatsonAC_CACHE_CHECK([$1], [$2], 770156283Srwatson [$2=no 771156283Srwatson save_LDFLAGS="$LDFLAGS" 772156283Srwatson LDFLAGS="$LDFLAGS $3" 773173143Srwatson echo "$lt_simple_link_test_code" > conftest.$ac_ext 774156283Srwatson if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 775156283Srwatson # The linker can only warn and ignore the option if not recognized 776156283Srwatson # So say no if there are warnings 777156283Srwatson if test -s conftest.err; then 778156283Srwatson # Append any errors to the config.log. 779156283Srwatson cat conftest.err 1>&AS_MESSAGE_LOG_FD 780173143Srwatson $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp 781173143Srwatson $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 782156283Srwatson if diff conftest.exp conftest.er2 >/dev/null; then 783156283Srwatson $2=yes 784156283Srwatson fi 785156283Srwatson else 786156283Srwatson $2=yes 787156283Srwatson fi 788156283Srwatson fi 789191273Srwatson $rm -r conftest* 790156283Srwatson LDFLAGS="$save_LDFLAGS" 791156283Srwatson]) 792156283Srwatson 793156283Srwatsonif test x"[$]$2" = xyes; then 794156283Srwatson ifelse([$4], , :, [$4]) 795156283Srwatsonelse 796156283Srwatson ifelse([$5], , :, [$5]) 797156283Srwatsonfi 798156283Srwatson])# AC_LIBTOOL_LINKER_OPTION 799156283Srwatson 800156283Srwatson 801156283Srwatson# AC_LIBTOOL_SYS_MAX_CMD_LEN 802156283Srwatson# -------------------------- 803156283SrwatsonAC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], 804156283Srwatson[# find the maximum length of command line arguments 805156283SrwatsonAC_MSG_CHECKING([the maximum length of command line arguments]) 806156283SrwatsonAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 807156283Srwatson i=0 808156283Srwatson teststring="ABCD" 809156283Srwatson 810156283Srwatson case $build_os in 811156283Srwatson msdosdjgpp*) 812156283Srwatson # On DJGPP, this test can blow up pretty badly due to problems in libc 813156283Srwatson # (any single argument exceeding 2000 bytes causes a buffer overrun 814156283Srwatson # during glob expansion). Even if it were fixed, the result of this 815156283Srwatson # check would be larger than it should be. 816156283Srwatson lt_cv_sys_max_cmd_len=12288; # 12K is about right 817156283Srwatson ;; 818156283Srwatson 819156283Srwatson gnu*) 820156283Srwatson # Under GNU Hurd, this test is not required because there is 821156283Srwatson # no limit to the length of command line arguments. 822156283Srwatson # Libtool will interpret -1 as no limit whatsoever 823156283Srwatson lt_cv_sys_max_cmd_len=-1; 824156283Srwatson ;; 825156283Srwatson 826156283Srwatson cygwin* | mingw*) 827156283Srwatson # On Win9x/ME, this test blows up -- it succeeds, but takes 828156283Srwatson # about 5 minutes as the teststring grows exponentially. 829156283Srwatson # Worse, since 9x/ME are not pre-emptively multitasking, 830156283Srwatson # you end up with a "frozen" computer, even though with patience 831156283Srwatson # the test eventually succeeds (with a max line length of 256k). 832156283Srwatson # Instead, let's just punt: use the minimum linelength reported by 833156283Srwatson # all of the supported platforms: 8192 (on NT/2K/XP). 834156283Srwatson lt_cv_sys_max_cmd_len=8192; 835156283Srwatson ;; 836156283Srwatson 837156283Srwatson amigaos*) 838156283Srwatson # On AmigaOS with pdksh, this test takes hours, literally. 839156283Srwatson # So we just punt and use a minimum line length of 8192. 840156283Srwatson lt_cv_sys_max_cmd_len=8192; 841156283Srwatson ;; 842156283Srwatson 843156283Srwatson netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) 844156283Srwatson # This has been around since 386BSD, at least. Likely further. 845156283Srwatson if test -x /sbin/sysctl; then 846156283Srwatson lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 847156283Srwatson elif test -x /usr/sbin/sysctl; then 848156283Srwatson lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 849156283Srwatson else 850156283Srwatson lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 851156283Srwatson fi 852156283Srwatson # And add a safety zone 853156283Srwatson lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 854156283Srwatson lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 855156283Srwatson ;; 856173143Srwatson 857173143Srwatson interix*) 858173143Srwatson # We know the value 262144 and hardcode it with a safety zone (like BSD) 859173143Srwatson lt_cv_sys_max_cmd_len=196608 860173143Srwatson ;; 861173143Srwatson 862156283Srwatson osf*) 863156283Srwatson # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 864156283Srwatson # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 865156283Srwatson # nice to cause kernel panics so lets avoid the loop below. 866156283Srwatson # First set a reasonable default. 867156283Srwatson lt_cv_sys_max_cmd_len=16384 868156283Srwatson # 869156283Srwatson if test -x /sbin/sysconfig; then 870156283Srwatson case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 871156283Srwatson *1*) lt_cv_sys_max_cmd_len=-1 ;; 872156283Srwatson esac 873156283Srwatson fi 874156283Srwatson ;; 875173143Srwatson sco3.2v5*) 876173143Srwatson lt_cv_sys_max_cmd_len=102400 877173143Srwatson ;; 878173143Srwatson sysv5* | sco5v6* | sysv4.2uw2*) 879173143Srwatson kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 880173143Srwatson if test -n "$kargmax"; then 881173143Srwatson lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` 882173143Srwatson else 883173143Srwatson lt_cv_sys_max_cmd_len=32768 884173143Srwatson fi 885173143Srwatson ;; 886156283Srwatson *) 887173143Srwatson lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 888173143Srwatson if test -n "$lt_cv_sys_max_cmd_len"; then 889173143Srwatson lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 890173143Srwatson lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 891173143Srwatson else 892173143Srwatson SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 893173143Srwatson while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \ 894156283Srwatson = "XX$teststring") >/dev/null 2>&1 && 895173143Srwatson new_result=`expr "X$teststring" : ".*" 2>&1` && 896173143Srwatson lt_cv_sys_max_cmd_len=$new_result && 897173143Srwatson test $i != 17 # 1/2 MB should be enough 898173143Srwatson do 899173143Srwatson i=`expr $i + 1` 900173143Srwatson teststring=$teststring$teststring 901173143Srwatson done 902173143Srwatson teststring= 903173143Srwatson # Add a significant safety factor because C++ compilers can tack on massive 904173143Srwatson # amounts of additional arguments before passing them to the linker. 905173143Srwatson # It appears as though 1/2 is a usable value. 906173143Srwatson lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 907173143Srwatson fi 908156283Srwatson ;; 909156283Srwatson esac 910156283Srwatson]) 911156283Srwatsonif test -n $lt_cv_sys_max_cmd_len ; then 912156283Srwatson AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 913156283Srwatsonelse 914156283Srwatson AC_MSG_RESULT(none) 915156283Srwatsonfi 916156283Srwatson])# AC_LIBTOOL_SYS_MAX_CMD_LEN 917156283Srwatson 918156283Srwatson 919156283Srwatson# _LT_AC_CHECK_DLFCN 920173143Srwatson# ------------------ 921156283SrwatsonAC_DEFUN([_LT_AC_CHECK_DLFCN], 922156283Srwatson[AC_CHECK_HEADERS(dlfcn.h)dnl 923156283Srwatson])# _LT_AC_CHECK_DLFCN 924156283Srwatson 925156283Srwatson 926156283Srwatson# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 927156283Srwatson# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 928173143Srwatson# --------------------------------------------------------------------- 929156283SrwatsonAC_DEFUN([_LT_AC_TRY_DLOPEN_SELF], 930156283Srwatson[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl 931156283Srwatsonif test "$cross_compiling" = yes; then : 932156283Srwatson [$4] 933156283Srwatsonelse 934156283Srwatson lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 935156283Srwatson lt_status=$lt_dlunknown 936156283Srwatson cat > conftest.$ac_ext <<EOF 937156283Srwatson[#line __oline__ "configure" 938156283Srwatson#include "confdefs.h" 939156283Srwatson 940156283Srwatson#if HAVE_DLFCN_H 941156283Srwatson#include <dlfcn.h> 942156283Srwatson#endif 943156283Srwatson 944156283Srwatson#include <stdio.h> 945156283Srwatson 946156283Srwatson#ifdef RTLD_GLOBAL 947156283Srwatson# define LT_DLGLOBAL RTLD_GLOBAL 948156283Srwatson#else 949156283Srwatson# ifdef DL_GLOBAL 950156283Srwatson# define LT_DLGLOBAL DL_GLOBAL 951156283Srwatson# else 952156283Srwatson# define LT_DLGLOBAL 0 953156283Srwatson# endif 954156283Srwatson#endif 955156283Srwatson 956156283Srwatson/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 957156283Srwatson find out it does not work in some platform. */ 958156283Srwatson#ifndef LT_DLLAZY_OR_NOW 959156283Srwatson# ifdef RTLD_LAZY 960156283Srwatson# define LT_DLLAZY_OR_NOW RTLD_LAZY 961156283Srwatson# else 962156283Srwatson# ifdef DL_LAZY 963156283Srwatson# define LT_DLLAZY_OR_NOW DL_LAZY 964156283Srwatson# else 965156283Srwatson# ifdef RTLD_NOW 966156283Srwatson# define LT_DLLAZY_OR_NOW RTLD_NOW 967156283Srwatson# else 968156283Srwatson# ifdef DL_NOW 969156283Srwatson# define LT_DLLAZY_OR_NOW DL_NOW 970156283Srwatson# else 971156283Srwatson# define LT_DLLAZY_OR_NOW 0 972156283Srwatson# endif 973156283Srwatson# endif 974156283Srwatson# endif 975156283Srwatson# endif 976156283Srwatson#endif 977156283Srwatson 978156283Srwatson#ifdef __cplusplus 979156283Srwatsonextern "C" void exit (int); 980156283Srwatson#endif 981156283Srwatson 982156283Srwatsonvoid fnord() { int i=42;} 983156283Srwatsonint main () 984156283Srwatson{ 985156283Srwatson void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 986156283Srwatson int status = $lt_dlunknown; 987156283Srwatson 988156283Srwatson if (self) 989156283Srwatson { 990156283Srwatson if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 991156283Srwatson else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 992156283Srwatson /* dlclose (self); */ 993156283Srwatson } 994173143Srwatson else 995173143Srwatson puts (dlerror ()); 996156283Srwatson 997156283Srwatson exit (status); 998156283Srwatson}] 999156283SrwatsonEOF 1000156283Srwatson if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then 1001156283Srwatson (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 1002156283Srwatson lt_status=$? 1003156283Srwatson case x$lt_status in 1004156283Srwatson x$lt_dlno_uscore) $1 ;; 1005156283Srwatson x$lt_dlneed_uscore) $2 ;; 1006173143Srwatson x$lt_dlunknown|x*) $3 ;; 1007156283Srwatson esac 1008156283Srwatson else : 1009156283Srwatson # compilation failed 1010156283Srwatson $3 1011156283Srwatson fi 1012156283Srwatsonfi 1013156283Srwatsonrm -fr conftest* 1014156283Srwatson])# _LT_AC_TRY_DLOPEN_SELF 1015156283Srwatson 1016156283Srwatson 1017156283Srwatson# AC_LIBTOOL_DLOPEN_SELF 1018173143Srwatson# ---------------------- 1019156283SrwatsonAC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], 1020156283Srwatson[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl 1021156283Srwatsonif test "x$enable_dlopen" != xyes; then 1022156283Srwatson enable_dlopen=unknown 1023156283Srwatson enable_dlopen_self=unknown 1024156283Srwatson enable_dlopen_self_static=unknown 1025156283Srwatsonelse 1026156283Srwatson lt_cv_dlopen=no 1027156283Srwatson lt_cv_dlopen_libs= 1028156283Srwatson 1029156283Srwatson case $host_os in 1030156283Srwatson beos*) 1031156283Srwatson lt_cv_dlopen="load_add_on" 1032156283Srwatson lt_cv_dlopen_libs= 1033156283Srwatson lt_cv_dlopen_self=yes 1034156283Srwatson ;; 1035156283Srwatson 1036156283Srwatson mingw* | pw32*) 1037156283Srwatson lt_cv_dlopen="LoadLibrary" 1038156283Srwatson lt_cv_dlopen_libs= 1039156283Srwatson ;; 1040156283Srwatson 1041156283Srwatson cygwin*) 1042156283Srwatson lt_cv_dlopen="dlopen" 1043156283Srwatson lt_cv_dlopen_libs= 1044156283Srwatson ;; 1045156283Srwatson 1046156283Srwatson darwin*) 1047156283Srwatson # if libdl is installed we need to link against it 1048156283Srwatson AC_CHECK_LIB([dl], [dlopen], 1049156283Srwatson [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ 1050156283Srwatson lt_cv_dlopen="dyld" 1051156283Srwatson lt_cv_dlopen_libs= 1052156283Srwatson lt_cv_dlopen_self=yes 1053156283Srwatson ]) 1054156283Srwatson ;; 1055156283Srwatson 1056156283Srwatson *) 1057156283Srwatson AC_CHECK_FUNC([shl_load], 1058156283Srwatson [lt_cv_dlopen="shl_load"], 1059156283Srwatson [AC_CHECK_LIB([dld], [shl_load], 1060191273Srwatson [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], 1061156283Srwatson [AC_CHECK_FUNC([dlopen], 1062156283Srwatson [lt_cv_dlopen="dlopen"], 1063156283Srwatson [AC_CHECK_LIB([dl], [dlopen], 1064156283Srwatson [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], 1065156283Srwatson [AC_CHECK_LIB([svld], [dlopen], 1066156283Srwatson [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], 1067156283Srwatson [AC_CHECK_LIB([dld], [dld_link], 1068191273Srwatson [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) 1069156283Srwatson ]) 1070156283Srwatson ]) 1071156283Srwatson ]) 1072156283Srwatson ]) 1073156283Srwatson ]) 1074156283Srwatson ;; 1075156283Srwatson esac 1076156283Srwatson 1077156283Srwatson if test "x$lt_cv_dlopen" != xno; then 1078156283Srwatson enable_dlopen=yes 1079156283Srwatson else 1080156283Srwatson enable_dlopen=no 1081156283Srwatson fi 1082156283Srwatson 1083156283Srwatson case $lt_cv_dlopen in 1084156283Srwatson dlopen) 1085156283Srwatson save_CPPFLAGS="$CPPFLAGS" 1086156283Srwatson test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 1087156283Srwatson 1088156283Srwatson save_LDFLAGS="$LDFLAGS" 1089173143Srwatson wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 1090156283Srwatson 1091156283Srwatson save_LIBS="$LIBS" 1092156283Srwatson LIBS="$lt_cv_dlopen_libs $LIBS" 1093156283Srwatson 1094156283Srwatson AC_CACHE_CHECK([whether a program can dlopen itself], 1095156283Srwatson lt_cv_dlopen_self, [dnl 1096156283Srwatson _LT_AC_TRY_DLOPEN_SELF( 1097156283Srwatson lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 1098156283Srwatson lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 1099156283Srwatson ]) 1100156283Srwatson 1101156283Srwatson if test "x$lt_cv_dlopen_self" = xyes; then 1102173143Srwatson wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 1103156283Srwatson AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 1104156283Srwatson lt_cv_dlopen_self_static, [dnl 1105156283Srwatson _LT_AC_TRY_DLOPEN_SELF( 1106156283Srwatson lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 1107156283Srwatson lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 1108156283Srwatson ]) 1109156283Srwatson fi 1110156283Srwatson 1111156283Srwatson CPPFLAGS="$save_CPPFLAGS" 1112156283Srwatson LDFLAGS="$save_LDFLAGS" 1113156283Srwatson LIBS="$save_LIBS" 1114156283Srwatson ;; 1115156283Srwatson esac 1116156283Srwatson 1117156283Srwatson case $lt_cv_dlopen_self in 1118156283Srwatson yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 1119156283Srwatson *) enable_dlopen_self=unknown ;; 1120156283Srwatson esac 1121156283Srwatson 1122156283Srwatson case $lt_cv_dlopen_self_static in 1123156283Srwatson yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 1124156283Srwatson *) enable_dlopen_self_static=unknown ;; 1125156283Srwatson esac 1126156283Srwatsonfi 1127156283Srwatson])# AC_LIBTOOL_DLOPEN_SELF 1128156283Srwatson 1129156283Srwatson 1130156283Srwatson# AC_LIBTOOL_PROG_CC_C_O([TAGNAME]) 1131156283Srwatson# --------------------------------- 1132156283Srwatson# Check to see if options -c and -o are simultaneously supported by compiler 1133156283SrwatsonAC_DEFUN([AC_LIBTOOL_PROG_CC_C_O], 1134173143Srwatson[AC_REQUIRE([LT_AC_PROG_SED])dnl 1135173143SrwatsonAC_REQUIRE([_LT_AC_SYS_COMPILER])dnl 1136156283SrwatsonAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 1137156283Srwatson [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 1138156283Srwatson [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 1139156283Srwatson $rm -r conftest 2>/dev/null 1140156283Srwatson mkdir conftest 1141156283Srwatson cd conftest 1142156283Srwatson mkdir out 1143173143Srwatson echo "$lt_simple_compile_test_code" > conftest.$ac_ext 1144156283Srwatson 1145156283Srwatson lt_compiler_flag="-o out/conftest2.$ac_objext" 1146156283Srwatson # Insert the option either (1) after the last *FLAGS variable, or 1147156283Srwatson # (2) before a word containing "conftest.", or (3) at the end. 1148156283Srwatson # Note that $ac_compile itself does not contain backslashes and begins 1149156283Srwatson # with a dollar sign (not a hyphen), so the echo should work correctly. 1150156283Srwatson lt_compile=`echo "$ac_compile" | $SED \ 1151156283Srwatson -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 1152156283Srwatson -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 1153156283Srwatson -e 's:$: $lt_compiler_flag:'` 1154156283Srwatson (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 1155156283Srwatson (eval "$lt_compile" 2>out/conftest.err) 1156156283Srwatson ac_status=$? 1157156283Srwatson cat out/conftest.err >&AS_MESSAGE_LOG_FD 1158156283Srwatson echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 1159156283Srwatson if (exit $ac_status) && test -s out/conftest2.$ac_objext 1160156283Srwatson then 1161156283Srwatson # The compiler can only warn and ignore the option if not recognized 1162156283Srwatson # So say no if there are warnings 1163173143Srwatson $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp 1164173143Srwatson $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 1165173143Srwatson if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 1166156283Srwatson _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 1167156283Srwatson fi 1168156283Srwatson fi 1169156283Srwatson chmod u+w . 2>&AS_MESSAGE_LOG_FD 1170156283Srwatson $rm conftest* 1171156283Srwatson # SGI C++ compiler will create directory out/ii_files/ for 1172156283Srwatson # template instantiation 1173156283Srwatson test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files 1174156283Srwatson $rm out/* && rmdir out 1175156283Srwatson cd .. 1176156283Srwatson rmdir conftest 1177156283Srwatson $rm conftest* 1178156283Srwatson]) 1179156283Srwatson])# AC_LIBTOOL_PROG_CC_C_O 1180156283Srwatson 1181156283Srwatson 1182156283Srwatson# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME]) 1183156283Srwatson# ----------------------------------------- 1184156283Srwatson# Check to see if we can do hard links to lock some files if needed 1185156283SrwatsonAC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], 1186156283Srwatson[AC_REQUIRE([_LT_AC_LOCK])dnl 1187156283Srwatson 1188156283Srwatsonhard_links="nottested" 1189156283Srwatsonif test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then 1190156283Srwatson # do not overwrite the value of need_locks provided by the user 1191156283Srwatson AC_MSG_CHECKING([if we can lock with hard links]) 1192156283Srwatson hard_links=yes 1193156283Srwatson $rm conftest* 1194156283Srwatson ln conftest.a conftest.b 2>/dev/null && hard_links=no 1195156283Srwatson touch conftest.a 1196156283Srwatson ln conftest.a conftest.b 2>&5 || hard_links=no 1197156283Srwatson ln conftest.a conftest.b 2>/dev/null && hard_links=no 1198156283Srwatson AC_MSG_RESULT([$hard_links]) 1199156283Srwatson if test "$hard_links" = no; then 1200156283Srwatson AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) 1201156283Srwatson need_locks=warn 1202156283Srwatson fi 1203156283Srwatsonelse 1204156283Srwatson need_locks=no 1205156283Srwatsonfi 1206156283Srwatson])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS 1207156283Srwatson 1208156283Srwatson 1209156283Srwatson# AC_LIBTOOL_OBJDIR 1210156283Srwatson# ----------------- 1211156283SrwatsonAC_DEFUN([AC_LIBTOOL_OBJDIR], 1212156283Srwatson[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 1213156283Srwatson[rm -f .libs 2>/dev/null 1214156283Srwatsonmkdir .libs 2>/dev/null 1215156283Srwatsonif test -d .libs; then 1216156283Srwatson lt_cv_objdir=.libs 1217156283Srwatsonelse 1218156283Srwatson # MS-DOS does not allow filenames that begin with a dot. 1219156283Srwatson lt_cv_objdir=_libs 1220156283Srwatsonfi 1221156283Srwatsonrmdir .libs 2>/dev/null]) 1222156283Srwatsonobjdir=$lt_cv_objdir 1223156283Srwatson])# AC_LIBTOOL_OBJDIR 1224156283Srwatson 1225156283Srwatson 1226156283Srwatson# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME]) 1227156283Srwatson# ---------------------------------------------- 1228156283Srwatson# Check hardcoding attributes. 1229156283SrwatsonAC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], 1230156283Srwatson[AC_MSG_CHECKING([how to hardcode library paths into programs]) 1231156283Srwatson_LT_AC_TAGVAR(hardcode_action, $1)= 1232156283Srwatsonif test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \ 1233156283Srwatson test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \ 1234156283Srwatson test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then 1235156283Srwatson 1236156283Srwatson # We can hardcode non-existant directories. 1237156283Srwatson if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no && 1238156283Srwatson # If the only mechanism to avoid hardcoding is shlibpath_var, we 1239156283Srwatson # have to relink, otherwise we might link with an installed library 1240156283Srwatson # when we should be linking with a yet-to-be-installed one 1241156283Srwatson ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no && 1242156283Srwatson test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then 1243156283Srwatson # Linking always hardcodes the temporary library directory. 1244156283Srwatson _LT_AC_TAGVAR(hardcode_action, $1)=relink 1245156283Srwatson else 1246156283Srwatson # We can link without hardcoding, and we can hardcode nonexisting dirs. 1247156283Srwatson _LT_AC_TAGVAR(hardcode_action, $1)=immediate 1248156283Srwatson fi 1249156283Srwatsonelse 1250156283Srwatson # We cannot hardcode anything, or else we can only hardcode existing 1251156283Srwatson # directories. 1252156283Srwatson _LT_AC_TAGVAR(hardcode_action, $1)=unsupported 1253156283Srwatsonfi 1254156283SrwatsonAC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)]) 1255156283Srwatson 1256156283Srwatsonif test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then 1257156283Srwatson # Fast installation is not supported 1258156283Srwatson enable_fast_install=no 1259156283Srwatsonelif test "$shlibpath_overrides_runpath" = yes || 1260156283Srwatson test "$enable_shared" = no; then 1261156283Srwatson # Fast installation is not necessary 1262156283Srwatson enable_fast_install=needless 1263156283Srwatsonfi 1264156283Srwatson])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH 1265156283Srwatson 1266156283Srwatson 1267156283Srwatson# AC_LIBTOOL_SYS_LIB_STRIP 1268156283Srwatson# ------------------------ 1269156283SrwatsonAC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP], 1270156283Srwatson[striplib= 1271156283Srwatsonold_striplib= 1272156283SrwatsonAC_MSG_CHECKING([whether stripping libraries is possible]) 1273156283Srwatsonif test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then 1274156283Srwatson test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" 1275156283Srwatson test -z "$striplib" && striplib="$STRIP --strip-unneeded" 1276156283Srwatson AC_MSG_RESULT([yes]) 1277156283Srwatsonelse 1278156283Srwatson# FIXME - insert some real tests, host_os isn't really good enough 1279156283Srwatson case $host_os in 1280156283Srwatson darwin*) 1281156283Srwatson if test -n "$STRIP" ; then 1282156283Srwatson striplib="$STRIP -x" 1283173143Srwatson old_striplib="$STRIP -S" 1284156283Srwatson AC_MSG_RESULT([yes]) 1285156283Srwatson else 1286156283Srwatson AC_MSG_RESULT([no]) 1287156283Srwatsonfi 1288156283Srwatson ;; 1289156283Srwatson *) 1290156283Srwatson AC_MSG_RESULT([no]) 1291156283Srwatson ;; 1292156283Srwatson esac 1293156283Srwatsonfi 1294156283Srwatson])# AC_LIBTOOL_SYS_LIB_STRIP 1295156283Srwatson 1296156283Srwatson 1297156283Srwatson# AC_LIBTOOL_SYS_DYNAMIC_LINKER 1298156283Srwatson# ----------------------------- 1299156283Srwatson# PORTME Fill in your ld.so characteristics 1300156283SrwatsonAC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER], 1301173143Srwatson[AC_REQUIRE([LT_AC_PROG_SED])dnl 1302173143SrwatsonAC_MSG_CHECKING([dynamic linker characteristics]) 1303156283Srwatsonlibrary_names_spec= 1304156283Srwatsonlibname_spec='lib$name' 1305156283Srwatsonsoname_spec= 1306156283Srwatsonshrext_cmds=".so" 1307156283Srwatsonpostinstall_cmds= 1308156283Srwatsonpostuninstall_cmds= 1309156283Srwatsonfinish_cmds= 1310156283Srwatsonfinish_eval= 1311156283Srwatsonshlibpath_var= 1312156283Srwatsonshlibpath_overrides_runpath=unknown 1313156283Srwatsonversion_type=none 1314156283Srwatsondynamic_linker="$host_os ld.so" 1315156283Srwatsonsys_lib_dlsearch_path_spec="/lib /usr/lib" 1316173143Srwatsonm4_if($1,[],[ 1317156283Srwatsonif test "$GCC" = yes; then 1318173143Srwatson case $host_os in 1319173143Srwatson darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; 1320173143Srwatson *) lt_awk_arg="/^libraries:/" ;; 1321173143Srwatson esac 1322173143Srwatson lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` 1323173143Srwatson if echo "$lt_search_path_spec" | grep ';' >/dev/null ; then 1324156283Srwatson # if the path contains ";" then we assume it to be the separator 1325156283Srwatson # otherwise default to the standard path separator (i.e. ":") - it is 1326156283Srwatson # assumed that no part of a normal pathname contains ";" but that should 1327156283Srwatson # okay in the real world where ";" in dirpaths is itself problematic. 1328173143Srwatson lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e 's/;/ /g'` 1329156283Srwatson else 1330173143Srwatson lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 1331156283Srwatson fi 1332173143Srwatson # Ok, now we have the path, separated by spaces, we can step through it 1333173143Srwatson # and add multilib dir if necessary. 1334173143Srwatson lt_tmp_lt_search_path_spec= 1335173143Srwatson lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 1336173143Srwatson for lt_sys_path in $lt_search_path_spec; do 1337173143Srwatson if test -d "$lt_sys_path/$lt_multi_os_dir"; then 1338173143Srwatson lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" 1339173143Srwatson else 1340173143Srwatson test -d "$lt_sys_path" && \ 1341173143Srwatson lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 1342173143Srwatson fi 1343173143Srwatson done 1344173143Srwatson lt_search_path_spec=`echo $lt_tmp_lt_search_path_spec | awk ' 1345173143SrwatsonBEGIN {RS=" "; FS="/|\n";} { 1346173143Srwatson lt_foo=""; 1347173143Srwatson lt_count=0; 1348173143Srwatson for (lt_i = NF; lt_i > 0; lt_i--) { 1349173143Srwatson if ($lt_i != "" && $lt_i != ".") { 1350173143Srwatson if ($lt_i == "..") { 1351173143Srwatson lt_count++; 1352173143Srwatson } else { 1353173143Srwatson if (lt_count == 0) { 1354173143Srwatson lt_foo="/" $lt_i lt_foo; 1355173143Srwatson } else { 1356173143Srwatson lt_count--; 1357173143Srwatson } 1358173143Srwatson } 1359173143Srwatson } 1360173143Srwatson } 1361173143Srwatson if (lt_foo != "") { lt_freq[[lt_foo]]++; } 1362173143Srwatson if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 1363173143Srwatson}'` 1364173143Srwatson sys_lib_search_path_spec=`echo $lt_search_path_spec` 1365156283Srwatsonelse 1366156283Srwatson sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 1367173143Srwatsonfi]) 1368156283Srwatsonneed_lib_prefix=unknown 1369156283Srwatsonhardcode_into_libs=no 1370156283Srwatson 1371156283Srwatson# when you set need_version to no, make sure it does not cause -set_version 1372156283Srwatson# flags to be left without arguments 1373156283Srwatsonneed_version=unknown 1374156283Srwatson 1375156283Srwatsoncase $host_os in 1376156283Srwatsonaix3*) 1377156283Srwatson version_type=linux 1378156283Srwatson library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' 1379156283Srwatson shlibpath_var=LIBPATH 1380156283Srwatson 1381156283Srwatson # AIX 3 has no versioning support, so we append a major version to the name. 1382156283Srwatson soname_spec='${libname}${release}${shared_ext}$major' 1383156283Srwatson ;; 1384156283Srwatson 1385191273Srwatsonaix[[4-9]]*) 1386156283Srwatson version_type=linux 1387156283Srwatson need_lib_prefix=no 1388156283Srwatson need_version=no 1389156283Srwatson hardcode_into_libs=yes 1390156283Srwatson if test "$host_cpu" = ia64; then 1391156283Srwatson # AIX 5 supports IA64 1392156283Srwatson library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' 1393156283Srwatson shlibpath_var=LD_LIBRARY_PATH 1394156283Srwatson else 1395156283Srwatson # With GCC up to 2.95.x, collect2 would create an import file 1396156283Srwatson # for dependence libraries. The import file would start with 1397156283Srwatson # the line `#! .'. This would cause the generated library to 1398156283Srwatson # depend on `.', always an invalid library. This was fixed in 1399156283Srwatson # development snapshots of GCC prior to 3.0. 1400156283Srwatson case $host_os in 1401156283Srwatson aix4 | aix4.[[01]] | aix4.[[01]].*) 1402156283Srwatson if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 1403156283Srwatson echo ' yes ' 1404156283Srwatson echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then 1405156283Srwatson : 1406156283Srwatson else 1407156283Srwatson can_build_shared=no 1408156283Srwatson fi 1409156283Srwatson ;; 1410156283Srwatson esac 1411156283Srwatson # AIX (on Power*) has no versioning support, so currently we can not hardcode correct 1412156283Srwatson # soname into executable. Probably we can add versioning support to 1413156283Srwatson # collect2, so additional links can be useful in future. 1414156283Srwatson if test "$aix_use_runtimelinking" = yes; then 1415156283Srwatson # If using run time linking (on AIX 4.2 or later) use lib<name>.so 1416156283Srwatson # instead of lib<name>.a to let people know that these are not 1417156283Srwatson # typical AIX shared libraries. 1418156283Srwatson library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 1419156283Srwatson else 1420156283Srwatson # We preserve .a as extension for shared libraries through AIX4.2 1421156283Srwatson # and later when we are not doing run time linking. 1422156283Srwatson library_names_spec='${libname}${release}.a $libname.a' 1423156283Srwatson soname_spec='${libname}${release}${shared_ext}$major' 1424156283Srwatson fi 1425156283Srwatson shlibpath_var=LIBPATH 1426156283Srwatson fi 1427156283Srwatson ;; 1428156283Srwatson 1429156283Srwatsonamigaos*) 1430156283Srwatson library_names_spec='$libname.ixlibrary $libname.a' 1431156283Srwatson # Create ${libname}_ixlibrary.a entries in /sys/libs. 1432156283Srwatson 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' 1433156283Srwatson ;; 1434156283Srwatson 1435156283Srwatsonbeos*) 1436156283Srwatson library_names_spec='${libname}${shared_ext}' 1437156283Srwatson dynamic_linker="$host_os ld.so" 1438156283Srwatson shlibpath_var=LIBRARY_PATH 1439156283Srwatson ;; 1440156283Srwatson 1441156283Srwatsonbsdi[[45]]*) 1442156283Srwatson version_type=linux 1443156283Srwatson need_version=no 1444156283Srwatson library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 1445156283Srwatson soname_spec='${libname}${release}${shared_ext}$major' 1446156283Srwatson finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 1447156283Srwatson shlibpath_var=LD_LIBRARY_PATH 1448156283Srwatson sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 1449156283Srwatson sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 1450156283Srwatson # the default ld.so.conf also contains /usr/contrib/lib and 1451156283Srwatson # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 1452156283Srwatson # libtool to hard-code these into programs 1453156283Srwatson ;; 1454156283Srwatson 1455156283Srwatsoncygwin* | mingw* | pw32*) 1456156283Srwatson version_type=windows 1457156283Srwatson shrext_cmds=".dll" 1458156283Srwatson need_version=no 1459156283Srwatson need_lib_prefix=no 1460156283Srwatson 1461156283Srwatson case $GCC,$host_os in 1462156283Srwatson yes,cygwin* | yes,mingw* | yes,pw32*) 1463156283Srwatson library_names_spec='$libname.dll.a' 1464156283Srwatson # DLL is installed to $(libdir)/../bin by postinstall_cmds 1465156283Srwatson postinstall_cmds='base_file=`basename \${file}`~ 1466156283Srwatson dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ 1467156283Srwatson dldir=$destdir/`dirname \$dlpath`~ 1468156283Srwatson test -d \$dldir || mkdir -p \$dldir~ 1469156283Srwatson $install_prog $dir/$dlname \$dldir/$dlname~ 1470156283Srwatson chmod a+x \$dldir/$dlname' 1471156283Srwatson postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 1472156283Srwatson dlpath=$dir/\$dldll~ 1473156283Srwatson $rm \$dlpath' 1474156283Srwatson shlibpath_overrides_runpath=yes 1475156283Srwatson 1476156283Srwatson case $host_os in 1477156283Srwatson cygwin*) 1478156283Srwatson # Cygwin DLLs use 'cyg' prefix rather than 'lib' 1479156283Srwatson soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 1480156283Srwatson sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" 1481156283Srwatson ;; 1482156283Srwatson mingw*) 1483156283Srwatson # MinGW DLLs use traditional 'lib' prefix 1484156283Srwatson soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 1485156283Srwatson sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` 1486156283Srwatson if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then 1487156283Srwatson # It is most probably a Windows format PATH printed by 1488156283Srwatson # mingw gcc, but we are running on Cygwin. Gcc prints its search 1489156283Srwatson # path with ; separators, and with drive letters. We can handle the 1490156283Srwatson # drive letters (cygwin fileutils understands them), so leave them, 1491156283Srwatson # especially as we might pass files found there to a mingw objdump, 1492156283Srwatson # which wouldn't understand a cygwinified path. Ahh. 1493156283Srwatson sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 1494156283Srwatson else 1495156283Srwatson sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 1496156283Srwatson fi 1497156283Srwatson ;; 1498156283Srwatson pw32*) 1499156283Srwatson # pw32 DLLs use 'pw' prefix rather than 'lib' 1500156283Srwatson library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 1501156283Srwatson ;; 1502156283Srwatson esac 1503156283Srwatson ;; 1504156283Srwatson 1505156283Srwatson *) 1506156283Srwatson library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' 1507156283Srwatson ;; 1508156283Srwatson esac 1509156283Srwatson dynamic_linker='Win32 ld.exe' 1510156283Srwatson # FIXME: first we should search . and the directory the executable is in 1511156283Srwatson shlibpath_var=PATH 1512156283Srwatson ;; 1513156283Srwatson 1514156283Srwatsondarwin* | rhapsody*) 1515156283Srwatson dynamic_linker="$host_os dyld" 1516156283Srwatson version_type=darwin 1517156283Srwatson need_lib_prefix=no 1518156283Srwatson need_version=no 1519156283Srwatson library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' 1520156283Srwatson soname_spec='${libname}${release}${major}$shared_ext' 1521156283Srwatson shlibpath_overrides_runpath=yes 1522156283Srwatson shlibpath_var=DYLD_LIBRARY_PATH 1523156283Srwatson shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 1524173143Srwatson m4_if([$1], [],[ 1525173143Srwatson sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 1526156283Srwatson sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 1527156283Srwatson ;; 1528156283Srwatson 1529156283Srwatsondgux*) 1530156283Srwatson version_type=linux 1531156283Srwatson need_lib_prefix=no 1532156283Srwatson need_version=no 1533156283Srwatson library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' 1534156283Srwatson soname_spec='${libname}${release}${shared_ext}$major' 1535156283Srwatson shlibpath_var=LD_LIBRARY_PATH 1536156283Srwatson ;; 1537156283Srwatson 1538156283Srwatsonfreebsd1*) 1539156283Srwatson dynamic_linker=no 1540156283Srwatson ;; 1541156283Srwatson 1542156283Srwatsonfreebsd* | dragonfly*) 1543156283Srwatson # DragonFly does not have aout. When/if they implement a new 1544156283Srwatson # versioning mechanism, adjust this. 1545156283Srwatson if test -x /usr/bin/objformat; then 1546156283Srwatson objformat=`/usr/bin/objformat` 1547156283Srwatson else 1548156283Srwatson case $host_os in 1549156283Srwatson freebsd[[123]]*) objformat=aout ;; 1550156283Srwatson *) objformat=elf ;; 1551156283Srwatson esac 1552156283Srwatson fi 1553156283Srwatson version_type=freebsd-$objformat 1554156283Srwatson case $version_type in 1555156283Srwatson freebsd-elf*) 1556156283Srwatson library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 1557156283Srwatson need_version=no 1558156283Srwatson need_lib_prefix=no 1559156283Srwatson ;; 1560156283Srwatson freebsd-*) 1561156283Srwatson library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' 1562156283Srwatson need_version=yes 1563156283Srwatson ;; 1564156283Srwatson esac 1565156283Srwatson shlibpath_var=LD_LIBRARY_PATH 1566156283Srwatson case $host_os in 1567156283Srwatson freebsd2*) 1568156283Srwatson shlibpath_overrides_runpath=yes 1569156283Srwatson ;; 1570156283Srwatson freebsd3.[[01]]* | freebsdelf3.[[01]]*) 1571156283Srwatson shlibpath_overrides_runpath=yes 1572156283Srwatson hardcode_into_libs=yes 1573156283Srwatson ;; 1574173143Srwatson freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 1575173143Srwatson freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 1576156283Srwatson shlibpath_overrides_runpath=no 1577156283Srwatson hardcode_into_libs=yes 1578156283Srwatson ;; 1579173143Srwatson *) # from 4.6 on, and DragonFly 1580173143Srwatson shlibpath_overrides_runpath=yes 1581173143Srwatson hardcode_into_libs=yes 1582173143Srwatson ;; 1583156283Srwatson esac 1584156283Srwatson ;; 1585156283Srwatson 1586156283Srwatsongnu*) 1587156283Srwatson version_type=linux 1588156283Srwatson need_lib_prefix=no 1589156283Srwatson need_version=no 1590156283Srwatson library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 1591156283Srwatson soname_spec='${libname}${release}${shared_ext}$major' 1592156283Srwatson shlibpath_var=LD_LIBRARY_PATH 1593156283Srwatson hardcode_into_libs=yes 1594156283Srwatson ;; 1595156283Srwatson 1596156283Srwatsonhpux9* | hpux10* | hpux11*) 1597156283Srwatson # Give a soname corresponding to the major version so that dld.sl refuses to 1598156283Srwatson # link against other versions. 1599156283Srwatson version_type=sunos 1600156283Srwatson need_lib_prefix=no 1601156283Srwatson need_version=no 1602156283Srwatson case $host_cpu in 1603156283Srwatson ia64*) 1604156283Srwatson shrext_cmds='.so' 1605156283Srwatson hardcode_into_libs=yes 1606156283Srwatson dynamic_linker="$host_os dld.so" 1607156283Srwatson shlibpath_var=LD_LIBRARY_PATH 1608156283Srwatson shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 1609156283Srwatson library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 1610156283Srwatson soname_spec='${libname}${release}${shared_ext}$major' 1611156283Srwatson if test "X$HPUX_IA64_MODE" = X32; then 1612156283Srwatson sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 1613156283Srwatson else 1614156283Srwatson sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 1615156283Srwatson fi 1616156283Srwatson sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 1617156283Srwatson ;; 1618156283Srwatson hppa*64*) 1619156283Srwatson shrext_cmds='.sl' 1620156283Srwatson hardcode_into_libs=yes 1621156283Srwatson dynamic_linker="$host_os dld.sl" 1622156283Srwatson shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 1623156283Srwatson shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 1624156283Srwatson library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 1625156283Srwatson soname_spec='${libname}${release}${shared_ext}$major' 1626156283Srwatson sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 1627156283Srwatson sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 1628156283Srwatson ;; 1629156283Srwatson *) 1630156283Srwatson shrext_cmds='.sl' 1631156283Srwatson dynamic_linker="$host_os dld.sl" 1632156283Srwatson shlibpath_var=SHLIB_PATH 1633156283Srwatson shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 1634156283Srwatson library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 1635156283Srwatson soname_spec='${libname}${release}${shared_ext}$major' 1636156283Srwatson ;; 1637156283Srwatson esac 1638156283Srwatson # HP-UX runs *really* slowly unless shared libraries are mode 555. 1639156283Srwatson postinstall_cmds='chmod 555 $lib' 1640156283Srwatson ;; 1641156283Srwatson 1642173143Srwatsoninterix[[3-9]]*) 1643173143Srwatson version_type=linux 1644173143Srwatson need_lib_prefix=no 1645173143Srwatson need_version=no 1646173143Srwatson library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 1647173143Srwatson soname_spec='${libname}${release}${shared_ext}$major' 1648173143Srwatson dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 1649173143Srwatson shlibpath_var=LD_LIBRARY_PATH 1650173143Srwatson shlibpath_overrides_runpath=no 1651173143Srwatson hardcode_into_libs=yes 1652173143Srwatson ;; 1653173143Srwatson 1654156283Srwatsonirix5* | irix6* | nonstopux*) 1655156283Srwatson case $host_os in 1656156283Srwatson nonstopux*) version_type=nonstopux ;; 1657156283Srwatson *) 1658156283Srwatson if test "$lt_cv_prog_gnu_ld" = yes; then 1659156283Srwatson version_type=linux 1660156283Srwatson else 1661156283Srwatson version_type=irix 1662156283Srwatson fi ;; 1663156283Srwatson esac 1664156283Srwatson need_lib_prefix=no 1665156283Srwatson need_version=no 1666156283Srwatson soname_spec='${libname}${release}${shared_ext}$major' 1667156283Srwatson library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' 1668156283Srwatson case $host_os in 1669156283Srwatson irix5* | nonstopux*) 1670156283Srwatson libsuff= shlibsuff= 1671156283Srwatson ;; 1672156283Srwatson *) 1673156283Srwatson case $LD in # libtool.m4 will add one of these switches to LD 1674156283Srwatson *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 1675156283Srwatson libsuff= shlibsuff= libmagic=32-bit;; 1676156283Srwatson *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 1677156283Srwatson libsuff=32 shlibsuff=N32 libmagic=N32;; 1678156283Srwatson *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 1679156283Srwatson libsuff=64 shlibsuff=64 libmagic=64-bit;; 1680156283Srwatson *) libsuff= shlibsuff= libmagic=never-match;; 1681156283Srwatson esac 1682156283Srwatson ;; 1683156283Srwatson esac 1684156283Srwatson shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 1685156283Srwatson shlibpath_overrides_runpath=no 1686156283Srwatson sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" 1687156283Srwatson sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" 1688156283Srwatson hardcode_into_libs=yes 1689156283Srwatson ;; 1690156283Srwatson 1691156283Srwatson# No shared lib support for Linux oldld, aout, or coff. 1692156283Srwatsonlinux*oldld* | linux*aout* | linux*coff*) 1693156283Srwatson dynamic_linker=no 1694156283Srwatson ;; 1695156283Srwatson 1696156283Srwatson# This must be Linux ELF. 1697173143Srwatsonlinux* | k*bsd*-gnu) 1698156283Srwatson version_type=linux 1699156283Srwatson need_lib_prefix=no 1700156283Srwatson need_version=no 1701156283Srwatson library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 1702156283Srwatson soname_spec='${libname}${release}${shared_ext}$major' 1703156283Srwatson finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 1704156283Srwatson shlibpath_var=LD_LIBRARY_PATH 1705156283Srwatson shlibpath_overrides_runpath=no 1706156283Srwatson # This implies no fast_install, which is unacceptable. 1707156283Srwatson # Some rework will be needed to allow for fast_install 1708156283Srwatson # before this can be enabled. 1709156283Srwatson hardcode_into_libs=yes 1710156283Srwatson 1711156283Srwatson # Append ld.so.conf contents to the search path 1712156283Srwatson if test -f /etc/ld.so.conf; then 1713173143Srwatson 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' ' '` 1714156283Srwatson sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" 1715156283Srwatson fi 1716156283Srwatson 1717156283Srwatson # We used to test for /lib/ld.so.1 and disable shared libraries on 1718156283Srwatson # powerpc, because MkLinux only supported shared libraries with the 1719156283Srwatson # GNU dynamic linker. Since this was broken with cross compilers, 1720156283Srwatson # most powerpc-linux boxes support dynamic linking these days and 1721156283Srwatson # people can always --disable-shared, the test was removed, and we 1722156283Srwatson # assume the GNU/Linux dynamic linker is in use. 1723156283Srwatson dynamic_linker='GNU/Linux ld.so' 1724156283Srwatson ;; 1725156283Srwatson 1726156283Srwatsonnetbsd*) 1727156283Srwatson version_type=sunos 1728156283Srwatson need_lib_prefix=no 1729156283Srwatson need_version=no 1730156283Srwatson if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then 1731156283Srwatson library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 1732156283Srwatson finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 1733156283Srwatson dynamic_linker='NetBSD (a.out) ld.so' 1734156283Srwatson else 1735156283Srwatson library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 1736156283Srwatson soname_spec='${libname}${release}${shared_ext}$major' 1737156283Srwatson dynamic_linker='NetBSD ld.elf_so' 1738156283Srwatson fi 1739156283Srwatson shlibpath_var=LD_LIBRARY_PATH 1740156283Srwatson shlibpath_overrides_runpath=yes 1741156283Srwatson hardcode_into_libs=yes 1742156283Srwatson ;; 1743156283Srwatson 1744156283Srwatsonnewsos6) 1745156283Srwatson version_type=linux 1746156283Srwatson library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 1747156283Srwatson shlibpath_var=LD_LIBRARY_PATH 1748156283Srwatson shlibpath_overrides_runpath=yes 1749156283Srwatson ;; 1750156283Srwatson 1751156283Srwatsonnto-qnx*) 1752156283Srwatson version_type=linux 1753156283Srwatson need_lib_prefix=no 1754156283Srwatson need_version=no 1755156283Srwatson library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 1756156283Srwatson soname_spec='${libname}${release}${shared_ext}$major' 1757156283Srwatson shlibpath_var=LD_LIBRARY_PATH 1758156283Srwatson shlibpath_overrides_runpath=yes 1759156283Srwatson ;; 1760156283Srwatson 1761156283Srwatsonopenbsd*) 1762156283Srwatson version_type=sunos 1763173143Srwatson sys_lib_dlsearch_path_spec="/usr/lib" 1764156283Srwatson need_lib_prefix=no 1765156283Srwatson # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. 1766156283Srwatson case $host_os in 1767156283Srwatson openbsd3.3 | openbsd3.3.*) need_version=yes ;; 1768156283Srwatson *) need_version=no ;; 1769156283Srwatson esac 1770156283Srwatson library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 1771156283Srwatson finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 1772156283Srwatson shlibpath_var=LD_LIBRARY_PATH 1773156283Srwatson if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 1774156283Srwatson case $host_os in 1775156283Srwatson openbsd2.[[89]] | openbsd2.[[89]].*) 1776156283Srwatson shlibpath_overrides_runpath=no 1777156283Srwatson ;; 1778156283Srwatson *) 1779156283Srwatson shlibpath_overrides_runpath=yes 1780156283Srwatson ;; 1781156283Srwatson esac 1782156283Srwatson else 1783156283Srwatson shlibpath_overrides_runpath=yes 1784156283Srwatson fi 1785156283Srwatson ;; 1786156283Srwatson 1787156283Srwatsonos2*) 1788156283Srwatson libname_spec='$name' 1789156283Srwatson shrext_cmds=".dll" 1790156283Srwatson need_lib_prefix=no 1791156283Srwatson library_names_spec='$libname${shared_ext} $libname.a' 1792156283Srwatson dynamic_linker='OS/2 ld.exe' 1793156283Srwatson shlibpath_var=LIBPATH 1794156283Srwatson ;; 1795156283Srwatson 1796156283Srwatsonosf3* | osf4* | osf5*) 1797156283Srwatson version_type=osf 1798156283Srwatson need_lib_prefix=no 1799156283Srwatson need_version=no 1800156283Srwatson soname_spec='${libname}${release}${shared_ext}$major' 1801156283Srwatson library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 1802156283Srwatson shlibpath_var=LD_LIBRARY_PATH 1803156283Srwatson sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 1804156283Srwatson sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" 1805156283Srwatson ;; 1806156283Srwatson 1807173143Srwatsonrdos*) 1808173143Srwatson dynamic_linker=no 1809156283Srwatson ;; 1810156283Srwatson 1811156283Srwatsonsolaris*) 1812156283Srwatson version_type=linux 1813156283Srwatson need_lib_prefix=no 1814156283Srwatson need_version=no 1815156283Srwatson library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 1816156283Srwatson soname_spec='${libname}${release}${shared_ext}$major' 1817156283Srwatson shlibpath_var=LD_LIBRARY_PATH 1818156283Srwatson shlibpath_overrides_runpath=yes 1819156283Srwatson hardcode_into_libs=yes 1820156283Srwatson # ldd complains unless libraries are executable 1821156283Srwatson postinstall_cmds='chmod +x $lib' 1822156283Srwatson ;; 1823156283Srwatson 1824156283Srwatsonsunos4*) 1825156283Srwatson version_type=sunos 1826156283Srwatson library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 1827156283Srwatson finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 1828156283Srwatson shlibpath_var=LD_LIBRARY_PATH 1829156283Srwatson shlibpath_overrides_runpath=yes 1830156283Srwatson if test "$with_gnu_ld" = yes; then 1831156283Srwatson need_lib_prefix=no 1832156283Srwatson fi 1833156283Srwatson need_version=yes 1834156283Srwatson ;; 1835156283Srwatson 1836173143Srwatsonsysv4 | sysv4.3*) 1837156283Srwatson version_type=linux 1838156283Srwatson library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 1839156283Srwatson soname_spec='${libname}${release}${shared_ext}$major' 1840156283Srwatson shlibpath_var=LD_LIBRARY_PATH 1841156283Srwatson case $host_vendor in 1842156283Srwatson sni) 1843156283Srwatson shlibpath_overrides_runpath=no 1844156283Srwatson need_lib_prefix=no 1845156283Srwatson export_dynamic_flag_spec='${wl}-Blargedynsym' 1846156283Srwatson runpath_var=LD_RUN_PATH 1847156283Srwatson ;; 1848156283Srwatson siemens) 1849156283Srwatson need_lib_prefix=no 1850156283Srwatson ;; 1851156283Srwatson motorola) 1852156283Srwatson need_lib_prefix=no 1853156283Srwatson need_version=no 1854156283Srwatson shlibpath_overrides_runpath=no 1855156283Srwatson sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 1856156283Srwatson ;; 1857156283Srwatson esac 1858156283Srwatson ;; 1859156283Srwatson 1860156283Srwatsonsysv4*MP*) 1861156283Srwatson if test -d /usr/nec ;then 1862156283Srwatson version_type=linux 1863156283Srwatson library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' 1864156283Srwatson soname_spec='$libname${shared_ext}.$major' 1865156283Srwatson shlibpath_var=LD_LIBRARY_PATH 1866156283Srwatson fi 1867156283Srwatson ;; 1868156283Srwatson 1869173143Srwatsonsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 1870173143Srwatson version_type=freebsd-elf 1871173143Srwatson need_lib_prefix=no 1872173143Srwatson need_version=no 1873173143Srwatson library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 1874173143Srwatson soname_spec='${libname}${release}${shared_ext}$major' 1875173143Srwatson shlibpath_var=LD_LIBRARY_PATH 1876173143Srwatson hardcode_into_libs=yes 1877173143Srwatson if test "$with_gnu_ld" = yes; then 1878173143Srwatson sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 1879173143Srwatson shlibpath_overrides_runpath=no 1880173143Srwatson else 1881173143Srwatson sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 1882173143Srwatson shlibpath_overrides_runpath=yes 1883173143Srwatson case $host_os in 1884173143Srwatson sco3.2v5*) 1885173143Srwatson sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 1886173143Srwatson ;; 1887173143Srwatson esac 1888173143Srwatson fi 1889173143Srwatson sys_lib_dlsearch_path_spec='/usr/lib' 1890173143Srwatson ;; 1891173143Srwatson 1892156283Srwatsonuts4*) 1893156283Srwatson version_type=linux 1894156283Srwatson library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 1895156283Srwatson soname_spec='${libname}${release}${shared_ext}$major' 1896156283Srwatson shlibpath_var=LD_LIBRARY_PATH 1897156283Srwatson ;; 1898156283Srwatson 1899156283Srwatson*) 1900156283Srwatson dynamic_linker=no 1901156283Srwatson ;; 1902156283Srwatsonesac 1903156283SrwatsonAC_MSG_RESULT([$dynamic_linker]) 1904156283Srwatsontest "$dynamic_linker" = no && can_build_shared=no 1905173143Srwatson 1906191273SrwatsonAC_CACHE_VAL([lt_cv_sys_lib_search_path_spec], 1907191273Srwatson[lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec"]) 1908191273Srwatsonsys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" 1909191273SrwatsonAC_CACHE_VAL([lt_cv_sys_lib_dlsearch_path_spec], 1910191273Srwatson[lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec"]) 1911191273Srwatsonsys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" 1912191273Srwatson 1913173143Srwatsonvariables_saved_for_relink="PATH $shlibpath_var $runpath_var" 1914173143Srwatsonif test "$GCC" = yes; then 1915173143Srwatson variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 1916173143Srwatsonfi 1917156283Srwatson])# AC_LIBTOOL_SYS_DYNAMIC_LINKER 1918156283Srwatson 1919156283Srwatson 1920156283Srwatson# _LT_AC_TAGCONFIG 1921156283Srwatson# ---------------- 1922156283SrwatsonAC_DEFUN([_LT_AC_TAGCONFIG], 1923173143Srwatson[AC_REQUIRE([LT_AC_PROG_SED])dnl 1924173143SrwatsonAC_ARG_WITH([tags], 1925156283Srwatson [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@], 1926156283Srwatson [include additional configurations @<:@automatic@:>@])], 1927156283Srwatson [tagnames="$withval"]) 1928156283Srwatson 1929156283Srwatsonif test -f "$ltmain" && test -n "$tagnames"; then 1930156283Srwatson if test ! -f "${ofile}"; then 1931156283Srwatson AC_MSG_WARN([output file `$ofile' does not exist]) 1932156283Srwatson fi 1933156283Srwatson 1934156283Srwatson if test -z "$LTCC"; then 1935156283Srwatson eval "`$SHELL ${ofile} --config | grep '^LTCC='`" 1936156283Srwatson if test -z "$LTCC"; then 1937156283Srwatson AC_MSG_WARN([output file `$ofile' does not look like a libtool script]) 1938156283Srwatson else 1939156283Srwatson AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile']) 1940156283Srwatson fi 1941156283Srwatson fi 1942173143Srwatson if test -z "$LTCFLAGS"; then 1943173143Srwatson eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`" 1944173143Srwatson fi 1945156283Srwatson 1946156283Srwatson # Extract list of available tagged configurations in $ofile. 1947156283Srwatson # Note that this assumes the entire list is on one line. 1948156283Srwatson available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` 1949156283Srwatson 1950156283Srwatson lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 1951156283Srwatson for tagname in $tagnames; do 1952156283Srwatson IFS="$lt_save_ifs" 1953156283Srwatson # Check whether tagname contains only valid characters 1954156283Srwatson case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in 1955156283Srwatson "") ;; 1956156283Srwatson *) AC_MSG_ERROR([invalid tag name: $tagname]) 1957156283Srwatson ;; 1958156283Srwatson esac 1959156283Srwatson 1960156283Srwatson if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null 1961156283Srwatson then 1962156283Srwatson AC_MSG_ERROR([tag name \"$tagname\" already exists]) 1963156283Srwatson fi 1964156283Srwatson 1965156283Srwatson # Update the list of available tags. 1966156283Srwatson if test -n "$tagname"; then 1967156283Srwatson echo appending configuration tag \"$tagname\" to $ofile 1968156283Srwatson 1969156283Srwatson case $tagname in 1970156283Srwatson CXX) 1971156283Srwatson if test -n "$CXX" && ( test "X$CXX" != "Xno" && 1972156283Srwatson ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || 1973156283Srwatson (test "X$CXX" != "Xg++"))) ; then 1974156283Srwatson AC_LIBTOOL_LANG_CXX_CONFIG 1975156283Srwatson else 1976156283Srwatson tagname="" 1977156283Srwatson fi 1978156283Srwatson ;; 1979156283Srwatson 1980156283Srwatson F77) 1981156283Srwatson if test -n "$F77" && test "X$F77" != "Xno"; then 1982156283Srwatson AC_LIBTOOL_LANG_F77_CONFIG 1983156283Srwatson else 1984156283Srwatson tagname="" 1985156283Srwatson fi 1986156283Srwatson ;; 1987156283Srwatson 1988156283Srwatson GCJ) 1989156283Srwatson if test -n "$GCJ" && test "X$GCJ" != "Xno"; then 1990156283Srwatson AC_LIBTOOL_LANG_GCJ_CONFIG 1991156283Srwatson else 1992156283Srwatson tagname="" 1993156283Srwatson fi 1994156283Srwatson ;; 1995156283Srwatson 1996156283Srwatson RC) 1997156283Srwatson AC_LIBTOOL_LANG_RC_CONFIG 1998156283Srwatson ;; 1999156283Srwatson 2000156283Srwatson *) 2001156283Srwatson AC_MSG_ERROR([Unsupported tag name: $tagname]) 2002156283Srwatson ;; 2003156283Srwatson esac 2004156283Srwatson 2005156283Srwatson # Append the new tag name to the list of available tags. 2006156283Srwatson if test -n "$tagname" ; then 2007156283Srwatson available_tags="$available_tags $tagname" 2008156283Srwatson fi 2009156283Srwatson fi 2010156283Srwatson done 2011156283Srwatson IFS="$lt_save_ifs" 2012156283Srwatson 2013156283Srwatson # Now substitute the updated list of available tags. 2014156283Srwatson if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then 2015156283Srwatson mv "${ofile}T" "$ofile" 2016156283Srwatson chmod +x "$ofile" 2017156283Srwatson else 2018156283Srwatson rm -f "${ofile}T" 2019156283Srwatson AC_MSG_ERROR([unable to update list of available tagged configurations.]) 2020156283Srwatson fi 2021156283Srwatsonfi 2022156283Srwatson])# _LT_AC_TAGCONFIG 2023156283Srwatson 2024156283Srwatson 2025156283Srwatson# AC_LIBTOOL_DLOPEN 2026156283Srwatson# ----------------- 2027156283Srwatson# enable checks for dlopen support 2028156283SrwatsonAC_DEFUN([AC_LIBTOOL_DLOPEN], 2029156283Srwatson [AC_BEFORE([$0],[AC_LIBTOOL_SETUP]) 2030156283Srwatson])# AC_LIBTOOL_DLOPEN 2031156283Srwatson 2032156283Srwatson 2033156283Srwatson# AC_LIBTOOL_WIN32_DLL 2034156283Srwatson# -------------------- 2035156283Srwatson# declare package support for building win32 DLLs 2036156283SrwatsonAC_DEFUN([AC_LIBTOOL_WIN32_DLL], 2037156283Srwatson[AC_BEFORE([$0], [AC_LIBTOOL_SETUP]) 2038156283Srwatson])# AC_LIBTOOL_WIN32_DLL 2039156283Srwatson 2040156283Srwatson 2041156283Srwatson# AC_ENABLE_SHARED([DEFAULT]) 2042156283Srwatson# --------------------------- 2043156283Srwatson# implement the --enable-shared flag 2044156283Srwatson# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 2045156283SrwatsonAC_DEFUN([AC_ENABLE_SHARED], 2046156283Srwatson[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl 2047156283SrwatsonAC_ARG_ENABLE([shared], 2048156283Srwatson [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 2049156283Srwatson [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])], 2050156283Srwatson [p=${PACKAGE-default} 2051156283Srwatson case $enableval in 2052156283Srwatson yes) enable_shared=yes ;; 2053156283Srwatson no) enable_shared=no ;; 2054156283Srwatson *) 2055156283Srwatson enable_shared=no 2056156283Srwatson # Look at the argument we got. We use all the common list separators. 2057156283Srwatson lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 2058156283Srwatson for pkg in $enableval; do 2059156283Srwatson IFS="$lt_save_ifs" 2060156283Srwatson if test "X$pkg" = "X$p"; then 2061156283Srwatson enable_shared=yes 2062156283Srwatson fi 2063156283Srwatson done 2064156283Srwatson IFS="$lt_save_ifs" 2065156283Srwatson ;; 2066156283Srwatson esac], 2067156283Srwatson [enable_shared=]AC_ENABLE_SHARED_DEFAULT) 2068156283Srwatson])# AC_ENABLE_SHARED 2069156283Srwatson 2070156283Srwatson 2071156283Srwatson# AC_DISABLE_SHARED 2072156283Srwatson# ----------------- 2073173143Srwatson# set the default shared flag to --disable-shared 2074156283SrwatsonAC_DEFUN([AC_DISABLE_SHARED], 2075156283Srwatson[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 2076156283SrwatsonAC_ENABLE_SHARED(no) 2077156283Srwatson])# AC_DISABLE_SHARED 2078156283Srwatson 2079156283Srwatson 2080156283Srwatson# AC_ENABLE_STATIC([DEFAULT]) 2081156283Srwatson# --------------------------- 2082156283Srwatson# implement the --enable-static flag 2083156283Srwatson# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 2084156283SrwatsonAC_DEFUN([AC_ENABLE_STATIC], 2085156283Srwatson[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl 2086156283SrwatsonAC_ARG_ENABLE([static], 2087156283Srwatson [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@], 2088156283Srwatson [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])], 2089156283Srwatson [p=${PACKAGE-default} 2090156283Srwatson case $enableval in 2091156283Srwatson yes) enable_static=yes ;; 2092156283Srwatson no) enable_static=no ;; 2093156283Srwatson *) 2094156283Srwatson enable_static=no 2095156283Srwatson # Look at the argument we got. We use all the common list separators. 2096156283Srwatson lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 2097156283Srwatson for pkg in $enableval; do 2098156283Srwatson IFS="$lt_save_ifs" 2099156283Srwatson if test "X$pkg" = "X$p"; then 2100156283Srwatson enable_static=yes 2101156283Srwatson fi 2102156283Srwatson done 2103156283Srwatson IFS="$lt_save_ifs" 2104156283Srwatson ;; 2105156283Srwatson esac], 2106156283Srwatson [enable_static=]AC_ENABLE_STATIC_DEFAULT) 2107156283Srwatson])# AC_ENABLE_STATIC 2108156283Srwatson 2109156283Srwatson 2110156283Srwatson# AC_DISABLE_STATIC 2111156283Srwatson# ----------------- 2112156283Srwatson# set the default static flag to --disable-static 2113156283SrwatsonAC_DEFUN([AC_DISABLE_STATIC], 2114156283Srwatson[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 2115156283SrwatsonAC_ENABLE_STATIC(no) 2116156283Srwatson])# AC_DISABLE_STATIC 2117156283Srwatson 2118156283Srwatson 2119156283Srwatson# AC_ENABLE_FAST_INSTALL([DEFAULT]) 2120156283Srwatson# --------------------------------- 2121156283Srwatson# implement the --enable-fast-install flag 2122156283Srwatson# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 2123156283SrwatsonAC_DEFUN([AC_ENABLE_FAST_INSTALL], 2124156283Srwatson[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl 2125156283SrwatsonAC_ARG_ENABLE([fast-install], 2126156283Srwatson [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 2127156283Srwatson [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 2128156283Srwatson [p=${PACKAGE-default} 2129156283Srwatson case $enableval in 2130156283Srwatson yes) enable_fast_install=yes ;; 2131156283Srwatson no) enable_fast_install=no ;; 2132156283Srwatson *) 2133156283Srwatson enable_fast_install=no 2134156283Srwatson # Look at the argument we got. We use all the common list separators. 2135156283Srwatson lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 2136156283Srwatson for pkg in $enableval; do 2137156283Srwatson IFS="$lt_save_ifs" 2138156283Srwatson if test "X$pkg" = "X$p"; then 2139156283Srwatson enable_fast_install=yes 2140156283Srwatson fi 2141156283Srwatson done 2142156283Srwatson IFS="$lt_save_ifs" 2143156283Srwatson ;; 2144156283Srwatson esac], 2145156283Srwatson [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT) 2146156283Srwatson])# AC_ENABLE_FAST_INSTALL 2147156283Srwatson 2148156283Srwatson 2149156283Srwatson# AC_DISABLE_FAST_INSTALL 2150156283Srwatson# ----------------------- 2151156283Srwatson# set the default to --disable-fast-install 2152156283SrwatsonAC_DEFUN([AC_DISABLE_FAST_INSTALL], 2153156283Srwatson[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 2154156283SrwatsonAC_ENABLE_FAST_INSTALL(no) 2155156283Srwatson])# AC_DISABLE_FAST_INSTALL 2156156283Srwatson 2157156283Srwatson 2158156283Srwatson# AC_LIBTOOL_PICMODE([MODE]) 2159156283Srwatson# -------------------------- 2160156283Srwatson# implement the --with-pic flag 2161156283Srwatson# MODE is either `yes' or `no'. If omitted, it defaults to `both'. 2162156283SrwatsonAC_DEFUN([AC_LIBTOOL_PICMODE], 2163156283Srwatson[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 2164156283Srwatsonpic_mode=ifelse($#,1,$1,default) 2165156283Srwatson])# AC_LIBTOOL_PICMODE 2166156283Srwatson 2167156283Srwatson 2168156283Srwatson# AC_PROG_EGREP 2169156283Srwatson# ------------- 2170156283Srwatson# This is predefined starting with Autoconf 2.54, so this conditional 2171156283Srwatson# definition can be removed once we require Autoconf 2.54 or later. 2172156283Srwatsonm4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP], 2173156283Srwatson[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep], 2174156283Srwatson [if echo a | (grep -E '(a|b)') >/dev/null 2>&1 2175156283Srwatson then ac_cv_prog_egrep='grep -E' 2176156283Srwatson else ac_cv_prog_egrep='egrep' 2177156283Srwatson fi]) 2178156283Srwatson EGREP=$ac_cv_prog_egrep 2179156283Srwatson AC_SUBST([EGREP]) 2180156283Srwatson])]) 2181156283Srwatson 2182156283Srwatson 2183156283Srwatson# AC_PATH_TOOL_PREFIX 2184156283Srwatson# ------------------- 2185173143Srwatson# find a file program which can recognize shared library 2186156283SrwatsonAC_DEFUN([AC_PATH_TOOL_PREFIX], 2187156283Srwatson[AC_REQUIRE([AC_PROG_EGREP])dnl 2188156283SrwatsonAC_MSG_CHECKING([for $1]) 2189156283SrwatsonAC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 2190156283Srwatson[case $MAGIC_CMD in 2191156283Srwatson[[\\/*] | ?:[\\/]*]) 2192156283Srwatson lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. 2193156283Srwatson ;; 2194156283Srwatson*) 2195156283Srwatson lt_save_MAGIC_CMD="$MAGIC_CMD" 2196156283Srwatson lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 2197156283Srwatsondnl $ac_dummy forces splitting on constant user-supplied paths. 2198156283Srwatsondnl POSIX.2 word splitting is done only on the output of word expansions, 2199156283Srwatsondnl not every word. This closes a longstanding sh security hole. 2200156283Srwatson ac_dummy="ifelse([$2], , $PATH, [$2])" 2201156283Srwatson for ac_dir in $ac_dummy; do 2202156283Srwatson IFS="$lt_save_ifs" 2203156283Srwatson test -z "$ac_dir" && ac_dir=. 2204156283Srwatson if test -f $ac_dir/$1; then 2205156283Srwatson lt_cv_path_MAGIC_CMD="$ac_dir/$1" 2206156283Srwatson if test -n "$file_magic_test_file"; then 2207156283Srwatson case $deplibs_check_method in 2208156283Srwatson "file_magic "*) 2209156283Srwatson file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 2210156283Srwatson MAGIC_CMD="$lt_cv_path_MAGIC_CMD" 2211156283Srwatson if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 2212156283Srwatson $EGREP "$file_magic_regex" > /dev/null; then 2213156283Srwatson : 2214156283Srwatson else 2215156283Srwatson cat <<EOF 1>&2 2216156283Srwatson 2217156283Srwatson*** Warning: the command libtool uses to detect shared libraries, 2218156283Srwatson*** $file_magic_cmd, produces output that libtool cannot recognize. 2219156283Srwatson*** The result is that libtool may fail to recognize shared libraries 2220156283Srwatson*** as such. This will affect the creation of libtool libraries that 2221156283Srwatson*** depend on shared libraries, but programs linked with such libtool 2222156283Srwatson*** libraries will work regardless of this problem. Nevertheless, you 2223156283Srwatson*** may want to report the problem to your system manager and/or to 2224156283Srwatson*** bug-libtool@gnu.org 2225156283Srwatson 2226156283SrwatsonEOF 2227156283Srwatson fi ;; 2228156283Srwatson esac 2229156283Srwatson fi 2230156283Srwatson break 2231156283Srwatson fi 2232156283Srwatson done 2233156283Srwatson IFS="$lt_save_ifs" 2234156283Srwatson MAGIC_CMD="$lt_save_MAGIC_CMD" 2235156283Srwatson ;; 2236156283Srwatsonesac]) 2237156283SrwatsonMAGIC_CMD="$lt_cv_path_MAGIC_CMD" 2238156283Srwatsonif test -n "$MAGIC_CMD"; then 2239156283Srwatson AC_MSG_RESULT($MAGIC_CMD) 2240156283Srwatsonelse 2241156283Srwatson AC_MSG_RESULT(no) 2242156283Srwatsonfi 2243156283Srwatson])# AC_PATH_TOOL_PREFIX 2244156283Srwatson 2245156283Srwatson 2246156283Srwatson# AC_PATH_MAGIC 2247156283Srwatson# ------------- 2248173143Srwatson# find a file program which can recognize a shared library 2249156283SrwatsonAC_DEFUN([AC_PATH_MAGIC], 2250156283Srwatson[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 2251156283Srwatsonif test -z "$lt_cv_path_MAGIC_CMD"; then 2252156283Srwatson if test -n "$ac_tool_prefix"; then 2253156283Srwatson AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 2254156283Srwatson else 2255156283Srwatson MAGIC_CMD=: 2256156283Srwatson fi 2257156283Srwatsonfi 2258156283Srwatson])# AC_PATH_MAGIC 2259156283Srwatson 2260156283Srwatson 2261156283Srwatson# AC_PROG_LD 2262156283Srwatson# ---------- 2263156283Srwatson# find the pathname to the GNU or non-GNU linker 2264156283SrwatsonAC_DEFUN([AC_PROG_LD], 2265156283Srwatson[AC_ARG_WITH([gnu-ld], 2266156283Srwatson [AC_HELP_STRING([--with-gnu-ld], 2267156283Srwatson [assume the C compiler uses GNU ld @<:@default=no@:>@])], 2268156283Srwatson [test "$withval" = no || with_gnu_ld=yes], 2269156283Srwatson [with_gnu_ld=no]) 2270156283SrwatsonAC_REQUIRE([LT_AC_PROG_SED])dnl 2271156283SrwatsonAC_REQUIRE([AC_PROG_CC])dnl 2272156283SrwatsonAC_REQUIRE([AC_CANONICAL_HOST])dnl 2273156283SrwatsonAC_REQUIRE([AC_CANONICAL_BUILD])dnl 2274156283Srwatsonac_prog=ld 2275156283Srwatsonif test "$GCC" = yes; then 2276156283Srwatson # Check if gcc -print-prog-name=ld gives a path. 2277156283Srwatson AC_MSG_CHECKING([for ld used by $CC]) 2278156283Srwatson case $host in 2279156283Srwatson *-*-mingw*) 2280156283Srwatson # gcc leaves a trailing carriage return which upsets mingw 2281156283Srwatson ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 2282156283Srwatson *) 2283156283Srwatson ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 2284156283Srwatson esac 2285156283Srwatson case $ac_prog in 2286156283Srwatson # Accept absolute paths. 2287156283Srwatson [[\\/]]* | ?:[[\\/]]*) 2288156283Srwatson re_direlt='/[[^/]][[^/]]*/\.\./' 2289156283Srwatson # Canonicalize the pathname of ld 2290156283Srwatson ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` 2291156283Srwatson while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do 2292156283Srwatson ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` 2293156283Srwatson done 2294156283Srwatson test -z "$LD" && LD="$ac_prog" 2295156283Srwatson ;; 2296156283Srwatson "") 2297156283Srwatson # If it fails, then pretend we aren't using GCC. 2298156283Srwatson ac_prog=ld 2299156283Srwatson ;; 2300156283Srwatson *) 2301156283Srwatson # If it is relative, then search for the first ld in PATH. 2302156283Srwatson with_gnu_ld=unknown 2303156283Srwatson ;; 2304156283Srwatson esac 2305156283Srwatsonelif test "$with_gnu_ld" = yes; then 2306156283Srwatson AC_MSG_CHECKING([for GNU ld]) 2307156283Srwatsonelse 2308156283Srwatson AC_MSG_CHECKING([for non-GNU ld]) 2309156283Srwatsonfi 2310156283SrwatsonAC_CACHE_VAL(lt_cv_path_LD, 2311156283Srwatson[if test -z "$LD"; then 2312156283Srwatson lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 2313156283Srwatson for ac_dir in $PATH; do 2314156283Srwatson IFS="$lt_save_ifs" 2315156283Srwatson test -z "$ac_dir" && ac_dir=. 2316156283Srwatson if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 2317156283Srwatson lt_cv_path_LD="$ac_dir/$ac_prog" 2318156283Srwatson # Check to see if the program is GNU ld. I'd rather use --version, 2319156283Srwatson # but apparently some variants of GNU ld only accept -v. 2320156283Srwatson # Break only if it was the GNU/non-GNU ld that we prefer. 2321156283Srwatson case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 2322156283Srwatson *GNU* | *'with BFD'*) 2323156283Srwatson test "$with_gnu_ld" != no && break 2324156283Srwatson ;; 2325156283Srwatson *) 2326156283Srwatson test "$with_gnu_ld" != yes && break 2327156283Srwatson ;; 2328156283Srwatson esac 2329156283Srwatson fi 2330156283Srwatson done 2331156283Srwatson IFS="$lt_save_ifs" 2332156283Srwatsonelse 2333156283Srwatson lt_cv_path_LD="$LD" # Let the user override the test with a path. 2334156283Srwatsonfi]) 2335156283SrwatsonLD="$lt_cv_path_LD" 2336156283Srwatsonif test -n "$LD"; then 2337156283Srwatson AC_MSG_RESULT($LD) 2338156283Srwatsonelse 2339156283Srwatson AC_MSG_RESULT(no) 2340156283Srwatsonfi 2341156283Srwatsontest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 2342156283SrwatsonAC_PROG_LD_GNU 2343156283Srwatson])# AC_PROG_LD 2344156283Srwatson 2345156283Srwatson 2346156283Srwatson# AC_PROG_LD_GNU 2347156283Srwatson# -------------- 2348156283SrwatsonAC_DEFUN([AC_PROG_LD_GNU], 2349156283Srwatson[AC_REQUIRE([AC_PROG_EGREP])dnl 2350156283SrwatsonAC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 2351156283Srwatson[# I'd rather use --version here, but apparently some GNU lds only accept -v. 2352156283Srwatsoncase `$LD -v 2>&1 </dev/null` in 2353156283Srwatson*GNU* | *'with BFD'*) 2354156283Srwatson lt_cv_prog_gnu_ld=yes 2355156283Srwatson ;; 2356156283Srwatson*) 2357156283Srwatson lt_cv_prog_gnu_ld=no 2358156283Srwatson ;; 2359156283Srwatsonesac]) 2360156283Srwatsonwith_gnu_ld=$lt_cv_prog_gnu_ld 2361156283Srwatson])# AC_PROG_LD_GNU 2362156283Srwatson 2363156283Srwatson 2364156283Srwatson# AC_PROG_LD_RELOAD_FLAG 2365156283Srwatson# ---------------------- 2366156283Srwatson# find reload flag for linker 2367156283Srwatson# -- PORTME Some linkers may need a different reload flag. 2368156283SrwatsonAC_DEFUN([AC_PROG_LD_RELOAD_FLAG], 2369156283Srwatson[AC_CACHE_CHECK([for $LD option to reload object files], 2370156283Srwatson lt_cv_ld_reload_flag, 2371156283Srwatson [lt_cv_ld_reload_flag='-r']) 2372156283Srwatsonreload_flag=$lt_cv_ld_reload_flag 2373156283Srwatsoncase $reload_flag in 2374156283Srwatson"" | " "*) ;; 2375156283Srwatson*) reload_flag=" $reload_flag" ;; 2376156283Srwatsonesac 2377156283Srwatsonreload_cmds='$LD$reload_flag -o $output$reload_objs' 2378156283Srwatsoncase $host_os in 2379156283Srwatson darwin*) 2380156283Srwatson if test "$GCC" = yes; then 2381173143Srwatson reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' 2382156283Srwatson else 2383156283Srwatson reload_cmds='$LD$reload_flag -o $output$reload_objs' 2384156283Srwatson fi 2385156283Srwatson ;; 2386156283Srwatsonesac 2387156283Srwatson])# AC_PROG_LD_RELOAD_FLAG 2388156283Srwatson 2389156283Srwatson 2390156283Srwatson# AC_DEPLIBS_CHECK_METHOD 2391156283Srwatson# ----------------------- 2392156283Srwatson# how to check for library dependencies 2393156283Srwatson# -- PORTME fill in with the dynamic library characteristics 2394156283SrwatsonAC_DEFUN([AC_DEPLIBS_CHECK_METHOD], 2395173143Srwatson[AC_CACHE_CHECK([how to recognize dependent libraries], 2396156283Srwatsonlt_cv_deplibs_check_method, 2397156283Srwatson[lt_cv_file_magic_cmd='$MAGIC_CMD' 2398156283Srwatsonlt_cv_file_magic_test_file= 2399156283Srwatsonlt_cv_deplibs_check_method='unknown' 2400156283Srwatson# Need to set the preceding variable on all platforms that support 2401156283Srwatson# interlibrary dependencies. 2402156283Srwatson# 'none' -- dependencies not supported. 2403156283Srwatson# `unknown' -- same as none, but documents that we really don't know. 2404156283Srwatson# 'pass_all' -- all dependencies passed with no checks. 2405156283Srwatson# 'test_compile' -- check by making test program. 2406156283Srwatson# 'file_magic [[regex]]' -- check by looking for files in library path 2407156283Srwatson# which responds to the $file_magic_cmd with a given extended regex. 2408156283Srwatson# If you have `file' or equivalent on your system and you're not sure 2409156283Srwatson# whether `pass_all' will *always* work, you probably want this one. 2410156283Srwatson 2411156283Srwatsoncase $host_os in 2412191273Srwatsonaix[[4-9]]*) 2413156283Srwatson lt_cv_deplibs_check_method=pass_all 2414156283Srwatson ;; 2415156283Srwatson 2416156283Srwatsonbeos*) 2417156283Srwatson lt_cv_deplibs_check_method=pass_all 2418156283Srwatson ;; 2419156283Srwatson 2420156283Srwatsonbsdi[[45]]*) 2421156283Srwatson lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 2422156283Srwatson lt_cv_file_magic_cmd='/usr/bin/file -L' 2423156283Srwatson lt_cv_file_magic_test_file=/shlib/libc.so 2424156283Srwatson ;; 2425156283Srwatson 2426156283Srwatsoncygwin*) 2427156283Srwatson # func_win32_libid is a shell function defined in ltmain.sh 2428156283Srwatson lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 2429156283Srwatson lt_cv_file_magic_cmd='func_win32_libid' 2430156283Srwatson ;; 2431156283Srwatson 2432156283Srwatsonmingw* | pw32*) 2433156283Srwatson # Base MSYS/MinGW do not provide the 'file' command needed by 2434173143Srwatson # func_win32_libid shell function, so use a weaker test based on 'objdump', 2435173143Srwatson # unless we find 'file', for example because we are cross-compiling. 2436173143Srwatson if ( file / ) >/dev/null 2>&1; then 2437173143Srwatson lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 2438173143Srwatson lt_cv_file_magic_cmd='func_win32_libid' 2439173143Srwatson else 2440173143Srwatson lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' 2441173143Srwatson lt_cv_file_magic_cmd='$OBJDUMP -f' 2442173143Srwatson fi 2443156283Srwatson ;; 2444156283Srwatson 2445156283Srwatsondarwin* | rhapsody*) 2446156283Srwatson lt_cv_deplibs_check_method=pass_all 2447156283Srwatson ;; 2448156283Srwatson 2449173143Srwatsonfreebsd* | dragonfly*) 2450156283Srwatson if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then 2451156283Srwatson case $host_cpu in 2452156283Srwatson i*86 ) 2453156283Srwatson # Not sure whether the presence of OpenBSD here was a mistake. 2454156283Srwatson # Let's accept both of them until this is cleared up. 2455156283Srwatson lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 2456156283Srwatson lt_cv_file_magic_cmd=/usr/bin/file 2457156283Srwatson lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 2458156283Srwatson ;; 2459156283Srwatson esac 2460156283Srwatson else 2461156283Srwatson lt_cv_deplibs_check_method=pass_all 2462156283Srwatson fi 2463156283Srwatson ;; 2464156283Srwatson 2465156283Srwatsongnu*) 2466156283Srwatson lt_cv_deplibs_check_method=pass_all 2467156283Srwatson ;; 2468156283Srwatson 2469156283Srwatsonhpux10.20* | hpux11*) 2470156283Srwatson lt_cv_file_magic_cmd=/usr/bin/file 2471156283Srwatson case $host_cpu in 2472156283Srwatson ia64*) 2473156283Srwatson lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 2474156283Srwatson lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 2475156283Srwatson ;; 2476156283Srwatson hppa*64*) 2477156283Srwatson [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]'] 2478156283Srwatson lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 2479156283Srwatson ;; 2480156283Srwatson *) 2481156283Srwatson lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' 2482156283Srwatson lt_cv_file_magic_test_file=/usr/lib/libc.sl 2483156283Srwatson ;; 2484156283Srwatson esac 2485156283Srwatson ;; 2486156283Srwatson 2487173143Srwatsoninterix[[3-9]]*) 2488173143Srwatson # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 2489173143Srwatson lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 2490173143Srwatson ;; 2491173143Srwatson 2492156283Srwatsonirix5* | irix6* | nonstopux*) 2493156283Srwatson case $LD in 2494156283Srwatson *-32|*"-32 ") libmagic=32-bit;; 2495156283Srwatson *-n32|*"-n32 ") libmagic=N32;; 2496156283Srwatson *-64|*"-64 ") libmagic=64-bit;; 2497156283Srwatson *) libmagic=never-match;; 2498156283Srwatson esac 2499156283Srwatson lt_cv_deplibs_check_method=pass_all 2500156283Srwatson ;; 2501156283Srwatson 2502156283Srwatson# This must be Linux ELF. 2503173143Srwatsonlinux* | k*bsd*-gnu) 2504156283Srwatson lt_cv_deplibs_check_method=pass_all 2505156283Srwatson ;; 2506156283Srwatson 2507156283Srwatsonnetbsd*) 2508156283Srwatson if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then 2509156283Srwatson lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 2510156283Srwatson else 2511156283Srwatson lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 2512156283Srwatson fi 2513156283Srwatson ;; 2514156283Srwatson 2515156283Srwatsonnewos6*) 2516156283Srwatson lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 2517156283Srwatson lt_cv_file_magic_cmd=/usr/bin/file 2518156283Srwatson lt_cv_file_magic_test_file=/usr/lib/libnls.so 2519156283Srwatson ;; 2520156283Srwatson 2521156283Srwatsonnto-qnx*) 2522156283Srwatson lt_cv_deplibs_check_method=unknown 2523156283Srwatson ;; 2524156283Srwatson 2525156283Srwatsonopenbsd*) 2526156283Srwatson if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 2527156283Srwatson lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 2528156283Srwatson else 2529156283Srwatson lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 2530156283Srwatson fi 2531156283Srwatson ;; 2532156283Srwatson 2533156283Srwatsonosf3* | osf4* | osf5*) 2534156283Srwatson lt_cv_deplibs_check_method=pass_all 2535156283Srwatson ;; 2536156283Srwatson 2537173143Srwatsonrdos*) 2538156283Srwatson lt_cv_deplibs_check_method=pass_all 2539156283Srwatson ;; 2540156283Srwatson 2541156283Srwatsonsolaris*) 2542156283Srwatson lt_cv_deplibs_check_method=pass_all 2543156283Srwatson ;; 2544156283Srwatson 2545173143Srwatsonsysv4 | sysv4.3*) 2546156283Srwatson case $host_vendor in 2547156283Srwatson motorola) 2548156283Srwatson 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]]' 2549156283Srwatson lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 2550156283Srwatson ;; 2551156283Srwatson ncr) 2552156283Srwatson lt_cv_deplibs_check_method=pass_all 2553156283Srwatson ;; 2554156283Srwatson sequent) 2555156283Srwatson lt_cv_file_magic_cmd='/bin/file' 2556156283Srwatson lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 2557156283Srwatson ;; 2558156283Srwatson sni) 2559156283Srwatson lt_cv_file_magic_cmd='/bin/file' 2560156283Srwatson lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 2561156283Srwatson lt_cv_file_magic_test_file=/lib/libc.so 2562156283Srwatson ;; 2563156283Srwatson siemens) 2564156283Srwatson lt_cv_deplibs_check_method=pass_all 2565156283Srwatson ;; 2566173143Srwatson pc) 2567173143Srwatson lt_cv_deplibs_check_method=pass_all 2568173143Srwatson ;; 2569156283Srwatson esac 2570156283Srwatson ;; 2571156283Srwatson 2572173143Srwatsonsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 2573156283Srwatson lt_cv_deplibs_check_method=pass_all 2574156283Srwatson ;; 2575156283Srwatsonesac 2576156283Srwatson]) 2577156283Srwatsonfile_magic_cmd=$lt_cv_file_magic_cmd 2578156283Srwatsondeplibs_check_method=$lt_cv_deplibs_check_method 2579156283Srwatsontest -z "$deplibs_check_method" && deplibs_check_method=unknown 2580156283Srwatson])# AC_DEPLIBS_CHECK_METHOD 2581156283Srwatson 2582156283Srwatson 2583156283Srwatson# AC_PROG_NM 2584156283Srwatson# ---------- 2585156283Srwatson# find the pathname to a BSD-compatible name lister 2586156283SrwatsonAC_DEFUN([AC_PROG_NM], 2587156283Srwatson[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM, 2588156283Srwatson[if test -n "$NM"; then 2589156283Srwatson # Let the user override the test. 2590156283Srwatson lt_cv_path_NM="$NM" 2591156283Srwatsonelse 2592173143Srwatson lt_nm_to_check="${ac_tool_prefix}nm" 2593173143Srwatson if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 2594173143Srwatson lt_nm_to_check="$lt_nm_to_check nm" 2595173143Srwatson fi 2596173143Srwatson for lt_tmp_nm in $lt_nm_to_check; do 2597173143Srwatson lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 2598173143Srwatson for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 2599173143Srwatson IFS="$lt_save_ifs" 2600173143Srwatson test -z "$ac_dir" && ac_dir=. 2601173143Srwatson tmp_nm="$ac_dir/$lt_tmp_nm" 2602173143Srwatson if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then 2603173143Srwatson # Check to see if the nm accepts a BSD-compat flag. 2604173143Srwatson # Adding the `sed 1q' prevents false positives on HP-UX, which says: 2605173143Srwatson # nm: unknown option "B" ignored 2606173143Srwatson # Tru64's nm complains that /dev/null is an invalid object file 2607173143Srwatson case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in 2608173143Srwatson */dev/null* | *'Invalid file or object type'*) 2609173143Srwatson lt_cv_path_NM="$tmp_nm -B" 2610156283Srwatson break 2611156283Srwatson ;; 2612156283Srwatson *) 2613173143Srwatson case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in 2614173143Srwatson */dev/null*) 2615173143Srwatson lt_cv_path_NM="$tmp_nm -p" 2616173143Srwatson break 2617173143Srwatson ;; 2618173143Srwatson *) 2619173143Srwatson lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 2620173143Srwatson continue # so that we can try to find one that supports BSD flags 2621173143Srwatson ;; 2622173143Srwatson esac 2623156283Srwatson ;; 2624156283Srwatson esac 2625173143Srwatson fi 2626173143Srwatson done 2627173143Srwatson IFS="$lt_save_ifs" 2628156283Srwatson done 2629156283Srwatson test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm 2630156283Srwatsonfi]) 2631156283SrwatsonNM="$lt_cv_path_NM" 2632156283Srwatson])# AC_PROG_NM 2633156283Srwatson 2634156283Srwatson 2635156283Srwatson# AC_CHECK_LIBM 2636156283Srwatson# ------------- 2637156283Srwatson# check for math library 2638156283SrwatsonAC_DEFUN([AC_CHECK_LIBM], 2639156283Srwatson[AC_REQUIRE([AC_CANONICAL_HOST])dnl 2640156283SrwatsonLIBM= 2641156283Srwatsoncase $host in 2642156283Srwatson*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) 2643156283Srwatson # These system don't have libm, or don't need it 2644156283Srwatson ;; 2645156283Srwatson*-ncr-sysv4.3*) 2646156283Srwatson AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") 2647156283Srwatson AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 2648156283Srwatson ;; 2649156283Srwatson*) 2650156283Srwatson AC_CHECK_LIB(m, cos, LIBM="-lm") 2651156283Srwatson ;; 2652156283Srwatsonesac 2653156283Srwatson])# AC_CHECK_LIBM 2654156283Srwatson 2655156283Srwatson 2656156283Srwatson# AC_LIBLTDL_CONVENIENCE([DIRECTORY]) 2657156283Srwatson# ----------------------------------- 2658156283Srwatson# sets LIBLTDL to the link flags for the libltdl convenience library and 2659156283Srwatson# LTDLINCL to the include flags for the libltdl header and adds 2660156283Srwatson# --enable-ltdl-convenience to the configure arguments. Note that 2661156283Srwatson# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, 2662156283Srwatson# it is assumed to be `libltdl'. LIBLTDL will be prefixed with 2663156283Srwatson# '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/' 2664156283Srwatson# (note the single quotes!). If your package is not flat and you're not 2665156283Srwatson# using automake, define top_builddir and top_srcdir appropriately in 2666156283Srwatson# the Makefiles. 2667156283SrwatsonAC_DEFUN([AC_LIBLTDL_CONVENIENCE], 2668156283Srwatson[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 2669156283Srwatson case $enable_ltdl_convenience in 2670156283Srwatson no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; 2671156283Srwatson "") enable_ltdl_convenience=yes 2672156283Srwatson ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; 2673156283Srwatson esac 2674156283Srwatson LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la 2675156283Srwatson LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) 2676156283Srwatson # For backwards non-gettext consistent compatibility... 2677156283Srwatson INCLTDL="$LTDLINCL" 2678156283Srwatson])# AC_LIBLTDL_CONVENIENCE 2679156283Srwatson 2680156283Srwatson 2681156283Srwatson# AC_LIBLTDL_INSTALLABLE([DIRECTORY]) 2682156283Srwatson# ----------------------------------- 2683156283Srwatson# sets LIBLTDL to the link flags for the libltdl installable library and 2684156283Srwatson# LTDLINCL to the include flags for the libltdl header and adds 2685156283Srwatson# --enable-ltdl-install to the configure arguments. Note that 2686156283Srwatson# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, 2687156283Srwatson# and an installed libltdl is not found, it is assumed to be `libltdl'. 2688156283Srwatson# LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with 2689156283Srwatson# '${top_srcdir}/' (note the single quotes!). If your package is not 2690156283Srwatson# flat and you're not using automake, define top_builddir and top_srcdir 2691156283Srwatson# appropriately in the Makefiles. 2692156283Srwatson# In the future, this macro may have to be called after AC_PROG_LIBTOOL. 2693156283SrwatsonAC_DEFUN([AC_LIBLTDL_INSTALLABLE], 2694156283Srwatson[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 2695156283Srwatson AC_CHECK_LIB(ltdl, lt_dlinit, 2696156283Srwatson [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no], 2697156283Srwatson [if test x"$enable_ltdl_install" = xno; then 2698156283Srwatson AC_MSG_WARN([libltdl not installed, but installation disabled]) 2699156283Srwatson else 2700156283Srwatson enable_ltdl_install=yes 2701156283Srwatson fi 2702156283Srwatson ]) 2703156283Srwatson if test x"$enable_ltdl_install" = x"yes"; then 2704156283Srwatson ac_configure_args="$ac_configure_args --enable-ltdl-install" 2705156283Srwatson LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la 2706156283Srwatson LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) 2707156283Srwatson else 2708156283Srwatson ac_configure_args="$ac_configure_args --enable-ltdl-install=no" 2709156283Srwatson LIBLTDL="-lltdl" 2710156283Srwatson LTDLINCL= 2711156283Srwatson fi 2712156283Srwatson # For backwards non-gettext consistent compatibility... 2713156283Srwatson INCLTDL="$LTDLINCL" 2714156283Srwatson])# AC_LIBLTDL_INSTALLABLE 2715156283Srwatson 2716156283Srwatson 2717156283Srwatson# AC_LIBTOOL_CXX 2718156283Srwatson# -------------- 2719156283Srwatson# enable support for C++ libraries 2720156283SrwatsonAC_DEFUN([AC_LIBTOOL_CXX], 2721156283Srwatson[AC_REQUIRE([_LT_AC_LANG_CXX]) 2722156283Srwatson])# AC_LIBTOOL_CXX 2723156283Srwatson 2724156283Srwatson 2725156283Srwatson# _LT_AC_LANG_CXX 2726156283Srwatson# --------------- 2727156283SrwatsonAC_DEFUN([_LT_AC_LANG_CXX], 2728156283Srwatson[AC_REQUIRE([AC_PROG_CXX]) 2729156283SrwatsonAC_REQUIRE([_LT_AC_PROG_CXXCPP]) 2730156283Srwatson_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX]) 2731156283Srwatson])# _LT_AC_LANG_CXX 2732156283Srwatson 2733156283Srwatson# _LT_AC_PROG_CXXCPP 2734173143Srwatson# ------------------ 2735156283SrwatsonAC_DEFUN([_LT_AC_PROG_CXXCPP], 2736156283Srwatson[ 2737156283SrwatsonAC_REQUIRE([AC_PROG_CXX]) 2738156283Srwatsonif test -n "$CXX" && ( test "X$CXX" != "Xno" && 2739156283Srwatson ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || 2740156283Srwatson (test "X$CXX" != "Xg++"))) ; then 2741156283Srwatson AC_PROG_CXXCPP 2742156283Srwatsonfi 2743156283Srwatson])# _LT_AC_PROG_CXXCPP 2744156283Srwatson 2745156283Srwatson# AC_LIBTOOL_F77 2746156283Srwatson# -------------- 2747156283Srwatson# enable support for Fortran 77 libraries 2748156283SrwatsonAC_DEFUN([AC_LIBTOOL_F77], 2749156283Srwatson[AC_REQUIRE([_LT_AC_LANG_F77]) 2750156283Srwatson])# AC_LIBTOOL_F77 2751156283Srwatson 2752156283Srwatson 2753156283Srwatson# _LT_AC_LANG_F77 2754156283Srwatson# --------------- 2755156283SrwatsonAC_DEFUN([_LT_AC_LANG_F77], 2756156283Srwatson[AC_REQUIRE([AC_PROG_F77]) 2757156283Srwatson_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77]) 2758156283Srwatson])# _LT_AC_LANG_F77 2759156283Srwatson 2760156283Srwatson 2761156283Srwatson# AC_LIBTOOL_GCJ 2762156283Srwatson# -------------- 2763156283Srwatson# enable support for GCJ libraries 2764156283SrwatsonAC_DEFUN([AC_LIBTOOL_GCJ], 2765156283Srwatson[AC_REQUIRE([_LT_AC_LANG_GCJ]) 2766156283Srwatson])# AC_LIBTOOL_GCJ 2767156283Srwatson 2768156283Srwatson 2769156283Srwatson# _LT_AC_LANG_GCJ 2770156283Srwatson# --------------- 2771156283SrwatsonAC_DEFUN([_LT_AC_LANG_GCJ], 2772156283Srwatson[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[], 2773156283Srwatson [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[], 2774156283Srwatson [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[], 2775156283Srwatson [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])], 2776156283Srwatson [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])], 2777156283Srwatson [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])]) 2778156283Srwatson_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ]) 2779156283Srwatson])# _LT_AC_LANG_GCJ 2780156283Srwatson 2781156283Srwatson 2782156283Srwatson# AC_LIBTOOL_RC 2783173143Srwatson# ------------- 2784156283Srwatson# enable support for Windows resource files 2785156283SrwatsonAC_DEFUN([AC_LIBTOOL_RC], 2786156283Srwatson[AC_REQUIRE([LT_AC_PROG_RC]) 2787156283Srwatson_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC]) 2788156283Srwatson])# AC_LIBTOOL_RC 2789156283Srwatson 2790156283Srwatson 2791156283Srwatson# AC_LIBTOOL_LANG_C_CONFIG 2792156283Srwatson# ------------------------ 2793156283Srwatson# Ensure that the configuration vars for the C compiler are 2794156283Srwatson# suitably defined. Those variables are subsequently used by 2795156283Srwatson# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 2796156283SrwatsonAC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG]) 2797156283SrwatsonAC_DEFUN([_LT_AC_LANG_C_CONFIG], 2798156283Srwatson[lt_save_CC="$CC" 2799156283SrwatsonAC_LANG_PUSH(C) 2800156283Srwatson 2801156283Srwatson# Source file extension for C test sources. 2802156283Srwatsonac_ext=c 2803156283Srwatson 2804156283Srwatson# Object file extension for compiled C test sources. 2805156283Srwatsonobjext=o 2806156283Srwatson_LT_AC_TAGVAR(objext, $1)=$objext 2807156283Srwatson 2808156283Srwatson# Code to be used in simple compile tests 2809173143Srwatsonlt_simple_compile_test_code="int some_variable = 0;" 2810156283Srwatson 2811156283Srwatson# Code to be used in simple link tests 2812173143Srwatsonlt_simple_link_test_code='int main(){return(0);}' 2813156283Srwatson 2814156283Srwatson_LT_AC_SYS_COMPILER 2815156283Srwatson 2816156283Srwatson# save warnings/boilerplate of simple test code 2817156283Srwatson_LT_COMPILER_BOILERPLATE 2818156283Srwatson_LT_LINKER_BOILERPLATE 2819156283Srwatson 2820156283SrwatsonAC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) 2821156283SrwatsonAC_LIBTOOL_PROG_COMPILER_PIC($1) 2822156283SrwatsonAC_LIBTOOL_PROG_CC_C_O($1) 2823156283SrwatsonAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) 2824156283SrwatsonAC_LIBTOOL_PROG_LD_SHLIBS($1) 2825156283SrwatsonAC_LIBTOOL_SYS_DYNAMIC_LINKER($1) 2826156283SrwatsonAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) 2827156283SrwatsonAC_LIBTOOL_SYS_LIB_STRIP 2828173143SrwatsonAC_LIBTOOL_DLOPEN_SELF 2829156283Srwatson 2830173143Srwatson# Report which library types will actually be built 2831156283SrwatsonAC_MSG_CHECKING([if libtool supports shared libraries]) 2832156283SrwatsonAC_MSG_RESULT([$can_build_shared]) 2833156283Srwatson 2834156283SrwatsonAC_MSG_CHECKING([whether to build shared libraries]) 2835156283Srwatsontest "$can_build_shared" = "no" && enable_shared=no 2836156283Srwatson 2837156283Srwatson# On AIX, shared libraries and static libraries use the same namespace, and 2838156283Srwatson# are all built from PIC. 2839156283Srwatsoncase $host_os in 2840156283Srwatsonaix3*) 2841156283Srwatson test "$enable_shared" = yes && enable_static=no 2842156283Srwatson if test -n "$RANLIB"; then 2843156283Srwatson archive_cmds="$archive_cmds~\$RANLIB \$lib" 2844156283Srwatson postinstall_cmds='$RANLIB $lib' 2845156283Srwatson fi 2846156283Srwatson ;; 2847156283Srwatson 2848191273Srwatsonaix[[4-9]]*) 2849156283Srwatson if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 2850156283Srwatson test "$enable_shared" = yes && enable_static=no 2851156283Srwatson fi 2852156283Srwatson ;; 2853156283Srwatsonesac 2854156283SrwatsonAC_MSG_RESULT([$enable_shared]) 2855156283Srwatson 2856156283SrwatsonAC_MSG_CHECKING([whether to build static libraries]) 2857156283Srwatson# Make sure either enable_shared or enable_static is yes. 2858156283Srwatsontest "$enable_shared" = yes || enable_static=yes 2859156283SrwatsonAC_MSG_RESULT([$enable_static]) 2860156283Srwatson 2861156283SrwatsonAC_LIBTOOL_CONFIG($1) 2862156283Srwatson 2863156283SrwatsonAC_LANG_POP 2864156283SrwatsonCC="$lt_save_CC" 2865156283Srwatson])# AC_LIBTOOL_LANG_C_CONFIG 2866156283Srwatson 2867156283Srwatson 2868156283Srwatson# AC_LIBTOOL_LANG_CXX_CONFIG 2869156283Srwatson# -------------------------- 2870156283Srwatson# Ensure that the configuration vars for the C compiler are 2871156283Srwatson# suitably defined. Those variables are subsequently used by 2872156283Srwatson# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 2873156283SrwatsonAC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)]) 2874156283SrwatsonAC_DEFUN([_LT_AC_LANG_CXX_CONFIG], 2875156283Srwatson[AC_LANG_PUSH(C++) 2876156283SrwatsonAC_REQUIRE([AC_PROG_CXX]) 2877156283SrwatsonAC_REQUIRE([_LT_AC_PROG_CXXCPP]) 2878156283Srwatson 2879156283Srwatson_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 2880156283Srwatson_LT_AC_TAGVAR(allow_undefined_flag, $1)= 2881156283Srwatson_LT_AC_TAGVAR(always_export_symbols, $1)=no 2882156283Srwatson_LT_AC_TAGVAR(archive_expsym_cmds, $1)= 2883156283Srwatson_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= 2884156283Srwatson_LT_AC_TAGVAR(hardcode_direct, $1)=no 2885156283Srwatson_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= 2886156283Srwatson_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 2887156283Srwatson_LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 2888156283Srwatson_LT_AC_TAGVAR(hardcode_minus_L, $1)=no 2889173143Srwatson_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 2890156283Srwatson_LT_AC_TAGVAR(hardcode_automatic, $1)=no 2891156283Srwatson_LT_AC_TAGVAR(module_cmds, $1)= 2892156283Srwatson_LT_AC_TAGVAR(module_expsym_cmds, $1)= 2893156283Srwatson_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown 2894156283Srwatson_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 2895156283Srwatson_LT_AC_TAGVAR(no_undefined_flag, $1)= 2896156283Srwatson_LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 2897156283Srwatson_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no 2898156283Srwatson 2899156283Srwatson# Dependencies to place before and after the object being linked: 2900156283Srwatson_LT_AC_TAGVAR(predep_objects, $1)= 2901156283Srwatson_LT_AC_TAGVAR(postdep_objects, $1)= 2902156283Srwatson_LT_AC_TAGVAR(predeps, $1)= 2903156283Srwatson_LT_AC_TAGVAR(postdeps, $1)= 2904156283Srwatson_LT_AC_TAGVAR(compiler_lib_search_path, $1)= 2905191273Srwatson_LT_AC_TAGVAR(compiler_lib_search_dirs, $1)= 2906156283Srwatson 2907156283Srwatson# Source file extension for C++ test sources. 2908156283Srwatsonac_ext=cpp 2909156283Srwatson 2910156283Srwatson# Object file extension for compiled C++ test sources. 2911156283Srwatsonobjext=o 2912156283Srwatson_LT_AC_TAGVAR(objext, $1)=$objext 2913156283Srwatson 2914156283Srwatson# Code to be used in simple compile tests 2915173143Srwatsonlt_simple_compile_test_code="int some_variable = 0;" 2916156283Srwatson 2917156283Srwatson# Code to be used in simple link tests 2918173143Srwatsonlt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 2919156283Srwatson 2920156283Srwatson# ltmain only uses $CC for tagged configurations so make sure $CC is set. 2921156283Srwatson_LT_AC_SYS_COMPILER 2922156283Srwatson 2923156283Srwatson# save warnings/boilerplate of simple test code 2924156283Srwatson_LT_COMPILER_BOILERPLATE 2925156283Srwatson_LT_LINKER_BOILERPLATE 2926156283Srwatson 2927156283Srwatson# Allow CC to be a program name with arguments. 2928156283Srwatsonlt_save_CC=$CC 2929156283Srwatsonlt_save_LD=$LD 2930156283Srwatsonlt_save_GCC=$GCC 2931156283SrwatsonGCC=$GXX 2932156283Srwatsonlt_save_with_gnu_ld=$with_gnu_ld 2933156283Srwatsonlt_save_path_LD=$lt_cv_path_LD 2934156283Srwatsonif test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 2935156283Srwatson lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 2936156283Srwatsonelse 2937173143Srwatson $as_unset lt_cv_prog_gnu_ld 2938156283Srwatsonfi 2939156283Srwatsonif test -n "${lt_cv_path_LDCXX+set}"; then 2940156283Srwatson lt_cv_path_LD=$lt_cv_path_LDCXX 2941156283Srwatsonelse 2942173143Srwatson $as_unset lt_cv_path_LD 2943156283Srwatsonfi 2944156283Srwatsontest -z "${LDCXX+set}" || LD=$LDCXX 2945156283SrwatsonCC=${CXX-"c++"} 2946156283Srwatsoncompiler=$CC 2947156283Srwatson_LT_AC_TAGVAR(compiler, $1)=$CC 2948156283Srwatson_LT_CC_BASENAME([$compiler]) 2949156283Srwatson 2950156283Srwatson# We don't want -fno-exception wen compiling C++ code, so set the 2951156283Srwatson# no_builtin_flag separately 2952156283Srwatsonif test "$GXX" = yes; then 2953156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 2954156283Srwatsonelse 2955156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 2956156283Srwatsonfi 2957156283Srwatson 2958156283Srwatsonif test "$GXX" = yes; then 2959156283Srwatson # Set up default GNU C++ configuration 2960156283Srwatson 2961156283Srwatson AC_PROG_LD 2962156283Srwatson 2963156283Srwatson # Check if GNU C++ uses GNU ld as the underlying linker, since the 2964156283Srwatson # archiving commands below assume that GNU ld is being used. 2965156283Srwatson if test "$with_gnu_ld" = yes; then 2966156283Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 2967156283Srwatson _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' 2968156283Srwatson 2969156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 2970156283Srwatson _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 2971156283Srwatson 2972156283Srwatson # If archive_cmds runs LD, not CC, wlarc should be empty 2973156283Srwatson # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 2974156283Srwatson # investigate it a little bit more. (MM) 2975156283Srwatson wlarc='${wl}' 2976156283Srwatson 2977156283Srwatson # ancient GNU ld didn't support --whole-archive et. al. 2978156283Srwatson if eval "`$CC -print-prog-name=ld` --help 2>&1" | \ 2979156283Srwatson grep 'no-whole-archive' > /dev/null; then 2980156283Srwatson _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 2981156283Srwatson else 2982156283Srwatson _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 2983156283Srwatson fi 2984156283Srwatson else 2985156283Srwatson with_gnu_ld=no 2986156283Srwatson wlarc= 2987156283Srwatson 2988156283Srwatson # A generic and very simple default shared library creation 2989156283Srwatson # command for GNU C++ for the case where it uses the native 2990156283Srwatson # linker, instead of GNU ld. If possible, this setting should 2991156283Srwatson # overridden to take advantage of the native linker features on 2992156283Srwatson # the platform it is being used on. 2993156283Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 2994156283Srwatson fi 2995156283Srwatson 2996156283Srwatson # Commands to make compiler produce verbose output that lists 2997156283Srwatson # what "hidden" libraries, object files and flags are used when 2998156283Srwatson # linking a shared library. 2999156283Srwatson output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' 3000156283Srwatson 3001156283Srwatsonelse 3002156283Srwatson GXX=no 3003156283Srwatson with_gnu_ld=no 3004156283Srwatson wlarc= 3005156283Srwatsonfi 3006156283Srwatson 3007156283Srwatson# PORTME: fill in a description of your system's C++ link characteristics 3008156283SrwatsonAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 3009156283Srwatson_LT_AC_TAGVAR(ld_shlibs, $1)=yes 3010156283Srwatsoncase $host_os in 3011156283Srwatson aix3*) 3012156283Srwatson # FIXME: insert proper C++ library support 3013156283Srwatson _LT_AC_TAGVAR(ld_shlibs, $1)=no 3014156283Srwatson ;; 3015191273Srwatson aix[[4-9]]*) 3016156283Srwatson if test "$host_cpu" = ia64; then 3017156283Srwatson # On IA64, the linker does run time linking by default, so we don't 3018156283Srwatson # have to do anything special. 3019156283Srwatson aix_use_runtimelinking=no 3020156283Srwatson exp_sym_flag='-Bexport' 3021156283Srwatson no_entry_flag="" 3022156283Srwatson else 3023156283Srwatson aix_use_runtimelinking=no 3024156283Srwatson 3025156283Srwatson # Test if we are trying to use run time linking or normal 3026156283Srwatson # AIX style linking. If -brtl is somewhere in LDFLAGS, we 3027156283Srwatson # need to do runtime linking. 3028191273Srwatson case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 3029156283Srwatson for ld_flag in $LDFLAGS; do 3030156283Srwatson case $ld_flag in 3031156283Srwatson *-brtl*) 3032156283Srwatson aix_use_runtimelinking=yes 3033156283Srwatson break 3034156283Srwatson ;; 3035156283Srwatson esac 3036156283Srwatson done 3037173143Srwatson ;; 3038156283Srwatson esac 3039156283Srwatson 3040156283Srwatson exp_sym_flag='-bexport' 3041156283Srwatson no_entry_flag='-bnoentry' 3042156283Srwatson fi 3043156283Srwatson 3044156283Srwatson # When large executables or shared objects are built, AIX ld can 3045156283Srwatson # have problems creating the table of contents. If linking a library 3046156283Srwatson # or program results in "error TOC overflow" add -mminimal-toc to 3047156283Srwatson # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 3048156283Srwatson # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 3049156283Srwatson 3050156283Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='' 3051156283Srwatson _LT_AC_TAGVAR(hardcode_direct, $1)=yes 3052156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' 3053156283Srwatson _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 3054156283Srwatson 3055156283Srwatson if test "$GXX" = yes; then 3056156283Srwatson case $host_os in aix4.[[012]]|aix4.[[012]].*) 3057156283Srwatson # We only want to do this on AIX 4.2 and lower, the check 3058156283Srwatson # below for broken collect2 doesn't work under 4.3+ 3059156283Srwatson collect2name=`${CC} -print-prog-name=collect2` 3060156283Srwatson if test -f "$collect2name" && \ 3061156283Srwatson strings "$collect2name" | grep resolve_lib_name >/dev/null 3062156283Srwatson then 3063156283Srwatson # We have reworked collect2 3064173143Srwatson : 3065156283Srwatson else 3066156283Srwatson # We have old collect2 3067156283Srwatson _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported 3068156283Srwatson # It fails to find uninstalled libraries when the uninstalled 3069156283Srwatson # path is not listed in the libpath. Setting hardcode_minus_L 3070156283Srwatson # to unsupported forces relinking 3071156283Srwatson _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 3072156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 3073156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 3074156283Srwatson fi 3075173143Srwatson ;; 3076156283Srwatson esac 3077156283Srwatson shared_flag='-shared' 3078156283Srwatson if test "$aix_use_runtimelinking" = yes; then 3079156283Srwatson shared_flag="$shared_flag "'${wl}-G' 3080156283Srwatson fi 3081156283Srwatson else 3082156283Srwatson # not using gcc 3083156283Srwatson if test "$host_cpu" = ia64; then 3084156283Srwatson # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 3085156283Srwatson # chokes on -Wl,-G. The following line is correct: 3086156283Srwatson shared_flag='-G' 3087156283Srwatson else 3088156283Srwatson if test "$aix_use_runtimelinking" = yes; then 3089156283Srwatson shared_flag='${wl}-G' 3090156283Srwatson else 3091156283Srwatson shared_flag='${wl}-bM:SRE' 3092156283Srwatson fi 3093156283Srwatson fi 3094156283Srwatson fi 3095156283Srwatson 3096156283Srwatson # It seems that -bexpall does not export symbols beginning with 3097156283Srwatson # underscore (_), so it is better to generate a list of symbols to export. 3098156283Srwatson _LT_AC_TAGVAR(always_export_symbols, $1)=yes 3099156283Srwatson if test "$aix_use_runtimelinking" = yes; then 3100156283Srwatson # Warning - without using the other runtime loading flags (-brtl), 3101156283Srwatson # -berok will link without error, but may produce a broken library. 3102156283Srwatson _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' 3103156283Srwatson # Determine the default libpath from the value encoded in an empty executable. 3104156283Srwatson _LT_AC_SYS_LIBPATH_AIX 3105156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 3106156283Srwatson 3107173143Srwatson _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" 3108156283Srwatson else 3109156283Srwatson if test "$host_cpu" = ia64; then 3110156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 3111156283Srwatson _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 3112173143Srwatson _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" 3113156283Srwatson else 3114156283Srwatson # Determine the default libpath from the value encoded in an empty executable. 3115156283Srwatson _LT_AC_SYS_LIBPATH_AIX 3116156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 3117156283Srwatson # Warning - without using the other run time loading flags, 3118156283Srwatson # -berok will link without error, but may produce a broken library. 3119156283Srwatson _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 3120156283Srwatson _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 3121156283Srwatson # Exported symbols can be pulled into shared objects from archives 3122173143Srwatson _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 3123156283Srwatson _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes 3124156283Srwatson # This is similar to how AIX traditionally builds its shared libraries. 3125173143Srwatson _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' 3126156283Srwatson fi 3127156283Srwatson fi 3128156283Srwatson ;; 3129173143Srwatson 3130173143Srwatson beos*) 3131173143Srwatson if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 3132173143Srwatson _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 3133173143Srwatson # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 3134173143Srwatson # support --undefined. This deserves some investigation. FIXME 3135173143Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 3136173143Srwatson else 3137173143Srwatson _LT_AC_TAGVAR(ld_shlibs, $1)=no 3138173143Srwatson fi 3139173143Srwatson ;; 3140173143Srwatson 3141156283Srwatson chorus*) 3142156283Srwatson case $cc_basename in 3143156283Srwatson *) 3144156283Srwatson # FIXME: insert proper C++ library support 3145156283Srwatson _LT_AC_TAGVAR(ld_shlibs, $1)=no 3146156283Srwatson ;; 3147156283Srwatson esac 3148156283Srwatson ;; 3149156283Srwatson 3150156283Srwatson cygwin* | mingw* | pw32*) 3151156283Srwatson # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 3152156283Srwatson # as there is no search path for DLLs. 3153156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 3154156283Srwatson _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 3155156283Srwatson _LT_AC_TAGVAR(always_export_symbols, $1)=no 3156156283Srwatson _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 3157156283Srwatson 3158156283Srwatson if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then 3159173143Srwatson _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' 3160156283Srwatson # If the export-symbols file already is a .def file (1st line 3161156283Srwatson # is EXPORTS), use it as is; otherwise, prepend... 3162156283Srwatson _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 3163156283Srwatson cp $export_symbols $output_objdir/$soname.def; 3164156283Srwatson else 3165156283Srwatson echo EXPORTS > $output_objdir/$soname.def; 3166156283Srwatson cat $export_symbols >> $output_objdir/$soname.def; 3167156283Srwatson fi~ 3168173143Srwatson $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' 3169156283Srwatson else 3170156283Srwatson _LT_AC_TAGVAR(ld_shlibs, $1)=no 3171156283Srwatson fi 3172156283Srwatson ;; 3173156283Srwatson darwin* | rhapsody*) 3174156283Srwatson _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 3175156283Srwatson _LT_AC_TAGVAR(hardcode_direct, $1)=no 3176156283Srwatson _LT_AC_TAGVAR(hardcode_automatic, $1)=yes 3177156283Srwatson _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 3178156283Srwatson _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' 3179156283Srwatson _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 3180191273Srwatson _LT_AC_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" 3181191273Srwatson if test "$GXX" = yes ; then 3182156283Srwatson output_verbose_link_cmd='echo' 3183191273Srwatson _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}" 3184191273Srwatson _LT_AC_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" 3185191273Srwatson _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}" 3186191273Srwatson _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}" 3187191273Srwatson if test "$lt_cv_apple_cc_single_mod" != "yes"; then 3188191273Srwatson _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}" 3189191273Srwatson _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}" 3190156283Srwatson fi 3191156283Srwatson else 3192156283Srwatson case $cc_basename in 3193156283Srwatson xlc*) 3194156283Srwatson output_verbose_link_cmd='echo' 3195173143Srwatson _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' 3196156283Srwatson _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' 3197156283Srwatson # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds 3198173143Srwatson _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}' 3199156283Srwatson _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}' 3200156283Srwatson ;; 3201156283Srwatson *) 3202156283Srwatson _LT_AC_TAGVAR(ld_shlibs, $1)=no 3203156283Srwatson ;; 3204156283Srwatson esac 3205156283Srwatson fi 3206156283Srwatson ;; 3207156283Srwatson 3208156283Srwatson dgux*) 3209156283Srwatson case $cc_basename in 3210156283Srwatson ec++*) 3211156283Srwatson # FIXME: insert proper C++ library support 3212156283Srwatson _LT_AC_TAGVAR(ld_shlibs, $1)=no 3213156283Srwatson ;; 3214156283Srwatson ghcx*) 3215156283Srwatson # Green Hills C++ Compiler 3216156283Srwatson # FIXME: insert proper C++ library support 3217156283Srwatson _LT_AC_TAGVAR(ld_shlibs, $1)=no 3218156283Srwatson ;; 3219156283Srwatson *) 3220156283Srwatson # FIXME: insert proper C++ library support 3221156283Srwatson _LT_AC_TAGVAR(ld_shlibs, $1)=no 3222156283Srwatson ;; 3223156283Srwatson esac 3224156283Srwatson ;; 3225156283Srwatson freebsd[[12]]*) 3226156283Srwatson # C++ shared libraries reported to be fairly broken before switch to ELF 3227156283Srwatson _LT_AC_TAGVAR(ld_shlibs, $1)=no 3228156283Srwatson ;; 3229156283Srwatson freebsd-elf*) 3230156283Srwatson _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 3231156283Srwatson ;; 3232173143Srwatson freebsd* | dragonfly*) 3233156283Srwatson # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 3234156283Srwatson # conventions 3235156283Srwatson _LT_AC_TAGVAR(ld_shlibs, $1)=yes 3236156283Srwatson ;; 3237156283Srwatson gnu*) 3238156283Srwatson ;; 3239156283Srwatson hpux9*) 3240156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 3241156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 3242156283Srwatson _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 3243156283Srwatson _LT_AC_TAGVAR(hardcode_direct, $1)=yes 3244156283Srwatson _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 3245156283Srwatson # but as the default 3246156283Srwatson # location of the library. 3247156283Srwatson 3248156283Srwatson case $cc_basename in 3249156283Srwatson CC*) 3250156283Srwatson # FIXME: insert proper C++ library support 3251156283Srwatson _LT_AC_TAGVAR(ld_shlibs, $1)=no 3252156283Srwatson ;; 3253156283Srwatson aCC*) 3254156283Srwatson _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' 3255156283Srwatson # Commands to make compiler produce verbose output that lists 3256156283Srwatson # what "hidden" libraries, object files and flags are used when 3257156283Srwatson # linking a shared library. 3258156283Srwatson # 3259156283Srwatson # There doesn't appear to be a way to prevent this compiler from 3260156283Srwatson # explicitly linking system object files so we need to strip them 3261156283Srwatson # from the output so that they don't get included in the library 3262156283Srwatson # dependencies. 3263156283Srwatson 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' 3264156283Srwatson ;; 3265156283Srwatson *) 3266156283Srwatson if test "$GXX" = yes; then 3267156283Srwatson _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' 3268156283Srwatson else 3269156283Srwatson # FIXME: insert proper C++ library support 3270156283Srwatson _LT_AC_TAGVAR(ld_shlibs, $1)=no 3271156283Srwatson fi 3272156283Srwatson ;; 3273156283Srwatson esac 3274156283Srwatson ;; 3275156283Srwatson hpux10*|hpux11*) 3276156283Srwatson if test $with_gnu_ld = no; then 3277173143Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 3278173143Srwatson _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 3279173143Srwatson 3280156283Srwatson case $host_cpu in 3281173143Srwatson hppa*64*|ia64*) ;; 3282156283Srwatson *) 3283156283Srwatson _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 3284156283Srwatson ;; 3285156283Srwatson esac 3286156283Srwatson fi 3287156283Srwatson case $host_cpu in 3288173143Srwatson hppa*64*|ia64*) 3289156283Srwatson _LT_AC_TAGVAR(hardcode_direct, $1)=no 3290156283Srwatson _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 3291156283Srwatson ;; 3292156283Srwatson *) 3293156283Srwatson _LT_AC_TAGVAR(hardcode_direct, $1)=yes 3294156283Srwatson _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 3295156283Srwatson # but as the default 3296156283Srwatson # location of the library. 3297156283Srwatson ;; 3298156283Srwatson esac 3299156283Srwatson 3300156283Srwatson case $cc_basename in 3301156283Srwatson CC*) 3302156283Srwatson # FIXME: insert proper C++ library support 3303156283Srwatson _LT_AC_TAGVAR(ld_shlibs, $1)=no 3304156283Srwatson ;; 3305156283Srwatson aCC*) 3306156283Srwatson case $host_cpu in 3307173143Srwatson hppa*64*) 3308173143Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 3309156283Srwatson ;; 3310173143Srwatson ia64*) 3311173143Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 3312173143Srwatson ;; 3313156283Srwatson *) 3314156283Srwatson _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' 3315156283Srwatson ;; 3316156283Srwatson esac 3317156283Srwatson # Commands to make compiler produce verbose output that lists 3318156283Srwatson # what "hidden" libraries, object files and flags are used when 3319156283Srwatson # linking a shared library. 3320156283Srwatson # 3321156283Srwatson # There doesn't appear to be a way to prevent this compiler from 3322156283Srwatson # explicitly linking system object files so we need to strip them 3323156283Srwatson # from the output so that they don't get included in the library 3324156283Srwatson # dependencies. 3325156283Srwatson 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' 3326156283Srwatson ;; 3327156283Srwatson *) 3328156283Srwatson if test "$GXX" = yes; then 3329156283Srwatson if test $with_gnu_ld = no; then 3330156283Srwatson case $host_cpu in 3331173143Srwatson hppa*64*) 3332173143Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 3333156283Srwatson ;; 3334173143Srwatson ia64*) 3335173143Srwatson _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' 3336173143Srwatson ;; 3337156283Srwatson *) 3338156283Srwatson _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' 3339156283Srwatson ;; 3340156283Srwatson esac 3341156283Srwatson fi 3342156283Srwatson else 3343156283Srwatson # FIXME: insert proper C++ library support 3344156283Srwatson _LT_AC_TAGVAR(ld_shlibs, $1)=no 3345156283Srwatson fi 3346156283Srwatson ;; 3347156283Srwatson esac 3348156283Srwatson ;; 3349173143Srwatson interix[[3-9]]*) 3350173143Srwatson _LT_AC_TAGVAR(hardcode_direct, $1)=no 3351173143Srwatson _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 3352173143Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 3353173143Srwatson _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 3354173143Srwatson # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 3355173143Srwatson # Instead, shared libraries are loaded at an image base (0x10000000 by 3356173143Srwatson # default) and relocated if they conflict, which is a slow very memory 3357173143Srwatson # consuming and fragmenting process. To avoid this, we pick a random, 3358173143Srwatson # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 3359173143Srwatson # time. Moving up from 0x10000000 also allows more sbrk(2) space. 3360173143Srwatson _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' 3361173143Srwatson _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' 3362173143Srwatson ;; 3363156283Srwatson irix5* | irix6*) 3364156283Srwatson case $cc_basename in 3365156283Srwatson CC*) 3366156283Srwatson # SGI C++ 3367156283Srwatson _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' 3368156283Srwatson 3369156283Srwatson # Archives containing C++ object files must be created using 3370156283Srwatson # "CC -ar", where "CC" is the IRIX C++ compiler. This is 3371156283Srwatson # necessary to make sure instantiated templates are included 3372156283Srwatson # in the archive. 3373156283Srwatson _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 3374156283Srwatson ;; 3375156283Srwatson *) 3376156283Srwatson if test "$GXX" = yes; then 3377156283Srwatson if test "$with_gnu_ld" = no; then 3378156283Srwatson _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' 3379156283Srwatson else 3380156283Srwatson _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' 3381156283Srwatson fi 3382156283Srwatson fi 3383156283Srwatson _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 3384156283Srwatson ;; 3385156283Srwatson esac 3386156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 3387156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 3388156283Srwatson ;; 3389173143Srwatson linux* | k*bsd*-gnu) 3390156283Srwatson case $cc_basename in 3391156283Srwatson KCC*) 3392156283Srwatson # Kuck and Associates, Inc. (KAI) C++ Compiler 3393156283Srwatson 3394156283Srwatson # KCC will only create a shared library if the output file 3395156283Srwatson # ends with ".so" (or ".sl" for HP-UX), so rename the library 3396156283Srwatson # to its proper name (with version) after linking. 3397156283Srwatson _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' 3398156283Srwatson _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' 3399156283Srwatson # Commands to make compiler produce verbose output that lists 3400156283Srwatson # what "hidden" libraries, object files and flags are used when 3401156283Srwatson # linking a shared library. 3402156283Srwatson # 3403156283Srwatson # There doesn't appear to be a way to prevent this compiler from 3404156283Srwatson # explicitly linking system object files so we need to strip them 3405156283Srwatson # from the output so that they don't get included in the library 3406156283Srwatson # dependencies. 3407156283Srwatson 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' 3408156283Srwatson 3409156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir' 3410156283Srwatson _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 3411156283Srwatson 3412156283Srwatson # Archives containing C++ object files must be created using 3413156283Srwatson # "CC -Bstatic", where "CC" is the KAI C++ compiler. 3414156283Srwatson _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 3415156283Srwatson ;; 3416156283Srwatson icpc*) 3417156283Srwatson # Intel C++ 3418156283Srwatson with_gnu_ld=yes 3419156283Srwatson # version 8.0 and above of icpc choke on multiply defined symbols 3420156283Srwatson # if we add $predep_objects and $postdep_objects, however 7.1 and 3421156283Srwatson # earlier do not add the objects themselves. 3422156283Srwatson case `$CC -V 2>&1` in 3423156283Srwatson *"Version 7."*) 3424156283Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 3425156283Srwatson _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' 3426156283Srwatson ;; 3427156283Srwatson *) # Version 8.0 or newer 3428156283Srwatson tmp_idyn= 3429156283Srwatson case $host_cpu in 3430156283Srwatson ia64*) tmp_idyn=' -i_dynamic';; 3431156283Srwatson esac 3432156283Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 3433156283Srwatson _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' 3434156283Srwatson ;; 3435156283Srwatson esac 3436156283Srwatson _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 3437156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 3438156283Srwatson _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 3439156283Srwatson _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 3440156283Srwatson ;; 3441191273Srwatson pgCC* | pgcpp*) 3442156283Srwatson # Portland Group C++ compiler 3443156283Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 3444156283Srwatson _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' 3445156283Srwatson 3446156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 3447156283Srwatson _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 3448156283Srwatson _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' 3449156283Srwatson ;; 3450156283Srwatson cxx*) 3451156283Srwatson # Compaq C++ 3452156283Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 3453156283Srwatson _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' 3454156283Srwatson 3455156283Srwatson runpath_var=LD_RUN_PATH 3456156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 3457156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 3458156283Srwatson 3459156283Srwatson # Commands to make compiler produce verbose output that lists 3460156283Srwatson # what "hidden" libraries, object files and flags are used when 3461156283Srwatson # linking a shared library. 3462156283Srwatson # 3463156283Srwatson # There doesn't appear to be a way to prevent this compiler from 3464156283Srwatson # explicitly linking system object files so we need to strip them 3465156283Srwatson # from the output so that they don't get included in the library 3466156283Srwatson # dependencies. 3467156283Srwatson 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' 3468156283Srwatson ;; 3469173143Srwatson *) 3470173143Srwatson case `$CC -V 2>&1 | sed 5q` in 3471173143Srwatson *Sun\ C*) 3472173143Srwatson # Sun C++ 5.9 3473173143Srwatson _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' 3474173143Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 3475173143Srwatson _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' 3476173143Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 3477173143Srwatson _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' 3478173143Srwatson 3479173143Srwatson # Not sure whether something based on 3480173143Srwatson # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 3481173143Srwatson # would be better. 3482173143Srwatson output_verbose_link_cmd='echo' 3483173143Srwatson 3484173143Srwatson # Archives containing C++ object files must be created using 3485173143Srwatson # "CC -xar", where "CC" is the Sun C++ compiler. This is 3486173143Srwatson # necessary to make sure instantiated templates are included 3487173143Srwatson # in the archive. 3488173143Srwatson _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 3489173143Srwatson ;; 3490173143Srwatson esac 3491173143Srwatson ;; 3492156283Srwatson esac 3493156283Srwatson ;; 3494156283Srwatson lynxos*) 3495156283Srwatson # FIXME: insert proper C++ library support 3496156283Srwatson _LT_AC_TAGVAR(ld_shlibs, $1)=no 3497156283Srwatson ;; 3498156283Srwatson m88k*) 3499156283Srwatson # FIXME: insert proper C++ library support 3500156283Srwatson _LT_AC_TAGVAR(ld_shlibs, $1)=no 3501156283Srwatson ;; 3502156283Srwatson mvs*) 3503156283Srwatson case $cc_basename in 3504156283Srwatson cxx*) 3505156283Srwatson # FIXME: insert proper C++ library support 3506156283Srwatson _LT_AC_TAGVAR(ld_shlibs, $1)=no 3507156283Srwatson ;; 3508156283Srwatson *) 3509156283Srwatson # FIXME: insert proper C++ library support 3510156283Srwatson _LT_AC_TAGVAR(ld_shlibs, $1)=no 3511156283Srwatson ;; 3512156283Srwatson esac 3513156283Srwatson ;; 3514156283Srwatson netbsd*) 3515156283Srwatson if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then 3516156283Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 3517156283Srwatson wlarc= 3518156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 3519156283Srwatson _LT_AC_TAGVAR(hardcode_direct, $1)=yes 3520156283Srwatson _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 3521156283Srwatson fi 3522156283Srwatson # Workaround some broken pre-1.5 toolchains 3523156283Srwatson output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 3524156283Srwatson ;; 3525156283Srwatson openbsd2*) 3526156283Srwatson # C++ shared libraries are fairly broken 3527156283Srwatson _LT_AC_TAGVAR(ld_shlibs, $1)=no 3528156283Srwatson ;; 3529156283Srwatson openbsd*) 3530173143Srwatson if test -f /usr/libexec/ld.so; then 3531173143Srwatson _LT_AC_TAGVAR(hardcode_direct, $1)=yes 3532173143Srwatson _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 3533173143Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 3534173143Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 3535173143Srwatson if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 3536173143Srwatson _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' 3537173143Srwatson _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 3538173143Srwatson _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 3539173143Srwatson fi 3540173143Srwatson output_verbose_link_cmd='echo' 3541173143Srwatson else 3542173143Srwatson _LT_AC_TAGVAR(ld_shlibs, $1)=no 3543156283Srwatson fi 3544156283Srwatson ;; 3545156283Srwatson osf3*) 3546156283Srwatson case $cc_basename in 3547156283Srwatson KCC*) 3548156283Srwatson # Kuck and Associates, Inc. (KAI) C++ Compiler 3549156283Srwatson 3550156283Srwatson # KCC will only create a shared library if the output file 3551156283Srwatson # ends with ".so" (or ".sl" for HP-UX), so rename the library 3552156283Srwatson # to its proper name (with version) after linking. 3553156283Srwatson _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' 3554156283Srwatson 3555156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 3556156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 3557156283Srwatson 3558156283Srwatson # Archives containing C++ object files must be created using 3559156283Srwatson # "CC -Bstatic", where "CC" is the KAI C++ compiler. 3560156283Srwatson _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 3561156283Srwatson 3562156283Srwatson ;; 3563156283Srwatson RCC*) 3564156283Srwatson # Rational C++ 2.4.1 3565156283Srwatson # FIXME: insert proper C++ library support 3566156283Srwatson _LT_AC_TAGVAR(ld_shlibs, $1)=no 3567156283Srwatson ;; 3568156283Srwatson cxx*) 3569156283Srwatson _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 3570156283Srwatson _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' 3571156283Srwatson 3572156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 3573156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 3574156283Srwatson 3575156283Srwatson # Commands to make compiler produce verbose output that lists 3576156283Srwatson # what "hidden" libraries, object files and flags are used when 3577156283Srwatson # linking a shared library. 3578156283Srwatson # 3579156283Srwatson # There doesn't appear to be a way to prevent this compiler from 3580156283Srwatson # explicitly linking system object files so we need to strip them 3581156283Srwatson # from the output so that they don't get included in the library 3582156283Srwatson # dependencies. 3583156283Srwatson 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' 3584156283Srwatson ;; 3585156283Srwatson *) 3586156283Srwatson if test "$GXX" = yes && test "$with_gnu_ld" = no; then 3587156283Srwatson _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 3588156283Srwatson _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' 3589156283Srwatson 3590156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 3591156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 3592156283Srwatson 3593156283Srwatson # Commands to make compiler produce verbose output that lists 3594156283Srwatson # what "hidden" libraries, object files and flags are used when 3595156283Srwatson # linking a shared library. 3596156283Srwatson output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' 3597156283Srwatson 3598156283Srwatson else 3599156283Srwatson # FIXME: insert proper C++ library support 3600156283Srwatson _LT_AC_TAGVAR(ld_shlibs, $1)=no 3601156283Srwatson fi 3602156283Srwatson ;; 3603156283Srwatson esac 3604156283Srwatson ;; 3605156283Srwatson osf4* | osf5*) 3606156283Srwatson case $cc_basename in 3607156283Srwatson KCC*) 3608156283Srwatson # Kuck and Associates, Inc. (KAI) C++ Compiler 3609156283Srwatson 3610156283Srwatson # KCC will only create a shared library if the output file 3611156283Srwatson # ends with ".so" (or ".sl" for HP-UX), so rename the library 3612156283Srwatson # to its proper name (with version) after linking. 3613156283Srwatson _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' 3614156283Srwatson 3615156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 3616156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 3617156283Srwatson 3618156283Srwatson # Archives containing C++ object files must be created using 3619156283Srwatson # the KAI C++ compiler. 3620156283Srwatson _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' 3621156283Srwatson ;; 3622156283Srwatson RCC*) 3623156283Srwatson # Rational C++ 2.4.1 3624156283Srwatson # FIXME: insert proper C++ library support 3625156283Srwatson _LT_AC_TAGVAR(ld_shlibs, $1)=no 3626156283Srwatson ;; 3627156283Srwatson cxx*) 3628156283Srwatson _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 3629156283Srwatson _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' 3630156283Srwatson _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 3631156283Srwatson echo "-hidden">> $lib.exp~ 3632156283Srwatson $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~ 3633156283Srwatson $rm $lib.exp' 3634156283Srwatson 3635156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 3636156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 3637156283Srwatson 3638156283Srwatson # Commands to make compiler produce verbose output that lists 3639156283Srwatson # what "hidden" libraries, object files and flags are used when 3640156283Srwatson # linking a shared library. 3641156283Srwatson # 3642156283Srwatson # There doesn't appear to be a way to prevent this compiler from 3643156283Srwatson # explicitly linking system object files so we need to strip them 3644156283Srwatson # from the output so that they don't get included in the library 3645156283Srwatson # dependencies. 3646156283Srwatson 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' 3647156283Srwatson ;; 3648156283Srwatson *) 3649156283Srwatson if test "$GXX" = yes && test "$with_gnu_ld" = no; then 3650156283Srwatson _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 3651156283Srwatson _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' 3652156283Srwatson 3653156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 3654156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 3655156283Srwatson 3656156283Srwatson # Commands to make compiler produce verbose output that lists 3657156283Srwatson # what "hidden" libraries, object files and flags are used when 3658156283Srwatson # linking a shared library. 3659156283Srwatson output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' 3660156283Srwatson 3661156283Srwatson else 3662156283Srwatson # FIXME: insert proper C++ library support 3663156283Srwatson _LT_AC_TAGVAR(ld_shlibs, $1)=no 3664156283Srwatson fi 3665156283Srwatson ;; 3666156283Srwatson esac 3667156283Srwatson ;; 3668156283Srwatson psos*) 3669156283Srwatson # FIXME: insert proper C++ library support 3670156283Srwatson _LT_AC_TAGVAR(ld_shlibs, $1)=no 3671156283Srwatson ;; 3672156283Srwatson sunos4*) 3673156283Srwatson case $cc_basename in 3674156283Srwatson CC*) 3675156283Srwatson # Sun C++ 4.x 3676156283Srwatson # FIXME: insert proper C++ library support 3677156283Srwatson _LT_AC_TAGVAR(ld_shlibs, $1)=no 3678156283Srwatson ;; 3679156283Srwatson lcc*) 3680156283Srwatson # Lucid 3681156283Srwatson # FIXME: insert proper C++ library support 3682156283Srwatson _LT_AC_TAGVAR(ld_shlibs, $1)=no 3683156283Srwatson ;; 3684156283Srwatson *) 3685156283Srwatson # FIXME: insert proper C++ library support 3686156283Srwatson _LT_AC_TAGVAR(ld_shlibs, $1)=no 3687156283Srwatson ;; 3688156283Srwatson esac 3689156283Srwatson ;; 3690156283Srwatson solaris*) 3691156283Srwatson case $cc_basename in 3692156283Srwatson CC*) 3693156283Srwatson # Sun C++ 4.2, 5.x and Centerline C++ 3694156283Srwatson _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes 3695156283Srwatson _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' 3696156283Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 3697156283Srwatson _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 3698156283Srwatson $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' 3699156283Srwatson 3700156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 3701156283Srwatson _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 3702156283Srwatson case $host_os in 3703156283Srwatson solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 3704156283Srwatson *) 3705173143Srwatson # The compiler driver will combine and reorder linker options, 3706173143Srwatson # but understands `-z linker_flag'. 3707156283Srwatson # Supported since Solaris 2.6 (maybe 2.5.1?) 3708173143Srwatson _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 3709156283Srwatson ;; 3710156283Srwatson esac 3711156283Srwatson _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 3712156283Srwatson 3713156283Srwatson output_verbose_link_cmd='echo' 3714156283Srwatson 3715156283Srwatson # Archives containing C++ object files must be created using 3716156283Srwatson # "CC -xar", where "CC" is the Sun C++ compiler. This is 3717156283Srwatson # necessary to make sure instantiated templates are included 3718156283Srwatson # in the archive. 3719156283Srwatson _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 3720156283Srwatson ;; 3721156283Srwatson gcx*) 3722156283Srwatson # Green Hills C++ Compiler 3723156283Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 3724156283Srwatson 3725156283Srwatson # The C++ compiler must be used to create the archive. 3726156283Srwatson _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 3727156283Srwatson ;; 3728156283Srwatson *) 3729156283Srwatson # GNU C++ compiler with Solaris linker 3730156283Srwatson if test "$GXX" = yes && test "$with_gnu_ld" = no; then 3731156283Srwatson _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' 3732156283Srwatson if $CC --version | grep -v '^2\.7' > /dev/null; then 3733156283Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 3734156283Srwatson _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 3735156283Srwatson $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' 3736156283Srwatson 3737156283Srwatson # Commands to make compiler produce verbose output that lists 3738156283Srwatson # what "hidden" libraries, object files and flags are used when 3739156283Srwatson # linking a shared library. 3740156283Srwatson output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" 3741156283Srwatson else 3742156283Srwatson # g++ 2.7 appears to require `-G' NOT `-shared' on this 3743156283Srwatson # platform. 3744156283Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 3745156283Srwatson _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 3746156283Srwatson $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' 3747156283Srwatson 3748156283Srwatson # Commands to make compiler produce verbose output that lists 3749156283Srwatson # what "hidden" libraries, object files and flags are used when 3750156283Srwatson # linking a shared library. 3751156283Srwatson output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" 3752156283Srwatson fi 3753156283Srwatson 3754156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' 3755173143Srwatson case $host_os in 3756173143Srwatson solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 3757173143Srwatson *) 3758173143Srwatson _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 3759173143Srwatson ;; 3760173143Srwatson esac 3761156283Srwatson fi 3762156283Srwatson ;; 3763156283Srwatson esac 3764156283Srwatson ;; 3765173143Srwatson sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 3766173143Srwatson _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 3767156283Srwatson _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 3768173143Srwatson _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 3769173143Srwatson runpath_var='LD_RUN_PATH' 3770173143Srwatson 3771173143Srwatson case $cc_basename in 3772173143Srwatson CC*) 3773173143Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 3774173143Srwatson _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 3775173143Srwatson ;; 3776173143Srwatson *) 3777173143Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 3778173143Srwatson _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 3779173143Srwatson ;; 3780173143Srwatson esac 3781156283Srwatson ;; 3782173143Srwatson sysv5* | sco3.2v5* | sco5v6*) 3783173143Srwatson # Note: We can NOT use -z defs as we might desire, because we do not 3784173143Srwatson # link with -lc, and that would cause any symbols used from libc to 3785173143Srwatson # always be unresolved, which means just about no library would 3786173143Srwatson # ever link correctly. If we're not using GNU ld we use -z text 3787173143Srwatson # though, which does catch some bad symbols but isn't as heavy-handed 3788173143Srwatson # as -z defs. 3789173143Srwatson # For security reasons, it is highly recommended that you always 3790173143Srwatson # use absolute paths for naming shared libraries, and exclude the 3791173143Srwatson # DT_RUNPATH tag from executables and libraries. But doing so 3792173143Srwatson # requires that you compile everything twice, which is a pain. 3793173143Srwatson # So that behaviour is only enabled if SCOABSPATH is set to a 3794173143Srwatson # non-empty value in the environment. Most likely only useful for 3795173143Srwatson # creating official distributions of packages. 3796173143Srwatson # This is a hack until libtool officially supports absolute path 3797173143Srwatson # names for shared libraries. 3798173143Srwatson _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 3799173143Srwatson _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 3800173143Srwatson _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 3801173143Srwatson _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 3802173143Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' 3803173143Srwatson _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' 3804173143Srwatson _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 3805173143Srwatson _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 3806173143Srwatson runpath_var='LD_RUN_PATH' 3807173143Srwatson 3808173143Srwatson case $cc_basename in 3809173143Srwatson CC*) 3810173143Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' 3811173143Srwatson _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' 3812173143Srwatson ;; 3813173143Srwatson *) 3814173143Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' 3815173143Srwatson _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' 3816173143Srwatson ;; 3817173143Srwatson esac 3818173143Srwatson ;; 3819156283Srwatson tandem*) 3820156283Srwatson case $cc_basename in 3821156283Srwatson NCC*) 3822156283Srwatson # NonStop-UX NCC 3.20 3823156283Srwatson # FIXME: insert proper C++ library support 3824156283Srwatson _LT_AC_TAGVAR(ld_shlibs, $1)=no 3825156283Srwatson ;; 3826156283Srwatson *) 3827156283Srwatson # FIXME: insert proper C++ library support 3828156283Srwatson _LT_AC_TAGVAR(ld_shlibs, $1)=no 3829156283Srwatson ;; 3830156283Srwatson esac 3831156283Srwatson ;; 3832156283Srwatson vxworks*) 3833156283Srwatson # FIXME: insert proper C++ library support 3834156283Srwatson _LT_AC_TAGVAR(ld_shlibs, $1)=no 3835156283Srwatson ;; 3836156283Srwatson *) 3837156283Srwatson # FIXME: insert proper C++ library support 3838156283Srwatson _LT_AC_TAGVAR(ld_shlibs, $1)=no 3839156283Srwatson ;; 3840156283Srwatsonesac 3841156283SrwatsonAC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) 3842156283Srwatsontest "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 3843156283Srwatson 3844156283Srwatson_LT_AC_TAGVAR(GCC, $1)="$GXX" 3845156283Srwatson_LT_AC_TAGVAR(LD, $1)="$LD" 3846156283Srwatson 3847156283SrwatsonAC_LIBTOOL_POSTDEP_PREDEP($1) 3848156283SrwatsonAC_LIBTOOL_PROG_COMPILER_PIC($1) 3849156283SrwatsonAC_LIBTOOL_PROG_CC_C_O($1) 3850156283SrwatsonAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) 3851156283SrwatsonAC_LIBTOOL_PROG_LD_SHLIBS($1) 3852156283SrwatsonAC_LIBTOOL_SYS_DYNAMIC_LINKER($1) 3853156283SrwatsonAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) 3854156283Srwatson 3855156283SrwatsonAC_LIBTOOL_CONFIG($1) 3856156283Srwatson 3857156283SrwatsonAC_LANG_POP 3858156283SrwatsonCC=$lt_save_CC 3859156283SrwatsonLDCXX=$LD 3860156283SrwatsonLD=$lt_save_LD 3861156283SrwatsonGCC=$lt_save_GCC 3862156283Srwatsonwith_gnu_ldcxx=$with_gnu_ld 3863156283Srwatsonwith_gnu_ld=$lt_save_with_gnu_ld 3864156283Srwatsonlt_cv_path_LDCXX=$lt_cv_path_LD 3865156283Srwatsonlt_cv_path_LD=$lt_save_path_LD 3866156283Srwatsonlt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 3867156283Srwatsonlt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 3868156283Srwatson])# AC_LIBTOOL_LANG_CXX_CONFIG 3869156283Srwatson 3870156283Srwatson# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME]) 3871173143Srwatson# ------------------------------------ 3872156283Srwatson# Figure out "hidden" library dependencies from verbose 3873156283Srwatson# compiler output when linking a shared library. 3874156283Srwatson# Parse the compiler output and extract the necessary 3875156283Srwatson# objects, libraries and library flags. 3876191273SrwatsonAC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP], 3877191273Srwatson[AC_REQUIRE([LT_AC_PROG_SED])dnl 3878156283Srwatsondnl we can't use the lt_simple_compile_test_code here, 3879156283Srwatsondnl because it contains code intended for an executable, 3880156283Srwatsondnl not a library. It's possible we should let each 3881156283Srwatsondnl tag define a new lt_????_link_test_code variable, 3882156283Srwatsondnl but it's only used here... 3883156283Srwatsonifelse([$1],[],[cat > conftest.$ac_ext <<EOF 3884156283Srwatsonint a; 3885156283Srwatsonvoid foo (void) { a = 0; } 3886156283SrwatsonEOF 3887156283Srwatson],[$1],[CXX],[cat > conftest.$ac_ext <<EOF 3888156283Srwatsonclass Foo 3889156283Srwatson{ 3890156283Srwatsonpublic: 3891156283Srwatson Foo (void) { a = 0; } 3892156283Srwatsonprivate: 3893156283Srwatson int a; 3894156283Srwatson}; 3895156283SrwatsonEOF 3896156283Srwatson],[$1],[F77],[cat > conftest.$ac_ext <<EOF 3897156283Srwatson subroutine foo 3898156283Srwatson implicit none 3899156283Srwatson integer*4 a 3900156283Srwatson a=0 3901156283Srwatson return 3902156283Srwatson end 3903156283SrwatsonEOF 3904156283Srwatson],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF 3905156283Srwatsonpublic class foo { 3906156283Srwatson private int a; 3907156283Srwatson public void bar (void) { 3908156283Srwatson a = 0; 3909156283Srwatson } 3910156283Srwatson}; 3911156283SrwatsonEOF 3912156283Srwatson]) 3913156283Srwatsondnl Parse the compiler output and extract the necessary 3914156283Srwatsondnl objects, libraries and library flags. 3915156283Srwatsonif AC_TRY_EVAL(ac_compile); then 3916156283Srwatson # Parse the compiler output and extract the necessary 3917156283Srwatson # objects, libraries and library flags. 3918156283Srwatson 3919156283Srwatson # Sentinel used to keep track of whether or not we are before 3920156283Srwatson # the conftest object file. 3921156283Srwatson pre_test_object_deps_done=no 3922156283Srwatson 3923156283Srwatson # The `*' in the case matches for architectures that use `case' in 3924156283Srwatson # $output_verbose_cmd can trigger glob expansion during the loop 3925156283Srwatson # eval without this substitution. 3926156283Srwatson output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"` 3927156283Srwatson 3928156283Srwatson for p in `eval $output_verbose_link_cmd`; do 3929156283Srwatson case $p in 3930156283Srwatson 3931156283Srwatson -L* | -R* | -l*) 3932156283Srwatson # Some compilers place space between "-{L,R}" and the path. 3933156283Srwatson # Remove the space. 3934156283Srwatson if test $p = "-L" \ 3935156283Srwatson || test $p = "-R"; then 3936156283Srwatson prev=$p 3937156283Srwatson continue 3938156283Srwatson else 3939156283Srwatson prev= 3940156283Srwatson fi 3941156283Srwatson 3942156283Srwatson if test "$pre_test_object_deps_done" = no; then 3943156283Srwatson case $p in 3944156283Srwatson -L* | -R*) 3945156283Srwatson # Internal compiler library paths should come after those 3946156283Srwatson # provided the user. The postdeps already come after the 3947156283Srwatson # user supplied libs so there is no need to process them. 3948156283Srwatson if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then 3949156283Srwatson _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" 3950156283Srwatson else 3951156283Srwatson _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" 3952156283Srwatson fi 3953156283Srwatson ;; 3954156283Srwatson # The "-l" case would never come before the object being 3955156283Srwatson # linked, so don't bother handling this case. 3956156283Srwatson esac 3957156283Srwatson else 3958156283Srwatson if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then 3959156283Srwatson _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}" 3960156283Srwatson else 3961156283Srwatson _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}" 3962156283Srwatson fi 3963156283Srwatson fi 3964156283Srwatson ;; 3965156283Srwatson 3966156283Srwatson *.$objext) 3967156283Srwatson # This assumes that the test object file only shows up 3968156283Srwatson # once in the compiler output. 3969156283Srwatson if test "$p" = "conftest.$objext"; then 3970156283Srwatson pre_test_object_deps_done=yes 3971156283Srwatson continue 3972156283Srwatson fi 3973156283Srwatson 3974156283Srwatson if test "$pre_test_object_deps_done" = no; then 3975156283Srwatson if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then 3976156283Srwatson _LT_AC_TAGVAR(predep_objects, $1)="$p" 3977156283Srwatson else 3978156283Srwatson _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p" 3979156283Srwatson fi 3980156283Srwatson else 3981156283Srwatson if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then 3982156283Srwatson _LT_AC_TAGVAR(postdep_objects, $1)="$p" 3983156283Srwatson else 3984156283Srwatson _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p" 3985156283Srwatson fi 3986156283Srwatson fi 3987156283Srwatson ;; 3988156283Srwatson 3989156283Srwatson *) ;; # Ignore the rest. 3990156283Srwatson 3991156283Srwatson esac 3992156283Srwatson done 3993156283Srwatson 3994156283Srwatson # Clean up. 3995156283Srwatson rm -f a.out a.exe 3996156283Srwatsonelse 3997156283Srwatson echo "libtool.m4: error: problem compiling $1 test program" 3998156283Srwatsonfi 3999156283Srwatson 4000156283Srwatson$rm -f confest.$objext 4001156283Srwatson 4002191273Srwatson_LT_AC_TAGVAR(compiler_lib_search_dirs, $1)= 4003191273Srwatsonif test -n "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then 4004191273Srwatson _LT_AC_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_AC_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` 4005191273Srwatsonfi 4006191273Srwatson 4007156283Srwatson# PORTME: override above test on systems where it is broken 4008156283Srwatsonifelse([$1],[CXX], 4009156283Srwatson[case $host_os in 4010173143Srwatsoninterix[[3-9]]*) 4011173143Srwatson # Interix 3.5 installs completely hosed .la files for C++, so rather than 4012173143Srwatson # hack all around it, let's just trust "g++" to DTRT. 4013173143Srwatson _LT_AC_TAGVAR(predep_objects,$1)= 4014173143Srwatson _LT_AC_TAGVAR(postdep_objects,$1)= 4015173143Srwatson _LT_AC_TAGVAR(postdeps,$1)= 4016173143Srwatson ;; 4017173143Srwatson 4018173143Srwatsonlinux*) 4019173143Srwatson case `$CC -V 2>&1 | sed 5q` in 4020173143Srwatson *Sun\ C*) 4021173143Srwatson # Sun C++ 5.9 4022173143Srwatson # 4023173143Srwatson # The more standards-conforming stlport4 library is 4024173143Srwatson # incompatible with the Cstd library. Avoid specifying 4025173143Srwatson # it if it's in CXXFLAGS. Ignore libCrun as 4026173143Srwatson # -library=stlport4 depends on it. 4027173143Srwatson case " $CXX $CXXFLAGS " in 4028173143Srwatson *" -library=stlport4 "*) 4029173143Srwatson solaris_use_stlport4=yes 4030173143Srwatson ;; 4031173143Srwatson esac 4032173143Srwatson if test "$solaris_use_stlport4" != yes; then 4033173143Srwatson _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 4034173143Srwatson fi 4035173143Srwatson ;; 4036173143Srwatson esac 4037173143Srwatson ;; 4038173143Srwatson 4039156283Srwatsonsolaris*) 4040156283Srwatson case $cc_basename in 4041156283Srwatson CC*) 4042173143Srwatson # The more standards-conforming stlport4 library is 4043173143Srwatson # incompatible with the Cstd library. Avoid specifying 4044173143Srwatson # it if it's in CXXFLAGS. Ignore libCrun as 4045173143Srwatson # -library=stlport4 depends on it. 4046173143Srwatson case " $CXX $CXXFLAGS " in 4047173143Srwatson *" -library=stlport4 "*) 4048173143Srwatson solaris_use_stlport4=yes 4049173143Srwatson ;; 4050173143Srwatson esac 4051173143Srwatson 4052156283Srwatson # Adding this requires a known-good setup of shared libraries for 4053156283Srwatson # Sun compiler versions before 5.6, else PIC objects from an old 4054156283Srwatson # archive will be linked into the output, leading to subtle bugs. 4055173143Srwatson if test "$solaris_use_stlport4" != yes; then 4056173143Srwatson _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 4057173143Srwatson fi 4058156283Srwatson ;; 4059156283Srwatson esac 4060173143Srwatson ;; 4061156283Srwatsonesac 4062156283Srwatson]) 4063156283Srwatsoncase " $_LT_AC_TAGVAR(postdeps, $1) " in 4064156283Srwatson*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;; 4065156283Srwatsonesac 4066156283Srwatson])# AC_LIBTOOL_POSTDEP_PREDEP 4067156283Srwatson 4068156283Srwatson# AC_LIBTOOL_LANG_F77_CONFIG 4069173143Srwatson# -------------------------- 4070156283Srwatson# Ensure that the configuration vars for the C compiler are 4071156283Srwatson# suitably defined. Those variables are subsequently used by 4072156283Srwatson# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 4073156283SrwatsonAC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)]) 4074156283SrwatsonAC_DEFUN([_LT_AC_LANG_F77_CONFIG], 4075156283Srwatson[AC_REQUIRE([AC_PROG_F77]) 4076156283SrwatsonAC_LANG_PUSH(Fortran 77) 4077156283Srwatson 4078156283Srwatson_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 4079156283Srwatson_LT_AC_TAGVAR(allow_undefined_flag, $1)= 4080156283Srwatson_LT_AC_TAGVAR(always_export_symbols, $1)=no 4081156283Srwatson_LT_AC_TAGVAR(archive_expsym_cmds, $1)= 4082156283Srwatson_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= 4083156283Srwatson_LT_AC_TAGVAR(hardcode_direct, $1)=no 4084156283Srwatson_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= 4085156283Srwatson_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 4086156283Srwatson_LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 4087156283Srwatson_LT_AC_TAGVAR(hardcode_minus_L, $1)=no 4088156283Srwatson_LT_AC_TAGVAR(hardcode_automatic, $1)=no 4089156283Srwatson_LT_AC_TAGVAR(module_cmds, $1)= 4090156283Srwatson_LT_AC_TAGVAR(module_expsym_cmds, $1)= 4091156283Srwatson_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown 4092156283Srwatson_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 4093156283Srwatson_LT_AC_TAGVAR(no_undefined_flag, $1)= 4094156283Srwatson_LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 4095156283Srwatson_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no 4096156283Srwatson 4097156283Srwatson# Source file extension for f77 test sources. 4098156283Srwatsonac_ext=f 4099156283Srwatson 4100156283Srwatson# Object file extension for compiled f77 test sources. 4101156283Srwatsonobjext=o 4102156283Srwatson_LT_AC_TAGVAR(objext, $1)=$objext 4103156283Srwatson 4104156283Srwatson# Code to be used in simple compile tests 4105173143Srwatsonlt_simple_compile_test_code="\ 4106173143Srwatson subroutine t 4107173143Srwatson return 4108173143Srwatson end 4109173143Srwatson" 4110156283Srwatson 4111156283Srwatson# Code to be used in simple link tests 4112173143Srwatsonlt_simple_link_test_code="\ 4113173143Srwatson program t 4114173143Srwatson end 4115173143Srwatson" 4116156283Srwatson 4117156283Srwatson# ltmain only uses $CC for tagged configurations so make sure $CC is set. 4118156283Srwatson_LT_AC_SYS_COMPILER 4119156283Srwatson 4120156283Srwatson# save warnings/boilerplate of simple test code 4121156283Srwatson_LT_COMPILER_BOILERPLATE 4122156283Srwatson_LT_LINKER_BOILERPLATE 4123156283Srwatson 4124156283Srwatson# Allow CC to be a program name with arguments. 4125156283Srwatsonlt_save_CC="$CC" 4126156283SrwatsonCC=${F77-"f77"} 4127156283Srwatsoncompiler=$CC 4128156283Srwatson_LT_AC_TAGVAR(compiler, $1)=$CC 4129156283Srwatson_LT_CC_BASENAME([$compiler]) 4130156283Srwatson 4131156283SrwatsonAC_MSG_CHECKING([if libtool supports shared libraries]) 4132156283SrwatsonAC_MSG_RESULT([$can_build_shared]) 4133156283Srwatson 4134156283SrwatsonAC_MSG_CHECKING([whether to build shared libraries]) 4135156283Srwatsontest "$can_build_shared" = "no" && enable_shared=no 4136156283Srwatson 4137156283Srwatson# On AIX, shared libraries and static libraries use the same namespace, and 4138156283Srwatson# are all built from PIC. 4139156283Srwatsoncase $host_os in 4140156283Srwatsonaix3*) 4141156283Srwatson test "$enable_shared" = yes && enable_static=no 4142156283Srwatson if test -n "$RANLIB"; then 4143156283Srwatson archive_cmds="$archive_cmds~\$RANLIB \$lib" 4144156283Srwatson postinstall_cmds='$RANLIB $lib' 4145156283Srwatson fi 4146156283Srwatson ;; 4147191273Srwatsonaix[[4-9]]*) 4148156283Srwatson if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 4149156283Srwatson test "$enable_shared" = yes && enable_static=no 4150156283Srwatson fi 4151156283Srwatson ;; 4152156283Srwatsonesac 4153156283SrwatsonAC_MSG_RESULT([$enable_shared]) 4154156283Srwatson 4155156283SrwatsonAC_MSG_CHECKING([whether to build static libraries]) 4156156283Srwatson# Make sure either enable_shared or enable_static is yes. 4157156283Srwatsontest "$enable_shared" = yes || enable_static=yes 4158156283SrwatsonAC_MSG_RESULT([$enable_static]) 4159156283Srwatson 4160156283Srwatson_LT_AC_TAGVAR(GCC, $1)="$G77" 4161156283Srwatson_LT_AC_TAGVAR(LD, $1)="$LD" 4162156283Srwatson 4163156283SrwatsonAC_LIBTOOL_PROG_COMPILER_PIC($1) 4164156283SrwatsonAC_LIBTOOL_PROG_CC_C_O($1) 4165156283SrwatsonAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) 4166156283SrwatsonAC_LIBTOOL_PROG_LD_SHLIBS($1) 4167156283SrwatsonAC_LIBTOOL_SYS_DYNAMIC_LINKER($1) 4168156283SrwatsonAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) 4169156283Srwatson 4170156283SrwatsonAC_LIBTOOL_CONFIG($1) 4171156283Srwatson 4172156283SrwatsonAC_LANG_POP 4173156283SrwatsonCC="$lt_save_CC" 4174156283Srwatson])# AC_LIBTOOL_LANG_F77_CONFIG 4175156283Srwatson 4176156283Srwatson 4177156283Srwatson# AC_LIBTOOL_LANG_GCJ_CONFIG 4178156283Srwatson# -------------------------- 4179156283Srwatson# Ensure that the configuration vars for the C compiler are 4180156283Srwatson# suitably defined. Those variables are subsequently used by 4181156283Srwatson# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 4182156283SrwatsonAC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)]) 4183156283SrwatsonAC_DEFUN([_LT_AC_LANG_GCJ_CONFIG], 4184156283Srwatson[AC_LANG_SAVE 4185156283Srwatson 4186156283Srwatson# Source file extension for Java test sources. 4187156283Srwatsonac_ext=java 4188156283Srwatson 4189156283Srwatson# Object file extension for compiled Java test sources. 4190156283Srwatsonobjext=o 4191156283Srwatson_LT_AC_TAGVAR(objext, $1)=$objext 4192156283Srwatson 4193156283Srwatson# Code to be used in simple compile tests 4194173143Srwatsonlt_simple_compile_test_code="class foo {}" 4195156283Srwatson 4196156283Srwatson# Code to be used in simple link tests 4197173143Srwatsonlt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 4198156283Srwatson 4199156283Srwatson# ltmain only uses $CC for tagged configurations so make sure $CC is set. 4200156283Srwatson_LT_AC_SYS_COMPILER 4201156283Srwatson 4202156283Srwatson# save warnings/boilerplate of simple test code 4203156283Srwatson_LT_COMPILER_BOILERPLATE 4204156283Srwatson_LT_LINKER_BOILERPLATE 4205156283Srwatson 4206156283Srwatson# Allow CC to be a program name with arguments. 4207156283Srwatsonlt_save_CC="$CC" 4208156283SrwatsonCC=${GCJ-"gcj"} 4209156283Srwatsoncompiler=$CC 4210156283Srwatson_LT_AC_TAGVAR(compiler, $1)=$CC 4211156283Srwatson_LT_CC_BASENAME([$compiler]) 4212156283Srwatson 4213156283Srwatson# GCJ did not exist at the time GCC didn't implicitly link libc in. 4214156283Srwatson_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 4215156283Srwatson 4216156283Srwatson_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 4217156283Srwatson 4218156283SrwatsonAC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) 4219156283SrwatsonAC_LIBTOOL_PROG_COMPILER_PIC($1) 4220156283SrwatsonAC_LIBTOOL_PROG_CC_C_O($1) 4221156283SrwatsonAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) 4222156283SrwatsonAC_LIBTOOL_PROG_LD_SHLIBS($1) 4223156283SrwatsonAC_LIBTOOL_SYS_DYNAMIC_LINKER($1) 4224156283SrwatsonAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) 4225156283Srwatson 4226156283SrwatsonAC_LIBTOOL_CONFIG($1) 4227156283Srwatson 4228156283SrwatsonAC_LANG_RESTORE 4229156283SrwatsonCC="$lt_save_CC" 4230156283Srwatson])# AC_LIBTOOL_LANG_GCJ_CONFIG 4231156283Srwatson 4232156283Srwatson 4233156283Srwatson# AC_LIBTOOL_LANG_RC_CONFIG 4234173143Srwatson# ------------------------- 4235156283Srwatson# Ensure that the configuration vars for the Windows resource compiler are 4236156283Srwatson# suitably defined. Those variables are subsequently used by 4237156283Srwatson# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 4238156283SrwatsonAC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)]) 4239156283SrwatsonAC_DEFUN([_LT_AC_LANG_RC_CONFIG], 4240156283Srwatson[AC_LANG_SAVE 4241156283Srwatson 4242156283Srwatson# Source file extension for RC test sources. 4243156283Srwatsonac_ext=rc 4244156283Srwatson 4245156283Srwatson# Object file extension for compiled RC test sources. 4246156283Srwatsonobjext=o 4247156283Srwatson_LT_AC_TAGVAR(objext, $1)=$objext 4248156283Srwatson 4249156283Srwatson# Code to be used in simple compile tests 4250173143Srwatsonlt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 4251156283Srwatson 4252156283Srwatson# Code to be used in simple link tests 4253156283Srwatsonlt_simple_link_test_code="$lt_simple_compile_test_code" 4254156283Srwatson 4255156283Srwatson# ltmain only uses $CC for tagged configurations so make sure $CC is set. 4256156283Srwatson_LT_AC_SYS_COMPILER 4257156283Srwatson 4258156283Srwatson# save warnings/boilerplate of simple test code 4259156283Srwatson_LT_COMPILER_BOILERPLATE 4260156283Srwatson_LT_LINKER_BOILERPLATE 4261156283Srwatson 4262156283Srwatson# Allow CC to be a program name with arguments. 4263156283Srwatsonlt_save_CC="$CC" 4264156283SrwatsonCC=${RC-"windres"} 4265156283Srwatsoncompiler=$CC 4266156283Srwatson_LT_AC_TAGVAR(compiler, $1)=$CC 4267156283Srwatson_LT_CC_BASENAME([$compiler]) 4268156283Srwatson_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 4269156283Srwatson 4270156283SrwatsonAC_LIBTOOL_CONFIG($1) 4271156283Srwatson 4272156283SrwatsonAC_LANG_RESTORE 4273156283SrwatsonCC="$lt_save_CC" 4274156283Srwatson])# AC_LIBTOOL_LANG_RC_CONFIG 4275156283Srwatson 4276156283Srwatson 4277156283Srwatson# AC_LIBTOOL_CONFIG([TAGNAME]) 4278156283Srwatson# ---------------------------- 4279156283Srwatson# If TAGNAME is not passed, then create an initial libtool script 4280156283Srwatson# with a default configuration from the untagged config vars. Otherwise 4281156283Srwatson# add code to config.status for appending the configuration named by 4282156283Srwatson# TAGNAME from the matching tagged config vars. 4283156283SrwatsonAC_DEFUN([AC_LIBTOOL_CONFIG], 4284156283Srwatson[# The else clause should only fire when bootstrapping the 4285156283Srwatson# libtool distribution, otherwise you forgot to ship ltmain.sh 4286156283Srwatson# with your package, and you will get complaints that there are 4287156283Srwatson# no rules to generate ltmain.sh. 4288156283Srwatsonif test -f "$ltmain"; then 4289156283Srwatson # See if we are running on zsh, and set the options which allow our commands through 4290156283Srwatson # without removal of \ escapes. 4291156283Srwatson if test -n "${ZSH_VERSION+set}" ; then 4292156283Srwatson setopt NO_GLOB_SUBST 4293156283Srwatson fi 4294156283Srwatson # Now quote all the things that may contain metacharacters while being 4295156283Srwatson # careful not to overquote the AC_SUBSTed values. We take copies of the 4296156283Srwatson # variables and quote the copies for generation of the libtool script. 4297173143Srwatson for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ 4298156283Srwatson SED SHELL STRIP \ 4299156283Srwatson libname_spec library_names_spec soname_spec extract_expsyms_cmds \ 4300156283Srwatson old_striplib striplib file_magic_cmd finish_cmds finish_eval \ 4301156283Srwatson deplibs_check_method reload_flag reload_cmds need_locks \ 4302156283Srwatson lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ 4303156283Srwatson lt_cv_sys_global_symbol_to_c_name_address \ 4304156283Srwatson sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ 4305156283Srwatson old_postinstall_cmds old_postuninstall_cmds \ 4306156283Srwatson _LT_AC_TAGVAR(compiler, $1) \ 4307156283Srwatson _LT_AC_TAGVAR(CC, $1) \ 4308156283Srwatson _LT_AC_TAGVAR(LD, $1) \ 4309156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \ 4310156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \ 4311156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \ 4312156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \ 4313156283Srwatson _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \ 4314156283Srwatson _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \ 4315156283Srwatson _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \ 4316156283Srwatson _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \ 4317156283Srwatson _LT_AC_TAGVAR(old_archive_cmds, $1) \ 4318156283Srwatson _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \ 4319156283Srwatson _LT_AC_TAGVAR(predep_objects, $1) \ 4320156283Srwatson _LT_AC_TAGVAR(postdep_objects, $1) \ 4321156283Srwatson _LT_AC_TAGVAR(predeps, $1) \ 4322156283Srwatson _LT_AC_TAGVAR(postdeps, $1) \ 4323156283Srwatson _LT_AC_TAGVAR(compiler_lib_search_path, $1) \ 4324191273Srwatson _LT_AC_TAGVAR(compiler_lib_search_dirs, $1) \ 4325156283Srwatson _LT_AC_TAGVAR(archive_cmds, $1) \ 4326156283Srwatson _LT_AC_TAGVAR(archive_expsym_cmds, $1) \ 4327156283Srwatson _LT_AC_TAGVAR(postinstall_cmds, $1) \ 4328156283Srwatson _LT_AC_TAGVAR(postuninstall_cmds, $1) \ 4329156283Srwatson _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \ 4330156283Srwatson _LT_AC_TAGVAR(allow_undefined_flag, $1) \ 4331156283Srwatson _LT_AC_TAGVAR(no_undefined_flag, $1) \ 4332156283Srwatson _LT_AC_TAGVAR(export_symbols_cmds, $1) \ 4333156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \ 4334156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \ 4335156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \ 4336156283Srwatson _LT_AC_TAGVAR(hardcode_automatic, $1) \ 4337156283Srwatson _LT_AC_TAGVAR(module_cmds, $1) \ 4338156283Srwatson _LT_AC_TAGVAR(module_expsym_cmds, $1) \ 4339156283Srwatson _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \ 4340173143Srwatson _LT_AC_TAGVAR(fix_srcfile_path, $1) \ 4341156283Srwatson _LT_AC_TAGVAR(exclude_expsyms, $1) \ 4342156283Srwatson _LT_AC_TAGVAR(include_expsyms, $1); do 4343156283Srwatson 4344156283Srwatson case $var in 4345156283Srwatson _LT_AC_TAGVAR(old_archive_cmds, $1) | \ 4346156283Srwatson _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \ 4347156283Srwatson _LT_AC_TAGVAR(archive_cmds, $1) | \ 4348156283Srwatson _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \ 4349156283Srwatson _LT_AC_TAGVAR(module_cmds, $1) | \ 4350156283Srwatson _LT_AC_TAGVAR(module_expsym_cmds, $1) | \ 4351156283Srwatson _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \ 4352156283Srwatson _LT_AC_TAGVAR(export_symbols_cmds, $1) | \ 4353156283Srwatson extract_expsyms_cmds | reload_cmds | finish_cmds | \ 4354156283Srwatson postinstall_cmds | postuninstall_cmds | \ 4355156283Srwatson old_postinstall_cmds | old_postuninstall_cmds | \ 4356156283Srwatson sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) 4357156283Srwatson # Double-quote double-evaled strings. 4358156283Srwatson eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" 4359156283Srwatson ;; 4360156283Srwatson *) 4361156283Srwatson eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" 4362156283Srwatson ;; 4363156283Srwatson esac 4364156283Srwatson done 4365156283Srwatson 4366156283Srwatson case $lt_echo in 4367156283Srwatson *'\[$]0 --fallback-echo"') 4368156283Srwatson lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'` 4369156283Srwatson ;; 4370156283Srwatson esac 4371156283Srwatson 4372156283Srwatsonifelse([$1], [], 4373156283Srwatson [cfgfile="${ofile}T" 4374156283Srwatson trap "$rm \"$cfgfile\"; exit 1" 1 2 15 4375156283Srwatson $rm -f "$cfgfile" 4376156283Srwatson AC_MSG_NOTICE([creating $ofile])], 4377156283Srwatson [cfgfile="$ofile"]) 4378156283Srwatson 4379156283Srwatson cat <<__EOF__ >> "$cfgfile" 4380156283Srwatsonifelse([$1], [], 4381156283Srwatson[#! $SHELL 4382156283Srwatson 4383156283Srwatson# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. 4384156283Srwatson# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) 4385156283Srwatson# NOTE: Changes made to this file will be lost: look at ltmain.sh. 4386156283Srwatson# 4387191273Srwatson# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 4388156283Srwatson# Free Software Foundation, Inc. 4389156283Srwatson# 4390156283Srwatson# This file is part of GNU Libtool: 4391156283Srwatson# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 4392156283Srwatson# 4393156283Srwatson# This program is free software; you can redistribute it and/or modify 4394156283Srwatson# it under the terms of the GNU General Public License as published by 4395156283Srwatson# the Free Software Foundation; either version 2 of the License, or 4396156283Srwatson# (at your option) any later version. 4397156283Srwatson# 4398156283Srwatson# This program is distributed in the hope that it will be useful, but 4399156283Srwatson# WITHOUT ANY WARRANTY; without even the implied warranty of 4400156283Srwatson# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 4401156283Srwatson# General Public License for more details. 4402156283Srwatson# 4403156283Srwatson# You should have received a copy of the GNU General Public License 4404156283Srwatson# along with this program; if not, write to the Free Software 4405156283Srwatson# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 4406156283Srwatson# 4407156283Srwatson# As a special exception to the GNU General Public License, if you 4408156283Srwatson# distribute this file as part of a program that contains a 4409156283Srwatson# configuration script generated by Autoconf, you may include it under 4410156283Srwatson# the same distribution terms that you use for the rest of that program. 4411156283Srwatson 4412156283Srwatson# A sed program that does not truncate output. 4413156283SrwatsonSED=$lt_SED 4414156283Srwatson 4415156283Srwatson# Sed that helps us avoid accidentally triggering echo(1) options like -n. 4416156283SrwatsonXsed="$SED -e 1s/^X//" 4417156283Srwatson 4418156283Srwatson# The HP-UX ksh and POSIX shell print the target directory to stdout 4419156283Srwatson# if CDPATH is set. 4420156283Srwatson(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 4421156283Srwatson 4422156283Srwatson# The names of the tagged configurations supported by this script. 4423156283Srwatsonavailable_tags= 4424156283Srwatson 4425156283Srwatson# ### BEGIN LIBTOOL CONFIG], 4426156283Srwatson[# ### BEGIN LIBTOOL TAG CONFIG: $tagname]) 4427156283Srwatson 4428156283Srwatson# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 4429156283Srwatson 4430156283Srwatson# Shell to use when invoking shell scripts. 4431156283SrwatsonSHELL=$lt_SHELL 4432156283Srwatson 4433156283Srwatson# Whether or not to build shared libraries. 4434156283Srwatsonbuild_libtool_libs=$enable_shared 4435156283Srwatson 4436156283Srwatson# Whether or not to build static libraries. 4437156283Srwatsonbuild_old_libs=$enable_static 4438156283Srwatson 4439156283Srwatson# Whether or not to add -lc for building shared libraries. 4440156283Srwatsonbuild_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1) 4441156283Srwatson 4442156283Srwatson# Whether or not to disallow shared libs when runtime libs are static 4443156283Srwatsonallow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) 4444156283Srwatson 4445156283Srwatson# Whether or not to optimize for fast installation. 4446156283Srwatsonfast_install=$enable_fast_install 4447156283Srwatson 4448156283Srwatson# The host system. 4449156283Srwatsonhost_alias=$host_alias 4450156283Srwatsonhost=$host 4451156283Srwatsonhost_os=$host_os 4452156283Srwatson 4453156283Srwatson# The build system. 4454156283Srwatsonbuild_alias=$build_alias 4455156283Srwatsonbuild=$build 4456156283Srwatsonbuild_os=$build_os 4457156283Srwatson 4458156283Srwatson# An echo program that does not interpret backslashes. 4459156283Srwatsonecho=$lt_echo 4460156283Srwatson 4461156283Srwatson# The archiver. 4462156283SrwatsonAR=$lt_AR 4463156283SrwatsonAR_FLAGS=$lt_AR_FLAGS 4464156283Srwatson 4465156283Srwatson# A C compiler. 4466156283SrwatsonLTCC=$lt_LTCC 4467156283Srwatson 4468173143Srwatson# LTCC compiler flags. 4469173143SrwatsonLTCFLAGS=$lt_LTCFLAGS 4470173143Srwatson 4471156283Srwatson# A language-specific compiler. 4472156283SrwatsonCC=$lt_[]_LT_AC_TAGVAR(compiler, $1) 4473156283Srwatson 4474156283Srwatson# Is the compiler the GNU C compiler? 4475156283Srwatsonwith_gcc=$_LT_AC_TAGVAR(GCC, $1) 4476156283Srwatson 4477156283Srwatson# An ERE matcher. 4478156283SrwatsonEGREP=$lt_EGREP 4479156283Srwatson 4480156283Srwatson# The linker used to build libraries. 4481156283SrwatsonLD=$lt_[]_LT_AC_TAGVAR(LD, $1) 4482156283Srwatson 4483156283Srwatson# Whether we need hard or soft links. 4484156283SrwatsonLN_S=$lt_LN_S 4485156283Srwatson 4486156283Srwatson# A BSD-compatible nm program. 4487156283SrwatsonNM=$lt_NM 4488156283Srwatson 4489156283Srwatson# A symbol stripping program 4490156283SrwatsonSTRIP=$lt_STRIP 4491156283Srwatson 4492156283Srwatson# Used to examine libraries when file_magic_cmd begins "file" 4493156283SrwatsonMAGIC_CMD=$MAGIC_CMD 4494156283Srwatson 4495156283Srwatson# Used on cygwin: DLL creation program. 4496156283SrwatsonDLLTOOL="$DLLTOOL" 4497156283Srwatson 4498156283Srwatson# Used on cygwin: object dumper. 4499156283SrwatsonOBJDUMP="$OBJDUMP" 4500156283Srwatson 4501156283Srwatson# Used on cygwin: assembler. 4502156283SrwatsonAS="$AS" 4503156283Srwatson 4504156283Srwatson# The name of the directory that contains temporary libtool files. 4505156283Srwatsonobjdir=$objdir 4506156283Srwatson 4507156283Srwatson# How to create reloadable object files. 4508156283Srwatsonreload_flag=$lt_reload_flag 4509156283Srwatsonreload_cmds=$lt_reload_cmds 4510156283Srwatson 4511156283Srwatson# How to pass a linker flag through the compiler. 4512156283Srwatsonwl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) 4513156283Srwatson 4514156283Srwatson# Object file suffix (normally "o"). 4515156283Srwatsonobjext="$ac_objext" 4516156283Srwatson 4517156283Srwatson# Old archive suffix (normally "a"). 4518156283Srwatsonlibext="$libext" 4519156283Srwatson 4520156283Srwatson# Shared library suffix (normally ".so"). 4521156283Srwatsonshrext_cmds='$shrext_cmds' 4522156283Srwatson 4523156283Srwatson# Executable file suffix (normally ""). 4524156283Srwatsonexeext="$exeext" 4525156283Srwatson 4526156283Srwatson# Additional compiler flags for building library objects. 4527156283Srwatsonpic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) 4528156283Srwatsonpic_mode=$pic_mode 4529156283Srwatson 4530156283Srwatson# What is the maximum length of a command? 4531156283Srwatsonmax_cmd_len=$lt_cv_sys_max_cmd_len 4532156283Srwatson 4533156283Srwatson# Does compiler simultaneously support -c and -o options? 4534156283Srwatsoncompiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) 4535156283Srwatson 4536156283Srwatson# Must we lock files when doing compilation? 4537156283Srwatsonneed_locks=$lt_need_locks 4538156283Srwatson 4539156283Srwatson# Do we need the lib prefix for modules? 4540156283Srwatsonneed_lib_prefix=$need_lib_prefix 4541156283Srwatson 4542156283Srwatson# Do we need a version for libraries? 4543156283Srwatsonneed_version=$need_version 4544156283Srwatson 4545156283Srwatson# Whether dlopen is supported. 4546156283Srwatsondlopen_support=$enable_dlopen 4547156283Srwatson 4548156283Srwatson# Whether dlopen of programs is supported. 4549156283Srwatsondlopen_self=$enable_dlopen_self 4550156283Srwatson 4551156283Srwatson# Whether dlopen of statically linked programs is supported. 4552156283Srwatsondlopen_self_static=$enable_dlopen_self_static 4553156283Srwatson 4554156283Srwatson# Compiler flag to prevent dynamic linking. 4555156283Srwatsonlink_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1) 4556156283Srwatson 4557156283Srwatson# Compiler flag to turn off builtin functions. 4558156283Srwatsonno_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) 4559156283Srwatson 4560156283Srwatson# Compiler flag to allow reflexive dlopens. 4561156283Srwatsonexport_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1) 4562156283Srwatson 4563156283Srwatson# Compiler flag to generate shared objects directly from archives. 4564156283Srwatsonwhole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1) 4565156283Srwatson 4566156283Srwatson# Compiler flag to generate thread-safe objects. 4567156283Srwatsonthread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1) 4568156283Srwatson 4569156283Srwatson# Library versioning type. 4570156283Srwatsonversion_type=$version_type 4571156283Srwatson 4572156283Srwatson# Format of library name prefix. 4573156283Srwatsonlibname_spec=$lt_libname_spec 4574156283Srwatson 4575156283Srwatson# List of archive names. First name is the real one, the rest are links. 4576156283Srwatson# The last name is the one that the linker finds with -lNAME. 4577156283Srwatsonlibrary_names_spec=$lt_library_names_spec 4578156283Srwatson 4579156283Srwatson# The coded name of the library, if different from the real name. 4580156283Srwatsonsoname_spec=$lt_soname_spec 4581156283Srwatson 4582156283Srwatson# Commands used to build and install an old-style archive. 4583156283SrwatsonRANLIB=$lt_RANLIB 4584156283Srwatsonold_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1) 4585156283Srwatsonold_postinstall_cmds=$lt_old_postinstall_cmds 4586156283Srwatsonold_postuninstall_cmds=$lt_old_postuninstall_cmds 4587156283Srwatson 4588156283Srwatson# Create an old-style archive from a shared archive. 4589156283Srwatsonold_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1) 4590156283Srwatson 4591156283Srwatson# Create a temporary old-style archive to link instead of a shared archive. 4592156283Srwatsonold_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) 4593156283Srwatson 4594156283Srwatson# Commands used to build and install a shared archive. 4595156283Srwatsonarchive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1) 4596156283Srwatsonarchive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1) 4597156283Srwatsonpostinstall_cmds=$lt_postinstall_cmds 4598156283Srwatsonpostuninstall_cmds=$lt_postuninstall_cmds 4599156283Srwatson 4600156283Srwatson# Commands used to build a loadable module (assumed same as above if empty) 4601156283Srwatsonmodule_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1) 4602156283Srwatsonmodule_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1) 4603156283Srwatson 4604156283Srwatson# Commands to strip libraries. 4605156283Srwatsonold_striplib=$lt_old_striplib 4606156283Srwatsonstriplib=$lt_striplib 4607156283Srwatson 4608156283Srwatson# Dependencies to place before the objects being linked to create a 4609156283Srwatson# shared library. 4610156283Srwatsonpredep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1) 4611156283Srwatson 4612156283Srwatson# Dependencies to place after the objects being linked to create a 4613156283Srwatson# shared library. 4614156283Srwatsonpostdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1) 4615156283Srwatson 4616156283Srwatson# Dependencies to place before the objects being linked to create a 4617156283Srwatson# shared library. 4618156283Srwatsonpredeps=$lt_[]_LT_AC_TAGVAR(predeps, $1) 4619156283Srwatson 4620156283Srwatson# Dependencies to place after the objects being linked to create a 4621156283Srwatson# shared library. 4622156283Srwatsonpostdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1) 4623156283Srwatson 4624191273Srwatson# The directories searched by this compiler when creating a shared 4625191273Srwatson# library 4626191273Srwatsoncompiler_lib_search_dirs=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_dirs, $1) 4627191273Srwatson 4628156283Srwatson# The library search path used internally by the compiler when linking 4629156283Srwatson# a shared library. 4630156283Srwatsoncompiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1) 4631156283Srwatson 4632156283Srwatson# Method to check whether dependent libraries are shared objects. 4633156283Srwatsondeplibs_check_method=$lt_deplibs_check_method 4634156283Srwatson 4635156283Srwatson# Command to use when deplibs_check_method == file_magic. 4636156283Srwatsonfile_magic_cmd=$lt_file_magic_cmd 4637156283Srwatson 4638156283Srwatson# Flag that allows shared libraries with undefined symbols to be built. 4639156283Srwatsonallow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1) 4640156283Srwatson 4641156283Srwatson# Flag that forces no undefined symbols. 4642156283Srwatsonno_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1) 4643156283Srwatson 4644156283Srwatson# Commands used to finish a libtool library installation in a directory. 4645156283Srwatsonfinish_cmds=$lt_finish_cmds 4646156283Srwatson 4647156283Srwatson# Same as above, but a single script fragment to be evaled but not shown. 4648156283Srwatsonfinish_eval=$lt_finish_eval 4649156283Srwatson 4650156283Srwatson# Take the output of nm and produce a listing of raw symbols and C names. 4651156283Srwatsonglobal_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe 4652156283Srwatson 4653156283Srwatson# Transform the output of nm in a proper C declaration 4654156283Srwatsonglobal_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl 4655156283Srwatson 4656156283Srwatson# Transform the output of nm in a C name address pair 4657156283Srwatsonglobal_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address 4658156283Srwatson 4659156283Srwatson# This is the shared library runtime path variable. 4660156283Srwatsonrunpath_var=$runpath_var 4661156283Srwatson 4662156283Srwatson# This is the shared library path variable. 4663156283Srwatsonshlibpath_var=$shlibpath_var 4664156283Srwatson 4665156283Srwatson# Is shlibpath searched before the hard-coded library search path? 4666156283Srwatsonshlibpath_overrides_runpath=$shlibpath_overrides_runpath 4667156283Srwatson 4668156283Srwatson# How to hardcode a shared library path into an executable. 4669156283Srwatsonhardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1) 4670156283Srwatson 4671156283Srwatson# Whether we should hardcode library paths into libraries. 4672156283Srwatsonhardcode_into_libs=$hardcode_into_libs 4673156283Srwatson 4674156283Srwatson# Flag to hardcode \$libdir into a binary during linking. 4675156283Srwatson# This must work even if \$libdir does not exist. 4676156283Srwatsonhardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) 4677156283Srwatson 4678156283Srwatson# If ld is used when linking, flag to hardcode \$libdir into 4679156283Srwatson# a binary during linking. This must work even if \$libdir does 4680156283Srwatson# not exist. 4681156283Srwatsonhardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) 4682156283Srwatson 4683156283Srwatson# Whether we need a single -rpath flag with a separated argument. 4684156283Srwatsonhardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1) 4685156283Srwatson 4686156283Srwatson# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the 4687156283Srwatson# resulting binary. 4688156283Srwatsonhardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1) 4689156283Srwatson 4690156283Srwatson# Set to yes if using the -LDIR flag during linking hardcodes DIR into the 4691156283Srwatson# resulting binary. 4692156283Srwatsonhardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1) 4693156283Srwatson 4694156283Srwatson# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into 4695156283Srwatson# the resulting binary. 4696156283Srwatsonhardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1) 4697156283Srwatson 4698156283Srwatson# Set to yes if building a shared library automatically hardcodes DIR into the library 4699156283Srwatson# and all subsequent libraries and executables linked against it. 4700156283Srwatsonhardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1) 4701156283Srwatson 4702156283Srwatson# Variables whose values should be saved in libtool wrapper scripts and 4703156283Srwatson# restored at relink time. 4704156283Srwatsonvariables_saved_for_relink="$variables_saved_for_relink" 4705156283Srwatson 4706156283Srwatson# Whether libtool must link a program against all its dependency libraries. 4707156283Srwatsonlink_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1) 4708156283Srwatson 4709156283Srwatson# Compile-time system search path for libraries 4710156283Srwatsonsys_lib_search_path_spec=$lt_sys_lib_search_path_spec 4711156283Srwatson 4712156283Srwatson# Run-time system search path for libraries 4713156283Srwatsonsys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec 4714156283Srwatson 4715156283Srwatson# Fix the shell variable \$srcfile for the compiler. 4716173143Srwatsonfix_srcfile_path=$lt_fix_srcfile_path 4717156283Srwatson 4718156283Srwatson# Set to yes if exported symbols are required. 4719156283Srwatsonalways_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1) 4720156283Srwatson 4721156283Srwatson# The commands to list exported symbols. 4722156283Srwatsonexport_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1) 4723156283Srwatson 4724156283Srwatson# The commands to extract the exported symbol list from a shared archive. 4725156283Srwatsonextract_expsyms_cmds=$lt_extract_expsyms_cmds 4726156283Srwatson 4727156283Srwatson# Symbols that should not be listed in the preloaded symbols. 4728156283Srwatsonexclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1) 4729156283Srwatson 4730156283Srwatson# Symbols that must always be exported. 4731156283Srwatsoninclude_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1) 4732156283Srwatson 4733156283Srwatsonifelse([$1],[], 4734156283Srwatson[# ### END LIBTOOL CONFIG], 4735156283Srwatson[# ### END LIBTOOL TAG CONFIG: $tagname]) 4736156283Srwatson 4737156283Srwatson__EOF__ 4738156283Srwatson 4739156283Srwatsonifelse([$1],[], [ 4740156283Srwatson case $host_os in 4741156283Srwatson aix3*) 4742156283Srwatson cat <<\EOF >> "$cfgfile" 4743156283Srwatson 4744156283Srwatson# AIX sometimes has problems with the GCC collect2 program. For some 4745156283Srwatson# reason, if we set the COLLECT_NAMES environment variable, the problems 4746156283Srwatson# vanish in a puff of smoke. 4747156283Srwatsonif test "X${COLLECT_NAMES+set}" != Xset; then 4748156283Srwatson COLLECT_NAMES= 4749156283Srwatson export COLLECT_NAMES 4750156283Srwatsonfi 4751156283SrwatsonEOF 4752156283Srwatson ;; 4753156283Srwatson esac 4754156283Srwatson 4755156283Srwatson # We use sed instead of cat because bash on DJGPP gets confused if 4756156283Srwatson # if finds mixed CR/LF and LF-only lines. Since sed operates in 4757156283Srwatson # text mode, it properly converts lines to CR/LF. This bash problem 4758156283Srwatson # is reportedly fixed, but why not run on old versions too? 4759156283Srwatson sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1) 4760156283Srwatson 4761156283Srwatson mv -f "$cfgfile" "$ofile" || \ 4762156283Srwatson (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 4763156283Srwatson chmod +x "$ofile" 4764156283Srwatson]) 4765156283Srwatsonelse 4766156283Srwatson # If there is no Makefile yet, we rely on a make rule to execute 4767156283Srwatson # `config.status --recheck' to rerun these tests and create the 4768156283Srwatson # libtool script then. 4769156283Srwatson ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` 4770156283Srwatson if test -f "$ltmain_in"; then 4771156283Srwatson test -f Makefile && make "$ltmain" 4772156283Srwatson fi 4773156283Srwatsonfi 4774156283Srwatson])# AC_LIBTOOL_CONFIG 4775156283Srwatson 4776156283Srwatson 4777156283Srwatson# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME]) 4778156283Srwatson# ------------------------------------------- 4779156283SrwatsonAC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], 4780156283Srwatson[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl 4781156283Srwatson 4782156283Srwatson_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 4783156283Srwatson 4784156283Srwatsonif test "$GCC" = yes; then 4785156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 4786156283Srwatson 4787156283Srwatson AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 4788156283Srwatson lt_cv_prog_compiler_rtti_exceptions, 4789156283Srwatson [-fno-rtti -fno-exceptions], [], 4790156283Srwatson [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 4791156283Srwatsonfi 4792156283Srwatson])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI 4793156283Srwatson 4794156283Srwatson 4795156283Srwatson# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE 4796156283Srwatson# --------------------------------- 4797156283SrwatsonAC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], 4798156283Srwatson[AC_REQUIRE([AC_CANONICAL_HOST]) 4799173143SrwatsonAC_REQUIRE([LT_AC_PROG_SED]) 4800156283SrwatsonAC_REQUIRE([AC_PROG_NM]) 4801156283SrwatsonAC_REQUIRE([AC_OBJEXT]) 4802156283Srwatson# Check for command to grab the raw symbol name followed by C symbol from nm. 4803156283SrwatsonAC_MSG_CHECKING([command to parse $NM output from $compiler object]) 4804156283SrwatsonAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 4805156283Srwatson[ 4806156283Srwatson# These are sane defaults that work on at least a few old systems. 4807156283Srwatson# [They come from Ultrix. What could be older than Ultrix?!! ;)] 4808156283Srwatson 4809156283Srwatson# Character class describing NM global symbol codes. 4810156283Srwatsonsymcode='[[BCDEGRST]]' 4811156283Srwatson 4812156283Srwatson# Regexp to match symbols that can be accessed directly from C. 4813156283Srwatsonsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 4814156283Srwatson 4815156283Srwatson# Transform an extracted symbol line into a proper C declaration 4816156283Srwatsonlt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'" 4817156283Srwatson 4818156283Srwatson# Transform an extracted symbol line into symbol name and symbol address 4819156283Srwatsonlt_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'" 4820156283Srwatson 4821156283Srwatson# Define system-specific variables. 4822156283Srwatsoncase $host_os in 4823156283Srwatsonaix*) 4824156283Srwatson symcode='[[BCDT]]' 4825156283Srwatson ;; 4826156283Srwatsoncygwin* | mingw* | pw32*) 4827156283Srwatson symcode='[[ABCDGISTW]]' 4828156283Srwatson ;; 4829156283Srwatsonhpux*) # Its linker distinguishes data from code symbols 4830156283Srwatson if test "$host_cpu" = ia64; then 4831156283Srwatson symcode='[[ABCDEGRST]]' 4832156283Srwatson fi 4833156283Srwatson lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 4834156283Srwatson 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'" 4835156283Srwatson ;; 4836173143Srwatsonlinux* | k*bsd*-gnu) 4837156283Srwatson if test "$host_cpu" = ia64; then 4838156283Srwatson symcode='[[ABCDGIRSTW]]' 4839156283Srwatson lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 4840156283Srwatson 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'" 4841156283Srwatson fi 4842156283Srwatson ;; 4843156283Srwatsonirix* | nonstopux*) 4844156283Srwatson symcode='[[BCDEGRST]]' 4845156283Srwatson ;; 4846156283Srwatsonosf*) 4847156283Srwatson symcode='[[BCDEGQRST]]' 4848156283Srwatson ;; 4849173143Srwatsonsolaris*) 4850156283Srwatson symcode='[[BDRT]]' 4851156283Srwatson ;; 4852173143Srwatsonsco3.2v5*) 4853173143Srwatson symcode='[[DT]]' 4854173143Srwatson ;; 4855173143Srwatsonsysv4.2uw2*) 4856173143Srwatson symcode='[[DT]]' 4857173143Srwatson ;; 4858173143Srwatsonsysv5* | sco5v6* | unixware* | OpenUNIX*) 4859173143Srwatson symcode='[[ABDT]]' 4860173143Srwatson ;; 4861156283Srwatsonsysv4) 4862156283Srwatson symcode='[[DFNSTU]]' 4863156283Srwatson ;; 4864156283Srwatsonesac 4865156283Srwatson 4866156283Srwatson# Handle CRLF in mingw tool chain 4867156283Srwatsonopt_cr= 4868156283Srwatsoncase $build_os in 4869156283Srwatsonmingw*) 4870156283Srwatson opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp 4871156283Srwatson ;; 4872156283Srwatsonesac 4873156283Srwatson 4874156283Srwatson# If we're using GNU nm, then use its standard symbol codes. 4875156283Srwatsoncase `$NM -V 2>&1` in 4876156283Srwatson*GNU* | *'with BFD'*) 4877156283Srwatson symcode='[[ABCDGIRSTW]]' ;; 4878156283Srwatsonesac 4879156283Srwatson 4880156283Srwatson# Try without a prefix undercore, then with it. 4881156283Srwatsonfor ac_symprfx in "" "_"; do 4882156283Srwatson 4883156283Srwatson # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 4884156283Srwatson symxfrm="\\1 $ac_symprfx\\2 \\2" 4885156283Srwatson 4886156283Srwatson # Write the raw and C identifiers. 4887156283Srwatson lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 4888156283Srwatson 4889156283Srwatson # Check to see that the pipe works correctly. 4890156283Srwatson pipe_works=no 4891156283Srwatson 4892156283Srwatson rm -f conftest* 4893156283Srwatson cat > conftest.$ac_ext <<EOF 4894156283Srwatson#ifdef __cplusplus 4895156283Srwatsonextern "C" { 4896156283Srwatson#endif 4897156283Srwatsonchar nm_test_var; 4898156283Srwatsonvoid nm_test_func(){} 4899156283Srwatson#ifdef __cplusplus 4900156283Srwatson} 4901156283Srwatson#endif 4902156283Srwatsonint main(){nm_test_var='a';nm_test_func();return(0);} 4903156283SrwatsonEOF 4904156283Srwatson 4905156283Srwatson if AC_TRY_EVAL(ac_compile); then 4906156283Srwatson # Now try to grab the symbols. 4907156283Srwatson nlist=conftest.nm 4908156283Srwatson if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then 4909156283Srwatson # Try sorting and uniquifying the output. 4910156283Srwatson if sort "$nlist" | uniq > "$nlist"T; then 4911156283Srwatson mv -f "$nlist"T "$nlist" 4912156283Srwatson else 4913156283Srwatson rm -f "$nlist"T 4914156283Srwatson fi 4915156283Srwatson 4916156283Srwatson # Make sure that we snagged all the symbols we need. 4917156283Srwatson if grep ' nm_test_var$' "$nlist" >/dev/null; then 4918156283Srwatson if grep ' nm_test_func$' "$nlist" >/dev/null; then 4919156283Srwatson cat <<EOF > conftest.$ac_ext 4920156283Srwatson#ifdef __cplusplus 4921156283Srwatsonextern "C" { 4922156283Srwatson#endif 4923156283Srwatson 4924156283SrwatsonEOF 4925156283Srwatson # Now generate the symbol file. 4926156283Srwatson eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' 4927156283Srwatson 4928156283Srwatson cat <<EOF >> conftest.$ac_ext 4929156283Srwatson#if defined (__STDC__) && __STDC__ 4930156283Srwatson# define lt_ptr_t void * 4931156283Srwatson#else 4932156283Srwatson# define lt_ptr_t char * 4933156283Srwatson# define const 4934156283Srwatson#endif 4935156283Srwatson 4936156283Srwatson/* The mapping between symbol names and symbols. */ 4937156283Srwatsonconst struct { 4938156283Srwatson const char *name; 4939156283Srwatson lt_ptr_t address; 4940156283Srwatson} 4941156283Srwatsonlt_preloaded_symbols[[]] = 4942156283Srwatson{ 4943156283SrwatsonEOF 4944156283Srwatson $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext 4945156283Srwatson cat <<\EOF >> conftest.$ac_ext 4946156283Srwatson {0, (lt_ptr_t) 0} 4947156283Srwatson}; 4948156283Srwatson 4949156283Srwatson#ifdef __cplusplus 4950156283Srwatson} 4951156283Srwatson#endif 4952156283SrwatsonEOF 4953156283Srwatson # Now try linking the two files. 4954156283Srwatson mv conftest.$ac_objext conftstm.$ac_objext 4955156283Srwatson lt_save_LIBS="$LIBS" 4956156283Srwatson lt_save_CFLAGS="$CFLAGS" 4957156283Srwatson LIBS="conftstm.$ac_objext" 4958156283Srwatson CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 4959156283Srwatson if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then 4960156283Srwatson pipe_works=yes 4961156283Srwatson fi 4962156283Srwatson LIBS="$lt_save_LIBS" 4963156283Srwatson CFLAGS="$lt_save_CFLAGS" 4964156283Srwatson else 4965156283Srwatson echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 4966156283Srwatson fi 4967156283Srwatson else 4968156283Srwatson echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 4969156283Srwatson fi 4970156283Srwatson else 4971156283Srwatson echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 4972156283Srwatson fi 4973156283Srwatson else 4974156283Srwatson echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 4975156283Srwatson cat conftest.$ac_ext >&5 4976156283Srwatson fi 4977191273Srwatson rm -rf conftest* conftst* 4978156283Srwatson 4979156283Srwatson # Do not use the global_symbol_pipe unless it works. 4980156283Srwatson if test "$pipe_works" = yes; then 4981156283Srwatson break 4982156283Srwatson else 4983156283Srwatson lt_cv_sys_global_symbol_pipe= 4984156283Srwatson fi 4985156283Srwatsondone 4986156283Srwatson]) 4987156283Srwatsonif test -z "$lt_cv_sys_global_symbol_pipe"; then 4988156283Srwatson lt_cv_sys_global_symbol_to_cdecl= 4989156283Srwatsonfi 4990156283Srwatsonif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 4991156283Srwatson AC_MSG_RESULT(failed) 4992156283Srwatsonelse 4993156283Srwatson AC_MSG_RESULT(ok) 4994156283Srwatsonfi 4995156283Srwatson]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE 4996156283Srwatson 4997156283Srwatson 4998156283Srwatson# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME]) 4999156283Srwatson# --------------------------------------- 5000156283SrwatsonAC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC], 5001156283Srwatson[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)= 5002156283Srwatson_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 5003156283Srwatson_LT_AC_TAGVAR(lt_prog_compiler_static, $1)= 5004156283Srwatson 5005156283SrwatsonAC_MSG_CHECKING([for $compiler option to produce PIC]) 5006156283Srwatson ifelse([$1],[CXX],[ 5007156283Srwatson # C++ specific cases for pic, static, wl, etc. 5008156283Srwatson if test "$GXX" = yes; then 5009156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5010156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' 5011156283Srwatson 5012156283Srwatson case $host_os in 5013156283Srwatson aix*) 5014156283Srwatson # All AIX code is PIC. 5015156283Srwatson if test "$host_cpu" = ia64; then 5016156283Srwatson # AIX 5 now supports IA64 processor 5017156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5018156283Srwatson fi 5019156283Srwatson ;; 5020156283Srwatson amigaos*) 5021156283Srwatson # FIXME: we need at least 68020 code to build shared libraries, but 5022156283Srwatson # adding the `-m68020' flag to GCC prevents building anything better, 5023156283Srwatson # like `-m68040'. 5024156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 5025156283Srwatson ;; 5026173143Srwatson beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 5027156283Srwatson # PIC is the default for these OSes. 5028156283Srwatson ;; 5029173143Srwatson mingw* | cygwin* | os2* | pw32*) 5030156283Srwatson # This hack is so that the source file can tell whether it is being 5031156283Srwatson # built for inclusion in a dll (and should export symbols for example). 5032173143Srwatson # Although the cygwin gcc ignores -fPIC, still need this for old-style 5033173143Srwatson # (--disable-auto-import) libraries 5034191273Srwatson m4_if([$1], [GCJ], [], 5035191273Srwatson [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 5036156283Srwatson ;; 5037156283Srwatson darwin* | rhapsody*) 5038156283Srwatson # PIC is the default on this platform 5039156283Srwatson # Common symbols not allowed in MH_DYLIB files 5040156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 5041156283Srwatson ;; 5042156283Srwatson *djgpp*) 5043156283Srwatson # DJGPP does not support shared libraries at all 5044156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 5045156283Srwatson ;; 5046173143Srwatson interix[[3-9]]*) 5047173143Srwatson # Interix 3.x gcc -fpic/-fPIC options generate broken code. 5048173143Srwatson # Instead, we relocate shared libraries at runtime. 5049173143Srwatson ;; 5050156283Srwatson sysv4*MP*) 5051156283Srwatson if test -d /usr/nec; then 5052156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 5053156283Srwatson fi 5054156283Srwatson ;; 5055156283Srwatson hpux*) 5056156283Srwatson # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 5057156283Srwatson # not for PA HP-UX. 5058156283Srwatson case $host_cpu in 5059156283Srwatson hppa*64*|ia64*) 5060156283Srwatson ;; 5061156283Srwatson *) 5062156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5063156283Srwatson ;; 5064156283Srwatson esac 5065156283Srwatson ;; 5066156283Srwatson *) 5067156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5068156283Srwatson ;; 5069156283Srwatson esac 5070156283Srwatson else 5071156283Srwatson case $host_os in 5072191273Srwatson aix[[4-9]]*) 5073156283Srwatson # All AIX code is PIC. 5074156283Srwatson if test "$host_cpu" = ia64; then 5075156283Srwatson # AIX 5 now supports IA64 processor 5076156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5077156283Srwatson else 5078156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 5079156283Srwatson fi 5080156283Srwatson ;; 5081156283Srwatson chorus*) 5082156283Srwatson case $cc_basename in 5083156283Srwatson cxch68*) 5084156283Srwatson # Green Hills C++ Compiler 5085156283Srwatson # _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" 5086156283Srwatson ;; 5087156283Srwatson esac 5088156283Srwatson ;; 5089156283Srwatson darwin*) 5090156283Srwatson # PIC is the default on this platform 5091156283Srwatson # Common symbols not allowed in MH_DYLIB files 5092156283Srwatson case $cc_basename in 5093156283Srwatson xlc*) 5094156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' 5095156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5096156283Srwatson ;; 5097156283Srwatson esac 5098156283Srwatson ;; 5099156283Srwatson dgux*) 5100156283Srwatson case $cc_basename in 5101156283Srwatson ec++*) 5102156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5103156283Srwatson ;; 5104156283Srwatson ghcx*) 5105156283Srwatson # Green Hills C++ Compiler 5106156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 5107156283Srwatson ;; 5108156283Srwatson *) 5109156283Srwatson ;; 5110156283Srwatson esac 5111156283Srwatson ;; 5112173143Srwatson freebsd* | dragonfly*) 5113156283Srwatson # FreeBSD uses GNU C++ 5114156283Srwatson ;; 5115156283Srwatson hpux9* | hpux10* | hpux11*) 5116156283Srwatson case $cc_basename in 5117156283Srwatson CC*) 5118156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5119173143Srwatson _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 5120156283Srwatson if test "$host_cpu" != ia64; then 5121156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 5122156283Srwatson fi 5123156283Srwatson ;; 5124156283Srwatson aCC*) 5125156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5126173143Srwatson _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 5127156283Srwatson case $host_cpu in 5128156283Srwatson hppa*64*|ia64*) 5129156283Srwatson # +Z the default 5130156283Srwatson ;; 5131156283Srwatson *) 5132156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 5133156283Srwatson ;; 5134156283Srwatson esac 5135156283Srwatson ;; 5136156283Srwatson *) 5137156283Srwatson ;; 5138156283Srwatson esac 5139156283Srwatson ;; 5140173143Srwatson interix*) 5141173143Srwatson # This is c89, which is MS Visual C++ (no shared libs) 5142173143Srwatson # Anyone wants to do a port? 5143173143Srwatson ;; 5144156283Srwatson irix5* | irix6* | nonstopux*) 5145156283Srwatson case $cc_basename in 5146156283Srwatson CC*) 5147156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5148156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5149156283Srwatson # CC pic flag -KPIC is the default. 5150156283Srwatson ;; 5151156283Srwatson *) 5152156283Srwatson ;; 5153156283Srwatson esac 5154156283Srwatson ;; 5155173143Srwatson linux* | k*bsd*-gnu) 5156156283Srwatson case $cc_basename in 5157156283Srwatson KCC*) 5158156283Srwatson # KAI C++ Compiler 5159156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 5160156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5161156283Srwatson ;; 5162156283Srwatson icpc* | ecpc*) 5163156283Srwatson # Intel C++ 5164156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5165156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5166156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' 5167156283Srwatson ;; 5168191273Srwatson pgCC* | pgcpp*) 5169156283Srwatson # Portland Group C++ compiler. 5170156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5171156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 5172156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5173156283Srwatson ;; 5174156283Srwatson cxx*) 5175156283Srwatson # Compaq C++ 5176156283Srwatson # Make sure the PIC flag is empty. It appears that all Alpha 5177156283Srwatson # Linux and Compaq Tru64 Unix objects are PIC. 5178156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 5179156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5180156283Srwatson ;; 5181156283Srwatson *) 5182173143Srwatson case `$CC -V 2>&1 | sed 5q` in 5183173143Srwatson *Sun\ C*) 5184173143Srwatson # Sun C++ 5.9 5185173143Srwatson _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5186173143Srwatson _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5187173143Srwatson _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 5188173143Srwatson ;; 5189173143Srwatson esac 5190156283Srwatson ;; 5191156283Srwatson esac 5192156283Srwatson ;; 5193156283Srwatson lynxos*) 5194156283Srwatson ;; 5195156283Srwatson m88k*) 5196156283Srwatson ;; 5197156283Srwatson mvs*) 5198156283Srwatson case $cc_basename in 5199156283Srwatson cxx*) 5200156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 5201156283Srwatson ;; 5202156283Srwatson *) 5203156283Srwatson ;; 5204156283Srwatson esac 5205156283Srwatson ;; 5206156283Srwatson netbsd*) 5207156283Srwatson ;; 5208156283Srwatson osf3* | osf4* | osf5*) 5209156283Srwatson case $cc_basename in 5210156283Srwatson KCC*) 5211156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 5212156283Srwatson ;; 5213156283Srwatson RCC*) 5214156283Srwatson # Rational C++ 2.4.1 5215156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 5216156283Srwatson ;; 5217156283Srwatson cxx*) 5218156283Srwatson # Digital/Compaq C++ 5219156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5220156283Srwatson # Make sure the PIC flag is empty. It appears that all Alpha 5221156283Srwatson # Linux and Compaq Tru64 Unix objects are PIC. 5222156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 5223156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5224156283Srwatson ;; 5225156283Srwatson *) 5226156283Srwatson ;; 5227156283Srwatson esac 5228156283Srwatson ;; 5229156283Srwatson psos*) 5230156283Srwatson ;; 5231156283Srwatson solaris*) 5232156283Srwatson case $cc_basename in 5233156283Srwatson CC*) 5234156283Srwatson # Sun C++ 4.2, 5.x and Centerline C++ 5235156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5236156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5237156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 5238156283Srwatson ;; 5239156283Srwatson gcx*) 5240156283Srwatson # Green Hills C++ Compiler 5241156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 5242156283Srwatson ;; 5243156283Srwatson *) 5244156283Srwatson ;; 5245156283Srwatson esac 5246156283Srwatson ;; 5247156283Srwatson sunos4*) 5248156283Srwatson case $cc_basename in 5249156283Srwatson CC*) 5250156283Srwatson # Sun C++ 4.x 5251156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 5252156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5253156283Srwatson ;; 5254156283Srwatson lcc*) 5255156283Srwatson # Lucid 5256156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 5257156283Srwatson ;; 5258156283Srwatson *) 5259156283Srwatson ;; 5260156283Srwatson esac 5261156283Srwatson ;; 5262156283Srwatson tandem*) 5263156283Srwatson case $cc_basename in 5264156283Srwatson NCC*) 5265156283Srwatson # NonStop-UX NCC 3.20 5266156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5267156283Srwatson ;; 5268156283Srwatson *) 5269156283Srwatson ;; 5270156283Srwatson esac 5271156283Srwatson ;; 5272173143Srwatson sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 5273173143Srwatson case $cc_basename in 5274173143Srwatson CC*) 5275173143Srwatson _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5276173143Srwatson _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5277173143Srwatson _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5278173143Srwatson ;; 5279173143Srwatson esac 5280156283Srwatson ;; 5281156283Srwatson vxworks*) 5282156283Srwatson ;; 5283156283Srwatson *) 5284156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 5285156283Srwatson ;; 5286156283Srwatson esac 5287156283Srwatson fi 5288156283Srwatson], 5289156283Srwatson[ 5290156283Srwatson if test "$GCC" = yes; then 5291156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5292156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' 5293156283Srwatson 5294156283Srwatson case $host_os in 5295156283Srwatson aix*) 5296156283Srwatson # All AIX code is PIC. 5297156283Srwatson if test "$host_cpu" = ia64; then 5298156283Srwatson # AIX 5 now supports IA64 processor 5299156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5300156283Srwatson fi 5301156283Srwatson ;; 5302156283Srwatson 5303156283Srwatson amigaos*) 5304156283Srwatson # FIXME: we need at least 68020 code to build shared libraries, but 5305156283Srwatson # adding the `-m68020' flag to GCC prevents building anything better, 5306156283Srwatson # like `-m68040'. 5307156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 5308156283Srwatson ;; 5309156283Srwatson 5310173143Srwatson beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 5311156283Srwatson # PIC is the default for these OSes. 5312156283Srwatson ;; 5313156283Srwatson 5314173143Srwatson mingw* | cygwin* | pw32* | os2*) 5315156283Srwatson # This hack is so that the source file can tell whether it is being 5316156283Srwatson # built for inclusion in a dll (and should export symbols for example). 5317173143Srwatson # Although the cygwin gcc ignores -fPIC, still need this for old-style 5318173143Srwatson # (--disable-auto-import) libraries 5319191273Srwatson m4_if([$1], [GCJ], [], 5320191273Srwatson [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 5321156283Srwatson ;; 5322156283Srwatson 5323156283Srwatson darwin* | rhapsody*) 5324156283Srwatson # PIC is the default on this platform 5325156283Srwatson # Common symbols not allowed in MH_DYLIB files 5326156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 5327156283Srwatson ;; 5328156283Srwatson 5329173143Srwatson interix[[3-9]]*) 5330173143Srwatson # Interix 3.x gcc -fpic/-fPIC options generate broken code. 5331173143Srwatson # Instead, we relocate shared libraries at runtime. 5332173143Srwatson ;; 5333173143Srwatson 5334156283Srwatson msdosdjgpp*) 5335156283Srwatson # Just because we use GCC doesn't mean we suddenly get shared libraries 5336156283Srwatson # on systems that don't support them. 5337156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 5338156283Srwatson enable_shared=no 5339156283Srwatson ;; 5340156283Srwatson 5341156283Srwatson sysv4*MP*) 5342156283Srwatson if test -d /usr/nec; then 5343156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 5344156283Srwatson fi 5345156283Srwatson ;; 5346156283Srwatson 5347156283Srwatson hpux*) 5348156283Srwatson # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 5349156283Srwatson # not for PA HP-UX. 5350156283Srwatson case $host_cpu in 5351156283Srwatson hppa*64*|ia64*) 5352156283Srwatson # +Z the default 5353156283Srwatson ;; 5354156283Srwatson *) 5355156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5356156283Srwatson ;; 5357156283Srwatson esac 5358156283Srwatson ;; 5359156283Srwatson 5360156283Srwatson *) 5361156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5362156283Srwatson ;; 5363156283Srwatson esac 5364156283Srwatson else 5365156283Srwatson # PORTME Check for flag to pass linker flags through the system compiler. 5366156283Srwatson case $host_os in 5367156283Srwatson aix*) 5368156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5369156283Srwatson if test "$host_cpu" = ia64; then 5370156283Srwatson # AIX 5 now supports IA64 processor 5371156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5372156283Srwatson else 5373156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 5374156283Srwatson fi 5375156283Srwatson ;; 5376156283Srwatson darwin*) 5377156283Srwatson # PIC is the default on this platform 5378156283Srwatson # Common symbols not allowed in MH_DYLIB files 5379156283Srwatson case $cc_basename in 5380156283Srwatson xlc*) 5381156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' 5382156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5383156283Srwatson ;; 5384156283Srwatson esac 5385156283Srwatson ;; 5386156283Srwatson 5387173143Srwatson mingw* | cygwin* | pw32* | os2*) 5388156283Srwatson # This hack is so that the source file can tell whether it is being 5389156283Srwatson # built for inclusion in a dll (and should export symbols for example). 5390191273Srwatson m4_if([$1], [GCJ], [], 5391191273Srwatson [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 5392156283Srwatson ;; 5393156283Srwatson 5394156283Srwatson hpux9* | hpux10* | hpux11*) 5395156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5396156283Srwatson # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 5397156283Srwatson # not for PA HP-UX. 5398156283Srwatson case $host_cpu in 5399156283Srwatson hppa*64*|ia64*) 5400156283Srwatson # +Z the default 5401156283Srwatson ;; 5402156283Srwatson *) 5403156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 5404156283Srwatson ;; 5405156283Srwatson esac 5406156283Srwatson # Is there a better lt_prog_compiler_static that works with the bundled CC? 5407156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 5408156283Srwatson ;; 5409156283Srwatson 5410156283Srwatson irix5* | irix6* | nonstopux*) 5411156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5412156283Srwatson # PIC (with -KPIC) is the default. 5413156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5414156283Srwatson ;; 5415156283Srwatson 5416156283Srwatson newsos6) 5417156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5418156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5419156283Srwatson ;; 5420156283Srwatson 5421173143Srwatson linux* | k*bsd*-gnu) 5422156283Srwatson case $cc_basename in 5423156283Srwatson icc* | ecc*) 5424156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5425156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5426156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' 5427156283Srwatson ;; 5428156283Srwatson pgcc* | pgf77* | pgf90* | pgf95*) 5429156283Srwatson # Portland Group compilers (*not* the Pentium gcc compiler, 5430156283Srwatson # which looks to be a dead project) 5431156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5432156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 5433156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5434156283Srwatson ;; 5435156283Srwatson ccc*) 5436156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5437156283Srwatson # All Alpha code is PIC. 5438156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5439156283Srwatson ;; 5440173143Srwatson *) 5441173143Srwatson case `$CC -V 2>&1 | sed 5q` in 5442173143Srwatson *Sun\ C*) 5443173143Srwatson # Sun C 5.9 5444173143Srwatson _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5445173143Srwatson _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5446173143Srwatson _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5447173143Srwatson ;; 5448173143Srwatson *Sun\ F*) 5449173143Srwatson # Sun Fortran 8.3 passes all unrecognized flags to the linker 5450173143Srwatson _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5451173143Srwatson _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5452173143Srwatson _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='' 5453173143Srwatson ;; 5454173143Srwatson esac 5455173143Srwatson ;; 5456156283Srwatson esac 5457156283Srwatson ;; 5458156283Srwatson 5459156283Srwatson osf3* | osf4* | osf5*) 5460156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5461156283Srwatson # All OSF/1 code is PIC. 5462156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5463156283Srwatson ;; 5464156283Srwatson 5465173143Srwatson rdos*) 5466173143Srwatson _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5467156283Srwatson ;; 5468156283Srwatson 5469156283Srwatson solaris*) 5470156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5471156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5472156283Srwatson case $cc_basename in 5473156283Srwatson f77* | f90* | f95*) 5474156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 5475156283Srwatson *) 5476156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 5477156283Srwatson esac 5478156283Srwatson ;; 5479156283Srwatson 5480156283Srwatson sunos4*) 5481156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 5482156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 5483156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5484156283Srwatson ;; 5485156283Srwatson 5486173143Srwatson sysv4 | sysv4.2uw2* | sysv4.3*) 5487156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5488156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5489156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5490156283Srwatson ;; 5491156283Srwatson 5492156283Srwatson sysv4*MP*) 5493156283Srwatson if test -d /usr/nec ;then 5494156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 5495156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5496156283Srwatson fi 5497156283Srwatson ;; 5498156283Srwatson 5499173143Srwatson sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 5500173143Srwatson _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5501173143Srwatson _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5502173143Srwatson _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5503173143Srwatson ;; 5504173143Srwatson 5505156283Srwatson unicos*) 5506156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5507156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 5508156283Srwatson ;; 5509156283Srwatson 5510156283Srwatson uts4*) 5511156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 5512156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5513156283Srwatson ;; 5514156283Srwatson 5515156283Srwatson *) 5516156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 5517156283Srwatson ;; 5518156283Srwatson esac 5519156283Srwatson fi 5520156283Srwatson]) 5521156283SrwatsonAC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)]) 5522156283Srwatson 5523156283Srwatson# 5524156283Srwatson# Check to make sure the PIC flag actually works. 5525156283Srwatson# 5526156283Srwatsonif test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then 5527156283Srwatson AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works], 5528191273Srwatson _LT_AC_TAGVAR(lt_cv_prog_compiler_pic_works, $1), 5529156283Srwatson [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [], 5530156283Srwatson [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in 5531156283Srwatson "" | " "*) ;; 5532156283Srwatson *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;; 5533156283Srwatson esac], 5534156283Srwatson [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 5535156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 5536156283Srwatsonfi 5537156283Srwatsoncase $host_os in 5538156283Srwatson # For platforms which do not support PIC, -DPIC is meaningless: 5539156283Srwatson *djgpp*) 5540156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 5541156283Srwatson ;; 5542156283Srwatson *) 5543156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])" 5544156283Srwatson ;; 5545156283Srwatsonesac 5546173143Srwatson 5547173143Srwatson# 5548173143Srwatson# Check to make sure the static flag actually works. 5549173143Srwatson# 5550173143Srwatsonwl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\" 5551173143SrwatsonAC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 5552191273Srwatson _LT_AC_TAGVAR(lt_cv_prog_compiler_static_works, $1), 5553173143Srwatson $lt_tmp_static_flag, 5554173143Srwatson [], 5555173143Srwatson [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=]) 5556156283Srwatson]) 5557156283Srwatson 5558156283Srwatson 5559156283Srwatson# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME]) 5560156283Srwatson# ------------------------------------ 5561156283Srwatson# See if the linker supports building shared libraries. 5562156283SrwatsonAC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS], 5563173143Srwatson[AC_REQUIRE([LT_AC_PROG_SED])dnl 5564173143SrwatsonAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 5565156283Srwatsonifelse([$1],[CXX],[ 5566156283Srwatson _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 5567156283Srwatson case $host_os in 5568191273Srwatson aix[[4-9]]*) 5569156283Srwatson # If we're using GNU nm, then we don't want the "-C" option. 5570156283Srwatson # -C means demangle to AIX nm, but means don't demangle with GNU nm 5571156283Srwatson if $NM -V 2>&1 | grep 'GNU' > /dev/null; then 5572156283Srwatson _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' 5573156283Srwatson else 5574156283Srwatson _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' 5575156283Srwatson fi 5576156283Srwatson ;; 5577156283Srwatson pw32*) 5578156283Srwatson _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" 5579156283Srwatson ;; 5580156283Srwatson cygwin* | mingw*) 5581173143Srwatson _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' 5582156283Srwatson ;; 5583156283Srwatson *) 5584156283Srwatson _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 5585156283Srwatson ;; 5586156283Srwatson esac 5587191273Srwatson _LT_AC_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 5588156283Srwatson],[ 5589156283Srwatson runpath_var= 5590156283Srwatson _LT_AC_TAGVAR(allow_undefined_flag, $1)= 5591156283Srwatson _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no 5592156283Srwatson _LT_AC_TAGVAR(archive_cmds, $1)= 5593156283Srwatson _LT_AC_TAGVAR(archive_expsym_cmds, $1)= 5594156283Srwatson _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)= 5595156283Srwatson _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)= 5596156283Srwatson _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= 5597156283Srwatson _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 5598156283Srwatson _LT_AC_TAGVAR(thread_safe_flag_spec, $1)= 5599156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= 5600156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 5601156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 5602156283Srwatson _LT_AC_TAGVAR(hardcode_direct, $1)=no 5603156283Srwatson _LT_AC_TAGVAR(hardcode_minus_L, $1)=no 5604156283Srwatson _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 5605156283Srwatson _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown 5606156283Srwatson _LT_AC_TAGVAR(hardcode_automatic, $1)=no 5607156283Srwatson _LT_AC_TAGVAR(module_cmds, $1)= 5608156283Srwatson _LT_AC_TAGVAR(module_expsym_cmds, $1)= 5609156283Srwatson _LT_AC_TAGVAR(always_export_symbols, $1)=no 5610156283Srwatson _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 5611156283Srwatson # include_expsyms should be a list of space-separated symbols to be *always* 5612156283Srwatson # included in the symbol list 5613156283Srwatson _LT_AC_TAGVAR(include_expsyms, $1)= 5614156283Srwatson # exclude_expsyms can be an extended regexp of symbols to exclude 5615156283Srwatson # it will be wrapped by ` (' and `)$', so one must not match beginning or 5616156283Srwatson # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', 5617156283Srwatson # as well as any symbol that contains `d'. 5618191273Srwatson _LT_AC_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 5619156283Srwatson # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 5620156283Srwatson # platforms (ab)use it in PIC code, but their linkers get confused if 5621156283Srwatson # the symbol is explicitly referenced. Since portable code cannot 5622156283Srwatson # rely on this symbol name, it's probably fine to never include it in 5623156283Srwatson # preloaded symbol tables. 5624191273Srwatson # Exclude shared library initialization/finalization symbols. 5625191273Srwatsondnl Note also adjust exclude_expsyms for C++ above. 5626156283Srwatson extract_expsyms_cmds= 5627156283Srwatson # Just being paranoid about ensuring that cc_basename is set. 5628156283Srwatson _LT_CC_BASENAME([$compiler]) 5629156283Srwatson case $host_os in 5630156283Srwatson cygwin* | mingw* | pw32*) 5631156283Srwatson # FIXME: the MSVC++ port hasn't been tested in a loooong time 5632156283Srwatson # When not using gcc, we currently assume that we are using 5633156283Srwatson # Microsoft Visual C++. 5634156283Srwatson if test "$GCC" != yes; then 5635156283Srwatson with_gnu_ld=no 5636156283Srwatson fi 5637156283Srwatson ;; 5638173143Srwatson interix*) 5639173143Srwatson # we just hope/assume this is gcc and not c89 (= MSVC++) 5640173143Srwatson with_gnu_ld=yes 5641173143Srwatson ;; 5642156283Srwatson openbsd*) 5643156283Srwatson with_gnu_ld=no 5644156283Srwatson ;; 5645156283Srwatson esac 5646156283Srwatson 5647156283Srwatson _LT_AC_TAGVAR(ld_shlibs, $1)=yes 5648156283Srwatson if test "$with_gnu_ld" = yes; then 5649156283Srwatson # If archive_cmds runs LD, not CC, wlarc should be empty 5650156283Srwatson wlarc='${wl}' 5651156283Srwatson 5652156283Srwatson # Set some defaults for GNU ld with shared library support. These 5653156283Srwatson # are reset later if shared libraries are not supported. Putting them 5654156283Srwatson # here allows them to be overridden if necessary. 5655156283Srwatson runpath_var=LD_RUN_PATH 5656156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 5657156283Srwatson _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 5658156283Srwatson # ancient GNU ld didn't support --whole-archive et. al. 5659156283Srwatson if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then 5660156283Srwatson _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 5661156283Srwatson else 5662156283Srwatson _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 5663156283Srwatson fi 5664156283Srwatson supports_anon_versioning=no 5665156283Srwatson case `$LD -v 2>/dev/null` in 5666156283Srwatson *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 5667156283Srwatson *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 5668156283Srwatson *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 5669156283Srwatson *\ 2.11.*) ;; # other 2.11 versions 5670156283Srwatson *) supports_anon_versioning=yes ;; 5671156283Srwatson esac 5672156283Srwatson 5673156283Srwatson # See if GNU ld supports shared libraries. 5674156283Srwatson case $host_os in 5675191273Srwatson aix[[3-9]]*) 5676156283Srwatson # On AIX/PPC, the GNU linker is very broken 5677156283Srwatson if test "$host_cpu" != ia64; then 5678156283Srwatson _LT_AC_TAGVAR(ld_shlibs, $1)=no 5679156283Srwatson cat <<EOF 1>&2 5680156283Srwatson 5681156283Srwatson*** Warning: the GNU linker, at least up to release 2.9.1, is reported 5682156283Srwatson*** to be unable to reliably create shared libraries on AIX. 5683156283Srwatson*** Therefore, libtool is disabling shared libraries support. If you 5684156283Srwatson*** really care for shared libraries, you may want to modify your PATH 5685156283Srwatson*** so that a non-GNU linker is found, and then restart. 5686156283Srwatson 5687156283SrwatsonEOF 5688156283Srwatson fi 5689156283Srwatson ;; 5690156283Srwatson 5691156283Srwatson amigaos*) 5692156283Srwatson _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)' 5693156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5694156283Srwatson _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 5695156283Srwatson 5696156283Srwatson # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports 5697156283Srwatson # that the semantics of dynamic libraries on AmigaOS, at least up 5698156283Srwatson # to version 4, is to share data among multiple programs linked 5699156283Srwatson # with the same dynamic library. Since this doesn't match the 5700156283Srwatson # behavior of shared libraries on other platforms, we can't use 5701156283Srwatson # them. 5702156283Srwatson _LT_AC_TAGVAR(ld_shlibs, $1)=no 5703156283Srwatson ;; 5704156283Srwatson 5705156283Srwatson beos*) 5706156283Srwatson if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 5707156283Srwatson _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 5708156283Srwatson # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 5709156283Srwatson # support --undefined. This deserves some investigation. FIXME 5710156283Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5711156283Srwatson else 5712156283Srwatson _LT_AC_TAGVAR(ld_shlibs, $1)=no 5713156283Srwatson fi 5714156283Srwatson ;; 5715156283Srwatson 5716156283Srwatson cygwin* | mingw* | pw32*) 5717156283Srwatson # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 5718156283Srwatson # as there is no search path for DLLs. 5719156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5720156283Srwatson _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 5721156283Srwatson _LT_AC_TAGVAR(always_export_symbols, $1)=no 5722156283Srwatson _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5723173143Srwatson _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' 5724156283Srwatson 5725156283Srwatson if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then 5726173143Srwatson _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' 5727156283Srwatson # If the export-symbols file already is a .def file (1st line 5728156283Srwatson # is EXPORTS), use it as is; otherwise, prepend... 5729156283Srwatson _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 5730156283Srwatson cp $export_symbols $output_objdir/$soname.def; 5731156283Srwatson else 5732156283Srwatson echo EXPORTS > $output_objdir/$soname.def; 5733156283Srwatson cat $export_symbols >> $output_objdir/$soname.def; 5734156283Srwatson fi~ 5735173143Srwatson $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 5736156283Srwatson else 5737156283Srwatson _LT_AC_TAGVAR(ld_shlibs, $1)=no 5738156283Srwatson fi 5739156283Srwatson ;; 5740156283Srwatson 5741173143Srwatson interix[[3-9]]*) 5742173143Srwatson _LT_AC_TAGVAR(hardcode_direct, $1)=no 5743173143Srwatson _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 5744173143Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 5745173143Srwatson _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 5746173143Srwatson # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 5747173143Srwatson # Instead, shared libraries are loaded at an image base (0x10000000 by 5748173143Srwatson # default) and relocated if they conflict, which is a slow very memory 5749173143Srwatson # consuming and fragmenting process. To avoid this, we pick a random, 5750173143Srwatson # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 5751173143Srwatson # time. Moving up from 0x10000000 also allows more sbrk(2) space. 5752173143Srwatson _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' 5753173143Srwatson _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' 5754173143Srwatson ;; 5755173143Srwatson 5756173143Srwatson gnu* | linux* | k*bsd*-gnu) 5757156283Srwatson if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 5758156283Srwatson tmp_addflag= 5759156283Srwatson case $cc_basename,$host_cpu in 5760156283Srwatson pgcc*) # Portland Group C compiler 5761156283Srwatson _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' 5762156283Srwatson tmp_addflag=' $pic_flag' 5763156283Srwatson ;; 5764156283Srwatson pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers 5765156283Srwatson _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' 5766156283Srwatson tmp_addflag=' $pic_flag -Mnomain' ;; 5767156283Srwatson ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 5768156283Srwatson tmp_addflag=' -i_dynamic' ;; 5769156283Srwatson efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 5770156283Srwatson tmp_addflag=' -i_dynamic -nofor_main' ;; 5771156283Srwatson ifc* | ifort*) # Intel Fortran compiler 5772156283Srwatson tmp_addflag=' -nofor_main' ;; 5773156283Srwatson esac 5774173143Srwatson case `$CC -V 2>&1 | sed 5q` in 5775173143Srwatson *Sun\ C*) # Sun C 5.9 5776173143Srwatson _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' 5777173143Srwatson tmp_sharedflag='-G' ;; 5778173143Srwatson *Sun\ F*) # Sun Fortran 8.3 5779173143Srwatson tmp_sharedflag='-G' ;; 5780173143Srwatson *) 5781173143Srwatson tmp_sharedflag='-shared' ;; 5782173143Srwatson esac 5783173143Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5784156283Srwatson 5785156283Srwatson if test $supports_anon_versioning = yes; then 5786156283Srwatson _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~ 5787156283Srwatson cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 5788156283Srwatson $echo "local: *; };" >> $output_objdir/$libname.ver~ 5789173143Srwatson $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 5790156283Srwatson fi 5791156283Srwatson else 5792156283Srwatson _LT_AC_TAGVAR(ld_shlibs, $1)=no 5793156283Srwatson fi 5794156283Srwatson ;; 5795156283Srwatson 5796156283Srwatson netbsd*) 5797156283Srwatson if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then 5798156283Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 5799156283Srwatson wlarc= 5800156283Srwatson else 5801156283Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5802156283Srwatson _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' 5803156283Srwatson fi 5804156283Srwatson ;; 5805156283Srwatson 5806173143Srwatson solaris*) 5807156283Srwatson if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then 5808156283Srwatson _LT_AC_TAGVAR(ld_shlibs, $1)=no 5809156283Srwatson cat <<EOF 1>&2 5810156283Srwatson 5811156283Srwatson*** Warning: The releases 2.8.* of the GNU linker cannot reliably 5812156283Srwatson*** create shared libraries on Solaris systems. Therefore, libtool 5813156283Srwatson*** is disabling shared libraries support. We urge you to upgrade GNU 5814156283Srwatson*** binutils to release 2.9.1 or newer. Another option is to modify 5815156283Srwatson*** your PATH or compiler configuration so that the native linker is 5816156283Srwatson*** used, and then restart. 5817156283Srwatson 5818156283SrwatsonEOF 5819156283Srwatson elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 5820156283Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5821156283Srwatson _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' 5822156283Srwatson else 5823156283Srwatson _LT_AC_TAGVAR(ld_shlibs, $1)=no 5824156283Srwatson fi 5825156283Srwatson ;; 5826156283Srwatson 5827173143Srwatson sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 5828173143Srwatson case `$LD -v 2>&1` in 5829173143Srwatson *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 5830173143Srwatson _LT_AC_TAGVAR(ld_shlibs, $1)=no 5831173143Srwatson cat <<_LT_EOF 1>&2 5832173143Srwatson 5833173143Srwatson*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not 5834173143Srwatson*** reliably create shared libraries on SCO systems. Therefore, libtool 5835173143Srwatson*** is disabling shared libraries support. We urge you to upgrade GNU 5836173143Srwatson*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 5837173143Srwatson*** your PATH or compiler configuration so that the native linker is 5838173143Srwatson*** used, and then restart. 5839173143Srwatson 5840173143Srwatson_LT_EOF 5841173143Srwatson ;; 5842173143Srwatson *) 5843173143Srwatson if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 5844173143Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' 5845173143Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' 5846173143Srwatson _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' 5847173143Srwatson else 5848173143Srwatson _LT_AC_TAGVAR(ld_shlibs, $1)=no 5849173143Srwatson fi 5850173143Srwatson ;; 5851173143Srwatson esac 5852173143Srwatson ;; 5853173143Srwatson 5854156283Srwatson sunos4*) 5855156283Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 5856156283Srwatson wlarc= 5857156283Srwatson _LT_AC_TAGVAR(hardcode_direct, $1)=yes 5858156283Srwatson _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 5859156283Srwatson ;; 5860156283Srwatson 5861156283Srwatson *) 5862156283Srwatson if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 5863156283Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5864156283Srwatson _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' 5865156283Srwatson else 5866156283Srwatson _LT_AC_TAGVAR(ld_shlibs, $1)=no 5867156283Srwatson fi 5868156283Srwatson ;; 5869156283Srwatson esac 5870156283Srwatson 5871156283Srwatson if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then 5872156283Srwatson runpath_var= 5873156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= 5874156283Srwatson _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= 5875156283Srwatson _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 5876156283Srwatson fi 5877156283Srwatson else 5878156283Srwatson # PORTME fill in a description of your system's linker (not GNU ld) 5879156283Srwatson case $host_os in 5880156283Srwatson aix3*) 5881156283Srwatson _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 5882156283Srwatson _LT_AC_TAGVAR(always_export_symbols, $1)=yes 5883156283Srwatson _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' 5884156283Srwatson # Note: this linker hardcodes the directories in LIBPATH if there 5885156283Srwatson # are no directories specified by -L. 5886156283Srwatson _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 5887173143Srwatson if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then 5888156283Srwatson # Neither direct hardcoding nor static linking is supported with a 5889156283Srwatson # broken collect2. 5890156283Srwatson _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported 5891156283Srwatson fi 5892156283Srwatson ;; 5893156283Srwatson 5894191273Srwatson aix[[4-9]]*) 5895156283Srwatson if test "$host_cpu" = ia64; then 5896156283Srwatson # On IA64, the linker does run time linking by default, so we don't 5897156283Srwatson # have to do anything special. 5898156283Srwatson aix_use_runtimelinking=no 5899156283Srwatson exp_sym_flag='-Bexport' 5900156283Srwatson no_entry_flag="" 5901156283Srwatson else 5902156283Srwatson # If we're using GNU nm, then we don't want the "-C" option. 5903156283Srwatson # -C means demangle to AIX nm, but means don't demangle with GNU nm 5904156283Srwatson if $NM -V 2>&1 | grep 'GNU' > /dev/null; then 5905156283Srwatson _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' 5906156283Srwatson else 5907156283Srwatson _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' 5908156283Srwatson fi 5909156283Srwatson aix_use_runtimelinking=no 5910156283Srwatson 5911156283Srwatson # Test if we are trying to use run time linking or normal 5912156283Srwatson # AIX style linking. If -brtl is somewhere in LDFLAGS, we 5913156283Srwatson # need to do runtime linking. 5914191273Srwatson case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 5915156283Srwatson for ld_flag in $LDFLAGS; do 5916156283Srwatson if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then 5917156283Srwatson aix_use_runtimelinking=yes 5918156283Srwatson break 5919156283Srwatson fi 5920156283Srwatson done 5921173143Srwatson ;; 5922156283Srwatson esac 5923156283Srwatson 5924156283Srwatson exp_sym_flag='-bexport' 5925156283Srwatson no_entry_flag='-bnoentry' 5926156283Srwatson fi 5927156283Srwatson 5928156283Srwatson # When large executables or shared objects are built, AIX ld can 5929156283Srwatson # have problems creating the table of contents. If linking a library 5930156283Srwatson # or program results in "error TOC overflow" add -mminimal-toc to 5931156283Srwatson # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 5932156283Srwatson # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 5933156283Srwatson 5934156283Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='' 5935156283Srwatson _LT_AC_TAGVAR(hardcode_direct, $1)=yes 5936156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' 5937156283Srwatson _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 5938156283Srwatson 5939156283Srwatson if test "$GCC" = yes; then 5940156283Srwatson case $host_os in aix4.[[012]]|aix4.[[012]].*) 5941156283Srwatson # We only want to do this on AIX 4.2 and lower, the check 5942156283Srwatson # below for broken collect2 doesn't work under 4.3+ 5943156283Srwatson collect2name=`${CC} -print-prog-name=collect2` 5944156283Srwatson if test -f "$collect2name" && \ 5945156283Srwatson strings "$collect2name" | grep resolve_lib_name >/dev/null 5946156283Srwatson then 5947156283Srwatson # We have reworked collect2 5948173143Srwatson : 5949156283Srwatson else 5950156283Srwatson # We have old collect2 5951156283Srwatson _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported 5952156283Srwatson # It fails to find uninstalled libraries when the uninstalled 5953156283Srwatson # path is not listed in the libpath. Setting hardcode_minus_L 5954156283Srwatson # to unsupported forces relinking 5955156283Srwatson _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 5956156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5957156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 5958156283Srwatson fi 5959173143Srwatson ;; 5960156283Srwatson esac 5961156283Srwatson shared_flag='-shared' 5962156283Srwatson if test "$aix_use_runtimelinking" = yes; then 5963156283Srwatson shared_flag="$shared_flag "'${wl}-G' 5964156283Srwatson fi 5965156283Srwatson else 5966156283Srwatson # not using gcc 5967156283Srwatson if test "$host_cpu" = ia64; then 5968156283Srwatson # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 5969156283Srwatson # chokes on -Wl,-G. The following line is correct: 5970156283Srwatson shared_flag='-G' 5971156283Srwatson else 5972173143Srwatson if test "$aix_use_runtimelinking" = yes; then 5973156283Srwatson shared_flag='${wl}-G' 5974156283Srwatson else 5975156283Srwatson shared_flag='${wl}-bM:SRE' 5976173143Srwatson fi 5977156283Srwatson fi 5978156283Srwatson fi 5979156283Srwatson 5980156283Srwatson # It seems that -bexpall does not export symbols beginning with 5981156283Srwatson # underscore (_), so it is better to generate a list of symbols to export. 5982156283Srwatson _LT_AC_TAGVAR(always_export_symbols, $1)=yes 5983156283Srwatson if test "$aix_use_runtimelinking" = yes; then 5984156283Srwatson # Warning - without using the other runtime loading flags (-brtl), 5985156283Srwatson # -berok will link without error, but may produce a broken library. 5986156283Srwatson _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' 5987156283Srwatson # Determine the default libpath from the value encoded in an empty executable. 5988156283Srwatson _LT_AC_SYS_LIBPATH_AIX 5989156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 5990173143Srwatson _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" 5991156283Srwatson else 5992156283Srwatson if test "$host_cpu" = ia64; then 5993156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 5994156283Srwatson _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 5995173143Srwatson _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" 5996156283Srwatson else 5997156283Srwatson # Determine the default libpath from the value encoded in an empty executable. 5998156283Srwatson _LT_AC_SYS_LIBPATH_AIX 5999156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 6000156283Srwatson # Warning - without using the other run time loading flags, 6001156283Srwatson # -berok will link without error, but may produce a broken library. 6002156283Srwatson _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 6003156283Srwatson _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 6004156283Srwatson # Exported symbols can be pulled into shared objects from archives 6005173143Srwatson _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 6006156283Srwatson _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes 6007156283Srwatson # This is similar to how AIX traditionally builds its shared libraries. 6008173143Srwatson _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' 6009156283Srwatson fi 6010156283Srwatson fi 6011156283Srwatson ;; 6012156283Srwatson 6013156283Srwatson amigaos*) 6014156283Srwatson _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)' 6015156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6016156283Srwatson _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 6017156283Srwatson # see comment about different semantics on the GNU ld section 6018156283Srwatson _LT_AC_TAGVAR(ld_shlibs, $1)=no 6019156283Srwatson ;; 6020156283Srwatson 6021156283Srwatson bsdi[[45]]*) 6022156283Srwatson _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 6023156283Srwatson ;; 6024156283Srwatson 6025156283Srwatson cygwin* | mingw* | pw32*) 6026156283Srwatson # When not using gcc, we currently assume that we are using 6027156283Srwatson # Microsoft Visual C++. 6028156283Srwatson # hardcode_libdir_flag_spec is actually meaningless, as there is 6029156283Srwatson # no search path for DLLs. 6030156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 6031156283Srwatson _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 6032156283Srwatson # Tell ltmain to make .lib files, not .a files. 6033156283Srwatson libext=lib 6034156283Srwatson # Tell ltmain to make .dll files, not .so files. 6035156283Srwatson shrext_cmds=".dll" 6036156283Srwatson # FIXME: Setting linknames here is a bad hack. 6037156283Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' 6038156283Srwatson # The linker will automatically build a .lib file if we build a DLL. 6039156283Srwatson _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true' 6040156283Srwatson # FIXME: Should let the user specify the lib program. 6041173143Srwatson _LT_AC_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 6042156283Srwatson _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' 6043156283Srwatson _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6044156283Srwatson ;; 6045156283Srwatson 6046156283Srwatson darwin* | rhapsody*) 6047156283Srwatson case $host_os in 6048156283Srwatson rhapsody* | darwin1.[[012]]) 6049156283Srwatson _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' 6050156283Srwatson ;; 6051156283Srwatson *) # Darwin 1.3 on 6052156283Srwatson if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then 6053156283Srwatson _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' 6054156283Srwatson else 6055156283Srwatson case ${MACOSX_DEPLOYMENT_TARGET} in 6056156283Srwatson 10.[[012]]) 6057156283Srwatson _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' 6058156283Srwatson ;; 6059156283Srwatson 10.*) 6060156283Srwatson _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup' 6061156283Srwatson ;; 6062156283Srwatson esac 6063156283Srwatson fi 6064156283Srwatson ;; 6065156283Srwatson esac 6066156283Srwatson _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 6067156283Srwatson _LT_AC_TAGVAR(hardcode_direct, $1)=no 6068156283Srwatson _LT_AC_TAGVAR(hardcode_automatic, $1)=yes 6069156283Srwatson _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 6070156283Srwatson _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' 6071156283Srwatson _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 6072156283Srwatson if test "$GCC" = yes ; then 6073156283Srwatson output_verbose_link_cmd='echo' 6074191273Srwatson _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}" 6075191273Srwatson _LT_AC_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" 6076191273Srwatson _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}" 6077191273Srwatson _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}" 6078156283Srwatson else 6079156283Srwatson case $cc_basename in 6080156283Srwatson xlc*) 6081156283Srwatson output_verbose_link_cmd='echo' 6082173143Srwatson _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' 6083156283Srwatson _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' 6084156283Srwatson # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds 6085173143Srwatson _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}' 6086156283Srwatson _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}' 6087156283Srwatson ;; 6088156283Srwatson *) 6089156283Srwatson _LT_AC_TAGVAR(ld_shlibs, $1)=no 6090156283Srwatson ;; 6091156283Srwatson esac 6092156283Srwatson fi 6093156283Srwatson ;; 6094156283Srwatson 6095156283Srwatson dgux*) 6096156283Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6097156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6098156283Srwatson _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6099156283Srwatson ;; 6100156283Srwatson 6101156283Srwatson freebsd1*) 6102156283Srwatson _LT_AC_TAGVAR(ld_shlibs, $1)=no 6103156283Srwatson ;; 6104156283Srwatson 6105156283Srwatson # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 6106156283Srwatson # support. Future versions do this automatically, but an explicit c++rt0.o 6107156283Srwatson # does not break anything, and helps significantly (at the cost of a little 6108156283Srwatson # extra space). 6109156283Srwatson freebsd2.2*) 6110156283Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 6111156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6112156283Srwatson _LT_AC_TAGVAR(hardcode_direct, $1)=yes 6113156283Srwatson _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6114156283Srwatson ;; 6115156283Srwatson 6116156283Srwatson # Unfortunately, older versions of FreeBSD 2 do not have this feature. 6117156283Srwatson freebsd2*) 6118156283Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 6119156283Srwatson _LT_AC_TAGVAR(hardcode_direct, $1)=yes 6120156283Srwatson _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 6121156283Srwatson _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6122156283Srwatson ;; 6123156283Srwatson 6124156283Srwatson # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 6125173143Srwatson freebsd* | dragonfly*) 6126156283Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' 6127156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6128156283Srwatson _LT_AC_TAGVAR(hardcode_direct, $1)=yes 6129156283Srwatson _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6130156283Srwatson ;; 6131156283Srwatson 6132156283Srwatson hpux9*) 6133156283Srwatson if test "$GCC" = yes; then 6134156283Srwatson _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' 6135156283Srwatson else 6136156283Srwatson _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' 6137156283Srwatson fi 6138156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 6139156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 6140156283Srwatson _LT_AC_TAGVAR(hardcode_direct, $1)=yes 6141156283Srwatson 6142156283Srwatson # hardcode_minus_L: Not really in the search PATH, 6143156283Srwatson # but as the default location of the library. 6144156283Srwatson _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 6145156283Srwatson _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6146156283Srwatson ;; 6147156283Srwatson 6148173143Srwatson hpux10*) 6149156283Srwatson if test "$GCC" = yes -a "$with_gnu_ld" = no; then 6150173143Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 6151173143Srwatson else 6152173143Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 6153173143Srwatson fi 6154173143Srwatson if test "$with_gnu_ld" = no; then 6155173143Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 6156173143Srwatson _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 6157173143Srwatson 6158173143Srwatson _LT_AC_TAGVAR(hardcode_direct, $1)=yes 6159173143Srwatson _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6160173143Srwatson 6161173143Srwatson # hardcode_minus_L: Not really in the search PATH, 6162173143Srwatson # but as the default location of the library. 6163173143Srwatson _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 6164173143Srwatson fi 6165173143Srwatson ;; 6166173143Srwatson 6167173143Srwatson hpux11*) 6168173143Srwatson if test "$GCC" = yes -a "$with_gnu_ld" = no; then 6169156283Srwatson case $host_cpu in 6170173143Srwatson hppa*64*) 6171156283Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 6172156283Srwatson ;; 6173173143Srwatson ia64*) 6174173143Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 6175173143Srwatson ;; 6176156283Srwatson *) 6177156283Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 6178156283Srwatson ;; 6179156283Srwatson esac 6180156283Srwatson else 6181156283Srwatson case $host_cpu in 6182173143Srwatson hppa*64*) 6183173143Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 6184156283Srwatson ;; 6185173143Srwatson ia64*) 6186173143Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 6187173143Srwatson ;; 6188156283Srwatson *) 6189173143Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 6190156283Srwatson ;; 6191156283Srwatson esac 6192156283Srwatson fi 6193156283Srwatson if test "$with_gnu_ld" = no; then 6194173143Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 6195173143Srwatson _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 6196173143Srwatson 6197156283Srwatson case $host_cpu in 6198173143Srwatson hppa*64*|ia64*) 6199156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' 6200156283Srwatson _LT_AC_TAGVAR(hardcode_direct, $1)=no 6201156283Srwatson _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6202156283Srwatson ;; 6203156283Srwatson *) 6204156283Srwatson _LT_AC_TAGVAR(hardcode_direct, $1)=yes 6205156283Srwatson _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6206156283Srwatson 6207156283Srwatson # hardcode_minus_L: Not really in the search PATH, 6208156283Srwatson # but as the default location of the library. 6209156283Srwatson _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 6210156283Srwatson ;; 6211156283Srwatson esac 6212156283Srwatson fi 6213156283Srwatson ;; 6214156283Srwatson 6215156283Srwatson irix5* | irix6* | nonstopux*) 6216156283Srwatson if test "$GCC" = yes; then 6217156283Srwatson _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' 6218156283Srwatson else 6219156283Srwatson _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' 6220156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' 6221156283Srwatson fi 6222156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6223156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 6224156283Srwatson _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 6225156283Srwatson ;; 6226156283Srwatson 6227156283Srwatson netbsd*) 6228156283Srwatson if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then 6229156283Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 6230156283Srwatson else 6231156283Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 6232156283Srwatson fi 6233156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6234156283Srwatson _LT_AC_TAGVAR(hardcode_direct, $1)=yes 6235156283Srwatson _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6236156283Srwatson ;; 6237156283Srwatson 6238156283Srwatson newsos6) 6239156283Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6240156283Srwatson _LT_AC_TAGVAR(hardcode_direct, $1)=yes 6241156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6242156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 6243156283Srwatson _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6244156283Srwatson ;; 6245156283Srwatson 6246156283Srwatson openbsd*) 6247173143Srwatson if test -f /usr/libexec/ld.so; then 6248173143Srwatson _LT_AC_TAGVAR(hardcode_direct, $1)=yes 6249173143Srwatson _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6250173143Srwatson if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 6251173143Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 6252173143Srwatson _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' 6253173143Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 6254173143Srwatson _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6255173143Srwatson else 6256173143Srwatson case $host_os in 6257173143Srwatson openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) 6258173143Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 6259173143Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6260173143Srwatson ;; 6261173143Srwatson *) 6262173143Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 6263173143Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 6264173143Srwatson ;; 6265173143Srwatson esac 6266173143Srwatson fi 6267156283Srwatson else 6268173143Srwatson _LT_AC_TAGVAR(ld_shlibs, $1)=no 6269156283Srwatson fi 6270156283Srwatson ;; 6271156283Srwatson 6272156283Srwatson os2*) 6273156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6274156283Srwatson _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 6275156283Srwatson _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 6276156283Srwatson _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' 6277156283Srwatson _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' 6278156283Srwatson ;; 6279156283Srwatson 6280156283Srwatson osf3*) 6281156283Srwatson if test "$GCC" = yes; then 6282156283Srwatson _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 6283156283Srwatson _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' 6284156283Srwatson else 6285156283Srwatson _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 6286156283Srwatson _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' 6287156283Srwatson fi 6288156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6289156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 6290156283Srwatson ;; 6291156283Srwatson 6292156283Srwatson osf4* | osf5*) # as osf3* with the addition of -msym flag 6293156283Srwatson if test "$GCC" = yes; then 6294156283Srwatson _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 6295156283Srwatson _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' 6296156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6297156283Srwatson else 6298156283Srwatson _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 6299156283Srwatson _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' 6300156283Srwatson _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~ 6301156283Srwatson $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' 6302156283Srwatson 6303156283Srwatson # Both c and cxx compiler support -rpath directly 6304156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 6305156283Srwatson fi 6306156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 6307156283Srwatson ;; 6308156283Srwatson 6309156283Srwatson solaris*) 6310156283Srwatson _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text' 6311156283Srwatson if test "$GCC" = yes; then 6312156283Srwatson wlarc='${wl}' 6313156283Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 6314156283Srwatson _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 6315156283Srwatson $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' 6316156283Srwatson else 6317156283Srwatson wlarc='' 6318156283Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' 6319156283Srwatson _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 6320156283Srwatson $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' 6321156283Srwatson fi 6322156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6323156283Srwatson _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6324156283Srwatson case $host_os in 6325156283Srwatson solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 6326156283Srwatson *) 6327173143Srwatson # The compiler driver will combine and reorder linker options, 6328173143Srwatson # but understands `-z linker_flag'. GCC discards it without `$wl', 6329173143Srwatson # but is careful enough not to reorder. 6330156283Srwatson # Supported since Solaris 2.6 (maybe 2.5.1?) 6331173143Srwatson if test "$GCC" = yes; then 6332173143Srwatson _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 6333173143Srwatson else 6334173143Srwatson _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 6335173143Srwatson fi 6336173143Srwatson ;; 6337156283Srwatson esac 6338156283Srwatson _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 6339156283Srwatson ;; 6340156283Srwatson 6341156283Srwatson sunos4*) 6342156283Srwatson if test "x$host_vendor" = xsequent; then 6343156283Srwatson # Use $CC to link under sequent, because it throws in some extra .o 6344156283Srwatson # files that make .init and .fini sections work. 6345156283Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' 6346156283Srwatson else 6347156283Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 6348156283Srwatson fi 6349156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6350156283Srwatson _LT_AC_TAGVAR(hardcode_direct, $1)=yes 6351156283Srwatson _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 6352156283Srwatson _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6353156283Srwatson ;; 6354156283Srwatson 6355156283Srwatson sysv4) 6356156283Srwatson case $host_vendor in 6357156283Srwatson sni) 6358156283Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6359156283Srwatson _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 6360156283Srwatson ;; 6361156283Srwatson siemens) 6362156283Srwatson ## LD is ld it makes a PLAMLIB 6363156283Srwatson ## CC just makes a GrossModule. 6364156283Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 6365156283Srwatson _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 6366156283Srwatson _LT_AC_TAGVAR(hardcode_direct, $1)=no 6367156283Srwatson ;; 6368156283Srwatson motorola) 6369156283Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6370156283Srwatson _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 6371156283Srwatson ;; 6372156283Srwatson esac 6373156283Srwatson runpath_var='LD_RUN_PATH' 6374156283Srwatson _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6375156283Srwatson ;; 6376156283Srwatson 6377156283Srwatson sysv4.3*) 6378156283Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6379156283Srwatson _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6380156283Srwatson _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 6381156283Srwatson ;; 6382156283Srwatson 6383156283Srwatson sysv4*MP*) 6384156283Srwatson if test -d /usr/nec; then 6385156283Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6386156283Srwatson _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6387156283Srwatson runpath_var=LD_RUN_PATH 6388156283Srwatson hardcode_runpath_var=yes 6389156283Srwatson _LT_AC_TAGVAR(ld_shlibs, $1)=yes 6390156283Srwatson fi 6391156283Srwatson ;; 6392156283Srwatson 6393173143Srwatson sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 6394173143Srwatson _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 6395173143Srwatson _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 6396156283Srwatson _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6397173143Srwatson runpath_var='LD_RUN_PATH' 6398156283Srwatson 6399156283Srwatson if test "$GCC" = yes; then 6400173143Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6401173143Srwatson _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6402156283Srwatson else 6403173143Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6404173143Srwatson _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6405156283Srwatson fi 6406156283Srwatson ;; 6407156283Srwatson 6408173143Srwatson sysv5* | sco3.2v5* | sco5v6*) 6409173143Srwatson # Note: We can NOT use -z defs as we might desire, because we do not 6410173143Srwatson # link with -lc, and that would cause any symbols used from libc to 6411173143Srwatson # always be unresolved, which means just about no library would 6412173143Srwatson # ever link correctly. If we're not using GNU ld we use -z text 6413173143Srwatson # though, which does catch some bad symbols but isn't as heavy-handed 6414173143Srwatson # as -z defs. 6415173143Srwatson _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 6416173143Srwatson _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 6417173143Srwatson _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 6418156283Srwatson _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6419173143Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' 6420173143Srwatson _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' 6421173143Srwatson _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 6422173143Srwatson _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 6423156283Srwatson runpath_var='LD_RUN_PATH' 6424173143Srwatson 6425173143Srwatson if test "$GCC" = yes; then 6426173143Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' 6427173143Srwatson _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' 6428173143Srwatson else 6429173143Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' 6430173143Srwatson _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' 6431173143Srwatson fi 6432156283Srwatson ;; 6433156283Srwatson 6434156283Srwatson uts4*) 6435156283Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6436156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6437156283Srwatson _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6438156283Srwatson ;; 6439156283Srwatson 6440156283Srwatson *) 6441156283Srwatson _LT_AC_TAGVAR(ld_shlibs, $1)=no 6442156283Srwatson ;; 6443156283Srwatson esac 6444156283Srwatson fi 6445156283Srwatson]) 6446156283SrwatsonAC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) 6447156283Srwatsontest "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 6448156283Srwatson 6449156283Srwatson# 6450156283Srwatson# Do we need to explicitly link libc? 6451156283Srwatson# 6452156283Srwatsoncase "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in 6453156283Srwatsonx|xyes) 6454156283Srwatson # Assume -lc should be added 6455156283Srwatson _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes 6456156283Srwatson 6457156283Srwatson if test "$enable_shared" = yes && test "$GCC" = yes; then 6458156283Srwatson case $_LT_AC_TAGVAR(archive_cmds, $1) in 6459156283Srwatson *'~'*) 6460156283Srwatson # FIXME: we may have to deal with multi-command sequences. 6461156283Srwatson ;; 6462156283Srwatson '$CC '*) 6463156283Srwatson # Test whether the compiler implicitly links with -lc since on some 6464156283Srwatson # systems, -lgcc has to come before -lc. If gcc already passes -lc 6465156283Srwatson # to ld, don't add -lc before -lgcc. 6466156283Srwatson AC_MSG_CHECKING([whether -lc should be explicitly linked in]) 6467156283Srwatson $rm conftest* 6468173143Srwatson echo "$lt_simple_compile_test_code" > conftest.$ac_ext 6469156283Srwatson 6470156283Srwatson if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 6471156283Srwatson soname=conftest 6472156283Srwatson lib=conftest 6473156283Srwatson libobjs=conftest.$ac_objext 6474156283Srwatson deplibs= 6475156283Srwatson wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) 6476173143Srwatson pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) 6477156283Srwatson compiler_flags=-v 6478156283Srwatson linker_flags=-v 6479156283Srwatson verstring= 6480156283Srwatson output_objdir=. 6481156283Srwatson libname=conftest 6482156283Srwatson lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1) 6483156283Srwatson _LT_AC_TAGVAR(allow_undefined_flag, $1)= 6484156283Srwatson if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 6485156283Srwatson then 6486156283Srwatson _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 6487156283Srwatson else 6488156283Srwatson _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes 6489156283Srwatson fi 6490156283Srwatson _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 6491156283Srwatson else 6492156283Srwatson cat conftest.err 1>&5 6493156283Srwatson fi 6494156283Srwatson $rm conftest* 6495156283Srwatson AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)]) 6496156283Srwatson ;; 6497156283Srwatson esac 6498156283Srwatson fi 6499156283Srwatson ;; 6500156283Srwatsonesac 6501156283Srwatson])# AC_LIBTOOL_PROG_LD_SHLIBS 6502156283Srwatson 6503156283Srwatson 6504156283Srwatson# _LT_AC_FILE_LTDLL_C 6505156283Srwatson# ------------------- 6506156283Srwatson# Be careful that the start marker always follows a newline. 6507156283SrwatsonAC_DEFUN([_LT_AC_FILE_LTDLL_C], [ 6508156283Srwatson# /* ltdll.c starts here */ 6509156283Srwatson# #define WIN32_LEAN_AND_MEAN 6510156283Srwatson# #include <windows.h> 6511156283Srwatson# #undef WIN32_LEAN_AND_MEAN 6512156283Srwatson# #include <stdio.h> 6513156283Srwatson# 6514156283Srwatson# #ifndef __CYGWIN__ 6515156283Srwatson# # ifdef __CYGWIN32__ 6516156283Srwatson# # define __CYGWIN__ __CYGWIN32__ 6517156283Srwatson# # endif 6518156283Srwatson# #endif 6519156283Srwatson# 6520156283Srwatson# #ifdef __cplusplus 6521156283Srwatson# extern "C" { 6522156283Srwatson# #endif 6523156283Srwatson# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved); 6524156283Srwatson# #ifdef __cplusplus 6525156283Srwatson# } 6526156283Srwatson# #endif 6527156283Srwatson# 6528156283Srwatson# #ifdef __CYGWIN__ 6529156283Srwatson# #include <cygwin/cygwin_dll.h> 6530156283Srwatson# DECLARE_CYGWIN_DLL( DllMain ); 6531156283Srwatson# #endif 6532156283Srwatson# HINSTANCE __hDllInstance_base; 6533156283Srwatson# 6534156283Srwatson# BOOL APIENTRY 6535156283Srwatson# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved) 6536156283Srwatson# { 6537156283Srwatson# __hDllInstance_base = hInst; 6538156283Srwatson# return TRUE; 6539156283Srwatson# } 6540156283Srwatson# /* ltdll.c ends here */ 6541156283Srwatson])# _LT_AC_FILE_LTDLL_C 6542156283Srwatson 6543156283Srwatson 6544156283Srwatson# _LT_AC_TAGVAR(VARNAME, [TAGNAME]) 6545156283Srwatson# --------------------------------- 6546156283SrwatsonAC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])]) 6547156283Srwatson 6548156283Srwatson 6549156283Srwatson# old names 6550156283SrwatsonAC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL]) 6551156283SrwatsonAC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 6552156283SrwatsonAC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 6553156283SrwatsonAC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 6554156283SrwatsonAC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 6555156283SrwatsonAC_DEFUN([AM_PROG_LD], [AC_PROG_LD]) 6556156283SrwatsonAC_DEFUN([AM_PROG_NM], [AC_PROG_NM]) 6557156283Srwatson 6558156283Srwatson# This is just to silence aclocal about the macro not being used 6559156283Srwatsonifelse([AC_DISABLE_FAST_INSTALL]) 6560156283Srwatson 6561156283SrwatsonAC_DEFUN([LT_AC_PROG_GCJ], 6562156283Srwatson[AC_CHECK_TOOL(GCJ, gcj, no) 6563156283Srwatson test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" 6564156283Srwatson AC_SUBST(GCJFLAGS) 6565156283Srwatson]) 6566156283Srwatson 6567156283SrwatsonAC_DEFUN([LT_AC_PROG_RC], 6568156283Srwatson[AC_CHECK_TOOL(RC, windres, no) 6569156283Srwatson]) 6570156283Srwatson 6571173143Srwatson 6572173143Srwatson# Cheap backport of AS_EXECUTABLE_P and required macros 6573173143Srwatson# from Autoconf 2.59; we should not use $as_executable_p directly. 6574173143Srwatson 6575173143Srwatson# _AS_TEST_PREPARE 6576173143Srwatson# ---------------- 6577173143Srwatsonm4_ifndef([_AS_TEST_PREPARE], 6578173143Srwatson[m4_defun([_AS_TEST_PREPARE], 6579173143Srwatson[if test -x / >/dev/null 2>&1; then 6580173143Srwatson as_executable_p='test -x' 6581173143Srwatsonelse 6582173143Srwatson as_executable_p='test -f' 6583173143Srwatsonfi 6584173143Srwatson])])# _AS_TEST_PREPARE 6585173143Srwatson 6586173143Srwatson# AS_EXECUTABLE_P 6587173143Srwatson# --------------- 6588173143Srwatson# Check whether a file is executable. 6589173143Srwatsonm4_ifndef([AS_EXECUTABLE_P], 6590173143Srwatson[m4_defun([AS_EXECUTABLE_P], 6591173143Srwatson[AS_REQUIRE([_AS_TEST_PREPARE])dnl 6592173143Srwatson$as_executable_p $1[]dnl 6593173143Srwatson])])# AS_EXECUTABLE_P 6594173143Srwatson 6595156283Srwatson# NOTE: This macro has been submitted for inclusion into # 6596156283Srwatson# GNU Autoconf as AC_PROG_SED. When it is available in # 6597156283Srwatson# a released version of Autoconf we should remove this # 6598156283Srwatson# macro and use it instead. # 6599156283Srwatson# LT_AC_PROG_SED 6600156283Srwatson# -------------- 6601156283Srwatson# Check for a fully-functional sed program, that truncates 6602156283Srwatson# as few characters as possible. Prefer GNU sed if found. 6603156283SrwatsonAC_DEFUN([LT_AC_PROG_SED], 6604156283Srwatson[AC_MSG_CHECKING([for a sed that does not truncate output]) 6605156283SrwatsonAC_CACHE_VAL(lt_cv_path_SED, 6606156283Srwatson[# Loop through the user's path and test for sed and gsed. 6607156283Srwatson# Then use that list of sed's as ones to test for truncation. 6608156283Srwatsonas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 6609156283Srwatsonfor as_dir in $PATH 6610156283Srwatsondo 6611156283Srwatson IFS=$as_save_IFS 6612156283Srwatson test -z "$as_dir" && as_dir=. 6613156283Srwatson for lt_ac_prog in sed gsed; do 6614156283Srwatson for ac_exec_ext in '' $ac_executable_extensions; do 6615173143Srwatson if AS_EXECUTABLE_P(["$as_dir/$lt_ac_prog$ac_exec_ext"]); then 6616156283Srwatson lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 6617156283Srwatson fi 6618156283Srwatson done 6619156283Srwatson done 6620156283Srwatsondone 6621173143SrwatsonIFS=$as_save_IFS 6622156283Srwatsonlt_ac_max=0 6623156283Srwatsonlt_ac_count=0 6624156283Srwatson# Add /usr/xpg4/bin/sed as it is typically found on Solaris 6625156283Srwatson# along with /bin/sed that truncates output. 6626156283Srwatsonfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 6627156283Srwatson test ! -f $lt_ac_sed && continue 6628156283Srwatson cat /dev/null > conftest.in 6629156283Srwatson lt_ac_count=0 6630156283Srwatson echo $ECHO_N "0123456789$ECHO_C" >conftest.in 6631156283Srwatson # Check for GNU sed and select it if it is found. 6632156283Srwatson if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 6633156283Srwatson lt_cv_path_SED=$lt_ac_sed 6634156283Srwatson break 6635156283Srwatson fi 6636156283Srwatson while true; do 6637156283Srwatson cat conftest.in conftest.in >conftest.tmp 6638156283Srwatson mv conftest.tmp conftest.in 6639156283Srwatson cp conftest.in conftest.nl 6640156283Srwatson echo >>conftest.nl 6641156283Srwatson $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 6642156283Srwatson cmp -s conftest.out conftest.nl || break 6643156283Srwatson # 10000 chars as input seems more than enough 6644156283Srwatson test $lt_ac_count -gt 10 && break 6645156283Srwatson lt_ac_count=`expr $lt_ac_count + 1` 6646156283Srwatson if test $lt_ac_count -gt $lt_ac_max; then 6647156283Srwatson lt_ac_max=$lt_ac_count 6648156283Srwatson lt_cv_path_SED=$lt_ac_sed 6649156283Srwatson fi 6650156283Srwatson done 6651156283Srwatsondone 6652156283Srwatson]) 6653156283SrwatsonSED=$lt_cv_path_SED 6654173143SrwatsonAC_SUBST([SED]) 6655156283SrwatsonAC_MSG_RESULT([$SED]) 6656156283Srwatson]) 6657156283Srwatson 6658191273Srwatson# Copyright (C) 2002, 2003, 2005, 2006, 2007 Free Software Foundation, Inc. 6659156283Srwatson# 6660156283Srwatson# This file is free software; the Free Software Foundation 6661156283Srwatson# gives unlimited permission to copy and/or distribute it, 6662156283Srwatson# with or without modifications, as long as this notice is preserved. 6663156283Srwatson 6664156283Srwatson# AM_AUTOMAKE_VERSION(VERSION) 6665156283Srwatson# ---------------------------- 6666156283Srwatson# Automake X.Y traces this macro to ensure aclocal.m4 has been 6667156283Srwatson# generated from the m4 files accompanying Automake X.Y. 6668173143Srwatson# (This private macro should not be called outside this file.) 6669173143SrwatsonAC_DEFUN([AM_AUTOMAKE_VERSION], 6670173143Srwatson[am__api_version='1.10' 6671173143Srwatsondnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 6672173143Srwatsondnl require some minimum version. Point them to the right macro. 6673191273Srwatsonm4_if([$1], [1.10.1], [], 6674173143Srwatson [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 6675173143Srwatson]) 6676156283Srwatson 6677173143Srwatson# _AM_AUTOCONF_VERSION(VERSION) 6678173143Srwatson# ----------------------------- 6679173143Srwatson# aclocal traces this macro to find the Autoconf version. 6680173143Srwatson# This is a private macro too. Using m4_define simplifies 6681173143Srwatson# the logic in aclocal, which can simply ignore this definition. 6682173143Srwatsonm4_define([_AM_AUTOCONF_VERSION], []) 6683173143Srwatson 6684156283Srwatson# AM_SET_CURRENT_AUTOMAKE_VERSION 6685156283Srwatson# ------------------------------- 6686173143Srwatson# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 6687156283Srwatson# This function is AC_REQUIREd by AC_INIT_AUTOMAKE. 6688156283SrwatsonAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 6689191273Srwatson[AM_AUTOMAKE_VERSION([1.10.1])dnl 6690191273Srwatsonm4_ifndef([AC_AUTOCONF_VERSION], 6691191273Srwatson [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 6692191273Srwatson_AM_AUTOCONF_VERSION(AC_AUTOCONF_VERSION)]) 6693156283Srwatson 6694156283Srwatson# AM_AUX_DIR_EXPAND -*- Autoconf -*- 6695156283Srwatson 6696156283Srwatson# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 6697156283Srwatson# 6698156283Srwatson# This file is free software; the Free Software Foundation 6699156283Srwatson# gives unlimited permission to copy and/or distribute it, 6700156283Srwatson# with or without modifications, as long as this notice is preserved. 6701156283Srwatson 6702156283Srwatson# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 6703156283Srwatson# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to 6704156283Srwatson# `$srcdir', `$srcdir/..', or `$srcdir/../..'. 6705156283Srwatson# 6706156283Srwatson# Of course, Automake must honor this variable whenever it calls a 6707156283Srwatson# tool from the auxiliary directory. The problem is that $srcdir (and 6708156283Srwatson# therefore $ac_aux_dir as well) can be either absolute or relative, 6709156283Srwatson# depending on how configure is run. This is pretty annoying, since 6710156283Srwatson# it makes $ac_aux_dir quite unusable in subdirectories: in the top 6711156283Srwatson# source directory, any form will work fine, but in subdirectories a 6712156283Srwatson# relative path needs to be adjusted first. 6713156283Srwatson# 6714156283Srwatson# $ac_aux_dir/missing 6715156283Srwatson# fails when called from a subdirectory if $ac_aux_dir is relative 6716156283Srwatson# $top_srcdir/$ac_aux_dir/missing 6717156283Srwatson# fails if $ac_aux_dir is absolute, 6718156283Srwatson# fails when called from a subdirectory in a VPATH build with 6719156283Srwatson# a relative $ac_aux_dir 6720156283Srwatson# 6721156283Srwatson# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 6722156283Srwatson# are both prefixed by $srcdir. In an in-source build this is usually 6723156283Srwatson# harmless because $srcdir is `.', but things will broke when you 6724156283Srwatson# start a VPATH build or use an absolute $srcdir. 6725156283Srwatson# 6726156283Srwatson# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 6727156283Srwatson# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 6728156283Srwatson# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 6729156283Srwatson# and then we would define $MISSING as 6730156283Srwatson# MISSING="\${SHELL} $am_aux_dir/missing" 6731156283Srwatson# This will work as long as MISSING is not called from configure, because 6732156283Srwatson# unfortunately $(top_srcdir) has no meaning in configure. 6733156283Srwatson# However there are other variables, like CC, which are often used in 6734156283Srwatson# configure, and could therefore not use this "fixed" $ac_aux_dir. 6735156283Srwatson# 6736156283Srwatson# Another solution, used here, is to always expand $ac_aux_dir to an 6737156283Srwatson# absolute PATH. The drawback is that using absolute paths prevent a 6738156283Srwatson# configured tree to be moved without reconfiguration. 6739156283Srwatson 6740156283SrwatsonAC_DEFUN([AM_AUX_DIR_EXPAND], 6741156283Srwatson[dnl Rely on autoconf to set up CDPATH properly. 6742156283SrwatsonAC_PREREQ([2.50])dnl 6743156283Srwatson# expand $ac_aux_dir to an absolute path 6744156283Srwatsonam_aux_dir=`cd $ac_aux_dir && pwd` 6745156283Srwatson]) 6746156283Srwatson 6747156283Srwatson# AM_CONDITIONAL -*- Autoconf -*- 6748156283Srwatson 6749173143Srwatson# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006 6750156283Srwatson# Free Software Foundation, Inc. 6751156283Srwatson# 6752156283Srwatson# This file is free software; the Free Software Foundation 6753156283Srwatson# gives unlimited permission to copy and/or distribute it, 6754156283Srwatson# with or without modifications, as long as this notice is preserved. 6755156283Srwatson 6756173143Srwatson# serial 8 6757156283Srwatson 6758156283Srwatson# AM_CONDITIONAL(NAME, SHELL-CONDITION) 6759156283Srwatson# ------------------------------------- 6760156283Srwatson# Define a conditional. 6761156283SrwatsonAC_DEFUN([AM_CONDITIONAL], 6762156283Srwatson[AC_PREREQ(2.52)dnl 6763156283Srwatson ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 6764156283Srwatson [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 6765173143SrwatsonAC_SUBST([$1_TRUE])dnl 6766173143SrwatsonAC_SUBST([$1_FALSE])dnl 6767173143Srwatson_AM_SUBST_NOTMAKE([$1_TRUE])dnl 6768173143Srwatson_AM_SUBST_NOTMAKE([$1_FALSE])dnl 6769156283Srwatsonif $2; then 6770156283Srwatson $1_TRUE= 6771156283Srwatson $1_FALSE='#' 6772156283Srwatsonelse 6773156283Srwatson $1_TRUE='#' 6774156283Srwatson $1_FALSE= 6775156283Srwatsonfi 6776156283SrwatsonAC_CONFIG_COMMANDS_PRE( 6777156283Srwatson[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 6778156283Srwatson AC_MSG_ERROR([[conditional "$1" was never defined. 6779156283SrwatsonUsually this means the macro was only invoked conditionally.]]) 6780156283Srwatsonfi])]) 6781156283Srwatson 6782173143Srwatson# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 6783156283Srwatson# Free Software Foundation, Inc. 6784156283Srwatson# 6785156283Srwatson# This file is free software; the Free Software Foundation 6786156283Srwatson# gives unlimited permission to copy and/or distribute it, 6787156283Srwatson# with or without modifications, as long as this notice is preserved. 6788156283Srwatson 6789173143Srwatson# serial 9 6790156283Srwatson 6791156283Srwatson# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be 6792156283Srwatson# written in clear, in which case automake, when reading aclocal.m4, 6793156283Srwatson# will think it sees a *use*, and therefore will trigger all it's 6794156283Srwatson# C support machinery. Also note that it means that autoscan, seeing 6795156283Srwatson# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 6796156283Srwatson 6797156283Srwatson 6798156283Srwatson# _AM_DEPENDENCIES(NAME) 6799156283Srwatson# ---------------------- 6800156283Srwatson# See how the compiler implements dependency checking. 6801156283Srwatson# NAME is "CC", "CXX", "GCJ", or "OBJC". 6802156283Srwatson# We try a few techniques and use that to set a single cache variable. 6803156283Srwatson# 6804156283Srwatson# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 6805156283Srwatson# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 6806156283Srwatson# dependency, and given that the user is not expected to run this macro, 6807156283Srwatson# just rely on AC_PROG_CC. 6808156283SrwatsonAC_DEFUN([_AM_DEPENDENCIES], 6809156283Srwatson[AC_REQUIRE([AM_SET_DEPDIR])dnl 6810156283SrwatsonAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 6811156283SrwatsonAC_REQUIRE([AM_MAKE_INCLUDE])dnl 6812156283SrwatsonAC_REQUIRE([AM_DEP_TRACK])dnl 6813156283Srwatson 6814156283Srwatsonifelse([$1], CC, [depcc="$CC" am_compiler_list=], 6815156283Srwatson [$1], CXX, [depcc="$CXX" am_compiler_list=], 6816156283Srwatson [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 6817173143Srwatson [$1], UPC, [depcc="$UPC" am_compiler_list=], 6818156283Srwatson [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 6819156283Srwatson [depcc="$$1" am_compiler_list=]) 6820156283Srwatson 6821156283SrwatsonAC_CACHE_CHECK([dependency style of $depcc], 6822156283Srwatson [am_cv_$1_dependencies_compiler_type], 6823156283Srwatson[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 6824156283Srwatson # We make a subdir and do the tests there. Otherwise we can end up 6825156283Srwatson # making bogus files that we don't know about and never remove. For 6826156283Srwatson # instance it was reported that on HP-UX the gcc test will end up 6827156283Srwatson # making a dummy file named `D' -- because `-MD' means `put the output 6828156283Srwatson # in D'. 6829156283Srwatson mkdir conftest.dir 6830156283Srwatson # Copy depcomp to subdir because otherwise we won't find it if we're 6831156283Srwatson # using a relative directory. 6832156283Srwatson cp "$am_depcomp" conftest.dir 6833156283Srwatson cd conftest.dir 6834156283Srwatson # We will build objects and dependencies in a subdirectory because 6835156283Srwatson # it helps to detect inapplicable dependency modes. For instance 6836156283Srwatson # both Tru64's cc and ICC support -MD to output dependencies as a 6837156283Srwatson # side effect of compilation, but ICC will put the dependencies in 6838156283Srwatson # the current directory while Tru64 will put them in the object 6839156283Srwatson # directory. 6840156283Srwatson mkdir sub 6841156283Srwatson 6842156283Srwatson am_cv_$1_dependencies_compiler_type=none 6843156283Srwatson if test "$am_compiler_list" = ""; then 6844156283Srwatson am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 6845156283Srwatson fi 6846156283Srwatson for depmode in $am_compiler_list; do 6847156283Srwatson # Setup a source with many dependencies, because some compilers 6848156283Srwatson # like to wrap large dependency lists on column 80 (with \), and 6849156283Srwatson # we should not choose a depcomp mode which is confused by this. 6850156283Srwatson # 6851156283Srwatson # We need to recreate these files for each test, as the compiler may 6852156283Srwatson # overwrite some of them when testing with obscure command lines. 6853156283Srwatson # This happens at least with the AIX C compiler. 6854156283Srwatson : > sub/conftest.c 6855156283Srwatson for i in 1 2 3 4 5 6; do 6856156283Srwatson echo '#include "conftst'$i'.h"' >> sub/conftest.c 6857156283Srwatson # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with 6858156283Srwatson # Solaris 8's {/usr,}/bin/sh. 6859156283Srwatson touch sub/conftst$i.h 6860156283Srwatson done 6861156283Srwatson echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 6862156283Srwatson 6863156283Srwatson case $depmode in 6864156283Srwatson nosideeffect) 6865156283Srwatson # after this tag, mechanisms are not by side-effect, so they'll 6866156283Srwatson # only be used when explicitly requested 6867156283Srwatson if test "x$enable_dependency_tracking" = xyes; then 6868156283Srwatson continue 6869156283Srwatson else 6870156283Srwatson break 6871156283Srwatson fi 6872156283Srwatson ;; 6873156283Srwatson none) break ;; 6874156283Srwatson esac 6875156283Srwatson # We check with `-c' and `-o' for the sake of the "dashmstdout" 6876156283Srwatson # mode. It turns out that the SunPro C++ compiler does not properly 6877156283Srwatson # handle `-M -o', and we need to detect this. 6878156283Srwatson if depmode=$depmode \ 6879156283Srwatson source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ 6880156283Srwatson depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 6881156283Srwatson $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ 6882156283Srwatson >/dev/null 2>conftest.err && 6883173143Srwatson grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 6884156283Srwatson grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 6885156283Srwatson grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && 6886156283Srwatson ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 6887156283Srwatson # icc doesn't choke on unknown options, it will just issue warnings 6888156283Srwatson # or remarks (even with -Werror). So we grep stderr for any message 6889156283Srwatson # that says an option was ignored or not supported. 6890156283Srwatson # When given -MP, icc 7.0 and 7.1 complain thusly: 6891156283Srwatson # icc: Command line warning: ignoring option '-M'; no argument required 6892156283Srwatson # The diagnosis changed in icc 8.0: 6893156283Srwatson # icc: Command line remark: option '-MP' not supported 6894156283Srwatson if (grep 'ignoring option' conftest.err || 6895156283Srwatson grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 6896156283Srwatson am_cv_$1_dependencies_compiler_type=$depmode 6897156283Srwatson break 6898156283Srwatson fi 6899156283Srwatson fi 6900156283Srwatson done 6901156283Srwatson 6902156283Srwatson cd .. 6903156283Srwatson rm -rf conftest.dir 6904156283Srwatsonelse 6905156283Srwatson am_cv_$1_dependencies_compiler_type=none 6906156283Srwatsonfi 6907156283Srwatson]) 6908156283SrwatsonAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 6909156283SrwatsonAM_CONDITIONAL([am__fastdep$1], [ 6910156283Srwatson test "x$enable_dependency_tracking" != xno \ 6911156283Srwatson && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 6912156283Srwatson]) 6913156283Srwatson 6914156283Srwatson 6915156283Srwatson# AM_SET_DEPDIR 6916156283Srwatson# ------------- 6917156283Srwatson# Choose a directory name for dependency files. 6918156283Srwatson# This macro is AC_REQUIREd in _AM_DEPENDENCIES 6919156283SrwatsonAC_DEFUN([AM_SET_DEPDIR], 6920156283Srwatson[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 6921156283SrwatsonAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 6922156283Srwatson]) 6923156283Srwatson 6924156283Srwatson 6925156283Srwatson# AM_DEP_TRACK 6926156283Srwatson# ------------ 6927156283SrwatsonAC_DEFUN([AM_DEP_TRACK], 6928156283Srwatson[AC_ARG_ENABLE(dependency-tracking, 6929156283Srwatson[ --disable-dependency-tracking speeds up one-time build 6930156283Srwatson --enable-dependency-tracking do not reject slow dependency extractors]) 6931156283Srwatsonif test "x$enable_dependency_tracking" != xno; then 6932156283Srwatson am_depcomp="$ac_aux_dir/depcomp" 6933156283Srwatson AMDEPBACKSLASH='\' 6934156283Srwatsonfi 6935156283SrwatsonAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 6936173143SrwatsonAC_SUBST([AMDEPBACKSLASH])dnl 6937173143Srwatson_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 6938156283Srwatson]) 6939156283Srwatson 6940156283Srwatson# Generate code to set up dependency tracking. -*- Autoconf -*- 6941156283Srwatson 6942156283Srwatson# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 6943156283Srwatson# Free Software Foundation, Inc. 6944156283Srwatson# 6945156283Srwatson# This file is free software; the Free Software Foundation 6946156283Srwatson# gives unlimited permission to copy and/or distribute it, 6947156283Srwatson# with or without modifications, as long as this notice is preserved. 6948156283Srwatson 6949156283Srwatson#serial 3 6950156283Srwatson 6951156283Srwatson# _AM_OUTPUT_DEPENDENCY_COMMANDS 6952156283Srwatson# ------------------------------ 6953156283SrwatsonAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 6954156283Srwatson[for mf in $CONFIG_FILES; do 6955156283Srwatson # Strip MF so we end up with the name of the file. 6956156283Srwatson mf=`echo "$mf" | sed -e 's/:.*$//'` 6957156283Srwatson # Check whether this is an Automake generated Makefile or not. 6958156283Srwatson # We used to match only the files named `Makefile.in', but 6959156283Srwatson # some people rename them; so instead we look at the file content. 6960156283Srwatson # Grep'ing the first line is not enough: some people post-process 6961156283Srwatson # each Makefile.in and add a new line on top of each file to say so. 6962173143Srwatson # Grep'ing the whole file is not good either: AIX grep has a line 6963173143Srwatson # limit of 2048, but all sed's we know have understand at least 4000. 6964191273Srwatson if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then 6965156283Srwatson dirpart=`AS_DIRNAME("$mf")` 6966156283Srwatson else 6967156283Srwatson continue 6968156283Srwatson fi 6969156283Srwatson # Extract the definition of DEPDIR, am__include, and am__quote 6970156283Srwatson # from the Makefile without running `make'. 6971156283Srwatson DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` 6972156283Srwatson test -z "$DEPDIR" && continue 6973156283Srwatson am__include=`sed -n 's/^am__include = //p' < "$mf"` 6974156283Srwatson test -z "am__include" && continue 6975156283Srwatson am__quote=`sed -n 's/^am__quote = //p' < "$mf"` 6976156283Srwatson # When using ansi2knr, U may be empty or an underscore; expand it 6977156283Srwatson U=`sed -n 's/^U = //p' < "$mf"` 6978156283Srwatson # Find all dependency output files, they are included files with 6979156283Srwatson # $(DEPDIR) in their names. We invoke sed twice because it is the 6980156283Srwatson # simplest approach to changing $(DEPDIR) to its actual value in the 6981156283Srwatson # expansion. 6982156283Srwatson for file in `sed -n " 6983156283Srwatson s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ 6984156283Srwatson sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do 6985156283Srwatson # Make sure the directory exists. 6986156283Srwatson test -f "$dirpart/$file" && continue 6987156283Srwatson fdir=`AS_DIRNAME(["$file"])` 6988156283Srwatson AS_MKDIR_P([$dirpart/$fdir]) 6989156283Srwatson # echo "creating $dirpart/$file" 6990156283Srwatson echo '# dummy' > "$dirpart/$file" 6991156283Srwatson done 6992156283Srwatsondone 6993156283Srwatson])# _AM_OUTPUT_DEPENDENCY_COMMANDS 6994156283Srwatson 6995156283Srwatson 6996156283Srwatson# AM_OUTPUT_DEPENDENCY_COMMANDS 6997156283Srwatson# ----------------------------- 6998156283Srwatson# This macro should only be invoked once -- use via AC_REQUIRE. 6999156283Srwatson# 7000156283Srwatson# This code is only required when automatic dependency tracking 7001156283Srwatson# is enabled. FIXME. This creates each `.P' file that we will 7002156283Srwatson# need in order to bootstrap the dependency handling code. 7003156283SrwatsonAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 7004156283Srwatson[AC_CONFIG_COMMANDS([depfiles], 7005156283Srwatson [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 7006156283Srwatson [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 7007156283Srwatson]) 7008156283Srwatson 7009156283Srwatson# Do all the work for Automake. -*- Autoconf -*- 7010156283Srwatson 7011173143Srwatson# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 7012191273Srwatson# 2005, 2006, 2008 Free Software Foundation, Inc. 7013156283Srwatson# 7014156283Srwatson# This file is free software; the Free Software Foundation 7015156283Srwatson# gives unlimited permission to copy and/or distribute it, 7016156283Srwatson# with or without modifications, as long as this notice is preserved. 7017156283Srwatson 7018191273Srwatson# serial 13 7019156283Srwatson 7020156283Srwatson# This macro actually does too much. Some checks are only needed if 7021156283Srwatson# your package does certain things. But this isn't really a big deal. 7022156283Srwatson 7023156283Srwatson# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 7024156283Srwatson# AM_INIT_AUTOMAKE([OPTIONS]) 7025156283Srwatson# ----------------------------------------------- 7026156283Srwatson# The call with PACKAGE and VERSION arguments is the old style 7027156283Srwatson# call (pre autoconf-2.50), which is being phased out. PACKAGE 7028156283Srwatson# and VERSION should now be passed to AC_INIT and removed from 7029156283Srwatson# the call to AM_INIT_AUTOMAKE. 7030156283Srwatson# We support both call styles for the transition. After 7031156283Srwatson# the next Automake release, Autoconf can make the AC_INIT 7032156283Srwatson# arguments mandatory, and then we can depend on a new Autoconf 7033156283Srwatson# release and drop the old call support. 7034156283SrwatsonAC_DEFUN([AM_INIT_AUTOMAKE], 7035173143Srwatson[AC_PREREQ([2.60])dnl 7036156283Srwatsondnl Autoconf wants to disallow AM_ names. We explicitly allow 7037156283Srwatsondnl the ones we care about. 7038156283Srwatsonm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 7039156283SrwatsonAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 7040156283SrwatsonAC_REQUIRE([AC_PROG_INSTALL])dnl 7041173143Srwatsonif test "`cd $srcdir && pwd`" != "`pwd`"; then 7042173143Srwatson # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 7043173143Srwatson # is not polluted with repeated "-I." 7044173143Srwatson AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 7045173143Srwatson # test to see if srcdir already configured 7046173143Srwatson if test -f $srcdir/config.status; then 7047173143Srwatson AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 7048173143Srwatson fi 7049156283Srwatsonfi 7050156283Srwatson 7051156283Srwatson# test whether we have cygpath 7052156283Srwatsonif test -z "$CYGPATH_W"; then 7053156283Srwatson if (cygpath --version) >/dev/null 2>/dev/null; then 7054156283Srwatson CYGPATH_W='cygpath -w' 7055156283Srwatson else 7056156283Srwatson CYGPATH_W=echo 7057156283Srwatson fi 7058156283Srwatsonfi 7059156283SrwatsonAC_SUBST([CYGPATH_W]) 7060156283Srwatson 7061156283Srwatson# Define the identity of the package. 7062156283Srwatsondnl Distinguish between old-style and new-style calls. 7063156283Srwatsonm4_ifval([$2], 7064156283Srwatson[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 7065156283Srwatson AC_SUBST([PACKAGE], [$1])dnl 7066156283Srwatson AC_SUBST([VERSION], [$2])], 7067156283Srwatson[_AM_SET_OPTIONS([$1])dnl 7068173143Srwatsondnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 7069173143Srwatsonm4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, 7070173143Srwatson [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 7071156283Srwatson AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 7072156283Srwatson AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 7073156283Srwatson 7074156283Srwatson_AM_IF_OPTION([no-define],, 7075156283Srwatson[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) 7076156283Srwatson AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl 7077156283Srwatson 7078156283Srwatson# Some tools Automake needs. 7079156283SrwatsonAC_REQUIRE([AM_SANITY_CHECK])dnl 7080156283SrwatsonAC_REQUIRE([AC_ARG_PROGRAM])dnl 7081156283SrwatsonAM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) 7082156283SrwatsonAM_MISSING_PROG(AUTOCONF, autoconf) 7083156283SrwatsonAM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) 7084156283SrwatsonAM_MISSING_PROG(AUTOHEADER, autoheader) 7085156283SrwatsonAM_MISSING_PROG(MAKEINFO, makeinfo) 7086156283SrwatsonAM_PROG_INSTALL_SH 7087156283SrwatsonAM_PROG_INSTALL_STRIP 7088156283SrwatsonAC_REQUIRE([AM_PROG_MKDIR_P])dnl 7089156283Srwatson# We need awk for the "check" target. The system "awk" is bad on 7090156283Srwatson# some platforms. 7091156283SrwatsonAC_REQUIRE([AC_PROG_AWK])dnl 7092156283SrwatsonAC_REQUIRE([AC_PROG_MAKE_SET])dnl 7093156283SrwatsonAC_REQUIRE([AM_SET_LEADING_DOT])dnl 7094156283Srwatson_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 7095156283Srwatson [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 7096156283Srwatson [_AM_PROG_TAR([v7])])]) 7097156283Srwatson_AM_IF_OPTION([no-dependencies],, 7098156283Srwatson[AC_PROVIDE_IFELSE([AC_PROG_CC], 7099156283Srwatson [_AM_DEPENDENCIES(CC)], 7100156283Srwatson [define([AC_PROG_CC], 7101156283Srwatson defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl 7102156283SrwatsonAC_PROVIDE_IFELSE([AC_PROG_CXX], 7103156283Srwatson [_AM_DEPENDENCIES(CXX)], 7104156283Srwatson [define([AC_PROG_CXX], 7105156283Srwatson defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl 7106173143SrwatsonAC_PROVIDE_IFELSE([AC_PROG_OBJC], 7107173143Srwatson [_AM_DEPENDENCIES(OBJC)], 7108173143Srwatson [define([AC_PROG_OBJC], 7109173143Srwatson defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl 7110156283Srwatson]) 7111156283Srwatson]) 7112156283Srwatson 7113156283Srwatson 7114156283Srwatson# When config.status generates a header, we must update the stamp-h file. 7115156283Srwatson# This file resides in the same directory as the config header 7116156283Srwatson# that is generated. The stamp files are numbered to have different names. 7117156283Srwatson 7118156283Srwatson# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 7119156283Srwatson# loop where config.status creates the headers, so we can generate 7120156283Srwatson# our stamp files there. 7121156283SrwatsonAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 7122156283Srwatson[# Compute $1's index in $config_headers. 7123191273Srwatson_am_arg=$1 7124156283Srwatson_am_stamp_count=1 7125156283Srwatsonfor _am_header in $config_headers :; do 7126156283Srwatson case $_am_header in 7127191273Srwatson $_am_arg | $_am_arg:* ) 7128156283Srwatson break ;; 7129156283Srwatson * ) 7130156283Srwatson _am_stamp_count=`expr $_am_stamp_count + 1` ;; 7131156283Srwatson esac 7132156283Srwatsondone 7133191273Srwatsonecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 7134156283Srwatson 7135156283Srwatson# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 7136156283Srwatson# 7137156283Srwatson# This file is free software; the Free Software Foundation 7138156283Srwatson# gives unlimited permission to copy and/or distribute it, 7139156283Srwatson# with or without modifications, as long as this notice is preserved. 7140156283Srwatson 7141156283Srwatson# AM_PROG_INSTALL_SH 7142156283Srwatson# ------------------ 7143156283Srwatson# Define $install_sh. 7144156283SrwatsonAC_DEFUN([AM_PROG_INSTALL_SH], 7145156283Srwatson[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 7146173143Srwatsoninstall_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"} 7147156283SrwatsonAC_SUBST(install_sh)]) 7148156283Srwatson 7149156283Srwatson# Copyright (C) 2003, 2005 Free Software Foundation, Inc. 7150156283Srwatson# 7151156283Srwatson# This file is free software; the Free Software Foundation 7152156283Srwatson# gives unlimited permission to copy and/or distribute it, 7153156283Srwatson# with or without modifications, as long as this notice is preserved. 7154156283Srwatson 7155156283Srwatson# serial 2 7156156283Srwatson 7157156283Srwatson# Check whether the underlying file-system supports filenames 7158156283Srwatson# with a leading dot. For instance MS-DOS doesn't. 7159156283SrwatsonAC_DEFUN([AM_SET_LEADING_DOT], 7160156283Srwatson[rm -rf .tst 2>/dev/null 7161156283Srwatsonmkdir .tst 2>/dev/null 7162156283Srwatsonif test -d .tst; then 7163156283Srwatson am__leading_dot=. 7164156283Srwatsonelse 7165156283Srwatson am__leading_dot=_ 7166156283Srwatsonfi 7167156283Srwatsonrmdir .tst 2>/dev/null 7168156283SrwatsonAC_SUBST([am__leading_dot])]) 7169156283Srwatson 7170156283Srwatson# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- 7171156283Srwatson# From Jim Meyering 7172156283Srwatson 7173156283Srwatson# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005 7174156283Srwatson# Free Software Foundation, Inc. 7175156283Srwatson# 7176156283Srwatson# This file is free software; the Free Software Foundation 7177156283Srwatson# gives unlimited permission to copy and/or distribute it, 7178156283Srwatson# with or without modifications, as long as this notice is preserved. 7179156283Srwatson 7180156283Srwatson# serial 4 7181156283Srwatson 7182156283SrwatsonAC_DEFUN([AM_MAINTAINER_MODE], 7183156283Srwatson[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) 7184156283Srwatson dnl maintainer-mode is disabled by default 7185156283Srwatson AC_ARG_ENABLE(maintainer-mode, 7186156283Srwatson[ --enable-maintainer-mode enable make rules and dependencies not useful 7187156283Srwatson (and sometimes confusing) to the casual installer], 7188156283Srwatson USE_MAINTAINER_MODE=$enableval, 7189156283Srwatson USE_MAINTAINER_MODE=no) 7190156283Srwatson AC_MSG_RESULT([$USE_MAINTAINER_MODE]) 7191156283Srwatson AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes]) 7192156283Srwatson MAINT=$MAINTAINER_MODE_TRUE 7193156283Srwatson AC_SUBST(MAINT)dnl 7194156283Srwatson] 7195156283Srwatson) 7196156283Srwatson 7197156283SrwatsonAU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) 7198156283Srwatson 7199156283Srwatson# Check to see how 'make' treats includes. -*- Autoconf -*- 7200156283Srwatson 7201156283Srwatson# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. 7202156283Srwatson# 7203156283Srwatson# This file is free software; the Free Software Foundation 7204156283Srwatson# gives unlimited permission to copy and/or distribute it, 7205156283Srwatson# with or without modifications, as long as this notice is preserved. 7206156283Srwatson 7207156283Srwatson# serial 3 7208156283Srwatson 7209156283Srwatson# AM_MAKE_INCLUDE() 7210156283Srwatson# ----------------- 7211156283Srwatson# Check to see how make treats includes. 7212156283SrwatsonAC_DEFUN([AM_MAKE_INCLUDE], 7213156283Srwatson[am_make=${MAKE-make} 7214156283Srwatsoncat > confinc << 'END' 7215156283Srwatsonam__doit: 7216156283Srwatson @echo done 7217156283Srwatson.PHONY: am__doit 7218156283SrwatsonEND 7219156283Srwatson# If we don't find an include directive, just comment out the code. 7220156283SrwatsonAC_MSG_CHECKING([for style of include used by $am_make]) 7221156283Srwatsonam__include="#" 7222156283Srwatsonam__quote= 7223156283Srwatson_am_result=none 7224156283Srwatson# First try GNU make style include. 7225156283Srwatsonecho "include confinc" > confmf 7226156283Srwatson# We grep out `Entering directory' and `Leaving directory' 7227156283Srwatson# messages which can occur if `w' ends up in MAKEFLAGS. 7228156283Srwatson# In particular we don't look at `^make:' because GNU make might 7229156283Srwatson# be invoked under some other name (usually "gmake"), in which 7230156283Srwatson# case it prints its new name instead of `make'. 7231156283Srwatsonif test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then 7232156283Srwatson am__include=include 7233156283Srwatson am__quote= 7234156283Srwatson _am_result=GNU 7235156283Srwatsonfi 7236156283Srwatson# Now try BSD make style include. 7237156283Srwatsonif test "$am__include" = "#"; then 7238156283Srwatson echo '.include "confinc"' > confmf 7239156283Srwatson if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then 7240156283Srwatson am__include=.include 7241156283Srwatson am__quote="\"" 7242156283Srwatson _am_result=BSD 7243156283Srwatson fi 7244156283Srwatsonfi 7245156283SrwatsonAC_SUBST([am__include]) 7246156283SrwatsonAC_SUBST([am__quote]) 7247156283SrwatsonAC_MSG_RESULT([$_am_result]) 7248156283Srwatsonrm -f confinc confmf 7249156283Srwatson]) 7250156283Srwatson 7251156283Srwatson# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 7252156283Srwatson 7253173143Srwatson# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005 7254156283Srwatson# Free Software Foundation, Inc. 7255156283Srwatson# 7256156283Srwatson# This file is free software; the Free Software Foundation 7257156283Srwatson# gives unlimited permission to copy and/or distribute it, 7258156283Srwatson# with or without modifications, as long as this notice is preserved. 7259156283Srwatson 7260173143Srwatson# serial 5 7261156283Srwatson 7262156283Srwatson# AM_MISSING_PROG(NAME, PROGRAM) 7263156283Srwatson# ------------------------------ 7264156283SrwatsonAC_DEFUN([AM_MISSING_PROG], 7265156283Srwatson[AC_REQUIRE([AM_MISSING_HAS_RUN]) 7266156283Srwatson$1=${$1-"${am_missing_run}$2"} 7267156283SrwatsonAC_SUBST($1)]) 7268156283Srwatson 7269156283Srwatson 7270156283Srwatson# AM_MISSING_HAS_RUN 7271156283Srwatson# ------------------ 7272156283Srwatson# Define MISSING if not defined so far and test if it supports --run. 7273156283Srwatson# If it does, set am_missing_run to use it, otherwise, to nothing. 7274156283SrwatsonAC_DEFUN([AM_MISSING_HAS_RUN], 7275156283Srwatson[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 7276173143SrwatsonAC_REQUIRE_AUX_FILE([missing])dnl 7277156283Srwatsontest x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" 7278156283Srwatson# Use eval to expand $SHELL 7279156283Srwatsonif eval "$MISSING --run true"; then 7280156283Srwatson am_missing_run="$MISSING --run " 7281156283Srwatsonelse 7282156283Srwatson am_missing_run= 7283156283Srwatson AC_MSG_WARN([`missing' script is too old or missing]) 7284156283Srwatsonfi 7285156283Srwatson]) 7286156283Srwatson 7287173143Srwatson# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. 7288156283Srwatson# 7289156283Srwatson# This file is free software; the Free Software Foundation 7290156283Srwatson# gives unlimited permission to copy and/or distribute it, 7291156283Srwatson# with or without modifications, as long as this notice is preserved. 7292156283Srwatson 7293156283Srwatson# AM_PROG_MKDIR_P 7294156283Srwatson# --------------- 7295173143Srwatson# Check for `mkdir -p'. 7296156283SrwatsonAC_DEFUN([AM_PROG_MKDIR_P], 7297173143Srwatson[AC_PREREQ([2.60])dnl 7298173143SrwatsonAC_REQUIRE([AC_PROG_MKDIR_P])dnl 7299173143Srwatsondnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, 7300173143Srwatsondnl while keeping a definition of mkdir_p for backward compatibility. 7301173143Srwatsondnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. 7302173143Srwatsondnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of 7303173143Srwatsondnl Makefile.ins that do not define MKDIR_P, so we do our own 7304173143Srwatsondnl adjustment using top_builddir (which is defined more often than 7305173143Srwatsondnl MKDIR_P). 7306173143SrwatsonAC_SUBST([mkdir_p], ["$MKDIR_P"])dnl 7307173143Srwatsoncase $mkdir_p in 7308173143Srwatson [[\\/$]]* | ?:[[\\/]]*) ;; 7309173143Srwatson */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; 7310173143Srwatsonesac 7311173143Srwatson]) 7312156283Srwatson 7313156283Srwatson# Helper functions for option handling. -*- Autoconf -*- 7314156283Srwatson 7315156283Srwatson# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. 7316156283Srwatson# 7317156283Srwatson# This file is free software; the Free Software Foundation 7318156283Srwatson# gives unlimited permission to copy and/or distribute it, 7319156283Srwatson# with or without modifications, as long as this notice is preserved. 7320156283Srwatson 7321156283Srwatson# serial 3 7322156283Srwatson 7323156283Srwatson# _AM_MANGLE_OPTION(NAME) 7324156283Srwatson# ----------------------- 7325156283SrwatsonAC_DEFUN([_AM_MANGLE_OPTION], 7326156283Srwatson[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 7327156283Srwatson 7328156283Srwatson# _AM_SET_OPTION(NAME) 7329156283Srwatson# ------------------------------ 7330156283Srwatson# Set option NAME. Presently that only means defining a flag for this option. 7331156283SrwatsonAC_DEFUN([_AM_SET_OPTION], 7332156283Srwatson[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) 7333156283Srwatson 7334156283Srwatson# _AM_SET_OPTIONS(OPTIONS) 7335156283Srwatson# ---------------------------------- 7336156283Srwatson# OPTIONS is a space-separated list of Automake options. 7337156283SrwatsonAC_DEFUN([_AM_SET_OPTIONS], 7338156283Srwatson[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 7339156283Srwatson 7340156283Srwatson# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 7341156283Srwatson# ------------------------------------------- 7342156283Srwatson# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 7343156283SrwatsonAC_DEFUN([_AM_IF_OPTION], 7344156283Srwatson[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 7345156283Srwatson 7346156283Srwatson# Check to make sure that the build environment is sane. -*- Autoconf -*- 7347156283Srwatson 7348156283Srwatson# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 7349156283Srwatson# Free Software Foundation, Inc. 7350156283Srwatson# 7351156283Srwatson# This file is free software; the Free Software Foundation 7352156283Srwatson# gives unlimited permission to copy and/or distribute it, 7353156283Srwatson# with or without modifications, as long as this notice is preserved. 7354156283Srwatson 7355156283Srwatson# serial 4 7356156283Srwatson 7357156283Srwatson# AM_SANITY_CHECK 7358156283Srwatson# --------------- 7359156283SrwatsonAC_DEFUN([AM_SANITY_CHECK], 7360156283Srwatson[AC_MSG_CHECKING([whether build environment is sane]) 7361156283Srwatson# Just in case 7362156283Srwatsonsleep 1 7363156283Srwatsonecho timestamp > conftest.file 7364156283Srwatson# Do `set' in a subshell so we don't clobber the current shell's 7365156283Srwatson# arguments. Must try -L first in case configure is actually a 7366156283Srwatson# symlink; some systems play weird games with the mod time of symlinks 7367156283Srwatson# (eg FreeBSD returns the mod time of the symlink's containing 7368156283Srwatson# directory). 7369156283Srwatsonif ( 7370156283Srwatson set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` 7371156283Srwatson if test "$[*]" = "X"; then 7372156283Srwatson # -L didn't work. 7373156283Srwatson set X `ls -t $srcdir/configure conftest.file` 7374156283Srwatson fi 7375156283Srwatson rm -f conftest.file 7376156283Srwatson if test "$[*]" != "X $srcdir/configure conftest.file" \ 7377156283Srwatson && test "$[*]" != "X conftest.file $srcdir/configure"; then 7378156283Srwatson 7379156283Srwatson # If neither matched, then we have a broken ls. This can happen 7380156283Srwatson # if, for instance, CONFIG_SHELL is bash and it inherits a 7381156283Srwatson # broken ls alias from the environment. This has actually 7382156283Srwatson # happened. Such a system could not be considered "sane". 7383156283Srwatson AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 7384156283Srwatsonalias in your environment]) 7385156283Srwatson fi 7386156283Srwatson 7387156283Srwatson test "$[2]" = conftest.file 7388156283Srwatson ) 7389156283Srwatsonthen 7390156283Srwatson # Ok. 7391156283Srwatson : 7392156283Srwatsonelse 7393156283Srwatson AC_MSG_ERROR([newly created file is older than distributed files! 7394156283SrwatsonCheck your system clock]) 7395156283Srwatsonfi 7396156283SrwatsonAC_MSG_RESULT(yes)]) 7397156283Srwatson 7398156283Srwatson# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 7399156283Srwatson# 7400156283Srwatson# This file is free software; the Free Software Foundation 7401156283Srwatson# gives unlimited permission to copy and/or distribute it, 7402156283Srwatson# with or without modifications, as long as this notice is preserved. 7403156283Srwatson 7404156283Srwatson# AM_PROG_INSTALL_STRIP 7405156283Srwatson# --------------------- 7406156283Srwatson# One issue with vendor `install' (even GNU) is that you can't 7407156283Srwatson# specify the program used to strip binaries. This is especially 7408156283Srwatson# annoying in cross-compiling environments, where the build's strip 7409156283Srwatson# is unlikely to handle the host's binaries. 7410156283Srwatson# Fortunately install-sh will honor a STRIPPROG variable, so we 7411156283Srwatson# always use install-sh in `make install-strip', and initialize 7412156283Srwatson# STRIPPROG with the value of the STRIP variable (set by the user). 7413156283SrwatsonAC_DEFUN([AM_PROG_INSTALL_STRIP], 7414156283Srwatson[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 7415156283Srwatson# Installed binaries are usually stripped using `strip' when the user 7416156283Srwatson# run `make install-strip'. However `strip' might not be the right 7417156283Srwatson# tool to use in cross-compilation environments, therefore Automake 7418156283Srwatson# will honor the `STRIP' environment variable to overrule this program. 7419156283Srwatsondnl Don't test for $cross_compiling = yes, because it might be `maybe'. 7420156283Srwatsonif test "$cross_compiling" != no; then 7421156283Srwatson AC_CHECK_TOOL([STRIP], [strip], :) 7422156283Srwatsonfi 7423173143SrwatsonINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 7424156283SrwatsonAC_SUBST([INSTALL_STRIP_PROGRAM])]) 7425156283Srwatson 7426173143Srwatson# Copyright (C) 2006 Free Software Foundation, Inc. 7427173143Srwatson# 7428173143Srwatson# This file is free software; the Free Software Foundation 7429173143Srwatson# gives unlimited permission to copy and/or distribute it, 7430173143Srwatson# with or without modifications, as long as this notice is preserved. 7431173143Srwatson 7432173143Srwatson# _AM_SUBST_NOTMAKE(VARIABLE) 7433173143Srwatson# --------------------------- 7434191273Srwatson# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 7435173143Srwatson# This macro is traced by Automake. 7436173143SrwatsonAC_DEFUN([_AM_SUBST_NOTMAKE]) 7437173143Srwatson 7438156283Srwatson# Check how to create a tarball. -*- Autoconf -*- 7439156283Srwatson 7440156283Srwatson# Copyright (C) 2004, 2005 Free Software Foundation, Inc. 7441156283Srwatson# 7442156283Srwatson# This file is free software; the Free Software Foundation 7443156283Srwatson# gives unlimited permission to copy and/or distribute it, 7444156283Srwatson# with or without modifications, as long as this notice is preserved. 7445156283Srwatson 7446156283Srwatson# serial 2 7447156283Srwatson 7448156283Srwatson# _AM_PROG_TAR(FORMAT) 7449156283Srwatson# -------------------- 7450156283Srwatson# Check how to create a tarball in format FORMAT. 7451156283Srwatson# FORMAT should be one of `v7', `ustar', or `pax'. 7452156283Srwatson# 7453156283Srwatson# Substitute a variable $(am__tar) that is a command 7454156283Srwatson# writing to stdout a FORMAT-tarball containing the directory 7455156283Srwatson# $tardir. 7456156283Srwatson# tardir=directory && $(am__tar) > result.tar 7457156283Srwatson# 7458156283Srwatson# Substitute a variable $(am__untar) that extract such 7459156283Srwatson# a tarball read from stdin. 7460156283Srwatson# $(am__untar) < result.tar 7461156283SrwatsonAC_DEFUN([_AM_PROG_TAR], 7462156283Srwatson[# Always define AMTAR for backward compatibility. 7463156283SrwatsonAM_MISSING_PROG([AMTAR], [tar]) 7464156283Srwatsonm4_if([$1], [v7], 7465156283Srwatson [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], 7466156283Srwatson [m4_case([$1], [ustar],, [pax],, 7467156283Srwatson [m4_fatal([Unknown tar format])]) 7468156283SrwatsonAC_MSG_CHECKING([how to create a $1 tar archive]) 7469156283Srwatson# Loop over all known methods to create a tar archive until one works. 7470156283Srwatson_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 7471156283Srwatson_am_tools=${am_cv_prog_tar_$1-$_am_tools} 7472156283Srwatson# Do not fold the above two line into one, because Tru64 sh and 7473156283Srwatson# Solaris sh will not grok spaces in the rhs of `-'. 7474156283Srwatsonfor _am_tool in $_am_tools 7475156283Srwatsondo 7476156283Srwatson case $_am_tool in 7477156283Srwatson gnutar) 7478156283Srwatson for _am_tar in tar gnutar gtar; 7479156283Srwatson do 7480156283Srwatson AM_RUN_LOG([$_am_tar --version]) && break 7481156283Srwatson done 7482156283Srwatson am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 7483156283Srwatson am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 7484156283Srwatson am__untar="$_am_tar -xf -" 7485156283Srwatson ;; 7486156283Srwatson plaintar) 7487156283Srwatson # Must skip GNU tar: if it does not support --format= it doesn't create 7488156283Srwatson # ustar tarball either. 7489156283Srwatson (tar --version) >/dev/null 2>&1 && continue 7490156283Srwatson am__tar='tar chf - "$$tardir"' 7491156283Srwatson am__tar_='tar chf - "$tardir"' 7492156283Srwatson am__untar='tar xf -' 7493156283Srwatson ;; 7494156283Srwatson pax) 7495156283Srwatson am__tar='pax -L -x $1 -w "$$tardir"' 7496156283Srwatson am__tar_='pax -L -x $1 -w "$tardir"' 7497156283Srwatson am__untar='pax -r' 7498156283Srwatson ;; 7499156283Srwatson cpio) 7500156283Srwatson am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 7501156283Srwatson am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 7502156283Srwatson am__untar='cpio -i -H $1 -d' 7503156283Srwatson ;; 7504156283Srwatson none) 7505156283Srwatson am__tar=false 7506156283Srwatson am__tar_=false 7507156283Srwatson am__untar=false 7508156283Srwatson ;; 7509156283Srwatson esac 7510156283Srwatson 7511156283Srwatson # If the value was cached, stop now. We just wanted to have am__tar 7512156283Srwatson # and am__untar set. 7513156283Srwatson test -n "${am_cv_prog_tar_$1}" && break 7514156283Srwatson 7515156283Srwatson # tar/untar a dummy directory, and stop if the command works 7516156283Srwatson rm -rf conftest.dir 7517156283Srwatson mkdir conftest.dir 7518156283Srwatson echo GrepMe > conftest.dir/file 7519156283Srwatson AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 7520156283Srwatson rm -rf conftest.dir 7521156283Srwatson if test -s conftest.tar; then 7522156283Srwatson AM_RUN_LOG([$am__untar <conftest.tar]) 7523156283Srwatson grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 7524156283Srwatson fi 7525156283Srwatsondone 7526156283Srwatsonrm -rf conftest.dir 7527156283Srwatson 7528156283SrwatsonAC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 7529156283SrwatsonAC_MSG_RESULT([$am_cv_prog_tar_$1])]) 7530156283SrwatsonAC_SUBST([am__tar]) 7531156283SrwatsonAC_SUBST([am__untar]) 7532156283Srwatson]) # _AM_PROG_TAR 7533156283Srwatson 7534