aclocal.m4 revision 2c393a42
12c393a42Smrg# generated automatically by aclocal 1.9.6 -*- Autoconf -*- 22c393a42Smrg 32c393a42Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 42c393a42Smrg# 2005 Free Software Foundation, Inc. 52c393a42Smrg# This file is free software; the Free Software Foundation 62c393a42Smrg# gives unlimited permission to copy and/or distribute it, 72c393a42Smrg# with or without modifications, as long as this notice is preserved. 82c393a42Smrg 92c393a42Smrg# This program is distributed in the hope that it will be useful, 102c393a42Smrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 112c393a42Smrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 122c393a42Smrg# PARTICULAR PURPOSE. 132c393a42Smrg 142c393a42Smrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 152c393a42Smrg 162c393a42Smrg# serial 52 Debian 1.5.26-4 AC_PROG_LIBTOOL 172c393a42Smrg 182c393a42Smrg 192c393a42Smrg# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED) 202c393a42Smrg# ----------------------------------------------------------- 212c393a42Smrg# If this macro is not defined by Autoconf, define it here. 222c393a42Smrgm4_ifdef([AC_PROVIDE_IFELSE], 232c393a42Smrg [], 242c393a42Smrg [m4_define([AC_PROVIDE_IFELSE], 252c393a42Smrg [m4_ifdef([AC_PROVIDE_$1], 262c393a42Smrg [$2], [$3])])]) 272c393a42Smrg 282c393a42Smrg 292c393a42Smrg# AC_PROG_LIBTOOL 302c393a42Smrg# --------------- 312c393a42SmrgAC_DEFUN([AC_PROG_LIBTOOL], 322c393a42Smrg[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl 332c393a42Smrgdnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX 342c393a42Smrgdnl immediately, otherwise, hook it in at the end of AC_PROG_CXX. 352c393a42Smrg AC_PROVIDE_IFELSE([AC_PROG_CXX], 362c393a42Smrg [AC_LIBTOOL_CXX], 372c393a42Smrg [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX 382c393a42Smrg ])]) 392c393a42Smrgdnl And a similar setup for Fortran 77 support 402c393a42Smrg AC_PROVIDE_IFELSE([AC_PROG_F77], 412c393a42Smrg [AC_LIBTOOL_F77], 422c393a42Smrg [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77 432c393a42Smrg])]) 442c393a42Smrg 452c393a42Smrgdnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly. 462c393a42Smrgdnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run 472c393a42Smrgdnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both. 482c393a42Smrg AC_PROVIDE_IFELSE([AC_PROG_GCJ], 492c393a42Smrg [AC_LIBTOOL_GCJ], 502c393a42Smrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 512c393a42Smrg [AC_LIBTOOL_GCJ], 522c393a42Smrg [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ], 532c393a42Smrg [AC_LIBTOOL_GCJ], 542c393a42Smrg [ifdef([AC_PROG_GCJ], 552c393a42Smrg [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])]) 562c393a42Smrg ifdef([A][M_PROG_GCJ], 572c393a42Smrg [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])]) 582c393a42Smrg ifdef([LT_AC_PROG_GCJ], 592c393a42Smrg [define([LT_AC_PROG_GCJ], 602c393a42Smrg defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])]) 612c393a42Smrg])])# AC_PROG_LIBTOOL 622c393a42Smrg 632c393a42Smrg 642c393a42Smrg# _AC_PROG_LIBTOOL 652c393a42Smrg# ---------------- 662c393a42SmrgAC_DEFUN([_AC_PROG_LIBTOOL], 672c393a42Smrg[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl 682c393a42SmrgAC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl 692c393a42SmrgAC_BEFORE([$0],[AC_LIBTOOL_F77])dnl 702c393a42SmrgAC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl 712c393a42Smrg 722c393a42Smrg# This can be used to rebuild libtool when needed 732c393a42SmrgLIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" 742c393a42Smrg 752c393a42Smrg# Always use our own libtool. 762c393a42SmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool' 772c393a42SmrgAC_SUBST(LIBTOOL)dnl 782c393a42Smrg 792c393a42Smrg# Prevent multiple expansion 802c393a42Smrgdefine([AC_PROG_LIBTOOL], []) 812c393a42Smrg])# _AC_PROG_LIBTOOL 822c393a42Smrg 832c393a42Smrg 842c393a42Smrg# AC_LIBTOOL_SETUP 852c393a42Smrg# ---------------- 862c393a42SmrgAC_DEFUN([AC_LIBTOOL_SETUP], 872c393a42Smrg[AC_PREREQ(2.50)dnl 882c393a42SmrgAC_REQUIRE([AC_ENABLE_SHARED])dnl 892c393a42SmrgAC_REQUIRE([AC_ENABLE_STATIC])dnl 902c393a42SmrgAC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl 912c393a42SmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 922c393a42SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 932c393a42SmrgAC_REQUIRE([AC_PROG_CC])dnl 942c393a42SmrgAC_REQUIRE([AC_PROG_LD])dnl 952c393a42SmrgAC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl 962c393a42SmrgAC_REQUIRE([AC_PROG_NM])dnl 972c393a42Smrg 982c393a42SmrgAC_REQUIRE([AC_PROG_LN_S])dnl 992c393a42SmrgAC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl 1002c393a42Smrg# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! 1012c393a42SmrgAC_REQUIRE([AC_OBJEXT])dnl 1022c393a42SmrgAC_REQUIRE([AC_EXEEXT])dnl 1032c393a42Smrgdnl 1042c393a42SmrgAC_LIBTOOL_SYS_MAX_CMD_LEN 1052c393a42SmrgAC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE 1062c393a42SmrgAC_LIBTOOL_OBJDIR 1072c393a42Smrg 1082c393a42SmrgAC_REQUIRE([_LT_AC_SYS_COMPILER])dnl 1092c393a42Smrg_LT_AC_PROG_ECHO_BACKSLASH 1102c393a42Smrg 1112c393a42Smrgcase $host_os in 1122c393a42Smrgaix3*) 1132c393a42Smrg # AIX sometimes has problems with the GCC collect2 program. For some 1142c393a42Smrg # reason, if we set the COLLECT_NAMES environment variable, the problems 1152c393a42Smrg # vanish in a puff of smoke. 1162c393a42Smrg if test "X${COLLECT_NAMES+set}" != Xset; then 1172c393a42Smrg COLLECT_NAMES= 1182c393a42Smrg export COLLECT_NAMES 1192c393a42Smrg fi 1202c393a42Smrg ;; 1212c393a42Smrgesac 1222c393a42Smrg 1232c393a42Smrg# Sed substitution that helps us do robust quoting. It backslashifies 1242c393a42Smrg# metacharacters that are still active within double-quoted strings. 1252c393a42SmrgXsed='sed -e 1s/^X//' 1262c393a42Smrg[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'] 1272c393a42Smrg 1282c393a42Smrg# Same as above, but do not quote variable references. 1292c393a42Smrg[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'] 1302c393a42Smrg 1312c393a42Smrg# Sed substitution to delay expansion of an escaped shell variable in a 1322c393a42Smrg# double_quote_subst'ed string. 1332c393a42Smrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 1342c393a42Smrg 1352c393a42Smrg# Sed substitution to avoid accidental globbing in evaled expressions 1362c393a42Smrgno_glob_subst='s/\*/\\\*/g' 1372c393a42Smrg 1382c393a42Smrg# Constants: 1392c393a42Smrgrm="rm -f" 1402c393a42Smrg 1412c393a42Smrg# Global variables: 1422c393a42Smrgdefault_ofile=libtool 1432c393a42Smrgcan_build_shared=yes 1442c393a42Smrg 1452c393a42Smrg# All known linkers require a `.a' archive for static linking (except MSVC, 1462c393a42Smrg# which needs '.lib'). 1472c393a42Smrglibext=a 1482c393a42Smrgltmain="$ac_aux_dir/ltmain.sh" 1492c393a42Smrgofile="$default_ofile" 1502c393a42Smrgwith_gnu_ld="$lt_cv_prog_gnu_ld" 1512c393a42Smrg 1522c393a42SmrgAC_CHECK_TOOL(AR, ar, false) 1532c393a42SmrgAC_CHECK_TOOL(RANLIB, ranlib, :) 1542c393a42SmrgAC_CHECK_TOOL(STRIP, strip, :) 1552c393a42Smrg 1562c393a42Smrgold_CC="$CC" 1572c393a42Smrgold_CFLAGS="$CFLAGS" 1582c393a42Smrg 1592c393a42Smrg# Set sane defaults for various variables 1602c393a42Smrgtest -z "$AR" && AR=ar 1612c393a42Smrgtest -z "$AR_FLAGS" && AR_FLAGS=cru 1622c393a42Smrgtest -z "$AS" && AS=as 1632c393a42Smrgtest -z "$CC" && CC=cc 1642c393a42Smrgtest -z "$LTCC" && LTCC=$CC 1652c393a42Smrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 1662c393a42Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 1672c393a42Smrgtest -z "$LD" && LD=ld 1682c393a42Smrgtest -z "$LN_S" && LN_S="ln -s" 1692c393a42Smrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file 1702c393a42Smrgtest -z "$NM" && NM=nm 1712c393a42Smrgtest -z "$SED" && SED=sed 1722c393a42Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump 1732c393a42Smrgtest -z "$RANLIB" && RANLIB=: 1742c393a42Smrgtest -z "$STRIP" && STRIP=: 1752c393a42Smrgtest -z "$ac_objext" && ac_objext=o 1762c393a42Smrg 1772c393a42Smrg# Determine commands to create old-style static archives. 1782c393a42Smrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 1792c393a42Smrgold_postinstall_cmds='chmod 644 $oldlib' 1802c393a42Smrgold_postuninstall_cmds= 1812c393a42Smrg 1822c393a42Smrgif test -n "$RANLIB"; then 1832c393a42Smrg case $host_os in 1842c393a42Smrg openbsd*) 1852c393a42Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" 1862c393a42Smrg ;; 1872c393a42Smrg *) 1882c393a42Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" 1892c393a42Smrg ;; 1902c393a42Smrg esac 1912c393a42Smrg old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" 1922c393a42Smrgfi 1932c393a42Smrg 1942c393a42Smrg_LT_CC_BASENAME([$compiler]) 1952c393a42Smrg 1962c393a42Smrg# Only perform the check for file, if the check method requires it 1972c393a42Smrgcase $deplibs_check_method in 1982c393a42Smrgfile_magic*) 1992c393a42Smrg if test "$file_magic_cmd" = '$MAGIC_CMD'; then 2002c393a42Smrg AC_PATH_MAGIC 2012c393a42Smrg fi 2022c393a42Smrg ;; 2032c393a42Smrgesac 2042c393a42Smrg 2052c393a42Smrg_LT_REQUIRED_DARWIN_CHECKS 2062c393a42Smrg 2072c393a42SmrgAC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no) 2082c393a42SmrgAC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], 2092c393a42Smrgenable_win32_dll=yes, enable_win32_dll=no) 2102c393a42Smrg 2112c393a42SmrgAC_ARG_ENABLE([libtool-lock], 2122c393a42Smrg [AC_HELP_STRING([--disable-libtool-lock], 2132c393a42Smrg [avoid locking (might break parallel builds)])]) 2142c393a42Smrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes 2152c393a42Smrg 2162c393a42SmrgAC_ARG_WITH([pic], 2172c393a42Smrg [AC_HELP_STRING([--with-pic], 2182c393a42Smrg [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 2192c393a42Smrg [pic_mode="$withval"], 2202c393a42Smrg [pic_mode=default]) 2212c393a42Smrgtest -z "$pic_mode" && pic_mode=default 2222c393a42Smrg 2232c393a42Smrg# Use C for the default configuration in the libtool script 2242c393a42Smrgtagname= 2252c393a42SmrgAC_LIBTOOL_LANG_C_CONFIG 2262c393a42Smrg_LT_AC_TAGCONFIG 2272c393a42Smrg])# AC_LIBTOOL_SETUP 2282c393a42Smrg 2292c393a42Smrg 2302c393a42Smrg# _LT_AC_SYS_COMPILER 2312c393a42Smrg# ------------------- 2322c393a42SmrgAC_DEFUN([_LT_AC_SYS_COMPILER], 2332c393a42Smrg[AC_REQUIRE([AC_PROG_CC])dnl 2342c393a42Smrg 2352c393a42Smrg# If no C compiler was specified, use CC. 2362c393a42SmrgLTCC=${LTCC-"$CC"} 2372c393a42Smrg 2382c393a42Smrg# If no C compiler flags were specified, use CFLAGS. 2392c393a42SmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"} 2402c393a42Smrg 2412c393a42Smrg# Allow CC to be a program name with arguments. 2422c393a42Smrgcompiler=$CC 2432c393a42Smrg])# _LT_AC_SYS_COMPILER 2442c393a42Smrg 2452c393a42Smrg 2462c393a42Smrg# _LT_CC_BASENAME(CC) 2472c393a42Smrg# ------------------- 2482c393a42Smrg# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 2492c393a42SmrgAC_DEFUN([_LT_CC_BASENAME], 2502c393a42Smrg[for cc_temp in $1""; do 2512c393a42Smrg case $cc_temp in 2522c393a42Smrg compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 2532c393a42Smrg distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 2542c393a42Smrg \-*) ;; 2552c393a42Smrg *) break;; 2562c393a42Smrg esac 2572c393a42Smrgdone 2582c393a42Smrgcc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` 2592c393a42Smrg]) 2602c393a42Smrg 2612c393a42Smrg 2622c393a42Smrg# _LT_COMPILER_BOILERPLATE 2632c393a42Smrg# ------------------------ 2642c393a42Smrg# Check for compiler boilerplate output or warnings with 2652c393a42Smrg# the simple compiler test code. 2662c393a42SmrgAC_DEFUN([_LT_COMPILER_BOILERPLATE], 2672c393a42Smrg[AC_REQUIRE([LT_AC_PROG_SED])dnl 2682c393a42Smrgac_outfile=conftest.$ac_objext 2692c393a42Smrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext 2702c393a42Smrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 2712c393a42Smrg_lt_compiler_boilerplate=`cat conftest.err` 2722c393a42Smrg$rm conftest* 2732c393a42Smrg])# _LT_COMPILER_BOILERPLATE 2742c393a42Smrg 2752c393a42Smrg 2762c393a42Smrg# _LT_LINKER_BOILERPLATE 2772c393a42Smrg# ---------------------- 2782c393a42Smrg# Check for linker boilerplate output or warnings with 2792c393a42Smrg# the simple link test code. 2802c393a42SmrgAC_DEFUN([_LT_LINKER_BOILERPLATE], 2812c393a42Smrg[AC_REQUIRE([LT_AC_PROG_SED])dnl 2822c393a42Smrgac_outfile=conftest.$ac_objext 2832c393a42Smrgecho "$lt_simple_link_test_code" >conftest.$ac_ext 2842c393a42Smrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 2852c393a42Smrg_lt_linker_boilerplate=`cat conftest.err` 2862c393a42Smrg$rm -r conftest* 2872c393a42Smrg])# _LT_LINKER_BOILERPLATE 2882c393a42Smrg 2892c393a42Smrg# _LT_REQUIRED_DARWIN_CHECKS 2902c393a42Smrg# -------------------------- 2912c393a42Smrg# Check for some things on darwin 2922c393a42SmrgAC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS],[ 2932c393a42Smrg case $host_os in 2942c393a42Smrg rhapsody* | darwin*) 2952c393a42Smrg AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) 2962c393a42Smrg AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) 2972c393a42Smrg 2982c393a42Smrg AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], 2992c393a42Smrg [lt_cv_apple_cc_single_mod=no 3002c393a42Smrg if test -z "${LT_MULTI_MODULE}"; then 3012c393a42Smrg # By default we will add the -single_module flag. You can override 3022c393a42Smrg # by either setting the environment variable LT_MULTI_MODULE 3032c393a42Smrg # non-empty at configure time, or by adding -multi_module to the 3042c393a42Smrg # link flags. 3052c393a42Smrg echo "int foo(void){return 1;}" > conftest.c 3062c393a42Smrg $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 3072c393a42Smrg -dynamiclib ${wl}-single_module conftest.c 3082c393a42Smrg if test -f libconftest.dylib; then 3092c393a42Smrg lt_cv_apple_cc_single_mod=yes 3102c393a42Smrg rm -rf libconftest.dylib* 3112c393a42Smrg fi 3122c393a42Smrg rm conftest.c 3132c393a42Smrg fi]) 3142c393a42Smrg AC_CACHE_CHECK([for -exported_symbols_list linker flag], 3152c393a42Smrg [lt_cv_ld_exported_symbols_list], 3162c393a42Smrg [lt_cv_ld_exported_symbols_list=no 3172c393a42Smrg save_LDFLAGS=$LDFLAGS 3182c393a42Smrg echo "_main" > conftest.sym 3192c393a42Smrg LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" 3202c393a42Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 3212c393a42Smrg [lt_cv_ld_exported_symbols_list=yes], 3222c393a42Smrg [lt_cv_ld_exported_symbols_list=no]) 3232c393a42Smrg LDFLAGS="$save_LDFLAGS" 3242c393a42Smrg ]) 3252c393a42Smrg case $host_os in 3262c393a42Smrg rhapsody* | darwin1.[[0123]]) 3272c393a42Smrg _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; 3282c393a42Smrg darwin1.*) 3292c393a42Smrg _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 3302c393a42Smrg darwin*) 3312c393a42Smrg # if running on 10.5 or later, the deployment target defaults 3322c393a42Smrg # to the OS version, if on x86, and 10.4, the deployment 3332c393a42Smrg # target defaults to 10.4. Don't you love it? 3342c393a42Smrg case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 3352c393a42Smrg 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) 3362c393a42Smrg _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 3372c393a42Smrg 10.[[012]]*) 3382c393a42Smrg _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 3392c393a42Smrg 10.*) 3402c393a42Smrg _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 3412c393a42Smrg esac 3422c393a42Smrg ;; 3432c393a42Smrg esac 3442c393a42Smrg if test "$lt_cv_apple_cc_single_mod" = "yes"; then 3452c393a42Smrg _lt_dar_single_mod='$single_module' 3462c393a42Smrg fi 3472c393a42Smrg if test "$lt_cv_ld_exported_symbols_list" = "yes"; then 3482c393a42Smrg _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' 3492c393a42Smrg else 3502c393a42Smrg _lt_dar_export_syms="~$NMEDIT -s \$output_objdir/\${libname}-symbols.expsym \${lib}" 3512c393a42Smrg fi 3522c393a42Smrg if test "$DSYMUTIL" != ":"; then 3532c393a42Smrg _lt_dsymutil="~$DSYMUTIL \$lib || :" 3542c393a42Smrg else 3552c393a42Smrg _lt_dsymutil= 3562c393a42Smrg fi 3572c393a42Smrg ;; 3582c393a42Smrg esac 3592c393a42Smrg]) 3602c393a42Smrg 3612c393a42Smrg# _LT_AC_SYS_LIBPATH_AIX 3622c393a42Smrg# ---------------------- 3632c393a42Smrg# Links a minimal program and checks the executable 3642c393a42Smrg# for the system default hardcoded library path. In most cases, 3652c393a42Smrg# this is /usr/lib:/lib, but when the MPI compilers are used 3662c393a42Smrg# the location of the communication and MPI libs are included too. 3672c393a42Smrg# If we don't find anything, use the default library path according 3682c393a42Smrg# to the aix ld manual. 3692c393a42SmrgAC_DEFUN([_LT_AC_SYS_LIBPATH_AIX], 3702c393a42Smrg[AC_REQUIRE([LT_AC_PROG_SED])dnl 3712c393a42SmrgAC_LINK_IFELSE(AC_LANG_PROGRAM,[ 3722c393a42Smrglt_aix_libpath_sed=' 3732c393a42Smrg /Import File Strings/,/^$/ { 3742c393a42Smrg /^0/ { 3752c393a42Smrg s/^0 *\(.*\)$/\1/ 3762c393a42Smrg p 3772c393a42Smrg } 3782c393a42Smrg }' 3792c393a42Smrgaix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 3802c393a42Smrg# Check for a 64-bit object if we didn't find anything. 3812c393a42Smrgif test -z "$aix_libpath"; then 3822c393a42Smrg aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 3832c393a42Smrgfi],[]) 3842c393a42Smrgif test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi 3852c393a42Smrg])# _LT_AC_SYS_LIBPATH_AIX 3862c393a42Smrg 3872c393a42Smrg 3882c393a42Smrg# _LT_AC_SHELL_INIT(ARG) 3892c393a42Smrg# ---------------------- 3902c393a42SmrgAC_DEFUN([_LT_AC_SHELL_INIT], 3912c393a42Smrg[ifdef([AC_DIVERSION_NOTICE], 3922c393a42Smrg [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], 3932c393a42Smrg [AC_DIVERT_PUSH(NOTICE)]) 3942c393a42Smrg$1 3952c393a42SmrgAC_DIVERT_POP 3962c393a42Smrg])# _LT_AC_SHELL_INIT 3972c393a42Smrg 3982c393a42Smrg 3992c393a42Smrg# _LT_AC_PROG_ECHO_BACKSLASH 4002c393a42Smrg# -------------------------- 4012c393a42Smrg# Add some code to the start of the generated configure script which 4022c393a42Smrg# will find an echo command which doesn't interpret backslashes. 4032c393a42SmrgAC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH], 4042c393a42Smrg[_LT_AC_SHELL_INIT([ 4052c393a42Smrg# Check that we are running under the correct shell. 4062c393a42SmrgSHELL=${CONFIG_SHELL-/bin/sh} 4072c393a42Smrg 4082c393a42Smrgcase X$ECHO in 4092c393a42SmrgX*--fallback-echo) 4102c393a42Smrg # Remove one level of quotation (which was required for Make). 4112c393a42Smrg ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` 4122c393a42Smrg ;; 4132c393a42Smrgesac 4142c393a42Smrg 4152c393a42Smrgecho=${ECHO-echo} 4162c393a42Smrgif test "X[$]1" = X--no-reexec; then 4172c393a42Smrg # Discard the --no-reexec flag, and continue. 4182c393a42Smrg shift 4192c393a42Smrgelif test "X[$]1" = X--fallback-echo; then 4202c393a42Smrg # Avoid inline document here, it may be left over 4212c393a42Smrg : 4222c393a42Smrgelif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then 4232c393a42Smrg # Yippee, $echo works! 4242c393a42Smrg : 4252c393a42Smrgelse 4262c393a42Smrg # Restart under the correct shell. 4272c393a42Smrg exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} 4282c393a42Smrgfi 4292c393a42Smrg 4302c393a42Smrgif test "X[$]1" = X--fallback-echo; then 4312c393a42Smrg # used as fallback echo 4322c393a42Smrg shift 4332c393a42Smrg cat <<EOF 4342c393a42Smrg[$]* 4352c393a42SmrgEOF 4362c393a42Smrg exit 0 4372c393a42Smrgfi 4382c393a42Smrg 4392c393a42Smrg# The HP-UX ksh and POSIX shell print the target directory to stdout 4402c393a42Smrg# if CDPATH is set. 4412c393a42Smrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 4422c393a42Smrg 4432c393a42Smrgif test -z "$ECHO"; then 4442c393a42Smrgif test "X${echo_test_string+set}" != Xset; then 4452c393a42Smrg# find a string as large as possible, as long as the shell can cope with it 4462c393a42Smrg for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do 4472c393a42Smrg # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... 4482c393a42Smrg if (echo_test_string=`eval $cmd`) 2>/dev/null && 4492c393a42Smrg echo_test_string=`eval $cmd` && 4502c393a42Smrg (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null 4512c393a42Smrg then 4522c393a42Smrg break 4532c393a42Smrg fi 4542c393a42Smrg done 4552c393a42Smrgfi 4562c393a42Smrg 4572c393a42Smrgif test "X`($echo '\t') 2>/dev/null`" = 'X\t' && 4582c393a42Smrg echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && 4592c393a42Smrg test "X$echo_testing_string" = "X$echo_test_string"; then 4602c393a42Smrg : 4612c393a42Smrgelse 4622c393a42Smrg # The Solaris, AIX, and Digital Unix default echo programs unquote 4632c393a42Smrg # backslashes. This makes it impossible to quote backslashes using 4642c393a42Smrg # echo "$something" | sed 's/\\/\\\\/g' 4652c393a42Smrg # 4662c393a42Smrg # So, first we look for a working echo in the user's PATH. 4672c393a42Smrg 4682c393a42Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 4692c393a42Smrg for dir in $PATH /usr/ucb; do 4702c393a42Smrg IFS="$lt_save_ifs" 4712c393a42Smrg if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && 4722c393a42Smrg test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && 4732c393a42Smrg echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && 4742c393a42Smrg test "X$echo_testing_string" = "X$echo_test_string"; then 4752c393a42Smrg echo="$dir/echo" 4762c393a42Smrg break 4772c393a42Smrg fi 4782c393a42Smrg done 4792c393a42Smrg IFS="$lt_save_ifs" 4802c393a42Smrg 4812c393a42Smrg if test "X$echo" = Xecho; then 4822c393a42Smrg # We didn't find a better echo, so look for alternatives. 4832c393a42Smrg if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && 4842c393a42Smrg echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && 4852c393a42Smrg test "X$echo_testing_string" = "X$echo_test_string"; then 4862c393a42Smrg # This shell has a builtin print -r that does the trick. 4872c393a42Smrg echo='print -r' 4882c393a42Smrg elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && 4892c393a42Smrg test "X$CONFIG_SHELL" != X/bin/ksh; then 4902c393a42Smrg # If we have ksh, try running configure again with it. 4912c393a42Smrg ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} 4922c393a42Smrg export ORIGINAL_CONFIG_SHELL 4932c393a42Smrg CONFIG_SHELL=/bin/ksh 4942c393a42Smrg export CONFIG_SHELL 4952c393a42Smrg exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} 4962c393a42Smrg else 4972c393a42Smrg # Try using printf. 4982c393a42Smrg echo='printf %s\n' 4992c393a42Smrg if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && 5002c393a42Smrg echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && 5012c393a42Smrg test "X$echo_testing_string" = "X$echo_test_string"; then 5022c393a42Smrg # Cool, printf works 5032c393a42Smrg : 5042c393a42Smrg elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && 5052c393a42Smrg test "X$echo_testing_string" = 'X\t' && 5062c393a42Smrg echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && 5072c393a42Smrg test "X$echo_testing_string" = "X$echo_test_string"; then 5082c393a42Smrg CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL 5092c393a42Smrg export CONFIG_SHELL 5102c393a42Smrg SHELL="$CONFIG_SHELL" 5112c393a42Smrg export SHELL 5122c393a42Smrg echo="$CONFIG_SHELL [$]0 --fallback-echo" 5132c393a42Smrg elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && 5142c393a42Smrg test "X$echo_testing_string" = 'X\t' && 5152c393a42Smrg echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && 5162c393a42Smrg test "X$echo_testing_string" = "X$echo_test_string"; then 5172c393a42Smrg echo="$CONFIG_SHELL [$]0 --fallback-echo" 5182c393a42Smrg else 5192c393a42Smrg # maybe with a smaller string... 5202c393a42Smrg prev=: 5212c393a42Smrg 5222c393a42Smrg for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do 5232c393a42Smrg if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null 5242c393a42Smrg then 5252c393a42Smrg break 5262c393a42Smrg fi 5272c393a42Smrg prev="$cmd" 5282c393a42Smrg done 5292c393a42Smrg 5302c393a42Smrg if test "$prev" != 'sed 50q "[$]0"'; then 5312c393a42Smrg echo_test_string=`eval $prev` 5322c393a42Smrg export echo_test_string 5332c393a42Smrg exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} 5342c393a42Smrg else 5352c393a42Smrg # Oops. We lost completely, so just stick with echo. 5362c393a42Smrg echo=echo 5372c393a42Smrg fi 5382c393a42Smrg fi 5392c393a42Smrg fi 5402c393a42Smrg fi 5412c393a42Smrgfi 5422c393a42Smrgfi 5432c393a42Smrg 5442c393a42Smrg# Copy echo and quote the copy suitably for passing to libtool from 5452c393a42Smrg# the Makefile, instead of quoting the original, which is used later. 5462c393a42SmrgECHO=$echo 5472c393a42Smrgif test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then 5482c393a42Smrg ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" 5492c393a42Smrgfi 5502c393a42Smrg 5512c393a42SmrgAC_SUBST(ECHO) 5522c393a42Smrg])])# _LT_AC_PROG_ECHO_BACKSLASH 5532c393a42Smrg 5542c393a42Smrg 5552c393a42Smrg# _LT_AC_LOCK 5562c393a42Smrg# ----------- 5572c393a42SmrgAC_DEFUN([_LT_AC_LOCK], 5582c393a42Smrg[AC_ARG_ENABLE([libtool-lock], 5592c393a42Smrg [AC_HELP_STRING([--disable-libtool-lock], 5602c393a42Smrg [avoid locking (might break parallel builds)])]) 5612c393a42Smrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes 5622c393a42Smrg 5632c393a42Smrg# Some flags need to be propagated to the compiler or linker for good 5642c393a42Smrg# libtool support. 5652c393a42Smrgcase $host in 5662c393a42Smrgia64-*-hpux*) 5672c393a42Smrg # Find out which ABI we are using. 5682c393a42Smrg echo 'int i;' > conftest.$ac_ext 5692c393a42Smrg if AC_TRY_EVAL(ac_compile); then 5702c393a42Smrg case `/usr/bin/file conftest.$ac_objext` in 5712c393a42Smrg *ELF-32*) 5722c393a42Smrg HPUX_IA64_MODE="32" 5732c393a42Smrg ;; 5742c393a42Smrg *ELF-64*) 5752c393a42Smrg HPUX_IA64_MODE="64" 5762c393a42Smrg ;; 5772c393a42Smrg esac 5782c393a42Smrg fi 5792c393a42Smrg rm -rf conftest* 5802c393a42Smrg ;; 5812c393a42Smrg*-*-irix6*) 5822c393a42Smrg # Find out which ABI we are using. 5832c393a42Smrg echo '[#]line __oline__ "configure"' > conftest.$ac_ext 5842c393a42Smrg if AC_TRY_EVAL(ac_compile); then 5852c393a42Smrg if test "$lt_cv_prog_gnu_ld" = yes; then 5862c393a42Smrg case `/usr/bin/file conftest.$ac_objext` in 5872c393a42Smrg *32-bit*) 5882c393a42Smrg LD="${LD-ld} -melf32bsmip" 5892c393a42Smrg ;; 5902c393a42Smrg *N32*) 5912c393a42Smrg LD="${LD-ld} -melf32bmipn32" 5922c393a42Smrg ;; 5932c393a42Smrg *64-bit*) 5942c393a42Smrg LD="${LD-ld} -melf64bmip" 5952c393a42Smrg ;; 5962c393a42Smrg esac 5972c393a42Smrg else 5982c393a42Smrg case `/usr/bin/file conftest.$ac_objext` in 5992c393a42Smrg *32-bit*) 6002c393a42Smrg LD="${LD-ld} -32" 6012c393a42Smrg ;; 6022c393a42Smrg *N32*) 6032c393a42Smrg LD="${LD-ld} -n32" 6042c393a42Smrg ;; 6052c393a42Smrg *64-bit*) 6062c393a42Smrg LD="${LD-ld} -64" 6072c393a42Smrg ;; 6082c393a42Smrg esac 6092c393a42Smrg fi 6102c393a42Smrg fi 6112c393a42Smrg rm -rf conftest* 6122c393a42Smrg ;; 6132c393a42Smrg 6142c393a42Smrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ 6152c393a42Smrgs390*-*linux*|sparc*-*linux*) 6162c393a42Smrg # Find out which ABI we are using. 6172c393a42Smrg echo 'int i;' > conftest.$ac_ext 6182c393a42Smrg if AC_TRY_EVAL(ac_compile); then 6192c393a42Smrg case `/usr/bin/file conftest.o` in 6202c393a42Smrg *32-bit*) 6212c393a42Smrg case $host in 6222c393a42Smrg x86_64-*kfreebsd*-gnu) 6232c393a42Smrg LD="${LD-ld} -m elf_i386_fbsd" 6242c393a42Smrg ;; 6252c393a42Smrg x86_64-*linux*) 6262c393a42Smrg LD="${LD-ld} -m elf_i386" 6272c393a42Smrg ;; 6282c393a42Smrg ppc64-*linux*|powerpc64-*linux*) 6292c393a42Smrg LD="${LD-ld} -m elf32ppclinux" 6302c393a42Smrg ;; 6312c393a42Smrg s390x-*linux*) 6322c393a42Smrg LD="${LD-ld} -m elf_s390" 6332c393a42Smrg ;; 6342c393a42Smrg sparc64-*linux*) 6352c393a42Smrg LD="${LD-ld} -m elf32_sparc" 6362c393a42Smrg ;; 6372c393a42Smrg esac 6382c393a42Smrg ;; 6392c393a42Smrg *64-bit*) 6402c393a42Smrg case $host in 6412c393a42Smrg x86_64-*kfreebsd*-gnu) 6422c393a42Smrg LD="${LD-ld} -m elf_x86_64_fbsd" 6432c393a42Smrg ;; 6442c393a42Smrg x86_64-*linux*) 6452c393a42Smrg LD="${LD-ld} -m elf_x86_64" 6462c393a42Smrg ;; 6472c393a42Smrg ppc*-*linux*|powerpc*-*linux*) 6482c393a42Smrg LD="${LD-ld} -m elf64ppc" 6492c393a42Smrg ;; 6502c393a42Smrg s390*-*linux*) 6512c393a42Smrg LD="${LD-ld} -m elf64_s390" 6522c393a42Smrg ;; 6532c393a42Smrg sparc*-*linux*) 6542c393a42Smrg LD="${LD-ld} -m elf64_sparc" 6552c393a42Smrg ;; 6562c393a42Smrg esac 6572c393a42Smrg ;; 6582c393a42Smrg esac 6592c393a42Smrg fi 6602c393a42Smrg rm -rf conftest* 6612c393a42Smrg ;; 6622c393a42Smrg 6632c393a42Smrg*-*-sco3.2v5*) 6642c393a42Smrg # On SCO OpenServer 5, we need -belf to get full-featured binaries. 6652c393a42Smrg SAVE_CFLAGS="$CFLAGS" 6662c393a42Smrg CFLAGS="$CFLAGS -belf" 6672c393a42Smrg AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 6682c393a42Smrg [AC_LANG_PUSH(C) 6692c393a42Smrg AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 6702c393a42Smrg AC_LANG_POP]) 6712c393a42Smrg if test x"$lt_cv_cc_needs_belf" != x"yes"; then 6722c393a42Smrg # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 6732c393a42Smrg CFLAGS="$SAVE_CFLAGS" 6742c393a42Smrg fi 6752c393a42Smrg ;; 6762c393a42Smrgsparc*-*solaris*) 6772c393a42Smrg # Find out which ABI we are using. 6782c393a42Smrg echo 'int i;' > conftest.$ac_ext 6792c393a42Smrg if AC_TRY_EVAL(ac_compile); then 6802c393a42Smrg case `/usr/bin/file conftest.o` in 6812c393a42Smrg *64-bit*) 6822c393a42Smrg case $lt_cv_prog_gnu_ld in 6832c393a42Smrg yes*) LD="${LD-ld} -m elf64_sparc" ;; 6842c393a42Smrg *) 6852c393a42Smrg if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then 6862c393a42Smrg LD="${LD-ld} -64" 6872c393a42Smrg fi 6882c393a42Smrg ;; 6892c393a42Smrg esac 6902c393a42Smrg ;; 6912c393a42Smrg esac 6922c393a42Smrg fi 6932c393a42Smrg rm -rf conftest* 6942c393a42Smrg ;; 6952c393a42Smrg 6962c393a42SmrgAC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], 6972c393a42Smrg[*-*-cygwin* | *-*-mingw* | *-*-pw32*) 6982c393a42Smrg AC_CHECK_TOOL(DLLTOOL, dlltool, false) 6992c393a42Smrg AC_CHECK_TOOL(AS, as, false) 7002c393a42Smrg AC_CHECK_TOOL(OBJDUMP, objdump, false) 7012c393a42Smrg ;; 7022c393a42Smrg ]) 7032c393a42Smrgesac 7042c393a42Smrg 7052c393a42Smrgneed_locks="$enable_libtool_lock" 7062c393a42Smrg 7072c393a42Smrg])# _LT_AC_LOCK 7082c393a42Smrg 7092c393a42Smrg 7102c393a42Smrg# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 7112c393a42Smrg# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 7122c393a42Smrg# ---------------------------------------------------------------- 7132c393a42Smrg# Check whether the given compiler option works 7142c393a42SmrgAC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], 7152c393a42Smrg[AC_REQUIRE([LT_AC_PROG_SED]) 7162c393a42SmrgAC_CACHE_CHECK([$1], [$2], 7172c393a42Smrg [$2=no 7182c393a42Smrg ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 7192c393a42Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 7202c393a42Smrg lt_compiler_flag="$3" 7212c393a42Smrg # Insert the option either (1) after the last *FLAGS variable, or 7222c393a42Smrg # (2) before a word containing "conftest.", or (3) at the end. 7232c393a42Smrg # Note that $ac_compile itself does not contain backslashes and begins 7242c393a42Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 7252c393a42Smrg # The option is referenced via a variable to avoid confusing sed. 7262c393a42Smrg lt_compile=`echo "$ac_compile" | $SED \ 7272c393a42Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 7282c393a42Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 7292c393a42Smrg -e 's:$: $lt_compiler_flag:'` 7302c393a42Smrg (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 7312c393a42Smrg (eval "$lt_compile" 2>conftest.err) 7322c393a42Smrg ac_status=$? 7332c393a42Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 7342c393a42Smrg echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 7352c393a42Smrg if (exit $ac_status) && test -s "$ac_outfile"; then 7362c393a42Smrg # The compiler can only warn and ignore the option if not recognized 7372c393a42Smrg # So say no if there are warnings other than the usual output. 7382c393a42Smrg $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp 7392c393a42Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 7402c393a42Smrg if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 7412c393a42Smrg $2=yes 7422c393a42Smrg fi 7432c393a42Smrg fi 7442c393a42Smrg $rm conftest* 7452c393a42Smrg]) 7462c393a42Smrg 7472c393a42Smrgif test x"[$]$2" = xyes; then 7482c393a42Smrg ifelse([$5], , :, [$5]) 7492c393a42Smrgelse 7502c393a42Smrg ifelse([$6], , :, [$6]) 7512c393a42Smrgfi 7522c393a42Smrg])# AC_LIBTOOL_COMPILER_OPTION 7532c393a42Smrg 7542c393a42Smrg 7552c393a42Smrg# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 7562c393a42Smrg# [ACTION-SUCCESS], [ACTION-FAILURE]) 7572c393a42Smrg# ------------------------------------------------------------ 7582c393a42Smrg# Check whether the given compiler option works 7592c393a42SmrgAC_DEFUN([AC_LIBTOOL_LINKER_OPTION], 7602c393a42Smrg[AC_REQUIRE([LT_AC_PROG_SED])dnl 7612c393a42SmrgAC_CACHE_CHECK([$1], [$2], 7622c393a42Smrg [$2=no 7632c393a42Smrg save_LDFLAGS="$LDFLAGS" 7642c393a42Smrg LDFLAGS="$LDFLAGS $3" 7652c393a42Smrg echo "$lt_simple_link_test_code" > conftest.$ac_ext 7662c393a42Smrg if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 7672c393a42Smrg # The linker can only warn and ignore the option if not recognized 7682c393a42Smrg # So say no if there are warnings 7692c393a42Smrg if test -s conftest.err; then 7702c393a42Smrg # Append any errors to the config.log. 7712c393a42Smrg cat conftest.err 1>&AS_MESSAGE_LOG_FD 7722c393a42Smrg $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp 7732c393a42Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 7742c393a42Smrg if diff conftest.exp conftest.er2 >/dev/null; then 7752c393a42Smrg $2=yes 7762c393a42Smrg fi 7772c393a42Smrg else 7782c393a42Smrg $2=yes 7792c393a42Smrg fi 7802c393a42Smrg fi 7812c393a42Smrg $rm -r conftest* 7822c393a42Smrg LDFLAGS="$save_LDFLAGS" 7832c393a42Smrg]) 7842c393a42Smrg 7852c393a42Smrgif test x"[$]$2" = xyes; then 7862c393a42Smrg ifelse([$4], , :, [$4]) 7872c393a42Smrgelse 7882c393a42Smrg ifelse([$5], , :, [$5]) 7892c393a42Smrgfi 7902c393a42Smrg])# AC_LIBTOOL_LINKER_OPTION 7912c393a42Smrg 7922c393a42Smrg 7932c393a42Smrg# AC_LIBTOOL_SYS_MAX_CMD_LEN 7942c393a42Smrg# -------------------------- 7952c393a42SmrgAC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], 7962c393a42Smrg[# find the maximum length of command line arguments 7972c393a42SmrgAC_MSG_CHECKING([the maximum length of command line arguments]) 7982c393a42SmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 7992c393a42Smrg i=0 8002c393a42Smrg teststring="ABCD" 8012c393a42Smrg 8022c393a42Smrg case $build_os in 8032c393a42Smrg msdosdjgpp*) 8042c393a42Smrg # On DJGPP, this test can blow up pretty badly due to problems in libc 8052c393a42Smrg # (any single argument exceeding 2000 bytes causes a buffer overrun 8062c393a42Smrg # during glob expansion). Even if it were fixed, the result of this 8072c393a42Smrg # check would be larger than it should be. 8082c393a42Smrg lt_cv_sys_max_cmd_len=12288; # 12K is about right 8092c393a42Smrg ;; 8102c393a42Smrg 8112c393a42Smrg gnu*) 8122c393a42Smrg # Under GNU Hurd, this test is not required because there is 8132c393a42Smrg # no limit to the length of command line arguments. 8142c393a42Smrg # Libtool will interpret -1 as no limit whatsoever 8152c393a42Smrg lt_cv_sys_max_cmd_len=-1; 8162c393a42Smrg ;; 8172c393a42Smrg 8182c393a42Smrg cygwin* | mingw*) 8192c393a42Smrg # On Win9x/ME, this test blows up -- it succeeds, but takes 8202c393a42Smrg # about 5 minutes as the teststring grows exponentially. 8212c393a42Smrg # Worse, since 9x/ME are not pre-emptively multitasking, 8222c393a42Smrg # you end up with a "frozen" computer, even though with patience 8232c393a42Smrg # the test eventually succeeds (with a max line length of 256k). 8242c393a42Smrg # Instead, let's just punt: use the minimum linelength reported by 8252c393a42Smrg # all of the supported platforms: 8192 (on NT/2K/XP). 8262c393a42Smrg lt_cv_sys_max_cmd_len=8192; 8272c393a42Smrg ;; 8282c393a42Smrg 8292c393a42Smrg amigaos*) 8302c393a42Smrg # On AmigaOS with pdksh, this test takes hours, literally. 8312c393a42Smrg # So we just punt and use a minimum line length of 8192. 8322c393a42Smrg lt_cv_sys_max_cmd_len=8192; 8332c393a42Smrg ;; 8342c393a42Smrg 8352c393a42Smrg netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) 8362c393a42Smrg # This has been around since 386BSD, at least. Likely further. 8372c393a42Smrg if test -x /sbin/sysctl; then 8382c393a42Smrg lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 8392c393a42Smrg elif test -x /usr/sbin/sysctl; then 8402c393a42Smrg lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 8412c393a42Smrg else 8422c393a42Smrg lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 8432c393a42Smrg fi 8442c393a42Smrg # And add a safety zone 8452c393a42Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 8462c393a42Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 8472c393a42Smrg ;; 8482c393a42Smrg 8492c393a42Smrg interix*) 8502c393a42Smrg # We know the value 262144 and hardcode it with a safety zone (like BSD) 8512c393a42Smrg lt_cv_sys_max_cmd_len=196608 8522c393a42Smrg ;; 8532c393a42Smrg 8542c393a42Smrg osf*) 8552c393a42Smrg # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 8562c393a42Smrg # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 8572c393a42Smrg # nice to cause kernel panics so lets avoid the loop below. 8582c393a42Smrg # First set a reasonable default. 8592c393a42Smrg lt_cv_sys_max_cmd_len=16384 8602c393a42Smrg # 8612c393a42Smrg if test -x /sbin/sysconfig; then 8622c393a42Smrg case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 8632c393a42Smrg *1*) lt_cv_sys_max_cmd_len=-1 ;; 8642c393a42Smrg esac 8652c393a42Smrg fi 8662c393a42Smrg ;; 8672c393a42Smrg sco3.2v5*) 8682c393a42Smrg lt_cv_sys_max_cmd_len=102400 8692c393a42Smrg ;; 8702c393a42Smrg sysv5* | sco5v6* | sysv4.2uw2*) 8712c393a42Smrg kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 8722c393a42Smrg if test -n "$kargmax"; then 8732c393a42Smrg lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` 8742c393a42Smrg else 8752c393a42Smrg lt_cv_sys_max_cmd_len=32768 8762c393a42Smrg fi 8772c393a42Smrg ;; 8782c393a42Smrg *) 8792c393a42Smrg lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 8802c393a42Smrg if test -n "$lt_cv_sys_max_cmd_len"; then 8812c393a42Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 8822c393a42Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 8832c393a42Smrg else 8842c393a42Smrg SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 8852c393a42Smrg while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \ 8862c393a42Smrg = "XX$teststring") >/dev/null 2>&1 && 8872c393a42Smrg new_result=`expr "X$teststring" : ".*" 2>&1` && 8882c393a42Smrg lt_cv_sys_max_cmd_len=$new_result && 8892c393a42Smrg test $i != 17 # 1/2 MB should be enough 8902c393a42Smrg do 8912c393a42Smrg i=`expr $i + 1` 8922c393a42Smrg teststring=$teststring$teststring 8932c393a42Smrg done 8942c393a42Smrg teststring= 8952c393a42Smrg # Add a significant safety factor because C++ compilers can tack on massive 8962c393a42Smrg # amounts of additional arguments before passing them to the linker. 8972c393a42Smrg # It appears as though 1/2 is a usable value. 8982c393a42Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 8992c393a42Smrg fi 9002c393a42Smrg ;; 9012c393a42Smrg esac 9022c393a42Smrg]) 9032c393a42Smrgif test -n $lt_cv_sys_max_cmd_len ; then 9042c393a42Smrg AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 9052c393a42Smrgelse 9062c393a42Smrg AC_MSG_RESULT(none) 9072c393a42Smrgfi 9082c393a42Smrg])# AC_LIBTOOL_SYS_MAX_CMD_LEN 9092c393a42Smrg 9102c393a42Smrg 9112c393a42Smrg# _LT_AC_CHECK_DLFCN 9122c393a42Smrg# ------------------ 9132c393a42SmrgAC_DEFUN([_LT_AC_CHECK_DLFCN], 9142c393a42Smrg[AC_CHECK_HEADERS(dlfcn.h)dnl 9152c393a42Smrg])# _LT_AC_CHECK_DLFCN 9162c393a42Smrg 9172c393a42Smrg 9182c393a42Smrg# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 9192c393a42Smrg# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 9202c393a42Smrg# --------------------------------------------------------------------- 9212c393a42SmrgAC_DEFUN([_LT_AC_TRY_DLOPEN_SELF], 9222c393a42Smrg[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl 9232c393a42Smrgif test "$cross_compiling" = yes; then : 9242c393a42Smrg [$4] 9252c393a42Smrgelse 9262c393a42Smrg lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 9272c393a42Smrg lt_status=$lt_dlunknown 9282c393a42Smrg cat > conftest.$ac_ext <<EOF 9292c393a42Smrg[#line __oline__ "configure" 9302c393a42Smrg#include "confdefs.h" 9312c393a42Smrg 9322c393a42Smrg#if HAVE_DLFCN_H 9332c393a42Smrg#include <dlfcn.h> 9342c393a42Smrg#endif 9352c393a42Smrg 9362c393a42Smrg#include <stdio.h> 9372c393a42Smrg 9382c393a42Smrg#ifdef RTLD_GLOBAL 9392c393a42Smrg# define LT_DLGLOBAL RTLD_GLOBAL 9402c393a42Smrg#else 9412c393a42Smrg# ifdef DL_GLOBAL 9422c393a42Smrg# define LT_DLGLOBAL DL_GLOBAL 9432c393a42Smrg# else 9442c393a42Smrg# define LT_DLGLOBAL 0 9452c393a42Smrg# endif 9462c393a42Smrg#endif 9472c393a42Smrg 9482c393a42Smrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 9492c393a42Smrg find out it does not work in some platform. */ 9502c393a42Smrg#ifndef LT_DLLAZY_OR_NOW 9512c393a42Smrg# ifdef RTLD_LAZY 9522c393a42Smrg# define LT_DLLAZY_OR_NOW RTLD_LAZY 9532c393a42Smrg# else 9542c393a42Smrg# ifdef DL_LAZY 9552c393a42Smrg# define LT_DLLAZY_OR_NOW DL_LAZY 9562c393a42Smrg# else 9572c393a42Smrg# ifdef RTLD_NOW 9582c393a42Smrg# define LT_DLLAZY_OR_NOW RTLD_NOW 9592c393a42Smrg# else 9602c393a42Smrg# ifdef DL_NOW 9612c393a42Smrg# define LT_DLLAZY_OR_NOW DL_NOW 9622c393a42Smrg# else 9632c393a42Smrg# define LT_DLLAZY_OR_NOW 0 9642c393a42Smrg# endif 9652c393a42Smrg# endif 9662c393a42Smrg# endif 9672c393a42Smrg# endif 9682c393a42Smrg#endif 9692c393a42Smrg 9702c393a42Smrg#ifdef __cplusplus 9712c393a42Smrgextern "C" void exit (int); 9722c393a42Smrg#endif 9732c393a42Smrg 9742c393a42Smrgvoid fnord() { int i=42;} 9752c393a42Smrgint main () 9762c393a42Smrg{ 9772c393a42Smrg void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 9782c393a42Smrg int status = $lt_dlunknown; 9792c393a42Smrg 9802c393a42Smrg if (self) 9812c393a42Smrg { 9822c393a42Smrg if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 9832c393a42Smrg else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 9842c393a42Smrg /* dlclose (self); */ 9852c393a42Smrg } 9862c393a42Smrg else 9872c393a42Smrg puts (dlerror ()); 9882c393a42Smrg 9892c393a42Smrg exit (status); 9902c393a42Smrg}] 9912c393a42SmrgEOF 9922c393a42Smrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then 9932c393a42Smrg (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 9942c393a42Smrg lt_status=$? 9952c393a42Smrg case x$lt_status in 9962c393a42Smrg x$lt_dlno_uscore) $1 ;; 9972c393a42Smrg x$lt_dlneed_uscore) $2 ;; 9982c393a42Smrg x$lt_dlunknown|x*) $3 ;; 9992c393a42Smrg esac 10002c393a42Smrg else : 10012c393a42Smrg # compilation failed 10022c393a42Smrg $3 10032c393a42Smrg fi 10042c393a42Smrgfi 10052c393a42Smrgrm -fr conftest* 10062c393a42Smrg])# _LT_AC_TRY_DLOPEN_SELF 10072c393a42Smrg 10082c393a42Smrg 10092c393a42Smrg# AC_LIBTOOL_DLOPEN_SELF 10102c393a42Smrg# ---------------------- 10112c393a42SmrgAC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], 10122c393a42Smrg[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl 10132c393a42Smrgif test "x$enable_dlopen" != xyes; then 10142c393a42Smrg enable_dlopen=unknown 10152c393a42Smrg enable_dlopen_self=unknown 10162c393a42Smrg enable_dlopen_self_static=unknown 10172c393a42Smrgelse 10182c393a42Smrg lt_cv_dlopen=no 10192c393a42Smrg lt_cv_dlopen_libs= 10202c393a42Smrg 10212c393a42Smrg case $host_os in 10222c393a42Smrg beos*) 10232c393a42Smrg lt_cv_dlopen="load_add_on" 10242c393a42Smrg lt_cv_dlopen_libs= 10252c393a42Smrg lt_cv_dlopen_self=yes 10262c393a42Smrg ;; 10272c393a42Smrg 10282c393a42Smrg mingw* | pw32*) 10292c393a42Smrg lt_cv_dlopen="LoadLibrary" 10302c393a42Smrg lt_cv_dlopen_libs= 10312c393a42Smrg ;; 10322c393a42Smrg 10332c393a42Smrg cygwin*) 10342c393a42Smrg lt_cv_dlopen="dlopen" 10352c393a42Smrg lt_cv_dlopen_libs= 10362c393a42Smrg ;; 10372c393a42Smrg 10382c393a42Smrg darwin*) 10392c393a42Smrg # if libdl is installed we need to link against it 10402c393a42Smrg AC_CHECK_LIB([dl], [dlopen], 10412c393a42Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ 10422c393a42Smrg lt_cv_dlopen="dyld" 10432c393a42Smrg lt_cv_dlopen_libs= 10442c393a42Smrg lt_cv_dlopen_self=yes 10452c393a42Smrg ]) 10462c393a42Smrg ;; 10472c393a42Smrg 10482c393a42Smrg *) 10492c393a42Smrg AC_CHECK_FUNC([shl_load], 10502c393a42Smrg [lt_cv_dlopen="shl_load"], 10512c393a42Smrg [AC_CHECK_LIB([dld], [shl_load], 10522c393a42Smrg [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], 10532c393a42Smrg [AC_CHECK_FUNC([dlopen], 10542c393a42Smrg [lt_cv_dlopen="dlopen"], 10552c393a42Smrg [AC_CHECK_LIB([dl], [dlopen], 10562c393a42Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], 10572c393a42Smrg [AC_CHECK_LIB([svld], [dlopen], 10582c393a42Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], 10592c393a42Smrg [AC_CHECK_LIB([dld], [dld_link], 10602c393a42Smrg [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) 10612c393a42Smrg ]) 10622c393a42Smrg ]) 10632c393a42Smrg ]) 10642c393a42Smrg ]) 10652c393a42Smrg ]) 10662c393a42Smrg ;; 10672c393a42Smrg esac 10682c393a42Smrg 10692c393a42Smrg if test "x$lt_cv_dlopen" != xno; then 10702c393a42Smrg enable_dlopen=yes 10712c393a42Smrg else 10722c393a42Smrg enable_dlopen=no 10732c393a42Smrg fi 10742c393a42Smrg 10752c393a42Smrg case $lt_cv_dlopen in 10762c393a42Smrg dlopen) 10772c393a42Smrg save_CPPFLAGS="$CPPFLAGS" 10782c393a42Smrg test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 10792c393a42Smrg 10802c393a42Smrg save_LDFLAGS="$LDFLAGS" 10812c393a42Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 10822c393a42Smrg 10832c393a42Smrg save_LIBS="$LIBS" 10842c393a42Smrg LIBS="$lt_cv_dlopen_libs $LIBS" 10852c393a42Smrg 10862c393a42Smrg AC_CACHE_CHECK([whether a program can dlopen itself], 10872c393a42Smrg lt_cv_dlopen_self, [dnl 10882c393a42Smrg _LT_AC_TRY_DLOPEN_SELF( 10892c393a42Smrg lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 10902c393a42Smrg lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 10912c393a42Smrg ]) 10922c393a42Smrg 10932c393a42Smrg if test "x$lt_cv_dlopen_self" = xyes; then 10942c393a42Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 10952c393a42Smrg AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 10962c393a42Smrg lt_cv_dlopen_self_static, [dnl 10972c393a42Smrg _LT_AC_TRY_DLOPEN_SELF( 10982c393a42Smrg lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 10992c393a42Smrg lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 11002c393a42Smrg ]) 11012c393a42Smrg fi 11022c393a42Smrg 11032c393a42Smrg CPPFLAGS="$save_CPPFLAGS" 11042c393a42Smrg LDFLAGS="$save_LDFLAGS" 11052c393a42Smrg LIBS="$save_LIBS" 11062c393a42Smrg ;; 11072c393a42Smrg esac 11082c393a42Smrg 11092c393a42Smrg case $lt_cv_dlopen_self in 11102c393a42Smrg yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 11112c393a42Smrg *) enable_dlopen_self=unknown ;; 11122c393a42Smrg esac 11132c393a42Smrg 11142c393a42Smrg case $lt_cv_dlopen_self_static in 11152c393a42Smrg yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 11162c393a42Smrg *) enable_dlopen_self_static=unknown ;; 11172c393a42Smrg esac 11182c393a42Smrgfi 11192c393a42Smrg])# AC_LIBTOOL_DLOPEN_SELF 11202c393a42Smrg 11212c393a42Smrg 11222c393a42Smrg# AC_LIBTOOL_PROG_CC_C_O([TAGNAME]) 11232c393a42Smrg# --------------------------------- 11242c393a42Smrg# Check to see if options -c and -o are simultaneously supported by compiler 11252c393a42SmrgAC_DEFUN([AC_LIBTOOL_PROG_CC_C_O], 11262c393a42Smrg[AC_REQUIRE([LT_AC_PROG_SED])dnl 11272c393a42SmrgAC_REQUIRE([_LT_AC_SYS_COMPILER])dnl 11282c393a42SmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 11292c393a42Smrg [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 11302c393a42Smrg [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 11312c393a42Smrg $rm -r conftest 2>/dev/null 11322c393a42Smrg mkdir conftest 11332c393a42Smrg cd conftest 11342c393a42Smrg mkdir out 11352c393a42Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 11362c393a42Smrg 11372c393a42Smrg lt_compiler_flag="-o out/conftest2.$ac_objext" 11382c393a42Smrg # Insert the option either (1) after the last *FLAGS variable, or 11392c393a42Smrg # (2) before a word containing "conftest.", or (3) at the end. 11402c393a42Smrg # Note that $ac_compile itself does not contain backslashes and begins 11412c393a42Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 11422c393a42Smrg lt_compile=`echo "$ac_compile" | $SED \ 11432c393a42Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 11442c393a42Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 11452c393a42Smrg -e 's:$: $lt_compiler_flag:'` 11462c393a42Smrg (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 11472c393a42Smrg (eval "$lt_compile" 2>out/conftest.err) 11482c393a42Smrg ac_status=$? 11492c393a42Smrg cat out/conftest.err >&AS_MESSAGE_LOG_FD 11502c393a42Smrg echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 11512c393a42Smrg if (exit $ac_status) && test -s out/conftest2.$ac_objext 11522c393a42Smrg then 11532c393a42Smrg # The compiler can only warn and ignore the option if not recognized 11542c393a42Smrg # So say no if there are warnings 11552c393a42Smrg $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp 11562c393a42Smrg $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 11572c393a42Smrg if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 11582c393a42Smrg _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 11592c393a42Smrg fi 11602c393a42Smrg fi 11612c393a42Smrg chmod u+w . 2>&AS_MESSAGE_LOG_FD 11622c393a42Smrg $rm conftest* 11632c393a42Smrg # SGI C++ compiler will create directory out/ii_files/ for 11642c393a42Smrg # template instantiation 11652c393a42Smrg test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files 11662c393a42Smrg $rm out/* && rmdir out 11672c393a42Smrg cd .. 11682c393a42Smrg rmdir conftest 11692c393a42Smrg $rm conftest* 11702c393a42Smrg]) 11712c393a42Smrg])# AC_LIBTOOL_PROG_CC_C_O 11722c393a42Smrg 11732c393a42Smrg 11742c393a42Smrg# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME]) 11752c393a42Smrg# ----------------------------------------- 11762c393a42Smrg# Check to see if we can do hard links to lock some files if needed 11772c393a42SmrgAC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], 11782c393a42Smrg[AC_REQUIRE([_LT_AC_LOCK])dnl 11792c393a42Smrg 11802c393a42Smrghard_links="nottested" 11812c393a42Smrgif test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then 11822c393a42Smrg # do not overwrite the value of need_locks provided by the user 11832c393a42Smrg AC_MSG_CHECKING([if we can lock with hard links]) 11842c393a42Smrg hard_links=yes 11852c393a42Smrg $rm conftest* 11862c393a42Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 11872c393a42Smrg touch conftest.a 11882c393a42Smrg ln conftest.a conftest.b 2>&5 || hard_links=no 11892c393a42Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 11902c393a42Smrg AC_MSG_RESULT([$hard_links]) 11912c393a42Smrg if test "$hard_links" = no; then 11922c393a42Smrg AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) 11932c393a42Smrg need_locks=warn 11942c393a42Smrg fi 11952c393a42Smrgelse 11962c393a42Smrg need_locks=no 11972c393a42Smrgfi 11982c393a42Smrg])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS 11992c393a42Smrg 12002c393a42Smrg 12012c393a42Smrg# AC_LIBTOOL_OBJDIR 12022c393a42Smrg# ----------------- 12032c393a42SmrgAC_DEFUN([AC_LIBTOOL_OBJDIR], 12042c393a42Smrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 12052c393a42Smrg[rm -f .libs 2>/dev/null 12062c393a42Smrgmkdir .libs 2>/dev/null 12072c393a42Smrgif test -d .libs; then 12082c393a42Smrg lt_cv_objdir=.libs 12092c393a42Smrgelse 12102c393a42Smrg # MS-DOS does not allow filenames that begin with a dot. 12112c393a42Smrg lt_cv_objdir=_libs 12122c393a42Smrgfi 12132c393a42Smrgrmdir .libs 2>/dev/null]) 12142c393a42Smrgobjdir=$lt_cv_objdir 12152c393a42Smrg])# AC_LIBTOOL_OBJDIR 12162c393a42Smrg 12172c393a42Smrg 12182c393a42Smrg# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME]) 12192c393a42Smrg# ---------------------------------------------- 12202c393a42Smrg# Check hardcoding attributes. 12212c393a42SmrgAC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], 12222c393a42Smrg[AC_MSG_CHECKING([how to hardcode library paths into programs]) 12232c393a42Smrg_LT_AC_TAGVAR(hardcode_action, $1)= 12242c393a42Smrgif test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \ 12252c393a42Smrg test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \ 12262c393a42Smrg test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then 12272c393a42Smrg 12282c393a42Smrg # We can hardcode non-existant directories. 12292c393a42Smrg if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no && 12302c393a42Smrg # If the only mechanism to avoid hardcoding is shlibpath_var, we 12312c393a42Smrg # have to relink, otherwise we might link with an installed library 12322c393a42Smrg # when we should be linking with a yet-to-be-installed one 12332c393a42Smrg ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no && 12342c393a42Smrg test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then 12352c393a42Smrg # Linking always hardcodes the temporary library directory. 12362c393a42Smrg _LT_AC_TAGVAR(hardcode_action, $1)=relink 12372c393a42Smrg else 12382c393a42Smrg # We can link without hardcoding, and we can hardcode nonexisting dirs. 12392c393a42Smrg _LT_AC_TAGVAR(hardcode_action, $1)=immediate 12402c393a42Smrg fi 12412c393a42Smrgelse 12422c393a42Smrg # We cannot hardcode anything, or else we can only hardcode existing 12432c393a42Smrg # directories. 12442c393a42Smrg _LT_AC_TAGVAR(hardcode_action, $1)=unsupported 12452c393a42Smrgfi 12462c393a42SmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)]) 12472c393a42Smrg 12482c393a42Smrgif test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then 12492c393a42Smrg # Fast installation is not supported 12502c393a42Smrg enable_fast_install=no 12512c393a42Smrgelif test "$shlibpath_overrides_runpath" = yes || 12522c393a42Smrg test "$enable_shared" = no; then 12532c393a42Smrg # Fast installation is not necessary 12542c393a42Smrg enable_fast_install=needless 12552c393a42Smrgfi 12562c393a42Smrg])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH 12572c393a42Smrg 12582c393a42Smrg 12592c393a42Smrg# AC_LIBTOOL_SYS_LIB_STRIP 12602c393a42Smrg# ------------------------ 12612c393a42SmrgAC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP], 12622c393a42Smrg[striplib= 12632c393a42Smrgold_striplib= 12642c393a42SmrgAC_MSG_CHECKING([whether stripping libraries is possible]) 12652c393a42Smrgif test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then 12662c393a42Smrg test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" 12672c393a42Smrg test -z "$striplib" && striplib="$STRIP --strip-unneeded" 12682c393a42Smrg AC_MSG_RESULT([yes]) 12692c393a42Smrgelse 12702c393a42Smrg# FIXME - insert some real tests, host_os isn't really good enough 12712c393a42Smrg case $host_os in 12722c393a42Smrg darwin*) 12732c393a42Smrg if test -n "$STRIP" ; then 12742c393a42Smrg striplib="$STRIP -x" 12752c393a42Smrg old_striplib="$STRIP -S" 12762c393a42Smrg AC_MSG_RESULT([yes]) 12772c393a42Smrg else 12782c393a42Smrg AC_MSG_RESULT([no]) 12792c393a42Smrgfi 12802c393a42Smrg ;; 12812c393a42Smrg *) 12822c393a42Smrg AC_MSG_RESULT([no]) 12832c393a42Smrg ;; 12842c393a42Smrg esac 12852c393a42Smrgfi 12862c393a42Smrg])# AC_LIBTOOL_SYS_LIB_STRIP 12872c393a42Smrg 12882c393a42Smrg 12892c393a42Smrg# AC_LIBTOOL_SYS_DYNAMIC_LINKER 12902c393a42Smrg# ----------------------------- 12912c393a42Smrg# PORTME Fill in your ld.so characteristics 12922c393a42SmrgAC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER], 12932c393a42Smrg[AC_REQUIRE([LT_AC_PROG_SED])dnl 12942c393a42SmrgAC_MSG_CHECKING([dynamic linker characteristics]) 12952c393a42Smrglibrary_names_spec= 12962c393a42Smrglibname_spec='lib$name' 12972c393a42Smrgsoname_spec= 12982c393a42Smrgshrext_cmds=".so" 12992c393a42Smrgpostinstall_cmds= 13002c393a42Smrgpostuninstall_cmds= 13012c393a42Smrgfinish_cmds= 13022c393a42Smrgfinish_eval= 13032c393a42Smrgshlibpath_var= 13042c393a42Smrgshlibpath_overrides_runpath=unknown 13052c393a42Smrgversion_type=none 13062c393a42Smrgdynamic_linker="$host_os ld.so" 13072c393a42Smrgsys_lib_dlsearch_path_spec="/lib /usr/lib" 13082c393a42Smrgm4_if($1,[],[ 13092c393a42Smrgif test "$GCC" = yes; then 13102c393a42Smrg case $host_os in 13112c393a42Smrg darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; 13122c393a42Smrg *) lt_awk_arg="/^libraries:/" ;; 13132c393a42Smrg esac 13142c393a42Smrg lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` 13152c393a42Smrg if echo "$lt_search_path_spec" | grep ';' >/dev/null ; then 13162c393a42Smrg # if the path contains ";" then we assume it to be the separator 13172c393a42Smrg # otherwise default to the standard path separator (i.e. ":") - it is 13182c393a42Smrg # assumed that no part of a normal pathname contains ";" but that should 13192c393a42Smrg # okay in the real world where ";" in dirpaths is itself problematic. 13202c393a42Smrg lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e 's/;/ /g'` 13212c393a42Smrg else 13222c393a42Smrg lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 13232c393a42Smrg fi 13242c393a42Smrg # Ok, now we have the path, separated by spaces, we can step through it 13252c393a42Smrg # and add multilib dir if necessary. 13262c393a42Smrg lt_tmp_lt_search_path_spec= 13272c393a42Smrg lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 13282c393a42Smrg for lt_sys_path in $lt_search_path_spec; do 13292c393a42Smrg if test -d "$lt_sys_path/$lt_multi_os_dir"; then 13302c393a42Smrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" 13312c393a42Smrg else 13322c393a42Smrg test -d "$lt_sys_path" && \ 13332c393a42Smrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 13342c393a42Smrg fi 13352c393a42Smrg done 13362c393a42Smrg lt_search_path_spec=`echo $lt_tmp_lt_search_path_spec | awk ' 13372c393a42SmrgBEGIN {RS=" "; FS="/|\n";} { 13382c393a42Smrg lt_foo=""; 13392c393a42Smrg lt_count=0; 13402c393a42Smrg for (lt_i = NF; lt_i > 0; lt_i--) { 13412c393a42Smrg if ($lt_i != "" && $lt_i != ".") { 13422c393a42Smrg if ($lt_i == "..") { 13432c393a42Smrg lt_count++; 13442c393a42Smrg } else { 13452c393a42Smrg if (lt_count == 0) { 13462c393a42Smrg lt_foo="/" $lt_i lt_foo; 13472c393a42Smrg } else { 13482c393a42Smrg lt_count--; 13492c393a42Smrg } 13502c393a42Smrg } 13512c393a42Smrg } 13522c393a42Smrg } 13532c393a42Smrg if (lt_foo != "") { lt_freq[[lt_foo]]++; } 13542c393a42Smrg if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 13552c393a42Smrg}'` 13562c393a42Smrg sys_lib_search_path_spec=`echo $lt_search_path_spec` 13572c393a42Smrgelse 13582c393a42Smrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 13592c393a42Smrgfi]) 13602c393a42Smrgneed_lib_prefix=unknown 13612c393a42Smrghardcode_into_libs=no 13622c393a42Smrg 13632c393a42Smrg# when you set need_version to no, make sure it does not cause -set_version 13642c393a42Smrg# flags to be left without arguments 13652c393a42Smrgneed_version=unknown 13662c393a42Smrg 13672c393a42Smrgcase $host_os in 13682c393a42Smrgaix3*) 13692c393a42Smrg version_type=linux 13702c393a42Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' 13712c393a42Smrg shlibpath_var=LIBPATH 13722c393a42Smrg 13732c393a42Smrg # AIX 3 has no versioning support, so we append a major version to the name. 13742c393a42Smrg soname_spec='${libname}${release}${shared_ext}$major' 13752c393a42Smrg ;; 13762c393a42Smrg 13772c393a42Smrgaix[[4-9]]*) 13782c393a42Smrg version_type=linux 13792c393a42Smrg need_lib_prefix=no 13802c393a42Smrg need_version=no 13812c393a42Smrg hardcode_into_libs=yes 13822c393a42Smrg if test "$host_cpu" = ia64; then 13832c393a42Smrg # AIX 5 supports IA64 13842c393a42Smrg library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' 13852c393a42Smrg shlibpath_var=LD_LIBRARY_PATH 13862c393a42Smrg else 13872c393a42Smrg # With GCC up to 2.95.x, collect2 would create an import file 13882c393a42Smrg # for dependence libraries. The import file would start with 13892c393a42Smrg # the line `#! .'. This would cause the generated library to 13902c393a42Smrg # depend on `.', always an invalid library. This was fixed in 13912c393a42Smrg # development snapshots of GCC prior to 3.0. 13922c393a42Smrg case $host_os in 13932c393a42Smrg aix4 | aix4.[[01]] | aix4.[[01]].*) 13942c393a42Smrg if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 13952c393a42Smrg echo ' yes ' 13962c393a42Smrg echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then 13972c393a42Smrg : 13982c393a42Smrg else 13992c393a42Smrg can_build_shared=no 14002c393a42Smrg fi 14012c393a42Smrg ;; 14022c393a42Smrg esac 14032c393a42Smrg # AIX (on Power*) has no versioning support, so currently we can not hardcode correct 14042c393a42Smrg # soname into executable. Probably we can add versioning support to 14052c393a42Smrg # collect2, so additional links can be useful in future. 14062c393a42Smrg if test "$aix_use_runtimelinking" = yes; then 14072c393a42Smrg # If using run time linking (on AIX 4.2 or later) use lib<name>.so 14082c393a42Smrg # instead of lib<name>.a to let people know that these are not 14092c393a42Smrg # typical AIX shared libraries. 14102c393a42Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 14112c393a42Smrg else 14122c393a42Smrg # We preserve .a as extension for shared libraries through AIX4.2 14132c393a42Smrg # and later when we are not doing run time linking. 14142c393a42Smrg library_names_spec='${libname}${release}.a $libname.a' 14152c393a42Smrg soname_spec='${libname}${release}${shared_ext}$major' 14162c393a42Smrg fi 14172c393a42Smrg shlibpath_var=LIBPATH 14182c393a42Smrg fi 14192c393a42Smrg ;; 14202c393a42Smrg 14212c393a42Smrgamigaos*) 14222c393a42Smrg library_names_spec='$libname.ixlibrary $libname.a' 14232c393a42Smrg # Create ${libname}_ixlibrary.a entries in /sys/libs. 14242c393a42Smrg 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' 14252c393a42Smrg ;; 14262c393a42Smrg 14272c393a42Smrgbeos*) 14282c393a42Smrg library_names_spec='${libname}${shared_ext}' 14292c393a42Smrg dynamic_linker="$host_os ld.so" 14302c393a42Smrg shlibpath_var=LIBRARY_PATH 14312c393a42Smrg ;; 14322c393a42Smrg 14332c393a42Smrgbsdi[[45]]*) 14342c393a42Smrg version_type=linux 14352c393a42Smrg need_version=no 14362c393a42Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 14372c393a42Smrg soname_spec='${libname}${release}${shared_ext}$major' 14382c393a42Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 14392c393a42Smrg shlibpath_var=LD_LIBRARY_PATH 14402c393a42Smrg sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 14412c393a42Smrg sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 14422c393a42Smrg # the default ld.so.conf also contains /usr/contrib/lib and 14432c393a42Smrg # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 14442c393a42Smrg # libtool to hard-code these into programs 14452c393a42Smrg ;; 14462c393a42Smrg 14472c393a42Smrgcygwin* | mingw* | pw32*) 14482c393a42Smrg version_type=windows 14492c393a42Smrg shrext_cmds=".dll" 14502c393a42Smrg need_version=no 14512c393a42Smrg need_lib_prefix=no 14522c393a42Smrg 14532c393a42Smrg case $GCC,$host_os in 14542c393a42Smrg yes,cygwin* | yes,mingw* | yes,pw32*) 14552c393a42Smrg library_names_spec='$libname.dll.a' 14562c393a42Smrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 14572c393a42Smrg postinstall_cmds='base_file=`basename \${file}`~ 14582c393a42Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ 14592c393a42Smrg dldir=$destdir/`dirname \$dlpath`~ 14602c393a42Smrg test -d \$dldir || mkdir -p \$dldir~ 14612c393a42Smrg $install_prog $dir/$dlname \$dldir/$dlname~ 14622c393a42Smrg chmod a+x \$dldir/$dlname' 14632c393a42Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 14642c393a42Smrg dlpath=$dir/\$dldll~ 14652c393a42Smrg $rm \$dlpath' 14662c393a42Smrg shlibpath_overrides_runpath=yes 14672c393a42Smrg 14682c393a42Smrg case $host_os in 14692c393a42Smrg cygwin*) 14702c393a42Smrg # Cygwin DLLs use 'cyg' prefix rather than 'lib' 14712c393a42Smrg soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 14722c393a42Smrg sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" 14732c393a42Smrg ;; 14742c393a42Smrg mingw*) 14752c393a42Smrg # MinGW DLLs use traditional 'lib' prefix 14762c393a42Smrg soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 14772c393a42Smrg sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` 14782c393a42Smrg if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then 14792c393a42Smrg # It is most probably a Windows format PATH printed by 14802c393a42Smrg # mingw gcc, but we are running on Cygwin. Gcc prints its search 14812c393a42Smrg # path with ; separators, and with drive letters. We can handle the 14822c393a42Smrg # drive letters (cygwin fileutils understands them), so leave them, 14832c393a42Smrg # especially as we might pass files found there to a mingw objdump, 14842c393a42Smrg # which wouldn't understand a cygwinified path. Ahh. 14852c393a42Smrg sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 14862c393a42Smrg else 14872c393a42Smrg sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 14882c393a42Smrg fi 14892c393a42Smrg ;; 14902c393a42Smrg pw32*) 14912c393a42Smrg # pw32 DLLs use 'pw' prefix rather than 'lib' 14922c393a42Smrg library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 14932c393a42Smrg ;; 14942c393a42Smrg esac 14952c393a42Smrg ;; 14962c393a42Smrg 14972c393a42Smrg *) 14982c393a42Smrg library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' 14992c393a42Smrg ;; 15002c393a42Smrg esac 15012c393a42Smrg dynamic_linker='Win32 ld.exe' 15022c393a42Smrg # FIXME: first we should search . and the directory the executable is in 15032c393a42Smrg shlibpath_var=PATH 15042c393a42Smrg ;; 15052c393a42Smrg 15062c393a42Smrgdarwin* | rhapsody*) 15072c393a42Smrg dynamic_linker="$host_os dyld" 15082c393a42Smrg version_type=darwin 15092c393a42Smrg need_lib_prefix=no 15102c393a42Smrg need_version=no 15112c393a42Smrg library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' 15122c393a42Smrg soname_spec='${libname}${release}${major}$shared_ext' 15132c393a42Smrg shlibpath_overrides_runpath=yes 15142c393a42Smrg shlibpath_var=DYLD_LIBRARY_PATH 15152c393a42Smrg shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 15162c393a42Smrg m4_if([$1], [],[ 15172c393a42Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 15182c393a42Smrg sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 15192c393a42Smrg ;; 15202c393a42Smrg 15212c393a42Smrgdgux*) 15222c393a42Smrg version_type=linux 15232c393a42Smrg need_lib_prefix=no 15242c393a42Smrg need_version=no 15252c393a42Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' 15262c393a42Smrg soname_spec='${libname}${release}${shared_ext}$major' 15272c393a42Smrg shlibpath_var=LD_LIBRARY_PATH 15282c393a42Smrg ;; 15292c393a42Smrg 15302c393a42Smrgfreebsd1*) 15312c393a42Smrg dynamic_linker=no 15322c393a42Smrg ;; 15332c393a42Smrg 15342c393a42Smrgfreebsd* | dragonfly*) 15352c393a42Smrg # DragonFly does not have aout. When/if they implement a new 15362c393a42Smrg # versioning mechanism, adjust this. 15372c393a42Smrg if test -x /usr/bin/objformat; then 15382c393a42Smrg objformat=`/usr/bin/objformat` 15392c393a42Smrg else 15402c393a42Smrg case $host_os in 15412c393a42Smrg freebsd[[123]]*) objformat=aout ;; 15422c393a42Smrg *) objformat=elf ;; 15432c393a42Smrg esac 15442c393a42Smrg fi 15452c393a42Smrg version_type=freebsd-$objformat 15462c393a42Smrg case $version_type in 15472c393a42Smrg freebsd-elf*) 15482c393a42Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 15492c393a42Smrg need_version=no 15502c393a42Smrg need_lib_prefix=no 15512c393a42Smrg ;; 15522c393a42Smrg freebsd-*) 15532c393a42Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' 15542c393a42Smrg need_version=yes 15552c393a42Smrg ;; 15562c393a42Smrg esac 15572c393a42Smrg shlibpath_var=LD_LIBRARY_PATH 15582c393a42Smrg case $host_os in 15592c393a42Smrg freebsd2*) 15602c393a42Smrg shlibpath_overrides_runpath=yes 15612c393a42Smrg ;; 15622c393a42Smrg freebsd3.[[01]]* | freebsdelf3.[[01]]*) 15632c393a42Smrg shlibpath_overrides_runpath=yes 15642c393a42Smrg hardcode_into_libs=yes 15652c393a42Smrg ;; 15662c393a42Smrg freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 15672c393a42Smrg freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 15682c393a42Smrg shlibpath_overrides_runpath=no 15692c393a42Smrg hardcode_into_libs=yes 15702c393a42Smrg ;; 15712c393a42Smrg *) # from 4.6 on, and DragonFly 15722c393a42Smrg shlibpath_overrides_runpath=yes 15732c393a42Smrg hardcode_into_libs=yes 15742c393a42Smrg ;; 15752c393a42Smrg esac 15762c393a42Smrg ;; 15772c393a42Smrg 15782c393a42Smrggnu*) 15792c393a42Smrg version_type=linux 15802c393a42Smrg need_lib_prefix=no 15812c393a42Smrg need_version=no 15822c393a42Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 15832c393a42Smrg soname_spec='${libname}${release}${shared_ext}$major' 15842c393a42Smrg shlibpath_var=LD_LIBRARY_PATH 15852c393a42Smrg hardcode_into_libs=yes 15862c393a42Smrg ;; 15872c393a42Smrg 15882c393a42Smrghpux9* | hpux10* | hpux11*) 15892c393a42Smrg # Give a soname corresponding to the major version so that dld.sl refuses to 15902c393a42Smrg # link against other versions. 15912c393a42Smrg version_type=sunos 15922c393a42Smrg need_lib_prefix=no 15932c393a42Smrg need_version=no 15942c393a42Smrg case $host_cpu in 15952c393a42Smrg ia64*) 15962c393a42Smrg shrext_cmds='.so' 15972c393a42Smrg hardcode_into_libs=yes 15982c393a42Smrg dynamic_linker="$host_os dld.so" 15992c393a42Smrg shlibpath_var=LD_LIBRARY_PATH 16002c393a42Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 16012c393a42Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 16022c393a42Smrg soname_spec='${libname}${release}${shared_ext}$major' 16032c393a42Smrg if test "X$HPUX_IA64_MODE" = X32; then 16042c393a42Smrg sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 16052c393a42Smrg else 16062c393a42Smrg sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 16072c393a42Smrg fi 16082c393a42Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 16092c393a42Smrg ;; 16102c393a42Smrg hppa*64*) 16112c393a42Smrg shrext_cmds='.sl' 16122c393a42Smrg hardcode_into_libs=yes 16132c393a42Smrg dynamic_linker="$host_os dld.sl" 16142c393a42Smrg shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 16152c393a42Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 16162c393a42Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 16172c393a42Smrg soname_spec='${libname}${release}${shared_ext}$major' 16182c393a42Smrg sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 16192c393a42Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 16202c393a42Smrg ;; 16212c393a42Smrg *) 16222c393a42Smrg shrext_cmds='.sl' 16232c393a42Smrg dynamic_linker="$host_os dld.sl" 16242c393a42Smrg shlibpath_var=SHLIB_PATH 16252c393a42Smrg shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 16262c393a42Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 16272c393a42Smrg soname_spec='${libname}${release}${shared_ext}$major' 16282c393a42Smrg ;; 16292c393a42Smrg esac 16302c393a42Smrg # HP-UX runs *really* slowly unless shared libraries are mode 555. 16312c393a42Smrg postinstall_cmds='chmod 555 $lib' 16322c393a42Smrg ;; 16332c393a42Smrg 16342c393a42Smrginterix[[3-9]]*) 16352c393a42Smrg version_type=linux 16362c393a42Smrg need_lib_prefix=no 16372c393a42Smrg need_version=no 16382c393a42Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 16392c393a42Smrg soname_spec='${libname}${release}${shared_ext}$major' 16402c393a42Smrg dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 16412c393a42Smrg shlibpath_var=LD_LIBRARY_PATH 16422c393a42Smrg shlibpath_overrides_runpath=no 16432c393a42Smrg hardcode_into_libs=yes 16442c393a42Smrg ;; 16452c393a42Smrg 16462c393a42Smrgirix5* | irix6* | nonstopux*) 16472c393a42Smrg case $host_os in 16482c393a42Smrg nonstopux*) version_type=nonstopux ;; 16492c393a42Smrg *) 16502c393a42Smrg if test "$lt_cv_prog_gnu_ld" = yes; then 16512c393a42Smrg version_type=linux 16522c393a42Smrg else 16532c393a42Smrg version_type=irix 16542c393a42Smrg fi ;; 16552c393a42Smrg esac 16562c393a42Smrg need_lib_prefix=no 16572c393a42Smrg need_version=no 16582c393a42Smrg soname_spec='${libname}${release}${shared_ext}$major' 16592c393a42Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' 16602c393a42Smrg case $host_os in 16612c393a42Smrg irix5* | nonstopux*) 16622c393a42Smrg libsuff= shlibsuff= 16632c393a42Smrg ;; 16642c393a42Smrg *) 16652c393a42Smrg case $LD in # libtool.m4 will add one of these switches to LD 16662c393a42Smrg *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 16672c393a42Smrg libsuff= shlibsuff= libmagic=32-bit;; 16682c393a42Smrg *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 16692c393a42Smrg libsuff=32 shlibsuff=N32 libmagic=N32;; 16702c393a42Smrg *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 16712c393a42Smrg libsuff=64 shlibsuff=64 libmagic=64-bit;; 16722c393a42Smrg *) libsuff= shlibsuff= libmagic=never-match;; 16732c393a42Smrg esac 16742c393a42Smrg ;; 16752c393a42Smrg esac 16762c393a42Smrg shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 16772c393a42Smrg shlibpath_overrides_runpath=no 16782c393a42Smrg sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" 16792c393a42Smrg sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" 16802c393a42Smrg hardcode_into_libs=yes 16812c393a42Smrg ;; 16822c393a42Smrg 16832c393a42Smrg# No shared lib support for Linux oldld, aout, or coff. 16842c393a42Smrglinux*oldld* | linux*aout* | linux*coff*) 16852c393a42Smrg dynamic_linker=no 16862c393a42Smrg ;; 16872c393a42Smrg 16882c393a42Smrg# This must be Linux ELF. 16892c393a42Smrglinux* | k*bsd*-gnu) 16902c393a42Smrg version_type=linux 16912c393a42Smrg need_lib_prefix=no 16922c393a42Smrg need_version=no 16932c393a42Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 16942c393a42Smrg soname_spec='${libname}${release}${shared_ext}$major' 16952c393a42Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 16962c393a42Smrg shlibpath_var=LD_LIBRARY_PATH 16972c393a42Smrg shlibpath_overrides_runpath=no 16982c393a42Smrg # This implies no fast_install, which is unacceptable. 16992c393a42Smrg # Some rework will be needed to allow for fast_install 17002c393a42Smrg # before this can be enabled. 17012c393a42Smrg hardcode_into_libs=yes 17022c393a42Smrg 17032c393a42Smrg # Append ld.so.conf contents to the search path 17042c393a42Smrg if test -f /etc/ld.so.conf; then 17052c393a42Smrg 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' ' '` 17062c393a42Smrg sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" 17072c393a42Smrg fi 17082c393a42Smrg 17092c393a42Smrg # We used to test for /lib/ld.so.1 and disable shared libraries on 17102c393a42Smrg # powerpc, because MkLinux only supported shared libraries with the 17112c393a42Smrg # GNU dynamic linker. Since this was broken with cross compilers, 17122c393a42Smrg # most powerpc-linux boxes support dynamic linking these days and 17132c393a42Smrg # people can always --disable-shared, the test was removed, and we 17142c393a42Smrg # assume the GNU/Linux dynamic linker is in use. 17152c393a42Smrg dynamic_linker='GNU/Linux ld.so' 17162c393a42Smrg ;; 17172c393a42Smrg 17182c393a42Smrgnetbsdelf*-gnu) 17192c393a42Smrg version_type=linux 17202c393a42Smrg need_lib_prefix=no 17212c393a42Smrg need_version=no 17222c393a42Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 17232c393a42Smrg soname_spec='${libname}${release}${shared_ext}$major' 17242c393a42Smrg shlibpath_var=LD_LIBRARY_PATH 17252c393a42Smrg shlibpath_overrides_runpath=no 17262c393a42Smrg hardcode_into_libs=yes 17272c393a42Smrg dynamic_linker='NetBSD ld.elf_so' 17282c393a42Smrg ;; 17292c393a42Smrg 17302c393a42Smrgnetbsd*) 17312c393a42Smrg version_type=sunos 17322c393a42Smrg need_lib_prefix=no 17332c393a42Smrg need_version=no 17342c393a42Smrg if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then 17352c393a42Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 17362c393a42Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 17372c393a42Smrg dynamic_linker='NetBSD (a.out) ld.so' 17382c393a42Smrg else 17392c393a42Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 17402c393a42Smrg soname_spec='${libname}${release}${shared_ext}$major' 17412c393a42Smrg dynamic_linker='NetBSD ld.elf_so' 17422c393a42Smrg fi 17432c393a42Smrg shlibpath_var=LD_LIBRARY_PATH 17442c393a42Smrg shlibpath_overrides_runpath=yes 17452c393a42Smrg hardcode_into_libs=yes 17462c393a42Smrg ;; 17472c393a42Smrg 17482c393a42Smrgnewsos6) 17492c393a42Smrg version_type=linux 17502c393a42Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 17512c393a42Smrg shlibpath_var=LD_LIBRARY_PATH 17522c393a42Smrg shlibpath_overrides_runpath=yes 17532c393a42Smrg ;; 17542c393a42Smrg 17552c393a42Smrgnto-qnx*) 17562c393a42Smrg version_type=linux 17572c393a42Smrg need_lib_prefix=no 17582c393a42Smrg need_version=no 17592c393a42Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 17602c393a42Smrg soname_spec='${libname}${release}${shared_ext}$major' 17612c393a42Smrg shlibpath_var=LD_LIBRARY_PATH 17622c393a42Smrg shlibpath_overrides_runpath=yes 17632c393a42Smrg ;; 17642c393a42Smrg 17652c393a42Smrgopenbsd*) 17662c393a42Smrg version_type=sunos 17672c393a42Smrg sys_lib_dlsearch_path_spec="/usr/lib" 17682c393a42Smrg need_lib_prefix=no 17692c393a42Smrg # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. 17702c393a42Smrg case $host_os in 17712c393a42Smrg openbsd3.3 | openbsd3.3.*) need_version=yes ;; 17722c393a42Smrg *) need_version=no ;; 17732c393a42Smrg esac 17742c393a42Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 17752c393a42Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 17762c393a42Smrg shlibpath_var=LD_LIBRARY_PATH 17772c393a42Smrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 17782c393a42Smrg case $host_os in 17792c393a42Smrg openbsd2.[[89]] | openbsd2.[[89]].*) 17802c393a42Smrg shlibpath_overrides_runpath=no 17812c393a42Smrg ;; 17822c393a42Smrg *) 17832c393a42Smrg shlibpath_overrides_runpath=yes 17842c393a42Smrg ;; 17852c393a42Smrg esac 17862c393a42Smrg else 17872c393a42Smrg shlibpath_overrides_runpath=yes 17882c393a42Smrg fi 17892c393a42Smrg ;; 17902c393a42Smrg 17912c393a42Smrgos2*) 17922c393a42Smrg libname_spec='$name' 17932c393a42Smrg shrext_cmds=".dll" 17942c393a42Smrg need_lib_prefix=no 17952c393a42Smrg library_names_spec='$libname${shared_ext} $libname.a' 17962c393a42Smrg dynamic_linker='OS/2 ld.exe' 17972c393a42Smrg shlibpath_var=LIBPATH 17982c393a42Smrg ;; 17992c393a42Smrg 18002c393a42Smrgosf3* | osf4* | osf5*) 18012c393a42Smrg version_type=osf 18022c393a42Smrg need_lib_prefix=no 18032c393a42Smrg need_version=no 18042c393a42Smrg soname_spec='${libname}${release}${shared_ext}$major' 18052c393a42Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 18062c393a42Smrg shlibpath_var=LD_LIBRARY_PATH 18072c393a42Smrg sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 18082c393a42Smrg sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" 18092c393a42Smrg ;; 18102c393a42Smrg 18112c393a42Smrgrdos*) 18122c393a42Smrg dynamic_linker=no 18132c393a42Smrg ;; 18142c393a42Smrg 18152c393a42Smrgsolaris*) 18162c393a42Smrg version_type=linux 18172c393a42Smrg need_lib_prefix=no 18182c393a42Smrg need_version=no 18192c393a42Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 18202c393a42Smrg soname_spec='${libname}${release}${shared_ext}$major' 18212c393a42Smrg shlibpath_var=LD_LIBRARY_PATH 18222c393a42Smrg shlibpath_overrides_runpath=yes 18232c393a42Smrg hardcode_into_libs=yes 18242c393a42Smrg # ldd complains unless libraries are executable 18252c393a42Smrg postinstall_cmds='chmod +x $lib' 18262c393a42Smrg ;; 18272c393a42Smrg 18282c393a42Smrgsunos4*) 18292c393a42Smrg version_type=sunos 18302c393a42Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 18312c393a42Smrg finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 18322c393a42Smrg shlibpath_var=LD_LIBRARY_PATH 18332c393a42Smrg shlibpath_overrides_runpath=yes 18342c393a42Smrg if test "$with_gnu_ld" = yes; then 18352c393a42Smrg need_lib_prefix=no 18362c393a42Smrg fi 18372c393a42Smrg need_version=yes 18382c393a42Smrg ;; 18392c393a42Smrg 18402c393a42Smrgsysv4 | sysv4.3*) 18412c393a42Smrg version_type=linux 18422c393a42Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 18432c393a42Smrg soname_spec='${libname}${release}${shared_ext}$major' 18442c393a42Smrg shlibpath_var=LD_LIBRARY_PATH 18452c393a42Smrg case $host_vendor in 18462c393a42Smrg sni) 18472c393a42Smrg shlibpath_overrides_runpath=no 18482c393a42Smrg need_lib_prefix=no 18492c393a42Smrg export_dynamic_flag_spec='${wl}-Blargedynsym' 18502c393a42Smrg runpath_var=LD_RUN_PATH 18512c393a42Smrg ;; 18522c393a42Smrg siemens) 18532c393a42Smrg need_lib_prefix=no 18542c393a42Smrg ;; 18552c393a42Smrg motorola) 18562c393a42Smrg need_lib_prefix=no 18572c393a42Smrg need_version=no 18582c393a42Smrg shlibpath_overrides_runpath=no 18592c393a42Smrg sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 18602c393a42Smrg ;; 18612c393a42Smrg esac 18622c393a42Smrg ;; 18632c393a42Smrg 18642c393a42Smrgsysv4*MP*) 18652c393a42Smrg if test -d /usr/nec ;then 18662c393a42Smrg version_type=linux 18672c393a42Smrg library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' 18682c393a42Smrg soname_spec='$libname${shared_ext}.$major' 18692c393a42Smrg shlibpath_var=LD_LIBRARY_PATH 18702c393a42Smrg fi 18712c393a42Smrg ;; 18722c393a42Smrg 18732c393a42Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 18742c393a42Smrg version_type=freebsd-elf 18752c393a42Smrg need_lib_prefix=no 18762c393a42Smrg need_version=no 18772c393a42Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 18782c393a42Smrg soname_spec='${libname}${release}${shared_ext}$major' 18792c393a42Smrg shlibpath_var=LD_LIBRARY_PATH 18802c393a42Smrg hardcode_into_libs=yes 18812c393a42Smrg if test "$with_gnu_ld" = yes; then 18822c393a42Smrg sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 18832c393a42Smrg shlibpath_overrides_runpath=no 18842c393a42Smrg else 18852c393a42Smrg sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 18862c393a42Smrg shlibpath_overrides_runpath=yes 18872c393a42Smrg case $host_os in 18882c393a42Smrg sco3.2v5*) 18892c393a42Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 18902c393a42Smrg ;; 18912c393a42Smrg esac 18922c393a42Smrg fi 18932c393a42Smrg sys_lib_dlsearch_path_spec='/usr/lib' 18942c393a42Smrg ;; 18952c393a42Smrg 18962c393a42Smrguts4*) 18972c393a42Smrg version_type=linux 18982c393a42Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 18992c393a42Smrg soname_spec='${libname}${release}${shared_ext}$major' 19002c393a42Smrg shlibpath_var=LD_LIBRARY_PATH 19012c393a42Smrg ;; 19022c393a42Smrg 19032c393a42Smrg*) 19042c393a42Smrg dynamic_linker=no 19052c393a42Smrg ;; 19062c393a42Smrgesac 19072c393a42SmrgAC_MSG_RESULT([$dynamic_linker]) 19082c393a42Smrgtest "$dynamic_linker" = no && can_build_shared=no 19092c393a42Smrg 19102c393a42SmrgAC_CACHE_VAL([lt_cv_sys_lib_search_path_spec], 19112c393a42Smrg[lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec"]) 19122c393a42Smrgsys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" 19132c393a42SmrgAC_CACHE_VAL([lt_cv_sys_lib_dlsearch_path_spec], 19142c393a42Smrg[lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec"]) 19152c393a42Smrgsys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" 19162c393a42Smrg 19172c393a42Smrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var" 19182c393a42Smrgif test "$GCC" = yes; then 19192c393a42Smrg variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 19202c393a42Smrgfi 19212c393a42Smrg])# AC_LIBTOOL_SYS_DYNAMIC_LINKER 19222c393a42Smrg 19232c393a42Smrg 19242c393a42Smrg# _LT_AC_TAGCONFIG 19252c393a42Smrg# ---------------- 19262c393a42SmrgAC_DEFUN([_LT_AC_TAGCONFIG], 19272c393a42Smrg[AC_REQUIRE([LT_AC_PROG_SED])dnl 19282c393a42SmrgAC_ARG_WITH([tags], 19292c393a42Smrg [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@], 19302c393a42Smrg [include additional configurations @<:@automatic@:>@])], 19312c393a42Smrg [tagnames="$withval"]) 19322c393a42Smrg 19332c393a42Smrgif test -f "$ltmain" && test -n "$tagnames"; then 19342c393a42Smrg if test ! -f "${ofile}"; then 19352c393a42Smrg AC_MSG_WARN([output file `$ofile' does not exist]) 19362c393a42Smrg fi 19372c393a42Smrg 19382c393a42Smrg if test -z "$LTCC"; then 19392c393a42Smrg eval "`$SHELL ${ofile} --config | grep '^LTCC='`" 19402c393a42Smrg if test -z "$LTCC"; then 19412c393a42Smrg AC_MSG_WARN([output file `$ofile' does not look like a libtool script]) 19422c393a42Smrg else 19432c393a42Smrg AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile']) 19442c393a42Smrg fi 19452c393a42Smrg fi 19462c393a42Smrg if test -z "$LTCFLAGS"; then 19472c393a42Smrg eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`" 19482c393a42Smrg fi 19492c393a42Smrg 19502c393a42Smrg # Extract list of available tagged configurations in $ofile. 19512c393a42Smrg # Note that this assumes the entire list is on one line. 19522c393a42Smrg available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` 19532c393a42Smrg 19542c393a42Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 19552c393a42Smrg for tagname in $tagnames; do 19562c393a42Smrg IFS="$lt_save_ifs" 19572c393a42Smrg # Check whether tagname contains only valid characters 19582c393a42Smrg case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in 19592c393a42Smrg "") ;; 19602c393a42Smrg *) AC_MSG_ERROR([invalid tag name: $tagname]) 19612c393a42Smrg ;; 19622c393a42Smrg esac 19632c393a42Smrg 19642c393a42Smrg if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null 19652c393a42Smrg then 19662c393a42Smrg AC_MSG_ERROR([tag name \"$tagname\" already exists]) 19672c393a42Smrg fi 19682c393a42Smrg 19692c393a42Smrg # Update the list of available tags. 19702c393a42Smrg if test -n "$tagname"; then 19712c393a42Smrg echo appending configuration tag \"$tagname\" to $ofile 19722c393a42Smrg 19732c393a42Smrg case $tagname in 19742c393a42Smrg CXX) 19752c393a42Smrg if test -n "$CXX" && ( test "X$CXX" != "Xno" && 19762c393a42Smrg ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || 19772c393a42Smrg (test "X$CXX" != "Xg++"))) ; then 19782c393a42Smrg AC_LIBTOOL_LANG_CXX_CONFIG 19792c393a42Smrg else 19802c393a42Smrg tagname="" 19812c393a42Smrg fi 19822c393a42Smrg ;; 19832c393a42Smrg 19842c393a42Smrg F77) 19852c393a42Smrg if test -n "$F77" && test "X$F77" != "Xno"; then 19862c393a42Smrg AC_LIBTOOL_LANG_F77_CONFIG 19872c393a42Smrg else 19882c393a42Smrg tagname="" 19892c393a42Smrg fi 19902c393a42Smrg ;; 19912c393a42Smrg 19922c393a42Smrg GCJ) 19932c393a42Smrg if test -n "$GCJ" && test "X$GCJ" != "Xno"; then 19942c393a42Smrg AC_LIBTOOL_LANG_GCJ_CONFIG 19952c393a42Smrg else 19962c393a42Smrg tagname="" 19972c393a42Smrg fi 19982c393a42Smrg ;; 19992c393a42Smrg 20002c393a42Smrg RC) 20012c393a42Smrg AC_LIBTOOL_LANG_RC_CONFIG 20022c393a42Smrg ;; 20032c393a42Smrg 20042c393a42Smrg *) 20052c393a42Smrg AC_MSG_ERROR([Unsupported tag name: $tagname]) 20062c393a42Smrg ;; 20072c393a42Smrg esac 20082c393a42Smrg 20092c393a42Smrg # Append the new tag name to the list of available tags. 20102c393a42Smrg if test -n "$tagname" ; then 20112c393a42Smrg available_tags="$available_tags $tagname" 20122c393a42Smrg fi 20132c393a42Smrg fi 20142c393a42Smrg done 20152c393a42Smrg IFS="$lt_save_ifs" 20162c393a42Smrg 20172c393a42Smrg # Now substitute the updated list of available tags. 20182c393a42Smrg if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then 20192c393a42Smrg mv "${ofile}T" "$ofile" 20202c393a42Smrg chmod +x "$ofile" 20212c393a42Smrg else 20222c393a42Smrg rm -f "${ofile}T" 20232c393a42Smrg AC_MSG_ERROR([unable to update list of available tagged configurations.]) 20242c393a42Smrg fi 20252c393a42Smrgfi 20262c393a42Smrg])# _LT_AC_TAGCONFIG 20272c393a42Smrg 20282c393a42Smrg 20292c393a42Smrg# AC_LIBTOOL_DLOPEN 20302c393a42Smrg# ----------------- 20312c393a42Smrg# enable checks for dlopen support 20322c393a42SmrgAC_DEFUN([AC_LIBTOOL_DLOPEN], 20332c393a42Smrg [AC_BEFORE([$0],[AC_LIBTOOL_SETUP]) 20342c393a42Smrg])# AC_LIBTOOL_DLOPEN 20352c393a42Smrg 20362c393a42Smrg 20372c393a42Smrg# AC_LIBTOOL_WIN32_DLL 20382c393a42Smrg# -------------------- 20392c393a42Smrg# declare package support for building win32 DLLs 20402c393a42SmrgAC_DEFUN([AC_LIBTOOL_WIN32_DLL], 20412c393a42Smrg[AC_BEFORE([$0], [AC_LIBTOOL_SETUP]) 20422c393a42Smrg])# AC_LIBTOOL_WIN32_DLL 20432c393a42Smrg 20442c393a42Smrg 20452c393a42Smrg# AC_ENABLE_SHARED([DEFAULT]) 20462c393a42Smrg# --------------------------- 20472c393a42Smrg# implement the --enable-shared flag 20482c393a42Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 20492c393a42SmrgAC_DEFUN([AC_ENABLE_SHARED], 20502c393a42Smrg[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl 20512c393a42SmrgAC_ARG_ENABLE([shared], 20522c393a42Smrg [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 20532c393a42Smrg [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])], 20542c393a42Smrg [p=${PACKAGE-default} 20552c393a42Smrg case $enableval in 20562c393a42Smrg yes) enable_shared=yes ;; 20572c393a42Smrg no) enable_shared=no ;; 20582c393a42Smrg *) 20592c393a42Smrg enable_shared=no 20602c393a42Smrg # Look at the argument we got. We use all the common list separators. 20612c393a42Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 20622c393a42Smrg for pkg in $enableval; do 20632c393a42Smrg IFS="$lt_save_ifs" 20642c393a42Smrg if test "X$pkg" = "X$p"; then 20652c393a42Smrg enable_shared=yes 20662c393a42Smrg fi 20672c393a42Smrg done 20682c393a42Smrg IFS="$lt_save_ifs" 20692c393a42Smrg ;; 20702c393a42Smrg esac], 20712c393a42Smrg [enable_shared=]AC_ENABLE_SHARED_DEFAULT) 20722c393a42Smrg])# AC_ENABLE_SHARED 20732c393a42Smrg 20742c393a42Smrg 20752c393a42Smrg# AC_DISABLE_SHARED 20762c393a42Smrg# ----------------- 20772c393a42Smrg# set the default shared flag to --disable-shared 20782c393a42SmrgAC_DEFUN([AC_DISABLE_SHARED], 20792c393a42Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 20802c393a42SmrgAC_ENABLE_SHARED(no) 20812c393a42Smrg])# AC_DISABLE_SHARED 20822c393a42Smrg 20832c393a42Smrg 20842c393a42Smrg# AC_ENABLE_STATIC([DEFAULT]) 20852c393a42Smrg# --------------------------- 20862c393a42Smrg# implement the --enable-static flag 20872c393a42Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 20882c393a42SmrgAC_DEFUN([AC_ENABLE_STATIC], 20892c393a42Smrg[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl 20902c393a42SmrgAC_ARG_ENABLE([static], 20912c393a42Smrg [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@], 20922c393a42Smrg [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])], 20932c393a42Smrg [p=${PACKAGE-default} 20942c393a42Smrg case $enableval in 20952c393a42Smrg yes) enable_static=yes ;; 20962c393a42Smrg no) enable_static=no ;; 20972c393a42Smrg *) 20982c393a42Smrg enable_static=no 20992c393a42Smrg # Look at the argument we got. We use all the common list separators. 21002c393a42Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 21012c393a42Smrg for pkg in $enableval; do 21022c393a42Smrg IFS="$lt_save_ifs" 21032c393a42Smrg if test "X$pkg" = "X$p"; then 21042c393a42Smrg enable_static=yes 21052c393a42Smrg fi 21062c393a42Smrg done 21072c393a42Smrg IFS="$lt_save_ifs" 21082c393a42Smrg ;; 21092c393a42Smrg esac], 21102c393a42Smrg [enable_static=]AC_ENABLE_STATIC_DEFAULT) 21112c393a42Smrg])# AC_ENABLE_STATIC 21122c393a42Smrg 21132c393a42Smrg 21142c393a42Smrg# AC_DISABLE_STATIC 21152c393a42Smrg# ----------------- 21162c393a42Smrg# set the default static flag to --disable-static 21172c393a42SmrgAC_DEFUN([AC_DISABLE_STATIC], 21182c393a42Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 21192c393a42SmrgAC_ENABLE_STATIC(no) 21202c393a42Smrg])# AC_DISABLE_STATIC 21212c393a42Smrg 21222c393a42Smrg 21232c393a42Smrg# AC_ENABLE_FAST_INSTALL([DEFAULT]) 21242c393a42Smrg# --------------------------------- 21252c393a42Smrg# implement the --enable-fast-install flag 21262c393a42Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 21272c393a42SmrgAC_DEFUN([AC_ENABLE_FAST_INSTALL], 21282c393a42Smrg[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl 21292c393a42SmrgAC_ARG_ENABLE([fast-install], 21302c393a42Smrg [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 21312c393a42Smrg [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 21322c393a42Smrg [p=${PACKAGE-default} 21332c393a42Smrg case $enableval in 21342c393a42Smrg yes) enable_fast_install=yes ;; 21352c393a42Smrg no) enable_fast_install=no ;; 21362c393a42Smrg *) 21372c393a42Smrg enable_fast_install=no 21382c393a42Smrg # Look at the argument we got. We use all the common list separators. 21392c393a42Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 21402c393a42Smrg for pkg in $enableval; do 21412c393a42Smrg IFS="$lt_save_ifs" 21422c393a42Smrg if test "X$pkg" = "X$p"; then 21432c393a42Smrg enable_fast_install=yes 21442c393a42Smrg fi 21452c393a42Smrg done 21462c393a42Smrg IFS="$lt_save_ifs" 21472c393a42Smrg ;; 21482c393a42Smrg esac], 21492c393a42Smrg [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT) 21502c393a42Smrg])# AC_ENABLE_FAST_INSTALL 21512c393a42Smrg 21522c393a42Smrg 21532c393a42Smrg# AC_DISABLE_FAST_INSTALL 21542c393a42Smrg# ----------------------- 21552c393a42Smrg# set the default to --disable-fast-install 21562c393a42SmrgAC_DEFUN([AC_DISABLE_FAST_INSTALL], 21572c393a42Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 21582c393a42SmrgAC_ENABLE_FAST_INSTALL(no) 21592c393a42Smrg])# AC_DISABLE_FAST_INSTALL 21602c393a42Smrg 21612c393a42Smrg 21622c393a42Smrg# AC_LIBTOOL_PICMODE([MODE]) 21632c393a42Smrg# -------------------------- 21642c393a42Smrg# implement the --with-pic flag 21652c393a42Smrg# MODE is either `yes' or `no'. If omitted, it defaults to `both'. 21662c393a42SmrgAC_DEFUN([AC_LIBTOOL_PICMODE], 21672c393a42Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 21682c393a42Smrgpic_mode=ifelse($#,1,$1,default) 21692c393a42Smrg])# AC_LIBTOOL_PICMODE 21702c393a42Smrg 21712c393a42Smrg 21722c393a42Smrg# AC_PROG_EGREP 21732c393a42Smrg# ------------- 21742c393a42Smrg# This is predefined starting with Autoconf 2.54, so this conditional 21752c393a42Smrg# definition can be removed once we require Autoconf 2.54 or later. 21762c393a42Smrgm4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP], 21772c393a42Smrg[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep], 21782c393a42Smrg [if echo a | (grep -E '(a|b)') >/dev/null 2>&1 21792c393a42Smrg then ac_cv_prog_egrep='grep -E' 21802c393a42Smrg else ac_cv_prog_egrep='egrep' 21812c393a42Smrg fi]) 21822c393a42Smrg EGREP=$ac_cv_prog_egrep 21832c393a42Smrg AC_SUBST([EGREP]) 21842c393a42Smrg])]) 21852c393a42Smrg 21862c393a42Smrg 21872c393a42Smrg# AC_PATH_TOOL_PREFIX 21882c393a42Smrg# ------------------- 21892c393a42Smrg# find a file program which can recognize shared library 21902c393a42SmrgAC_DEFUN([AC_PATH_TOOL_PREFIX], 21912c393a42Smrg[AC_REQUIRE([AC_PROG_EGREP])dnl 21922c393a42SmrgAC_MSG_CHECKING([for $1]) 21932c393a42SmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 21942c393a42Smrg[case $MAGIC_CMD in 21952c393a42Smrg[[\\/*] | ?:[\\/]*]) 21962c393a42Smrg lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. 21972c393a42Smrg ;; 21982c393a42Smrg*) 21992c393a42Smrg lt_save_MAGIC_CMD="$MAGIC_CMD" 22002c393a42Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 22012c393a42Smrgdnl $ac_dummy forces splitting on constant user-supplied paths. 22022c393a42Smrgdnl POSIX.2 word splitting is done only on the output of word expansions, 22032c393a42Smrgdnl not every word. This closes a longstanding sh security hole. 22042c393a42Smrg ac_dummy="ifelse([$2], , $PATH, [$2])" 22052c393a42Smrg for ac_dir in $ac_dummy; do 22062c393a42Smrg IFS="$lt_save_ifs" 22072c393a42Smrg test -z "$ac_dir" && ac_dir=. 22082c393a42Smrg if test -f $ac_dir/$1; then 22092c393a42Smrg lt_cv_path_MAGIC_CMD="$ac_dir/$1" 22102c393a42Smrg if test -n "$file_magic_test_file"; then 22112c393a42Smrg case $deplibs_check_method in 22122c393a42Smrg "file_magic "*) 22132c393a42Smrg file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 22142c393a42Smrg MAGIC_CMD="$lt_cv_path_MAGIC_CMD" 22152c393a42Smrg if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 22162c393a42Smrg $EGREP "$file_magic_regex" > /dev/null; then 22172c393a42Smrg : 22182c393a42Smrg else 22192c393a42Smrg cat <<EOF 1>&2 22202c393a42Smrg 22212c393a42Smrg*** Warning: the command libtool uses to detect shared libraries, 22222c393a42Smrg*** $file_magic_cmd, produces output that libtool cannot recognize. 22232c393a42Smrg*** The result is that libtool may fail to recognize shared libraries 22242c393a42Smrg*** as such. This will affect the creation of libtool libraries that 22252c393a42Smrg*** depend on shared libraries, but programs linked with such libtool 22262c393a42Smrg*** libraries will work regardless of this problem. Nevertheless, you 22272c393a42Smrg*** may want to report the problem to your system manager and/or to 22282c393a42Smrg*** bug-libtool@gnu.org 22292c393a42Smrg 22302c393a42SmrgEOF 22312c393a42Smrg fi ;; 22322c393a42Smrg esac 22332c393a42Smrg fi 22342c393a42Smrg break 22352c393a42Smrg fi 22362c393a42Smrg done 22372c393a42Smrg IFS="$lt_save_ifs" 22382c393a42Smrg MAGIC_CMD="$lt_save_MAGIC_CMD" 22392c393a42Smrg ;; 22402c393a42Smrgesac]) 22412c393a42SmrgMAGIC_CMD="$lt_cv_path_MAGIC_CMD" 22422c393a42Smrgif test -n "$MAGIC_CMD"; then 22432c393a42Smrg AC_MSG_RESULT($MAGIC_CMD) 22442c393a42Smrgelse 22452c393a42Smrg AC_MSG_RESULT(no) 22462c393a42Smrgfi 22472c393a42Smrg])# AC_PATH_TOOL_PREFIX 22482c393a42Smrg 22492c393a42Smrg 22502c393a42Smrg# AC_PATH_MAGIC 22512c393a42Smrg# ------------- 22522c393a42Smrg# find a file program which can recognize a shared library 22532c393a42SmrgAC_DEFUN([AC_PATH_MAGIC], 22542c393a42Smrg[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 22552c393a42Smrgif test -z "$lt_cv_path_MAGIC_CMD"; then 22562c393a42Smrg if test -n "$ac_tool_prefix"; then 22572c393a42Smrg AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 22582c393a42Smrg else 22592c393a42Smrg MAGIC_CMD=: 22602c393a42Smrg fi 22612c393a42Smrgfi 22622c393a42Smrg])# AC_PATH_MAGIC 22632c393a42Smrg 22642c393a42Smrg 22652c393a42Smrg# AC_PROG_LD 22662c393a42Smrg# ---------- 22672c393a42Smrg# find the pathname to the GNU or non-GNU linker 22682c393a42SmrgAC_DEFUN([AC_PROG_LD], 22692c393a42Smrg[AC_ARG_WITH([gnu-ld], 22702c393a42Smrg [AC_HELP_STRING([--with-gnu-ld], 22712c393a42Smrg [assume the C compiler uses GNU ld @<:@default=no@:>@])], 22722c393a42Smrg [test "$withval" = no || with_gnu_ld=yes], 22732c393a42Smrg [with_gnu_ld=no]) 22742c393a42SmrgAC_REQUIRE([LT_AC_PROG_SED])dnl 22752c393a42SmrgAC_REQUIRE([AC_PROG_CC])dnl 22762c393a42SmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 22772c393a42SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 22782c393a42Smrgac_prog=ld 22792c393a42Smrgif test "$GCC" = yes; then 22802c393a42Smrg # Check if gcc -print-prog-name=ld gives a path. 22812c393a42Smrg AC_MSG_CHECKING([for ld used by $CC]) 22822c393a42Smrg case $host in 22832c393a42Smrg *-*-mingw*) 22842c393a42Smrg # gcc leaves a trailing carriage return which upsets mingw 22852c393a42Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 22862c393a42Smrg *) 22872c393a42Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 22882c393a42Smrg esac 22892c393a42Smrg case $ac_prog in 22902c393a42Smrg # Accept absolute paths. 22912c393a42Smrg [[\\/]]* | ?:[[\\/]]*) 22922c393a42Smrg re_direlt='/[[^/]][[^/]]*/\.\./' 22932c393a42Smrg # Canonicalize the pathname of ld 22942c393a42Smrg ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` 22952c393a42Smrg while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do 22962c393a42Smrg ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` 22972c393a42Smrg done 22982c393a42Smrg test -z "$LD" && LD="$ac_prog" 22992c393a42Smrg ;; 23002c393a42Smrg "") 23012c393a42Smrg # If it fails, then pretend we aren't using GCC. 23022c393a42Smrg ac_prog=ld 23032c393a42Smrg ;; 23042c393a42Smrg *) 23052c393a42Smrg # If it is relative, then search for the first ld in PATH. 23062c393a42Smrg with_gnu_ld=unknown 23072c393a42Smrg ;; 23082c393a42Smrg esac 23092c393a42Smrgelif test "$with_gnu_ld" = yes; then 23102c393a42Smrg AC_MSG_CHECKING([for GNU ld]) 23112c393a42Smrgelse 23122c393a42Smrg AC_MSG_CHECKING([for non-GNU ld]) 23132c393a42Smrgfi 23142c393a42SmrgAC_CACHE_VAL(lt_cv_path_LD, 23152c393a42Smrg[if test -z "$LD"; then 23162c393a42Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 23172c393a42Smrg for ac_dir in $PATH; do 23182c393a42Smrg IFS="$lt_save_ifs" 23192c393a42Smrg test -z "$ac_dir" && ac_dir=. 23202c393a42Smrg if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 23212c393a42Smrg lt_cv_path_LD="$ac_dir/$ac_prog" 23222c393a42Smrg # Check to see if the program is GNU ld. I'd rather use --version, 23232c393a42Smrg # but apparently some variants of GNU ld only accept -v. 23242c393a42Smrg # Break only if it was the GNU/non-GNU ld that we prefer. 23252c393a42Smrg case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 23262c393a42Smrg *GNU* | *'with BFD'*) 23272c393a42Smrg test "$with_gnu_ld" != no && break 23282c393a42Smrg ;; 23292c393a42Smrg *) 23302c393a42Smrg test "$with_gnu_ld" != yes && break 23312c393a42Smrg ;; 23322c393a42Smrg esac 23332c393a42Smrg fi 23342c393a42Smrg done 23352c393a42Smrg IFS="$lt_save_ifs" 23362c393a42Smrgelse 23372c393a42Smrg lt_cv_path_LD="$LD" # Let the user override the test with a path. 23382c393a42Smrgfi]) 23392c393a42SmrgLD="$lt_cv_path_LD" 23402c393a42Smrgif test -n "$LD"; then 23412c393a42Smrg AC_MSG_RESULT($LD) 23422c393a42Smrgelse 23432c393a42Smrg AC_MSG_RESULT(no) 23442c393a42Smrgfi 23452c393a42Smrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 23462c393a42SmrgAC_PROG_LD_GNU 23472c393a42Smrg])# AC_PROG_LD 23482c393a42Smrg 23492c393a42Smrg 23502c393a42Smrg# AC_PROG_LD_GNU 23512c393a42Smrg# -------------- 23522c393a42SmrgAC_DEFUN([AC_PROG_LD_GNU], 23532c393a42Smrg[AC_REQUIRE([AC_PROG_EGREP])dnl 23542c393a42SmrgAC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 23552c393a42Smrg[# I'd rather use --version here, but apparently some GNU lds only accept -v. 23562c393a42Smrgcase `$LD -v 2>&1 </dev/null` in 23572c393a42Smrg*GNU* | *'with BFD'*) 23582c393a42Smrg lt_cv_prog_gnu_ld=yes 23592c393a42Smrg ;; 23602c393a42Smrg*) 23612c393a42Smrg lt_cv_prog_gnu_ld=no 23622c393a42Smrg ;; 23632c393a42Smrgesac]) 23642c393a42Smrgwith_gnu_ld=$lt_cv_prog_gnu_ld 23652c393a42Smrg])# AC_PROG_LD_GNU 23662c393a42Smrg 23672c393a42Smrg 23682c393a42Smrg# AC_PROG_LD_RELOAD_FLAG 23692c393a42Smrg# ---------------------- 23702c393a42Smrg# find reload flag for linker 23712c393a42Smrg# -- PORTME Some linkers may need a different reload flag. 23722c393a42SmrgAC_DEFUN([AC_PROG_LD_RELOAD_FLAG], 23732c393a42Smrg[AC_CACHE_CHECK([for $LD option to reload object files], 23742c393a42Smrg lt_cv_ld_reload_flag, 23752c393a42Smrg [lt_cv_ld_reload_flag='-r']) 23762c393a42Smrgreload_flag=$lt_cv_ld_reload_flag 23772c393a42Smrgcase $reload_flag in 23782c393a42Smrg"" | " "*) ;; 23792c393a42Smrg*) reload_flag=" $reload_flag" ;; 23802c393a42Smrgesac 23812c393a42Smrgreload_cmds='$LD$reload_flag -o $output$reload_objs' 23822c393a42Smrgcase $host_os in 23832c393a42Smrg darwin*) 23842c393a42Smrg if test "$GCC" = yes; then 23852c393a42Smrg reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' 23862c393a42Smrg else 23872c393a42Smrg reload_cmds='$LD$reload_flag -o $output$reload_objs' 23882c393a42Smrg fi 23892c393a42Smrg ;; 23902c393a42Smrgesac 23912c393a42Smrg])# AC_PROG_LD_RELOAD_FLAG 23922c393a42Smrg 23932c393a42Smrg 23942c393a42Smrg# AC_DEPLIBS_CHECK_METHOD 23952c393a42Smrg# ----------------------- 23962c393a42Smrg# how to check for library dependencies 23972c393a42Smrg# -- PORTME fill in with the dynamic library characteristics 23982c393a42SmrgAC_DEFUN([AC_DEPLIBS_CHECK_METHOD], 23992c393a42Smrg[AC_CACHE_CHECK([how to recognize dependent libraries], 24002c393a42Smrglt_cv_deplibs_check_method, 24012c393a42Smrg[lt_cv_file_magic_cmd='$MAGIC_CMD' 24022c393a42Smrglt_cv_file_magic_test_file= 24032c393a42Smrglt_cv_deplibs_check_method='unknown' 24042c393a42Smrg# Need to set the preceding variable on all platforms that support 24052c393a42Smrg# interlibrary dependencies. 24062c393a42Smrg# 'none' -- dependencies not supported. 24072c393a42Smrg# `unknown' -- same as none, but documents that we really don't know. 24082c393a42Smrg# 'pass_all' -- all dependencies passed with no checks. 24092c393a42Smrg# 'test_compile' -- check by making test program. 24102c393a42Smrg# 'file_magic [[regex]]' -- check by looking for files in library path 24112c393a42Smrg# which responds to the $file_magic_cmd with a given extended regex. 24122c393a42Smrg# If you have `file' or equivalent on your system and you're not sure 24132c393a42Smrg# whether `pass_all' will *always* work, you probably want this one. 24142c393a42Smrg 24152c393a42Smrgcase $host_os in 24162c393a42Smrgaix[[4-9]]*) 24172c393a42Smrg lt_cv_deplibs_check_method=pass_all 24182c393a42Smrg ;; 24192c393a42Smrg 24202c393a42Smrgbeos*) 24212c393a42Smrg lt_cv_deplibs_check_method=pass_all 24222c393a42Smrg ;; 24232c393a42Smrg 24242c393a42Smrgbsdi[[45]]*) 24252c393a42Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 24262c393a42Smrg lt_cv_file_magic_cmd='/usr/bin/file -L' 24272c393a42Smrg lt_cv_file_magic_test_file=/shlib/libc.so 24282c393a42Smrg ;; 24292c393a42Smrg 24302c393a42Smrgcygwin*) 24312c393a42Smrg # func_win32_libid is a shell function defined in ltmain.sh 24322c393a42Smrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 24332c393a42Smrg lt_cv_file_magic_cmd='func_win32_libid' 24342c393a42Smrg ;; 24352c393a42Smrg 24362c393a42Smrgmingw* | pw32*) 24372c393a42Smrg # Base MSYS/MinGW do not provide the 'file' command needed by 24382c393a42Smrg # func_win32_libid shell function, so use a weaker test based on 'objdump', 24392c393a42Smrg # unless we find 'file', for example because we are cross-compiling. 24402c393a42Smrg if ( file / ) >/dev/null 2>&1; then 24412c393a42Smrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 24422c393a42Smrg lt_cv_file_magic_cmd='func_win32_libid' 24432c393a42Smrg else 24442c393a42Smrg lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' 24452c393a42Smrg lt_cv_file_magic_cmd='$OBJDUMP -f' 24462c393a42Smrg fi 24472c393a42Smrg ;; 24482c393a42Smrg 24492c393a42Smrgdarwin* | rhapsody*) 24502c393a42Smrg lt_cv_deplibs_check_method=pass_all 24512c393a42Smrg ;; 24522c393a42Smrg 24532c393a42Smrgfreebsd* | dragonfly*) 24542c393a42Smrg if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then 24552c393a42Smrg case $host_cpu in 24562c393a42Smrg i*86 ) 24572c393a42Smrg # Not sure whether the presence of OpenBSD here was a mistake. 24582c393a42Smrg # Let's accept both of them until this is cleared up. 24592c393a42Smrg lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 24602c393a42Smrg lt_cv_file_magic_cmd=/usr/bin/file 24612c393a42Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 24622c393a42Smrg ;; 24632c393a42Smrg esac 24642c393a42Smrg else 24652c393a42Smrg lt_cv_deplibs_check_method=pass_all 24662c393a42Smrg fi 24672c393a42Smrg ;; 24682c393a42Smrg 24692c393a42Smrggnu*) 24702c393a42Smrg lt_cv_deplibs_check_method=pass_all 24712c393a42Smrg ;; 24722c393a42Smrg 24732c393a42Smrghpux10.20* | hpux11*) 24742c393a42Smrg lt_cv_file_magic_cmd=/usr/bin/file 24752c393a42Smrg case $host_cpu in 24762c393a42Smrg ia64*) 24772c393a42Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 24782c393a42Smrg lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 24792c393a42Smrg ;; 24802c393a42Smrg hppa*64*) 24812c393a42Smrg [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]'] 24822c393a42Smrg lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 24832c393a42Smrg ;; 24842c393a42Smrg *) 24852c393a42Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' 24862c393a42Smrg lt_cv_file_magic_test_file=/usr/lib/libc.sl 24872c393a42Smrg ;; 24882c393a42Smrg esac 24892c393a42Smrg ;; 24902c393a42Smrg 24912c393a42Smrginterix[[3-9]]*) 24922c393a42Smrg # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 24932c393a42Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 24942c393a42Smrg ;; 24952c393a42Smrg 24962c393a42Smrgirix5* | irix6* | nonstopux*) 24972c393a42Smrg case $LD in 24982c393a42Smrg *-32|*"-32 ") libmagic=32-bit;; 24992c393a42Smrg *-n32|*"-n32 ") libmagic=N32;; 25002c393a42Smrg *-64|*"-64 ") libmagic=64-bit;; 25012c393a42Smrg *) libmagic=never-match;; 25022c393a42Smrg esac 25032c393a42Smrg lt_cv_deplibs_check_method=pass_all 25042c393a42Smrg ;; 25052c393a42Smrg 25062c393a42Smrg# This must be Linux ELF. 25072c393a42Smrglinux* | k*bsd*-gnu) 25082c393a42Smrg lt_cv_deplibs_check_method=pass_all 25092c393a42Smrg ;; 25102c393a42Smrg 25112c393a42Smrgnetbsd* | netbsdelf*-gnu) 25122c393a42Smrg if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then 25132c393a42Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 25142c393a42Smrg else 25152c393a42Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 25162c393a42Smrg fi 25172c393a42Smrg ;; 25182c393a42Smrg 25192c393a42Smrgnewos6*) 25202c393a42Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 25212c393a42Smrg lt_cv_file_magic_cmd=/usr/bin/file 25222c393a42Smrg lt_cv_file_magic_test_file=/usr/lib/libnls.so 25232c393a42Smrg ;; 25242c393a42Smrg 25252c393a42Smrgnto-qnx*) 25262c393a42Smrg lt_cv_deplibs_check_method=unknown 25272c393a42Smrg ;; 25282c393a42Smrg 25292c393a42Smrgopenbsd*) 25302c393a42Smrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 25312c393a42Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 25322c393a42Smrg else 25332c393a42Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 25342c393a42Smrg fi 25352c393a42Smrg ;; 25362c393a42Smrg 25372c393a42Smrgosf3* | osf4* | osf5*) 25382c393a42Smrg lt_cv_deplibs_check_method=pass_all 25392c393a42Smrg ;; 25402c393a42Smrg 25412c393a42Smrgrdos*) 25422c393a42Smrg lt_cv_deplibs_check_method=pass_all 25432c393a42Smrg ;; 25442c393a42Smrg 25452c393a42Smrgsolaris*) 25462c393a42Smrg lt_cv_deplibs_check_method=pass_all 25472c393a42Smrg ;; 25482c393a42Smrg 25492c393a42Smrgsysv4 | sysv4.3*) 25502c393a42Smrg case $host_vendor in 25512c393a42Smrg motorola) 25522c393a42Smrg 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]]' 25532c393a42Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 25542c393a42Smrg ;; 25552c393a42Smrg ncr) 25562c393a42Smrg lt_cv_deplibs_check_method=pass_all 25572c393a42Smrg ;; 25582c393a42Smrg sequent) 25592c393a42Smrg lt_cv_file_magic_cmd='/bin/file' 25602c393a42Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 25612c393a42Smrg ;; 25622c393a42Smrg sni) 25632c393a42Smrg lt_cv_file_magic_cmd='/bin/file' 25642c393a42Smrg lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 25652c393a42Smrg lt_cv_file_magic_test_file=/lib/libc.so 25662c393a42Smrg ;; 25672c393a42Smrg siemens) 25682c393a42Smrg lt_cv_deplibs_check_method=pass_all 25692c393a42Smrg ;; 25702c393a42Smrg pc) 25712c393a42Smrg lt_cv_deplibs_check_method=pass_all 25722c393a42Smrg ;; 25732c393a42Smrg esac 25742c393a42Smrg ;; 25752c393a42Smrg 25762c393a42Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 25772c393a42Smrg lt_cv_deplibs_check_method=pass_all 25782c393a42Smrg ;; 25792c393a42Smrgesac 25802c393a42Smrg]) 25812c393a42Smrgfile_magic_cmd=$lt_cv_file_magic_cmd 25822c393a42Smrgdeplibs_check_method=$lt_cv_deplibs_check_method 25832c393a42Smrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown 25842c393a42Smrg])# AC_DEPLIBS_CHECK_METHOD 25852c393a42Smrg 25862c393a42Smrg 25872c393a42Smrg# AC_PROG_NM 25882c393a42Smrg# ---------- 25892c393a42Smrg# find the pathname to a BSD-compatible name lister 25902c393a42SmrgAC_DEFUN([AC_PROG_NM], 25912c393a42Smrg[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM, 25922c393a42Smrg[if test -n "$NM"; then 25932c393a42Smrg # Let the user override the test. 25942c393a42Smrg lt_cv_path_NM="$NM" 25952c393a42Smrgelse 25962c393a42Smrg lt_nm_to_check="${ac_tool_prefix}nm" 25972c393a42Smrg if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 25982c393a42Smrg lt_nm_to_check="$lt_nm_to_check nm" 25992c393a42Smrg fi 26002c393a42Smrg for lt_tmp_nm in $lt_nm_to_check; do 26012c393a42Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 26022c393a42Smrg for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 26032c393a42Smrg IFS="$lt_save_ifs" 26042c393a42Smrg test -z "$ac_dir" && ac_dir=. 26052c393a42Smrg tmp_nm="$ac_dir/$lt_tmp_nm" 26062c393a42Smrg if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then 26072c393a42Smrg # Check to see if the nm accepts a BSD-compat flag. 26082c393a42Smrg # Adding the `sed 1q' prevents false positives on HP-UX, which says: 26092c393a42Smrg # nm: unknown option "B" ignored 26102c393a42Smrg # Tru64's nm complains that /dev/null is an invalid object file 26112c393a42Smrg case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in 26122c393a42Smrg */dev/null* | *'Invalid file or object type'*) 26132c393a42Smrg lt_cv_path_NM="$tmp_nm -B" 26142c393a42Smrg break 26152c393a42Smrg ;; 26162c393a42Smrg *) 26172c393a42Smrg case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in 26182c393a42Smrg */dev/null*) 26192c393a42Smrg lt_cv_path_NM="$tmp_nm -p" 26202c393a42Smrg break 26212c393a42Smrg ;; 26222c393a42Smrg *) 26232c393a42Smrg lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 26242c393a42Smrg continue # so that we can try to find one that supports BSD flags 26252c393a42Smrg ;; 26262c393a42Smrg esac 26272c393a42Smrg ;; 26282c393a42Smrg esac 26292c393a42Smrg fi 26302c393a42Smrg done 26312c393a42Smrg IFS="$lt_save_ifs" 26322c393a42Smrg done 26332c393a42Smrg test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm 26342c393a42Smrgfi]) 26352c393a42SmrgNM="$lt_cv_path_NM" 26362c393a42Smrg])# AC_PROG_NM 26372c393a42Smrg 26382c393a42Smrg 26392c393a42Smrg# AC_CHECK_LIBM 26402c393a42Smrg# ------------- 26412c393a42Smrg# check for math library 26422c393a42SmrgAC_DEFUN([AC_CHECK_LIBM], 26432c393a42Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 26442c393a42SmrgLIBM= 26452c393a42Smrgcase $host in 26462c393a42Smrg*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) 26472c393a42Smrg # These system don't have libm, or don't need it 26482c393a42Smrg ;; 26492c393a42Smrg*-ncr-sysv4.3*) 26502c393a42Smrg AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") 26512c393a42Smrg AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 26522c393a42Smrg ;; 26532c393a42Smrg*) 26542c393a42Smrg AC_CHECK_LIB(m, cos, LIBM="-lm") 26552c393a42Smrg ;; 26562c393a42Smrgesac 26572c393a42Smrg])# AC_CHECK_LIBM 26582c393a42Smrg 26592c393a42Smrg 26602c393a42Smrg# AC_LIBLTDL_CONVENIENCE([DIRECTORY]) 26612c393a42Smrg# ----------------------------------- 26622c393a42Smrg# sets LIBLTDL to the link flags for the libltdl convenience library and 26632c393a42Smrg# LTDLINCL to the include flags for the libltdl header and adds 26642c393a42Smrg# --enable-ltdl-convenience to the configure arguments. Note that 26652c393a42Smrg# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, 26662c393a42Smrg# it is assumed to be `libltdl'. LIBLTDL will be prefixed with 26672c393a42Smrg# '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/' 26682c393a42Smrg# (note the single quotes!). If your package is not flat and you're not 26692c393a42Smrg# using automake, define top_builddir and top_srcdir appropriately in 26702c393a42Smrg# the Makefiles. 26712c393a42SmrgAC_DEFUN([AC_LIBLTDL_CONVENIENCE], 26722c393a42Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 26732c393a42Smrg case $enable_ltdl_convenience in 26742c393a42Smrg no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; 26752c393a42Smrg "") enable_ltdl_convenience=yes 26762c393a42Smrg ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; 26772c393a42Smrg esac 26782c393a42Smrg LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la 26792c393a42Smrg LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) 26802c393a42Smrg # For backwards non-gettext consistent compatibility... 26812c393a42Smrg INCLTDL="$LTDLINCL" 26822c393a42Smrg])# AC_LIBLTDL_CONVENIENCE 26832c393a42Smrg 26842c393a42Smrg 26852c393a42Smrg# AC_LIBLTDL_INSTALLABLE([DIRECTORY]) 26862c393a42Smrg# ----------------------------------- 26872c393a42Smrg# sets LIBLTDL to the link flags for the libltdl installable library and 26882c393a42Smrg# LTDLINCL to the include flags for the libltdl header and adds 26892c393a42Smrg# --enable-ltdl-install to the configure arguments. Note that 26902c393a42Smrg# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, 26912c393a42Smrg# and an installed libltdl is not found, it is assumed to be `libltdl'. 26922c393a42Smrg# LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with 26932c393a42Smrg# '${top_srcdir}/' (note the single quotes!). If your package is not 26942c393a42Smrg# flat and you're not using automake, define top_builddir and top_srcdir 26952c393a42Smrg# appropriately in the Makefiles. 26962c393a42Smrg# In the future, this macro may have to be called after AC_PROG_LIBTOOL. 26972c393a42SmrgAC_DEFUN([AC_LIBLTDL_INSTALLABLE], 26982c393a42Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 26992c393a42Smrg AC_CHECK_LIB(ltdl, lt_dlinit, 27002c393a42Smrg [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no], 27012c393a42Smrg [if test x"$enable_ltdl_install" = xno; then 27022c393a42Smrg AC_MSG_WARN([libltdl not installed, but installation disabled]) 27032c393a42Smrg else 27042c393a42Smrg enable_ltdl_install=yes 27052c393a42Smrg fi 27062c393a42Smrg ]) 27072c393a42Smrg if test x"$enable_ltdl_install" = x"yes"; then 27082c393a42Smrg ac_configure_args="$ac_configure_args --enable-ltdl-install" 27092c393a42Smrg LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la 27102c393a42Smrg LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) 27112c393a42Smrg else 27122c393a42Smrg ac_configure_args="$ac_configure_args --enable-ltdl-install=no" 27132c393a42Smrg LIBLTDL="-lltdl" 27142c393a42Smrg LTDLINCL= 27152c393a42Smrg fi 27162c393a42Smrg # For backwards non-gettext consistent compatibility... 27172c393a42Smrg INCLTDL="$LTDLINCL" 27182c393a42Smrg])# AC_LIBLTDL_INSTALLABLE 27192c393a42Smrg 27202c393a42Smrg 27212c393a42Smrg# AC_LIBTOOL_CXX 27222c393a42Smrg# -------------- 27232c393a42Smrg# enable support for C++ libraries 27242c393a42SmrgAC_DEFUN([AC_LIBTOOL_CXX], 27252c393a42Smrg[AC_REQUIRE([_LT_AC_LANG_CXX]) 27262c393a42Smrg])# AC_LIBTOOL_CXX 27272c393a42Smrg 27282c393a42Smrg 27292c393a42Smrg# _LT_AC_LANG_CXX 27302c393a42Smrg# --------------- 27312c393a42SmrgAC_DEFUN([_LT_AC_LANG_CXX], 27322c393a42Smrg[AC_REQUIRE([AC_PROG_CXX]) 27332c393a42SmrgAC_REQUIRE([_LT_AC_PROG_CXXCPP]) 27342c393a42Smrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX]) 27352c393a42Smrg])# _LT_AC_LANG_CXX 27362c393a42Smrg 27372c393a42Smrg# _LT_AC_PROG_CXXCPP 27382c393a42Smrg# ------------------ 27392c393a42SmrgAC_DEFUN([_LT_AC_PROG_CXXCPP], 27402c393a42Smrg[ 27412c393a42SmrgAC_REQUIRE([AC_PROG_CXX]) 27422c393a42Smrgif test -n "$CXX" && ( test "X$CXX" != "Xno" && 27432c393a42Smrg ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || 27442c393a42Smrg (test "X$CXX" != "Xg++"))) ; then 27452c393a42Smrg AC_PROG_CXXCPP 27462c393a42Smrgfi 27472c393a42Smrg])# _LT_AC_PROG_CXXCPP 27482c393a42Smrg 27492c393a42Smrg# AC_LIBTOOL_F77 27502c393a42Smrg# -------------- 27512c393a42Smrg# enable support for Fortran 77 libraries 27522c393a42SmrgAC_DEFUN([AC_LIBTOOL_F77], 27532c393a42Smrg[AC_REQUIRE([_LT_AC_LANG_F77]) 27542c393a42Smrg])# AC_LIBTOOL_F77 27552c393a42Smrg 27562c393a42Smrg 27572c393a42Smrg# _LT_AC_LANG_F77 27582c393a42Smrg# --------------- 27592c393a42SmrgAC_DEFUN([_LT_AC_LANG_F77], 27602c393a42Smrg[AC_REQUIRE([AC_PROG_F77]) 27612c393a42Smrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77]) 27622c393a42Smrg])# _LT_AC_LANG_F77 27632c393a42Smrg 27642c393a42Smrg 27652c393a42Smrg# AC_LIBTOOL_GCJ 27662c393a42Smrg# -------------- 27672c393a42Smrg# enable support for GCJ libraries 27682c393a42SmrgAC_DEFUN([AC_LIBTOOL_GCJ], 27692c393a42Smrg[AC_REQUIRE([_LT_AC_LANG_GCJ]) 27702c393a42Smrg])# AC_LIBTOOL_GCJ 27712c393a42Smrg 27722c393a42Smrg 27732c393a42Smrg# _LT_AC_LANG_GCJ 27742c393a42Smrg# --------------- 27752c393a42SmrgAC_DEFUN([_LT_AC_LANG_GCJ], 27762c393a42Smrg[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[], 27772c393a42Smrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[], 27782c393a42Smrg [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[], 27792c393a42Smrg [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])], 27802c393a42Smrg [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])], 27812c393a42Smrg [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])]) 27822c393a42Smrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ]) 27832c393a42Smrg])# _LT_AC_LANG_GCJ 27842c393a42Smrg 27852c393a42Smrg 27862c393a42Smrg# AC_LIBTOOL_RC 27872c393a42Smrg# ------------- 27882c393a42Smrg# enable support for Windows resource files 27892c393a42SmrgAC_DEFUN([AC_LIBTOOL_RC], 27902c393a42Smrg[AC_REQUIRE([LT_AC_PROG_RC]) 27912c393a42Smrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC]) 27922c393a42Smrg])# AC_LIBTOOL_RC 27932c393a42Smrg 27942c393a42Smrg 27952c393a42Smrg# AC_LIBTOOL_LANG_C_CONFIG 27962c393a42Smrg# ------------------------ 27972c393a42Smrg# Ensure that the configuration vars for the C compiler are 27982c393a42Smrg# suitably defined. Those variables are subsequently used by 27992c393a42Smrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 28002c393a42SmrgAC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG]) 28012c393a42SmrgAC_DEFUN([_LT_AC_LANG_C_CONFIG], 28022c393a42Smrg[lt_save_CC="$CC" 28032c393a42SmrgAC_LANG_PUSH(C) 28042c393a42Smrg 28052c393a42Smrg# Source file extension for C test sources. 28062c393a42Smrgac_ext=c 28072c393a42Smrg 28082c393a42Smrg# Object file extension for compiled C test sources. 28092c393a42Smrgobjext=o 28102c393a42Smrg_LT_AC_TAGVAR(objext, $1)=$objext 28112c393a42Smrg 28122c393a42Smrg# Code to be used in simple compile tests 28132c393a42Smrglt_simple_compile_test_code="int some_variable = 0;" 28142c393a42Smrg 28152c393a42Smrg# Code to be used in simple link tests 28162c393a42Smrglt_simple_link_test_code='int main(){return(0);}' 28172c393a42Smrg 28182c393a42Smrg_LT_AC_SYS_COMPILER 28192c393a42Smrg 28202c393a42Smrg# save warnings/boilerplate of simple test code 28212c393a42Smrg_LT_COMPILER_BOILERPLATE 28222c393a42Smrg_LT_LINKER_BOILERPLATE 28232c393a42Smrg 28242c393a42SmrgAC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) 28252c393a42SmrgAC_LIBTOOL_PROG_COMPILER_PIC($1) 28262c393a42SmrgAC_LIBTOOL_PROG_CC_C_O($1) 28272c393a42SmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) 28282c393a42SmrgAC_LIBTOOL_PROG_LD_SHLIBS($1) 28292c393a42SmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1) 28302c393a42SmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) 28312c393a42SmrgAC_LIBTOOL_SYS_LIB_STRIP 28322c393a42SmrgAC_LIBTOOL_DLOPEN_SELF 28332c393a42Smrg 28342c393a42Smrg# Report which library types will actually be built 28352c393a42SmrgAC_MSG_CHECKING([if libtool supports shared libraries]) 28362c393a42SmrgAC_MSG_RESULT([$can_build_shared]) 28372c393a42Smrg 28382c393a42SmrgAC_MSG_CHECKING([whether to build shared libraries]) 28392c393a42Smrgtest "$can_build_shared" = "no" && enable_shared=no 28402c393a42Smrg 28412c393a42Smrg# On AIX, shared libraries and static libraries use the same namespace, and 28422c393a42Smrg# are all built from PIC. 28432c393a42Smrgcase $host_os in 28442c393a42Smrgaix3*) 28452c393a42Smrg test "$enable_shared" = yes && enable_static=no 28462c393a42Smrg if test -n "$RANLIB"; then 28472c393a42Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 28482c393a42Smrg postinstall_cmds='$RANLIB $lib' 28492c393a42Smrg fi 28502c393a42Smrg ;; 28512c393a42Smrg 28522c393a42Smrgaix[[4-9]]*) 28532c393a42Smrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 28542c393a42Smrg test "$enable_shared" = yes && enable_static=no 28552c393a42Smrg fi 28562c393a42Smrg ;; 28572c393a42Smrgesac 28582c393a42SmrgAC_MSG_RESULT([$enable_shared]) 28592c393a42Smrg 28602c393a42SmrgAC_MSG_CHECKING([whether to build static libraries]) 28612c393a42Smrg# Make sure either enable_shared or enable_static is yes. 28622c393a42Smrgtest "$enable_shared" = yes || enable_static=yes 28632c393a42SmrgAC_MSG_RESULT([$enable_static]) 28642c393a42Smrg 28652c393a42SmrgAC_LIBTOOL_CONFIG($1) 28662c393a42Smrg 28672c393a42SmrgAC_LANG_POP 28682c393a42SmrgCC="$lt_save_CC" 28692c393a42Smrg])# AC_LIBTOOL_LANG_C_CONFIG 28702c393a42Smrg 28712c393a42Smrg 28722c393a42Smrg# AC_LIBTOOL_LANG_CXX_CONFIG 28732c393a42Smrg# -------------------------- 28742c393a42Smrg# Ensure that the configuration vars for the C compiler are 28752c393a42Smrg# suitably defined. Those variables are subsequently used by 28762c393a42Smrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 28772c393a42SmrgAC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)]) 28782c393a42SmrgAC_DEFUN([_LT_AC_LANG_CXX_CONFIG], 28792c393a42Smrg[AC_LANG_PUSH(C++) 28802c393a42SmrgAC_REQUIRE([AC_PROG_CXX]) 28812c393a42SmrgAC_REQUIRE([_LT_AC_PROG_CXXCPP]) 28822c393a42Smrg 28832c393a42Smrg_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 28842c393a42Smrg_LT_AC_TAGVAR(allow_undefined_flag, $1)= 28852c393a42Smrg_LT_AC_TAGVAR(always_export_symbols, $1)=no 28862c393a42Smrg_LT_AC_TAGVAR(archive_expsym_cmds, $1)= 28872c393a42Smrg_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= 28882c393a42Smrg_LT_AC_TAGVAR(hardcode_direct, $1)=no 28892c393a42Smrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= 28902c393a42Smrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 28912c393a42Smrg_LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 28922c393a42Smrg_LT_AC_TAGVAR(hardcode_minus_L, $1)=no 28932c393a42Smrg_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 28942c393a42Smrg_LT_AC_TAGVAR(hardcode_automatic, $1)=no 28952c393a42Smrg_LT_AC_TAGVAR(module_cmds, $1)= 28962c393a42Smrg_LT_AC_TAGVAR(module_expsym_cmds, $1)= 28972c393a42Smrg_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown 28982c393a42Smrg_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 28992c393a42Smrg_LT_AC_TAGVAR(no_undefined_flag, $1)= 29002c393a42Smrg_LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 29012c393a42Smrg_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no 29022c393a42Smrg 29032c393a42Smrg# Dependencies to place before and after the object being linked: 29042c393a42Smrg_LT_AC_TAGVAR(predep_objects, $1)= 29052c393a42Smrg_LT_AC_TAGVAR(postdep_objects, $1)= 29062c393a42Smrg_LT_AC_TAGVAR(predeps, $1)= 29072c393a42Smrg_LT_AC_TAGVAR(postdeps, $1)= 29082c393a42Smrg_LT_AC_TAGVAR(compiler_lib_search_path, $1)= 29092c393a42Smrg_LT_AC_TAGVAR(compiler_lib_search_dirs, $1)= 29102c393a42Smrg 29112c393a42Smrg# Source file extension for C++ test sources. 29122c393a42Smrgac_ext=cpp 29132c393a42Smrg 29142c393a42Smrg# Object file extension for compiled C++ test sources. 29152c393a42Smrgobjext=o 29162c393a42Smrg_LT_AC_TAGVAR(objext, $1)=$objext 29172c393a42Smrg 29182c393a42Smrg# Code to be used in simple compile tests 29192c393a42Smrglt_simple_compile_test_code="int some_variable = 0;" 29202c393a42Smrg 29212c393a42Smrg# Code to be used in simple link tests 29222c393a42Smrglt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 29232c393a42Smrg 29242c393a42Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 29252c393a42Smrg_LT_AC_SYS_COMPILER 29262c393a42Smrg 29272c393a42Smrg# save warnings/boilerplate of simple test code 29282c393a42Smrg_LT_COMPILER_BOILERPLATE 29292c393a42Smrg_LT_LINKER_BOILERPLATE 29302c393a42Smrg 29312c393a42Smrg# Allow CC to be a program name with arguments. 29322c393a42Smrglt_save_CC=$CC 29332c393a42Smrglt_save_LD=$LD 29342c393a42Smrglt_save_GCC=$GCC 29352c393a42SmrgGCC=$GXX 29362c393a42Smrglt_save_with_gnu_ld=$with_gnu_ld 29372c393a42Smrglt_save_path_LD=$lt_cv_path_LD 29382c393a42Smrgif test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 29392c393a42Smrg lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 29402c393a42Smrgelse 29412c393a42Smrg $as_unset lt_cv_prog_gnu_ld 29422c393a42Smrgfi 29432c393a42Smrgif test -n "${lt_cv_path_LDCXX+set}"; then 29442c393a42Smrg lt_cv_path_LD=$lt_cv_path_LDCXX 29452c393a42Smrgelse 29462c393a42Smrg $as_unset lt_cv_path_LD 29472c393a42Smrgfi 29482c393a42Smrgtest -z "${LDCXX+set}" || LD=$LDCXX 29492c393a42SmrgCC=${CXX-"c++"} 29502c393a42Smrgcompiler=$CC 29512c393a42Smrg_LT_AC_TAGVAR(compiler, $1)=$CC 29522c393a42Smrg_LT_CC_BASENAME([$compiler]) 29532c393a42Smrg 29542c393a42Smrg# We don't want -fno-exception wen compiling C++ code, so set the 29552c393a42Smrg# no_builtin_flag separately 29562c393a42Smrgif test "$GXX" = yes; then 29572c393a42Smrg _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 29582c393a42Smrgelse 29592c393a42Smrg _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 29602c393a42Smrgfi 29612c393a42Smrg 29622c393a42Smrgif test "$GXX" = yes; then 29632c393a42Smrg # Set up default GNU C++ configuration 29642c393a42Smrg 29652c393a42Smrg AC_PROG_LD 29662c393a42Smrg 29672c393a42Smrg # Check if GNU C++ uses GNU ld as the underlying linker, since the 29682c393a42Smrg # archiving commands below assume that GNU ld is being used. 29692c393a42Smrg if test "$with_gnu_ld" = yes; then 29702c393a42Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 29712c393a42Smrg _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' 29722c393a42Smrg 29732c393a42Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 29742c393a42Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 29752c393a42Smrg 29762c393a42Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 29772c393a42Smrg # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 29782c393a42Smrg # investigate it a little bit more. (MM) 29792c393a42Smrg wlarc='${wl}' 29802c393a42Smrg 29812c393a42Smrg # ancient GNU ld didn't support --whole-archive et. al. 29822c393a42Smrg if eval "`$CC -print-prog-name=ld` --help 2>&1" | \ 29832c393a42Smrg grep 'no-whole-archive' > /dev/null; then 29842c393a42Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 29852c393a42Smrg else 29862c393a42Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 29872c393a42Smrg fi 29882c393a42Smrg else 29892c393a42Smrg with_gnu_ld=no 29902c393a42Smrg wlarc= 29912c393a42Smrg 29922c393a42Smrg # A generic and very simple default shared library creation 29932c393a42Smrg # command for GNU C++ for the case where it uses the native 29942c393a42Smrg # linker, instead of GNU ld. If possible, this setting should 29952c393a42Smrg # overridden to take advantage of the native linker features on 29962c393a42Smrg # the platform it is being used on. 29972c393a42Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 29982c393a42Smrg fi 29992c393a42Smrg 30002c393a42Smrg # Commands to make compiler produce verbose output that lists 30012c393a42Smrg # what "hidden" libraries, object files and flags are used when 30022c393a42Smrg # linking a shared library. 30032c393a42Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' 30042c393a42Smrg 30052c393a42Smrgelse 30062c393a42Smrg GXX=no 30072c393a42Smrg with_gnu_ld=no 30082c393a42Smrg wlarc= 30092c393a42Smrgfi 30102c393a42Smrg 30112c393a42Smrg# PORTME: fill in a description of your system's C++ link characteristics 30122c393a42SmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 30132c393a42Smrg_LT_AC_TAGVAR(ld_shlibs, $1)=yes 30142c393a42Smrgcase $host_os in 30152c393a42Smrg aix3*) 30162c393a42Smrg # FIXME: insert proper C++ library support 30172c393a42Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 30182c393a42Smrg ;; 30192c393a42Smrg aix[[4-9]]*) 30202c393a42Smrg if test "$host_cpu" = ia64; then 30212c393a42Smrg # On IA64, the linker does run time linking by default, so we don't 30222c393a42Smrg # have to do anything special. 30232c393a42Smrg aix_use_runtimelinking=no 30242c393a42Smrg exp_sym_flag='-Bexport' 30252c393a42Smrg no_entry_flag="" 30262c393a42Smrg else 30272c393a42Smrg aix_use_runtimelinking=no 30282c393a42Smrg 30292c393a42Smrg # Test if we are trying to use run time linking or normal 30302c393a42Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 30312c393a42Smrg # need to do runtime linking. 30322c393a42Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 30332c393a42Smrg for ld_flag in $LDFLAGS; do 30342c393a42Smrg case $ld_flag in 30352c393a42Smrg *-brtl*) 30362c393a42Smrg aix_use_runtimelinking=yes 30372c393a42Smrg break 30382c393a42Smrg ;; 30392c393a42Smrg esac 30402c393a42Smrg done 30412c393a42Smrg ;; 30422c393a42Smrg esac 30432c393a42Smrg 30442c393a42Smrg exp_sym_flag='-bexport' 30452c393a42Smrg no_entry_flag='-bnoentry' 30462c393a42Smrg fi 30472c393a42Smrg 30482c393a42Smrg # When large executables or shared objects are built, AIX ld can 30492c393a42Smrg # have problems creating the table of contents. If linking a library 30502c393a42Smrg # or program results in "error TOC overflow" add -mminimal-toc to 30512c393a42Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 30522c393a42Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 30532c393a42Smrg 30542c393a42Smrg _LT_AC_TAGVAR(archive_cmds, $1)='' 30552c393a42Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 30562c393a42Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' 30572c393a42Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 30582c393a42Smrg 30592c393a42Smrg if test "$GXX" = yes; then 30602c393a42Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 30612c393a42Smrg # We only want to do this on AIX 4.2 and lower, the check 30622c393a42Smrg # below for broken collect2 doesn't work under 4.3+ 30632c393a42Smrg collect2name=`${CC} -print-prog-name=collect2` 30642c393a42Smrg if test -f "$collect2name" && \ 30652c393a42Smrg strings "$collect2name" | grep resolve_lib_name >/dev/null 30662c393a42Smrg then 30672c393a42Smrg # We have reworked collect2 30682c393a42Smrg : 30692c393a42Smrg else 30702c393a42Smrg # We have old collect2 30712c393a42Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported 30722c393a42Smrg # It fails to find uninstalled libraries when the uninstalled 30732c393a42Smrg # path is not listed in the libpath. Setting hardcode_minus_L 30742c393a42Smrg # to unsupported forces relinking 30752c393a42Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 30762c393a42Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 30772c393a42Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 30782c393a42Smrg fi 30792c393a42Smrg ;; 30802c393a42Smrg esac 30812c393a42Smrg shared_flag='-shared' 30822c393a42Smrg if test "$aix_use_runtimelinking" = yes; then 30832c393a42Smrg shared_flag="$shared_flag "'${wl}-G' 30842c393a42Smrg fi 30852c393a42Smrg else 30862c393a42Smrg # not using gcc 30872c393a42Smrg if test "$host_cpu" = ia64; then 30882c393a42Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 30892c393a42Smrg # chokes on -Wl,-G. The following line is correct: 30902c393a42Smrg shared_flag='-G' 30912c393a42Smrg else 30922c393a42Smrg if test "$aix_use_runtimelinking" = yes; then 30932c393a42Smrg shared_flag='${wl}-G' 30942c393a42Smrg else 30952c393a42Smrg shared_flag='${wl}-bM:SRE' 30962c393a42Smrg fi 30972c393a42Smrg fi 30982c393a42Smrg fi 30992c393a42Smrg 31002c393a42Smrg # It seems that -bexpall does not export symbols beginning with 31012c393a42Smrg # underscore (_), so it is better to generate a list of symbols to export. 31022c393a42Smrg _LT_AC_TAGVAR(always_export_symbols, $1)=yes 31032c393a42Smrg if test "$aix_use_runtimelinking" = yes; then 31042c393a42Smrg # Warning - without using the other runtime loading flags (-brtl), 31052c393a42Smrg # -berok will link without error, but may produce a broken library. 31062c393a42Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' 31072c393a42Smrg # Determine the default libpath from the value encoded in an empty executable. 31082c393a42Smrg _LT_AC_SYS_LIBPATH_AIX 31092c393a42Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 31102c393a42Smrg 31112c393a42Smrg _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" 31122c393a42Smrg else 31132c393a42Smrg if test "$host_cpu" = ia64; then 31142c393a42Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 31152c393a42Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 31162c393a42Smrg _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" 31172c393a42Smrg else 31182c393a42Smrg # Determine the default libpath from the value encoded in an empty executable. 31192c393a42Smrg _LT_AC_SYS_LIBPATH_AIX 31202c393a42Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 31212c393a42Smrg # Warning - without using the other run time loading flags, 31222c393a42Smrg # -berok will link without error, but may produce a broken library. 31232c393a42Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 31242c393a42Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 31252c393a42Smrg # Exported symbols can be pulled into shared objects from archives 31262c393a42Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 31272c393a42Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes 31282c393a42Smrg # This is similar to how AIX traditionally builds its shared libraries. 31292c393a42Smrg _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' 31302c393a42Smrg fi 31312c393a42Smrg fi 31322c393a42Smrg ;; 31332c393a42Smrg 31342c393a42Smrg beos*) 31352c393a42Smrg if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 31362c393a42Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 31372c393a42Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 31382c393a42Smrg # support --undefined. This deserves some investigation. FIXME 31392c393a42Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 31402c393a42Smrg else 31412c393a42Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 31422c393a42Smrg fi 31432c393a42Smrg ;; 31442c393a42Smrg 31452c393a42Smrg chorus*) 31462c393a42Smrg case $cc_basename in 31472c393a42Smrg *) 31482c393a42Smrg # FIXME: insert proper C++ library support 31492c393a42Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 31502c393a42Smrg ;; 31512c393a42Smrg esac 31522c393a42Smrg ;; 31532c393a42Smrg 31542c393a42Smrg cygwin* | mingw* | pw32*) 31552c393a42Smrg # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 31562c393a42Smrg # as there is no search path for DLLs. 31572c393a42Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 31582c393a42Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 31592c393a42Smrg _LT_AC_TAGVAR(always_export_symbols, $1)=no 31602c393a42Smrg _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 31612c393a42Smrg 31622c393a42Smrg if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then 31632c393a42Smrg _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' 31642c393a42Smrg # If the export-symbols file already is a .def file (1st line 31652c393a42Smrg # is EXPORTS), use it as is; otherwise, prepend... 31662c393a42Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 31672c393a42Smrg cp $export_symbols $output_objdir/$soname.def; 31682c393a42Smrg else 31692c393a42Smrg echo EXPORTS > $output_objdir/$soname.def; 31702c393a42Smrg cat $export_symbols >> $output_objdir/$soname.def; 31712c393a42Smrg fi~ 31722c393a42Smrg $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' 31732c393a42Smrg else 31742c393a42Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 31752c393a42Smrg fi 31762c393a42Smrg ;; 31772c393a42Smrg darwin* | rhapsody*) 31782c393a42Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 31792c393a42Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 31802c393a42Smrg _LT_AC_TAGVAR(hardcode_automatic, $1)=yes 31812c393a42Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 31822c393a42Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' 31832c393a42Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 31842c393a42Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" 31852c393a42Smrg if test "$GXX" = yes ; then 31862c393a42Smrg output_verbose_link_cmd='echo' 31872c393a42Smrg _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}" 31882c393a42Smrg _LT_AC_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" 31892c393a42Smrg _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}" 31902c393a42Smrg _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}" 31912c393a42Smrg if test "$lt_cv_apple_cc_single_mod" != "yes"; then 31922c393a42Smrg _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}" 31932c393a42Smrg _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}" 31942c393a42Smrg fi 31952c393a42Smrg else 31962c393a42Smrg case $cc_basename in 31972c393a42Smrg xlc*) 31982c393a42Smrg output_verbose_link_cmd='echo' 31992c393a42Smrg _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' 32002c393a42Smrg _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' 32012c393a42Smrg # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds 32022c393a42Smrg _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}' 32032c393a42Smrg _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}' 32042c393a42Smrg ;; 32052c393a42Smrg *) 32062c393a42Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 32072c393a42Smrg ;; 32082c393a42Smrg esac 32092c393a42Smrg fi 32102c393a42Smrg ;; 32112c393a42Smrg 32122c393a42Smrg dgux*) 32132c393a42Smrg case $cc_basename in 32142c393a42Smrg ec++*) 32152c393a42Smrg # FIXME: insert proper C++ library support 32162c393a42Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 32172c393a42Smrg ;; 32182c393a42Smrg ghcx*) 32192c393a42Smrg # Green Hills C++ Compiler 32202c393a42Smrg # FIXME: insert proper C++ library support 32212c393a42Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 32222c393a42Smrg ;; 32232c393a42Smrg *) 32242c393a42Smrg # FIXME: insert proper C++ library support 32252c393a42Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 32262c393a42Smrg ;; 32272c393a42Smrg esac 32282c393a42Smrg ;; 32292c393a42Smrg freebsd[[12]]*) 32302c393a42Smrg # C++ shared libraries reported to be fairly broken before switch to ELF 32312c393a42Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 32322c393a42Smrg ;; 32332c393a42Smrg freebsd-elf*) 32342c393a42Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 32352c393a42Smrg ;; 32362c393a42Smrg freebsd* | dragonfly*) 32372c393a42Smrg # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 32382c393a42Smrg # conventions 32392c393a42Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=yes 32402c393a42Smrg ;; 32412c393a42Smrg gnu*) 32422c393a42Smrg ;; 32432c393a42Smrg hpux9*) 32442c393a42Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 32452c393a42Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 32462c393a42Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 32472c393a42Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 32482c393a42Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 32492c393a42Smrg # but as the default 32502c393a42Smrg # location of the library. 32512c393a42Smrg 32522c393a42Smrg case $cc_basename in 32532c393a42Smrg CC*) 32542c393a42Smrg # FIXME: insert proper C++ library support 32552c393a42Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 32562c393a42Smrg ;; 32572c393a42Smrg aCC*) 32582c393a42Smrg _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' 32592c393a42Smrg # Commands to make compiler produce verbose output that lists 32602c393a42Smrg # what "hidden" libraries, object files and flags are used when 32612c393a42Smrg # linking a shared library. 32622c393a42Smrg # 32632c393a42Smrg # There doesn't appear to be a way to prevent this compiler from 32642c393a42Smrg # explicitly linking system object files so we need to strip them 32652c393a42Smrg # from the output so that they don't get included in the library 32662c393a42Smrg # dependencies. 32672c393a42Smrg 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' 32682c393a42Smrg ;; 32692c393a42Smrg *) 32702c393a42Smrg if test "$GXX" = yes; then 32712c393a42Smrg _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' 32722c393a42Smrg else 32732c393a42Smrg # FIXME: insert proper C++ library support 32742c393a42Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 32752c393a42Smrg fi 32762c393a42Smrg ;; 32772c393a42Smrg esac 32782c393a42Smrg ;; 32792c393a42Smrg hpux10*|hpux11*) 32802c393a42Smrg if test $with_gnu_ld = no; then 32812c393a42Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 32822c393a42Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 32832c393a42Smrg 32842c393a42Smrg case $host_cpu in 32852c393a42Smrg hppa*64*|ia64*) ;; 32862c393a42Smrg *) 32872c393a42Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 32882c393a42Smrg ;; 32892c393a42Smrg esac 32902c393a42Smrg fi 32912c393a42Smrg case $host_cpu in 32922c393a42Smrg hppa*64*|ia64*) 32932c393a42Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 32942c393a42Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 32952c393a42Smrg ;; 32962c393a42Smrg *) 32972c393a42Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 32982c393a42Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 32992c393a42Smrg # but as the default 33002c393a42Smrg # location of the library. 33012c393a42Smrg ;; 33022c393a42Smrg esac 33032c393a42Smrg 33042c393a42Smrg case $cc_basename in 33052c393a42Smrg CC*) 33062c393a42Smrg # FIXME: insert proper C++ library support 33072c393a42Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 33082c393a42Smrg ;; 33092c393a42Smrg aCC*) 33102c393a42Smrg case $host_cpu in 33112c393a42Smrg hppa*64*) 33122c393a42Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 33132c393a42Smrg ;; 33142c393a42Smrg ia64*) 33152c393a42Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 33162c393a42Smrg ;; 33172c393a42Smrg *) 33182c393a42Smrg _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' 33192c393a42Smrg ;; 33202c393a42Smrg esac 33212c393a42Smrg # Commands to make compiler produce verbose output that lists 33222c393a42Smrg # what "hidden" libraries, object files and flags are used when 33232c393a42Smrg # linking a shared library. 33242c393a42Smrg # 33252c393a42Smrg # There doesn't appear to be a way to prevent this compiler from 33262c393a42Smrg # explicitly linking system object files so we need to strip them 33272c393a42Smrg # from the output so that they don't get included in the library 33282c393a42Smrg # dependencies. 33292c393a42Smrg 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' 33302c393a42Smrg ;; 33312c393a42Smrg *) 33322c393a42Smrg if test "$GXX" = yes; then 33332c393a42Smrg if test $with_gnu_ld = no; then 33342c393a42Smrg case $host_cpu in 33352c393a42Smrg hppa*64*) 33362c393a42Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 33372c393a42Smrg ;; 33382c393a42Smrg ia64*) 33392c393a42Smrg _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' 33402c393a42Smrg ;; 33412c393a42Smrg *) 33422c393a42Smrg _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' 33432c393a42Smrg ;; 33442c393a42Smrg esac 33452c393a42Smrg fi 33462c393a42Smrg else 33472c393a42Smrg # FIXME: insert proper C++ library support 33482c393a42Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 33492c393a42Smrg fi 33502c393a42Smrg ;; 33512c393a42Smrg esac 33522c393a42Smrg ;; 33532c393a42Smrg interix[[3-9]]*) 33542c393a42Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 33552c393a42Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 33562c393a42Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 33572c393a42Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 33582c393a42Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 33592c393a42Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 33602c393a42Smrg # default) and relocated if they conflict, which is a slow very memory 33612c393a42Smrg # consuming and fragmenting process. To avoid this, we pick a random, 33622c393a42Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 33632c393a42Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 33642c393a42Smrg _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' 33652c393a42Smrg _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' 33662c393a42Smrg ;; 33672c393a42Smrg irix5* | irix6*) 33682c393a42Smrg case $cc_basename in 33692c393a42Smrg CC*) 33702c393a42Smrg # SGI C++ 33712c393a42Smrg _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' 33722c393a42Smrg 33732c393a42Smrg # Archives containing C++ object files must be created using 33742c393a42Smrg # "CC -ar", where "CC" is the IRIX C++ compiler. This is 33752c393a42Smrg # necessary to make sure instantiated templates are included 33762c393a42Smrg # in the archive. 33772c393a42Smrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 33782c393a42Smrg ;; 33792c393a42Smrg *) 33802c393a42Smrg if test "$GXX" = yes; then 33812c393a42Smrg if test "$with_gnu_ld" = no; then 33822c393a42Smrg _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' 33832c393a42Smrg else 33842c393a42Smrg _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' 33852c393a42Smrg fi 33862c393a42Smrg fi 33872c393a42Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 33882c393a42Smrg ;; 33892c393a42Smrg esac 33902c393a42Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 33912c393a42Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 33922c393a42Smrg ;; 33932c393a42Smrg linux* | k*bsd*-gnu) 33942c393a42Smrg case $cc_basename in 33952c393a42Smrg KCC*) 33962c393a42Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 33972c393a42Smrg 33982c393a42Smrg # KCC will only create a shared library if the output file 33992c393a42Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 34002c393a42Smrg # to its proper name (with version) after linking. 34012c393a42Smrg _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' 34022c393a42Smrg _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' 34032c393a42Smrg # Commands to make compiler produce verbose output that lists 34042c393a42Smrg # what "hidden" libraries, object files and flags are used when 34052c393a42Smrg # linking a shared library. 34062c393a42Smrg # 34072c393a42Smrg # There doesn't appear to be a way to prevent this compiler from 34082c393a42Smrg # explicitly linking system object files so we need to strip them 34092c393a42Smrg # from the output so that they don't get included in the library 34102c393a42Smrg # dependencies. 34112c393a42Smrg 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' 34122c393a42Smrg 34132c393a42Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir' 34142c393a42Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 34152c393a42Smrg 34162c393a42Smrg # Archives containing C++ object files must be created using 34172c393a42Smrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 34182c393a42Smrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 34192c393a42Smrg ;; 34202c393a42Smrg icpc*) 34212c393a42Smrg # Intel C++ 34222c393a42Smrg with_gnu_ld=yes 34232c393a42Smrg # version 8.0 and above of icpc choke on multiply defined symbols 34242c393a42Smrg # if we add $predep_objects and $postdep_objects, however 7.1 and 34252c393a42Smrg # earlier do not add the objects themselves. 34262c393a42Smrg case `$CC -V 2>&1` in 34272c393a42Smrg *"Version 7."*) 34282c393a42Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 34292c393a42Smrg _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' 34302c393a42Smrg ;; 34312c393a42Smrg *) # Version 8.0 or newer 34322c393a42Smrg tmp_idyn= 34332c393a42Smrg case $host_cpu in 34342c393a42Smrg ia64*) tmp_idyn=' -i_dynamic';; 34352c393a42Smrg esac 34362c393a42Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 34372c393a42Smrg _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' 34382c393a42Smrg ;; 34392c393a42Smrg esac 34402c393a42Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 34412c393a42Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 34422c393a42Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 34432c393a42Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 34442c393a42Smrg ;; 34452c393a42Smrg pgCC* | pgcpp*) 34462c393a42Smrg # Portland Group C++ compiler 34472c393a42Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 34482c393a42Smrg _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' 34492c393a42Smrg 34502c393a42Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 34512c393a42Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 34522c393a42Smrg _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' 34532c393a42Smrg ;; 34542c393a42Smrg cxx*) 34552c393a42Smrg # Compaq C++ 34562c393a42Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 34572c393a42Smrg _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' 34582c393a42Smrg 34592c393a42Smrg runpath_var=LD_RUN_PATH 34602c393a42Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 34612c393a42Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 34622c393a42Smrg 34632c393a42Smrg # Commands to make compiler produce verbose output that lists 34642c393a42Smrg # what "hidden" libraries, object files and flags are used when 34652c393a42Smrg # linking a shared library. 34662c393a42Smrg # 34672c393a42Smrg # There doesn't appear to be a way to prevent this compiler from 34682c393a42Smrg # explicitly linking system object files so we need to strip them 34692c393a42Smrg # from the output so that they don't get included in the library 34702c393a42Smrg # dependencies. 34712c393a42Smrg 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' 34722c393a42Smrg ;; 34732c393a42Smrg *) 34742c393a42Smrg case `$CC -V 2>&1 | sed 5q` in 34752c393a42Smrg *Sun\ C*) 34762c393a42Smrg # Sun C++ 5.9 34772c393a42Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' 34782c393a42Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 34792c393a42Smrg _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' 34802c393a42Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 34812c393a42Smrg _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' 34822c393a42Smrg 34832c393a42Smrg # Not sure whether something based on 34842c393a42Smrg # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 34852c393a42Smrg # would be better. 34862c393a42Smrg output_verbose_link_cmd='echo' 34872c393a42Smrg 34882c393a42Smrg # Archives containing C++ object files must be created using 34892c393a42Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 34902c393a42Smrg # necessary to make sure instantiated templates are included 34912c393a42Smrg # in the archive. 34922c393a42Smrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 34932c393a42Smrg ;; 34942c393a42Smrg esac 34952c393a42Smrg ;; 34962c393a42Smrg esac 34972c393a42Smrg ;; 34982c393a42Smrg lynxos*) 34992c393a42Smrg # FIXME: insert proper C++ library support 35002c393a42Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 35012c393a42Smrg ;; 35022c393a42Smrg m88k*) 35032c393a42Smrg # FIXME: insert proper C++ library support 35042c393a42Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 35052c393a42Smrg ;; 35062c393a42Smrg mvs*) 35072c393a42Smrg case $cc_basename in 35082c393a42Smrg cxx*) 35092c393a42Smrg # FIXME: insert proper C++ library support 35102c393a42Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 35112c393a42Smrg ;; 35122c393a42Smrg *) 35132c393a42Smrg # FIXME: insert proper C++ library support 35142c393a42Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 35152c393a42Smrg ;; 35162c393a42Smrg esac 35172c393a42Smrg ;; 35182c393a42Smrg netbsd* | netbsdelf*-gnu) 35192c393a42Smrg if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then 35202c393a42Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 35212c393a42Smrg wlarc= 35222c393a42Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 35232c393a42Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 35242c393a42Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 35252c393a42Smrg fi 35262c393a42Smrg # Workaround some broken pre-1.5 toolchains 35272c393a42Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 35282c393a42Smrg ;; 35292c393a42Smrg openbsd2*) 35302c393a42Smrg # C++ shared libraries are fairly broken 35312c393a42Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 35322c393a42Smrg ;; 35332c393a42Smrg openbsd*) 35342c393a42Smrg if test -f /usr/libexec/ld.so; then 35352c393a42Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 35362c393a42Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 35372c393a42Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 35382c393a42Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 35392c393a42Smrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 35402c393a42Smrg _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' 35412c393a42Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 35422c393a42Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 35432c393a42Smrg fi 35442c393a42Smrg output_verbose_link_cmd='echo' 35452c393a42Smrg else 35462c393a42Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 35472c393a42Smrg fi 35482c393a42Smrg ;; 35492c393a42Smrg osf3*) 35502c393a42Smrg case $cc_basename in 35512c393a42Smrg KCC*) 35522c393a42Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 35532c393a42Smrg 35542c393a42Smrg # KCC will only create a shared library if the output file 35552c393a42Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 35562c393a42Smrg # to its proper name (with version) after linking. 35572c393a42Smrg _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' 35582c393a42Smrg 35592c393a42Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 35602c393a42Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 35612c393a42Smrg 35622c393a42Smrg # Archives containing C++ object files must be created using 35632c393a42Smrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 35642c393a42Smrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 35652c393a42Smrg 35662c393a42Smrg ;; 35672c393a42Smrg RCC*) 35682c393a42Smrg # Rational C++ 2.4.1 35692c393a42Smrg # FIXME: insert proper C++ library support 35702c393a42Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 35712c393a42Smrg ;; 35722c393a42Smrg cxx*) 35732c393a42Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 35742c393a42Smrg _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' 35752c393a42Smrg 35762c393a42Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 35772c393a42Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 35782c393a42Smrg 35792c393a42Smrg # Commands to make compiler produce verbose output that lists 35802c393a42Smrg # what "hidden" libraries, object files and flags are used when 35812c393a42Smrg # linking a shared library. 35822c393a42Smrg # 35832c393a42Smrg # There doesn't appear to be a way to prevent this compiler from 35842c393a42Smrg # explicitly linking system object files so we need to strip them 35852c393a42Smrg # from the output so that they don't get included in the library 35862c393a42Smrg # dependencies. 35872c393a42Smrg 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' 35882c393a42Smrg ;; 35892c393a42Smrg *) 35902c393a42Smrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 35912c393a42Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 35922c393a42Smrg _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' 35932c393a42Smrg 35942c393a42Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 35952c393a42Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 35962c393a42Smrg 35972c393a42Smrg # Commands to make compiler produce verbose output that lists 35982c393a42Smrg # what "hidden" libraries, object files and flags are used when 35992c393a42Smrg # linking a shared library. 36002c393a42Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' 36012c393a42Smrg 36022c393a42Smrg else 36032c393a42Smrg # FIXME: insert proper C++ library support 36042c393a42Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 36052c393a42Smrg fi 36062c393a42Smrg ;; 36072c393a42Smrg esac 36082c393a42Smrg ;; 36092c393a42Smrg osf4* | osf5*) 36102c393a42Smrg case $cc_basename in 36112c393a42Smrg KCC*) 36122c393a42Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 36132c393a42Smrg 36142c393a42Smrg # KCC will only create a shared library if the output file 36152c393a42Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 36162c393a42Smrg # to its proper name (with version) after linking. 36172c393a42Smrg _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' 36182c393a42Smrg 36192c393a42Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 36202c393a42Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 36212c393a42Smrg 36222c393a42Smrg # Archives containing C++ object files must be created using 36232c393a42Smrg # the KAI C++ compiler. 36242c393a42Smrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' 36252c393a42Smrg ;; 36262c393a42Smrg RCC*) 36272c393a42Smrg # Rational C++ 2.4.1 36282c393a42Smrg # FIXME: insert proper C++ library support 36292c393a42Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 36302c393a42Smrg ;; 36312c393a42Smrg cxx*) 36322c393a42Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 36332c393a42Smrg _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' 36342c393a42Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 36352c393a42Smrg echo "-hidden">> $lib.exp~ 36362c393a42Smrg $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~ 36372c393a42Smrg $rm $lib.exp' 36382c393a42Smrg 36392c393a42Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 36402c393a42Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 36412c393a42Smrg 36422c393a42Smrg # Commands to make compiler produce verbose output that lists 36432c393a42Smrg # what "hidden" libraries, object files and flags are used when 36442c393a42Smrg # linking a shared library. 36452c393a42Smrg # 36462c393a42Smrg # There doesn't appear to be a way to prevent this compiler from 36472c393a42Smrg # explicitly linking system object files so we need to strip them 36482c393a42Smrg # from the output so that they don't get included in the library 36492c393a42Smrg # dependencies. 36502c393a42Smrg 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' 36512c393a42Smrg ;; 36522c393a42Smrg *) 36532c393a42Smrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 36542c393a42Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 36552c393a42Smrg _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' 36562c393a42Smrg 36572c393a42Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 36582c393a42Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 36592c393a42Smrg 36602c393a42Smrg # Commands to make compiler produce verbose output that lists 36612c393a42Smrg # what "hidden" libraries, object files and flags are used when 36622c393a42Smrg # linking a shared library. 36632c393a42Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' 36642c393a42Smrg 36652c393a42Smrg else 36662c393a42Smrg # FIXME: insert proper C++ library support 36672c393a42Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 36682c393a42Smrg fi 36692c393a42Smrg ;; 36702c393a42Smrg esac 36712c393a42Smrg ;; 36722c393a42Smrg psos*) 36732c393a42Smrg # FIXME: insert proper C++ library support 36742c393a42Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 36752c393a42Smrg ;; 36762c393a42Smrg sunos4*) 36772c393a42Smrg case $cc_basename in 36782c393a42Smrg CC*) 36792c393a42Smrg # Sun C++ 4.x 36802c393a42Smrg # FIXME: insert proper C++ library support 36812c393a42Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 36822c393a42Smrg ;; 36832c393a42Smrg lcc*) 36842c393a42Smrg # Lucid 36852c393a42Smrg # FIXME: insert proper C++ library support 36862c393a42Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 36872c393a42Smrg ;; 36882c393a42Smrg *) 36892c393a42Smrg # FIXME: insert proper C++ library support 36902c393a42Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 36912c393a42Smrg ;; 36922c393a42Smrg esac 36932c393a42Smrg ;; 36942c393a42Smrg solaris*) 36952c393a42Smrg case $cc_basename in 36962c393a42Smrg CC*) 36972c393a42Smrg # Sun C++ 4.2, 5.x and Centerline C++ 36982c393a42Smrg _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes 36992c393a42Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' 37002c393a42Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 37012c393a42Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 37022c393a42Smrg $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' 37032c393a42Smrg 37042c393a42Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 37052c393a42Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 37062c393a42Smrg case $host_os in 37072c393a42Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 37082c393a42Smrg *) 37092c393a42Smrg # The compiler driver will combine and reorder linker options, 37102c393a42Smrg # but understands `-z linker_flag'. 37112c393a42Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 37122c393a42Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 37132c393a42Smrg ;; 37142c393a42Smrg esac 37152c393a42Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 37162c393a42Smrg 37172c393a42Smrg output_verbose_link_cmd='echo' 37182c393a42Smrg 37192c393a42Smrg # Archives containing C++ object files must be created using 37202c393a42Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 37212c393a42Smrg # necessary to make sure instantiated templates are included 37222c393a42Smrg # in the archive. 37232c393a42Smrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 37242c393a42Smrg ;; 37252c393a42Smrg gcx*) 37262c393a42Smrg # Green Hills C++ Compiler 37272c393a42Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 37282c393a42Smrg 37292c393a42Smrg # The C++ compiler must be used to create the archive. 37302c393a42Smrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 37312c393a42Smrg ;; 37322c393a42Smrg *) 37332c393a42Smrg # GNU C++ compiler with Solaris linker 37342c393a42Smrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 37352c393a42Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' 37362c393a42Smrg if $CC --version | grep -v '^2\.7' > /dev/null; then 37372c393a42Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 37382c393a42Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 37392c393a42Smrg $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' 37402c393a42Smrg 37412c393a42Smrg # Commands to make compiler produce verbose output that lists 37422c393a42Smrg # what "hidden" libraries, object files and flags are used when 37432c393a42Smrg # linking a shared library. 37442c393a42Smrg output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" 37452c393a42Smrg else 37462c393a42Smrg # g++ 2.7 appears to require `-G' NOT `-shared' on this 37472c393a42Smrg # platform. 37482c393a42Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 37492c393a42Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 37502c393a42Smrg $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' 37512c393a42Smrg 37522c393a42Smrg # Commands to make compiler produce verbose output that lists 37532c393a42Smrg # what "hidden" libraries, object files and flags are used when 37542c393a42Smrg # linking a shared library. 37552c393a42Smrg output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" 37562c393a42Smrg fi 37572c393a42Smrg 37582c393a42Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' 37592c393a42Smrg case $host_os in 37602c393a42Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 37612c393a42Smrg *) 37622c393a42Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 37632c393a42Smrg ;; 37642c393a42Smrg esac 37652c393a42Smrg fi 37662c393a42Smrg ;; 37672c393a42Smrg esac 37682c393a42Smrg ;; 37692c393a42Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 37702c393a42Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 37712c393a42Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 37722c393a42Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 37732c393a42Smrg runpath_var='LD_RUN_PATH' 37742c393a42Smrg 37752c393a42Smrg case $cc_basename in 37762c393a42Smrg CC*) 37772c393a42Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 37782c393a42Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 37792c393a42Smrg ;; 37802c393a42Smrg *) 37812c393a42Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 37822c393a42Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 37832c393a42Smrg ;; 37842c393a42Smrg esac 37852c393a42Smrg ;; 37862c393a42Smrg sysv5* | sco3.2v5* | sco5v6*) 37872c393a42Smrg # Note: We can NOT use -z defs as we might desire, because we do not 37882c393a42Smrg # link with -lc, and that would cause any symbols used from libc to 37892c393a42Smrg # always be unresolved, which means just about no library would 37902c393a42Smrg # ever link correctly. If we're not using GNU ld we use -z text 37912c393a42Smrg # though, which does catch some bad symbols but isn't as heavy-handed 37922c393a42Smrg # as -z defs. 37932c393a42Smrg # For security reasons, it is highly recommended that you always 37942c393a42Smrg # use absolute paths for naming shared libraries, and exclude the 37952c393a42Smrg # DT_RUNPATH tag from executables and libraries. But doing so 37962c393a42Smrg # requires that you compile everything twice, which is a pain. 37972c393a42Smrg # So that behaviour is only enabled if SCOABSPATH is set to a 37982c393a42Smrg # non-empty value in the environment. Most likely only useful for 37992c393a42Smrg # creating official distributions of packages. 38002c393a42Smrg # This is a hack until libtool officially supports absolute path 38012c393a42Smrg # names for shared libraries. 38022c393a42Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 38032c393a42Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 38042c393a42Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 38052c393a42Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 38062c393a42Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' 38072c393a42Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' 38082c393a42Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 38092c393a42Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 38102c393a42Smrg runpath_var='LD_RUN_PATH' 38112c393a42Smrg 38122c393a42Smrg case $cc_basename in 38132c393a42Smrg CC*) 38142c393a42Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' 38152c393a42Smrg _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' 38162c393a42Smrg ;; 38172c393a42Smrg *) 38182c393a42Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' 38192c393a42Smrg _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' 38202c393a42Smrg ;; 38212c393a42Smrg esac 38222c393a42Smrg ;; 38232c393a42Smrg tandem*) 38242c393a42Smrg case $cc_basename in 38252c393a42Smrg NCC*) 38262c393a42Smrg # NonStop-UX NCC 3.20 38272c393a42Smrg # FIXME: insert proper C++ library support 38282c393a42Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 38292c393a42Smrg ;; 38302c393a42Smrg *) 38312c393a42Smrg # FIXME: insert proper C++ library support 38322c393a42Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 38332c393a42Smrg ;; 38342c393a42Smrg esac 38352c393a42Smrg ;; 38362c393a42Smrg vxworks*) 38372c393a42Smrg # FIXME: insert proper C++ library support 38382c393a42Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 38392c393a42Smrg ;; 38402c393a42Smrg *) 38412c393a42Smrg # FIXME: insert proper C++ library support 38422c393a42Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 38432c393a42Smrg ;; 38442c393a42Smrgesac 38452c393a42SmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) 38462c393a42Smrgtest "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 38472c393a42Smrg 38482c393a42Smrg_LT_AC_TAGVAR(GCC, $1)="$GXX" 38492c393a42Smrg_LT_AC_TAGVAR(LD, $1)="$LD" 38502c393a42Smrg 38512c393a42SmrgAC_LIBTOOL_POSTDEP_PREDEP($1) 38522c393a42SmrgAC_LIBTOOL_PROG_COMPILER_PIC($1) 38532c393a42SmrgAC_LIBTOOL_PROG_CC_C_O($1) 38542c393a42SmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) 38552c393a42SmrgAC_LIBTOOL_PROG_LD_SHLIBS($1) 38562c393a42SmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1) 38572c393a42SmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) 38582c393a42Smrg 38592c393a42SmrgAC_LIBTOOL_CONFIG($1) 38602c393a42Smrg 38612c393a42SmrgAC_LANG_POP 38622c393a42SmrgCC=$lt_save_CC 38632c393a42SmrgLDCXX=$LD 38642c393a42SmrgLD=$lt_save_LD 38652c393a42SmrgGCC=$lt_save_GCC 38662c393a42Smrgwith_gnu_ldcxx=$with_gnu_ld 38672c393a42Smrgwith_gnu_ld=$lt_save_with_gnu_ld 38682c393a42Smrglt_cv_path_LDCXX=$lt_cv_path_LD 38692c393a42Smrglt_cv_path_LD=$lt_save_path_LD 38702c393a42Smrglt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 38712c393a42Smrglt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 38722c393a42Smrg])# AC_LIBTOOL_LANG_CXX_CONFIG 38732c393a42Smrg 38742c393a42Smrg# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME]) 38752c393a42Smrg# ------------------------------------ 38762c393a42Smrg# Figure out "hidden" library dependencies from verbose 38772c393a42Smrg# compiler output when linking a shared library. 38782c393a42Smrg# Parse the compiler output and extract the necessary 38792c393a42Smrg# objects, libraries and library flags. 38802c393a42SmrgAC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP], 38812c393a42Smrg[AC_REQUIRE([LT_AC_PROG_SED])dnl 38822c393a42Smrgdnl we can't use the lt_simple_compile_test_code here, 38832c393a42Smrgdnl because it contains code intended for an executable, 38842c393a42Smrgdnl not a library. It's possible we should let each 38852c393a42Smrgdnl tag define a new lt_????_link_test_code variable, 38862c393a42Smrgdnl but it's only used here... 38872c393a42Smrgifelse([$1],[],[cat > conftest.$ac_ext <<EOF 38882c393a42Smrgint a; 38892c393a42Smrgvoid foo (void) { a = 0; } 38902c393a42SmrgEOF 38912c393a42Smrg],[$1],[CXX],[cat > conftest.$ac_ext <<EOF 38922c393a42Smrgclass Foo 38932c393a42Smrg{ 38942c393a42Smrgpublic: 38952c393a42Smrg Foo (void) { a = 0; } 38962c393a42Smrgprivate: 38972c393a42Smrg int a; 38982c393a42Smrg}; 38992c393a42SmrgEOF 39002c393a42Smrg],[$1],[F77],[cat > conftest.$ac_ext <<EOF 39012c393a42Smrg subroutine foo 39022c393a42Smrg implicit none 39032c393a42Smrg integer*4 a 39042c393a42Smrg a=0 39052c393a42Smrg return 39062c393a42Smrg end 39072c393a42SmrgEOF 39082c393a42Smrg],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF 39092c393a42Smrgpublic class foo { 39102c393a42Smrg private int a; 39112c393a42Smrg public void bar (void) { 39122c393a42Smrg a = 0; 39132c393a42Smrg } 39142c393a42Smrg}; 39152c393a42SmrgEOF 39162c393a42Smrg]) 39172c393a42Smrgdnl Parse the compiler output and extract the necessary 39182c393a42Smrgdnl objects, libraries and library flags. 39192c393a42Smrgif AC_TRY_EVAL(ac_compile); then 39202c393a42Smrg # Parse the compiler output and extract the necessary 39212c393a42Smrg # objects, libraries and library flags. 39222c393a42Smrg 39232c393a42Smrg # Sentinel used to keep track of whether or not we are before 39242c393a42Smrg # the conftest object file. 39252c393a42Smrg pre_test_object_deps_done=no 39262c393a42Smrg 39272c393a42Smrg # The `*' in the case matches for architectures that use `case' in 39282c393a42Smrg # $output_verbose_cmd can trigger glob expansion during the loop 39292c393a42Smrg # eval without this substitution. 39302c393a42Smrg output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"` 39312c393a42Smrg 39322c393a42Smrg for p in `eval $output_verbose_link_cmd`; do 39332c393a42Smrg case $p in 39342c393a42Smrg 39352c393a42Smrg -L* | -R* | -l*) 39362c393a42Smrg # Some compilers place space between "-{L,R}" and the path. 39372c393a42Smrg # Remove the space. 39382c393a42Smrg if test $p = "-L" \ 39392c393a42Smrg || test $p = "-R"; then 39402c393a42Smrg prev=$p 39412c393a42Smrg continue 39422c393a42Smrg else 39432c393a42Smrg prev= 39442c393a42Smrg fi 39452c393a42Smrg 39462c393a42Smrg if test "$pre_test_object_deps_done" = no; then 39472c393a42Smrg case $p in 39482c393a42Smrg -L* | -R*) 39492c393a42Smrg # Internal compiler library paths should come after those 39502c393a42Smrg # provided the user. The postdeps already come after the 39512c393a42Smrg # user supplied libs so there is no need to process them. 39522c393a42Smrg if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then 39532c393a42Smrg _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" 39542c393a42Smrg else 39552c393a42Smrg _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" 39562c393a42Smrg fi 39572c393a42Smrg ;; 39582c393a42Smrg # The "-l" case would never come before the object being 39592c393a42Smrg # linked, so don't bother handling this case. 39602c393a42Smrg esac 39612c393a42Smrg else 39622c393a42Smrg if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then 39632c393a42Smrg _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}" 39642c393a42Smrg else 39652c393a42Smrg _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}" 39662c393a42Smrg fi 39672c393a42Smrg fi 39682c393a42Smrg ;; 39692c393a42Smrg 39702c393a42Smrg *.$objext) 39712c393a42Smrg # This assumes that the test object file only shows up 39722c393a42Smrg # once in the compiler output. 39732c393a42Smrg if test "$p" = "conftest.$objext"; then 39742c393a42Smrg pre_test_object_deps_done=yes 39752c393a42Smrg continue 39762c393a42Smrg fi 39772c393a42Smrg 39782c393a42Smrg if test "$pre_test_object_deps_done" = no; then 39792c393a42Smrg if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then 39802c393a42Smrg _LT_AC_TAGVAR(predep_objects, $1)="$p" 39812c393a42Smrg else 39822c393a42Smrg _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p" 39832c393a42Smrg fi 39842c393a42Smrg else 39852c393a42Smrg if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then 39862c393a42Smrg _LT_AC_TAGVAR(postdep_objects, $1)="$p" 39872c393a42Smrg else 39882c393a42Smrg _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p" 39892c393a42Smrg fi 39902c393a42Smrg fi 39912c393a42Smrg ;; 39922c393a42Smrg 39932c393a42Smrg *) ;; # Ignore the rest. 39942c393a42Smrg 39952c393a42Smrg esac 39962c393a42Smrg done 39972c393a42Smrg 39982c393a42Smrg # Clean up. 39992c393a42Smrg rm -f a.out a.exe 40002c393a42Smrgelse 40012c393a42Smrg echo "libtool.m4: error: problem compiling $1 test program" 40022c393a42Smrgfi 40032c393a42Smrg 40042c393a42Smrg$rm -f confest.$objext 40052c393a42Smrg 40062c393a42Smrg_LT_AC_TAGVAR(compiler_lib_search_dirs, $1)= 40072c393a42Smrgif test -n "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then 40082c393a42Smrg _LT_AC_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_AC_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` 40092c393a42Smrgfi 40102c393a42Smrg 40112c393a42Smrg# PORTME: override above test on systems where it is broken 40122c393a42Smrgifelse([$1],[CXX], 40132c393a42Smrg[case $host_os in 40142c393a42Smrginterix[[3-9]]*) 40152c393a42Smrg # Interix 3.5 installs completely hosed .la files for C++, so rather than 40162c393a42Smrg # hack all around it, let's just trust "g++" to DTRT. 40172c393a42Smrg _LT_AC_TAGVAR(predep_objects,$1)= 40182c393a42Smrg _LT_AC_TAGVAR(postdep_objects,$1)= 40192c393a42Smrg _LT_AC_TAGVAR(postdeps,$1)= 40202c393a42Smrg ;; 40212c393a42Smrg 40222c393a42Smrglinux*) 40232c393a42Smrg case `$CC -V 2>&1 | sed 5q` in 40242c393a42Smrg *Sun\ C*) 40252c393a42Smrg # Sun C++ 5.9 40262c393a42Smrg # 40272c393a42Smrg # The more standards-conforming stlport4 library is 40282c393a42Smrg # incompatible with the Cstd library. Avoid specifying 40292c393a42Smrg # it if it's in CXXFLAGS. Ignore libCrun as 40302c393a42Smrg # -library=stlport4 depends on it. 40312c393a42Smrg case " $CXX $CXXFLAGS " in 40322c393a42Smrg *" -library=stlport4 "*) 40332c393a42Smrg solaris_use_stlport4=yes 40342c393a42Smrg ;; 40352c393a42Smrg esac 40362c393a42Smrg if test "$solaris_use_stlport4" != yes; then 40372c393a42Smrg _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 40382c393a42Smrg fi 40392c393a42Smrg ;; 40402c393a42Smrg esac 40412c393a42Smrg ;; 40422c393a42Smrg 40432c393a42Smrgsolaris*) 40442c393a42Smrg case $cc_basename in 40452c393a42Smrg CC*) 40462c393a42Smrg # The more standards-conforming stlport4 library is 40472c393a42Smrg # incompatible with the Cstd library. Avoid specifying 40482c393a42Smrg # it if it's in CXXFLAGS. Ignore libCrun as 40492c393a42Smrg # -library=stlport4 depends on it. 40502c393a42Smrg case " $CXX $CXXFLAGS " in 40512c393a42Smrg *" -library=stlport4 "*) 40522c393a42Smrg solaris_use_stlport4=yes 40532c393a42Smrg ;; 40542c393a42Smrg esac 40552c393a42Smrg 40562c393a42Smrg # Adding this requires a known-good setup of shared libraries for 40572c393a42Smrg # Sun compiler versions before 5.6, else PIC objects from an old 40582c393a42Smrg # archive will be linked into the output, leading to subtle bugs. 40592c393a42Smrg if test "$solaris_use_stlport4" != yes; then 40602c393a42Smrg _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 40612c393a42Smrg fi 40622c393a42Smrg ;; 40632c393a42Smrg esac 40642c393a42Smrg ;; 40652c393a42Smrgesac 40662c393a42Smrg]) 40672c393a42Smrgcase " $_LT_AC_TAGVAR(postdeps, $1) " in 40682c393a42Smrg*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;; 40692c393a42Smrgesac 40702c393a42Smrg])# AC_LIBTOOL_POSTDEP_PREDEP 40712c393a42Smrg 40722c393a42Smrg# AC_LIBTOOL_LANG_F77_CONFIG 40732c393a42Smrg# -------------------------- 40742c393a42Smrg# Ensure that the configuration vars for the C compiler are 40752c393a42Smrg# suitably defined. Those variables are subsequently used by 40762c393a42Smrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 40772c393a42SmrgAC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)]) 40782c393a42SmrgAC_DEFUN([_LT_AC_LANG_F77_CONFIG], 40792c393a42Smrg[AC_REQUIRE([AC_PROG_F77]) 40802c393a42SmrgAC_LANG_PUSH(Fortran 77) 40812c393a42Smrg 40822c393a42Smrg_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 40832c393a42Smrg_LT_AC_TAGVAR(allow_undefined_flag, $1)= 40842c393a42Smrg_LT_AC_TAGVAR(always_export_symbols, $1)=no 40852c393a42Smrg_LT_AC_TAGVAR(archive_expsym_cmds, $1)= 40862c393a42Smrg_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= 40872c393a42Smrg_LT_AC_TAGVAR(hardcode_direct, $1)=no 40882c393a42Smrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= 40892c393a42Smrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 40902c393a42Smrg_LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 40912c393a42Smrg_LT_AC_TAGVAR(hardcode_minus_L, $1)=no 40922c393a42Smrg_LT_AC_TAGVAR(hardcode_automatic, $1)=no 40932c393a42Smrg_LT_AC_TAGVAR(module_cmds, $1)= 40942c393a42Smrg_LT_AC_TAGVAR(module_expsym_cmds, $1)= 40952c393a42Smrg_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown 40962c393a42Smrg_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 40972c393a42Smrg_LT_AC_TAGVAR(no_undefined_flag, $1)= 40982c393a42Smrg_LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 40992c393a42Smrg_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no 41002c393a42Smrg 41012c393a42Smrg# Source file extension for f77 test sources. 41022c393a42Smrgac_ext=f 41032c393a42Smrg 41042c393a42Smrg# Object file extension for compiled f77 test sources. 41052c393a42Smrgobjext=o 41062c393a42Smrg_LT_AC_TAGVAR(objext, $1)=$objext 41072c393a42Smrg 41082c393a42Smrg# Code to be used in simple compile tests 41092c393a42Smrglt_simple_compile_test_code="\ 41102c393a42Smrg subroutine t 41112c393a42Smrg return 41122c393a42Smrg end 41132c393a42Smrg" 41142c393a42Smrg 41152c393a42Smrg# Code to be used in simple link tests 41162c393a42Smrglt_simple_link_test_code="\ 41172c393a42Smrg program t 41182c393a42Smrg end 41192c393a42Smrg" 41202c393a42Smrg 41212c393a42Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 41222c393a42Smrg_LT_AC_SYS_COMPILER 41232c393a42Smrg 41242c393a42Smrg# save warnings/boilerplate of simple test code 41252c393a42Smrg_LT_COMPILER_BOILERPLATE 41262c393a42Smrg_LT_LINKER_BOILERPLATE 41272c393a42Smrg 41282c393a42Smrg# Allow CC to be a program name with arguments. 41292c393a42Smrglt_save_CC="$CC" 41302c393a42SmrgCC=${F77-"f77"} 41312c393a42Smrgcompiler=$CC 41322c393a42Smrg_LT_AC_TAGVAR(compiler, $1)=$CC 41332c393a42Smrg_LT_CC_BASENAME([$compiler]) 41342c393a42Smrg 41352c393a42SmrgAC_MSG_CHECKING([if libtool supports shared libraries]) 41362c393a42SmrgAC_MSG_RESULT([$can_build_shared]) 41372c393a42Smrg 41382c393a42SmrgAC_MSG_CHECKING([whether to build shared libraries]) 41392c393a42Smrgtest "$can_build_shared" = "no" && enable_shared=no 41402c393a42Smrg 41412c393a42Smrg# On AIX, shared libraries and static libraries use the same namespace, and 41422c393a42Smrg# are all built from PIC. 41432c393a42Smrgcase $host_os in 41442c393a42Smrgaix3*) 41452c393a42Smrg test "$enable_shared" = yes && enable_static=no 41462c393a42Smrg if test -n "$RANLIB"; then 41472c393a42Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 41482c393a42Smrg postinstall_cmds='$RANLIB $lib' 41492c393a42Smrg fi 41502c393a42Smrg ;; 41512c393a42Smrgaix[[4-9]]*) 41522c393a42Smrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 41532c393a42Smrg test "$enable_shared" = yes && enable_static=no 41542c393a42Smrg fi 41552c393a42Smrg ;; 41562c393a42Smrgesac 41572c393a42SmrgAC_MSG_RESULT([$enable_shared]) 41582c393a42Smrg 41592c393a42SmrgAC_MSG_CHECKING([whether to build static libraries]) 41602c393a42Smrg# Make sure either enable_shared or enable_static is yes. 41612c393a42Smrgtest "$enable_shared" = yes || enable_static=yes 41622c393a42SmrgAC_MSG_RESULT([$enable_static]) 41632c393a42Smrg 41642c393a42Smrg_LT_AC_TAGVAR(GCC, $1)="$G77" 41652c393a42Smrg_LT_AC_TAGVAR(LD, $1)="$LD" 41662c393a42Smrg 41672c393a42SmrgAC_LIBTOOL_PROG_COMPILER_PIC($1) 41682c393a42SmrgAC_LIBTOOL_PROG_CC_C_O($1) 41692c393a42SmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) 41702c393a42SmrgAC_LIBTOOL_PROG_LD_SHLIBS($1) 41712c393a42SmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1) 41722c393a42SmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) 41732c393a42Smrg 41742c393a42SmrgAC_LIBTOOL_CONFIG($1) 41752c393a42Smrg 41762c393a42SmrgAC_LANG_POP 41772c393a42SmrgCC="$lt_save_CC" 41782c393a42Smrg])# AC_LIBTOOL_LANG_F77_CONFIG 41792c393a42Smrg 41802c393a42Smrg 41812c393a42Smrg# AC_LIBTOOL_LANG_GCJ_CONFIG 41822c393a42Smrg# -------------------------- 41832c393a42Smrg# Ensure that the configuration vars for the C compiler are 41842c393a42Smrg# suitably defined. Those variables are subsequently used by 41852c393a42Smrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 41862c393a42SmrgAC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)]) 41872c393a42SmrgAC_DEFUN([_LT_AC_LANG_GCJ_CONFIG], 41882c393a42Smrg[AC_LANG_SAVE 41892c393a42Smrg 41902c393a42Smrg# Source file extension for Java test sources. 41912c393a42Smrgac_ext=java 41922c393a42Smrg 41932c393a42Smrg# Object file extension for compiled Java test sources. 41942c393a42Smrgobjext=o 41952c393a42Smrg_LT_AC_TAGVAR(objext, $1)=$objext 41962c393a42Smrg 41972c393a42Smrg# Code to be used in simple compile tests 41982c393a42Smrglt_simple_compile_test_code="class foo {}" 41992c393a42Smrg 42002c393a42Smrg# Code to be used in simple link tests 42012c393a42Smrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 42022c393a42Smrg 42032c393a42Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 42042c393a42Smrg_LT_AC_SYS_COMPILER 42052c393a42Smrg 42062c393a42Smrg# save warnings/boilerplate of simple test code 42072c393a42Smrg_LT_COMPILER_BOILERPLATE 42082c393a42Smrg_LT_LINKER_BOILERPLATE 42092c393a42Smrg 42102c393a42Smrg# Allow CC to be a program name with arguments. 42112c393a42Smrglt_save_CC="$CC" 42122c393a42SmrgCC=${GCJ-"gcj"} 42132c393a42Smrgcompiler=$CC 42142c393a42Smrg_LT_AC_TAGVAR(compiler, $1)=$CC 42152c393a42Smrg_LT_CC_BASENAME([$compiler]) 42162c393a42Smrg 42172c393a42Smrg# GCJ did not exist at the time GCC didn't implicitly link libc in. 42182c393a42Smrg_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 42192c393a42Smrg 42202c393a42Smrg_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 42212c393a42Smrg 42222c393a42SmrgAC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) 42232c393a42SmrgAC_LIBTOOL_PROG_COMPILER_PIC($1) 42242c393a42SmrgAC_LIBTOOL_PROG_CC_C_O($1) 42252c393a42SmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) 42262c393a42SmrgAC_LIBTOOL_PROG_LD_SHLIBS($1) 42272c393a42SmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1) 42282c393a42SmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) 42292c393a42Smrg 42302c393a42SmrgAC_LIBTOOL_CONFIG($1) 42312c393a42Smrg 42322c393a42SmrgAC_LANG_RESTORE 42332c393a42SmrgCC="$lt_save_CC" 42342c393a42Smrg])# AC_LIBTOOL_LANG_GCJ_CONFIG 42352c393a42Smrg 42362c393a42Smrg 42372c393a42Smrg# AC_LIBTOOL_LANG_RC_CONFIG 42382c393a42Smrg# ------------------------- 42392c393a42Smrg# Ensure that the configuration vars for the Windows resource compiler are 42402c393a42Smrg# suitably defined. Those variables are subsequently used by 42412c393a42Smrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 42422c393a42SmrgAC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)]) 42432c393a42SmrgAC_DEFUN([_LT_AC_LANG_RC_CONFIG], 42442c393a42Smrg[AC_LANG_SAVE 42452c393a42Smrg 42462c393a42Smrg# Source file extension for RC test sources. 42472c393a42Smrgac_ext=rc 42482c393a42Smrg 42492c393a42Smrg# Object file extension for compiled RC test sources. 42502c393a42Smrgobjext=o 42512c393a42Smrg_LT_AC_TAGVAR(objext, $1)=$objext 42522c393a42Smrg 42532c393a42Smrg# Code to be used in simple compile tests 42542c393a42Smrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 42552c393a42Smrg 42562c393a42Smrg# Code to be used in simple link tests 42572c393a42Smrglt_simple_link_test_code="$lt_simple_compile_test_code" 42582c393a42Smrg 42592c393a42Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 42602c393a42Smrg_LT_AC_SYS_COMPILER 42612c393a42Smrg 42622c393a42Smrg# save warnings/boilerplate of simple test code 42632c393a42Smrg_LT_COMPILER_BOILERPLATE 42642c393a42Smrg_LT_LINKER_BOILERPLATE 42652c393a42Smrg 42662c393a42Smrg# Allow CC to be a program name with arguments. 42672c393a42Smrglt_save_CC="$CC" 42682c393a42SmrgCC=${RC-"windres"} 42692c393a42Smrgcompiler=$CC 42702c393a42Smrg_LT_AC_TAGVAR(compiler, $1)=$CC 42712c393a42Smrg_LT_CC_BASENAME([$compiler]) 42722c393a42Smrg_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 42732c393a42Smrg 42742c393a42SmrgAC_LIBTOOL_CONFIG($1) 42752c393a42Smrg 42762c393a42SmrgAC_LANG_RESTORE 42772c393a42SmrgCC="$lt_save_CC" 42782c393a42Smrg])# AC_LIBTOOL_LANG_RC_CONFIG 42792c393a42Smrg 42802c393a42Smrg 42812c393a42Smrg# AC_LIBTOOL_CONFIG([TAGNAME]) 42822c393a42Smrg# ---------------------------- 42832c393a42Smrg# If TAGNAME is not passed, then create an initial libtool script 42842c393a42Smrg# with a default configuration from the untagged config vars. Otherwise 42852c393a42Smrg# add code to config.status for appending the configuration named by 42862c393a42Smrg# TAGNAME from the matching tagged config vars. 42872c393a42SmrgAC_DEFUN([AC_LIBTOOL_CONFIG], 42882c393a42Smrg[# The else clause should only fire when bootstrapping the 42892c393a42Smrg# libtool distribution, otherwise you forgot to ship ltmain.sh 42902c393a42Smrg# with your package, and you will get complaints that there are 42912c393a42Smrg# no rules to generate ltmain.sh. 42922c393a42Smrgif test -f "$ltmain"; then 42932c393a42Smrg # See if we are running on zsh, and set the options which allow our commands through 42942c393a42Smrg # without removal of \ escapes. 42952c393a42Smrg if test -n "${ZSH_VERSION+set}" ; then 42962c393a42Smrg setopt NO_GLOB_SUBST 42972c393a42Smrg fi 42982c393a42Smrg # Now quote all the things that may contain metacharacters while being 42992c393a42Smrg # careful not to overquote the AC_SUBSTed values. We take copies of the 43002c393a42Smrg # variables and quote the copies for generation of the libtool script. 43012c393a42Smrg for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ 43022c393a42Smrg SED SHELL STRIP \ 43032c393a42Smrg libname_spec library_names_spec soname_spec extract_expsyms_cmds \ 43042c393a42Smrg old_striplib striplib file_magic_cmd finish_cmds finish_eval \ 43052c393a42Smrg deplibs_check_method reload_flag reload_cmds need_locks \ 43062c393a42Smrg lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ 43072c393a42Smrg lt_cv_sys_global_symbol_to_c_name_address \ 43082c393a42Smrg sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ 43092c393a42Smrg old_postinstall_cmds old_postuninstall_cmds \ 43102c393a42Smrg _LT_AC_TAGVAR(compiler, $1) \ 43112c393a42Smrg _LT_AC_TAGVAR(CC, $1) \ 43122c393a42Smrg _LT_AC_TAGVAR(LD, $1) \ 43132c393a42Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \ 43142c393a42Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \ 43152c393a42Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \ 43162c393a42Smrg _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \ 43172c393a42Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \ 43182c393a42Smrg _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \ 43192c393a42Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \ 43202c393a42Smrg _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \ 43212c393a42Smrg _LT_AC_TAGVAR(old_archive_cmds, $1) \ 43222c393a42Smrg _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \ 43232c393a42Smrg _LT_AC_TAGVAR(predep_objects, $1) \ 43242c393a42Smrg _LT_AC_TAGVAR(postdep_objects, $1) \ 43252c393a42Smrg _LT_AC_TAGVAR(predeps, $1) \ 43262c393a42Smrg _LT_AC_TAGVAR(postdeps, $1) \ 43272c393a42Smrg _LT_AC_TAGVAR(compiler_lib_search_path, $1) \ 43282c393a42Smrg _LT_AC_TAGVAR(compiler_lib_search_dirs, $1) \ 43292c393a42Smrg _LT_AC_TAGVAR(archive_cmds, $1) \ 43302c393a42Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1) \ 43312c393a42Smrg _LT_AC_TAGVAR(postinstall_cmds, $1) \ 43322c393a42Smrg _LT_AC_TAGVAR(postuninstall_cmds, $1) \ 43332c393a42Smrg _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \ 43342c393a42Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1) \ 43352c393a42Smrg _LT_AC_TAGVAR(no_undefined_flag, $1) \ 43362c393a42Smrg _LT_AC_TAGVAR(export_symbols_cmds, $1) \ 43372c393a42Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \ 43382c393a42Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \ 43392c393a42Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \ 43402c393a42Smrg _LT_AC_TAGVAR(hardcode_automatic, $1) \ 43412c393a42Smrg _LT_AC_TAGVAR(module_cmds, $1) \ 43422c393a42Smrg _LT_AC_TAGVAR(module_expsym_cmds, $1) \ 43432c393a42Smrg _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \ 43442c393a42Smrg _LT_AC_TAGVAR(fix_srcfile_path, $1) \ 43452c393a42Smrg _LT_AC_TAGVAR(exclude_expsyms, $1) \ 43462c393a42Smrg _LT_AC_TAGVAR(include_expsyms, $1); do 43472c393a42Smrg 43482c393a42Smrg case $var in 43492c393a42Smrg _LT_AC_TAGVAR(old_archive_cmds, $1) | \ 43502c393a42Smrg _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \ 43512c393a42Smrg _LT_AC_TAGVAR(archive_cmds, $1) | \ 43522c393a42Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \ 43532c393a42Smrg _LT_AC_TAGVAR(module_cmds, $1) | \ 43542c393a42Smrg _LT_AC_TAGVAR(module_expsym_cmds, $1) | \ 43552c393a42Smrg _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \ 43562c393a42Smrg _LT_AC_TAGVAR(export_symbols_cmds, $1) | \ 43572c393a42Smrg extract_expsyms_cmds | reload_cmds | finish_cmds | \ 43582c393a42Smrg postinstall_cmds | postuninstall_cmds | \ 43592c393a42Smrg old_postinstall_cmds | old_postuninstall_cmds | \ 43602c393a42Smrg sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) 43612c393a42Smrg # Double-quote double-evaled strings. 43622c393a42Smrg eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" 43632c393a42Smrg ;; 43642c393a42Smrg *) 43652c393a42Smrg eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" 43662c393a42Smrg ;; 43672c393a42Smrg esac 43682c393a42Smrg done 43692c393a42Smrg 43702c393a42Smrg case $lt_echo in 43712c393a42Smrg *'\[$]0 --fallback-echo"') 43722c393a42Smrg lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'` 43732c393a42Smrg ;; 43742c393a42Smrg esac 43752c393a42Smrg 43762c393a42Smrgifelse([$1], [], 43772c393a42Smrg [cfgfile="${ofile}T" 43782c393a42Smrg trap "$rm \"$cfgfile\"; exit 1" 1 2 15 43792c393a42Smrg $rm -f "$cfgfile" 43802c393a42Smrg AC_MSG_NOTICE([creating $ofile])], 43812c393a42Smrg [cfgfile="$ofile"]) 43822c393a42Smrg 43832c393a42Smrg cat <<__EOF__ >> "$cfgfile" 43842c393a42Smrgifelse([$1], [], 43852c393a42Smrg[#! $SHELL 43862c393a42Smrg 43872c393a42Smrg# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. 43882c393a42Smrg# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) 43892c393a42Smrg# NOTE: Changes made to this file will be lost: look at ltmain.sh. 43902c393a42Smrg# 43912c393a42Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 43922c393a42Smrg# Free Software Foundation, Inc. 43932c393a42Smrg# 43942c393a42Smrg# This file is part of GNU Libtool: 43952c393a42Smrg# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 43962c393a42Smrg# 43972c393a42Smrg# This program is free software; you can redistribute it and/or modify 43982c393a42Smrg# it under the terms of the GNU General Public License as published by 43992c393a42Smrg# the Free Software Foundation; either version 2 of the License, or 44002c393a42Smrg# (at your option) any later version. 44012c393a42Smrg# 44022c393a42Smrg# This program is distributed in the hope that it will be useful, but 44032c393a42Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 44042c393a42Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 44052c393a42Smrg# General Public License for more details. 44062c393a42Smrg# 44072c393a42Smrg# You should have received a copy of the GNU General Public License 44082c393a42Smrg# along with this program; if not, write to the Free Software 44092c393a42Smrg# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 44102c393a42Smrg# 44112c393a42Smrg# As a special exception to the GNU General Public License, if you 44122c393a42Smrg# distribute this file as part of a program that contains a 44132c393a42Smrg# configuration script generated by Autoconf, you may include it under 44142c393a42Smrg# the same distribution terms that you use for the rest of that program. 44152c393a42Smrg 44162c393a42Smrg# A sed program that does not truncate output. 44172c393a42SmrgSED=$lt_SED 44182c393a42Smrg 44192c393a42Smrg# Sed that helps us avoid accidentally triggering echo(1) options like -n. 44202c393a42SmrgXsed="$SED -e 1s/^X//" 44212c393a42Smrg 44222c393a42Smrg# The HP-UX ksh and POSIX shell print the target directory to stdout 44232c393a42Smrg# if CDPATH is set. 44242c393a42Smrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 44252c393a42Smrg 44262c393a42Smrg# The names of the tagged configurations supported by this script. 44272c393a42Smrgavailable_tags= 44282c393a42Smrg 44292c393a42Smrg# ### BEGIN LIBTOOL CONFIG], 44302c393a42Smrg[# ### BEGIN LIBTOOL TAG CONFIG: $tagname]) 44312c393a42Smrg 44322c393a42Smrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 44332c393a42Smrg 44342c393a42Smrg# Shell to use when invoking shell scripts. 44352c393a42SmrgSHELL=$lt_SHELL 44362c393a42Smrg 44372c393a42Smrg# Whether or not to build shared libraries. 44382c393a42Smrgbuild_libtool_libs=$enable_shared 44392c393a42Smrg 44402c393a42Smrg# Whether or not to build static libraries. 44412c393a42Smrgbuild_old_libs=$enable_static 44422c393a42Smrg 44432c393a42Smrg# Whether or not to add -lc for building shared libraries. 44442c393a42Smrgbuild_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1) 44452c393a42Smrg 44462c393a42Smrg# Whether or not to disallow shared libs when runtime libs are static 44472c393a42Smrgallow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) 44482c393a42Smrg 44492c393a42Smrg# Whether or not to optimize for fast installation. 44502c393a42Smrgfast_install=$enable_fast_install 44512c393a42Smrg 44522c393a42Smrg# The host system. 44532c393a42Smrghost_alias=$host_alias 44542c393a42Smrghost=$host 44552c393a42Smrghost_os=$host_os 44562c393a42Smrg 44572c393a42Smrg# The build system. 44582c393a42Smrgbuild_alias=$build_alias 44592c393a42Smrgbuild=$build 44602c393a42Smrgbuild_os=$build_os 44612c393a42Smrg 44622c393a42Smrg# An echo program that does not interpret backslashes. 44632c393a42Smrgecho=$lt_echo 44642c393a42Smrg 44652c393a42Smrg# The archiver. 44662c393a42SmrgAR=$lt_AR 44672c393a42SmrgAR_FLAGS=$lt_AR_FLAGS 44682c393a42Smrg 44692c393a42Smrg# A C compiler. 44702c393a42SmrgLTCC=$lt_LTCC 44712c393a42Smrg 44722c393a42Smrg# LTCC compiler flags. 44732c393a42SmrgLTCFLAGS=$lt_LTCFLAGS 44742c393a42Smrg 44752c393a42Smrg# A language-specific compiler. 44762c393a42SmrgCC=$lt_[]_LT_AC_TAGVAR(compiler, $1) 44772c393a42Smrg 44782c393a42Smrg# Is the compiler the GNU C compiler? 44792c393a42Smrgwith_gcc=$_LT_AC_TAGVAR(GCC, $1) 44802c393a42Smrg 44812c393a42Smrg# An ERE matcher. 44822c393a42SmrgEGREP=$lt_EGREP 44832c393a42Smrg 44842c393a42Smrg# The linker used to build libraries. 44852c393a42SmrgLD=$lt_[]_LT_AC_TAGVAR(LD, $1) 44862c393a42Smrg 44872c393a42Smrg# Whether we need hard or soft links. 44882c393a42SmrgLN_S=$lt_LN_S 44892c393a42Smrg 44902c393a42Smrg# A BSD-compatible nm program. 44912c393a42SmrgNM=$lt_NM 44922c393a42Smrg 44932c393a42Smrg# A symbol stripping program 44942c393a42SmrgSTRIP=$lt_STRIP 44952c393a42Smrg 44962c393a42Smrg# Used to examine libraries when file_magic_cmd begins "file" 44972c393a42SmrgMAGIC_CMD=$MAGIC_CMD 44982c393a42Smrg 44992c393a42Smrg# Used on cygwin: DLL creation program. 45002c393a42SmrgDLLTOOL="$DLLTOOL" 45012c393a42Smrg 45022c393a42Smrg# Used on cygwin: object dumper. 45032c393a42SmrgOBJDUMP="$OBJDUMP" 45042c393a42Smrg 45052c393a42Smrg# Used on cygwin: assembler. 45062c393a42SmrgAS="$AS" 45072c393a42Smrg 45082c393a42Smrg# The name of the directory that contains temporary libtool files. 45092c393a42Smrgobjdir=$objdir 45102c393a42Smrg 45112c393a42Smrg# How to create reloadable object files. 45122c393a42Smrgreload_flag=$lt_reload_flag 45132c393a42Smrgreload_cmds=$lt_reload_cmds 45142c393a42Smrg 45152c393a42Smrg# How to pass a linker flag through the compiler. 45162c393a42Smrgwl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) 45172c393a42Smrg 45182c393a42Smrg# Object file suffix (normally "o"). 45192c393a42Smrgobjext="$ac_objext" 45202c393a42Smrg 45212c393a42Smrg# Old archive suffix (normally "a"). 45222c393a42Smrglibext="$libext" 45232c393a42Smrg 45242c393a42Smrg# Shared library suffix (normally ".so"). 45252c393a42Smrgshrext_cmds='$shrext_cmds' 45262c393a42Smrg 45272c393a42Smrg# Executable file suffix (normally ""). 45282c393a42Smrgexeext="$exeext" 45292c393a42Smrg 45302c393a42Smrg# Additional compiler flags for building library objects. 45312c393a42Smrgpic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) 45322c393a42Smrgpic_mode=$pic_mode 45332c393a42Smrg 45342c393a42Smrg# What is the maximum length of a command? 45352c393a42Smrgmax_cmd_len=$lt_cv_sys_max_cmd_len 45362c393a42Smrg 45372c393a42Smrg# Does compiler simultaneously support -c and -o options? 45382c393a42Smrgcompiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) 45392c393a42Smrg 45402c393a42Smrg# Must we lock files when doing compilation? 45412c393a42Smrgneed_locks=$lt_need_locks 45422c393a42Smrg 45432c393a42Smrg# Do we need the lib prefix for modules? 45442c393a42Smrgneed_lib_prefix=$need_lib_prefix 45452c393a42Smrg 45462c393a42Smrg# Do we need a version for libraries? 45472c393a42Smrgneed_version=$need_version 45482c393a42Smrg 45492c393a42Smrg# Whether dlopen is supported. 45502c393a42Smrgdlopen_support=$enable_dlopen 45512c393a42Smrg 45522c393a42Smrg# Whether dlopen of programs is supported. 45532c393a42Smrgdlopen_self=$enable_dlopen_self 45542c393a42Smrg 45552c393a42Smrg# Whether dlopen of statically linked programs is supported. 45562c393a42Smrgdlopen_self_static=$enable_dlopen_self_static 45572c393a42Smrg 45582c393a42Smrg# Compiler flag to prevent dynamic linking. 45592c393a42Smrglink_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1) 45602c393a42Smrg 45612c393a42Smrg# Compiler flag to turn off builtin functions. 45622c393a42Smrgno_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) 45632c393a42Smrg 45642c393a42Smrg# Compiler flag to allow reflexive dlopens. 45652c393a42Smrgexport_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1) 45662c393a42Smrg 45672c393a42Smrg# Compiler flag to generate shared objects directly from archives. 45682c393a42Smrgwhole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1) 45692c393a42Smrg 45702c393a42Smrg# Compiler flag to generate thread-safe objects. 45712c393a42Smrgthread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1) 45722c393a42Smrg 45732c393a42Smrg# Library versioning type. 45742c393a42Smrgversion_type=$version_type 45752c393a42Smrg 45762c393a42Smrg# Format of library name prefix. 45772c393a42Smrglibname_spec=$lt_libname_spec 45782c393a42Smrg 45792c393a42Smrg# List of archive names. First name is the real one, the rest are links. 45802c393a42Smrg# The last name is the one that the linker finds with -lNAME. 45812c393a42Smrglibrary_names_spec=$lt_library_names_spec 45822c393a42Smrg 45832c393a42Smrg# The coded name of the library, if different from the real name. 45842c393a42Smrgsoname_spec=$lt_soname_spec 45852c393a42Smrg 45862c393a42Smrg# Commands used to build and install an old-style archive. 45872c393a42SmrgRANLIB=$lt_RANLIB 45882c393a42Smrgold_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1) 45892c393a42Smrgold_postinstall_cmds=$lt_old_postinstall_cmds 45902c393a42Smrgold_postuninstall_cmds=$lt_old_postuninstall_cmds 45912c393a42Smrg 45922c393a42Smrg# Create an old-style archive from a shared archive. 45932c393a42Smrgold_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1) 45942c393a42Smrg 45952c393a42Smrg# Create a temporary old-style archive to link instead of a shared archive. 45962c393a42Smrgold_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) 45972c393a42Smrg 45982c393a42Smrg# Commands used to build and install a shared archive. 45992c393a42Smrgarchive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1) 46002c393a42Smrgarchive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1) 46012c393a42Smrgpostinstall_cmds=$lt_postinstall_cmds 46022c393a42Smrgpostuninstall_cmds=$lt_postuninstall_cmds 46032c393a42Smrg 46042c393a42Smrg# Commands used to build a loadable module (assumed same as above if empty) 46052c393a42Smrgmodule_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1) 46062c393a42Smrgmodule_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1) 46072c393a42Smrg 46082c393a42Smrg# Commands to strip libraries. 46092c393a42Smrgold_striplib=$lt_old_striplib 46102c393a42Smrgstriplib=$lt_striplib 46112c393a42Smrg 46122c393a42Smrg# Dependencies to place before the objects being linked to create a 46132c393a42Smrg# shared library. 46142c393a42Smrgpredep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1) 46152c393a42Smrg 46162c393a42Smrg# Dependencies to place after the objects being linked to create a 46172c393a42Smrg# shared library. 46182c393a42Smrgpostdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1) 46192c393a42Smrg 46202c393a42Smrg# Dependencies to place before the objects being linked to create a 46212c393a42Smrg# shared library. 46222c393a42Smrgpredeps=$lt_[]_LT_AC_TAGVAR(predeps, $1) 46232c393a42Smrg 46242c393a42Smrg# Dependencies to place after the objects being linked to create a 46252c393a42Smrg# shared library. 46262c393a42Smrgpostdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1) 46272c393a42Smrg 46282c393a42Smrg# The directories searched by this compiler when creating a shared 46292c393a42Smrg# library 46302c393a42Smrgcompiler_lib_search_dirs=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_dirs, $1) 46312c393a42Smrg 46322c393a42Smrg# The library search path used internally by the compiler when linking 46332c393a42Smrg# a shared library. 46342c393a42Smrgcompiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1) 46352c393a42Smrg 46362c393a42Smrg# Method to check whether dependent libraries are shared objects. 46372c393a42Smrgdeplibs_check_method=$lt_deplibs_check_method 46382c393a42Smrg 46392c393a42Smrg# Command to use when deplibs_check_method == file_magic. 46402c393a42Smrgfile_magic_cmd=$lt_file_magic_cmd 46412c393a42Smrg 46422c393a42Smrg# Flag that allows shared libraries with undefined symbols to be built. 46432c393a42Smrgallow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1) 46442c393a42Smrg 46452c393a42Smrg# Flag that forces no undefined symbols. 46462c393a42Smrgno_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1) 46472c393a42Smrg 46482c393a42Smrg# Commands used to finish a libtool library installation in a directory. 46492c393a42Smrgfinish_cmds=$lt_finish_cmds 46502c393a42Smrg 46512c393a42Smrg# Same as above, but a single script fragment to be evaled but not shown. 46522c393a42Smrgfinish_eval=$lt_finish_eval 46532c393a42Smrg 46542c393a42Smrg# Take the output of nm and produce a listing of raw symbols and C names. 46552c393a42Smrgglobal_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe 46562c393a42Smrg 46572c393a42Smrg# Transform the output of nm in a proper C declaration 46582c393a42Smrgglobal_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl 46592c393a42Smrg 46602c393a42Smrg# Transform the output of nm in a C name address pair 46612c393a42Smrgglobal_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address 46622c393a42Smrg 46632c393a42Smrg# This is the shared library runtime path variable. 46642c393a42Smrgrunpath_var=$runpath_var 46652c393a42Smrg 46662c393a42Smrg# This is the shared library path variable. 46672c393a42Smrgshlibpath_var=$shlibpath_var 46682c393a42Smrg 46692c393a42Smrg# Is shlibpath searched before the hard-coded library search path? 46702c393a42Smrgshlibpath_overrides_runpath=$shlibpath_overrides_runpath 46712c393a42Smrg 46722c393a42Smrg# How to hardcode a shared library path into an executable. 46732c393a42Smrghardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1) 46742c393a42Smrg 46752c393a42Smrg# Whether we should hardcode library paths into libraries. 46762c393a42Smrghardcode_into_libs=$hardcode_into_libs 46772c393a42Smrg 46782c393a42Smrg# Flag to hardcode \$libdir into a binary during linking. 46792c393a42Smrg# This must work even if \$libdir does not exist. 46802c393a42Smrghardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) 46812c393a42Smrg 46822c393a42Smrg# If ld is used when linking, flag to hardcode \$libdir into 46832c393a42Smrg# a binary during linking. This must work even if \$libdir does 46842c393a42Smrg# not exist. 46852c393a42Smrghardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) 46862c393a42Smrg 46872c393a42Smrg# Whether we need a single -rpath flag with a separated argument. 46882c393a42Smrghardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1) 46892c393a42Smrg 46902c393a42Smrg# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the 46912c393a42Smrg# resulting binary. 46922c393a42Smrghardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1) 46932c393a42Smrg 46942c393a42Smrg# Set to yes if using the -LDIR flag during linking hardcodes DIR into the 46952c393a42Smrg# resulting binary. 46962c393a42Smrghardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1) 46972c393a42Smrg 46982c393a42Smrg# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into 46992c393a42Smrg# the resulting binary. 47002c393a42Smrghardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1) 47012c393a42Smrg 47022c393a42Smrg# Set to yes if building a shared library automatically hardcodes DIR into the library 47032c393a42Smrg# and all subsequent libraries and executables linked against it. 47042c393a42Smrghardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1) 47052c393a42Smrg 47062c393a42Smrg# Variables whose values should be saved in libtool wrapper scripts and 47072c393a42Smrg# restored at relink time. 47082c393a42Smrgvariables_saved_for_relink="$variables_saved_for_relink" 47092c393a42Smrg 47102c393a42Smrg# Whether libtool must link a program against all its dependency libraries. 47112c393a42Smrglink_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1) 47122c393a42Smrg 47132c393a42Smrg# Compile-time system search path for libraries 47142c393a42Smrgsys_lib_search_path_spec=$lt_sys_lib_search_path_spec 47152c393a42Smrg 47162c393a42Smrg# Run-time system search path for libraries 47172c393a42Smrgsys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec 47182c393a42Smrg 47192c393a42Smrg# Fix the shell variable \$srcfile for the compiler. 47202c393a42Smrgfix_srcfile_path=$lt_fix_srcfile_path 47212c393a42Smrg 47222c393a42Smrg# Set to yes if exported symbols are required. 47232c393a42Smrgalways_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1) 47242c393a42Smrg 47252c393a42Smrg# The commands to list exported symbols. 47262c393a42Smrgexport_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1) 47272c393a42Smrg 47282c393a42Smrg# The commands to extract the exported symbol list from a shared archive. 47292c393a42Smrgextract_expsyms_cmds=$lt_extract_expsyms_cmds 47302c393a42Smrg 47312c393a42Smrg# Symbols that should not be listed in the preloaded symbols. 47322c393a42Smrgexclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1) 47332c393a42Smrg 47342c393a42Smrg# Symbols that must always be exported. 47352c393a42Smrginclude_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1) 47362c393a42Smrg 47372c393a42Smrgifelse([$1],[], 47382c393a42Smrg[# ### END LIBTOOL CONFIG], 47392c393a42Smrg[# ### END LIBTOOL TAG CONFIG: $tagname]) 47402c393a42Smrg 47412c393a42Smrg__EOF__ 47422c393a42Smrg 47432c393a42Smrgifelse([$1],[], [ 47442c393a42Smrg case $host_os in 47452c393a42Smrg aix3*) 47462c393a42Smrg cat <<\EOF >> "$cfgfile" 47472c393a42Smrg 47482c393a42Smrg# AIX sometimes has problems with the GCC collect2 program. For some 47492c393a42Smrg# reason, if we set the COLLECT_NAMES environment variable, the problems 47502c393a42Smrg# vanish in a puff of smoke. 47512c393a42Smrgif test "X${COLLECT_NAMES+set}" != Xset; then 47522c393a42Smrg COLLECT_NAMES= 47532c393a42Smrg export COLLECT_NAMES 47542c393a42Smrgfi 47552c393a42SmrgEOF 47562c393a42Smrg ;; 47572c393a42Smrg esac 47582c393a42Smrg 47592c393a42Smrg # We use sed instead of cat because bash on DJGPP gets confused if 47602c393a42Smrg # if finds mixed CR/LF and LF-only lines. Since sed operates in 47612c393a42Smrg # text mode, it properly converts lines to CR/LF. This bash problem 47622c393a42Smrg # is reportedly fixed, but why not run on old versions too? 47632c393a42Smrg sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1) 47642c393a42Smrg 47652c393a42Smrg mv -f "$cfgfile" "$ofile" || \ 47662c393a42Smrg (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 47672c393a42Smrg chmod +x "$ofile" 47682c393a42Smrg]) 47692c393a42Smrgelse 47702c393a42Smrg # If there is no Makefile yet, we rely on a make rule to execute 47712c393a42Smrg # `config.status --recheck' to rerun these tests and create the 47722c393a42Smrg # libtool script then. 47732c393a42Smrg ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` 47742c393a42Smrg if test -f "$ltmain_in"; then 47752c393a42Smrg test -f Makefile && make "$ltmain" 47762c393a42Smrg fi 47772c393a42Smrgfi 47782c393a42Smrg])# AC_LIBTOOL_CONFIG 47792c393a42Smrg 47802c393a42Smrg 47812c393a42Smrg# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME]) 47822c393a42Smrg# ------------------------------------------- 47832c393a42SmrgAC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], 47842c393a42Smrg[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl 47852c393a42Smrg 47862c393a42Smrg_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 47872c393a42Smrg 47882c393a42Smrgif test "$GCC" = yes; then 47892c393a42Smrg _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 47902c393a42Smrg 47912c393a42Smrg AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 47922c393a42Smrg lt_cv_prog_compiler_rtti_exceptions, 47932c393a42Smrg [-fno-rtti -fno-exceptions], [], 47942c393a42Smrg [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 47952c393a42Smrgfi 47962c393a42Smrg])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI 47972c393a42Smrg 47982c393a42Smrg 47992c393a42Smrg# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE 48002c393a42Smrg# --------------------------------- 48012c393a42SmrgAC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], 48022c393a42Smrg[AC_REQUIRE([AC_CANONICAL_HOST]) 48032c393a42SmrgAC_REQUIRE([LT_AC_PROG_SED]) 48042c393a42SmrgAC_REQUIRE([AC_PROG_NM]) 48052c393a42SmrgAC_REQUIRE([AC_OBJEXT]) 48062c393a42Smrg# Check for command to grab the raw symbol name followed by C symbol from nm. 48072c393a42SmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object]) 48082c393a42SmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 48092c393a42Smrg[ 48102c393a42Smrg# These are sane defaults that work on at least a few old systems. 48112c393a42Smrg# [They come from Ultrix. What could be older than Ultrix?!! ;)] 48122c393a42Smrg 48132c393a42Smrg# Character class describing NM global symbol codes. 48142c393a42Smrgsymcode='[[BCDEGRST]]' 48152c393a42Smrg 48162c393a42Smrg# Regexp to match symbols that can be accessed directly from C. 48172c393a42Smrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 48182c393a42Smrg 48192c393a42Smrg# Transform an extracted symbol line into a proper C declaration 48202c393a42Smrglt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'" 48212c393a42Smrg 48222c393a42Smrg# Transform an extracted symbol line into symbol name and symbol address 48232c393a42Smrglt_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'" 48242c393a42Smrg 48252c393a42Smrg# Define system-specific variables. 48262c393a42Smrgcase $host_os in 48272c393a42Smrgaix*) 48282c393a42Smrg symcode='[[BCDT]]' 48292c393a42Smrg ;; 48302c393a42Smrgcygwin* | mingw* | pw32*) 48312c393a42Smrg symcode='[[ABCDGISTW]]' 48322c393a42Smrg ;; 48332c393a42Smrghpux*) # Its linker distinguishes data from code symbols 48342c393a42Smrg if test "$host_cpu" = ia64; then 48352c393a42Smrg symcode='[[ABCDEGRST]]' 48362c393a42Smrg fi 48372c393a42Smrg lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 48382c393a42Smrg 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'" 48392c393a42Smrg ;; 48402c393a42Smrglinux* | k*bsd*-gnu) 48412c393a42Smrg if test "$host_cpu" = ia64; then 48422c393a42Smrg symcode='[[ABCDGIRSTW]]' 48432c393a42Smrg lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 48442c393a42Smrg 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'" 48452c393a42Smrg fi 48462c393a42Smrg ;; 48472c393a42Smrgirix* | nonstopux*) 48482c393a42Smrg symcode='[[BCDEGRST]]' 48492c393a42Smrg ;; 48502c393a42Smrgosf*) 48512c393a42Smrg symcode='[[BCDEGQRST]]' 48522c393a42Smrg ;; 48532c393a42Smrgsolaris*) 48542c393a42Smrg symcode='[[BDRT]]' 48552c393a42Smrg ;; 48562c393a42Smrgsco3.2v5*) 48572c393a42Smrg symcode='[[DT]]' 48582c393a42Smrg ;; 48592c393a42Smrgsysv4.2uw2*) 48602c393a42Smrg symcode='[[DT]]' 48612c393a42Smrg ;; 48622c393a42Smrgsysv5* | sco5v6* | unixware* | OpenUNIX*) 48632c393a42Smrg symcode='[[ABDT]]' 48642c393a42Smrg ;; 48652c393a42Smrgsysv4) 48662c393a42Smrg symcode='[[DFNSTU]]' 48672c393a42Smrg ;; 48682c393a42Smrgesac 48692c393a42Smrg 48702c393a42Smrg# Handle CRLF in mingw tool chain 48712c393a42Smrgopt_cr= 48722c393a42Smrgcase $build_os in 48732c393a42Smrgmingw*) 48742c393a42Smrg opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp 48752c393a42Smrg ;; 48762c393a42Smrgesac 48772c393a42Smrg 48782c393a42Smrg# If we're using GNU nm, then use its standard symbol codes. 48792c393a42Smrgcase `$NM -V 2>&1` in 48802c393a42Smrg*GNU* | *'with BFD'*) 48812c393a42Smrg symcode='[[ABCDGIRSTW]]' ;; 48822c393a42Smrgesac 48832c393a42Smrg 48842c393a42Smrg# Try without a prefix undercore, then with it. 48852c393a42Smrgfor ac_symprfx in "" "_"; do 48862c393a42Smrg 48872c393a42Smrg # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 48882c393a42Smrg symxfrm="\\1 $ac_symprfx\\2 \\2" 48892c393a42Smrg 48902c393a42Smrg # Write the raw and C identifiers. 48912c393a42Smrg lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 48922c393a42Smrg 48932c393a42Smrg # Check to see that the pipe works correctly. 48942c393a42Smrg pipe_works=no 48952c393a42Smrg 48962c393a42Smrg rm -f conftest* 48972c393a42Smrg cat > conftest.$ac_ext <<EOF 48982c393a42Smrg#ifdef __cplusplus 48992c393a42Smrgextern "C" { 49002c393a42Smrg#endif 49012c393a42Smrgchar nm_test_var; 49022c393a42Smrgvoid nm_test_func(){} 49032c393a42Smrg#ifdef __cplusplus 49042c393a42Smrg} 49052c393a42Smrg#endif 49062c393a42Smrgint main(){nm_test_var='a';nm_test_func();return(0);} 49072c393a42SmrgEOF 49082c393a42Smrg 49092c393a42Smrg if AC_TRY_EVAL(ac_compile); then 49102c393a42Smrg # Now try to grab the symbols. 49112c393a42Smrg nlist=conftest.nm 49122c393a42Smrg if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then 49132c393a42Smrg # Try sorting and uniquifying the output. 49142c393a42Smrg if sort "$nlist" | uniq > "$nlist"T; then 49152c393a42Smrg mv -f "$nlist"T "$nlist" 49162c393a42Smrg else 49172c393a42Smrg rm -f "$nlist"T 49182c393a42Smrg fi 49192c393a42Smrg 49202c393a42Smrg # Make sure that we snagged all the symbols we need. 49212c393a42Smrg if grep ' nm_test_var$' "$nlist" >/dev/null; then 49222c393a42Smrg if grep ' nm_test_func$' "$nlist" >/dev/null; then 49232c393a42Smrg cat <<EOF > conftest.$ac_ext 49242c393a42Smrg#ifdef __cplusplus 49252c393a42Smrgextern "C" { 49262c393a42Smrg#endif 49272c393a42Smrg 49282c393a42SmrgEOF 49292c393a42Smrg # Now generate the symbol file. 49302c393a42Smrg eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' 49312c393a42Smrg 49322c393a42Smrg cat <<EOF >> conftest.$ac_ext 49332c393a42Smrg#if defined (__STDC__) && __STDC__ 49342c393a42Smrg# define lt_ptr_t void * 49352c393a42Smrg#else 49362c393a42Smrg# define lt_ptr_t char * 49372c393a42Smrg# define const 49382c393a42Smrg#endif 49392c393a42Smrg 49402c393a42Smrg/* The mapping between symbol names and symbols. */ 49412c393a42Smrgconst struct { 49422c393a42Smrg const char *name; 49432c393a42Smrg lt_ptr_t address; 49442c393a42Smrg} 49452c393a42Smrglt_preloaded_symbols[[]] = 49462c393a42Smrg{ 49472c393a42SmrgEOF 49482c393a42Smrg $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext 49492c393a42Smrg cat <<\EOF >> conftest.$ac_ext 49502c393a42Smrg {0, (lt_ptr_t) 0} 49512c393a42Smrg}; 49522c393a42Smrg 49532c393a42Smrg#ifdef __cplusplus 49542c393a42Smrg} 49552c393a42Smrg#endif 49562c393a42SmrgEOF 49572c393a42Smrg # Now try linking the two files. 49582c393a42Smrg mv conftest.$ac_objext conftstm.$ac_objext 49592c393a42Smrg lt_save_LIBS="$LIBS" 49602c393a42Smrg lt_save_CFLAGS="$CFLAGS" 49612c393a42Smrg LIBS="conftstm.$ac_objext" 49622c393a42Smrg CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 49632c393a42Smrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then 49642c393a42Smrg pipe_works=yes 49652c393a42Smrg fi 49662c393a42Smrg LIBS="$lt_save_LIBS" 49672c393a42Smrg CFLAGS="$lt_save_CFLAGS" 49682c393a42Smrg else 49692c393a42Smrg echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 49702c393a42Smrg fi 49712c393a42Smrg else 49722c393a42Smrg echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 49732c393a42Smrg fi 49742c393a42Smrg else 49752c393a42Smrg echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 49762c393a42Smrg fi 49772c393a42Smrg else 49782c393a42Smrg echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 49792c393a42Smrg cat conftest.$ac_ext >&5 49802c393a42Smrg fi 49812c393a42Smrg rm -rf conftest* conftst* 49822c393a42Smrg 49832c393a42Smrg # Do not use the global_symbol_pipe unless it works. 49842c393a42Smrg if test "$pipe_works" = yes; then 49852c393a42Smrg break 49862c393a42Smrg else 49872c393a42Smrg lt_cv_sys_global_symbol_pipe= 49882c393a42Smrg fi 49892c393a42Smrgdone 49902c393a42Smrg]) 49912c393a42Smrgif test -z "$lt_cv_sys_global_symbol_pipe"; then 49922c393a42Smrg lt_cv_sys_global_symbol_to_cdecl= 49932c393a42Smrgfi 49942c393a42Smrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 49952c393a42Smrg AC_MSG_RESULT(failed) 49962c393a42Smrgelse 49972c393a42Smrg AC_MSG_RESULT(ok) 49982c393a42Smrgfi 49992c393a42Smrg]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE 50002c393a42Smrg 50012c393a42Smrg 50022c393a42Smrg# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME]) 50032c393a42Smrg# --------------------------------------- 50042c393a42SmrgAC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC], 50052c393a42Smrg[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)= 50062c393a42Smrg_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 50072c393a42Smrg_LT_AC_TAGVAR(lt_prog_compiler_static, $1)= 50082c393a42Smrg 50092c393a42SmrgAC_MSG_CHECKING([for $compiler option to produce PIC]) 50102c393a42Smrg ifelse([$1],[CXX],[ 50112c393a42Smrg # C++ specific cases for pic, static, wl, etc. 50122c393a42Smrg if test "$GXX" = yes; then 50132c393a42Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 50142c393a42Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' 50152c393a42Smrg 50162c393a42Smrg case $host_os in 50172c393a42Smrg aix*) 50182c393a42Smrg # All AIX code is PIC. 50192c393a42Smrg if test "$host_cpu" = ia64; then 50202c393a42Smrg # AIX 5 now supports IA64 processor 50212c393a42Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 50222c393a42Smrg fi 50232c393a42Smrg ;; 50242c393a42Smrg amigaos*) 50252c393a42Smrg # FIXME: we need at least 68020 code to build shared libraries, but 50262c393a42Smrg # adding the `-m68020' flag to GCC prevents building anything better, 50272c393a42Smrg # like `-m68040'. 50282c393a42Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 50292c393a42Smrg ;; 50302c393a42Smrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 50312c393a42Smrg # PIC is the default for these OSes. 50322c393a42Smrg ;; 50332c393a42Smrg mingw* | cygwin* | os2* | pw32*) 50342c393a42Smrg # This hack is so that the source file can tell whether it is being 50352c393a42Smrg # built for inclusion in a dll (and should export symbols for example). 50362c393a42Smrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 50372c393a42Smrg # (--disable-auto-import) libraries 50382c393a42Smrg m4_if([$1], [GCJ], [], 50392c393a42Smrg [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 50402c393a42Smrg ;; 50412c393a42Smrg darwin* | rhapsody*) 50422c393a42Smrg # PIC is the default on this platform 50432c393a42Smrg # Common symbols not allowed in MH_DYLIB files 50442c393a42Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 50452c393a42Smrg ;; 50462c393a42Smrg *djgpp*) 50472c393a42Smrg # DJGPP does not support shared libraries at all 50482c393a42Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 50492c393a42Smrg ;; 50502c393a42Smrg interix[[3-9]]*) 50512c393a42Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 50522c393a42Smrg # Instead, we relocate shared libraries at runtime. 50532c393a42Smrg ;; 50542c393a42Smrg sysv4*MP*) 50552c393a42Smrg if test -d /usr/nec; then 50562c393a42Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 50572c393a42Smrg fi 50582c393a42Smrg ;; 50592c393a42Smrg hpux*) 50602c393a42Smrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 50612c393a42Smrg # not for PA HP-UX. 50622c393a42Smrg case $host_cpu in 50632c393a42Smrg hppa*64*|ia64*) 50642c393a42Smrg ;; 50652c393a42Smrg *) 50662c393a42Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 50672c393a42Smrg ;; 50682c393a42Smrg esac 50692c393a42Smrg ;; 50702c393a42Smrg *) 50712c393a42Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 50722c393a42Smrg ;; 50732c393a42Smrg esac 50742c393a42Smrg else 50752c393a42Smrg case $host_os in 50762c393a42Smrg aix[[4-9]]*) 50772c393a42Smrg # All AIX code is PIC. 50782c393a42Smrg if test "$host_cpu" = ia64; then 50792c393a42Smrg # AIX 5 now supports IA64 processor 50802c393a42Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 50812c393a42Smrg else 50822c393a42Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 50832c393a42Smrg fi 50842c393a42Smrg ;; 50852c393a42Smrg chorus*) 50862c393a42Smrg case $cc_basename in 50872c393a42Smrg cxch68*) 50882c393a42Smrg # Green Hills C++ Compiler 50892c393a42Smrg # _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" 50902c393a42Smrg ;; 50912c393a42Smrg esac 50922c393a42Smrg ;; 50932c393a42Smrg darwin*) 50942c393a42Smrg # PIC is the default on this platform 50952c393a42Smrg # Common symbols not allowed in MH_DYLIB files 50962c393a42Smrg case $cc_basename in 50972c393a42Smrg xlc*) 50982c393a42Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' 50992c393a42Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 51002c393a42Smrg ;; 51012c393a42Smrg esac 51022c393a42Smrg ;; 51032c393a42Smrg dgux*) 51042c393a42Smrg case $cc_basename in 51052c393a42Smrg ec++*) 51062c393a42Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 51072c393a42Smrg ;; 51082c393a42Smrg ghcx*) 51092c393a42Smrg # Green Hills C++ Compiler 51102c393a42Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 51112c393a42Smrg ;; 51122c393a42Smrg *) 51132c393a42Smrg ;; 51142c393a42Smrg esac 51152c393a42Smrg ;; 51162c393a42Smrg freebsd* | dragonfly*) 51172c393a42Smrg # FreeBSD uses GNU C++ 51182c393a42Smrg ;; 51192c393a42Smrg hpux9* | hpux10* | hpux11*) 51202c393a42Smrg case $cc_basename in 51212c393a42Smrg CC*) 51222c393a42Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 51232c393a42Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 51242c393a42Smrg if test "$host_cpu" != ia64; then 51252c393a42Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 51262c393a42Smrg fi 51272c393a42Smrg ;; 51282c393a42Smrg aCC*) 51292c393a42Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 51302c393a42Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 51312c393a42Smrg case $host_cpu in 51322c393a42Smrg hppa*64*|ia64*) 51332c393a42Smrg # +Z the default 51342c393a42Smrg ;; 51352c393a42Smrg *) 51362c393a42Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 51372c393a42Smrg ;; 51382c393a42Smrg esac 51392c393a42Smrg ;; 51402c393a42Smrg *) 51412c393a42Smrg ;; 51422c393a42Smrg esac 51432c393a42Smrg ;; 51442c393a42Smrg interix*) 51452c393a42Smrg # This is c89, which is MS Visual C++ (no shared libs) 51462c393a42Smrg # Anyone wants to do a port? 51472c393a42Smrg ;; 51482c393a42Smrg irix5* | irix6* | nonstopux*) 51492c393a42Smrg case $cc_basename in 51502c393a42Smrg CC*) 51512c393a42Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 51522c393a42Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 51532c393a42Smrg # CC pic flag -KPIC is the default. 51542c393a42Smrg ;; 51552c393a42Smrg *) 51562c393a42Smrg ;; 51572c393a42Smrg esac 51582c393a42Smrg ;; 51592c393a42Smrg linux* | k*bsd*-gnu) 51602c393a42Smrg case $cc_basename in 51612c393a42Smrg KCC*) 51622c393a42Smrg # KAI C++ Compiler 51632c393a42Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 51642c393a42Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 51652c393a42Smrg ;; 51662c393a42Smrg icpc* | ecpc*) 51672c393a42Smrg # Intel C++ 51682c393a42Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 51692c393a42Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 51702c393a42Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' 51712c393a42Smrg ;; 51722c393a42Smrg pgCC* | pgcpp*) 51732c393a42Smrg # Portland Group C++ compiler. 51742c393a42Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 51752c393a42Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 51762c393a42Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 51772c393a42Smrg ;; 51782c393a42Smrg cxx*) 51792c393a42Smrg # Compaq C++ 51802c393a42Smrg # Make sure the PIC flag is empty. It appears that all Alpha 51812c393a42Smrg # Linux and Compaq Tru64 Unix objects are PIC. 51822c393a42Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 51832c393a42Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 51842c393a42Smrg ;; 51852c393a42Smrg *) 51862c393a42Smrg case `$CC -V 2>&1 | sed 5q` in 51872c393a42Smrg *Sun\ C*) 51882c393a42Smrg # Sun C++ 5.9 51892c393a42Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 51902c393a42Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 51912c393a42Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 51922c393a42Smrg ;; 51932c393a42Smrg esac 51942c393a42Smrg ;; 51952c393a42Smrg esac 51962c393a42Smrg ;; 51972c393a42Smrg lynxos*) 51982c393a42Smrg ;; 51992c393a42Smrg m88k*) 52002c393a42Smrg ;; 52012c393a42Smrg mvs*) 52022c393a42Smrg case $cc_basename in 52032c393a42Smrg cxx*) 52042c393a42Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 52052c393a42Smrg ;; 52062c393a42Smrg *) 52072c393a42Smrg ;; 52082c393a42Smrg esac 52092c393a42Smrg ;; 52102c393a42Smrg netbsd* | netbsdelf*-gnu) 52112c393a42Smrg ;; 52122c393a42Smrg osf3* | osf4* | osf5*) 52132c393a42Smrg case $cc_basename in 52142c393a42Smrg KCC*) 52152c393a42Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 52162c393a42Smrg ;; 52172c393a42Smrg RCC*) 52182c393a42Smrg # Rational C++ 2.4.1 52192c393a42Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 52202c393a42Smrg ;; 52212c393a42Smrg cxx*) 52222c393a42Smrg # Digital/Compaq C++ 52232c393a42Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 52242c393a42Smrg # Make sure the PIC flag is empty. It appears that all Alpha 52252c393a42Smrg # Linux and Compaq Tru64 Unix objects are PIC. 52262c393a42Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 52272c393a42Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 52282c393a42Smrg ;; 52292c393a42Smrg *) 52302c393a42Smrg ;; 52312c393a42Smrg esac 52322c393a42Smrg ;; 52332c393a42Smrg psos*) 52342c393a42Smrg ;; 52352c393a42Smrg solaris*) 52362c393a42Smrg case $cc_basename in 52372c393a42Smrg CC*) 52382c393a42Smrg # Sun C++ 4.2, 5.x and Centerline C++ 52392c393a42Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 52402c393a42Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 52412c393a42Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 52422c393a42Smrg ;; 52432c393a42Smrg gcx*) 52442c393a42Smrg # Green Hills C++ Compiler 52452c393a42Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 52462c393a42Smrg ;; 52472c393a42Smrg *) 52482c393a42Smrg ;; 52492c393a42Smrg esac 52502c393a42Smrg ;; 52512c393a42Smrg sunos4*) 52522c393a42Smrg case $cc_basename in 52532c393a42Smrg CC*) 52542c393a42Smrg # Sun C++ 4.x 52552c393a42Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 52562c393a42Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 52572c393a42Smrg ;; 52582c393a42Smrg lcc*) 52592c393a42Smrg # Lucid 52602c393a42Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 52612c393a42Smrg ;; 52622c393a42Smrg *) 52632c393a42Smrg ;; 52642c393a42Smrg esac 52652c393a42Smrg ;; 52662c393a42Smrg tandem*) 52672c393a42Smrg case $cc_basename in 52682c393a42Smrg NCC*) 52692c393a42Smrg # NonStop-UX NCC 3.20 52702c393a42Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 52712c393a42Smrg ;; 52722c393a42Smrg *) 52732c393a42Smrg ;; 52742c393a42Smrg esac 52752c393a42Smrg ;; 52762c393a42Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 52772c393a42Smrg case $cc_basename in 52782c393a42Smrg CC*) 52792c393a42Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 52802c393a42Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 52812c393a42Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 52822c393a42Smrg ;; 52832c393a42Smrg esac 52842c393a42Smrg ;; 52852c393a42Smrg vxworks*) 52862c393a42Smrg ;; 52872c393a42Smrg *) 52882c393a42Smrg _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 52892c393a42Smrg ;; 52902c393a42Smrg esac 52912c393a42Smrg fi 52922c393a42Smrg], 52932c393a42Smrg[ 52942c393a42Smrg if test "$GCC" = yes; then 52952c393a42Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 52962c393a42Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' 52972c393a42Smrg 52982c393a42Smrg case $host_os in 52992c393a42Smrg aix*) 53002c393a42Smrg # All AIX code is PIC. 53012c393a42Smrg if test "$host_cpu" = ia64; then 53022c393a42Smrg # AIX 5 now supports IA64 processor 53032c393a42Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 53042c393a42Smrg fi 53052c393a42Smrg ;; 53062c393a42Smrg 53072c393a42Smrg amigaos*) 53082c393a42Smrg # FIXME: we need at least 68020 code to build shared libraries, but 53092c393a42Smrg # adding the `-m68020' flag to GCC prevents building anything better, 53102c393a42Smrg # like `-m68040'. 53112c393a42Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 53122c393a42Smrg ;; 53132c393a42Smrg 53142c393a42Smrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 53152c393a42Smrg # PIC is the default for these OSes. 53162c393a42Smrg ;; 53172c393a42Smrg 53182c393a42Smrg mingw* | cygwin* | pw32* | os2*) 53192c393a42Smrg # This hack is so that the source file can tell whether it is being 53202c393a42Smrg # built for inclusion in a dll (and should export symbols for example). 53212c393a42Smrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 53222c393a42Smrg # (--disable-auto-import) libraries 53232c393a42Smrg m4_if([$1], [GCJ], [], 53242c393a42Smrg [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 53252c393a42Smrg ;; 53262c393a42Smrg 53272c393a42Smrg darwin* | rhapsody*) 53282c393a42Smrg # PIC is the default on this platform 53292c393a42Smrg # Common symbols not allowed in MH_DYLIB files 53302c393a42Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 53312c393a42Smrg ;; 53322c393a42Smrg 53332c393a42Smrg interix[[3-9]]*) 53342c393a42Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 53352c393a42Smrg # Instead, we relocate shared libraries at runtime. 53362c393a42Smrg ;; 53372c393a42Smrg 53382c393a42Smrg msdosdjgpp*) 53392c393a42Smrg # Just because we use GCC doesn't mean we suddenly get shared libraries 53402c393a42Smrg # on systems that don't support them. 53412c393a42Smrg _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 53422c393a42Smrg enable_shared=no 53432c393a42Smrg ;; 53442c393a42Smrg 53452c393a42Smrg sysv4*MP*) 53462c393a42Smrg if test -d /usr/nec; then 53472c393a42Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 53482c393a42Smrg fi 53492c393a42Smrg ;; 53502c393a42Smrg 53512c393a42Smrg hpux*) 53522c393a42Smrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 53532c393a42Smrg # not for PA HP-UX. 53542c393a42Smrg case $host_cpu in 53552c393a42Smrg hppa*64*|ia64*) 53562c393a42Smrg # +Z the default 53572c393a42Smrg ;; 53582c393a42Smrg *) 53592c393a42Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 53602c393a42Smrg ;; 53612c393a42Smrg esac 53622c393a42Smrg ;; 53632c393a42Smrg 53642c393a42Smrg *) 53652c393a42Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 53662c393a42Smrg ;; 53672c393a42Smrg esac 53682c393a42Smrg else 53692c393a42Smrg # PORTME Check for flag to pass linker flags through the system compiler. 53702c393a42Smrg case $host_os in 53712c393a42Smrg aix*) 53722c393a42Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 53732c393a42Smrg if test "$host_cpu" = ia64; then 53742c393a42Smrg # AIX 5 now supports IA64 processor 53752c393a42Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 53762c393a42Smrg else 53772c393a42Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 53782c393a42Smrg fi 53792c393a42Smrg ;; 53802c393a42Smrg darwin*) 53812c393a42Smrg # PIC is the default on this platform 53822c393a42Smrg # Common symbols not allowed in MH_DYLIB files 53832c393a42Smrg case $cc_basename in 53842c393a42Smrg xlc*) 53852c393a42Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' 53862c393a42Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 53872c393a42Smrg ;; 53882c393a42Smrg esac 53892c393a42Smrg ;; 53902c393a42Smrg 53912c393a42Smrg mingw* | cygwin* | pw32* | os2*) 53922c393a42Smrg # This hack is so that the source file can tell whether it is being 53932c393a42Smrg # built for inclusion in a dll (and should export symbols for example). 53942c393a42Smrg m4_if([$1], [GCJ], [], 53952c393a42Smrg [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 53962c393a42Smrg ;; 53972c393a42Smrg 53982c393a42Smrg hpux9* | hpux10* | hpux11*) 53992c393a42Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 54002c393a42Smrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 54012c393a42Smrg # not for PA HP-UX. 54022c393a42Smrg case $host_cpu in 54032c393a42Smrg hppa*64*|ia64*) 54042c393a42Smrg # +Z the default 54052c393a42Smrg ;; 54062c393a42Smrg *) 54072c393a42Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 54082c393a42Smrg ;; 54092c393a42Smrg esac 54102c393a42Smrg # Is there a better lt_prog_compiler_static that works with the bundled CC? 54112c393a42Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 54122c393a42Smrg ;; 54132c393a42Smrg 54142c393a42Smrg irix5* | irix6* | nonstopux*) 54152c393a42Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 54162c393a42Smrg # PIC (with -KPIC) is the default. 54172c393a42Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 54182c393a42Smrg ;; 54192c393a42Smrg 54202c393a42Smrg newsos6) 54212c393a42Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 54222c393a42Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 54232c393a42Smrg ;; 54242c393a42Smrg 54252c393a42Smrg linux* | k*bsd*-gnu) 54262c393a42Smrg case $cc_basename in 54272c393a42Smrg icc* | ecc*) 54282c393a42Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 54292c393a42Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 54302c393a42Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' 54312c393a42Smrg ;; 54322c393a42Smrg pgcc* | pgf77* | pgf90* | pgf95*) 54332c393a42Smrg # Portland Group compilers (*not* the Pentium gcc compiler, 54342c393a42Smrg # which looks to be a dead project) 54352c393a42Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 54362c393a42Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 54372c393a42Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 54382c393a42Smrg ;; 54392c393a42Smrg ccc*) 54402c393a42Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 54412c393a42Smrg # All Alpha code is PIC. 54422c393a42Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 54432c393a42Smrg ;; 54442c393a42Smrg *) 54452c393a42Smrg case `$CC -V 2>&1 | sed 5q` in 54462c393a42Smrg *Sun\ C*) 54472c393a42Smrg # Sun C 5.9 54482c393a42Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 54492c393a42Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 54502c393a42Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 54512c393a42Smrg ;; 54522c393a42Smrg *Sun\ F*) 54532c393a42Smrg # Sun Fortran 8.3 passes all unrecognized flags to the linker 54542c393a42Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 54552c393a42Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 54562c393a42Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='' 54572c393a42Smrg ;; 54582c393a42Smrg esac 54592c393a42Smrg ;; 54602c393a42Smrg esac 54612c393a42Smrg ;; 54622c393a42Smrg 54632c393a42Smrg osf3* | osf4* | osf5*) 54642c393a42Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 54652c393a42Smrg # All OSF/1 code is PIC. 54662c393a42Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 54672c393a42Smrg ;; 54682c393a42Smrg 54692c393a42Smrg rdos*) 54702c393a42Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 54712c393a42Smrg ;; 54722c393a42Smrg 54732c393a42Smrg solaris*) 54742c393a42Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 54752c393a42Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 54762c393a42Smrg case $cc_basename in 54772c393a42Smrg f77* | f90* | f95*) 54782c393a42Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 54792c393a42Smrg *) 54802c393a42Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 54812c393a42Smrg esac 54822c393a42Smrg ;; 54832c393a42Smrg 54842c393a42Smrg sunos4*) 54852c393a42Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 54862c393a42Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 54872c393a42Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 54882c393a42Smrg ;; 54892c393a42Smrg 54902c393a42Smrg sysv4 | sysv4.2uw2* | sysv4.3*) 54912c393a42Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 54922c393a42Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 54932c393a42Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 54942c393a42Smrg ;; 54952c393a42Smrg 54962c393a42Smrg sysv4*MP*) 54972c393a42Smrg if test -d /usr/nec ;then 54982c393a42Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 54992c393a42Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 55002c393a42Smrg fi 55012c393a42Smrg ;; 55022c393a42Smrg 55032c393a42Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 55042c393a42Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 55052c393a42Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 55062c393a42Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 55072c393a42Smrg ;; 55082c393a42Smrg 55092c393a42Smrg unicos*) 55102c393a42Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 55112c393a42Smrg _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 55122c393a42Smrg ;; 55132c393a42Smrg 55142c393a42Smrg uts4*) 55152c393a42Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 55162c393a42Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 55172c393a42Smrg ;; 55182c393a42Smrg 55192c393a42Smrg *) 55202c393a42Smrg _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 55212c393a42Smrg ;; 55222c393a42Smrg esac 55232c393a42Smrg fi 55242c393a42Smrg]) 55252c393a42SmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)]) 55262c393a42Smrg 55272c393a42Smrg# 55282c393a42Smrg# Check to make sure the PIC flag actually works. 55292c393a42Smrg# 55302c393a42Smrgif test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then 55312c393a42Smrg AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works], 55322c393a42Smrg _LT_AC_TAGVAR(lt_cv_prog_compiler_pic_works, $1), 55332c393a42Smrg [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [], 55342c393a42Smrg [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in 55352c393a42Smrg "" | " "*) ;; 55362c393a42Smrg *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;; 55372c393a42Smrg esac], 55382c393a42Smrg [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 55392c393a42Smrg _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 55402c393a42Smrgfi 55412c393a42Smrgcase $host_os in 55422c393a42Smrg # For platforms which do not support PIC, -DPIC is meaningless: 55432c393a42Smrg *djgpp*) 55442c393a42Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 55452c393a42Smrg ;; 55462c393a42Smrg *) 55472c393a42Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])" 55482c393a42Smrg ;; 55492c393a42Smrgesac 55502c393a42Smrg 55512c393a42Smrg# 55522c393a42Smrg# Check to make sure the static flag actually works. 55532c393a42Smrg# 55542c393a42Smrgwl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\" 55552c393a42SmrgAC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 55562c393a42Smrg _LT_AC_TAGVAR(lt_cv_prog_compiler_static_works, $1), 55572c393a42Smrg $lt_tmp_static_flag, 55582c393a42Smrg [], 55592c393a42Smrg [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=]) 55602c393a42Smrg]) 55612c393a42Smrg 55622c393a42Smrg 55632c393a42Smrg# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME]) 55642c393a42Smrg# ------------------------------------ 55652c393a42Smrg# See if the linker supports building shared libraries. 55662c393a42SmrgAC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS], 55672c393a42Smrg[AC_REQUIRE([LT_AC_PROG_SED])dnl 55682c393a42SmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 55692c393a42Smrgifelse([$1],[CXX],[ 55702c393a42Smrg _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 55712c393a42Smrg case $host_os in 55722c393a42Smrg aix[[4-9]]*) 55732c393a42Smrg # If we're using GNU nm, then we don't want the "-C" option. 55742c393a42Smrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 55752c393a42Smrg if $NM -V 2>&1 | grep 'GNU' > /dev/null; then 55762c393a42Smrg _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' 55772c393a42Smrg else 55782c393a42Smrg _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' 55792c393a42Smrg fi 55802c393a42Smrg ;; 55812c393a42Smrg pw32*) 55822c393a42Smrg _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" 55832c393a42Smrg ;; 55842c393a42Smrg cygwin* | mingw*) 55852c393a42Smrg _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' 55862c393a42Smrg ;; 55872c393a42Smrg linux* | k*bsd*-gnu) 55882c393a42Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=no 55892c393a42Smrg ;; 55902c393a42Smrg *) 55912c393a42Smrg _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 55922c393a42Smrg ;; 55932c393a42Smrg esac 55942c393a42Smrg _LT_AC_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 55952c393a42Smrg],[ 55962c393a42Smrg runpath_var= 55972c393a42Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)= 55982c393a42Smrg _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no 55992c393a42Smrg _LT_AC_TAGVAR(archive_cmds, $1)= 56002c393a42Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)= 56012c393a42Smrg _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)= 56022c393a42Smrg _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)= 56032c393a42Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= 56042c393a42Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 56052c393a42Smrg _LT_AC_TAGVAR(thread_safe_flag_spec, $1)= 56062c393a42Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= 56072c393a42Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 56082c393a42Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 56092c393a42Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 56102c393a42Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=no 56112c393a42Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 56122c393a42Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown 56132c393a42Smrg _LT_AC_TAGVAR(hardcode_automatic, $1)=no 56142c393a42Smrg _LT_AC_TAGVAR(module_cmds, $1)= 56152c393a42Smrg _LT_AC_TAGVAR(module_expsym_cmds, $1)= 56162c393a42Smrg _LT_AC_TAGVAR(always_export_symbols, $1)=no 56172c393a42Smrg _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 56182c393a42Smrg # include_expsyms should be a list of space-separated symbols to be *always* 56192c393a42Smrg # included in the symbol list 56202c393a42Smrg _LT_AC_TAGVAR(include_expsyms, $1)= 56212c393a42Smrg # exclude_expsyms can be an extended regexp of symbols to exclude 56222c393a42Smrg # it will be wrapped by ` (' and `)$', so one must not match beginning or 56232c393a42Smrg # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', 56242c393a42Smrg # as well as any symbol that contains `d'. 56252c393a42Smrg _LT_AC_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 56262c393a42Smrg # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 56272c393a42Smrg # platforms (ab)use it in PIC code, but their linkers get confused if 56282c393a42Smrg # the symbol is explicitly referenced. Since portable code cannot 56292c393a42Smrg # rely on this symbol name, it's probably fine to never include it in 56302c393a42Smrg # preloaded symbol tables. 56312c393a42Smrg # Exclude shared library initialization/finalization symbols. 56322c393a42Smrgdnl Note also adjust exclude_expsyms for C++ above. 56332c393a42Smrg extract_expsyms_cmds= 56342c393a42Smrg # Just being paranoid about ensuring that cc_basename is set. 56352c393a42Smrg _LT_CC_BASENAME([$compiler]) 56362c393a42Smrg case $host_os in 56372c393a42Smrg cygwin* | mingw* | pw32*) 56382c393a42Smrg # FIXME: the MSVC++ port hasn't been tested in a loooong time 56392c393a42Smrg # When not using gcc, we currently assume that we are using 56402c393a42Smrg # Microsoft Visual C++. 56412c393a42Smrg if test "$GCC" != yes; then 56422c393a42Smrg with_gnu_ld=no 56432c393a42Smrg fi 56442c393a42Smrg ;; 56452c393a42Smrg interix*) 56462c393a42Smrg # we just hope/assume this is gcc and not c89 (= MSVC++) 56472c393a42Smrg with_gnu_ld=yes 56482c393a42Smrg ;; 56492c393a42Smrg openbsd*) 56502c393a42Smrg with_gnu_ld=no 56512c393a42Smrg ;; 56522c393a42Smrg esac 56532c393a42Smrg 56542c393a42Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=yes 56552c393a42Smrg if test "$with_gnu_ld" = yes; then 56562c393a42Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 56572c393a42Smrg wlarc='${wl}' 56582c393a42Smrg 56592c393a42Smrg # Set some defaults for GNU ld with shared library support. These 56602c393a42Smrg # are reset later if shared libraries are not supported. Putting them 56612c393a42Smrg # here allows them to be overridden if necessary. 56622c393a42Smrg runpath_var=LD_RUN_PATH 56632c393a42Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 56642c393a42Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 56652c393a42Smrg # ancient GNU ld didn't support --whole-archive et. al. 56662c393a42Smrg if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then 56672c393a42Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 56682c393a42Smrg else 56692c393a42Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 56702c393a42Smrg fi 56712c393a42Smrg supports_anon_versioning=no 56722c393a42Smrg case `$LD -v 2>/dev/null` in 56732c393a42Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 56742c393a42Smrg *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 56752c393a42Smrg *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 56762c393a42Smrg *\ 2.11.*) ;; # other 2.11 versions 56772c393a42Smrg *) supports_anon_versioning=yes ;; 56782c393a42Smrg esac 56792c393a42Smrg 56802c393a42Smrg # See if GNU ld supports shared libraries. 56812c393a42Smrg case $host_os in 56822c393a42Smrg aix[[3-9]]*) 56832c393a42Smrg # On AIX/PPC, the GNU linker is very broken 56842c393a42Smrg if test "$host_cpu" != ia64; then 56852c393a42Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 56862c393a42Smrg cat <<EOF 1>&2 56872c393a42Smrg 56882c393a42Smrg*** Warning: the GNU linker, at least up to release 2.9.1, is reported 56892c393a42Smrg*** to be unable to reliably create shared libraries on AIX. 56902c393a42Smrg*** Therefore, libtool is disabling shared libraries support. If you 56912c393a42Smrg*** really care for shared libraries, you may want to modify your PATH 56922c393a42Smrg*** so that a non-GNU linker is found, and then restart. 56932c393a42Smrg 56942c393a42SmrgEOF 56952c393a42Smrg fi 56962c393a42Smrg ;; 56972c393a42Smrg 56982c393a42Smrg amigaos*) 56992c393a42Smrg _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)' 57002c393a42Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 57012c393a42Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 57022c393a42Smrg 57032c393a42Smrg # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports 57042c393a42Smrg # that the semantics of dynamic libraries on AmigaOS, at least up 57052c393a42Smrg # to version 4, is to share data among multiple programs linked 57062c393a42Smrg # with the same dynamic library. Since this doesn't match the 57072c393a42Smrg # behavior of shared libraries on other platforms, we can't use 57082c393a42Smrg # them. 57092c393a42Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 57102c393a42Smrg ;; 57112c393a42Smrg 57122c393a42Smrg beos*) 57132c393a42Smrg if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 57142c393a42Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 57152c393a42Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 57162c393a42Smrg # support --undefined. This deserves some investigation. FIXME 57172c393a42Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 57182c393a42Smrg else 57192c393a42Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 57202c393a42Smrg fi 57212c393a42Smrg ;; 57222c393a42Smrg 57232c393a42Smrg cygwin* | mingw* | pw32*) 57242c393a42Smrg # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 57252c393a42Smrg # as there is no search path for DLLs. 57262c393a42Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 57272c393a42Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 57282c393a42Smrg _LT_AC_TAGVAR(always_export_symbols, $1)=no 57292c393a42Smrg _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 57302c393a42Smrg _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' 57312c393a42Smrg 57322c393a42Smrg if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then 57332c393a42Smrg _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' 57342c393a42Smrg # If the export-symbols file already is a .def file (1st line 57352c393a42Smrg # is EXPORTS), use it as is; otherwise, prepend... 57362c393a42Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 57372c393a42Smrg cp $export_symbols $output_objdir/$soname.def; 57382c393a42Smrg else 57392c393a42Smrg echo EXPORTS > $output_objdir/$soname.def; 57402c393a42Smrg cat $export_symbols >> $output_objdir/$soname.def; 57412c393a42Smrg fi~ 57422c393a42Smrg $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 57432c393a42Smrg else 57442c393a42Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 57452c393a42Smrg fi 57462c393a42Smrg ;; 57472c393a42Smrg 57482c393a42Smrg interix[[3-9]]*) 57492c393a42Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 57502c393a42Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 57512c393a42Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 57522c393a42Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 57532c393a42Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 57542c393a42Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 57552c393a42Smrg # default) and relocated if they conflict, which is a slow very memory 57562c393a42Smrg # consuming and fragmenting process. To avoid this, we pick a random, 57572c393a42Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 57582c393a42Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 57592c393a42Smrg _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' 57602c393a42Smrg _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' 57612c393a42Smrg ;; 57622c393a42Smrg 57632c393a42Smrg gnu* | linux* | k*bsd*-gnu) 57642c393a42Smrg if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 57652c393a42Smrg tmp_addflag= 57662c393a42Smrg case $cc_basename,$host_cpu in 57672c393a42Smrg pgcc*) # Portland Group C compiler 57682c393a42Smrg _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' 57692c393a42Smrg tmp_addflag=' $pic_flag' 57702c393a42Smrg ;; 57712c393a42Smrg pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers 57722c393a42Smrg _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' 57732c393a42Smrg tmp_addflag=' $pic_flag -Mnomain' ;; 57742c393a42Smrg ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 57752c393a42Smrg tmp_addflag=' -i_dynamic' ;; 57762c393a42Smrg efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 57772c393a42Smrg tmp_addflag=' -i_dynamic -nofor_main' ;; 57782c393a42Smrg ifc* | ifort*) # Intel Fortran compiler 57792c393a42Smrg tmp_addflag=' -nofor_main' ;; 57802c393a42Smrg esac 57812c393a42Smrg case `$CC -V 2>&1 | sed 5q` in 57822c393a42Smrg *Sun\ C*) # Sun C 5.9 57832c393a42Smrg _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' 57842c393a42Smrg tmp_sharedflag='-G' ;; 57852c393a42Smrg *Sun\ F*) # Sun Fortran 8.3 57862c393a42Smrg tmp_sharedflag='-G' ;; 57872c393a42Smrg *) 57882c393a42Smrg tmp_sharedflag='-shared' ;; 57892c393a42Smrg esac 57902c393a42Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 57912c393a42Smrg 57922c393a42Smrg if test $supports_anon_versioning = yes; then 57932c393a42Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~ 57942c393a42Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 57952c393a42Smrg $echo "local: *; };" >> $output_objdir/$libname.ver~ 57962c393a42Smrg $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 57972c393a42Smrg fi 57982c393a42Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=no 57992c393a42Smrg else 58002c393a42Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 58012c393a42Smrg fi 58022c393a42Smrg ;; 58032c393a42Smrg 58042c393a42Smrg netbsd* | netbsdelf*-gnu) 58052c393a42Smrg if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then 58062c393a42Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 58072c393a42Smrg wlarc= 58082c393a42Smrg else 58092c393a42Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 58102c393a42Smrg _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' 58112c393a42Smrg fi 58122c393a42Smrg ;; 58132c393a42Smrg 58142c393a42Smrg solaris*) 58152c393a42Smrg if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then 58162c393a42Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 58172c393a42Smrg cat <<EOF 1>&2 58182c393a42Smrg 58192c393a42Smrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably 58202c393a42Smrg*** create shared libraries on Solaris systems. Therefore, libtool 58212c393a42Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 58222c393a42Smrg*** binutils to release 2.9.1 or newer. Another option is to modify 58232c393a42Smrg*** your PATH or compiler configuration so that the native linker is 58242c393a42Smrg*** used, and then restart. 58252c393a42Smrg 58262c393a42SmrgEOF 58272c393a42Smrg elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 58282c393a42Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 58292c393a42Smrg _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' 58302c393a42Smrg else 58312c393a42Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 58322c393a42Smrg fi 58332c393a42Smrg ;; 58342c393a42Smrg 58352c393a42Smrg sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 58362c393a42Smrg case `$LD -v 2>&1` in 58372c393a42Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 58382c393a42Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 58392c393a42Smrg cat <<_LT_EOF 1>&2 58402c393a42Smrg 58412c393a42Smrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not 58422c393a42Smrg*** reliably create shared libraries on SCO systems. Therefore, libtool 58432c393a42Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 58442c393a42Smrg*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 58452c393a42Smrg*** your PATH or compiler configuration so that the native linker is 58462c393a42Smrg*** used, and then restart. 58472c393a42Smrg 58482c393a42Smrg_LT_EOF 58492c393a42Smrg ;; 58502c393a42Smrg *) 58512c393a42Smrg if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 58522c393a42Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' 58532c393a42Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' 58542c393a42Smrg _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' 58552c393a42Smrg else 58562c393a42Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 58572c393a42Smrg fi 58582c393a42Smrg ;; 58592c393a42Smrg esac 58602c393a42Smrg ;; 58612c393a42Smrg 58622c393a42Smrg sunos4*) 58632c393a42Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 58642c393a42Smrg wlarc= 58652c393a42Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 58662c393a42Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 58672c393a42Smrg ;; 58682c393a42Smrg 58692c393a42Smrg *) 58702c393a42Smrg if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 58712c393a42Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 58722c393a42Smrg _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' 58732c393a42Smrg else 58742c393a42Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 58752c393a42Smrg fi 58762c393a42Smrg ;; 58772c393a42Smrg esac 58782c393a42Smrg 58792c393a42Smrg if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then 58802c393a42Smrg runpath_var= 58812c393a42Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= 58822c393a42Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= 58832c393a42Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 58842c393a42Smrg fi 58852c393a42Smrg else 58862c393a42Smrg # PORTME fill in a description of your system's linker (not GNU ld) 58872c393a42Smrg case $host_os in 58882c393a42Smrg aix3*) 58892c393a42Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 58902c393a42Smrg _LT_AC_TAGVAR(always_export_symbols, $1)=yes 58912c393a42Smrg _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' 58922c393a42Smrg # Note: this linker hardcodes the directories in LIBPATH if there 58932c393a42Smrg # are no directories specified by -L. 58942c393a42Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 58952c393a42Smrg if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then 58962c393a42Smrg # Neither direct hardcoding nor static linking is supported with a 58972c393a42Smrg # broken collect2. 58982c393a42Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported 58992c393a42Smrg fi 59002c393a42Smrg ;; 59012c393a42Smrg 59022c393a42Smrg aix[[4-9]]*) 59032c393a42Smrg if test "$host_cpu" = ia64; then 59042c393a42Smrg # On IA64, the linker does run time linking by default, so we don't 59052c393a42Smrg # have to do anything special. 59062c393a42Smrg aix_use_runtimelinking=no 59072c393a42Smrg exp_sym_flag='-Bexport' 59082c393a42Smrg no_entry_flag="" 59092c393a42Smrg else 59102c393a42Smrg # If we're using GNU nm, then we don't want the "-C" option. 59112c393a42Smrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 59122c393a42Smrg if $NM -V 2>&1 | grep 'GNU' > /dev/null; then 59132c393a42Smrg _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' 59142c393a42Smrg else 59152c393a42Smrg _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' 59162c393a42Smrg fi 59172c393a42Smrg aix_use_runtimelinking=no 59182c393a42Smrg 59192c393a42Smrg # Test if we are trying to use run time linking or normal 59202c393a42Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 59212c393a42Smrg # need to do runtime linking. 59222c393a42Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 59232c393a42Smrg for ld_flag in $LDFLAGS; do 59242c393a42Smrg if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then 59252c393a42Smrg aix_use_runtimelinking=yes 59262c393a42Smrg break 59272c393a42Smrg fi 59282c393a42Smrg done 59292c393a42Smrg ;; 59302c393a42Smrg esac 59312c393a42Smrg 59322c393a42Smrg exp_sym_flag='-bexport' 59332c393a42Smrg no_entry_flag='-bnoentry' 59342c393a42Smrg fi 59352c393a42Smrg 59362c393a42Smrg # When large executables or shared objects are built, AIX ld can 59372c393a42Smrg # have problems creating the table of contents. If linking a library 59382c393a42Smrg # or program results in "error TOC overflow" add -mminimal-toc to 59392c393a42Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 59402c393a42Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 59412c393a42Smrg 59422c393a42Smrg _LT_AC_TAGVAR(archive_cmds, $1)='' 59432c393a42Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 59442c393a42Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' 59452c393a42Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 59462c393a42Smrg 59472c393a42Smrg if test "$GCC" = yes; then 59482c393a42Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 59492c393a42Smrg # We only want to do this on AIX 4.2 and lower, the check 59502c393a42Smrg # below for broken collect2 doesn't work under 4.3+ 59512c393a42Smrg collect2name=`${CC} -print-prog-name=collect2` 59522c393a42Smrg if test -f "$collect2name" && \ 59532c393a42Smrg strings "$collect2name" | grep resolve_lib_name >/dev/null 59542c393a42Smrg then 59552c393a42Smrg # We have reworked collect2 59562c393a42Smrg : 59572c393a42Smrg else 59582c393a42Smrg # We have old collect2 59592c393a42Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported 59602c393a42Smrg # It fails to find uninstalled libraries when the uninstalled 59612c393a42Smrg # path is not listed in the libpath. Setting hardcode_minus_L 59622c393a42Smrg # to unsupported forces relinking 59632c393a42Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 59642c393a42Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 59652c393a42Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 59662c393a42Smrg fi 59672c393a42Smrg ;; 59682c393a42Smrg esac 59692c393a42Smrg shared_flag='-shared' 59702c393a42Smrg if test "$aix_use_runtimelinking" = yes; then 59712c393a42Smrg shared_flag="$shared_flag "'${wl}-G' 59722c393a42Smrg fi 59732c393a42Smrg else 59742c393a42Smrg # not using gcc 59752c393a42Smrg if test "$host_cpu" = ia64; then 59762c393a42Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 59772c393a42Smrg # chokes on -Wl,-G. The following line is correct: 59782c393a42Smrg shared_flag='-G' 59792c393a42Smrg else 59802c393a42Smrg if test "$aix_use_runtimelinking" = yes; then 59812c393a42Smrg shared_flag='${wl}-G' 59822c393a42Smrg else 59832c393a42Smrg shared_flag='${wl}-bM:SRE' 59842c393a42Smrg fi 59852c393a42Smrg fi 59862c393a42Smrg fi 59872c393a42Smrg 59882c393a42Smrg # It seems that -bexpall does not export symbols beginning with 59892c393a42Smrg # underscore (_), so it is better to generate a list of symbols to export. 59902c393a42Smrg _LT_AC_TAGVAR(always_export_symbols, $1)=yes 59912c393a42Smrg if test "$aix_use_runtimelinking" = yes; then 59922c393a42Smrg # Warning - without using the other runtime loading flags (-brtl), 59932c393a42Smrg # -berok will link without error, but may produce a broken library. 59942c393a42Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' 59952c393a42Smrg # Determine the default libpath from the value encoded in an empty executable. 59962c393a42Smrg _LT_AC_SYS_LIBPATH_AIX 59972c393a42Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 59982c393a42Smrg _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" 59992c393a42Smrg else 60002c393a42Smrg if test "$host_cpu" = ia64; then 60012c393a42Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 60022c393a42Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 60032c393a42Smrg _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" 60042c393a42Smrg else 60052c393a42Smrg # Determine the default libpath from the value encoded in an empty executable. 60062c393a42Smrg _LT_AC_SYS_LIBPATH_AIX 60072c393a42Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 60082c393a42Smrg # Warning - without using the other run time loading flags, 60092c393a42Smrg # -berok will link without error, but may produce a broken library. 60102c393a42Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 60112c393a42Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 60122c393a42Smrg # Exported symbols can be pulled into shared objects from archives 60132c393a42Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 60142c393a42Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes 60152c393a42Smrg # This is similar to how AIX traditionally builds its shared libraries. 60162c393a42Smrg _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' 60172c393a42Smrg fi 60182c393a42Smrg fi 60192c393a42Smrg ;; 60202c393a42Smrg 60212c393a42Smrg amigaos*) 60222c393a42Smrg _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)' 60232c393a42Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 60242c393a42Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 60252c393a42Smrg # see comment about different semantics on the GNU ld section 60262c393a42Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 60272c393a42Smrg ;; 60282c393a42Smrg 60292c393a42Smrg bsdi[[45]]*) 60302c393a42Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 60312c393a42Smrg ;; 60322c393a42Smrg 60332c393a42Smrg cygwin* | mingw* | pw32*) 60342c393a42Smrg # When not using gcc, we currently assume that we are using 60352c393a42Smrg # Microsoft Visual C++. 60362c393a42Smrg # hardcode_libdir_flag_spec is actually meaningless, as there is 60372c393a42Smrg # no search path for DLLs. 60382c393a42Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 60392c393a42Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 60402c393a42Smrg # Tell ltmain to make .lib files, not .a files. 60412c393a42Smrg libext=lib 60422c393a42Smrg # Tell ltmain to make .dll files, not .so files. 60432c393a42Smrg shrext_cmds=".dll" 60442c393a42Smrg # FIXME: Setting linknames here is a bad hack. 60452c393a42Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' 60462c393a42Smrg # The linker will automatically build a .lib file if we build a DLL. 60472c393a42Smrg _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true' 60482c393a42Smrg # FIXME: Should let the user specify the lib program. 60492c393a42Smrg _LT_AC_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 60502c393a42Smrg _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' 60512c393a42Smrg _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 60522c393a42Smrg ;; 60532c393a42Smrg 60542c393a42Smrg darwin* | rhapsody*) 60552c393a42Smrg case $host_os in 60562c393a42Smrg rhapsody* | darwin1.[[012]]) 60572c393a42Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' 60582c393a42Smrg ;; 60592c393a42Smrg *) # Darwin 1.3 on 60602c393a42Smrg if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then 60612c393a42Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' 60622c393a42Smrg else 60632c393a42Smrg case ${MACOSX_DEPLOYMENT_TARGET} in 60642c393a42Smrg 10.[[012]]) 60652c393a42Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' 60662c393a42Smrg ;; 60672c393a42Smrg 10.*) 60682c393a42Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup' 60692c393a42Smrg ;; 60702c393a42Smrg esac 60712c393a42Smrg fi 60722c393a42Smrg ;; 60732c393a42Smrg esac 60742c393a42Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 60752c393a42Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 60762c393a42Smrg _LT_AC_TAGVAR(hardcode_automatic, $1)=yes 60772c393a42Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 60782c393a42Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' 60792c393a42Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 60802c393a42Smrg if test "$GCC" = yes ; then 60812c393a42Smrg output_verbose_link_cmd='echo' 60822c393a42Smrg _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}" 60832c393a42Smrg _LT_AC_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" 60842c393a42Smrg _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}" 60852c393a42Smrg _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}" 60862c393a42Smrg else 60872c393a42Smrg case $cc_basename in 60882c393a42Smrg xlc*) 60892c393a42Smrg output_verbose_link_cmd='echo' 60902c393a42Smrg _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' 60912c393a42Smrg _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' 60922c393a42Smrg # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds 60932c393a42Smrg _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}' 60942c393a42Smrg _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}' 60952c393a42Smrg ;; 60962c393a42Smrg *) 60972c393a42Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 60982c393a42Smrg ;; 60992c393a42Smrg esac 61002c393a42Smrg fi 61012c393a42Smrg ;; 61022c393a42Smrg 61032c393a42Smrg dgux*) 61042c393a42Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 61052c393a42Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 61062c393a42Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 61072c393a42Smrg ;; 61082c393a42Smrg 61092c393a42Smrg freebsd1*) 61102c393a42Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 61112c393a42Smrg ;; 61122c393a42Smrg 61132c393a42Smrg # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 61142c393a42Smrg # support. Future versions do this automatically, but an explicit c++rt0.o 61152c393a42Smrg # does not break anything, and helps significantly (at the cost of a little 61162c393a42Smrg # extra space). 61172c393a42Smrg freebsd2.2*) 61182c393a42Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 61192c393a42Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 61202c393a42Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 61212c393a42Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 61222c393a42Smrg ;; 61232c393a42Smrg 61242c393a42Smrg # Unfortunately, older versions of FreeBSD 2 do not have this feature. 61252c393a42Smrg freebsd2*) 61262c393a42Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 61272c393a42Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 61282c393a42Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 61292c393a42Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 61302c393a42Smrg ;; 61312c393a42Smrg 61322c393a42Smrg # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 61332c393a42Smrg freebsd* | dragonfly*) 61342c393a42Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' 61352c393a42Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 61362c393a42Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 61372c393a42Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 61382c393a42Smrg ;; 61392c393a42Smrg 61402c393a42Smrg hpux9*) 61412c393a42Smrg if test "$GCC" = yes; then 61422c393a42Smrg _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' 61432c393a42Smrg else 61442c393a42Smrg _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' 61452c393a42Smrg fi 61462c393a42Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 61472c393a42Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 61482c393a42Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 61492c393a42Smrg 61502c393a42Smrg # hardcode_minus_L: Not really in the search PATH, 61512c393a42Smrg # but as the default location of the library. 61522c393a42Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 61532c393a42Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 61542c393a42Smrg ;; 61552c393a42Smrg 61562c393a42Smrg hpux10*) 61572c393a42Smrg if test "$GCC" = yes -a "$with_gnu_ld" = no; then 61582c393a42Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 61592c393a42Smrg else 61602c393a42Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 61612c393a42Smrg fi 61622c393a42Smrg if test "$with_gnu_ld" = no; then 61632c393a42Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 61642c393a42Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 61652c393a42Smrg 61662c393a42Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 61672c393a42Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 61682c393a42Smrg 61692c393a42Smrg # hardcode_minus_L: Not really in the search PATH, 61702c393a42Smrg # but as the default location of the library. 61712c393a42Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 61722c393a42Smrg fi 61732c393a42Smrg ;; 61742c393a42Smrg 61752c393a42Smrg hpux11*) 61762c393a42Smrg if test "$GCC" = yes -a "$with_gnu_ld" = no; then 61772c393a42Smrg case $host_cpu in 61782c393a42Smrg hppa*64*) 61792c393a42Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 61802c393a42Smrg ;; 61812c393a42Smrg ia64*) 61822c393a42Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 61832c393a42Smrg ;; 61842c393a42Smrg *) 61852c393a42Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 61862c393a42Smrg ;; 61872c393a42Smrg esac 61882c393a42Smrg else 61892c393a42Smrg case $host_cpu in 61902c393a42Smrg hppa*64*) 61912c393a42Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 61922c393a42Smrg ;; 61932c393a42Smrg ia64*) 61942c393a42Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 61952c393a42Smrg ;; 61962c393a42Smrg *) 61972c393a42Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 61982c393a42Smrg ;; 61992c393a42Smrg esac 62002c393a42Smrg fi 62012c393a42Smrg if test "$with_gnu_ld" = no; then 62022c393a42Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 62032c393a42Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 62042c393a42Smrg 62052c393a42Smrg case $host_cpu in 62062c393a42Smrg hppa*64*|ia64*) 62072c393a42Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' 62082c393a42Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 62092c393a42Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 62102c393a42Smrg ;; 62112c393a42Smrg *) 62122c393a42Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 62132c393a42Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 62142c393a42Smrg 62152c393a42Smrg # hardcode_minus_L: Not really in the search PATH, 62162c393a42Smrg # but as the default location of the library. 62172c393a42Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 62182c393a42Smrg ;; 62192c393a42Smrg esac 62202c393a42Smrg fi 62212c393a42Smrg ;; 62222c393a42Smrg 62232c393a42Smrg irix5* | irix6* | nonstopux*) 62242c393a42Smrg if test "$GCC" = yes; then 62252c393a42Smrg _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' 62262c393a42Smrg else 62272c393a42Smrg _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' 62282c393a42Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' 62292c393a42Smrg fi 62302c393a42Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 62312c393a42Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 62322c393a42Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 62332c393a42Smrg ;; 62342c393a42Smrg 62352c393a42Smrg netbsd* | netbsdelf*-gnu) 62362c393a42Smrg if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then 62372c393a42Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 62382c393a42Smrg else 62392c393a42Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 62402c393a42Smrg fi 62412c393a42Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 62422c393a42Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 62432c393a42Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 62442c393a42Smrg ;; 62452c393a42Smrg 62462c393a42Smrg newsos6) 62472c393a42Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 62482c393a42Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 62492c393a42Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 62502c393a42Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 62512c393a42Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 62522c393a42Smrg ;; 62532c393a42Smrg 62542c393a42Smrg openbsd*) 62552c393a42Smrg if test -f /usr/libexec/ld.so; then 62562c393a42Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 62572c393a42Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 62582c393a42Smrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 62592c393a42Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 62602c393a42Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' 62612c393a42Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 62622c393a42Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 62632c393a42Smrg else 62642c393a42Smrg case $host_os in 62652c393a42Smrg openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) 62662c393a42Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 62672c393a42Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 62682c393a42Smrg ;; 62692c393a42Smrg *) 62702c393a42Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 62712c393a42Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 62722c393a42Smrg ;; 62732c393a42Smrg esac 62742c393a42Smrg fi 62752c393a42Smrg else 62762c393a42Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 62772c393a42Smrg fi 62782c393a42Smrg ;; 62792c393a42Smrg 62802c393a42Smrg os2*) 62812c393a42Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 62822c393a42Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 62832c393a42Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 62842c393a42Smrg _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' 62852c393a42Smrg _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' 62862c393a42Smrg ;; 62872c393a42Smrg 62882c393a42Smrg osf3*) 62892c393a42Smrg if test "$GCC" = yes; then 62902c393a42Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 62912c393a42Smrg _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' 62922c393a42Smrg else 62932c393a42Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 62942c393a42Smrg _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' 62952c393a42Smrg fi 62962c393a42Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 62972c393a42Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 62982c393a42Smrg ;; 62992c393a42Smrg 63002c393a42Smrg osf4* | osf5*) # as osf3* with the addition of -msym flag 63012c393a42Smrg if test "$GCC" = yes; then 63022c393a42Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 63032c393a42Smrg _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' 63042c393a42Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 63052c393a42Smrg else 63062c393a42Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 63072c393a42Smrg _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' 63082c393a42Smrg _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~ 63092c393a42Smrg $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' 63102c393a42Smrg 63112c393a42Smrg # Both c and cxx compiler support -rpath directly 63122c393a42Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 63132c393a42Smrg fi 63142c393a42Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 63152c393a42Smrg ;; 63162c393a42Smrg 63172c393a42Smrg solaris*) 63182c393a42Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text' 63192c393a42Smrg if test "$GCC" = yes; then 63202c393a42Smrg wlarc='${wl}' 63212c393a42Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 63222c393a42Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 63232c393a42Smrg $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' 63242c393a42Smrg else 63252c393a42Smrg wlarc='' 63262c393a42Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' 63272c393a42Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 63282c393a42Smrg $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' 63292c393a42Smrg fi 63302c393a42Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 63312c393a42Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 63322c393a42Smrg case $host_os in 63332c393a42Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 63342c393a42Smrg *) 63352c393a42Smrg # The compiler driver will combine and reorder linker options, 63362c393a42Smrg # but understands `-z linker_flag'. GCC discards it without `$wl', 63372c393a42Smrg # but is careful enough not to reorder. 63382c393a42Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 63392c393a42Smrg if test "$GCC" = yes; then 63402c393a42Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 63412c393a42Smrg else 63422c393a42Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 63432c393a42Smrg fi 63442c393a42Smrg ;; 63452c393a42Smrg esac 63462c393a42Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 63472c393a42Smrg ;; 63482c393a42Smrg 63492c393a42Smrg sunos4*) 63502c393a42Smrg if test "x$host_vendor" = xsequent; then 63512c393a42Smrg # Use $CC to link under sequent, because it throws in some extra .o 63522c393a42Smrg # files that make .init and .fini sections work. 63532c393a42Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' 63542c393a42Smrg else 63552c393a42Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 63562c393a42Smrg fi 63572c393a42Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 63582c393a42Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 63592c393a42Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 63602c393a42Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 63612c393a42Smrg ;; 63622c393a42Smrg 63632c393a42Smrg sysv4) 63642c393a42Smrg case $host_vendor in 63652c393a42Smrg sni) 63662c393a42Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 63672c393a42Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 63682c393a42Smrg ;; 63692c393a42Smrg siemens) 63702c393a42Smrg ## LD is ld it makes a PLAMLIB 63712c393a42Smrg ## CC just makes a GrossModule. 63722c393a42Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 63732c393a42Smrg _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 63742c393a42Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 63752c393a42Smrg ;; 63762c393a42Smrg motorola) 63772c393a42Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 63782c393a42Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 63792c393a42Smrg ;; 63802c393a42Smrg esac 63812c393a42Smrg runpath_var='LD_RUN_PATH' 63822c393a42Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 63832c393a42Smrg ;; 63842c393a42Smrg 63852c393a42Smrg sysv4.3*) 63862c393a42Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 63872c393a42Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 63882c393a42Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 63892c393a42Smrg ;; 63902c393a42Smrg 63912c393a42Smrg sysv4*MP*) 63922c393a42Smrg if test -d /usr/nec; then 63932c393a42Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 63942c393a42Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 63952c393a42Smrg runpath_var=LD_RUN_PATH 63962c393a42Smrg hardcode_runpath_var=yes 63972c393a42Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=yes 63982c393a42Smrg fi 63992c393a42Smrg ;; 64002c393a42Smrg 64012c393a42Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 64022c393a42Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 64032c393a42Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 64042c393a42Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 64052c393a42Smrg runpath_var='LD_RUN_PATH' 64062c393a42Smrg 64072c393a42Smrg if test "$GCC" = yes; then 64082c393a42Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 64092c393a42Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 64102c393a42Smrg else 64112c393a42Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 64122c393a42Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 64132c393a42Smrg fi 64142c393a42Smrg ;; 64152c393a42Smrg 64162c393a42Smrg sysv5* | sco3.2v5* | sco5v6*) 64172c393a42Smrg # Note: We can NOT use -z defs as we might desire, because we do not 64182c393a42Smrg # link with -lc, and that would cause any symbols used from libc to 64192c393a42Smrg # always be unresolved, which means just about no library would 64202c393a42Smrg # ever link correctly. If we're not using GNU ld we use -z text 64212c393a42Smrg # though, which does catch some bad symbols but isn't as heavy-handed 64222c393a42Smrg # as -z defs. 64232c393a42Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 64242c393a42Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 64252c393a42Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 64262c393a42Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 64272c393a42Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' 64282c393a42Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' 64292c393a42Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 64302c393a42Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 64312c393a42Smrg runpath_var='LD_RUN_PATH' 64322c393a42Smrg 64332c393a42Smrg if test "$GCC" = yes; then 64342c393a42Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' 64352c393a42Smrg _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' 64362c393a42Smrg else 64372c393a42Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' 64382c393a42Smrg _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' 64392c393a42Smrg fi 64402c393a42Smrg ;; 64412c393a42Smrg 64422c393a42Smrg uts4*) 64432c393a42Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 64442c393a42Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 64452c393a42Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 64462c393a42Smrg ;; 64472c393a42Smrg 64482c393a42Smrg *) 64492c393a42Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 64502c393a42Smrg ;; 64512c393a42Smrg esac 64522c393a42Smrg fi 64532c393a42Smrg]) 64542c393a42SmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) 64552c393a42Smrgtest "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 64562c393a42Smrg 64572c393a42Smrg# 64582c393a42Smrg# Do we need to explicitly link libc? 64592c393a42Smrg# 64602c393a42Smrgcase "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in 64612c393a42Smrgx|xyes) 64622c393a42Smrg # Assume -lc should be added 64632c393a42Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes 64642c393a42Smrg 64652c393a42Smrg if test "$enable_shared" = yes && test "$GCC" = yes; then 64662c393a42Smrg case $_LT_AC_TAGVAR(archive_cmds, $1) in 64672c393a42Smrg *'~'*) 64682c393a42Smrg # FIXME: we may have to deal with multi-command sequences. 64692c393a42Smrg ;; 64702c393a42Smrg '$CC '*) 64712c393a42Smrg # Test whether the compiler implicitly links with -lc since on some 64722c393a42Smrg # systems, -lgcc has to come before -lc. If gcc already passes -lc 64732c393a42Smrg # to ld, don't add -lc before -lgcc. 64742c393a42Smrg AC_MSG_CHECKING([whether -lc should be explicitly linked in]) 64752c393a42Smrg $rm conftest* 64762c393a42Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 64772c393a42Smrg 64782c393a42Smrg if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 64792c393a42Smrg soname=conftest 64802c393a42Smrg lib=conftest 64812c393a42Smrg libobjs=conftest.$ac_objext 64822c393a42Smrg deplibs= 64832c393a42Smrg wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) 64842c393a42Smrg pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) 64852c393a42Smrg compiler_flags=-v 64862c393a42Smrg linker_flags=-v 64872c393a42Smrg verstring= 64882c393a42Smrg output_objdir=. 64892c393a42Smrg libname=conftest 64902c393a42Smrg lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1) 64912c393a42Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)= 64922c393a42Smrg if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 64932c393a42Smrg then 64942c393a42Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 64952c393a42Smrg else 64962c393a42Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes 64972c393a42Smrg fi 64982c393a42Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 64992c393a42Smrg else 65002c393a42Smrg cat conftest.err 1>&5 65012c393a42Smrg fi 65022c393a42Smrg $rm conftest* 65032c393a42Smrg AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)]) 65042c393a42Smrg ;; 65052c393a42Smrg esac 65062c393a42Smrg fi 65072c393a42Smrg ;; 65082c393a42Smrgesac 65092c393a42Smrg])# AC_LIBTOOL_PROG_LD_SHLIBS 65102c393a42Smrg 65112c393a42Smrg 65122c393a42Smrg# _LT_AC_FILE_LTDLL_C 65132c393a42Smrg# ------------------- 65142c393a42Smrg# Be careful that the start marker always follows a newline. 65152c393a42SmrgAC_DEFUN([_LT_AC_FILE_LTDLL_C], [ 65162c393a42Smrg# /* ltdll.c starts here */ 65172c393a42Smrg# #define WIN32_LEAN_AND_MEAN 65182c393a42Smrg# #include <windows.h> 65192c393a42Smrg# #undef WIN32_LEAN_AND_MEAN 65202c393a42Smrg# #include <stdio.h> 65212c393a42Smrg# 65222c393a42Smrg# #ifndef __CYGWIN__ 65232c393a42Smrg# # ifdef __CYGWIN32__ 65242c393a42Smrg# # define __CYGWIN__ __CYGWIN32__ 65252c393a42Smrg# # endif 65262c393a42Smrg# #endif 65272c393a42Smrg# 65282c393a42Smrg# #ifdef __cplusplus 65292c393a42Smrg# extern "C" { 65302c393a42Smrg# #endif 65312c393a42Smrg# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved); 65322c393a42Smrg# #ifdef __cplusplus 65332c393a42Smrg# } 65342c393a42Smrg# #endif 65352c393a42Smrg# 65362c393a42Smrg# #ifdef __CYGWIN__ 65372c393a42Smrg# #include <cygwin/cygwin_dll.h> 65382c393a42Smrg# DECLARE_CYGWIN_DLL( DllMain ); 65392c393a42Smrg# #endif 65402c393a42Smrg# HINSTANCE __hDllInstance_base; 65412c393a42Smrg# 65422c393a42Smrg# BOOL APIENTRY 65432c393a42Smrg# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved) 65442c393a42Smrg# { 65452c393a42Smrg# __hDllInstance_base = hInst; 65462c393a42Smrg# return TRUE; 65472c393a42Smrg# } 65482c393a42Smrg# /* ltdll.c ends here */ 65492c393a42Smrg])# _LT_AC_FILE_LTDLL_C 65502c393a42Smrg 65512c393a42Smrg 65522c393a42Smrg# _LT_AC_TAGVAR(VARNAME, [TAGNAME]) 65532c393a42Smrg# --------------------------------- 65542c393a42SmrgAC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])]) 65552c393a42Smrg 65562c393a42Smrg 65572c393a42Smrg# old names 65582c393a42SmrgAC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL]) 65592c393a42SmrgAC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 65602c393a42SmrgAC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 65612c393a42SmrgAC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 65622c393a42SmrgAC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 65632c393a42SmrgAC_DEFUN([AM_PROG_LD], [AC_PROG_LD]) 65642c393a42SmrgAC_DEFUN([AM_PROG_NM], [AC_PROG_NM]) 65652c393a42Smrg 65662c393a42Smrg# This is just to silence aclocal about the macro not being used 65672c393a42Smrgifelse([AC_DISABLE_FAST_INSTALL]) 65682c393a42Smrg 65692c393a42SmrgAC_DEFUN([LT_AC_PROG_GCJ], 65702c393a42Smrg[AC_CHECK_TOOL(GCJ, gcj, no) 65712c393a42Smrg test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" 65722c393a42Smrg AC_SUBST(GCJFLAGS) 65732c393a42Smrg]) 65742c393a42Smrg 65752c393a42SmrgAC_DEFUN([LT_AC_PROG_RC], 65762c393a42Smrg[AC_CHECK_TOOL(RC, windres, no) 65772c393a42Smrg]) 65782c393a42Smrg 65792c393a42Smrg 65802c393a42Smrg# Cheap backport of AS_EXECUTABLE_P and required macros 65812c393a42Smrg# from Autoconf 2.59; we should not use $as_executable_p directly. 65822c393a42Smrg 65832c393a42Smrg# _AS_TEST_PREPARE 65842c393a42Smrg# ---------------- 65852c393a42Smrgm4_ifndef([_AS_TEST_PREPARE], 65862c393a42Smrg[m4_defun([_AS_TEST_PREPARE], 65872c393a42Smrg[if test -x / >/dev/null 2>&1; then 65882c393a42Smrg as_executable_p='test -x' 65892c393a42Smrgelse 65902c393a42Smrg as_executable_p='test -f' 65912c393a42Smrgfi 65922c393a42Smrg])])# _AS_TEST_PREPARE 65932c393a42Smrg 65942c393a42Smrg# AS_EXECUTABLE_P 65952c393a42Smrg# --------------- 65962c393a42Smrg# Check whether a file is executable. 65972c393a42Smrgm4_ifndef([AS_EXECUTABLE_P], 65982c393a42Smrg[m4_defun([AS_EXECUTABLE_P], 65992c393a42Smrg[AS_REQUIRE([_AS_TEST_PREPARE])dnl 66002c393a42Smrg$as_executable_p $1[]dnl 66012c393a42Smrg])])# AS_EXECUTABLE_P 66022c393a42Smrg 66032c393a42Smrg# NOTE: This macro has been submitted for inclusion into # 66042c393a42Smrg# GNU Autoconf as AC_PROG_SED. When it is available in # 66052c393a42Smrg# a released version of Autoconf we should remove this # 66062c393a42Smrg# macro and use it instead. # 66072c393a42Smrg# LT_AC_PROG_SED 66082c393a42Smrg# -------------- 66092c393a42Smrg# Check for a fully-functional sed program, that truncates 66102c393a42Smrg# as few characters as possible. Prefer GNU sed if found. 66112c393a42SmrgAC_DEFUN([LT_AC_PROG_SED], 66122c393a42Smrg[AC_MSG_CHECKING([for a sed that does not truncate output]) 66132c393a42SmrgAC_CACHE_VAL(lt_cv_path_SED, 66142c393a42Smrg[# Loop through the user's path and test for sed and gsed. 66152c393a42Smrg# Then use that list of sed's as ones to test for truncation. 66162c393a42Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 66172c393a42Smrgfor as_dir in $PATH 66182c393a42Smrgdo 66192c393a42Smrg IFS=$as_save_IFS 66202c393a42Smrg test -z "$as_dir" && as_dir=. 66212c393a42Smrg for lt_ac_prog in sed gsed; do 66222c393a42Smrg for ac_exec_ext in '' $ac_executable_extensions; do 66232c393a42Smrg if AS_EXECUTABLE_P(["$as_dir/$lt_ac_prog$ac_exec_ext"]); then 66242c393a42Smrg lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 66252c393a42Smrg fi 66262c393a42Smrg done 66272c393a42Smrg done 66282c393a42Smrgdone 66292c393a42SmrgIFS=$as_save_IFS 66302c393a42Smrglt_ac_max=0 66312c393a42Smrglt_ac_count=0 66322c393a42Smrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris 66332c393a42Smrg# along with /bin/sed that truncates output. 66342c393a42Smrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 66352c393a42Smrg test ! -f $lt_ac_sed && continue 66362c393a42Smrg cat /dev/null > conftest.in 66372c393a42Smrg lt_ac_count=0 66382c393a42Smrg echo $ECHO_N "0123456789$ECHO_C" >conftest.in 66392c393a42Smrg # Check for GNU sed and select it if it is found. 66402c393a42Smrg if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 66412c393a42Smrg lt_cv_path_SED=$lt_ac_sed 66422c393a42Smrg break 66432c393a42Smrg fi 66442c393a42Smrg while true; do 66452c393a42Smrg cat conftest.in conftest.in >conftest.tmp 66462c393a42Smrg mv conftest.tmp conftest.in 66472c393a42Smrg cp conftest.in conftest.nl 66482c393a42Smrg echo >>conftest.nl 66492c393a42Smrg $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 66502c393a42Smrg cmp -s conftest.out conftest.nl || break 66512c393a42Smrg # 10000 chars as input seems more than enough 66522c393a42Smrg test $lt_ac_count -gt 10 && break 66532c393a42Smrg lt_ac_count=`expr $lt_ac_count + 1` 66542c393a42Smrg if test $lt_ac_count -gt $lt_ac_max; then 66552c393a42Smrg lt_ac_max=$lt_ac_count 66562c393a42Smrg lt_cv_path_SED=$lt_ac_sed 66572c393a42Smrg fi 66582c393a42Smrg done 66592c393a42Smrgdone 66602c393a42Smrg]) 66612c393a42SmrgSED=$lt_cv_path_SED 66622c393a42SmrgAC_SUBST([SED]) 66632c393a42SmrgAC_MSG_RESULT([$SED]) 66642c393a42Smrg]) 66652c393a42Smrg 66662c393a42Smrg# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 66672c393a42Smrg# 66682c393a42Smrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 66692c393a42Smrg# 66702c393a42Smrg# This program is free software; you can redistribute it and/or modify 66712c393a42Smrg# it under the terms of the GNU General Public License as published by 66722c393a42Smrg# the Free Software Foundation; either version 2 of the License, or 66732c393a42Smrg# (at your option) any later version. 66742c393a42Smrg# 66752c393a42Smrg# This program is distributed in the hope that it will be useful, but 66762c393a42Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 66772c393a42Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 66782c393a42Smrg# General Public License for more details. 66792c393a42Smrg# 66802c393a42Smrg# You should have received a copy of the GNU General Public License 66812c393a42Smrg# along with this program; if not, write to the Free Software 66822c393a42Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 66832c393a42Smrg# 66842c393a42Smrg# As a special exception to the GNU General Public License, if you 66852c393a42Smrg# distribute this file as part of a program that contains a 66862c393a42Smrg# configuration script generated by Autoconf, you may include it under 66872c393a42Smrg# the same distribution terms that you use for the rest of that program. 66882c393a42Smrg 66892c393a42Smrg# PKG_PROG_PKG_CONFIG([MIN-VERSION]) 66902c393a42Smrg# ---------------------------------- 66912c393a42SmrgAC_DEFUN([PKG_PROG_PKG_CONFIG], 66922c393a42Smrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 66932c393a42Smrgm4_pattern_allow([^PKG_CONFIG(_PATH)?$]) 66942c393a42SmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl 66952c393a42Smrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 66962c393a42Smrg AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 66972c393a42Smrgfi 66982c393a42Smrgif test -n "$PKG_CONFIG"; then 66992c393a42Smrg _pkg_min_version=m4_default([$1], [0.9.0]) 67002c393a42Smrg AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 67012c393a42Smrg if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 67022c393a42Smrg AC_MSG_RESULT([yes]) 67032c393a42Smrg else 67042c393a42Smrg AC_MSG_RESULT([no]) 67052c393a42Smrg PKG_CONFIG="" 67062c393a42Smrg fi 67072c393a42Smrg 67082c393a42Smrgfi[]dnl 67092c393a42Smrg])# PKG_PROG_PKG_CONFIG 67102c393a42Smrg 67112c393a42Smrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 67122c393a42Smrg# 67132c393a42Smrg# Check to see whether a particular set of modules exists. Similar 67142c393a42Smrg# to PKG_CHECK_MODULES(), but does not set variables or print errors. 67152c393a42Smrg# 67162c393a42Smrg# 67172c393a42Smrg# Similar to PKG_CHECK_MODULES, make sure that the first instance of 67182c393a42Smrg# this or PKG_CHECK_MODULES is called, or make sure to call 67192c393a42Smrg# PKG_CHECK_EXISTS manually 67202c393a42Smrg# -------------------------------------------------------------- 67212c393a42SmrgAC_DEFUN([PKG_CHECK_EXISTS], 67222c393a42Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 67232c393a42Smrgif test -n "$PKG_CONFIG" && \ 67242c393a42Smrg AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 67252c393a42Smrg m4_ifval([$2], [$2], [:]) 67262c393a42Smrgm4_ifvaln([$3], [else 67272c393a42Smrg $3])dnl 67282c393a42Smrgfi]) 67292c393a42Smrg 67302c393a42Smrg 67312c393a42Smrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 67322c393a42Smrg# --------------------------------------------- 67332c393a42Smrgm4_define([_PKG_CONFIG], 67342c393a42Smrg[if test -n "$PKG_CONFIG"; then 67352c393a42Smrg if test -n "$$1"; then 67362c393a42Smrg pkg_cv_[]$1="$$1" 67372c393a42Smrg else 67382c393a42Smrg PKG_CHECK_EXISTS([$3], 67392c393a42Smrg [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], 67402c393a42Smrg [pkg_failed=yes]) 67412c393a42Smrg fi 67422c393a42Smrgelse 67432c393a42Smrg pkg_failed=untried 67442c393a42Smrgfi[]dnl 67452c393a42Smrg])# _PKG_CONFIG 67462c393a42Smrg 67472c393a42Smrg# _PKG_SHORT_ERRORS_SUPPORTED 67482c393a42Smrg# ----------------------------- 67492c393a42SmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 67502c393a42Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 67512c393a42Smrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 67522c393a42Smrg _pkg_short_errors_supported=yes 67532c393a42Smrgelse 67542c393a42Smrg _pkg_short_errors_supported=no 67552c393a42Smrgfi[]dnl 67562c393a42Smrg])# _PKG_SHORT_ERRORS_SUPPORTED 67572c393a42Smrg 67582c393a42Smrg 67592c393a42Smrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 67602c393a42Smrg# [ACTION-IF-NOT-FOUND]) 67612c393a42Smrg# 67622c393a42Smrg# 67632c393a42Smrg# Note that if there is a possibility the first call to 67642c393a42Smrg# PKG_CHECK_MODULES might not happen, you should be sure to include an 67652c393a42Smrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 67662c393a42Smrg# 67672c393a42Smrg# 67682c393a42Smrg# -------------------------------------------------------------- 67692c393a42SmrgAC_DEFUN([PKG_CHECK_MODULES], 67702c393a42Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 67712c393a42SmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 67722c393a42SmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 67732c393a42Smrg 67742c393a42Smrgpkg_failed=no 67752c393a42SmrgAC_MSG_CHECKING([for $1]) 67762c393a42Smrg 67772c393a42Smrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 67782c393a42Smrg_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 67792c393a42Smrg 67802c393a42Smrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 67812c393a42Smrgand $1[]_LIBS to avoid the need to call pkg-config. 67822c393a42SmrgSee the pkg-config man page for more details.]) 67832c393a42Smrg 67842c393a42Smrgif test $pkg_failed = yes; then 67852c393a42Smrg _PKG_SHORT_ERRORS_SUPPORTED 67862c393a42Smrg if test $_pkg_short_errors_supported = yes; then 67872c393a42Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"` 67882c393a42Smrg else 67892c393a42Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` 67902c393a42Smrg fi 67912c393a42Smrg # Put the nasty error message in config.log where it belongs 67922c393a42Smrg echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 67932c393a42Smrg 67942c393a42Smrg ifelse([$4], , [AC_MSG_ERROR(dnl 67952c393a42Smrg[Package requirements ($2) were not met: 67962c393a42Smrg 67972c393a42Smrg$$1_PKG_ERRORS 67982c393a42Smrg 67992c393a42SmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you 68002c393a42Smrginstalled software in a non-standard prefix. 68012c393a42Smrg 68022c393a42Smrg_PKG_TEXT 68032c393a42Smrg])], 68042c393a42Smrg [AC_MSG_RESULT([no]) 68052c393a42Smrg $4]) 68062c393a42Smrgelif test $pkg_failed = untried; then 68072c393a42Smrg ifelse([$4], , [AC_MSG_FAILURE(dnl 68082c393a42Smrg[The pkg-config script could not be found or is too old. Make sure it 68092c393a42Smrgis in your PATH or set the PKG_CONFIG environment variable to the full 68102c393a42Smrgpath to pkg-config. 68112c393a42Smrg 68122c393a42Smrg_PKG_TEXT 68132c393a42Smrg 68142c393a42SmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.])], 68152c393a42Smrg [$4]) 68162c393a42Smrgelse 68172c393a42Smrg $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 68182c393a42Smrg $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 68192c393a42Smrg AC_MSG_RESULT([yes]) 68202c393a42Smrg ifelse([$3], , :, [$3]) 68212c393a42Smrgfi[]dnl 68222c393a42Smrg])# PKG_CHECK_MODULES 68232c393a42Smrg 68242c393a42Smrg# Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc. 68252c393a42Smrg# 68262c393a42Smrg# This file is free software; the Free Software Foundation 68272c393a42Smrg# gives unlimited permission to copy and/or distribute it, 68282c393a42Smrg# with or without modifications, as long as this notice is preserved. 68292c393a42Smrg 68302c393a42Smrg# AM_AUTOMAKE_VERSION(VERSION) 68312c393a42Smrg# ---------------------------- 68322c393a42Smrg# Automake X.Y traces this macro to ensure aclocal.m4 has been 68332c393a42Smrg# generated from the m4 files accompanying Automake X.Y. 68342c393a42SmrgAC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"]) 68352c393a42Smrg 68362c393a42Smrg# AM_SET_CURRENT_AUTOMAKE_VERSION 68372c393a42Smrg# ------------------------------- 68382c393a42Smrg# Call AM_AUTOMAKE_VERSION so it can be traced. 68392c393a42Smrg# This function is AC_REQUIREd by AC_INIT_AUTOMAKE. 68402c393a42SmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 68412c393a42Smrg [AM_AUTOMAKE_VERSION([1.9.6])]) 68422c393a42Smrg 68432c393a42Smrg# AM_AUX_DIR_EXPAND -*- Autoconf -*- 68442c393a42Smrg 68452c393a42Smrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 68462c393a42Smrg# 68472c393a42Smrg# This file is free software; the Free Software Foundation 68482c393a42Smrg# gives unlimited permission to copy and/or distribute it, 68492c393a42Smrg# with or without modifications, as long as this notice is preserved. 68502c393a42Smrg 68512c393a42Smrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 68522c393a42Smrg# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to 68532c393a42Smrg# `$srcdir', `$srcdir/..', or `$srcdir/../..'. 68542c393a42Smrg# 68552c393a42Smrg# Of course, Automake must honor this variable whenever it calls a 68562c393a42Smrg# tool from the auxiliary directory. The problem is that $srcdir (and 68572c393a42Smrg# therefore $ac_aux_dir as well) can be either absolute or relative, 68582c393a42Smrg# depending on how configure is run. This is pretty annoying, since 68592c393a42Smrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top 68602c393a42Smrg# source directory, any form will work fine, but in subdirectories a 68612c393a42Smrg# relative path needs to be adjusted first. 68622c393a42Smrg# 68632c393a42Smrg# $ac_aux_dir/missing 68642c393a42Smrg# fails when called from a subdirectory if $ac_aux_dir is relative 68652c393a42Smrg# $top_srcdir/$ac_aux_dir/missing 68662c393a42Smrg# fails if $ac_aux_dir is absolute, 68672c393a42Smrg# fails when called from a subdirectory in a VPATH build with 68682c393a42Smrg# a relative $ac_aux_dir 68692c393a42Smrg# 68702c393a42Smrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 68712c393a42Smrg# are both prefixed by $srcdir. In an in-source build this is usually 68722c393a42Smrg# harmless because $srcdir is `.', but things will broke when you 68732c393a42Smrg# start a VPATH build or use an absolute $srcdir. 68742c393a42Smrg# 68752c393a42Smrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 68762c393a42Smrg# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 68772c393a42Smrg# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 68782c393a42Smrg# and then we would define $MISSING as 68792c393a42Smrg# MISSING="\${SHELL} $am_aux_dir/missing" 68802c393a42Smrg# This will work as long as MISSING is not called from configure, because 68812c393a42Smrg# unfortunately $(top_srcdir) has no meaning in configure. 68822c393a42Smrg# However there are other variables, like CC, which are often used in 68832c393a42Smrg# configure, and could therefore not use this "fixed" $ac_aux_dir. 68842c393a42Smrg# 68852c393a42Smrg# Another solution, used here, is to always expand $ac_aux_dir to an 68862c393a42Smrg# absolute PATH. The drawback is that using absolute paths prevent a 68872c393a42Smrg# configured tree to be moved without reconfiguration. 68882c393a42Smrg 68892c393a42SmrgAC_DEFUN([AM_AUX_DIR_EXPAND], 68902c393a42Smrg[dnl Rely on autoconf to set up CDPATH properly. 68912c393a42SmrgAC_PREREQ([2.50])dnl 68922c393a42Smrg# expand $ac_aux_dir to an absolute path 68932c393a42Smrgam_aux_dir=`cd $ac_aux_dir && pwd` 68942c393a42Smrg]) 68952c393a42Smrg 68962c393a42Smrg# AM_CONDITIONAL -*- Autoconf -*- 68972c393a42Smrg 68982c393a42Smrg# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005 68992c393a42Smrg# Free Software Foundation, Inc. 69002c393a42Smrg# 69012c393a42Smrg# This file is free software; the Free Software Foundation 69022c393a42Smrg# gives unlimited permission to copy and/or distribute it, 69032c393a42Smrg# with or without modifications, as long as this notice is preserved. 69042c393a42Smrg 69052c393a42Smrg# serial 7 69062c393a42Smrg 69072c393a42Smrg# AM_CONDITIONAL(NAME, SHELL-CONDITION) 69082c393a42Smrg# ------------------------------------- 69092c393a42Smrg# Define a conditional. 69102c393a42SmrgAC_DEFUN([AM_CONDITIONAL], 69112c393a42Smrg[AC_PREREQ(2.52)dnl 69122c393a42Smrg ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 69132c393a42Smrg [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 69142c393a42SmrgAC_SUBST([$1_TRUE]) 69152c393a42SmrgAC_SUBST([$1_FALSE]) 69162c393a42Smrgif $2; then 69172c393a42Smrg $1_TRUE= 69182c393a42Smrg $1_FALSE='#' 69192c393a42Smrgelse 69202c393a42Smrg $1_TRUE='#' 69212c393a42Smrg $1_FALSE= 69222c393a42Smrgfi 69232c393a42SmrgAC_CONFIG_COMMANDS_PRE( 69242c393a42Smrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 69252c393a42Smrg AC_MSG_ERROR([[conditional "$1" was never defined. 69262c393a42SmrgUsually this means the macro was only invoked conditionally.]]) 69272c393a42Smrgfi])]) 69282c393a42Smrg 69292c393a42Smrg 69302c393a42Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 69312c393a42Smrg# Free Software Foundation, Inc. 69322c393a42Smrg# 69332c393a42Smrg# This file is free software; the Free Software Foundation 69342c393a42Smrg# gives unlimited permission to copy and/or distribute it, 69352c393a42Smrg# with or without modifications, as long as this notice is preserved. 69362c393a42Smrg 69372c393a42Smrg# serial 8 69382c393a42Smrg 69392c393a42Smrg# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be 69402c393a42Smrg# written in clear, in which case automake, when reading aclocal.m4, 69412c393a42Smrg# will think it sees a *use*, and therefore will trigger all it's 69422c393a42Smrg# C support machinery. Also note that it means that autoscan, seeing 69432c393a42Smrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 69442c393a42Smrg 69452c393a42Smrg 69462c393a42Smrg# _AM_DEPENDENCIES(NAME) 69472c393a42Smrg# ---------------------- 69482c393a42Smrg# See how the compiler implements dependency checking. 69492c393a42Smrg# NAME is "CC", "CXX", "GCJ", or "OBJC". 69502c393a42Smrg# We try a few techniques and use that to set a single cache variable. 69512c393a42Smrg# 69522c393a42Smrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 69532c393a42Smrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 69542c393a42Smrg# dependency, and given that the user is not expected to run this macro, 69552c393a42Smrg# just rely on AC_PROG_CC. 69562c393a42SmrgAC_DEFUN([_AM_DEPENDENCIES], 69572c393a42Smrg[AC_REQUIRE([AM_SET_DEPDIR])dnl 69582c393a42SmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 69592c393a42SmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl 69602c393a42SmrgAC_REQUIRE([AM_DEP_TRACK])dnl 69612c393a42Smrg 69622c393a42Smrgifelse([$1], CC, [depcc="$CC" am_compiler_list=], 69632c393a42Smrg [$1], CXX, [depcc="$CXX" am_compiler_list=], 69642c393a42Smrg [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 69652c393a42Smrg [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 69662c393a42Smrg [depcc="$$1" am_compiler_list=]) 69672c393a42Smrg 69682c393a42SmrgAC_CACHE_CHECK([dependency style of $depcc], 69692c393a42Smrg [am_cv_$1_dependencies_compiler_type], 69702c393a42Smrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 69712c393a42Smrg # We make a subdir and do the tests there. Otherwise we can end up 69722c393a42Smrg # making bogus files that we don't know about and never remove. For 69732c393a42Smrg # instance it was reported that on HP-UX the gcc test will end up 69742c393a42Smrg # making a dummy file named `D' -- because `-MD' means `put the output 69752c393a42Smrg # in D'. 69762c393a42Smrg mkdir conftest.dir 69772c393a42Smrg # Copy depcomp to subdir because otherwise we won't find it if we're 69782c393a42Smrg # using a relative directory. 69792c393a42Smrg cp "$am_depcomp" conftest.dir 69802c393a42Smrg cd conftest.dir 69812c393a42Smrg # We will build objects and dependencies in a subdirectory because 69822c393a42Smrg # it helps to detect inapplicable dependency modes. For instance 69832c393a42Smrg # both Tru64's cc and ICC support -MD to output dependencies as a 69842c393a42Smrg # side effect of compilation, but ICC will put the dependencies in 69852c393a42Smrg # the current directory while Tru64 will put them in the object 69862c393a42Smrg # directory. 69872c393a42Smrg mkdir sub 69882c393a42Smrg 69892c393a42Smrg am_cv_$1_dependencies_compiler_type=none 69902c393a42Smrg if test "$am_compiler_list" = ""; then 69912c393a42Smrg am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 69922c393a42Smrg fi 69932c393a42Smrg for depmode in $am_compiler_list; do 69942c393a42Smrg # Setup a source with many dependencies, because some compilers 69952c393a42Smrg # like to wrap large dependency lists on column 80 (with \), and 69962c393a42Smrg # we should not choose a depcomp mode which is confused by this. 69972c393a42Smrg # 69982c393a42Smrg # We need to recreate these files for each test, as the compiler may 69992c393a42Smrg # overwrite some of them when testing with obscure command lines. 70002c393a42Smrg # This happens at least with the AIX C compiler. 70012c393a42Smrg : > sub/conftest.c 70022c393a42Smrg for i in 1 2 3 4 5 6; do 70032c393a42Smrg echo '#include "conftst'$i'.h"' >> sub/conftest.c 70042c393a42Smrg # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with 70052c393a42Smrg # Solaris 8's {/usr,}/bin/sh. 70062c393a42Smrg touch sub/conftst$i.h 70072c393a42Smrg done 70082c393a42Smrg echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 70092c393a42Smrg 70102c393a42Smrg case $depmode in 70112c393a42Smrg nosideeffect) 70122c393a42Smrg # after this tag, mechanisms are not by side-effect, so they'll 70132c393a42Smrg # only be used when explicitly requested 70142c393a42Smrg if test "x$enable_dependency_tracking" = xyes; then 70152c393a42Smrg continue 70162c393a42Smrg else 70172c393a42Smrg break 70182c393a42Smrg fi 70192c393a42Smrg ;; 70202c393a42Smrg none) break ;; 70212c393a42Smrg esac 70222c393a42Smrg # We check with `-c' and `-o' for the sake of the "dashmstdout" 70232c393a42Smrg # mode. It turns out that the SunPro C++ compiler does not properly 70242c393a42Smrg # handle `-M -o', and we need to detect this. 70252c393a42Smrg if depmode=$depmode \ 70262c393a42Smrg source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ 70272c393a42Smrg depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 70282c393a42Smrg $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ 70292c393a42Smrg >/dev/null 2>conftest.err && 70302c393a42Smrg grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 70312c393a42Smrg grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && 70322c393a42Smrg ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 70332c393a42Smrg # icc doesn't choke on unknown options, it will just issue warnings 70342c393a42Smrg # or remarks (even with -Werror). So we grep stderr for any message 70352c393a42Smrg # that says an option was ignored or not supported. 70362c393a42Smrg # When given -MP, icc 7.0 and 7.1 complain thusly: 70372c393a42Smrg # icc: Command line warning: ignoring option '-M'; no argument required 70382c393a42Smrg # The diagnosis changed in icc 8.0: 70392c393a42Smrg # icc: Command line remark: option '-MP' not supported 70402c393a42Smrg if (grep 'ignoring option' conftest.err || 70412c393a42Smrg grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 70422c393a42Smrg am_cv_$1_dependencies_compiler_type=$depmode 70432c393a42Smrg break 70442c393a42Smrg fi 70452c393a42Smrg fi 70462c393a42Smrg done 70472c393a42Smrg 70482c393a42Smrg cd .. 70492c393a42Smrg rm -rf conftest.dir 70502c393a42Smrgelse 70512c393a42Smrg am_cv_$1_dependencies_compiler_type=none 70522c393a42Smrgfi 70532c393a42Smrg]) 70542c393a42SmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 70552c393a42SmrgAM_CONDITIONAL([am__fastdep$1], [ 70562c393a42Smrg test "x$enable_dependency_tracking" != xno \ 70572c393a42Smrg && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 70582c393a42Smrg]) 70592c393a42Smrg 70602c393a42Smrg 70612c393a42Smrg# AM_SET_DEPDIR 70622c393a42Smrg# ------------- 70632c393a42Smrg# Choose a directory name for dependency files. 70642c393a42Smrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES 70652c393a42SmrgAC_DEFUN([AM_SET_DEPDIR], 70662c393a42Smrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 70672c393a42SmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 70682c393a42Smrg]) 70692c393a42Smrg 70702c393a42Smrg 70712c393a42Smrg# AM_DEP_TRACK 70722c393a42Smrg# ------------ 70732c393a42SmrgAC_DEFUN([AM_DEP_TRACK], 70742c393a42Smrg[AC_ARG_ENABLE(dependency-tracking, 70752c393a42Smrg[ --disable-dependency-tracking speeds up one-time build 70762c393a42Smrg --enable-dependency-tracking do not reject slow dependency extractors]) 70772c393a42Smrgif test "x$enable_dependency_tracking" != xno; then 70782c393a42Smrg am_depcomp="$ac_aux_dir/depcomp" 70792c393a42Smrg AMDEPBACKSLASH='\' 70802c393a42Smrgfi 70812c393a42SmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 70822c393a42SmrgAC_SUBST([AMDEPBACKSLASH]) 70832c393a42Smrg]) 70842c393a42Smrg 70852c393a42Smrg# Generate code to set up dependency tracking. -*- Autoconf -*- 70862c393a42Smrg 70872c393a42Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 70882c393a42Smrg# Free Software Foundation, Inc. 70892c393a42Smrg# 70902c393a42Smrg# This file is free software; the Free Software Foundation 70912c393a42Smrg# gives unlimited permission to copy and/or distribute it, 70922c393a42Smrg# with or without modifications, as long as this notice is preserved. 70932c393a42Smrg 70942c393a42Smrg#serial 3 70952c393a42Smrg 70962c393a42Smrg# _AM_OUTPUT_DEPENDENCY_COMMANDS 70972c393a42Smrg# ------------------------------ 70982c393a42SmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 70992c393a42Smrg[for mf in $CONFIG_FILES; do 71002c393a42Smrg # Strip MF so we end up with the name of the file. 71012c393a42Smrg mf=`echo "$mf" | sed -e 's/:.*$//'` 71022c393a42Smrg # Check whether this is an Automake generated Makefile or not. 71032c393a42Smrg # We used to match only the files named `Makefile.in', but 71042c393a42Smrg # some people rename them; so instead we look at the file content. 71052c393a42Smrg # Grep'ing the first line is not enough: some people post-process 71062c393a42Smrg # each Makefile.in and add a new line on top of each file to say so. 71072c393a42Smrg # So let's grep whole file. 71082c393a42Smrg if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then 71092c393a42Smrg dirpart=`AS_DIRNAME("$mf")` 71102c393a42Smrg else 71112c393a42Smrg continue 71122c393a42Smrg fi 71132c393a42Smrg # Extract the definition of DEPDIR, am__include, and am__quote 71142c393a42Smrg # from the Makefile without running `make'. 71152c393a42Smrg DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` 71162c393a42Smrg test -z "$DEPDIR" && continue 71172c393a42Smrg am__include=`sed -n 's/^am__include = //p' < "$mf"` 71182c393a42Smrg test -z "am__include" && continue 71192c393a42Smrg am__quote=`sed -n 's/^am__quote = //p' < "$mf"` 71202c393a42Smrg # When using ansi2knr, U may be empty or an underscore; expand it 71212c393a42Smrg U=`sed -n 's/^U = //p' < "$mf"` 71222c393a42Smrg # Find all dependency output files, they are included files with 71232c393a42Smrg # $(DEPDIR) in their names. We invoke sed twice because it is the 71242c393a42Smrg # simplest approach to changing $(DEPDIR) to its actual value in the 71252c393a42Smrg # expansion. 71262c393a42Smrg for file in `sed -n " 71272c393a42Smrg s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ 71282c393a42Smrg sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do 71292c393a42Smrg # Make sure the directory exists. 71302c393a42Smrg test -f "$dirpart/$file" && continue 71312c393a42Smrg fdir=`AS_DIRNAME(["$file"])` 71322c393a42Smrg AS_MKDIR_P([$dirpart/$fdir]) 71332c393a42Smrg # echo "creating $dirpart/$file" 71342c393a42Smrg echo '# dummy' > "$dirpart/$file" 71352c393a42Smrg done 71362c393a42Smrgdone 71372c393a42Smrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS 71382c393a42Smrg 71392c393a42Smrg 71402c393a42Smrg# AM_OUTPUT_DEPENDENCY_COMMANDS 71412c393a42Smrg# ----------------------------- 71422c393a42Smrg# This macro should only be invoked once -- use via AC_REQUIRE. 71432c393a42Smrg# 71442c393a42Smrg# This code is only required when automatic dependency tracking 71452c393a42Smrg# is enabled. FIXME. This creates each `.P' file that we will 71462c393a42Smrg# need in order to bootstrap the dependency handling code. 71472c393a42SmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 71482c393a42Smrg[AC_CONFIG_COMMANDS([depfiles], 71492c393a42Smrg [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 71502c393a42Smrg [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 71512c393a42Smrg]) 71522c393a42Smrg 71532c393a42Smrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 71542c393a42Smrg# Free Software Foundation, Inc. 71552c393a42Smrg# 71562c393a42Smrg# This file is free software; the Free Software Foundation 71572c393a42Smrg# gives unlimited permission to copy and/or distribute it, 71582c393a42Smrg# with or without modifications, as long as this notice is preserved. 71592c393a42Smrg 71602c393a42Smrg# serial 8 71612c393a42Smrg 71622c393a42Smrg# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. 71632c393a42SmrgAU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) 71642c393a42Smrg 71652c393a42Smrg# Do all the work for Automake. -*- Autoconf -*- 71662c393a42Smrg 71672c393a42Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 71682c393a42Smrg# Free Software Foundation, Inc. 71692c393a42Smrg# 71702c393a42Smrg# This file is free software; the Free Software Foundation 71712c393a42Smrg# gives unlimited permission to copy and/or distribute it, 71722c393a42Smrg# with or without modifications, as long as this notice is preserved. 71732c393a42Smrg 71742c393a42Smrg# serial 12 71752c393a42Smrg 71762c393a42Smrg# This macro actually does too much. Some checks are only needed if 71772c393a42Smrg# your package does certain things. But this isn't really a big deal. 71782c393a42Smrg 71792c393a42Smrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 71802c393a42Smrg# AM_INIT_AUTOMAKE([OPTIONS]) 71812c393a42Smrg# ----------------------------------------------- 71822c393a42Smrg# The call with PACKAGE and VERSION arguments is the old style 71832c393a42Smrg# call (pre autoconf-2.50), which is being phased out. PACKAGE 71842c393a42Smrg# and VERSION should now be passed to AC_INIT and removed from 71852c393a42Smrg# the call to AM_INIT_AUTOMAKE. 71862c393a42Smrg# We support both call styles for the transition. After 71872c393a42Smrg# the next Automake release, Autoconf can make the AC_INIT 71882c393a42Smrg# arguments mandatory, and then we can depend on a new Autoconf 71892c393a42Smrg# release and drop the old call support. 71902c393a42SmrgAC_DEFUN([AM_INIT_AUTOMAKE], 71912c393a42Smrg[AC_PREREQ([2.58])dnl 71922c393a42Smrgdnl Autoconf wants to disallow AM_ names. We explicitly allow 71932c393a42Smrgdnl the ones we care about. 71942c393a42Smrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 71952c393a42SmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 71962c393a42SmrgAC_REQUIRE([AC_PROG_INSTALL])dnl 71972c393a42Smrg# test to see if srcdir already configured 71982c393a42Smrgif test "`cd $srcdir && pwd`" != "`pwd`" && 71992c393a42Smrg test -f $srcdir/config.status; then 72002c393a42Smrg AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 72012c393a42Smrgfi 72022c393a42Smrg 72032c393a42Smrg# test whether we have cygpath 72042c393a42Smrgif test -z "$CYGPATH_W"; then 72052c393a42Smrg if (cygpath --version) >/dev/null 2>/dev/null; then 72062c393a42Smrg CYGPATH_W='cygpath -w' 72072c393a42Smrg else 72082c393a42Smrg CYGPATH_W=echo 72092c393a42Smrg fi 72102c393a42Smrgfi 72112c393a42SmrgAC_SUBST([CYGPATH_W]) 72122c393a42Smrg 72132c393a42Smrg# Define the identity of the package. 72142c393a42Smrgdnl Distinguish between old-style and new-style calls. 72152c393a42Smrgm4_ifval([$2], 72162c393a42Smrg[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 72172c393a42Smrg AC_SUBST([PACKAGE], [$1])dnl 72182c393a42Smrg AC_SUBST([VERSION], [$2])], 72192c393a42Smrg[_AM_SET_OPTIONS([$1])dnl 72202c393a42Smrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 72212c393a42Smrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 72222c393a42Smrg 72232c393a42Smrg_AM_IF_OPTION([no-define],, 72242c393a42Smrg[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) 72252c393a42Smrg AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl 72262c393a42Smrg 72272c393a42Smrg# Some tools Automake needs. 72282c393a42SmrgAC_REQUIRE([AM_SANITY_CHECK])dnl 72292c393a42SmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl 72302c393a42SmrgAM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) 72312c393a42SmrgAM_MISSING_PROG(AUTOCONF, autoconf) 72322c393a42SmrgAM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) 72332c393a42SmrgAM_MISSING_PROG(AUTOHEADER, autoheader) 72342c393a42SmrgAM_MISSING_PROG(MAKEINFO, makeinfo) 72352c393a42SmrgAM_PROG_INSTALL_SH 72362c393a42SmrgAM_PROG_INSTALL_STRIP 72372c393a42SmrgAC_REQUIRE([AM_PROG_MKDIR_P])dnl 72382c393a42Smrg# We need awk for the "check" target. The system "awk" is bad on 72392c393a42Smrg# some platforms. 72402c393a42SmrgAC_REQUIRE([AC_PROG_AWK])dnl 72412c393a42SmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl 72422c393a42SmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl 72432c393a42Smrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 72442c393a42Smrg [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 72452c393a42Smrg [_AM_PROG_TAR([v7])])]) 72462c393a42Smrg_AM_IF_OPTION([no-dependencies],, 72472c393a42Smrg[AC_PROVIDE_IFELSE([AC_PROG_CC], 72482c393a42Smrg [_AM_DEPENDENCIES(CC)], 72492c393a42Smrg [define([AC_PROG_CC], 72502c393a42Smrg defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl 72512c393a42SmrgAC_PROVIDE_IFELSE([AC_PROG_CXX], 72522c393a42Smrg [_AM_DEPENDENCIES(CXX)], 72532c393a42Smrg [define([AC_PROG_CXX], 72542c393a42Smrg defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl 72552c393a42Smrg]) 72562c393a42Smrg]) 72572c393a42Smrg 72582c393a42Smrg 72592c393a42Smrg# When config.status generates a header, we must update the stamp-h file. 72602c393a42Smrg# This file resides in the same directory as the config header 72612c393a42Smrg# that is generated. The stamp files are numbered to have different names. 72622c393a42Smrg 72632c393a42Smrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 72642c393a42Smrg# loop where config.status creates the headers, so we can generate 72652c393a42Smrg# our stamp files there. 72662c393a42SmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 72672c393a42Smrg[# Compute $1's index in $config_headers. 72682c393a42Smrg_am_stamp_count=1 72692c393a42Smrgfor _am_header in $config_headers :; do 72702c393a42Smrg case $_am_header in 72712c393a42Smrg $1 | $1:* ) 72722c393a42Smrg break ;; 72732c393a42Smrg * ) 72742c393a42Smrg _am_stamp_count=`expr $_am_stamp_count + 1` ;; 72752c393a42Smrg esac 72762c393a42Smrgdone 72772c393a42Smrgecho "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) 72782c393a42Smrg 72792c393a42Smrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 72802c393a42Smrg# 72812c393a42Smrg# This file is free software; the Free Software Foundation 72822c393a42Smrg# gives unlimited permission to copy and/or distribute it, 72832c393a42Smrg# with or without modifications, as long as this notice is preserved. 72842c393a42Smrg 72852c393a42Smrg# AM_PROG_INSTALL_SH 72862c393a42Smrg# ------------------ 72872c393a42Smrg# Define $install_sh. 72882c393a42SmrgAC_DEFUN([AM_PROG_INSTALL_SH], 72892c393a42Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 72902c393a42Smrginstall_sh=${install_sh-"$am_aux_dir/install-sh"} 72912c393a42SmrgAC_SUBST(install_sh)]) 72922c393a42Smrg 72932c393a42Smrg# Copyright (C) 2003, 2005 Free Software Foundation, Inc. 72942c393a42Smrg# 72952c393a42Smrg# This file is free software; the Free Software Foundation 72962c393a42Smrg# gives unlimited permission to copy and/or distribute it, 72972c393a42Smrg# with or without modifications, as long as this notice is preserved. 72982c393a42Smrg 72992c393a42Smrg# serial 2 73002c393a42Smrg 73012c393a42Smrg# Check whether the underlying file-system supports filenames 73022c393a42Smrg# with a leading dot. For instance MS-DOS doesn't. 73032c393a42SmrgAC_DEFUN([AM_SET_LEADING_DOT], 73042c393a42Smrg[rm -rf .tst 2>/dev/null 73052c393a42Smrgmkdir .tst 2>/dev/null 73062c393a42Smrgif test -d .tst; then 73072c393a42Smrg am__leading_dot=. 73082c393a42Smrgelse 73092c393a42Smrg am__leading_dot=_ 73102c393a42Smrgfi 73112c393a42Smrgrmdir .tst 2>/dev/null 73122c393a42SmrgAC_SUBST([am__leading_dot])]) 73132c393a42Smrg 73142c393a42Smrg# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- 73152c393a42Smrg# From Jim Meyering 73162c393a42Smrg 73172c393a42Smrg# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005 73182c393a42Smrg# Free Software Foundation, Inc. 73192c393a42Smrg# 73202c393a42Smrg# This file is free software; the Free Software Foundation 73212c393a42Smrg# gives unlimited permission to copy and/or distribute it, 73222c393a42Smrg# with or without modifications, as long as this notice is preserved. 73232c393a42Smrg 73242c393a42Smrg# serial 4 73252c393a42Smrg 73262c393a42SmrgAC_DEFUN([AM_MAINTAINER_MODE], 73272c393a42Smrg[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) 73282c393a42Smrg dnl maintainer-mode is disabled by default 73292c393a42Smrg AC_ARG_ENABLE(maintainer-mode, 73302c393a42Smrg[ --enable-maintainer-mode enable make rules and dependencies not useful 73312c393a42Smrg (and sometimes confusing) to the casual installer], 73322c393a42Smrg USE_MAINTAINER_MODE=$enableval, 73332c393a42Smrg USE_MAINTAINER_MODE=no) 73342c393a42Smrg AC_MSG_RESULT([$USE_MAINTAINER_MODE]) 73352c393a42Smrg AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes]) 73362c393a42Smrg MAINT=$MAINTAINER_MODE_TRUE 73372c393a42Smrg AC_SUBST(MAINT)dnl 73382c393a42Smrg] 73392c393a42Smrg) 73402c393a42Smrg 73412c393a42SmrgAU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) 73422c393a42Smrg 73432c393a42Smrg# Check to see how 'make' treats includes. -*- Autoconf -*- 73442c393a42Smrg 73452c393a42Smrg# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. 73462c393a42Smrg# 73472c393a42Smrg# This file is free software; the Free Software Foundation 73482c393a42Smrg# gives unlimited permission to copy and/or distribute it, 73492c393a42Smrg# with or without modifications, as long as this notice is preserved. 73502c393a42Smrg 73512c393a42Smrg# serial 3 73522c393a42Smrg 73532c393a42Smrg# AM_MAKE_INCLUDE() 73542c393a42Smrg# ----------------- 73552c393a42Smrg# Check to see how make treats includes. 73562c393a42SmrgAC_DEFUN([AM_MAKE_INCLUDE], 73572c393a42Smrg[am_make=${MAKE-make} 73582c393a42Smrgcat > confinc << 'END' 73592c393a42Smrgam__doit: 73602c393a42Smrg @echo done 73612c393a42Smrg.PHONY: am__doit 73622c393a42SmrgEND 73632c393a42Smrg# If we don't find an include directive, just comment out the code. 73642c393a42SmrgAC_MSG_CHECKING([for style of include used by $am_make]) 73652c393a42Smrgam__include="#" 73662c393a42Smrgam__quote= 73672c393a42Smrg_am_result=none 73682c393a42Smrg# First try GNU make style include. 73692c393a42Smrgecho "include confinc" > confmf 73702c393a42Smrg# We grep out `Entering directory' and `Leaving directory' 73712c393a42Smrg# messages which can occur if `w' ends up in MAKEFLAGS. 73722c393a42Smrg# In particular we don't look at `^make:' because GNU make might 73732c393a42Smrg# be invoked under some other name (usually "gmake"), in which 73742c393a42Smrg# case it prints its new name instead of `make'. 73752c393a42Smrgif test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then 73762c393a42Smrg am__include=include 73772c393a42Smrg am__quote= 73782c393a42Smrg _am_result=GNU 73792c393a42Smrgfi 73802c393a42Smrg# Now try BSD make style include. 73812c393a42Smrgif test "$am__include" = "#"; then 73822c393a42Smrg echo '.include "confinc"' > confmf 73832c393a42Smrg if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then 73842c393a42Smrg am__include=.include 73852c393a42Smrg am__quote="\"" 73862c393a42Smrg _am_result=BSD 73872c393a42Smrg fi 73882c393a42Smrgfi 73892c393a42SmrgAC_SUBST([am__include]) 73902c393a42SmrgAC_SUBST([am__quote]) 73912c393a42SmrgAC_MSG_RESULT([$_am_result]) 73922c393a42Smrgrm -f confinc confmf 73932c393a42Smrg]) 73942c393a42Smrg 73952c393a42Smrg# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 73962c393a42Smrg 73972c393a42Smrg# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005 73982c393a42Smrg# Free Software Foundation, Inc. 73992c393a42Smrg# 74002c393a42Smrg# This file is free software; the Free Software Foundation 74012c393a42Smrg# gives unlimited permission to copy and/or distribute it, 74022c393a42Smrg# with or without modifications, as long as this notice is preserved. 74032c393a42Smrg 74042c393a42Smrg# serial 4 74052c393a42Smrg 74062c393a42Smrg# AM_MISSING_PROG(NAME, PROGRAM) 74072c393a42Smrg# ------------------------------ 74082c393a42SmrgAC_DEFUN([AM_MISSING_PROG], 74092c393a42Smrg[AC_REQUIRE([AM_MISSING_HAS_RUN]) 74102c393a42Smrg$1=${$1-"${am_missing_run}$2"} 74112c393a42SmrgAC_SUBST($1)]) 74122c393a42Smrg 74132c393a42Smrg 74142c393a42Smrg# AM_MISSING_HAS_RUN 74152c393a42Smrg# ------------------ 74162c393a42Smrg# Define MISSING if not defined so far and test if it supports --run. 74172c393a42Smrg# If it does, set am_missing_run to use it, otherwise, to nothing. 74182c393a42SmrgAC_DEFUN([AM_MISSING_HAS_RUN], 74192c393a42Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 74202c393a42Smrgtest x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" 74212c393a42Smrg# Use eval to expand $SHELL 74222c393a42Smrgif eval "$MISSING --run true"; then 74232c393a42Smrg am_missing_run="$MISSING --run " 74242c393a42Smrgelse 74252c393a42Smrg am_missing_run= 74262c393a42Smrg AC_MSG_WARN([`missing' script is too old or missing]) 74272c393a42Smrgfi 74282c393a42Smrg]) 74292c393a42Smrg 74302c393a42Smrg# Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc. 74312c393a42Smrg# 74322c393a42Smrg# This file is free software; the Free Software Foundation 74332c393a42Smrg# gives unlimited permission to copy and/or distribute it, 74342c393a42Smrg# with or without modifications, as long as this notice is preserved. 74352c393a42Smrg 74362c393a42Smrg# AM_PROG_MKDIR_P 74372c393a42Smrg# --------------- 74382c393a42Smrg# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise. 74392c393a42Smrg# 74402c393a42Smrg# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories 74412c393a42Smrg# created by `make install' are always world readable, even if the 74422c393a42Smrg# installer happens to have an overly restrictive umask (e.g. 077). 74432c393a42Smrg# This was a mistake. There are at least two reasons why we must not 74442c393a42Smrg# use `-m 0755': 74452c393a42Smrg# - it causes special bits like SGID to be ignored, 74462c393a42Smrg# - it may be too restrictive (some setups expect 775 directories). 74472c393a42Smrg# 74482c393a42Smrg# Do not use -m 0755 and let people choose whatever they expect by 74492c393a42Smrg# setting umask. 74502c393a42Smrg# 74512c393a42Smrg# We cannot accept any implementation of `mkdir' that recognizes `-p'. 74522c393a42Smrg# Some implementations (such as Solaris 8's) are not thread-safe: if a 74532c393a42Smrg# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c' 74542c393a42Smrg# concurrently, both version can detect that a/ is missing, but only 74552c393a42Smrg# one can create it and the other will error out. Consequently we 74562c393a42Smrg# restrict ourselves to GNU make (using the --version option ensures 74572c393a42Smrg# this.) 74582c393a42SmrgAC_DEFUN([AM_PROG_MKDIR_P], 74592c393a42Smrg[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then 74602c393a42Smrg # We used to keeping the `.' as first argument, in order to 74612c393a42Smrg # allow $(mkdir_p) to be used without argument. As in 74622c393a42Smrg # $(mkdir_p) $(somedir) 74632c393a42Smrg # where $(somedir) is conditionally defined. However this is wrong 74642c393a42Smrg # for two reasons: 74652c393a42Smrg # 1. if the package is installed by a user who cannot write `.' 74662c393a42Smrg # make install will fail, 74672c393a42Smrg # 2. the above comment should most certainly read 74682c393a42Smrg # $(mkdir_p) $(DESTDIR)$(somedir) 74692c393a42Smrg # so it does not work when $(somedir) is undefined and 74702c393a42Smrg # $(DESTDIR) is not. 74712c393a42Smrg # To support the latter case, we have to write 74722c393a42Smrg # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir), 74732c393a42Smrg # so the `.' trick is pointless. 74742c393a42Smrg mkdir_p='mkdir -p --' 74752c393a42Smrgelse 74762c393a42Smrg # On NextStep and OpenStep, the `mkdir' command does not 74772c393a42Smrg # recognize any option. It will interpret all options as 74782c393a42Smrg # directories to create, and then abort because `.' already 74792c393a42Smrg # exists. 74802c393a42Smrg for d in ./-p ./--version; 74812c393a42Smrg do 74822c393a42Smrg test -d $d && rmdir $d 74832c393a42Smrg done 74842c393a42Smrg # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists. 74852c393a42Smrg if test -f "$ac_aux_dir/mkinstalldirs"; then 74862c393a42Smrg mkdir_p='$(mkinstalldirs)' 74872c393a42Smrg else 74882c393a42Smrg mkdir_p='$(install_sh) -d' 74892c393a42Smrg fi 74902c393a42Smrgfi 74912c393a42SmrgAC_SUBST([mkdir_p])]) 74922c393a42Smrg 74932c393a42Smrg# Helper functions for option handling. -*- Autoconf -*- 74942c393a42Smrg 74952c393a42Smrg# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. 74962c393a42Smrg# 74972c393a42Smrg# This file is free software; the Free Software Foundation 74982c393a42Smrg# gives unlimited permission to copy and/or distribute it, 74992c393a42Smrg# with or without modifications, as long as this notice is preserved. 75002c393a42Smrg 75012c393a42Smrg# serial 3 75022c393a42Smrg 75032c393a42Smrg# _AM_MANGLE_OPTION(NAME) 75042c393a42Smrg# ----------------------- 75052c393a42SmrgAC_DEFUN([_AM_MANGLE_OPTION], 75062c393a42Smrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 75072c393a42Smrg 75082c393a42Smrg# _AM_SET_OPTION(NAME) 75092c393a42Smrg# ------------------------------ 75102c393a42Smrg# Set option NAME. Presently that only means defining a flag for this option. 75112c393a42SmrgAC_DEFUN([_AM_SET_OPTION], 75122c393a42Smrg[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) 75132c393a42Smrg 75142c393a42Smrg# _AM_SET_OPTIONS(OPTIONS) 75152c393a42Smrg# ---------------------------------- 75162c393a42Smrg# OPTIONS is a space-separated list of Automake options. 75172c393a42SmrgAC_DEFUN([_AM_SET_OPTIONS], 75182c393a42Smrg[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 75192c393a42Smrg 75202c393a42Smrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 75212c393a42Smrg# ------------------------------------------- 75222c393a42Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 75232c393a42SmrgAC_DEFUN([_AM_IF_OPTION], 75242c393a42Smrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 75252c393a42Smrg 75262c393a42Smrg# Check to make sure that the build environment is sane. -*- Autoconf -*- 75272c393a42Smrg 75282c393a42Smrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 75292c393a42Smrg# Free Software Foundation, Inc. 75302c393a42Smrg# 75312c393a42Smrg# This file is free software; the Free Software Foundation 75322c393a42Smrg# gives unlimited permission to copy and/or distribute it, 75332c393a42Smrg# with or without modifications, as long as this notice is preserved. 75342c393a42Smrg 75352c393a42Smrg# serial 4 75362c393a42Smrg 75372c393a42Smrg# AM_SANITY_CHECK 75382c393a42Smrg# --------------- 75392c393a42SmrgAC_DEFUN([AM_SANITY_CHECK], 75402c393a42Smrg[AC_MSG_CHECKING([whether build environment is sane]) 75412c393a42Smrg# Just in case 75422c393a42Smrgsleep 1 75432c393a42Smrgecho timestamp > conftest.file 75442c393a42Smrg# Do `set' in a subshell so we don't clobber the current shell's 75452c393a42Smrg# arguments. Must try -L first in case configure is actually a 75462c393a42Smrg# symlink; some systems play weird games with the mod time of symlinks 75472c393a42Smrg# (eg FreeBSD returns the mod time of the symlink's containing 75482c393a42Smrg# directory). 75492c393a42Smrgif ( 75502c393a42Smrg set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` 75512c393a42Smrg if test "$[*]" = "X"; then 75522c393a42Smrg # -L didn't work. 75532c393a42Smrg set X `ls -t $srcdir/configure conftest.file` 75542c393a42Smrg fi 75552c393a42Smrg rm -f conftest.file 75562c393a42Smrg if test "$[*]" != "X $srcdir/configure conftest.file" \ 75572c393a42Smrg && test "$[*]" != "X conftest.file $srcdir/configure"; then 75582c393a42Smrg 75592c393a42Smrg # If neither matched, then we have a broken ls. This can happen 75602c393a42Smrg # if, for instance, CONFIG_SHELL is bash and it inherits a 75612c393a42Smrg # broken ls alias from the environment. This has actually 75622c393a42Smrg # happened. Such a system could not be considered "sane". 75632c393a42Smrg AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 75642c393a42Smrgalias in your environment]) 75652c393a42Smrg fi 75662c393a42Smrg 75672c393a42Smrg test "$[2]" = conftest.file 75682c393a42Smrg ) 75692c393a42Smrgthen 75702c393a42Smrg # Ok. 75712c393a42Smrg : 75722c393a42Smrgelse 75732c393a42Smrg AC_MSG_ERROR([newly created file is older than distributed files! 75742c393a42SmrgCheck your system clock]) 75752c393a42Smrgfi 75762c393a42SmrgAC_MSG_RESULT(yes)]) 75772c393a42Smrg 75782c393a42Smrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 75792c393a42Smrg# 75802c393a42Smrg# This file is free software; the Free Software Foundation 75812c393a42Smrg# gives unlimited permission to copy and/or distribute it, 75822c393a42Smrg# with or without modifications, as long as this notice is preserved. 75832c393a42Smrg 75842c393a42Smrg# AM_PROG_INSTALL_STRIP 75852c393a42Smrg# --------------------- 75862c393a42Smrg# One issue with vendor `install' (even GNU) is that you can't 75872c393a42Smrg# specify the program used to strip binaries. This is especially 75882c393a42Smrg# annoying in cross-compiling environments, where the build's strip 75892c393a42Smrg# is unlikely to handle the host's binaries. 75902c393a42Smrg# Fortunately install-sh will honor a STRIPPROG variable, so we 75912c393a42Smrg# always use install-sh in `make install-strip', and initialize 75922c393a42Smrg# STRIPPROG with the value of the STRIP variable (set by the user). 75932c393a42SmrgAC_DEFUN([AM_PROG_INSTALL_STRIP], 75942c393a42Smrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 75952c393a42Smrg# Installed binaries are usually stripped using `strip' when the user 75962c393a42Smrg# run `make install-strip'. However `strip' might not be the right 75972c393a42Smrg# tool to use in cross-compilation environments, therefore Automake 75982c393a42Smrg# will honor the `STRIP' environment variable to overrule this program. 75992c393a42Smrgdnl Don't test for $cross_compiling = yes, because it might be `maybe'. 76002c393a42Smrgif test "$cross_compiling" != no; then 76012c393a42Smrg AC_CHECK_TOOL([STRIP], [strip], :) 76022c393a42Smrgfi 76032c393a42SmrgINSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" 76042c393a42SmrgAC_SUBST([INSTALL_STRIP_PROGRAM])]) 76052c393a42Smrg 76062c393a42Smrg# Check how to create a tarball. -*- Autoconf -*- 76072c393a42Smrg 76082c393a42Smrg# Copyright (C) 2004, 2005 Free Software Foundation, Inc. 76092c393a42Smrg# 76102c393a42Smrg# This file is free software; the Free Software Foundation 76112c393a42Smrg# gives unlimited permission to copy and/or distribute it, 76122c393a42Smrg# with or without modifications, as long as this notice is preserved. 76132c393a42Smrg 76142c393a42Smrg# serial 2 76152c393a42Smrg 76162c393a42Smrg# _AM_PROG_TAR(FORMAT) 76172c393a42Smrg# -------------------- 76182c393a42Smrg# Check how to create a tarball in format FORMAT. 76192c393a42Smrg# FORMAT should be one of `v7', `ustar', or `pax'. 76202c393a42Smrg# 76212c393a42Smrg# Substitute a variable $(am__tar) that is a command 76222c393a42Smrg# writing to stdout a FORMAT-tarball containing the directory 76232c393a42Smrg# $tardir. 76242c393a42Smrg# tardir=directory && $(am__tar) > result.tar 76252c393a42Smrg# 76262c393a42Smrg# Substitute a variable $(am__untar) that extract such 76272c393a42Smrg# a tarball read from stdin. 76282c393a42Smrg# $(am__untar) < result.tar 76292c393a42SmrgAC_DEFUN([_AM_PROG_TAR], 76302c393a42Smrg[# Always define AMTAR for backward compatibility. 76312c393a42SmrgAM_MISSING_PROG([AMTAR], [tar]) 76322c393a42Smrgm4_if([$1], [v7], 76332c393a42Smrg [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], 76342c393a42Smrg [m4_case([$1], [ustar],, [pax],, 76352c393a42Smrg [m4_fatal([Unknown tar format])]) 76362c393a42SmrgAC_MSG_CHECKING([how to create a $1 tar archive]) 76372c393a42Smrg# Loop over all known methods to create a tar archive until one works. 76382c393a42Smrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 76392c393a42Smrg_am_tools=${am_cv_prog_tar_$1-$_am_tools} 76402c393a42Smrg# Do not fold the above two line into one, because Tru64 sh and 76412c393a42Smrg# Solaris sh will not grok spaces in the rhs of `-'. 76422c393a42Smrgfor _am_tool in $_am_tools 76432c393a42Smrgdo 76442c393a42Smrg case $_am_tool in 76452c393a42Smrg gnutar) 76462c393a42Smrg for _am_tar in tar gnutar gtar; 76472c393a42Smrg do 76482c393a42Smrg AM_RUN_LOG([$_am_tar --version]) && break 76492c393a42Smrg done 76502c393a42Smrg am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 76512c393a42Smrg am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 76522c393a42Smrg am__untar="$_am_tar -xf -" 76532c393a42Smrg ;; 76542c393a42Smrg plaintar) 76552c393a42Smrg # Must skip GNU tar: if it does not support --format= it doesn't create 76562c393a42Smrg # ustar tarball either. 76572c393a42Smrg (tar --version) >/dev/null 2>&1 && continue 76582c393a42Smrg am__tar='tar chf - "$$tardir"' 76592c393a42Smrg am__tar_='tar chf - "$tardir"' 76602c393a42Smrg am__untar='tar xf -' 76612c393a42Smrg ;; 76622c393a42Smrg pax) 76632c393a42Smrg am__tar='pax -L -x $1 -w "$$tardir"' 76642c393a42Smrg am__tar_='pax -L -x $1 -w "$tardir"' 76652c393a42Smrg am__untar='pax -r' 76662c393a42Smrg ;; 76672c393a42Smrg cpio) 76682c393a42Smrg am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 76692c393a42Smrg am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 76702c393a42Smrg am__untar='cpio -i -H $1 -d' 76712c393a42Smrg ;; 76722c393a42Smrg none) 76732c393a42Smrg am__tar=false 76742c393a42Smrg am__tar_=false 76752c393a42Smrg am__untar=false 76762c393a42Smrg ;; 76772c393a42Smrg esac 76782c393a42Smrg 76792c393a42Smrg # If the value was cached, stop now. We just wanted to have am__tar 76802c393a42Smrg # and am__untar set. 76812c393a42Smrg test -n "${am_cv_prog_tar_$1}" && break 76822c393a42Smrg 76832c393a42Smrg # tar/untar a dummy directory, and stop if the command works 76842c393a42Smrg rm -rf conftest.dir 76852c393a42Smrg mkdir conftest.dir 76862c393a42Smrg echo GrepMe > conftest.dir/file 76872c393a42Smrg AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 76882c393a42Smrg rm -rf conftest.dir 76892c393a42Smrg if test -s conftest.tar; then 76902c393a42Smrg AM_RUN_LOG([$am__untar <conftest.tar]) 76912c393a42Smrg grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 76922c393a42Smrg fi 76932c393a42Smrgdone 76942c393a42Smrgrm -rf conftest.dir 76952c393a42Smrg 76962c393a42SmrgAC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 76972c393a42SmrgAC_MSG_RESULT([$am_cv_prog_tar_$1])]) 76982c393a42SmrgAC_SUBST([am__tar]) 76992c393a42SmrgAC_SUBST([am__untar]) 77002c393a42Smrg]) # _AM_PROG_TAR 77012c393a42Smrg 77022c393a42Smrgm4_include([acinclude.m4]) 7703