aclocal.m4 revision 3a925b30
13a925b30Smrg# generated automatically by aclocal 1.11 -*- Autoconf -*- 245bc899bSmrg 345bc899bSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 43a925b30Smrg# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. 545bc899bSmrg# This file is free software; the Free Software Foundation 645bc899bSmrg# gives unlimited permission to copy and/or distribute it, 745bc899bSmrg# with or without modifications, as long as this notice is preserved. 845bc899bSmrg 945bc899bSmrg# This program is distributed in the hope that it will be useful, 1045bc899bSmrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 1145bc899bSmrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 1245bc899bSmrg# PARTICULAR PURPOSE. 1345bc899bSmrg 1450f2e948Smrgm4_ifndef([AC_AUTOCONF_VERSION], 1550f2e948Smrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 1650f2e948Smrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.63],, 1750f2e948Smrg[m4_warning([this file was generated for autoconf 2.63. 1850f2e948SmrgYou have another version of autoconf. It may work, but is not guaranteed to. 1950f2e948SmrgIf you have problems, you may need to regenerate the build system entirely. 2050f2e948SmrgTo do so, use the procedure documented by the package, typically `autoreconf'.])]) 2150f2e948Smrg 2245bc899bSmrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 2345bc899bSmrg 243a925b30Smrg# serial 52 AC_PROG_LIBTOOL 251ac89addSmrg 261ac89addSmrg 273a925b30Smrg# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED) 283a925b30Smrg# ----------------------------------------------------------- 293a925b30Smrg# If this macro is not defined by Autoconf, define it here. 303a925b30Smrgm4_ifdef([AC_PROVIDE_IFELSE], 313a925b30Smrg [], 323a925b30Smrg [m4_define([AC_PROVIDE_IFELSE], 333a925b30Smrg [m4_ifdef([AC_PROVIDE_$1], 343a925b30Smrg [$2], [$3])])]) 3550f2e948Smrg 3650f2e948Smrg 373a925b30Smrg# AC_PROG_LIBTOOL 383a925b30Smrg# --------------- 393a925b30SmrgAC_DEFUN([AC_PROG_LIBTOOL], 403a925b30Smrg[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl 413a925b30Smrgdnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX 423a925b30Smrgdnl immediately, otherwise, hook it in at the end of AC_PROG_CXX. 433a925b30Smrg AC_PROVIDE_IFELSE([AC_PROG_CXX], 443a925b30Smrg [AC_LIBTOOL_CXX], 453a925b30Smrg [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX 463a925b30Smrg ])]) 473a925b30Smrgdnl And a similar setup for Fortran 77 support 483a925b30Smrg AC_PROVIDE_IFELSE([AC_PROG_F77], 493a925b30Smrg [AC_LIBTOOL_F77], 503a925b30Smrg [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77 513a925b30Smrg])]) 523a925b30Smrg 533a925b30Smrgdnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly. 543a925b30Smrgdnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run 553a925b30Smrgdnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both. 563a925b30Smrg AC_PROVIDE_IFELSE([AC_PROG_GCJ], 573a925b30Smrg [AC_LIBTOOL_GCJ], 583a925b30Smrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 593a925b30Smrg [AC_LIBTOOL_GCJ], 603a925b30Smrg [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ], 613a925b30Smrg [AC_LIBTOOL_GCJ], 623a925b30Smrg [ifdef([AC_PROG_GCJ], 633a925b30Smrg [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])]) 643a925b30Smrg ifdef([A][M_PROG_GCJ], 653a925b30Smrg [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])]) 663a925b30Smrg ifdef([LT_AC_PROG_GCJ], 673a925b30Smrg [define([LT_AC_PROG_GCJ], 683a925b30Smrg defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])]) 693a925b30Smrg])])# AC_PROG_LIBTOOL 703a925b30Smrg 713a925b30Smrg 723a925b30Smrg# _AC_PROG_LIBTOOL 733a925b30Smrg# ---------------- 743a925b30SmrgAC_DEFUN([_AC_PROG_LIBTOOL], 753a925b30Smrg[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl 763a925b30SmrgAC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl 773a925b30SmrgAC_BEFORE([$0],[AC_LIBTOOL_F77])dnl 783a925b30SmrgAC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl 7945bc899bSmrg 8045bc899bSmrg# This can be used to rebuild libtool when needed 813a925b30SmrgLIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" 8245bc899bSmrg 8345bc899bSmrg# Always use our own libtool. 8445bc899bSmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool' 8545bc899bSmrgAC_SUBST(LIBTOOL)dnl 8645bc899bSmrg 873a925b30Smrg# Prevent multiple expansion 883a925b30Smrgdefine([AC_PROG_LIBTOOL], []) 893a925b30Smrg])# _AC_PROG_LIBTOOL 9050f2e948Smrg 9150f2e948Smrg 923a925b30Smrg# AC_LIBTOOL_SETUP 933a925b30Smrg# ---------------- 943a925b30SmrgAC_DEFUN([AC_LIBTOOL_SETUP], 953a925b30Smrg[AC_PREREQ(2.50)dnl 963a925b30SmrgAC_REQUIRE([AC_ENABLE_SHARED])dnl 973a925b30SmrgAC_REQUIRE([AC_ENABLE_STATIC])dnl 983a925b30SmrgAC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl 993a925b30SmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 10045bc899bSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 10145bc899bSmrgAC_REQUIRE([AC_PROG_CC])dnl 1023a925b30SmrgAC_REQUIRE([AC_PROG_LD])dnl 1033a925b30SmrgAC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl 1043a925b30SmrgAC_REQUIRE([AC_PROG_NM])dnl 1053a925b30Smrg 10645bc899bSmrgAC_REQUIRE([AC_PROG_LN_S])dnl 1073a925b30SmrgAC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl 1083a925b30Smrg# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! 1093a925b30SmrgAC_REQUIRE([AC_OBJEXT])dnl 1103a925b30SmrgAC_REQUIRE([AC_EXEEXT])dnl 11145bc899bSmrgdnl 1123a925b30SmrgAC_LIBTOOL_SYS_MAX_CMD_LEN 1133a925b30SmrgAC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE 1143a925b30SmrgAC_LIBTOOL_OBJDIR 11545bc899bSmrg 1163a925b30SmrgAC_REQUIRE([_LT_AC_SYS_COMPILER])dnl 1173a925b30Smrg_LT_AC_PROG_ECHO_BACKSLASH 11845bc899bSmrg 11945bc899bSmrgcase $host_os in 12045bc899bSmrgaix3*) 12145bc899bSmrg # AIX sometimes has problems with the GCC collect2 program. For some 12245bc899bSmrg # reason, if we set the COLLECT_NAMES environment variable, the problems 12345bc899bSmrg # vanish in a puff of smoke. 12445bc899bSmrg if test "X${COLLECT_NAMES+set}" != Xset; then 12545bc899bSmrg COLLECT_NAMES= 12645bc899bSmrg export COLLECT_NAMES 12745bc899bSmrg fi 12845bc899bSmrg ;; 12945bc899bSmrgesac 13045bc899bSmrg 13145bc899bSmrg# Sed substitution that helps us do robust quoting. It backslashifies 13245bc899bSmrg# metacharacters that are still active within double-quoted strings. 1333a925b30SmrgXsed='sed -e 1s/^X//' 1343a925b30Smrg[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'] 13545bc899bSmrg 13645bc899bSmrg# Same as above, but do not quote variable references. 1373a925b30Smrg[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'] 13845bc899bSmrg 13945bc899bSmrg# Sed substitution to delay expansion of an escaped shell variable in a 14045bc899bSmrg# double_quote_subst'ed string. 14145bc899bSmrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 14245bc899bSmrg 14345bc899bSmrg# Sed substitution to avoid accidental globbing in evaled expressions 14445bc899bSmrgno_glob_subst='s/\*/\\\*/g' 14545bc899bSmrg 1463a925b30Smrg# Constants: 1473a925b30Smrgrm="rm -f" 1483a925b30Smrg 14945bc899bSmrg# Global variables: 1503a925b30Smrgdefault_ofile=libtool 15145bc899bSmrgcan_build_shared=yes 15245bc899bSmrg 15345bc899bSmrg# All known linkers require a `.a' archive for static linking (except MSVC, 15445bc899bSmrg# which needs '.lib'). 15545bc899bSmrglibext=a 1563a925b30Smrgltmain="$ac_aux_dir/ltmain.sh" 1573a925b30Smrgofile="$default_ofile" 15850f2e948Smrgwith_gnu_ld="$lt_cv_prog_gnu_ld" 159226fade8Smrg 1603a925b30SmrgAC_CHECK_TOOL(AR, ar, false) 1613a925b30SmrgAC_CHECK_TOOL(RANLIB, ranlib, :) 1623a925b30SmrgAC_CHECK_TOOL(STRIP, strip, :) 1633a925b30Smrg 16445bc899bSmrgold_CC="$CC" 16545bc899bSmrgold_CFLAGS="$CFLAGS" 16645bc899bSmrg 16745bc899bSmrg# Set sane defaults for various variables 1683a925b30Smrgtest -z "$AR" && AR=ar 1693a925b30Smrgtest -z "$AR_FLAGS" && AR_FLAGS=cru 1703a925b30Smrgtest -z "$AS" && AS=as 17145bc899bSmrgtest -z "$CC" && CC=cc 17245bc899bSmrgtest -z "$LTCC" && LTCC=$CC 17345bc899bSmrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 1743a925b30Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 17545bc899bSmrgtest -z "$LD" && LD=ld 1763a925b30Smrgtest -z "$LN_S" && LN_S="ln -s" 1773a925b30Smrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file 1783a925b30Smrgtest -z "$NM" && NM=nm 1793a925b30Smrgtest -z "$SED" && SED=sed 1803a925b30Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump 1813a925b30Smrgtest -z "$RANLIB" && RANLIB=: 1823a925b30Smrgtest -z "$STRIP" && STRIP=: 18345bc899bSmrgtest -z "$ac_objext" && ac_objext=o 18445bc899bSmrg 1853a925b30Smrg# Determine commands to create old-style static archives. 1863a925b30Smrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 1873a925b30Smrgold_postinstall_cmds='chmod 644 $oldlib' 1883a925b30Smrgold_postuninstall_cmds= 1893a925b30Smrg 1903a925b30Smrgif test -n "$RANLIB"; then 1913a925b30Smrg case $host_os in 1923a925b30Smrg openbsd*) 1933a925b30Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" 1943a925b30Smrg ;; 1953a925b30Smrg *) 1963a925b30Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" 1973a925b30Smrg ;; 1983a925b30Smrg esac 1993a925b30Smrg old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" 2003a925b30Smrgfi 2013a925b30Smrg 20245bc899bSmrg_LT_CC_BASENAME([$compiler]) 20345bc899bSmrg 20445bc899bSmrg# Only perform the check for file, if the check method requires it 20545bc899bSmrgcase $deplibs_check_method in 20645bc899bSmrgfile_magic*) 20745bc899bSmrg if test "$file_magic_cmd" = '$MAGIC_CMD'; then 2083a925b30Smrg AC_PATH_MAGIC 20945bc899bSmrg fi 21045bc899bSmrg ;; 21145bc899bSmrgesac 21245bc899bSmrg 2133a925b30Smrg_LT_REQUIRED_DARWIN_CHECKS 21450f2e948Smrg 2153a925b30SmrgAC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no) 2163a925b30SmrgAC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], 2173a925b30Smrgenable_win32_dll=yes, enable_win32_dll=no) 21850f2e948Smrg 2193a925b30SmrgAC_ARG_ENABLE([libtool-lock], 2203a925b30Smrg [AC_HELP_STRING([--disable-libtool-lock], 2213a925b30Smrg [avoid locking (might break parallel builds)])]) 2223a925b30Smrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes 22350f2e948Smrg 2243a925b30SmrgAC_ARG_WITH([pic], 2253a925b30Smrg [AC_HELP_STRING([--with-pic], 2263a925b30Smrg [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 2273a925b30Smrg [pic_mode="$withval"], 2283a925b30Smrg [pic_mode=default]) 2293a925b30Smrgtest -z "$pic_mode" && pic_mode=default 23050f2e948Smrg 2313a925b30Smrg# Use C for the default configuration in the libtool script 2323a925b30Smrgtagname= 2333a925b30SmrgAC_LIBTOOL_LANG_C_CONFIG 2343a925b30Smrg_LT_AC_TAGCONFIG 2353a925b30Smrg])# AC_LIBTOOL_SETUP 23650f2e948Smrg 23750f2e948Smrg 2383a925b30Smrg# _LT_AC_SYS_COMPILER 23950f2e948Smrg# ------------------- 2403a925b30SmrgAC_DEFUN([_LT_AC_SYS_COMPILER], 24150f2e948Smrg[AC_REQUIRE([AC_PROG_CC])dnl 24245bc899bSmrg 24350f2e948Smrg# If no C compiler was specified, use CC. 24450f2e948SmrgLTCC=${LTCC-"$CC"} 245226fade8Smrg 24650f2e948Smrg# If no C compiler flags were specified, use CFLAGS. 24750f2e948SmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"} 248226fade8Smrg 24950f2e948Smrg# Allow CC to be a program name with arguments. 25050f2e948Smrgcompiler=$CC 2513a925b30Smrg])# _LT_AC_SYS_COMPILER 2523a925b30Smrg 2533a925b30Smrg 2543a925b30Smrg# _LT_CC_BASENAME(CC) 2553a925b30Smrg# ------------------- 2563a925b30Smrg# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 2573a925b30SmrgAC_DEFUN([_LT_CC_BASENAME], 2583a925b30Smrg[for cc_temp in $1""; do 2593a925b30Smrg case $cc_temp in 2603a925b30Smrg compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 2613a925b30Smrg distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 2623a925b30Smrg \-*) ;; 2633a925b30Smrg *) break;; 2643a925b30Smrg esac 2653a925b30Smrgdone 2663a925b30Smrgcc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` 2673a925b30Smrg]) 268226fade8Smrg 26945bc899bSmrg 27050f2e948Smrg# _LT_COMPILER_BOILERPLATE 27150f2e948Smrg# ------------------------ 27250f2e948Smrg# Check for compiler boilerplate output or warnings with 27350f2e948Smrg# the simple compiler test code. 2743a925b30SmrgAC_DEFUN([_LT_COMPILER_BOILERPLATE], 2753a925b30Smrg[AC_REQUIRE([LT_AC_PROG_SED])dnl 27650f2e948Smrgac_outfile=conftest.$ac_objext 27750f2e948Smrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext 27850f2e948Smrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 27950f2e948Smrg_lt_compiler_boilerplate=`cat conftest.err` 2803a925b30Smrg$rm conftest* 28150f2e948Smrg])# _LT_COMPILER_BOILERPLATE 28245bc899bSmrg 28345bc899bSmrg 28450f2e948Smrg# _LT_LINKER_BOILERPLATE 28550f2e948Smrg# ---------------------- 28650f2e948Smrg# Check for linker boilerplate output or warnings with 28750f2e948Smrg# the simple link test code. 2883a925b30SmrgAC_DEFUN([_LT_LINKER_BOILERPLATE], 2893a925b30Smrg[AC_REQUIRE([LT_AC_PROG_SED])dnl 29050f2e948Smrgac_outfile=conftest.$ac_objext 29150f2e948Smrgecho "$lt_simple_link_test_code" >conftest.$ac_ext 29250f2e948Smrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 29350f2e948Smrg_lt_linker_boilerplate=`cat conftest.err` 2943a925b30Smrg$rm -r conftest* 29550f2e948Smrg])# _LT_LINKER_BOILERPLATE 29645bc899bSmrg 29750f2e948Smrg# _LT_REQUIRED_DARWIN_CHECKS 2983a925b30Smrg# -------------------------- 2993a925b30Smrg# Check for some things on darwin 3003a925b30SmrgAC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS],[ 30150f2e948Smrg case $host_os in 30250f2e948Smrg rhapsody* | darwin*) 30350f2e948Smrg AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) 30450f2e948Smrg AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) 30550f2e948Smrg 30650f2e948Smrg AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], 30750f2e948Smrg [lt_cv_apple_cc_single_mod=no 30850f2e948Smrg if test -z "${LT_MULTI_MODULE}"; then 3093a925b30Smrg # By default we will add the -single_module flag. You can override 3103a925b30Smrg # by either setting the environment variable LT_MULTI_MODULE 3113a925b30Smrg # non-empty at configure time, or by adding -multi_module to the 3123a925b30Smrg # link flags. 3133a925b30Smrg echo "int foo(void){return 1;}" > conftest.c 3143a925b30Smrg $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 3153a925b30Smrg -dynamiclib ${wl}-single_module conftest.c 3163a925b30Smrg if test -f libconftest.dylib; then 3173a925b30Smrg lt_cv_apple_cc_single_mod=yes 3183a925b30Smrg rm -rf libconftest.dylib* 3193a925b30Smrg fi 3203a925b30Smrg rm conftest.c 32150f2e948Smrg fi]) 32250f2e948Smrg AC_CACHE_CHECK([for -exported_symbols_list linker flag], 32350f2e948Smrg [lt_cv_ld_exported_symbols_list], 32450f2e948Smrg [lt_cv_ld_exported_symbols_list=no 32550f2e948Smrg save_LDFLAGS=$LDFLAGS 32650f2e948Smrg echo "_main" > conftest.sym 32750f2e948Smrg LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" 32850f2e948Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 3293a925b30Smrg [lt_cv_ld_exported_symbols_list=yes], 3303a925b30Smrg [lt_cv_ld_exported_symbols_list=no]) 3313a925b30Smrg LDFLAGS="$save_LDFLAGS" 332226fade8Smrg ]) 33350f2e948Smrg case $host_os in 3343a925b30Smrg rhapsody* | darwin1.[[0123]]) 33550f2e948Smrg _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; 33650f2e948Smrg darwin1.*) 3373a925b30Smrg _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 3383a925b30Smrg darwin*) 33950f2e948Smrg # if running on 10.5 or later, the deployment target defaults 34050f2e948Smrg # to the OS version, if on x86, and 10.4, the deployment 34150f2e948Smrg # target defaults to 10.4. Don't you love it? 34250f2e948Smrg case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 3433a925b30Smrg 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) 3443a925b30Smrg _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 3453a925b30Smrg 10.[[012]]*) 3463a925b30Smrg _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 3473a925b30Smrg 10.*) 3483a925b30Smrg _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 34950f2e948Smrg esac 35050f2e948Smrg ;; 35150f2e948Smrg esac 35250f2e948Smrg if test "$lt_cv_apple_cc_single_mod" = "yes"; then 35350f2e948Smrg _lt_dar_single_mod='$single_module' 35450f2e948Smrg fi 35550f2e948Smrg if test "$lt_cv_ld_exported_symbols_list" = "yes"; then 35650f2e948Smrg _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' 35750f2e948Smrg else 3583a925b30Smrg _lt_dar_export_syms="~$NMEDIT -s \$output_objdir/\${libname}-symbols.expsym \${lib}" 35950f2e948Smrg fi 36050f2e948Smrg if test "$DSYMUTIL" != ":"; then 3613a925b30Smrg _lt_dsymutil="~$DSYMUTIL \$lib || :" 36250f2e948Smrg else 36350f2e948Smrg _lt_dsymutil= 364226fade8Smrg fi 365226fade8Smrg ;; 366226fade8Smrg esac 36750f2e948Smrg]) 3681ac89addSmrg 3693a925b30Smrg# _LT_AC_SYS_LIBPATH_AIX 3703a925b30Smrg# ---------------------- 37150f2e948Smrg# Links a minimal program and checks the executable 37250f2e948Smrg# for the system default hardcoded library path. In most cases, 37350f2e948Smrg# this is /usr/lib:/lib, but when the MPI compilers are used 37450f2e948Smrg# the location of the communication and MPI libs are included too. 37550f2e948Smrg# If we don't find anything, use the default library path according 37650f2e948Smrg# to the aix ld manual. 3773a925b30SmrgAC_DEFUN([_LT_AC_SYS_LIBPATH_AIX], 3783a925b30Smrg[AC_REQUIRE([LT_AC_PROG_SED])dnl 37950f2e948SmrgAC_LINK_IFELSE(AC_LANG_PROGRAM,[ 38050f2e948Smrglt_aix_libpath_sed=' 38150f2e948Smrg /Import File Strings/,/^$/ { 38250f2e948Smrg /^0/ { 38350f2e948Smrg s/^0 *\(.*\)$/\1/ 38450f2e948Smrg p 38550f2e948Smrg } 38650f2e948Smrg }' 38750f2e948Smrgaix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 38850f2e948Smrg# Check for a 64-bit object if we didn't find anything. 38950f2e948Smrgif test -z "$aix_libpath"; then 39050f2e948Smrg aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 39150f2e948Smrgfi],[]) 39250f2e948Smrgif test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi 3933a925b30Smrg])# _LT_AC_SYS_LIBPATH_AIX 39445bc899bSmrg 39545bc899bSmrg 3963a925b30Smrg# _LT_AC_SHELL_INIT(ARG) 3973a925b30Smrg# ---------------------- 3983a925b30SmrgAC_DEFUN([_LT_AC_SHELL_INIT], 39950f2e948Smrg[ifdef([AC_DIVERSION_NOTICE], 40050f2e948Smrg [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], 40150f2e948Smrg [AC_DIVERT_PUSH(NOTICE)]) 40250f2e948Smrg$1 40350f2e948SmrgAC_DIVERT_POP 4043a925b30Smrg])# _LT_AC_SHELL_INIT 40545bc899bSmrg 406226fade8Smrg 4073a925b30Smrg# _LT_AC_PROG_ECHO_BACKSLASH 4083a925b30Smrg# -------------------------- 40950f2e948Smrg# Add some code to the start of the generated configure script which 41050f2e948Smrg# will find an echo command which doesn't interpret backslashes. 4113a925b30SmrgAC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH], 4123a925b30Smrg[_LT_AC_SHELL_INIT([ 41350f2e948Smrg# Check that we are running under the correct shell. 41450f2e948SmrgSHELL=${CONFIG_SHELL-/bin/sh} 415226fade8Smrg 4163a925b30Smrgcase X$ECHO in 41750f2e948SmrgX*--fallback-echo) 41850f2e948Smrg # Remove one level of quotation (which was required for Make). 4193a925b30Smrg ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` 42050f2e948Smrg ;; 42150f2e948Smrgesac 42250f2e948Smrg 4233a925b30Smrgecho=${ECHO-echo} 42450f2e948Smrgif test "X[$]1" = X--no-reexec; then 42550f2e948Smrg # Discard the --no-reexec flag, and continue. 42650f2e948Smrg shift 42750f2e948Smrgelif test "X[$]1" = X--fallback-echo; then 42850f2e948Smrg # Avoid inline document here, it may be left over 42950f2e948Smrg : 4303a925b30Smrgelif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then 4313a925b30Smrg # Yippee, $echo works! 43250f2e948Smrg : 4331ac89addSmrgelse 43450f2e948Smrg # Restart under the correct shell. 43550f2e948Smrg exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} 4361ac89addSmrgfi 43745bc899bSmrg 43850f2e948Smrgif test "X[$]1" = X--fallback-echo; then 43950f2e948Smrg # used as fallback echo 44050f2e948Smrg shift 4413a925b30Smrg cat <<EOF 44250f2e948Smrg[$]* 4433a925b30SmrgEOF 44450f2e948Smrg exit 0 445226fade8Smrgfi 4461ac89addSmrg 44750f2e948Smrg# The HP-UX ksh and POSIX shell print the target directory to stdout 44850f2e948Smrg# if CDPATH is set. 44950f2e948Smrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 4501ac89addSmrg 4513a925b30Smrgif test -z "$ECHO"; then 4523a925b30Smrgif test "X${echo_test_string+set}" != Xset; then 4533a925b30Smrg# find a string as large as possible, as long as the shell can cope with it 4543a925b30Smrg for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do 4553a925b30Smrg # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... 4563a925b30Smrg if (echo_test_string=`eval $cmd`) 2>/dev/null && 4573a925b30Smrg echo_test_string=`eval $cmd` && 4583a925b30Smrg (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null 4593a925b30Smrg then 4603a925b30Smrg break 4613a925b30Smrg fi 4623a925b30Smrg done 4633a925b30Smrgfi 4641ac89addSmrg 4653a925b30Smrgif test "X`($echo '\t') 2>/dev/null`" = 'X\t' && 4663a925b30Smrg echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && 4673a925b30Smrg test "X$echo_testing_string" = "X$echo_test_string"; then 4683a925b30Smrg : 4693a925b30Smrgelse 4703a925b30Smrg # The Solaris, AIX, and Digital Unix default echo programs unquote 4713a925b30Smrg # backslashes. This makes it impossible to quote backslashes using 4723a925b30Smrg # echo "$something" | sed 's/\\/\\\\/g' 4733a925b30Smrg # 4743a925b30Smrg # So, first we look for a working echo in the user's PATH. 4751ac89addSmrg 4763a925b30Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 4773a925b30Smrg for dir in $PATH /usr/ucb; do 47850f2e948Smrg IFS="$lt_save_ifs" 4793a925b30Smrg if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && 4803a925b30Smrg test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && 4813a925b30Smrg echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && 4823a925b30Smrg test "X$echo_testing_string" = "X$echo_test_string"; then 4833a925b30Smrg echo="$dir/echo" 4843a925b30Smrg break 4853a925b30Smrg fi 4863a925b30Smrg done 4873a925b30Smrg IFS="$lt_save_ifs" 4881ac89addSmrg 4893a925b30Smrg if test "X$echo" = Xecho; then 4903a925b30Smrg # We didn't find a better echo, so look for alternatives. 4913a925b30Smrg if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && 4923a925b30Smrg echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && 4933a925b30Smrg test "X$echo_testing_string" = "X$echo_test_string"; then 4943a925b30Smrg # This shell has a builtin print -r that does the trick. 4953a925b30Smrg echo='print -r' 4963a925b30Smrg elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && 4973a925b30Smrg test "X$CONFIG_SHELL" != X/bin/ksh; then 4983a925b30Smrg # If we have ksh, try running configure again with it. 4993a925b30Smrg ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} 5003a925b30Smrg export ORIGINAL_CONFIG_SHELL 5013a925b30Smrg CONFIG_SHELL=/bin/ksh 5023a925b30Smrg export CONFIG_SHELL 5033a925b30Smrg exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} 5043a925b30Smrg else 5053a925b30Smrg # Try using printf. 5063a925b30Smrg echo='printf %s\n' 5073a925b30Smrg if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && 5083a925b30Smrg echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && 5093a925b30Smrg test "X$echo_testing_string" = "X$echo_test_string"; then 5103a925b30Smrg # Cool, printf works 5113a925b30Smrg : 5123a925b30Smrg elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && 5133a925b30Smrg test "X$echo_testing_string" = 'X\t' && 5143a925b30Smrg echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && 51550f2e948Smrg test "X$echo_testing_string" = "X$echo_test_string"; then 5163a925b30Smrg CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL 5173a925b30Smrg export CONFIG_SHELL 5183a925b30Smrg SHELL="$CONFIG_SHELL" 5193a925b30Smrg export SHELL 5203a925b30Smrg echo="$CONFIG_SHELL [$]0 --fallback-echo" 5213a925b30Smrg elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && 5223a925b30Smrg test "X$echo_testing_string" = 'X\t' && 5233a925b30Smrg echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && 5243a925b30Smrg test "X$echo_testing_string" = "X$echo_test_string"; then 5253a925b30Smrg echo="$CONFIG_SHELL [$]0 --fallback-echo" 5263a925b30Smrg else 5273a925b30Smrg # maybe with a smaller string... 5283a925b30Smrg prev=: 5291ac89addSmrg 5303a925b30Smrg for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do 5313a925b30Smrg if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null 5323a925b30Smrg then 5333a925b30Smrg break 53450f2e948Smrg fi 5353a925b30Smrg prev="$cmd" 5363a925b30Smrg done 5373a925b30Smrg 5383a925b30Smrg if test "$prev" != 'sed 50q "[$]0"'; then 5393a925b30Smrg echo_test_string=`eval $prev` 5403a925b30Smrg export echo_test_string 5413a925b30Smrg exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} 5423a925b30Smrg else 5433a925b30Smrg # Oops. We lost completely, so just stick with echo. 5443a925b30Smrg echo=echo 5453a925b30Smrg fi 54650f2e948Smrg fi 54750f2e948Smrg fi 548226fade8Smrg fi 549226fade8Smrgfi 5503a925b30Smrgfi 5511ac89addSmrg 55250f2e948Smrg# Copy echo and quote the copy suitably for passing to libtool from 55350f2e948Smrg# the Makefile, instead of quoting the original, which is used later. 5543a925b30SmrgECHO=$echo 5553a925b30Smrgif test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then 5563a925b30Smrg ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" 55750f2e948Smrgfi 55845bc899bSmrg 5593a925b30SmrgAC_SUBST(ECHO) 5603a925b30Smrg])])# _LT_AC_PROG_ECHO_BACKSLASH 56145bc899bSmrg 5621ac89addSmrg 5633a925b30Smrg# _LT_AC_LOCK 5643a925b30Smrg# ----------- 5653a925b30SmrgAC_DEFUN([_LT_AC_LOCK], 56650f2e948Smrg[AC_ARG_ENABLE([libtool-lock], 5673a925b30Smrg [AC_HELP_STRING([--disable-libtool-lock], 5683a925b30Smrg [avoid locking (might break parallel builds)])]) 56950f2e948Smrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes 57050f2e948Smrg 57150f2e948Smrg# Some flags need to be propagated to the compiler or linker for good 57250f2e948Smrg# libtool support. 57350f2e948Smrgcase $host in 57450f2e948Smrgia64-*-hpux*) 57550f2e948Smrg # Find out which ABI we are using. 57650f2e948Smrg echo 'int i;' > conftest.$ac_ext 57750f2e948Smrg if AC_TRY_EVAL(ac_compile); then 57850f2e948Smrg case `/usr/bin/file conftest.$ac_objext` in 5793a925b30Smrg *ELF-32*) 5803a925b30Smrg HPUX_IA64_MODE="32" 5813a925b30Smrg ;; 5823a925b30Smrg *ELF-64*) 5833a925b30Smrg HPUX_IA64_MODE="64" 5843a925b30Smrg ;; 585226fade8Smrg esac 58650f2e948Smrg fi 58750f2e948Smrg rm -rf conftest* 58850f2e948Smrg ;; 58950f2e948Smrg*-*-irix6*) 59050f2e948Smrg # Find out which ABI we are using. 59150f2e948Smrg echo '[#]line __oline__ "configure"' > conftest.$ac_ext 59250f2e948Smrg if AC_TRY_EVAL(ac_compile); then 5933a925b30Smrg if test "$lt_cv_prog_gnu_ld" = yes; then 5943a925b30Smrg case `/usr/bin/file conftest.$ac_objext` in 5953a925b30Smrg *32-bit*) 5963a925b30Smrg LD="${LD-ld} -melf32bsmip" 5973a925b30Smrg ;; 5983a925b30Smrg *N32*) 5993a925b30Smrg LD="${LD-ld} -melf32bmipn32" 6003a925b30Smrg ;; 6013a925b30Smrg *64-bit*) 6023a925b30Smrg LD="${LD-ld} -melf64bmip" 6033a925b30Smrg ;; 6043a925b30Smrg esac 6053a925b30Smrg else 6063a925b30Smrg case `/usr/bin/file conftest.$ac_objext` in 6073a925b30Smrg *32-bit*) 6083a925b30Smrg LD="${LD-ld} -32" 6093a925b30Smrg ;; 6103a925b30Smrg *N32*) 6113a925b30Smrg LD="${LD-ld} -n32" 6123a925b30Smrg ;; 6133a925b30Smrg *64-bit*) 6143a925b30Smrg LD="${LD-ld} -64" 6153a925b30Smrg ;; 6163a925b30Smrg esac 6173a925b30Smrg fi 618226fade8Smrg fi 61950f2e948Smrg rm -rf conftest* 620226fade8Smrg ;; 62145bc899bSmrg 62250f2e948Smrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ 6233a925b30Smrgs390*-*linux*|sparc*-*linux*) 62450f2e948Smrg # Find out which ABI we are using. 62550f2e948Smrg echo 'int i;' > conftest.$ac_ext 62650f2e948Smrg if AC_TRY_EVAL(ac_compile); then 62750f2e948Smrg case `/usr/bin/file conftest.o` in 6283a925b30Smrg *32-bit*) 6293a925b30Smrg case $host in 6303a925b30Smrg x86_64-*kfreebsd*-gnu) 6313a925b30Smrg LD="${LD-ld} -m elf_i386_fbsd" 6323a925b30Smrg ;; 6333a925b30Smrg x86_64-*linux*) 6343a925b30Smrg LD="${LD-ld} -m elf_i386" 6353a925b30Smrg ;; 6363a925b30Smrg ppc64-*linux*|powerpc64-*linux*) 6373a925b30Smrg LD="${LD-ld} -m elf32ppclinux" 6383a925b30Smrg ;; 6393a925b30Smrg s390x-*linux*) 6403a925b30Smrg LD="${LD-ld} -m elf_s390" 6413a925b30Smrg ;; 6423a925b30Smrg sparc64-*linux*) 6433a925b30Smrg LD="${LD-ld} -m elf32_sparc" 6443a925b30Smrg ;; 6453a925b30Smrg esac 6463a925b30Smrg ;; 6473a925b30Smrg *64-bit*) 6483a925b30Smrg libsuff=64 6493a925b30Smrg case $host in 6503a925b30Smrg x86_64-*kfreebsd*-gnu) 6513a925b30Smrg LD="${LD-ld} -m elf_x86_64_fbsd" 6523a925b30Smrg ;; 6533a925b30Smrg x86_64-*linux*) 6543a925b30Smrg LD="${LD-ld} -m elf_x86_64" 6553a925b30Smrg ;; 6563a925b30Smrg ppc*-*linux*|powerpc*-*linux*) 6573a925b30Smrg LD="${LD-ld} -m elf64ppc" 6583a925b30Smrg ;; 6593a925b30Smrg s390*-*linux*) 6603a925b30Smrg LD="${LD-ld} -m elf64_s390" 6613a925b30Smrg ;; 6623a925b30Smrg sparc*-*linux*) 6633a925b30Smrg LD="${LD-ld} -m elf64_sparc" 6643a925b30Smrg ;; 6653a925b30Smrg esac 6663a925b30Smrg ;; 66750f2e948Smrg esac 66850f2e948Smrg fi 66950f2e948Smrg rm -rf conftest* 670226fade8Smrg ;; 67145bc899bSmrg 67250f2e948Smrg*-*-sco3.2v5*) 67350f2e948Smrg # On SCO OpenServer 5, we need -belf to get full-featured binaries. 67450f2e948Smrg SAVE_CFLAGS="$CFLAGS" 67550f2e948Smrg CFLAGS="$CFLAGS -belf" 67650f2e948Smrg AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 67750f2e948Smrg [AC_LANG_PUSH(C) 6783a925b30Smrg AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 67950f2e948Smrg AC_LANG_POP]) 68050f2e948Smrg if test x"$lt_cv_cc_needs_belf" != x"yes"; then 68150f2e948Smrg # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 68250f2e948Smrg CFLAGS="$SAVE_CFLAGS" 68350f2e948Smrg fi 684226fade8Smrg ;; 68550f2e948Smrgsparc*-*solaris*) 68650f2e948Smrg # Find out which ABI we are using. 68750f2e948Smrg echo 'int i;' > conftest.$ac_ext 68850f2e948Smrg if AC_TRY_EVAL(ac_compile); then 68950f2e948Smrg case `/usr/bin/file conftest.o` in 69050f2e948Smrg *64-bit*) 69150f2e948Smrg case $lt_cv_prog_gnu_ld in 69250f2e948Smrg yes*) LD="${LD-ld} -m elf64_sparc" ;; 69350f2e948Smrg *) 6943a925b30Smrg if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then 69550f2e948Smrg LD="${LD-ld} -64" 69650f2e948Smrg fi 69750f2e948Smrg ;; 69850f2e948Smrg esac 69950f2e948Smrg ;; 70050f2e948Smrg esac 70150f2e948Smrg fi 70250f2e948Smrg rm -rf conftest* 703226fade8Smrg ;; 7043a925b30Smrg 7053a925b30SmrgAC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], 7063a925b30Smrg[*-*-cygwin* | *-*-mingw* | *-*-pw32*) 7073a925b30Smrg AC_CHECK_TOOL(DLLTOOL, dlltool, false) 7083a925b30Smrg AC_CHECK_TOOL(AS, as, false) 7093a925b30Smrg AC_CHECK_TOOL(OBJDUMP, objdump, false) 7103a925b30Smrg ;; 7113a925b30Smrg ]) 71250f2e948Smrgesac 71345bc899bSmrg 71450f2e948Smrgneed_locks="$enable_libtool_lock" 71550f2e948Smrg 7163a925b30Smrg])# _LT_AC_LOCK 71745bc899bSmrg 71845bc899bSmrg 7193a925b30Smrg# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 72050f2e948Smrg# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 72150f2e948Smrg# ---------------------------------------------------------------- 72250f2e948Smrg# Check whether the given compiler option works 7233a925b30SmrgAC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], 7243a925b30Smrg[AC_REQUIRE([LT_AC_PROG_SED]) 72550f2e948SmrgAC_CACHE_CHECK([$1], [$2], 72650f2e948Smrg [$2=no 7273a925b30Smrg ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 72850f2e948Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 72950f2e948Smrg lt_compiler_flag="$3" 73050f2e948Smrg # Insert the option either (1) after the last *FLAGS variable, or 73150f2e948Smrg # (2) before a word containing "conftest.", or (3) at the end. 73250f2e948Smrg # Note that $ac_compile itself does not contain backslashes and begins 73350f2e948Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 73450f2e948Smrg # The option is referenced via a variable to avoid confusing sed. 73550f2e948Smrg lt_compile=`echo "$ac_compile" | $SED \ 73650f2e948Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 73750f2e948Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 73850f2e948Smrg -e 's:$: $lt_compiler_flag:'` 73950f2e948Smrg (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 74050f2e948Smrg (eval "$lt_compile" 2>conftest.err) 74150f2e948Smrg ac_status=$? 74250f2e948Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 74350f2e948Smrg echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 74450f2e948Smrg if (exit $ac_status) && test -s "$ac_outfile"; then 74550f2e948Smrg # The compiler can only warn and ignore the option if not recognized 74650f2e948Smrg # So say no if there are warnings other than the usual output. 7473a925b30Smrg $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp 74850f2e948Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 74950f2e948Smrg if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 75050f2e948Smrg $2=yes 75150f2e948Smrg fi 75250f2e948Smrg fi 7533a925b30Smrg $rm conftest* 75450f2e948Smrg]) 75545bc899bSmrg 75650f2e948Smrgif test x"[$]$2" = xyes; then 7573a925b30Smrg ifelse([$5], , :, [$5]) 75850f2e948Smrgelse 7593a925b30Smrg ifelse([$6], , :, [$6]) 76050f2e948Smrgfi 7613a925b30Smrg])# AC_LIBTOOL_COMPILER_OPTION 76245bc899bSmrg 76350f2e948Smrg 7643a925b30Smrg# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 7653a925b30Smrg# [ACTION-SUCCESS], [ACTION-FAILURE]) 7663a925b30Smrg# ------------------------------------------------------------ 7673a925b30Smrg# Check whether the given compiler option works 7683a925b30SmrgAC_DEFUN([AC_LIBTOOL_LINKER_OPTION], 7693a925b30Smrg[AC_REQUIRE([LT_AC_PROG_SED])dnl 77050f2e948SmrgAC_CACHE_CHECK([$1], [$2], 77150f2e948Smrg [$2=no 77250f2e948Smrg save_LDFLAGS="$LDFLAGS" 77350f2e948Smrg LDFLAGS="$LDFLAGS $3" 77450f2e948Smrg echo "$lt_simple_link_test_code" > conftest.$ac_ext 77550f2e948Smrg if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 77650f2e948Smrg # The linker can only warn and ignore the option if not recognized 77750f2e948Smrg # So say no if there are warnings 77850f2e948Smrg if test -s conftest.err; then 77950f2e948Smrg # Append any errors to the config.log. 78050f2e948Smrg cat conftest.err 1>&AS_MESSAGE_LOG_FD 7813a925b30Smrg $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp 78250f2e948Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 78350f2e948Smrg if diff conftest.exp conftest.er2 >/dev/null; then 78450f2e948Smrg $2=yes 78550f2e948Smrg fi 78650f2e948Smrg else 78750f2e948Smrg $2=yes 78850f2e948Smrg fi 78950f2e948Smrg fi 7903a925b30Smrg $rm -r conftest* 79150f2e948Smrg LDFLAGS="$save_LDFLAGS" 79250f2e948Smrg]) 79350f2e948Smrg 79450f2e948Smrgif test x"[$]$2" = xyes; then 7953a925b30Smrg ifelse([$4], , :, [$4]) 79650f2e948Smrgelse 7973a925b30Smrg ifelse([$5], , :, [$5]) 79850f2e948Smrgfi 7993a925b30Smrg])# AC_LIBTOOL_LINKER_OPTION 80050f2e948Smrg 80150f2e948Smrg 8023a925b30Smrg# AC_LIBTOOL_SYS_MAX_CMD_LEN 8033a925b30Smrg# -------------------------- 8043a925b30SmrgAC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], 8053a925b30Smrg[# find the maximum length of command line arguments 80650f2e948SmrgAC_MSG_CHECKING([the maximum length of command line arguments]) 80750f2e948SmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 80850f2e948Smrg i=0 80950f2e948Smrg teststring="ABCD" 81050f2e948Smrg 81150f2e948Smrg case $build_os in 81250f2e948Smrg msdosdjgpp*) 81350f2e948Smrg # On DJGPP, this test can blow up pretty badly due to problems in libc 81450f2e948Smrg # (any single argument exceeding 2000 bytes causes a buffer overrun 81550f2e948Smrg # during glob expansion). Even if it were fixed, the result of this 81650f2e948Smrg # check would be larger than it should be. 81750f2e948Smrg lt_cv_sys_max_cmd_len=12288; # 12K is about right 8181ac89addSmrg ;; 81950f2e948Smrg 82050f2e948Smrg gnu*) 82150f2e948Smrg # Under GNU Hurd, this test is not required because there is 82250f2e948Smrg # no limit to the length of command line arguments. 82350f2e948Smrg # Libtool will interpret -1 as no limit whatsoever 82450f2e948Smrg lt_cv_sys_max_cmd_len=-1; 8251ac89addSmrg ;; 82650f2e948Smrg 8273a925b30Smrg cygwin* | mingw*) 82850f2e948Smrg # On Win9x/ME, this test blows up -- it succeeds, but takes 82950f2e948Smrg # about 5 minutes as the teststring grows exponentially. 83050f2e948Smrg # Worse, since 9x/ME are not pre-emptively multitasking, 83150f2e948Smrg # you end up with a "frozen" computer, even though with patience 83250f2e948Smrg # the test eventually succeeds (with a max line length of 256k). 83350f2e948Smrg # Instead, let's just punt: use the minimum linelength reported by 83450f2e948Smrg # all of the supported platforms: 8192 (on NT/2K/XP). 83550f2e948Smrg lt_cv_sys_max_cmd_len=8192; 8361ac89addSmrg ;; 83750f2e948Smrg 83850f2e948Smrg amigaos*) 83950f2e948Smrg # On AmigaOS with pdksh, this test takes hours, literally. 84050f2e948Smrg # So we just punt and use a minimum line length of 8192. 84150f2e948Smrg lt_cv_sys_max_cmd_len=8192; 8421ac89addSmrg ;; 84345bc899bSmrg 84450f2e948Smrg netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) 84550f2e948Smrg # This has been around since 386BSD, at least. Likely further. 84650f2e948Smrg if test -x /sbin/sysctl; then 84750f2e948Smrg lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 84850f2e948Smrg elif test -x /usr/sbin/sysctl; then 84950f2e948Smrg lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 85050f2e948Smrg else 85150f2e948Smrg lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 85250f2e948Smrg fi 85350f2e948Smrg # And add a safety zone 85450f2e948Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 85550f2e948Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 85650f2e948Smrg ;; 85745bc899bSmrg 85850f2e948Smrg interix*) 85950f2e948Smrg # We know the value 262144 and hardcode it with a safety zone (like BSD) 86050f2e948Smrg lt_cv_sys_max_cmd_len=196608 86150f2e948Smrg ;; 86250f2e948Smrg 86350f2e948Smrg osf*) 86450f2e948Smrg # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 86550f2e948Smrg # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 86650f2e948Smrg # nice to cause kernel panics so lets avoid the loop below. 86750f2e948Smrg # First set a reasonable default. 86850f2e948Smrg lt_cv_sys_max_cmd_len=16384 86950f2e948Smrg # 87050f2e948Smrg if test -x /sbin/sysconfig; then 87150f2e948Smrg case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 87250f2e948Smrg *1*) lt_cv_sys_max_cmd_len=-1 ;; 87350f2e948Smrg esac 87445bc899bSmrg fi 875226fade8Smrg ;; 87650f2e948Smrg sco3.2v5*) 87750f2e948Smrg lt_cv_sys_max_cmd_len=102400 8781ac89addSmrg ;; 87950f2e948Smrg sysv5* | sco5v6* | sysv4.2uw2*) 88050f2e948Smrg kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 88150f2e948Smrg if test -n "$kargmax"; then 8823a925b30Smrg lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` 88350f2e948Smrg else 88450f2e948Smrg lt_cv_sys_max_cmd_len=32768 88550f2e948Smrg fi 8861ac89addSmrg ;; 8871ac89addSmrg *) 88850f2e948Smrg lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 88950f2e948Smrg if test -n "$lt_cv_sys_max_cmd_len"; then 89050f2e948Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 89150f2e948Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 89250f2e948Smrg else 89350f2e948Smrg SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 8943a925b30Smrg while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \ 8953a925b30Smrg = "XX$teststring") >/dev/null 2>&1 && 8963a925b30Smrg new_result=`expr "X$teststring" : ".*" 2>&1` && 8973a925b30Smrg lt_cv_sys_max_cmd_len=$new_result && 89850f2e948Smrg test $i != 17 # 1/2 MB should be enough 89950f2e948Smrg do 90050f2e948Smrg i=`expr $i + 1` 90150f2e948Smrg teststring=$teststring$teststring 90250f2e948Smrg done 90350f2e948Smrg teststring= 9043a925b30Smrg # Add a significant safety factor because C++ compilers can tack on massive 9053a925b30Smrg # amounts of additional arguments before passing them to the linker. 9063a925b30Smrg # It appears as though 1/2 is a usable value. 90750f2e948Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 90850f2e948Smrg fi 9091ac89addSmrg ;; 9101ac89addSmrg esac 91150f2e948Smrg]) 91250f2e948Smrgif test -n $lt_cv_sys_max_cmd_len ; then 91350f2e948Smrg AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 91450f2e948Smrgelse 91550f2e948Smrg AC_MSG_RESULT(none) 91650f2e948Smrgfi 9173a925b30Smrg])# AC_LIBTOOL_SYS_MAX_CMD_LEN 91845bc899bSmrg 91945bc899bSmrg 9203a925b30Smrg# _LT_AC_CHECK_DLFCN 9213a925b30Smrg# ------------------ 9223a925b30SmrgAC_DEFUN([_LT_AC_CHECK_DLFCN], 9233a925b30Smrg[AC_CHECK_HEADERS(dlfcn.h)dnl 9243a925b30Smrg])# _LT_AC_CHECK_DLFCN 92545bc899bSmrg 926226fade8Smrg 9273a925b30Smrg# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 9283a925b30Smrg# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 9293a925b30Smrg# --------------------------------------------------------------------- 9303a925b30SmrgAC_DEFUN([_LT_AC_TRY_DLOPEN_SELF], 9313a925b30Smrg[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl 93250f2e948Smrgif test "$cross_compiling" = yes; then : 93350f2e948Smrg [$4] 93450f2e948Smrgelse 93550f2e948Smrg lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 93650f2e948Smrg lt_status=$lt_dlunknown 9373a925b30Smrg cat > conftest.$ac_ext <<EOF 93850f2e948Smrg[#line __oline__ "configure" 93950f2e948Smrg#include "confdefs.h" 94045bc899bSmrg 94150f2e948Smrg#if HAVE_DLFCN_H 94250f2e948Smrg#include <dlfcn.h> 94350f2e948Smrg#endif 94445bc899bSmrg 94550f2e948Smrg#include <stdio.h> 94645bc899bSmrg 94750f2e948Smrg#ifdef RTLD_GLOBAL 94850f2e948Smrg# define LT_DLGLOBAL RTLD_GLOBAL 94950f2e948Smrg#else 95050f2e948Smrg# ifdef DL_GLOBAL 95150f2e948Smrg# define LT_DLGLOBAL DL_GLOBAL 95250f2e948Smrg# else 95350f2e948Smrg# define LT_DLGLOBAL 0 95450f2e948Smrg# endif 95550f2e948Smrg#endif 95645bc899bSmrg 95750f2e948Smrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 95850f2e948Smrg find out it does not work in some platform. */ 95950f2e948Smrg#ifndef LT_DLLAZY_OR_NOW 96050f2e948Smrg# ifdef RTLD_LAZY 96150f2e948Smrg# define LT_DLLAZY_OR_NOW RTLD_LAZY 96250f2e948Smrg# else 96350f2e948Smrg# ifdef DL_LAZY 96450f2e948Smrg# define LT_DLLAZY_OR_NOW DL_LAZY 96550f2e948Smrg# else 96650f2e948Smrg# ifdef RTLD_NOW 96750f2e948Smrg# define LT_DLLAZY_OR_NOW RTLD_NOW 96850f2e948Smrg# else 96950f2e948Smrg# ifdef DL_NOW 97050f2e948Smrg# define LT_DLLAZY_OR_NOW DL_NOW 97150f2e948Smrg# else 97250f2e948Smrg# define LT_DLLAZY_OR_NOW 0 97350f2e948Smrg# endif 97450f2e948Smrg# endif 97550f2e948Smrg# endif 97650f2e948Smrg# endif 97750f2e948Smrg#endif 97845bc899bSmrg 9793a925b30Smrg#ifdef __cplusplus 9803a925b30Smrgextern "C" void exit (int); 9813a925b30Smrg#endif 9823a925b30Smrg 98350f2e948Smrgvoid fnord() { int i=42;} 98450f2e948Smrgint main () 98550f2e948Smrg{ 98650f2e948Smrg void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 98750f2e948Smrg int status = $lt_dlunknown; 98850f2e948Smrg 98950f2e948Smrg if (self) 99050f2e948Smrg { 99150f2e948Smrg if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 99250f2e948Smrg else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 99350f2e948Smrg /* dlclose (self); */ 99450f2e948Smrg } 99545bc899bSmrg else 99650f2e948Smrg puts (dlerror ()); 99745bc899bSmrg 9983a925b30Smrg exit (status); 99950f2e948Smrg}] 10003a925b30SmrgEOF 100150f2e948Smrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then 100250f2e948Smrg (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 100350f2e948Smrg lt_status=$? 100450f2e948Smrg case x$lt_status in 100550f2e948Smrg x$lt_dlno_uscore) $1 ;; 100650f2e948Smrg x$lt_dlneed_uscore) $2 ;; 100750f2e948Smrg x$lt_dlunknown|x*) $3 ;; 10081ac89addSmrg esac 100950f2e948Smrg else : 101050f2e948Smrg # compilation failed 101150f2e948Smrg $3 101245bc899bSmrg fi 101345bc899bSmrgfi 101450f2e948Smrgrm -fr conftest* 10153a925b30Smrg])# _LT_AC_TRY_DLOPEN_SELF 101645bc899bSmrg 1017226fade8Smrg 10183a925b30Smrg# AC_LIBTOOL_DLOPEN_SELF 10193a925b30Smrg# ---------------------- 10203a925b30SmrgAC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], 10213a925b30Smrg[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl 102250f2e948Smrgif test "x$enable_dlopen" != xyes; then 102350f2e948Smrg enable_dlopen=unknown 102450f2e948Smrg enable_dlopen_self=unknown 102550f2e948Smrg enable_dlopen_self_static=unknown 102650f2e948Smrgelse 102750f2e948Smrg lt_cv_dlopen=no 102850f2e948Smrg lt_cv_dlopen_libs= 1029226fade8Smrg 103050f2e948Smrg case $host_os in 103150f2e948Smrg beos*) 103250f2e948Smrg lt_cv_dlopen="load_add_on" 103350f2e948Smrg lt_cv_dlopen_libs= 103450f2e948Smrg lt_cv_dlopen_self=yes 103550f2e948Smrg ;; 1036226fade8Smrg 10373a925b30Smrg mingw* | pw32*) 103850f2e948Smrg lt_cv_dlopen="LoadLibrary" 103950f2e948Smrg lt_cv_dlopen_libs= 10403a925b30Smrg ;; 1041226fade8Smrg 104250f2e948Smrg cygwin*) 104350f2e948Smrg lt_cv_dlopen="dlopen" 104450f2e948Smrg lt_cv_dlopen_libs= 10453a925b30Smrg ;; 1046226fade8Smrg 104750f2e948Smrg darwin*) 104850f2e948Smrg # if libdl is installed we need to link against it 104950f2e948Smrg AC_CHECK_LIB([dl], [dlopen], 105050f2e948Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ 105150f2e948Smrg lt_cv_dlopen="dyld" 105250f2e948Smrg lt_cv_dlopen_libs= 105350f2e948Smrg lt_cv_dlopen_self=yes 105450f2e948Smrg ]) 10553a925b30Smrg ;; 1056226fade8Smrg 105750f2e948Smrg *) 105850f2e948Smrg AC_CHECK_FUNC([shl_load], 105950f2e948Smrg [lt_cv_dlopen="shl_load"], 106050f2e948Smrg [AC_CHECK_LIB([dld], [shl_load], 106150f2e948Smrg [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], 106250f2e948Smrg [AC_CHECK_FUNC([dlopen], 106350f2e948Smrg [lt_cv_dlopen="dlopen"], 106450f2e948Smrg [AC_CHECK_LIB([dl], [dlopen], 106550f2e948Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], 106650f2e948Smrg [AC_CHECK_LIB([svld], [dlopen], 106750f2e948Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], 106850f2e948Smrg [AC_CHECK_LIB([dld], [dld_link], 106950f2e948Smrg [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) 107050f2e948Smrg ]) 107150f2e948Smrg ]) 107250f2e948Smrg ]) 107350f2e948Smrg ]) 107450f2e948Smrg ]) 107550f2e948Smrg ;; 107650f2e948Smrg esac 1077226fade8Smrg 107850f2e948Smrg if test "x$lt_cv_dlopen" != xno; then 107950f2e948Smrg enable_dlopen=yes 108050f2e948Smrg else 108150f2e948Smrg enable_dlopen=no 108250f2e948Smrg fi 1083226fade8Smrg 108450f2e948Smrg case $lt_cv_dlopen in 108550f2e948Smrg dlopen) 108650f2e948Smrg save_CPPFLAGS="$CPPFLAGS" 108750f2e948Smrg test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 1088226fade8Smrg 108950f2e948Smrg save_LDFLAGS="$LDFLAGS" 109050f2e948Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 1091226fade8Smrg 109250f2e948Smrg save_LIBS="$LIBS" 109350f2e948Smrg LIBS="$lt_cv_dlopen_libs $LIBS" 1094226fade8Smrg 109550f2e948Smrg AC_CACHE_CHECK([whether a program can dlopen itself], 109650f2e948Smrg lt_cv_dlopen_self, [dnl 10973a925b30Smrg _LT_AC_TRY_DLOPEN_SELF( 109850f2e948Smrg lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 109950f2e948Smrg lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 110050f2e948Smrg ]) 1101226fade8Smrg 110250f2e948Smrg if test "x$lt_cv_dlopen_self" = xyes; then 110350f2e948Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 110450f2e948Smrg AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 11053a925b30Smrg lt_cv_dlopen_self_static, [dnl 11063a925b30Smrg _LT_AC_TRY_DLOPEN_SELF( 110750f2e948Smrg lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 110850f2e948Smrg lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 110950f2e948Smrg ]) 1110226fade8Smrg fi 1111226fade8Smrg 111250f2e948Smrg CPPFLAGS="$save_CPPFLAGS" 111350f2e948Smrg LDFLAGS="$save_LDFLAGS" 111450f2e948Smrg LIBS="$save_LIBS" 111550f2e948Smrg ;; 111650f2e948Smrg esac 1117226fade8Smrg 111850f2e948Smrg case $lt_cv_dlopen_self in 111950f2e948Smrg yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 112050f2e948Smrg *) enable_dlopen_self=unknown ;; 112150f2e948Smrg esac 1122226fade8Smrg 112350f2e948Smrg case $lt_cv_dlopen_self_static in 112450f2e948Smrg yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 112550f2e948Smrg *) enable_dlopen_self_static=unknown ;; 112650f2e948Smrg esac 112750f2e948Smrgfi 11283a925b30Smrg])# AC_LIBTOOL_DLOPEN_SELF 1129226fade8Smrg 1130226fade8Smrg 11313a925b30Smrg# AC_LIBTOOL_PROG_CC_C_O([TAGNAME]) 11323a925b30Smrg# --------------------------------- 11333a925b30Smrg# Check to see if options -c and -o are simultaneously supported by compiler 11343a925b30SmrgAC_DEFUN([AC_LIBTOOL_PROG_CC_C_O], 11353a925b30Smrg[AC_REQUIRE([LT_AC_PROG_SED])dnl 11363a925b30SmrgAC_REQUIRE([_LT_AC_SYS_COMPILER])dnl 113750f2e948SmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 11383a925b30Smrg [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 11393a925b30Smrg [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 11403a925b30Smrg $rm -r conftest 2>/dev/null 114150f2e948Smrg mkdir conftest 114250f2e948Smrg cd conftest 114350f2e948Smrg mkdir out 114450f2e948Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 1145226fade8Smrg 114650f2e948Smrg lt_compiler_flag="-o out/conftest2.$ac_objext" 114750f2e948Smrg # Insert the option either (1) after the last *FLAGS variable, or 114850f2e948Smrg # (2) before a word containing "conftest.", or (3) at the end. 114950f2e948Smrg # Note that $ac_compile itself does not contain backslashes and begins 115050f2e948Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 115150f2e948Smrg lt_compile=`echo "$ac_compile" | $SED \ 115250f2e948Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 115350f2e948Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 115450f2e948Smrg -e 's:$: $lt_compiler_flag:'` 115550f2e948Smrg (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 115650f2e948Smrg (eval "$lt_compile" 2>out/conftest.err) 115750f2e948Smrg ac_status=$? 115850f2e948Smrg cat out/conftest.err >&AS_MESSAGE_LOG_FD 115950f2e948Smrg echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 116050f2e948Smrg if (exit $ac_status) && test -s out/conftest2.$ac_objext 116150f2e948Smrg then 116250f2e948Smrg # The compiler can only warn and ignore the option if not recognized 116350f2e948Smrg # So say no if there are warnings 11643a925b30Smrg $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp 116550f2e948Smrg $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 116650f2e948Smrg if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 11673a925b30Smrg _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 116850f2e948Smrg fi 116950f2e948Smrg fi 117050f2e948Smrg chmod u+w . 2>&AS_MESSAGE_LOG_FD 11713a925b30Smrg $rm conftest* 117250f2e948Smrg # SGI C++ compiler will create directory out/ii_files/ for 117350f2e948Smrg # template instantiation 11743a925b30Smrg test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files 11753a925b30Smrg $rm out/* && rmdir out 117650f2e948Smrg cd .. 11773a925b30Smrg rmdir conftest 11783a925b30Smrg $rm conftest* 117950f2e948Smrg]) 11803a925b30Smrg])# AC_LIBTOOL_PROG_CC_C_O 1181226fade8Smrg 1182226fade8Smrg 11833a925b30Smrg# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME]) 11843a925b30Smrg# ----------------------------------------- 118550f2e948Smrg# Check to see if we can do hard links to lock some files if needed 11863a925b30SmrgAC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], 11873a925b30Smrg[AC_REQUIRE([_LT_AC_LOCK])dnl 1188226fade8Smrg 118950f2e948Smrghard_links="nottested" 11903a925b30Smrgif test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then 119150f2e948Smrg # do not overwrite the value of need_locks provided by the user 119250f2e948Smrg AC_MSG_CHECKING([if we can lock with hard links]) 119350f2e948Smrg hard_links=yes 11943a925b30Smrg $rm conftest* 119550f2e948Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 119650f2e948Smrg touch conftest.a 119750f2e948Smrg ln conftest.a conftest.b 2>&5 || hard_links=no 119850f2e948Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 119950f2e948Smrg AC_MSG_RESULT([$hard_links]) 120050f2e948Smrg if test "$hard_links" = no; then 120150f2e948Smrg AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) 120250f2e948Smrg need_locks=warn 120350f2e948Smrg fi 120450f2e948Smrgelse 120550f2e948Smrg need_locks=no 120650f2e948Smrgfi 12073a925b30Smrg])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS 1208226fade8Smrg 1209226fade8Smrg 12103a925b30Smrg# AC_LIBTOOL_OBJDIR 12113a925b30Smrg# ----------------- 12123a925b30SmrgAC_DEFUN([AC_LIBTOOL_OBJDIR], 121350f2e948Smrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 121450f2e948Smrg[rm -f .libs 2>/dev/null 121550f2e948Smrgmkdir .libs 2>/dev/null 121650f2e948Smrgif test -d .libs; then 121750f2e948Smrg lt_cv_objdir=.libs 121850f2e948Smrgelse 121950f2e948Smrg # MS-DOS does not allow filenames that begin with a dot. 122050f2e948Smrg lt_cv_objdir=_libs 122150f2e948Smrgfi 122250f2e948Smrgrmdir .libs 2>/dev/null]) 122350f2e948Smrgobjdir=$lt_cv_objdir 12243a925b30Smrg])# AC_LIBTOOL_OBJDIR 1225226fade8Smrg 1226226fade8Smrg 12273a925b30Smrg# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME]) 12283a925b30Smrg# ---------------------------------------------- 122950f2e948Smrg# Check hardcoding attributes. 12303a925b30SmrgAC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], 123150f2e948Smrg[AC_MSG_CHECKING([how to hardcode library paths into programs]) 12323a925b30Smrg_LT_AC_TAGVAR(hardcode_action, $1)= 12333a925b30Smrgif test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \ 12343a925b30Smrg test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \ 12353a925b30Smrg test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then 123645bc899bSmrg 12373a925b30Smrg # We can hardcode non-existant directories. 12383a925b30Smrg if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no && 123950f2e948Smrg # If the only mechanism to avoid hardcoding is shlibpath_var, we 124050f2e948Smrg # have to relink, otherwise we might link with an installed library 124150f2e948Smrg # when we should be linking with a yet-to-be-installed one 12423a925b30Smrg ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no && 12433a925b30Smrg test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then 124450f2e948Smrg # Linking always hardcodes the temporary library directory. 12453a925b30Smrg _LT_AC_TAGVAR(hardcode_action, $1)=relink 124650f2e948Smrg else 124750f2e948Smrg # We can link without hardcoding, and we can hardcode nonexisting dirs. 12483a925b30Smrg _LT_AC_TAGVAR(hardcode_action, $1)=immediate 124950f2e948Smrg fi 125050f2e948Smrgelse 125150f2e948Smrg # We cannot hardcode anything, or else we can only hardcode existing 125250f2e948Smrg # directories. 12533a925b30Smrg _LT_AC_TAGVAR(hardcode_action, $1)=unsupported 125450f2e948Smrgfi 12553a925b30SmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)]) 1256226fade8Smrg 12573a925b30Smrgif test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then 125850f2e948Smrg # Fast installation is not supported 125950f2e948Smrg enable_fast_install=no 126050f2e948Smrgelif test "$shlibpath_overrides_runpath" = yes || 126150f2e948Smrg test "$enable_shared" = no; then 126250f2e948Smrg # Fast installation is not necessary 126350f2e948Smrg enable_fast_install=needless 126450f2e948Smrgfi 12653a925b30Smrg])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH 1266226fade8Smrg 1267226fade8Smrg 12683a925b30Smrg# AC_LIBTOOL_SYS_LIB_STRIP 12693a925b30Smrg# ------------------------ 12703a925b30SmrgAC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP], 12713a925b30Smrg[striplib= 127250f2e948Smrgold_striplib= 127350f2e948SmrgAC_MSG_CHECKING([whether stripping libraries is possible]) 12743a925b30Smrgif test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then 127550f2e948Smrg test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" 127650f2e948Smrg test -z "$striplib" && striplib="$STRIP --strip-unneeded" 127750f2e948Smrg AC_MSG_RESULT([yes]) 127850f2e948Smrgelse 127950f2e948Smrg# FIXME - insert some real tests, host_os isn't really good enough 128050f2e948Smrg case $host_os in 12813a925b30Smrg darwin*) 12823a925b30Smrg if test -n "$STRIP" ; then 12833a925b30Smrg striplib="$STRIP -x" 12843a925b30Smrg old_striplib="$STRIP -S" 12853a925b30Smrg AC_MSG_RESULT([yes]) 12863a925b30Smrg else 12873a925b30Smrg AC_MSG_RESULT([no]) 12883a925b30Smrgfi 12893a925b30Smrg ;; 12903a925b30Smrg *) 12913a925b30Smrg AC_MSG_RESULT([no]) 129250f2e948Smrg ;; 129350f2e948Smrg esac 129450f2e948Smrgfi 12953a925b30Smrg])# AC_LIBTOOL_SYS_LIB_STRIP 129645bc899bSmrg 129745bc899bSmrg 12983a925b30Smrg# AC_LIBTOOL_SYS_DYNAMIC_LINKER 129950f2e948Smrg# ----------------------------- 130050f2e948Smrg# PORTME Fill in your ld.so characteristics 13013a925b30SmrgAC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER], 13023a925b30Smrg[AC_REQUIRE([LT_AC_PROG_SED])dnl 130350f2e948SmrgAC_MSG_CHECKING([dynamic linker characteristics]) 13043a925b30Smrglibrary_names_spec= 13053a925b30Smrglibname_spec='lib$name' 13063a925b30Smrgsoname_spec= 13073a925b30Smrgshrext_cmds=".so" 13083a925b30Smrgpostinstall_cmds= 13093a925b30Smrgpostuninstall_cmds= 13103a925b30Smrgfinish_cmds= 13113a925b30Smrgfinish_eval= 13123a925b30Smrgshlibpath_var= 13133a925b30Smrgshlibpath_overrides_runpath=unknown 13143a925b30Smrgversion_type=none 13153a925b30Smrgdynamic_linker="$host_os ld.so" 13163a925b30Smrgsys_lib_dlsearch_path_spec="/lib /usr/lib" 13173a925b30Smrgm4_if($1,[],[ 131850f2e948Smrgif test "$GCC" = yes; then 131950f2e948Smrg case $host_os in 132050f2e948Smrg darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; 132150f2e948Smrg *) lt_awk_arg="/^libraries:/" ;; 132250f2e948Smrg esac 132350f2e948Smrg lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` 13243a925b30Smrg if echo "$lt_search_path_spec" | grep ';' >/dev/null ; then 132550f2e948Smrg # if the path contains ";" then we assume it to be the separator 132650f2e948Smrg # otherwise default to the standard path separator (i.e. ":") - it is 132750f2e948Smrg # assumed that no part of a normal pathname contains ";" but that should 132850f2e948Smrg # okay in the real world where ";" in dirpaths is itself problematic. 13293a925b30Smrg lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e 's/;/ /g'` 133050f2e948Smrg else 13313a925b30Smrg lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 133250f2e948Smrg fi 133350f2e948Smrg # Ok, now we have the path, separated by spaces, we can step through it 133450f2e948Smrg # and add multilib dir if necessary. 133550f2e948Smrg lt_tmp_lt_search_path_spec= 133650f2e948Smrg lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 133750f2e948Smrg for lt_sys_path in $lt_search_path_spec; do 133850f2e948Smrg if test -d "$lt_sys_path/$lt_multi_os_dir"; then 133950f2e948Smrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" 134050f2e948Smrg else 134150f2e948Smrg test -d "$lt_sys_path" && \ 134250f2e948Smrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 13431ac89addSmrg fi 13441ac89addSmrg done 13453a925b30Smrg lt_search_path_spec=`echo $lt_tmp_lt_search_path_spec | awk ' 134650f2e948SmrgBEGIN {RS=" "; FS="/|\n";} { 134750f2e948Smrg lt_foo=""; 134850f2e948Smrg lt_count=0; 134950f2e948Smrg for (lt_i = NF; lt_i > 0; lt_i--) { 135050f2e948Smrg if ($lt_i != "" && $lt_i != ".") { 135150f2e948Smrg if ($lt_i == "..") { 135250f2e948Smrg lt_count++; 135350f2e948Smrg } else { 135450f2e948Smrg if (lt_count == 0) { 135550f2e948Smrg lt_foo="/" $lt_i lt_foo; 135650f2e948Smrg } else { 135750f2e948Smrg lt_count--; 135850f2e948Smrg } 135950f2e948Smrg } 136050f2e948Smrg } 136150f2e948Smrg } 136250f2e948Smrg if (lt_foo != "") { lt_freq[[lt_foo]]++; } 136350f2e948Smrg if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 136450f2e948Smrg}'` 13653a925b30Smrg sys_lib_search_path_spec=`echo $lt_search_path_spec` 13661ac89addSmrgelse 136750f2e948Smrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 136850f2e948Smrgfi]) 136950f2e948Smrgneed_lib_prefix=unknown 137050f2e948Smrghardcode_into_libs=no 137145bc899bSmrg 137250f2e948Smrg# when you set need_version to no, make sure it does not cause -set_version 137350f2e948Smrg# flags to be left without arguments 137450f2e948Smrgneed_version=unknown 137545bc899bSmrg 137650f2e948Smrgcase $host_os in 137750f2e948Smrgaix3*) 137850f2e948Smrg version_type=linux 137950f2e948Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' 138050f2e948Smrg shlibpath_var=LIBPATH 138145bc899bSmrg 138250f2e948Smrg # AIX 3 has no versioning support, so we append a major version to the name. 138350f2e948Smrg soname_spec='${libname}${release}${shared_ext}$major' 138450f2e948Smrg ;; 138545bc899bSmrg 138650f2e948Smrgaix[[4-9]]*) 138750f2e948Smrg version_type=linux 138850f2e948Smrg need_lib_prefix=no 138950f2e948Smrg need_version=no 139050f2e948Smrg hardcode_into_libs=yes 139150f2e948Smrg if test "$host_cpu" = ia64; then 139250f2e948Smrg # AIX 5 supports IA64 139350f2e948Smrg library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' 139450f2e948Smrg shlibpath_var=LD_LIBRARY_PATH 139550f2e948Smrg else 139650f2e948Smrg # With GCC up to 2.95.x, collect2 would create an import file 139750f2e948Smrg # for dependence libraries. The import file would start with 139850f2e948Smrg # the line `#! .'. This would cause the generated library to 139950f2e948Smrg # depend on `.', always an invalid library. This was fixed in 140050f2e948Smrg # development snapshots of GCC prior to 3.0. 140150f2e948Smrg case $host_os in 140250f2e948Smrg aix4 | aix4.[[01]] | aix4.[[01]].*) 140350f2e948Smrg if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 140450f2e948Smrg echo ' yes ' 14053a925b30Smrg echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then 140650f2e948Smrg : 140750f2e948Smrg else 140850f2e948Smrg can_build_shared=no 140950f2e948Smrg fi 14101ac89addSmrg ;; 141150f2e948Smrg esac 141250f2e948Smrg # AIX (on Power*) has no versioning support, so currently we can not hardcode correct 141350f2e948Smrg # soname into executable. Probably we can add versioning support to 141450f2e948Smrg # collect2, so additional links can be useful in future. 141550f2e948Smrg if test "$aix_use_runtimelinking" = yes; then 141650f2e948Smrg # If using run time linking (on AIX 4.2 or later) use lib<name>.so 141750f2e948Smrg # instead of lib<name>.a to let people know that these are not 141850f2e948Smrg # typical AIX shared libraries. 141950f2e948Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 142050f2e948Smrg else 142150f2e948Smrg # We preserve .a as extension for shared libraries through AIX4.2 142250f2e948Smrg # and later when we are not doing run time linking. 142350f2e948Smrg library_names_spec='${libname}${release}.a $libname.a' 142450f2e948Smrg soname_spec='${libname}${release}${shared_ext}$major' 14251ac89addSmrg fi 142650f2e948Smrg shlibpath_var=LIBPATH 142750f2e948Smrg fi 14281ac89addSmrg ;; 142945bc899bSmrg 143050f2e948Smrgamigaos*) 14313a925b30Smrg library_names_spec='$libname.ixlibrary $libname.a' 14323a925b30Smrg # Create ${libname}_ixlibrary.a entries in /sys/libs. 14333a925b30Smrg 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' 14341ac89addSmrg ;; 143545bc899bSmrg 14361ac89addSmrgbeos*) 143750f2e948Smrg library_names_spec='${libname}${shared_ext}' 143850f2e948Smrg dynamic_linker="$host_os ld.so" 143950f2e948Smrg shlibpath_var=LIBRARY_PATH 14401ac89addSmrg ;; 144145bc899bSmrg 14421ac89addSmrgbsdi[[45]]*) 144350f2e948Smrg version_type=linux 144450f2e948Smrg need_version=no 144550f2e948Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 144650f2e948Smrg soname_spec='${libname}${release}${shared_ext}$major' 144750f2e948Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 144850f2e948Smrg shlibpath_var=LD_LIBRARY_PATH 144950f2e948Smrg sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 145050f2e948Smrg sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 145150f2e948Smrg # the default ld.so.conf also contains /usr/contrib/lib and 145250f2e948Smrg # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 145350f2e948Smrg # libtool to hard-code these into programs 14541ac89addSmrg ;; 145545bc899bSmrg 14563a925b30Smrgcygwin* | mingw* | pw32*) 145750f2e948Smrg version_type=windows 145850f2e948Smrg shrext_cmds=".dll" 145950f2e948Smrg need_version=no 146050f2e948Smrg need_lib_prefix=no 146145bc899bSmrg 146250f2e948Smrg case $GCC,$host_os in 14633a925b30Smrg yes,cygwin* | yes,mingw* | yes,pw32*) 146450f2e948Smrg library_names_spec='$libname.dll.a' 146550f2e948Smrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 146650f2e948Smrg postinstall_cmds='base_file=`basename \${file}`~ 14673a925b30Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ 146850f2e948Smrg dldir=$destdir/`dirname \$dlpath`~ 146950f2e948Smrg test -d \$dldir || mkdir -p \$dldir~ 147050f2e948Smrg $install_prog $dir/$dlname \$dldir/$dlname~ 14713a925b30Smrg chmod a+x \$dldir/$dlname' 147250f2e948Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 147350f2e948Smrg dlpath=$dir/\$dldll~ 14743a925b30Smrg $rm \$dlpath' 147550f2e948Smrg shlibpath_overrides_runpath=yes 147645bc899bSmrg 147750f2e948Smrg case $host_os in 147850f2e948Smrg cygwin*) 147950f2e948Smrg # Cygwin DLLs use 'cyg' prefix rather than 'lib' 148050f2e948Smrg soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 148150f2e948Smrg sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" 148250f2e948Smrg ;; 14833a925b30Smrg mingw*) 148450f2e948Smrg # MinGW DLLs use traditional 'lib' prefix 148550f2e948Smrg soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 14863a925b30Smrg sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` 14873a925b30Smrg if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then 148850f2e948Smrg # It is most probably a Windows format PATH printed by 148950f2e948Smrg # mingw gcc, but we are running on Cygwin. Gcc prints its search 149050f2e948Smrg # path with ; separators, and with drive letters. We can handle the 149150f2e948Smrg # drive letters (cygwin fileutils understands them), so leave them, 149250f2e948Smrg # especially as we might pass files found there to a mingw objdump, 149350f2e948Smrg # which wouldn't understand a cygwinified path. Ahh. 14943a925b30Smrg sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 149550f2e948Smrg else 14963a925b30Smrg sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 149750f2e948Smrg fi 149850f2e948Smrg ;; 149950f2e948Smrg pw32*) 150050f2e948Smrg # pw32 DLLs use 'pw' prefix rather than 'lib' 150150f2e948Smrg library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 150245bc899bSmrg ;; 150345bc899bSmrg esac 150450f2e948Smrg ;; 150545bc899bSmrg 150650f2e948Smrg *) 150750f2e948Smrg library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' 150850f2e948Smrg ;; 150950f2e948Smrg esac 151050f2e948Smrg dynamic_linker='Win32 ld.exe' 151150f2e948Smrg # FIXME: first we should search . and the directory the executable is in 151250f2e948Smrg shlibpath_var=PATH 15131ac89addSmrg ;; 151445bc899bSmrg 151550f2e948Smrgdarwin* | rhapsody*) 151650f2e948Smrg dynamic_linker="$host_os dyld" 151750f2e948Smrg version_type=darwin 151850f2e948Smrg need_lib_prefix=no 151950f2e948Smrg need_version=no 15203a925b30Smrg library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' 152150f2e948Smrg soname_spec='${libname}${release}${major}$shared_ext' 152250f2e948Smrg shlibpath_overrides_runpath=yes 152350f2e948Smrg shlibpath_var=DYLD_LIBRARY_PATH 152450f2e948Smrg shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 15253a925b30Smrg m4_if([$1], [],[ 15263a925b30Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 152750f2e948Smrg sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 152850f2e948Smrg ;; 152950f2e948Smrg 153050f2e948Smrgdgux*) 153150f2e948Smrg version_type=linux 153250f2e948Smrg need_lib_prefix=no 153350f2e948Smrg need_version=no 153450f2e948Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' 153550f2e948Smrg soname_spec='${libname}${release}${shared_ext}$major' 153650f2e948Smrg shlibpath_var=LD_LIBRARY_PATH 153750f2e948Smrg ;; 153850f2e948Smrg 153950f2e948Smrgfreebsd1*) 154050f2e948Smrg dynamic_linker=no 154150f2e948Smrg ;; 154250f2e948Smrg 154350f2e948Smrgfreebsd* | dragonfly*) 154450f2e948Smrg # DragonFly does not have aout. When/if they implement a new 154550f2e948Smrg # versioning mechanism, adjust this. 154650f2e948Smrg if test -x /usr/bin/objformat; then 154750f2e948Smrg objformat=`/usr/bin/objformat` 154850f2e948Smrg else 154950f2e948Smrg case $host_os in 155050f2e948Smrg freebsd[[123]]*) objformat=aout ;; 155150f2e948Smrg *) objformat=elf ;; 155250f2e948Smrg esac 155350f2e948Smrg fi 155450f2e948Smrg version_type=freebsd-$objformat 155550f2e948Smrg case $version_type in 155650f2e948Smrg freebsd-elf*) 155750f2e948Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 155850f2e948Smrg need_version=no 155950f2e948Smrg need_lib_prefix=no 156050f2e948Smrg ;; 156150f2e948Smrg freebsd-*) 156250f2e948Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' 156350f2e948Smrg need_version=yes 156450f2e948Smrg ;; 156550f2e948Smrg esac 156650f2e948Smrg shlibpath_var=LD_LIBRARY_PATH 156750f2e948Smrg case $host_os in 156850f2e948Smrg freebsd2*) 156950f2e948Smrg shlibpath_overrides_runpath=yes 157050f2e948Smrg ;; 157150f2e948Smrg freebsd3.[[01]]* | freebsdelf3.[[01]]*) 157250f2e948Smrg shlibpath_overrides_runpath=yes 157350f2e948Smrg hardcode_into_libs=yes 157450f2e948Smrg ;; 157550f2e948Smrg freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 157650f2e948Smrg freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 157750f2e948Smrg shlibpath_overrides_runpath=no 157850f2e948Smrg hardcode_into_libs=yes 157950f2e948Smrg ;; 158050f2e948Smrg *) # from 4.6 on, and DragonFly 158150f2e948Smrg shlibpath_overrides_runpath=yes 158250f2e948Smrg hardcode_into_libs=yes 158350f2e948Smrg ;; 158450f2e948Smrg esac 158550f2e948Smrg ;; 158650f2e948Smrg 158750f2e948Smrggnu*) 158850f2e948Smrg version_type=linux 158950f2e948Smrg need_lib_prefix=no 159050f2e948Smrg need_version=no 159150f2e948Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 159250f2e948Smrg soname_spec='${libname}${release}${shared_ext}$major' 159350f2e948Smrg shlibpath_var=LD_LIBRARY_PATH 159450f2e948Smrg hardcode_into_libs=yes 159550f2e948Smrg ;; 159650f2e948Smrg 159750f2e948Smrghpux9* | hpux10* | hpux11*) 159850f2e948Smrg # Give a soname corresponding to the major version so that dld.sl refuses to 159950f2e948Smrg # link against other versions. 160050f2e948Smrg version_type=sunos 160150f2e948Smrg need_lib_prefix=no 160250f2e948Smrg need_version=no 160350f2e948Smrg case $host_cpu in 16041ac89addSmrg ia64*) 160550f2e948Smrg shrext_cmds='.so' 160650f2e948Smrg hardcode_into_libs=yes 160750f2e948Smrg dynamic_linker="$host_os dld.so" 160850f2e948Smrg shlibpath_var=LD_LIBRARY_PATH 160950f2e948Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 161050f2e948Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 161150f2e948Smrg soname_spec='${libname}${release}${shared_ext}$major' 161250f2e948Smrg if test "X$HPUX_IA64_MODE" = X32; then 161350f2e948Smrg sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 161450f2e948Smrg else 161550f2e948Smrg sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 161650f2e948Smrg fi 161750f2e948Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 161845bc899bSmrg ;; 16193a925b30Smrg hppa*64*) 16203a925b30Smrg shrext_cmds='.sl' 16213a925b30Smrg hardcode_into_libs=yes 16223a925b30Smrg dynamic_linker="$host_os dld.sl" 16233a925b30Smrg shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 16243a925b30Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 16253a925b30Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 16263a925b30Smrg soname_spec='${libname}${release}${shared_ext}$major' 16273a925b30Smrg sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 16283a925b30Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 16293a925b30Smrg ;; 16303a925b30Smrg *) 163150f2e948Smrg shrext_cmds='.sl' 163250f2e948Smrg dynamic_linker="$host_os dld.sl" 163350f2e948Smrg shlibpath_var=SHLIB_PATH 163450f2e948Smrg shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 163550f2e948Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 163650f2e948Smrg soname_spec='${libname}${release}${shared_ext}$major' 163745bc899bSmrg ;; 16381ac89addSmrg esac 163950f2e948Smrg # HP-UX runs *really* slowly unless shared libraries are mode 555. 164050f2e948Smrg postinstall_cmds='chmod 555 $lib' 16411ac89addSmrg ;; 164245bc899bSmrg 164350f2e948Smrginterix[[3-9]]*) 164450f2e948Smrg version_type=linux 164550f2e948Smrg need_lib_prefix=no 164650f2e948Smrg need_version=no 164750f2e948Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 164850f2e948Smrg soname_spec='${libname}${release}${shared_ext}$major' 164950f2e948Smrg dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 165050f2e948Smrg shlibpath_var=LD_LIBRARY_PATH 165150f2e948Smrg shlibpath_overrides_runpath=no 165250f2e948Smrg hardcode_into_libs=yes 16531ac89addSmrg ;; 165445bc899bSmrg 16551ac89addSmrgirix5* | irix6* | nonstopux*) 165650f2e948Smrg case $host_os in 165750f2e948Smrg nonstopux*) version_type=nonstopux ;; 165850f2e948Smrg *) 165950f2e948Smrg if test "$lt_cv_prog_gnu_ld" = yes; then 166050f2e948Smrg version_type=linux 166150f2e948Smrg else 166250f2e948Smrg version_type=irix 166350f2e948Smrg fi ;; 16641ac89addSmrg esac 166550f2e948Smrg need_lib_prefix=no 166650f2e948Smrg need_version=no 166750f2e948Smrg soname_spec='${libname}${release}${shared_ext}$major' 166850f2e948Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' 166950f2e948Smrg case $host_os in 167050f2e948Smrg irix5* | nonstopux*) 167150f2e948Smrg libsuff= shlibsuff= 167250f2e948Smrg ;; 167350f2e948Smrg *) 167450f2e948Smrg case $LD in # libtool.m4 will add one of these switches to LD 167550f2e948Smrg *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 167650f2e948Smrg libsuff= shlibsuff= libmagic=32-bit;; 167750f2e948Smrg *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 167850f2e948Smrg libsuff=32 shlibsuff=N32 libmagic=N32;; 167950f2e948Smrg *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 168050f2e948Smrg libsuff=64 shlibsuff=64 libmagic=64-bit;; 168150f2e948Smrg *) libsuff= shlibsuff= libmagic=never-match;; 168250f2e948Smrg esac 168350f2e948Smrg ;; 168450f2e948Smrg esac 168550f2e948Smrg shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 168650f2e948Smrg shlibpath_overrides_runpath=no 168750f2e948Smrg sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" 168850f2e948Smrg sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" 168950f2e948Smrg hardcode_into_libs=yes 169050f2e948Smrg ;; 169150f2e948Smrg 169250f2e948Smrg# No shared lib support for Linux oldld, aout, or coff. 169350f2e948Smrglinux*oldld* | linux*aout* | linux*coff*) 169450f2e948Smrg dynamic_linker=no 16951ac89addSmrg ;; 169645bc899bSmrg 16971ac89addSmrg# This must be Linux ELF. 169850f2e948Smrglinux* | k*bsd*-gnu) 169950f2e948Smrg version_type=linux 170050f2e948Smrg need_lib_prefix=no 170150f2e948Smrg need_version=no 170250f2e948Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 170350f2e948Smrg soname_spec='${libname}${release}${shared_ext}$major' 170450f2e948Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 170550f2e948Smrg shlibpath_var=LD_LIBRARY_PATH 170650f2e948Smrg shlibpath_overrides_runpath=no 170750f2e948Smrg # This implies no fast_install, which is unacceptable. 170850f2e948Smrg # Some rework will be needed to allow for fast_install 170950f2e948Smrg # before this can be enabled. 171050f2e948Smrg hardcode_into_libs=yes 17113a925b30Smrg sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" 17123a925b30Smrg sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" 171350f2e948Smrg 171450f2e948Smrg # Append ld.so.conf contents to the search path 171550f2e948Smrg if test -f /etc/ld.so.conf; then 17163a925b30Smrg 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' ' '` 17173a925b30Smrg sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra" 171850f2e948Smrg fi 171950f2e948Smrg 172050f2e948Smrg # We used to test for /lib/ld.so.1 and disable shared libraries on 172150f2e948Smrg # powerpc, because MkLinux only supported shared libraries with the 172250f2e948Smrg # GNU dynamic linker. Since this was broken with cross compilers, 172350f2e948Smrg # most powerpc-linux boxes support dynamic linking these days and 172450f2e948Smrg # people can always --disable-shared, the test was removed, and we 172550f2e948Smrg # assume the GNU/Linux dynamic linker is in use. 172650f2e948Smrg dynamic_linker='GNU/Linux ld.so' 17271ac89addSmrg ;; 172845bc899bSmrg 17291ac89addSmrgnetbsd*) 173050f2e948Smrg version_type=sunos 173150f2e948Smrg need_lib_prefix=no 173250f2e948Smrg need_version=no 17333a925b30Smrg if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then 173450f2e948Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 173550f2e948Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 173650f2e948Smrg dynamic_linker='NetBSD (a.out) ld.so' 17371ac89addSmrg else 173850f2e948Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 173950f2e948Smrg soname_spec='${libname}${release}${shared_ext}$major' 174050f2e948Smrg dynamic_linker='NetBSD ld.elf_so' 17411ac89addSmrg fi 174250f2e948Smrg shlibpath_var=LD_LIBRARY_PATH 174350f2e948Smrg shlibpath_overrides_runpath=yes 174450f2e948Smrg hardcode_into_libs=yes 17451ac89addSmrg ;; 174645bc899bSmrg 174750f2e948Smrgnewsos6) 174850f2e948Smrg version_type=linux 174950f2e948Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 175050f2e948Smrg shlibpath_var=LD_LIBRARY_PATH 175150f2e948Smrg shlibpath_overrides_runpath=yes 17521ac89addSmrg ;; 175345bc899bSmrg 17543a925b30Smrgnto-qnx*) 17553a925b30Smrg version_type=linux 175650f2e948Smrg need_lib_prefix=no 175750f2e948Smrg need_version=no 175850f2e948Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 175950f2e948Smrg soname_spec='${libname}${release}${shared_ext}$major' 176050f2e948Smrg shlibpath_var=LD_LIBRARY_PATH 17613a925b30Smrg shlibpath_overrides_runpath=yes 17621ac89addSmrg ;; 176345bc899bSmrg 17641ac89addSmrgopenbsd*) 176550f2e948Smrg version_type=sunos 176650f2e948Smrg sys_lib_dlsearch_path_spec="/usr/lib" 176750f2e948Smrg need_lib_prefix=no 176850f2e948Smrg # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. 176950f2e948Smrg case $host_os in 17703a925b30Smrg openbsd3.3 | openbsd3.3.*) need_version=yes ;; 17713a925b30Smrg *) need_version=no ;; 177250f2e948Smrg esac 177350f2e948Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 177450f2e948Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 177550f2e948Smrg shlibpath_var=LD_LIBRARY_PATH 17763a925b30Smrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 177750f2e948Smrg case $host_os in 177850f2e948Smrg openbsd2.[[89]] | openbsd2.[[89]].*) 177950f2e948Smrg shlibpath_overrides_runpath=no 178050f2e948Smrg ;; 178150f2e948Smrg *) 178250f2e948Smrg shlibpath_overrides_runpath=yes 178350f2e948Smrg ;; 178450f2e948Smrg esac 17851ac89addSmrg else 178650f2e948Smrg shlibpath_overrides_runpath=yes 17871ac89addSmrg fi 17881ac89addSmrg ;; 178945bc899bSmrg 179050f2e948Smrgos2*) 179150f2e948Smrg libname_spec='$name' 179250f2e948Smrg shrext_cmds=".dll" 179350f2e948Smrg need_lib_prefix=no 179450f2e948Smrg library_names_spec='$libname${shared_ext} $libname.a' 179550f2e948Smrg dynamic_linker='OS/2 ld.exe' 179650f2e948Smrg shlibpath_var=LIBPATH 17971ac89addSmrg ;; 17981ac89addSmrg 179950f2e948Smrgosf3* | osf4* | osf5*) 180050f2e948Smrg version_type=osf 180150f2e948Smrg need_lib_prefix=no 180250f2e948Smrg need_version=no 180350f2e948Smrg soname_spec='${libname}${release}${shared_ext}$major' 180450f2e948Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 180550f2e948Smrg shlibpath_var=LD_LIBRARY_PATH 180650f2e948Smrg sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 180750f2e948Smrg sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" 18081ac89addSmrg ;; 180945bc899bSmrg 181050f2e948Smrgrdos*) 181150f2e948Smrg dynamic_linker=no 18121ac89addSmrg ;; 181345bc899bSmrg 181450f2e948Smrgsolaris*) 181550f2e948Smrg version_type=linux 181650f2e948Smrg need_lib_prefix=no 181750f2e948Smrg need_version=no 181850f2e948Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 181950f2e948Smrg soname_spec='${libname}${release}${shared_ext}$major' 182050f2e948Smrg shlibpath_var=LD_LIBRARY_PATH 182150f2e948Smrg shlibpath_overrides_runpath=yes 182250f2e948Smrg hardcode_into_libs=yes 182350f2e948Smrg # ldd complains unless libraries are executable 182450f2e948Smrg postinstall_cmds='chmod +x $lib' 182550f2e948Smrg ;; 182645bc899bSmrg 182750f2e948Smrgsunos4*) 182850f2e948Smrg version_type=sunos 182950f2e948Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 183050f2e948Smrg finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 183150f2e948Smrg shlibpath_var=LD_LIBRARY_PATH 183250f2e948Smrg shlibpath_overrides_runpath=yes 183350f2e948Smrg if test "$with_gnu_ld" = yes; then 183450f2e948Smrg need_lib_prefix=no 18351ac89addSmrg fi 183650f2e948Smrg need_version=yes 183745bc899bSmrg ;; 183845bc899bSmrg 183950f2e948Smrgsysv4 | sysv4.3*) 184050f2e948Smrg version_type=linux 184150f2e948Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 184250f2e948Smrg soname_spec='${libname}${release}${shared_ext}$major' 184350f2e948Smrg shlibpath_var=LD_LIBRARY_PATH 184450f2e948Smrg case $host_vendor in 184550f2e948Smrg sni) 184650f2e948Smrg shlibpath_overrides_runpath=no 184750f2e948Smrg need_lib_prefix=no 18483a925b30Smrg export_dynamic_flag_spec='${wl}-Blargedynsym' 184950f2e948Smrg runpath_var=LD_RUN_PATH 185050f2e948Smrg ;; 185150f2e948Smrg siemens) 185250f2e948Smrg need_lib_prefix=no 185350f2e948Smrg ;; 185450f2e948Smrg motorola) 185550f2e948Smrg need_lib_prefix=no 185650f2e948Smrg need_version=no 185750f2e948Smrg shlibpath_overrides_runpath=no 185850f2e948Smrg sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 185950f2e948Smrg ;; 1860226fade8Smrg esac 186150f2e948Smrg ;; 186245bc899bSmrg 186350f2e948Smrgsysv4*MP*) 186450f2e948Smrg if test -d /usr/nec ;then 186550f2e948Smrg version_type=linux 186650f2e948Smrg library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' 186750f2e948Smrg soname_spec='$libname${shared_ext}.$major' 186850f2e948Smrg shlibpath_var=LD_LIBRARY_PATH 186950f2e948Smrg fi 187050f2e948Smrg ;; 187145bc899bSmrg 187250f2e948Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 187350f2e948Smrg version_type=freebsd-elf 187450f2e948Smrg need_lib_prefix=no 187550f2e948Smrg need_version=no 187650f2e948Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 187750f2e948Smrg soname_spec='${libname}${release}${shared_ext}$major' 187850f2e948Smrg shlibpath_var=LD_LIBRARY_PATH 187950f2e948Smrg hardcode_into_libs=yes 188050f2e948Smrg if test "$with_gnu_ld" = yes; then 188150f2e948Smrg sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 18823a925b30Smrg shlibpath_overrides_runpath=no 1883226fade8Smrg else 188450f2e948Smrg sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 18853a925b30Smrg shlibpath_overrides_runpath=yes 188650f2e948Smrg case $host_os in 188750f2e948Smrg sco3.2v5*) 188850f2e948Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 188950f2e948Smrg ;; 189050f2e948Smrg esac 1891226fade8Smrg fi 189250f2e948Smrg sys_lib_dlsearch_path_spec='/usr/lib' 189350f2e948Smrg ;; 189445bc899bSmrg 189550f2e948Smrguts4*) 189650f2e948Smrg version_type=linux 189750f2e948Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 189850f2e948Smrg soname_spec='${libname}${release}${shared_ext}$major' 189950f2e948Smrg shlibpath_var=LD_LIBRARY_PATH 190050f2e948Smrg ;; 1901226fade8Smrg 190250f2e948Smrg*) 190350f2e948Smrg dynamic_linker=no 190450f2e948Smrg ;; 190550f2e948Smrgesac 190650f2e948SmrgAC_MSG_RESULT([$dynamic_linker]) 190750f2e948Smrgtest "$dynamic_linker" = no && can_build_shared=no 1908226fade8Smrg 19093a925b30SmrgAC_CACHE_VAL([lt_cv_sys_lib_search_path_spec], 19103a925b30Smrg[lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec"]) 19113a925b30Smrgsys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" 19123a925b30SmrgAC_CACHE_VAL([lt_cv_sys_lib_dlsearch_path_spec], 19133a925b30Smrg[lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec"]) 19143a925b30Smrgsys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" 19153a925b30Smrg 191650f2e948Smrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var" 191750f2e948Smrgif test "$GCC" = yes; then 191850f2e948Smrg variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 19191ac89addSmrgfi 19203a925b30Smrg])# AC_LIBTOOL_SYS_DYNAMIC_LINKER 192145bc899bSmrg 192245bc899bSmrg 19233a925b30Smrg# _LT_AC_TAGCONFIG 19243a925b30Smrg# ---------------- 19253a925b30SmrgAC_DEFUN([_LT_AC_TAGCONFIG], 19263a925b30Smrg[AC_REQUIRE([LT_AC_PROG_SED])dnl 19273a925b30SmrgAC_ARG_WITH([tags], 19283a925b30Smrg [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@], 19293a925b30Smrg [include additional configurations @<:@automatic@:>@])], 19303a925b30Smrg [tagnames="$withval"]) 19313a925b30Smrg 19323a925b30Smrgif test -f "$ltmain" && test -n "$tagnames"; then 19333a925b30Smrg if test ! -f "${ofile}"; then 19343a925b30Smrg AC_MSG_WARN([output file `$ofile' does not exist]) 19353a925b30Smrg fi 19363a925b30Smrg 19373a925b30Smrg if test -z "$LTCC"; then 19383a925b30Smrg eval "`$SHELL ${ofile} --config | grep '^LTCC='`" 19393a925b30Smrg if test -z "$LTCC"; then 19403a925b30Smrg AC_MSG_WARN([output file `$ofile' does not look like a libtool script]) 19413a925b30Smrg else 19423a925b30Smrg AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile']) 19433a925b30Smrg fi 19443a925b30Smrg fi 19453a925b30Smrg if test -z "$LTCFLAGS"; then 19463a925b30Smrg eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`" 19473a925b30Smrg fi 19483a925b30Smrg 19493a925b30Smrg # Extract list of available tagged configurations in $ofile. 19503a925b30Smrg # Note that this assumes the entire list is on one line. 19513a925b30Smrg available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` 19523a925b30Smrg 19533a925b30Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 19543a925b30Smrg for tagname in $tagnames; do 19553a925b30Smrg IFS="$lt_save_ifs" 19563a925b30Smrg # Check whether tagname contains only valid characters 19573a925b30Smrg case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in 19583a925b30Smrg "") ;; 19593a925b30Smrg *) AC_MSG_ERROR([invalid tag name: $tagname]) 19603a925b30Smrg ;; 19613a925b30Smrg esac 19623a925b30Smrg 19633a925b30Smrg if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null 19643a925b30Smrg then 19653a925b30Smrg AC_MSG_ERROR([tag name \"$tagname\" already exists]) 19663a925b30Smrg fi 19673a925b30Smrg 19683a925b30Smrg # Update the list of available tags. 19693a925b30Smrg if test -n "$tagname"; then 19703a925b30Smrg echo appending configuration tag \"$tagname\" to $ofile 19713a925b30Smrg 19723a925b30Smrg case $tagname in 19733a925b30Smrg CXX) 19743a925b30Smrg if test -n "$CXX" && ( test "X$CXX" != "Xno" && 19753a925b30Smrg ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || 19763a925b30Smrg (test "X$CXX" != "Xg++"))) ; then 19773a925b30Smrg AC_LIBTOOL_LANG_CXX_CONFIG 19783a925b30Smrg else 19793a925b30Smrg tagname="" 19803a925b30Smrg fi 19813a925b30Smrg ;; 19823a925b30Smrg 19833a925b30Smrg F77) 19843a925b30Smrg if test -n "$F77" && test "X$F77" != "Xno"; then 19853a925b30Smrg AC_LIBTOOL_LANG_F77_CONFIG 19863a925b30Smrg else 19873a925b30Smrg tagname="" 19883a925b30Smrg fi 19893a925b30Smrg ;; 19903a925b30Smrg 19913a925b30Smrg GCJ) 19923a925b30Smrg if test -n "$GCJ" && test "X$GCJ" != "Xno"; then 19933a925b30Smrg AC_LIBTOOL_LANG_GCJ_CONFIG 19943a925b30Smrg else 19953a925b30Smrg tagname="" 19963a925b30Smrg fi 19973a925b30Smrg ;; 19983a925b30Smrg 19993a925b30Smrg RC) 20003a925b30Smrg AC_LIBTOOL_LANG_RC_CONFIG 20013a925b30Smrg ;; 20023a925b30Smrg 20033a925b30Smrg *) 20043a925b30Smrg AC_MSG_ERROR([Unsupported tag name: $tagname]) 20053a925b30Smrg ;; 20063a925b30Smrg esac 20073a925b30Smrg 20083a925b30Smrg # Append the new tag name to the list of available tags. 20093a925b30Smrg if test -n "$tagname" ; then 20103a925b30Smrg available_tags="$available_tags $tagname" 20113a925b30Smrg fi 20123a925b30Smrg fi 20133a925b30Smrg done 20143a925b30Smrg IFS="$lt_save_ifs" 20153a925b30Smrg 20163a925b30Smrg # Now substitute the updated list of available tags. 20173a925b30Smrg if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then 20183a925b30Smrg mv "${ofile}T" "$ofile" 20193a925b30Smrg chmod +x "$ofile" 20203a925b30Smrg else 20213a925b30Smrg rm -f "${ofile}T" 20223a925b30Smrg AC_MSG_ERROR([unable to update list of available tagged configurations.]) 20233a925b30Smrg fi 20243a925b30Smrgfi 20253a925b30Smrg])# _LT_AC_TAGCONFIG 20263a925b30Smrg 20273a925b30Smrg 20283a925b30Smrg# AC_LIBTOOL_DLOPEN 20293a925b30Smrg# ----------------- 20303a925b30Smrg# enable checks for dlopen support 20313a925b30SmrgAC_DEFUN([AC_LIBTOOL_DLOPEN], 20323a925b30Smrg [AC_BEFORE([$0],[AC_LIBTOOL_SETUP]) 20333a925b30Smrg])# AC_LIBTOOL_DLOPEN 20343a925b30Smrg 20353a925b30Smrg 20363a925b30Smrg# AC_LIBTOOL_WIN32_DLL 20373a925b30Smrg# -------------------- 20383a925b30Smrg# declare package support for building win32 DLLs 20393a925b30SmrgAC_DEFUN([AC_LIBTOOL_WIN32_DLL], 20403a925b30Smrg[AC_BEFORE([$0], [AC_LIBTOOL_SETUP]) 20413a925b30Smrg])# AC_LIBTOOL_WIN32_DLL 20423a925b30Smrg 20433a925b30Smrg 20443a925b30Smrg# AC_ENABLE_SHARED([DEFAULT]) 20453a925b30Smrg# --------------------------- 20463a925b30Smrg# implement the --enable-shared flag 20473a925b30Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 20483a925b30SmrgAC_DEFUN([AC_ENABLE_SHARED], 20493a925b30Smrg[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl 20503a925b30SmrgAC_ARG_ENABLE([shared], 20513a925b30Smrg [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 20523a925b30Smrg [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])], 20533a925b30Smrg [p=${PACKAGE-default} 20543a925b30Smrg case $enableval in 20553a925b30Smrg yes) enable_shared=yes ;; 20563a925b30Smrg no) enable_shared=no ;; 20573a925b30Smrg *) 20583a925b30Smrg enable_shared=no 20593a925b30Smrg # Look at the argument we got. We use all the common list separators. 20603a925b30Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 20613a925b30Smrg for pkg in $enableval; do 20623a925b30Smrg IFS="$lt_save_ifs" 20633a925b30Smrg if test "X$pkg" = "X$p"; then 20643a925b30Smrg enable_shared=yes 20653a925b30Smrg fi 20663a925b30Smrg done 20673a925b30Smrg IFS="$lt_save_ifs" 20683a925b30Smrg ;; 20693a925b30Smrg esac], 20703a925b30Smrg [enable_shared=]AC_ENABLE_SHARED_DEFAULT) 20713a925b30Smrg])# AC_ENABLE_SHARED 20723a925b30Smrg 20733a925b30Smrg 20743a925b30Smrg# AC_DISABLE_SHARED 20753a925b30Smrg# ----------------- 20763a925b30Smrg# set the default shared flag to --disable-shared 20773a925b30SmrgAC_DEFUN([AC_DISABLE_SHARED], 20783a925b30Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 20793a925b30SmrgAC_ENABLE_SHARED(no) 20803a925b30Smrg])# AC_DISABLE_SHARED 20813a925b30Smrg 20823a925b30Smrg 20833a925b30Smrg# AC_ENABLE_STATIC([DEFAULT]) 20843a925b30Smrg# --------------------------- 20853a925b30Smrg# implement the --enable-static flag 20863a925b30Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 20873a925b30SmrgAC_DEFUN([AC_ENABLE_STATIC], 20883a925b30Smrg[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl 20893a925b30SmrgAC_ARG_ENABLE([static], 20903a925b30Smrg [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@], 20913a925b30Smrg [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])], 20923a925b30Smrg [p=${PACKAGE-default} 20933a925b30Smrg case $enableval in 20943a925b30Smrg yes) enable_static=yes ;; 20953a925b30Smrg no) enable_static=no ;; 20963a925b30Smrg *) 20973a925b30Smrg enable_static=no 20983a925b30Smrg # Look at the argument we got. We use all the common list separators. 20993a925b30Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 21003a925b30Smrg for pkg in $enableval; do 21013a925b30Smrg IFS="$lt_save_ifs" 21023a925b30Smrg if test "X$pkg" = "X$p"; then 21033a925b30Smrg enable_static=yes 21043a925b30Smrg fi 21053a925b30Smrg done 21063a925b30Smrg IFS="$lt_save_ifs" 21073a925b30Smrg ;; 21083a925b30Smrg esac], 21093a925b30Smrg [enable_static=]AC_ENABLE_STATIC_DEFAULT) 21103a925b30Smrg])# AC_ENABLE_STATIC 21113a925b30Smrg 21123a925b30Smrg 21133a925b30Smrg# AC_DISABLE_STATIC 21143a925b30Smrg# ----------------- 21153a925b30Smrg# set the default static flag to --disable-static 21163a925b30SmrgAC_DEFUN([AC_DISABLE_STATIC], 21173a925b30Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 21183a925b30SmrgAC_ENABLE_STATIC(no) 21193a925b30Smrg])# AC_DISABLE_STATIC 21203a925b30Smrg 21213a925b30Smrg 21223a925b30Smrg# AC_ENABLE_FAST_INSTALL([DEFAULT]) 21233a925b30Smrg# --------------------------------- 21243a925b30Smrg# implement the --enable-fast-install flag 21253a925b30Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 21263a925b30SmrgAC_DEFUN([AC_ENABLE_FAST_INSTALL], 21273a925b30Smrg[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl 21283a925b30SmrgAC_ARG_ENABLE([fast-install], 21293a925b30Smrg [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 21303a925b30Smrg [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 21313a925b30Smrg [p=${PACKAGE-default} 21323a925b30Smrg case $enableval in 21333a925b30Smrg yes) enable_fast_install=yes ;; 21343a925b30Smrg no) enable_fast_install=no ;; 21353a925b30Smrg *) 21363a925b30Smrg enable_fast_install=no 21373a925b30Smrg # Look at the argument we got. We use all the common list separators. 21383a925b30Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 21393a925b30Smrg for pkg in $enableval; do 21403a925b30Smrg IFS="$lt_save_ifs" 21413a925b30Smrg if test "X$pkg" = "X$p"; then 21423a925b30Smrg enable_fast_install=yes 21433a925b30Smrg fi 21443a925b30Smrg done 21453a925b30Smrg IFS="$lt_save_ifs" 21463a925b30Smrg ;; 21473a925b30Smrg esac], 21483a925b30Smrg [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT) 21493a925b30Smrg])# AC_ENABLE_FAST_INSTALL 21503a925b30Smrg 21513a925b30Smrg 21523a925b30Smrg# AC_DISABLE_FAST_INSTALL 21533a925b30Smrg# ----------------------- 21543a925b30Smrg# set the default to --disable-fast-install 21553a925b30SmrgAC_DEFUN([AC_DISABLE_FAST_INSTALL], 21563a925b30Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 21573a925b30SmrgAC_ENABLE_FAST_INSTALL(no) 21583a925b30Smrg])# AC_DISABLE_FAST_INSTALL 21593a925b30Smrg 21603a925b30Smrg 21613a925b30Smrg# AC_LIBTOOL_PICMODE([MODE]) 21623a925b30Smrg# -------------------------- 21633a925b30Smrg# implement the --with-pic flag 21643a925b30Smrg# MODE is either `yes' or `no'. If omitted, it defaults to `both'. 21653a925b30SmrgAC_DEFUN([AC_LIBTOOL_PICMODE], 21663a925b30Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 21673a925b30Smrgpic_mode=ifelse($#,1,$1,default) 21683a925b30Smrg])# AC_LIBTOOL_PICMODE 21693a925b30Smrg 21703a925b30Smrg 21713a925b30Smrg# AC_PROG_EGREP 21723a925b30Smrg# ------------- 21733a925b30Smrg# This is predefined starting with Autoconf 2.54, so this conditional 21743a925b30Smrg# definition can be removed once we require Autoconf 2.54 or later. 21753a925b30Smrgm4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP], 21763a925b30Smrg[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep], 21773a925b30Smrg [if echo a | (grep -E '(a|b)') >/dev/null 2>&1 21783a925b30Smrg then ac_cv_prog_egrep='grep -E' 21793a925b30Smrg else ac_cv_prog_egrep='egrep' 21803a925b30Smrg fi]) 21813a925b30Smrg EGREP=$ac_cv_prog_egrep 21823a925b30Smrg AC_SUBST([EGREP]) 21833a925b30Smrg])]) 21843a925b30Smrg 21853a925b30Smrg 21863a925b30Smrg# AC_PATH_TOOL_PREFIX 21873a925b30Smrg# ------------------- 21883a925b30Smrg# find a file program which can recognize shared library 21893a925b30SmrgAC_DEFUN([AC_PATH_TOOL_PREFIX], 21903a925b30Smrg[AC_REQUIRE([AC_PROG_EGREP])dnl 21913a925b30SmrgAC_MSG_CHECKING([for $1]) 21923a925b30SmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 21933a925b30Smrg[case $MAGIC_CMD in 21943a925b30Smrg[[\\/*] | ?:[\\/]*]) 219550f2e948Smrg lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. 219650f2e948Smrg ;; 219750f2e948Smrg*) 219850f2e948Smrg lt_save_MAGIC_CMD="$MAGIC_CMD" 219950f2e948Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 220050f2e948Smrgdnl $ac_dummy forces splitting on constant user-supplied paths. 220150f2e948Smrgdnl POSIX.2 word splitting is done only on the output of word expansions, 220250f2e948Smrgdnl not every word. This closes a longstanding sh security hole. 22033a925b30Smrg ac_dummy="ifelse([$2], , $PATH, [$2])" 220450f2e948Smrg for ac_dir in $ac_dummy; do 220550f2e948Smrg IFS="$lt_save_ifs" 220650f2e948Smrg test -z "$ac_dir" && ac_dir=. 220750f2e948Smrg if test -f $ac_dir/$1; then 220850f2e948Smrg lt_cv_path_MAGIC_CMD="$ac_dir/$1" 220950f2e948Smrg if test -n "$file_magic_test_file"; then 221050f2e948Smrg case $deplibs_check_method in 221150f2e948Smrg "file_magic "*) 221250f2e948Smrg file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 221350f2e948Smrg MAGIC_CMD="$lt_cv_path_MAGIC_CMD" 221450f2e948Smrg if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 221550f2e948Smrg $EGREP "$file_magic_regex" > /dev/null; then 221650f2e948Smrg : 221750f2e948Smrg else 22183a925b30Smrg cat <<EOF 1>&2 221945bc899bSmrg 222050f2e948Smrg*** Warning: the command libtool uses to detect shared libraries, 222150f2e948Smrg*** $file_magic_cmd, produces output that libtool cannot recognize. 222250f2e948Smrg*** The result is that libtool may fail to recognize shared libraries 222350f2e948Smrg*** as such. This will affect the creation of libtool libraries that 222450f2e948Smrg*** depend on shared libraries, but programs linked with such libtool 222550f2e948Smrg*** libraries will work regardless of this problem. Nevertheless, you 222650f2e948Smrg*** may want to report the problem to your system manager and/or to 222750f2e948Smrg*** bug-libtool@gnu.org 222845bc899bSmrg 22293a925b30SmrgEOF 223050f2e948Smrg fi ;; 223150f2e948Smrg esac 223250f2e948Smrg fi 223350f2e948Smrg break 223450f2e948Smrg fi 223550f2e948Smrg done 223650f2e948Smrg IFS="$lt_save_ifs" 223750f2e948Smrg MAGIC_CMD="$lt_save_MAGIC_CMD" 223845bc899bSmrg ;; 223950f2e948Smrgesac]) 224050f2e948SmrgMAGIC_CMD="$lt_cv_path_MAGIC_CMD" 224150f2e948Smrgif test -n "$MAGIC_CMD"; then 224250f2e948Smrg AC_MSG_RESULT($MAGIC_CMD) 224350f2e948Smrgelse 224450f2e948Smrg AC_MSG_RESULT(no) 224550f2e948Smrgfi 22463a925b30Smrg])# AC_PATH_TOOL_PREFIX 224745bc899bSmrg 224845bc899bSmrg 22493a925b30Smrg# AC_PATH_MAGIC 22503a925b30Smrg# ------------- 225150f2e948Smrg# find a file program which can recognize a shared library 22523a925b30SmrgAC_DEFUN([AC_PATH_MAGIC], 22533a925b30Smrg[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 225450f2e948Smrgif test -z "$lt_cv_path_MAGIC_CMD"; then 225550f2e948Smrg if test -n "$ac_tool_prefix"; then 22563a925b30Smrg AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 225750f2e948Smrg else 225850f2e948Smrg MAGIC_CMD=: 225950f2e948Smrg fi 226050f2e948Smrgfi 22613a925b30Smrg])# AC_PATH_MAGIC 226245bc899bSmrg 226345bc899bSmrg 22643a925b30Smrg# AC_PROG_LD 226550f2e948Smrg# ---------- 226650f2e948Smrg# find the pathname to the GNU or non-GNU linker 22673a925b30SmrgAC_DEFUN([AC_PROG_LD], 22683a925b30Smrg[AC_ARG_WITH([gnu-ld], 22693a925b30Smrg [AC_HELP_STRING([--with-gnu-ld], 227050f2e948Smrg [assume the C compiler uses GNU ld @<:@default=no@:>@])], 227150f2e948Smrg [test "$withval" = no || with_gnu_ld=yes], 22723a925b30Smrg [with_gnu_ld=no]) 22733a925b30SmrgAC_REQUIRE([LT_AC_PROG_SED])dnl 22743a925b30SmrgAC_REQUIRE([AC_PROG_CC])dnl 22753a925b30SmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 22763a925b30SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 227750f2e948Smrgac_prog=ld 227850f2e948Smrgif test "$GCC" = yes; then 227950f2e948Smrg # Check if gcc -print-prog-name=ld gives a path. 228050f2e948Smrg AC_MSG_CHECKING([for ld used by $CC]) 228150f2e948Smrg case $host in 228250f2e948Smrg *-*-mingw*) 228350f2e948Smrg # gcc leaves a trailing carriage return which upsets mingw 228450f2e948Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 228550f2e948Smrg *) 228650f2e948Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 228750f2e948Smrg esac 228850f2e948Smrg case $ac_prog in 228950f2e948Smrg # Accept absolute paths. 229050f2e948Smrg [[\\/]]* | ?:[[\\/]]*) 229150f2e948Smrg re_direlt='/[[^/]][[^/]]*/\.\./' 229250f2e948Smrg # Canonicalize the pathname of ld 22933a925b30Smrg ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` 22943a925b30Smrg while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do 22953a925b30Smrg ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` 229650f2e948Smrg done 229750f2e948Smrg test -z "$LD" && LD="$ac_prog" 229850f2e948Smrg ;; 229950f2e948Smrg "") 230050f2e948Smrg # If it fails, then pretend we aren't using GCC. 230150f2e948Smrg ac_prog=ld 230250f2e948Smrg ;; 230350f2e948Smrg *) 230450f2e948Smrg # If it is relative, then search for the first ld in PATH. 230550f2e948Smrg with_gnu_ld=unknown 230650f2e948Smrg ;; 230750f2e948Smrg esac 230850f2e948Smrgelif test "$with_gnu_ld" = yes; then 230950f2e948Smrg AC_MSG_CHECKING([for GNU ld]) 2310226fade8Smrgelse 231150f2e948Smrg AC_MSG_CHECKING([for non-GNU ld]) 2312226fade8Smrgfi 231350f2e948SmrgAC_CACHE_VAL(lt_cv_path_LD, 231450f2e948Smrg[if test -z "$LD"; then 231550f2e948Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 231650f2e948Smrg for ac_dir in $PATH; do 231750f2e948Smrg IFS="$lt_save_ifs" 231850f2e948Smrg test -z "$ac_dir" && ac_dir=. 231950f2e948Smrg if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 232050f2e948Smrg lt_cv_path_LD="$ac_dir/$ac_prog" 232150f2e948Smrg # Check to see if the program is GNU ld. I'd rather use --version, 232250f2e948Smrg # but apparently some variants of GNU ld only accept -v. 232350f2e948Smrg # Break only if it was the GNU/non-GNU ld that we prefer. 232450f2e948Smrg case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 232550f2e948Smrg *GNU* | *'with BFD'*) 232650f2e948Smrg test "$with_gnu_ld" != no && break 232750f2e948Smrg ;; 232850f2e948Smrg *) 232950f2e948Smrg test "$with_gnu_ld" != yes && break 233050f2e948Smrg ;; 233150f2e948Smrg esac 233250f2e948Smrg fi 233350f2e948Smrg done 233450f2e948Smrg IFS="$lt_save_ifs" 2335226fade8Smrgelse 233650f2e948Smrg lt_cv_path_LD="$LD" # Let the user override the test with a path. 233750f2e948Smrgfi]) 233850f2e948SmrgLD="$lt_cv_path_LD" 233950f2e948Smrgif test -n "$LD"; then 234050f2e948Smrg AC_MSG_RESULT($LD) 2341226fade8Smrgelse 234250f2e948Smrg AC_MSG_RESULT(no) 2343226fade8Smrgfi 234450f2e948Smrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 23453a925b30SmrgAC_PROG_LD_GNU 23463a925b30Smrg])# AC_PROG_LD 2347226fade8Smrg 2348226fade8Smrg 23493a925b30Smrg# AC_PROG_LD_GNU 23503a925b30Smrg# -------------- 23513a925b30SmrgAC_DEFUN([AC_PROG_LD_GNU], 23523a925b30Smrg[AC_REQUIRE([AC_PROG_EGREP])dnl 23533a925b30SmrgAC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 235450f2e948Smrg[# I'd rather use --version here, but apparently some GNU lds only accept -v. 235550f2e948Smrgcase `$LD -v 2>&1 </dev/null` in 235650f2e948Smrg*GNU* | *'with BFD'*) 235750f2e948Smrg lt_cv_prog_gnu_ld=yes 235850f2e948Smrg ;; 235950f2e948Smrg*) 236050f2e948Smrg lt_cv_prog_gnu_ld=no 236150f2e948Smrg ;; 236250f2e948Smrgesac]) 236350f2e948Smrgwith_gnu_ld=$lt_cv_prog_gnu_ld 23643a925b30Smrg])# AC_PROG_LD_GNU 2365226fade8Smrg 2366226fade8Smrg 23673a925b30Smrg# AC_PROG_LD_RELOAD_FLAG 23683a925b30Smrg# ---------------------- 236950f2e948Smrg# find reload flag for linker 237050f2e948Smrg# -- PORTME Some linkers may need a different reload flag. 23713a925b30SmrgAC_DEFUN([AC_PROG_LD_RELOAD_FLAG], 237250f2e948Smrg[AC_CACHE_CHECK([for $LD option to reload object files], 237350f2e948Smrg lt_cv_ld_reload_flag, 237450f2e948Smrg [lt_cv_ld_reload_flag='-r']) 237550f2e948Smrgreload_flag=$lt_cv_ld_reload_flag 237650f2e948Smrgcase $reload_flag in 237750f2e948Smrg"" | " "*) ;; 237850f2e948Smrg*) reload_flag=" $reload_flag" ;; 237950f2e948Smrgesac 238050f2e948Smrgreload_cmds='$LD$reload_flag -o $output$reload_objs' 238150f2e948Smrgcase $host_os in 238250f2e948Smrg darwin*) 238350f2e948Smrg if test "$GCC" = yes; then 238450f2e948Smrg reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' 23851ac89addSmrg else 238650f2e948Smrg reload_cmds='$LD$reload_flag -o $output$reload_objs' 23871ac89addSmrg fi 238850f2e948Smrg ;; 238950f2e948Smrgesac 23903a925b30Smrg])# AC_PROG_LD_RELOAD_FLAG 239145bc899bSmrg 2392226fade8Smrg 23933a925b30Smrg# AC_DEPLIBS_CHECK_METHOD 23943a925b30Smrg# ----------------------- 239550f2e948Smrg# how to check for library dependencies 239650f2e948Smrg# -- PORTME fill in with the dynamic library characteristics 23973a925b30SmrgAC_DEFUN([AC_DEPLIBS_CHECK_METHOD], 23983a925b30Smrg[AC_CACHE_CHECK([how to recognize dependent libraries], 239950f2e948Smrglt_cv_deplibs_check_method, 240050f2e948Smrg[lt_cv_file_magic_cmd='$MAGIC_CMD' 240150f2e948Smrglt_cv_file_magic_test_file= 240250f2e948Smrglt_cv_deplibs_check_method='unknown' 240350f2e948Smrg# Need to set the preceding variable on all platforms that support 240450f2e948Smrg# interlibrary dependencies. 240550f2e948Smrg# 'none' -- dependencies not supported. 240650f2e948Smrg# `unknown' -- same as none, but documents that we really don't know. 240750f2e948Smrg# 'pass_all' -- all dependencies passed with no checks. 240850f2e948Smrg# 'test_compile' -- check by making test program. 240950f2e948Smrg# 'file_magic [[regex]]' -- check by looking for files in library path 241050f2e948Smrg# which responds to the $file_magic_cmd with a given extended regex. 241150f2e948Smrg# If you have `file' or equivalent on your system and you're not sure 241250f2e948Smrg# whether `pass_all' will *always* work, you probably want this one. 241345bc899bSmrg 2414226fade8Smrgcase $host_os in 241550f2e948Smrgaix[[4-9]]*) 241650f2e948Smrg lt_cv_deplibs_check_method=pass_all 241750f2e948Smrg ;; 241845bc899bSmrg 241950f2e948Smrgbeos*) 242050f2e948Smrg lt_cv_deplibs_check_method=pass_all 242150f2e948Smrg ;; 242245bc899bSmrg 242350f2e948Smrgbsdi[[45]]*) 242450f2e948Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 242550f2e948Smrg lt_cv_file_magic_cmd='/usr/bin/file -L' 242650f2e948Smrg lt_cv_file_magic_test_file=/shlib/libc.so 242750f2e948Smrg ;; 242845bc899bSmrg 242950f2e948Smrgcygwin*) 243050f2e948Smrg # func_win32_libid is a shell function defined in ltmain.sh 243150f2e948Smrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 243250f2e948Smrg lt_cv_file_magic_cmd='func_win32_libid' 243350f2e948Smrg ;; 243445bc899bSmrg 243550f2e948Smrgmingw* | pw32*) 243650f2e948Smrg # Base MSYS/MinGW do not provide the 'file' command needed by 243750f2e948Smrg # func_win32_libid shell function, so use a weaker test based on 'objdump', 243850f2e948Smrg # unless we find 'file', for example because we are cross-compiling. 243950f2e948Smrg if ( file / ) >/dev/null 2>&1; then 244050f2e948Smrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 244150f2e948Smrg lt_cv_file_magic_cmd='func_win32_libid' 244250f2e948Smrg else 244350f2e948Smrg lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' 244450f2e948Smrg lt_cv_file_magic_cmd='$OBJDUMP -f' 244550f2e948Smrg fi 244650f2e948Smrg ;; 244745bc899bSmrg 244850f2e948Smrgdarwin* | rhapsody*) 244950f2e948Smrg lt_cv_deplibs_check_method=pass_all 245050f2e948Smrg ;; 2451226fade8Smrg 245250f2e948Smrgfreebsd* | dragonfly*) 24533a925b30Smrg if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then 2454226fade8Smrg case $host_cpu in 245550f2e948Smrg i*86 ) 245650f2e948Smrg # Not sure whether the presence of OpenBSD here was a mistake. 245750f2e948Smrg # Let's accept both of them until this is cleared up. 245850f2e948Smrg lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 245950f2e948Smrg lt_cv_file_magic_cmd=/usr/bin/file 246050f2e948Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 2461226fade8Smrg ;; 2462226fade8Smrg esac 246350f2e948Smrg else 246450f2e948Smrg lt_cv_deplibs_check_method=pass_all 246550f2e948Smrg fi 246650f2e948Smrg ;; 2467226fade8Smrg 246850f2e948Smrggnu*) 246950f2e948Smrg lt_cv_deplibs_check_method=pass_all 247050f2e948Smrg ;; 2471226fade8Smrg 247250f2e948Smrghpux10.20* | hpux11*) 247350f2e948Smrg lt_cv_file_magic_cmd=/usr/bin/file 247450f2e948Smrg case $host_cpu in 247550f2e948Smrg ia64*) 247650f2e948Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 247750f2e948Smrg lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 2478226fade8Smrg ;; 247950f2e948Smrg hppa*64*) 248050f2e948Smrg [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]'] 248150f2e948Smrg lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 2482226fade8Smrg ;; 248350f2e948Smrg *) 248450f2e948Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' 248550f2e948Smrg lt_cv_file_magic_test_file=/usr/lib/libc.sl 2486226fade8Smrg ;; 248750f2e948Smrg esac 248850f2e948Smrg ;; 2489226fade8Smrg 249050f2e948Smrginterix[[3-9]]*) 249150f2e948Smrg # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 249250f2e948Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 249350f2e948Smrg ;; 2494226fade8Smrg 249550f2e948Smrgirix5* | irix6* | nonstopux*) 249650f2e948Smrg case $LD in 249750f2e948Smrg *-32|*"-32 ") libmagic=32-bit;; 249850f2e948Smrg *-n32|*"-n32 ") libmagic=N32;; 249950f2e948Smrg *-64|*"-64 ") libmagic=64-bit;; 250050f2e948Smrg *) libmagic=never-match;; 250150f2e948Smrg esac 250250f2e948Smrg lt_cv_deplibs_check_method=pass_all 250350f2e948Smrg ;; 2504226fade8Smrg 250550f2e948Smrg# This must be Linux ELF. 250650f2e948Smrglinux* | k*bsd*-gnu) 250750f2e948Smrg lt_cv_deplibs_check_method=pass_all 250850f2e948Smrg ;; 2509226fade8Smrg 251050f2e948Smrgnetbsd*) 25113a925b30Smrg if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then 251250f2e948Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 251350f2e948Smrg else 251450f2e948Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 251550f2e948Smrg fi 251650f2e948Smrg ;; 2517226fade8Smrg 251850f2e948Smrgnewos6*) 251950f2e948Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 252050f2e948Smrg lt_cv_file_magic_cmd=/usr/bin/file 252150f2e948Smrg lt_cv_file_magic_test_file=/usr/lib/libnls.so 252250f2e948Smrg ;; 2523226fade8Smrg 25243a925b30Smrgnto-qnx*) 25253a925b30Smrg lt_cv_deplibs_check_method=unknown 252650f2e948Smrg ;; 2527226fade8Smrg 252850f2e948Smrgopenbsd*) 25293a925b30Smrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 253050f2e948Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 253150f2e948Smrg else 253250f2e948Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 253350f2e948Smrg fi 253450f2e948Smrg ;; 2535226fade8Smrg 253650f2e948Smrgosf3* | osf4* | osf5*) 253750f2e948Smrg lt_cv_deplibs_check_method=pass_all 253850f2e948Smrg ;; 2539226fade8Smrg 254050f2e948Smrgrdos*) 254150f2e948Smrg lt_cv_deplibs_check_method=pass_all 254250f2e948Smrg ;; 2543226fade8Smrg 254450f2e948Smrgsolaris*) 254550f2e948Smrg lt_cv_deplibs_check_method=pass_all 254650f2e948Smrg ;; 254750f2e948Smrg 254850f2e948Smrgsysv4 | sysv4.3*) 254950f2e948Smrg case $host_vendor in 255050f2e948Smrg motorola) 255150f2e948Smrg 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]]' 255250f2e948Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 2553226fade8Smrg ;; 255450f2e948Smrg ncr) 255550f2e948Smrg lt_cv_deplibs_check_method=pass_all 2556226fade8Smrg ;; 255750f2e948Smrg sequent) 255850f2e948Smrg lt_cv_file_magic_cmd='/bin/file' 255950f2e948Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 2560226fade8Smrg ;; 256150f2e948Smrg sni) 256250f2e948Smrg lt_cv_file_magic_cmd='/bin/file' 256350f2e948Smrg lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 256450f2e948Smrg lt_cv_file_magic_test_file=/lib/libc.so 256550f2e948Smrg ;; 256650f2e948Smrg siemens) 256750f2e948Smrg lt_cv_deplibs_check_method=pass_all 256850f2e948Smrg ;; 256950f2e948Smrg pc) 257050f2e948Smrg lt_cv_deplibs_check_method=pass_all 257150f2e948Smrg ;; 257250f2e948Smrg esac 257350f2e948Smrg ;; 257445bc899bSmrg 25753a925b30Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 257650f2e948Smrg lt_cv_deplibs_check_method=pass_all 257750f2e948Smrg ;; 2578226fade8Smrgesac 2579226fade8Smrg]) 258050f2e948Smrgfile_magic_cmd=$lt_cv_file_magic_cmd 258150f2e948Smrgdeplibs_check_method=$lt_cv_deplibs_check_method 258250f2e948Smrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown 25833a925b30Smrg])# AC_DEPLIBS_CHECK_METHOD 2584226fade8Smrg 258545bc899bSmrg 25863a925b30Smrg# AC_PROG_NM 258750f2e948Smrg# ---------- 25883a925b30Smrg# find the pathname to a BSD-compatible name lister 25893a925b30SmrgAC_DEFUN([AC_PROG_NM], 25903a925b30Smrg[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM, 259150f2e948Smrg[if test -n "$NM"; then 259250f2e948Smrg # Let the user override the test. 259350f2e948Smrg lt_cv_path_NM="$NM" 259450f2e948Smrgelse 259550f2e948Smrg lt_nm_to_check="${ac_tool_prefix}nm" 259650f2e948Smrg if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 259750f2e948Smrg lt_nm_to_check="$lt_nm_to_check nm" 259850f2e948Smrg fi 259950f2e948Smrg for lt_tmp_nm in $lt_nm_to_check; do 260050f2e948Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 260150f2e948Smrg for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 260250f2e948Smrg IFS="$lt_save_ifs" 260350f2e948Smrg test -z "$ac_dir" && ac_dir=. 260450f2e948Smrg tmp_nm="$ac_dir/$lt_tmp_nm" 260550f2e948Smrg if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then 260650f2e948Smrg # Check to see if the nm accepts a BSD-compat flag. 260750f2e948Smrg # Adding the `sed 1q' prevents false positives on HP-UX, which says: 260850f2e948Smrg # nm: unknown option "B" ignored 260950f2e948Smrg # Tru64's nm complains that /dev/null is an invalid object file 261050f2e948Smrg case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in 261150f2e948Smrg */dev/null* | *'Invalid file or object type'*) 261250f2e948Smrg lt_cv_path_NM="$tmp_nm -B" 261350f2e948Smrg break 261450f2e948Smrg ;; 261550f2e948Smrg *) 261650f2e948Smrg case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in 261750f2e948Smrg */dev/null*) 261850f2e948Smrg lt_cv_path_NM="$tmp_nm -p" 261950f2e948Smrg break 262050f2e948Smrg ;; 262150f2e948Smrg *) 262250f2e948Smrg lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 262350f2e948Smrg continue # so that we can try to find one that supports BSD flags 262450f2e948Smrg ;; 262550f2e948Smrg esac 262650f2e948Smrg ;; 262750f2e948Smrg esac 262850f2e948Smrg fi 262950f2e948Smrg done 263050f2e948Smrg IFS="$lt_save_ifs" 2631226fade8Smrg done 26323a925b30Smrg test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm 263350f2e948Smrgfi]) 26343a925b30SmrgNM="$lt_cv_path_NM" 26353a925b30Smrg])# AC_PROG_NM 263645bc899bSmrg 263745bc899bSmrg 26383a925b30Smrg# AC_CHECK_LIBM 26393a925b30Smrg# ------------- 264050f2e948Smrg# check for math library 26413a925b30SmrgAC_DEFUN([AC_CHECK_LIBM], 264250f2e948Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 264350f2e948SmrgLIBM= 264450f2e948Smrgcase $host in 264550f2e948Smrg*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) 264650f2e948Smrg # These system don't have libm, or don't need it 264750f2e948Smrg ;; 264850f2e948Smrg*-ncr-sysv4.3*) 264950f2e948Smrg AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") 265050f2e948Smrg AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 265150f2e948Smrg ;; 265250f2e948Smrg*) 265350f2e948Smrg AC_CHECK_LIB(m, cos, LIBM="-lm") 2654226fade8Smrg ;; 2655226fade8Smrgesac 26563a925b30Smrg])# AC_CHECK_LIBM 265745bc899bSmrg 265845bc899bSmrg 26593a925b30Smrg# AC_LIBLTDL_CONVENIENCE([DIRECTORY]) 26603a925b30Smrg# ----------------------------------- 26613a925b30Smrg# sets LIBLTDL to the link flags for the libltdl convenience library and 26623a925b30Smrg# LTDLINCL to the include flags for the libltdl header and adds 26633a925b30Smrg# --enable-ltdl-convenience to the configure arguments. Note that 26643a925b30Smrg# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, 26653a925b30Smrg# it is assumed to be `libltdl'. LIBLTDL will be prefixed with 26663a925b30Smrg# '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/' 26673a925b30Smrg# (note the single quotes!). If your package is not flat and you're not 26683a925b30Smrg# using automake, define top_builddir and top_srcdir appropriately in 26693a925b30Smrg# the Makefiles. 26703a925b30SmrgAC_DEFUN([AC_LIBLTDL_CONVENIENCE], 26713a925b30Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 26723a925b30Smrg case $enable_ltdl_convenience in 26733a925b30Smrg no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; 26743a925b30Smrg "") enable_ltdl_convenience=yes 26753a925b30Smrg ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; 26763a925b30Smrg esac 26773a925b30Smrg LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la 26783a925b30Smrg LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) 26793a925b30Smrg # For backwards non-gettext consistent compatibility... 26803a925b30Smrg INCLTDL="$LTDLINCL" 26813a925b30Smrg])# AC_LIBLTDL_CONVENIENCE 268245bc899bSmrg 268345bc899bSmrg 26843a925b30Smrg# AC_LIBLTDL_INSTALLABLE([DIRECTORY]) 26853a925b30Smrg# ----------------------------------- 26863a925b30Smrg# sets LIBLTDL to the link flags for the libltdl installable library and 26873a925b30Smrg# LTDLINCL to the include flags for the libltdl header and adds 26883a925b30Smrg# --enable-ltdl-install to the configure arguments. Note that 26893a925b30Smrg# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, 26903a925b30Smrg# and an installed libltdl is not found, it is assumed to be `libltdl'. 26913a925b30Smrg# LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with 26923a925b30Smrg# '${top_srcdir}/' (note the single quotes!). If your package is not 26933a925b30Smrg# flat and you're not using automake, define top_builddir and top_srcdir 26943a925b30Smrg# appropriately in the Makefiles. 26953a925b30Smrg# In the future, this macro may have to be called after AC_PROG_LIBTOOL. 26963a925b30SmrgAC_DEFUN([AC_LIBLTDL_INSTALLABLE], 26973a925b30Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 26983a925b30Smrg AC_CHECK_LIB(ltdl, lt_dlinit, 26993a925b30Smrg [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no], 27003a925b30Smrg [if test x"$enable_ltdl_install" = xno; then 27013a925b30Smrg AC_MSG_WARN([libltdl not installed, but installation disabled]) 27023a925b30Smrg else 27033a925b30Smrg enable_ltdl_install=yes 27043a925b30Smrg fi 27053a925b30Smrg ]) 27063a925b30Smrg if test x"$enable_ltdl_install" = x"yes"; then 27073a925b30Smrg ac_configure_args="$ac_configure_args --enable-ltdl-install" 27083a925b30Smrg LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la 27093a925b30Smrg LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) 27103a925b30Smrg else 27113a925b30Smrg ac_configure_args="$ac_configure_args --enable-ltdl-install=no" 27123a925b30Smrg LIBLTDL="-lltdl" 27133a925b30Smrg LTDLINCL= 27143a925b30Smrg fi 27153a925b30Smrg # For backwards non-gettext consistent compatibility... 27163a925b30Smrg INCLTDL="$LTDLINCL" 27173a925b30Smrg])# AC_LIBLTDL_INSTALLABLE 271845bc899bSmrg 271945bc899bSmrg 27203a925b30Smrg# AC_LIBTOOL_CXX 27213a925b30Smrg# -------------- 27223a925b30Smrg# enable support for C++ libraries 27233a925b30SmrgAC_DEFUN([AC_LIBTOOL_CXX], 27243a925b30Smrg[AC_REQUIRE([_LT_AC_LANG_CXX]) 27253a925b30Smrg])# AC_LIBTOOL_CXX 272645bc899bSmrg 272745bc899bSmrg 27283a925b30Smrg# _LT_AC_LANG_CXX 27293a925b30Smrg# --------------- 27303a925b30SmrgAC_DEFUN([_LT_AC_LANG_CXX], 27313a925b30Smrg[AC_REQUIRE([AC_PROG_CXX]) 27323a925b30SmrgAC_REQUIRE([_LT_AC_PROG_CXXCPP]) 27333a925b30Smrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX]) 27343a925b30Smrg])# _LT_AC_LANG_CXX 273545bc899bSmrg 27363a925b30Smrg# _LT_AC_PROG_CXXCPP 27373a925b30Smrg# ------------------ 27383a925b30SmrgAC_DEFUN([_LT_AC_PROG_CXXCPP], 273950f2e948Smrg[ 27403a925b30SmrgAC_REQUIRE([AC_PROG_CXX]) 27413a925b30Smrgif test -n "$CXX" && ( test "X$CXX" != "Xno" && 27423a925b30Smrg ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || 27433a925b30Smrg (test "X$CXX" != "Xg++"))) ; then 27443a925b30Smrg AC_PROG_CXXCPP 27453a925b30Smrgfi 27463a925b30Smrg])# _LT_AC_PROG_CXXCPP 274745bc899bSmrg 27483a925b30Smrg# AC_LIBTOOL_F77 27493a925b30Smrg# -------------- 27503a925b30Smrg# enable support for Fortran 77 libraries 27513a925b30SmrgAC_DEFUN([AC_LIBTOOL_F77], 27523a925b30Smrg[AC_REQUIRE([_LT_AC_LANG_F77]) 27533a925b30Smrg])# AC_LIBTOOL_F77 275445bc899bSmrg 275545bc899bSmrg 27563a925b30Smrg# _LT_AC_LANG_F77 27573a925b30Smrg# --------------- 27583a925b30SmrgAC_DEFUN([_LT_AC_LANG_F77], 27593a925b30Smrg[AC_REQUIRE([AC_PROG_F77]) 27603a925b30Smrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77]) 27613a925b30Smrg])# _LT_AC_LANG_F77 276245bc899bSmrg 276345bc899bSmrg 27643a925b30Smrg# AC_LIBTOOL_GCJ 27653a925b30Smrg# -------------- 27663a925b30Smrg# enable support for GCJ libraries 27673a925b30SmrgAC_DEFUN([AC_LIBTOOL_GCJ], 27683a925b30Smrg[AC_REQUIRE([_LT_AC_LANG_GCJ]) 27693a925b30Smrg])# AC_LIBTOOL_GCJ 277045bc899bSmrg 277145bc899bSmrg 27723a925b30Smrg# _LT_AC_LANG_GCJ 27733a925b30Smrg# --------------- 27743a925b30SmrgAC_DEFUN([_LT_AC_LANG_GCJ], 27753a925b30Smrg[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[], 27763a925b30Smrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[], 27773a925b30Smrg [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[], 27783a925b30Smrg [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])], 27793a925b30Smrg [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])], 27803a925b30Smrg [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])]) 27813a925b30Smrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ]) 27823a925b30Smrg])# _LT_AC_LANG_GCJ 27833a925b30Smrg 27843a925b30Smrg 27853a925b30Smrg# AC_LIBTOOL_RC 27863a925b30Smrg# ------------- 27873a925b30Smrg# enable support for Windows resource files 27883a925b30SmrgAC_DEFUN([AC_LIBTOOL_RC], 27893a925b30Smrg[AC_REQUIRE([LT_AC_PROG_RC]) 27903a925b30Smrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC]) 27913a925b30Smrg])# AC_LIBTOOL_RC 27923a925b30Smrg 27933a925b30Smrg 27943a925b30Smrg# AC_LIBTOOL_LANG_C_CONFIG 27953a925b30Smrg# ------------------------ 27963a925b30Smrg# Ensure that the configuration vars for the C compiler are 27973a925b30Smrg# suitably defined. Those variables are subsequently used by 27983a925b30Smrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 27993a925b30SmrgAC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG]) 28003a925b30SmrgAC_DEFUN([_LT_AC_LANG_C_CONFIG], 28013a925b30Smrg[lt_save_CC="$CC" 28023a925b30SmrgAC_LANG_PUSH(C) 28033a925b30Smrg 28043a925b30Smrg# Source file extension for C test sources. 28053a925b30Smrgac_ext=c 28063a925b30Smrg 28073a925b30Smrg# Object file extension for compiled C test sources. 28083a925b30Smrgobjext=o 28093a925b30Smrg_LT_AC_TAGVAR(objext, $1)=$objext 28103a925b30Smrg 28113a925b30Smrg# Code to be used in simple compile tests 28123a925b30Smrglt_simple_compile_test_code="int some_variable = 0;" 28133a925b30Smrg 28143a925b30Smrg# Code to be used in simple link tests 28153a925b30Smrglt_simple_link_test_code='int main(){return(0);}' 28163a925b30Smrg 28173a925b30Smrg_LT_AC_SYS_COMPILER 28183a925b30Smrg 28193a925b30Smrg# save warnings/boilerplate of simple test code 28203a925b30Smrg_LT_COMPILER_BOILERPLATE 28213a925b30Smrg_LT_LINKER_BOILERPLATE 28223a925b30Smrg 28233a925b30SmrgAC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) 28243a925b30SmrgAC_LIBTOOL_PROG_COMPILER_PIC($1) 28253a925b30SmrgAC_LIBTOOL_PROG_CC_C_O($1) 28263a925b30SmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) 28273a925b30SmrgAC_LIBTOOL_PROG_LD_SHLIBS($1) 28283a925b30SmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1) 28293a925b30SmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) 28303a925b30SmrgAC_LIBTOOL_SYS_LIB_STRIP 28313a925b30SmrgAC_LIBTOOL_DLOPEN_SELF 28323a925b30Smrg 28333a925b30Smrg# Report which library types will actually be built 28343a925b30SmrgAC_MSG_CHECKING([if libtool supports shared libraries]) 28353a925b30SmrgAC_MSG_RESULT([$can_build_shared]) 28363a925b30Smrg 28373a925b30SmrgAC_MSG_CHECKING([whether to build shared libraries]) 28383a925b30Smrgtest "$can_build_shared" = "no" && enable_shared=no 28393a925b30Smrg 28403a925b30Smrg# On AIX, shared libraries and static libraries use the same namespace, and 28413a925b30Smrg# are all built from PIC. 28423a925b30Smrgcase $host_os in 28433a925b30Smrgaix3*) 28443a925b30Smrg test "$enable_shared" = yes && enable_static=no 28453a925b30Smrg if test -n "$RANLIB"; then 28463a925b30Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 28473a925b30Smrg postinstall_cmds='$RANLIB $lib' 28483a925b30Smrg fi 284950f2e948Smrg ;; 28503a925b30Smrg 28513a925b30Smrgaix[[4-9]]*) 28523a925b30Smrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 28533a925b30Smrg test "$enable_shared" = yes && enable_static=no 28543a925b30Smrg fi 28553a925b30Smrg ;; 285650f2e948Smrgesac 28573a925b30SmrgAC_MSG_RESULT([$enable_shared]) 285845bc899bSmrg 28593a925b30SmrgAC_MSG_CHECKING([whether to build static libraries]) 28603a925b30Smrg# Make sure either enable_shared or enable_static is yes. 28613a925b30Smrgtest "$enable_shared" = yes || enable_static=yes 28623a925b30SmrgAC_MSG_RESULT([$enable_static]) 286345bc899bSmrg 28643a925b30SmrgAC_LIBTOOL_CONFIG($1) 286545bc899bSmrg 28663a925b30SmrgAC_LANG_POP 28673a925b30SmrgCC="$lt_save_CC" 28683a925b30Smrg])# AC_LIBTOOL_LANG_C_CONFIG 286945bc899bSmrg 287045bc899bSmrg 28713a925b30Smrg# AC_LIBTOOL_LANG_CXX_CONFIG 28723a925b30Smrg# -------------------------- 28733a925b30Smrg# Ensure that the configuration vars for the C compiler are 28743a925b30Smrg# suitably defined. Those variables are subsequently used by 28753a925b30Smrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 28763a925b30SmrgAC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)]) 28773a925b30SmrgAC_DEFUN([_LT_AC_LANG_CXX_CONFIG], 28783a925b30Smrg[AC_LANG_PUSH(C++) 28793a925b30SmrgAC_REQUIRE([AC_PROG_CXX]) 28803a925b30SmrgAC_REQUIRE([_LT_AC_PROG_CXXCPP]) 28813a925b30Smrg 28823a925b30Smrg_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 28833a925b30Smrg_LT_AC_TAGVAR(allow_undefined_flag, $1)= 28843a925b30Smrg_LT_AC_TAGVAR(always_export_symbols, $1)=no 28853a925b30Smrg_LT_AC_TAGVAR(archive_expsym_cmds, $1)= 28863a925b30Smrg_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= 28873a925b30Smrg_LT_AC_TAGVAR(hardcode_direct, $1)=no 28883a925b30Smrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= 28893a925b30Smrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 28903a925b30Smrg_LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 28913a925b30Smrg_LT_AC_TAGVAR(hardcode_minus_L, $1)=no 28923a925b30Smrg_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 28933a925b30Smrg_LT_AC_TAGVAR(hardcode_automatic, $1)=no 28943a925b30Smrg_LT_AC_TAGVAR(module_cmds, $1)= 28953a925b30Smrg_LT_AC_TAGVAR(module_expsym_cmds, $1)= 28963a925b30Smrg_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown 28973a925b30Smrg_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 28983a925b30Smrg_LT_AC_TAGVAR(no_undefined_flag, $1)= 28993a925b30Smrg_LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 29003a925b30Smrg_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no 290145bc899bSmrg 29023a925b30Smrg# Dependencies to place before and after the object being linked: 29033a925b30Smrg_LT_AC_TAGVAR(predep_objects, $1)= 29043a925b30Smrg_LT_AC_TAGVAR(postdep_objects, $1)= 29053a925b30Smrg_LT_AC_TAGVAR(predeps, $1)= 29063a925b30Smrg_LT_AC_TAGVAR(postdeps, $1)= 29073a925b30Smrg_LT_AC_TAGVAR(compiler_lib_search_path, $1)= 29083a925b30Smrg_LT_AC_TAGVAR(compiler_lib_search_dirs, $1)= 290945bc899bSmrg 29103a925b30Smrg# Source file extension for C++ test sources. 29113a925b30Smrgac_ext=cpp 291245bc899bSmrg 29133a925b30Smrg# Object file extension for compiled C++ test sources. 29143a925b30Smrgobjext=o 29153a925b30Smrg_LT_AC_TAGVAR(objext, $1)=$objext 291645bc899bSmrg 29173a925b30Smrg# Code to be used in simple compile tests 29183a925b30Smrglt_simple_compile_test_code="int some_variable = 0;" 291945bc899bSmrg 29203a925b30Smrg# Code to be used in simple link tests 29213a925b30Smrglt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 292245bc899bSmrg 29233a925b30Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 29243a925b30Smrg_LT_AC_SYS_COMPILER 292545bc899bSmrg 29263a925b30Smrg# save warnings/boilerplate of simple test code 29273a925b30Smrg_LT_COMPILER_BOILERPLATE 29283a925b30Smrg_LT_LINKER_BOILERPLATE 29293a925b30Smrg 29303a925b30Smrg# Allow CC to be a program name with arguments. 29313a925b30Smrglt_save_CC=$CC 29323a925b30Smrglt_save_LD=$LD 29333a925b30Smrglt_save_GCC=$GCC 29343a925b30SmrgGCC=$GXX 29353a925b30Smrglt_save_with_gnu_ld=$with_gnu_ld 29363a925b30Smrglt_save_path_LD=$lt_cv_path_LD 29373a925b30Smrgif test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 29383a925b30Smrg lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 29393a925b30Smrgelse 29403a925b30Smrg $as_unset lt_cv_prog_gnu_ld 29413a925b30Smrgfi 29423a925b30Smrgif test -n "${lt_cv_path_LDCXX+set}"; then 29433a925b30Smrg lt_cv_path_LD=$lt_cv_path_LDCXX 29443a925b30Smrgelse 29453a925b30Smrg $as_unset lt_cv_path_LD 29463a925b30Smrgfi 29473a925b30Smrgtest -z "${LDCXX+set}" || LD=$LDCXX 29483a925b30SmrgCC=${CXX-"c++"} 29493a925b30Smrgcompiler=$CC 29503a925b30Smrg_LT_AC_TAGVAR(compiler, $1)=$CC 29513a925b30Smrg_LT_CC_BASENAME([$compiler]) 29523a925b30Smrg 29533a925b30Smrg# We don't want -fno-exception wen compiling C++ code, so set the 29543a925b30Smrg# no_builtin_flag separately 29553a925b30Smrgif test "$GXX" = yes; then 29563a925b30Smrg _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 29573a925b30Smrgelse 29583a925b30Smrg _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 29593a925b30Smrgfi 29603a925b30Smrg 29613a925b30Smrgif test "$GXX" = yes; then 29623a925b30Smrg # Set up default GNU C++ configuration 29633a925b30Smrg 29643a925b30Smrg AC_PROG_LD 29653a925b30Smrg 29663a925b30Smrg # Check if GNU C++ uses GNU ld as the underlying linker, since the 29673a925b30Smrg # archiving commands below assume that GNU ld is being used. 29683a925b30Smrg if test "$with_gnu_ld" = yes; then 29693a925b30Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 29703a925b30Smrg _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' 29713a925b30Smrg 29723a925b30Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 29733a925b30Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 29743a925b30Smrg 29753a925b30Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 29763a925b30Smrg # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 29773a925b30Smrg # investigate it a little bit more. (MM) 29783a925b30Smrg wlarc='${wl}' 29793a925b30Smrg 29803a925b30Smrg # ancient GNU ld didn't support --whole-archive et. al. 29813a925b30Smrg if eval "`$CC -print-prog-name=ld` --help 2>&1" | \ 29823a925b30Smrg grep 'no-whole-archive' > /dev/null; then 29833a925b30Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 298450f2e948Smrg else 29853a925b30Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 298650f2e948Smrg fi 298750f2e948Smrg else 29883a925b30Smrg with_gnu_ld=no 29893a925b30Smrg wlarc= 29903a925b30Smrg 29913a925b30Smrg # A generic and very simple default shared library creation 29923a925b30Smrg # command for GNU C++ for the case where it uses the native 29933a925b30Smrg # linker, instead of GNU ld. If possible, this setting should 29943a925b30Smrg # overridden to take advantage of the native linker features on 29953a925b30Smrg # the platform it is being used on. 29963a925b30Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 299750f2e948Smrg fi 299845bc899bSmrg 29993a925b30Smrg # Commands to make compiler produce verbose output that lists 30003a925b30Smrg # what "hidden" libraries, object files and flags are used when 30013a925b30Smrg # linking a shared library. 30023a925b30Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' 30033a925b30Smrg 300450f2e948Smrgelse 30053a925b30Smrg GXX=no 30063a925b30Smrg with_gnu_ld=no 30073a925b30Smrg wlarc= 300850f2e948Smrgfi 300945bc899bSmrg 30103a925b30Smrg# PORTME: fill in a description of your system's C++ link characteristics 30113a925b30SmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 30123a925b30Smrg_LT_AC_TAGVAR(ld_shlibs, $1)=yes 30133a925b30Smrgcase $host_os in 30143a925b30Smrg aix3*) 30153a925b30Smrg # FIXME: insert proper C++ library support 30163a925b30Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 30173a925b30Smrg ;; 30183a925b30Smrg aix[[4-9]]*) 30193a925b30Smrg if test "$host_cpu" = ia64; then 30203a925b30Smrg # On IA64, the linker does run time linking by default, so we don't 30213a925b30Smrg # have to do anything special. 30223a925b30Smrg aix_use_runtimelinking=no 30233a925b30Smrg exp_sym_flag='-Bexport' 30243a925b30Smrg no_entry_flag="" 30253a925b30Smrg else 30263a925b30Smrg aix_use_runtimelinking=no 30273a925b30Smrg 30283a925b30Smrg # Test if we are trying to use run time linking or normal 30293a925b30Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 30303a925b30Smrg # need to do runtime linking. 30313a925b30Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 30323a925b30Smrg for ld_flag in $LDFLAGS; do 30333a925b30Smrg case $ld_flag in 30343a925b30Smrg *-brtl*) 30353a925b30Smrg aix_use_runtimelinking=yes 30363a925b30Smrg break 30373a925b30Smrg ;; 30383a925b30Smrg esac 30393a925b30Smrg done 30403a925b30Smrg ;; 30413a925b30Smrg esac 304245bc899bSmrg 30433a925b30Smrg exp_sym_flag='-bexport' 30443a925b30Smrg no_entry_flag='-bnoentry' 30453a925b30Smrg fi 304645bc899bSmrg 30473a925b30Smrg # When large executables or shared objects are built, AIX ld can 30483a925b30Smrg # have problems creating the table of contents. If linking a library 30493a925b30Smrg # or program results in "error TOC overflow" add -mminimal-toc to 30503a925b30Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 30513a925b30Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 305245bc899bSmrg 30533a925b30Smrg _LT_AC_TAGVAR(archive_cmds, $1)='' 30543a925b30Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 30553a925b30Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' 30563a925b30Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 305745bc899bSmrg 30583a925b30Smrg if test "$GXX" = yes; then 30593a925b30Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 30603a925b30Smrg # We only want to do this on AIX 4.2 and lower, the check 30613a925b30Smrg # below for broken collect2 doesn't work under 4.3+ 30623a925b30Smrg collect2name=`${CC} -print-prog-name=collect2` 30633a925b30Smrg if test -f "$collect2name" && \ 30643a925b30Smrg strings "$collect2name" | grep resolve_lib_name >/dev/null 30653a925b30Smrg then 30663a925b30Smrg # We have reworked collect2 30673a925b30Smrg : 30683a925b30Smrg else 30693a925b30Smrg # We have old collect2 30703a925b30Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported 30713a925b30Smrg # It fails to find uninstalled libraries when the uninstalled 30723a925b30Smrg # path is not listed in the libpath. Setting hardcode_minus_L 30733a925b30Smrg # to unsupported forces relinking 30743a925b30Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 30753a925b30Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 30763a925b30Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 30773a925b30Smrg fi 30783a925b30Smrg ;; 30793a925b30Smrg esac 30803a925b30Smrg shared_flag='-shared' 30813a925b30Smrg if test "$aix_use_runtimelinking" = yes; then 30823a925b30Smrg shared_flag="$shared_flag "'${wl}-G' 30833a925b30Smrg fi 30843a925b30Smrg else 30853a925b30Smrg # not using gcc 308650f2e948Smrg if test "$host_cpu" = ia64; then 30873a925b30Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 30883a925b30Smrg # chokes on -Wl,-G. The following line is correct: 30893a925b30Smrg shared_flag='-G' 30903a925b30Smrg else 30913a925b30Smrg if test "$aix_use_runtimelinking" = yes; then 30923a925b30Smrg shared_flag='${wl}-G' 30933a925b30Smrg else 30943a925b30Smrg shared_flag='${wl}-bM:SRE' 30953a925b30Smrg fi 309650f2e948Smrg fi 30973a925b30Smrg fi 30983a925b30Smrg 30993a925b30Smrg # It seems that -bexpall does not export symbols beginning with 31003a925b30Smrg # underscore (_), so it is better to generate a list of symbols to export. 31013a925b30Smrg _LT_AC_TAGVAR(always_export_symbols, $1)=yes 31023a925b30Smrg if test "$aix_use_runtimelinking" = yes; then 31033a925b30Smrg # Warning - without using the other runtime loading flags (-brtl), 31043a925b30Smrg # -berok will link without error, but may produce a broken library. 31053a925b30Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' 31063a925b30Smrg # Determine the default libpath from the value encoded in an empty executable. 31073a925b30Smrg _LT_AC_SYS_LIBPATH_AIX 31083a925b30Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 31093a925b30Smrg 31103a925b30Smrg _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" 31113a925b30Smrg else 31123a925b30Smrg if test "$host_cpu" = ia64; then 31133a925b30Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 31143a925b30Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 31153a925b30Smrg _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" 31163a925b30Smrg else 31173a925b30Smrg # Determine the default libpath from the value encoded in an empty executable. 31183a925b30Smrg _LT_AC_SYS_LIBPATH_AIX 31193a925b30Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 31203a925b30Smrg # Warning - without using the other run time loading flags, 31213a925b30Smrg # -berok will link without error, but may produce a broken library. 31223a925b30Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 31233a925b30Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 31243a925b30Smrg # Exported symbols can be pulled into shared objects from archives 31253a925b30Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 31263a925b30Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes 31273a925b30Smrg # This is similar to how AIX traditionally builds its shared libraries. 31283a925b30Smrg _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' 31293a925b30Smrg fi 31303a925b30Smrg fi 31313a925b30Smrg ;; 31323a925b30Smrg 31333a925b30Smrg beos*) 31343a925b30Smrg if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 31353a925b30Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 31363a925b30Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 31373a925b30Smrg # support --undefined. This deserves some investigation. FIXME 31383a925b30Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 31393a925b30Smrg else 31403a925b30Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 31413a925b30Smrg fi 31423a925b30Smrg ;; 31433a925b30Smrg 31443a925b30Smrg chorus*) 31453a925b30Smrg case $cc_basename in 31463a925b30Smrg *) 31473a925b30Smrg # FIXME: insert proper C++ library support 31483a925b30Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 31493a925b30Smrg ;; 31503a925b30Smrg esac 31513a925b30Smrg ;; 31523a925b30Smrg 31533a925b30Smrg cygwin* | mingw* | pw32*) 31543a925b30Smrg # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 31553a925b30Smrg # as there is no search path for DLLs. 31563a925b30Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 31573a925b30Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 31583a925b30Smrg _LT_AC_TAGVAR(always_export_symbols, $1)=no 31593a925b30Smrg _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 31603a925b30Smrg 31613a925b30Smrg if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then 31623a925b30Smrg _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' 31633a925b30Smrg # If the export-symbols file already is a .def file (1st line 31643a925b30Smrg # is EXPORTS), use it as is; otherwise, prepend... 31653a925b30Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 31663a925b30Smrg cp $export_symbols $output_objdir/$soname.def; 31673a925b30Smrg else 31683a925b30Smrg echo EXPORTS > $output_objdir/$soname.def; 31693a925b30Smrg cat $export_symbols >> $output_objdir/$soname.def; 31703a925b30Smrg fi~ 31713a925b30Smrg $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' 31723a925b30Smrg else 31733a925b30Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 31743a925b30Smrg fi 31753a925b30Smrg ;; 31763a925b30Smrg darwin* | rhapsody*) 31773a925b30Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 31783a925b30Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 31793a925b30Smrg _LT_AC_TAGVAR(hardcode_automatic, $1)=yes 31803a925b30Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 31813a925b30Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' 31823a925b30Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 31833a925b30Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" 31843a925b30Smrg if test "$GXX" = yes ; then 31853a925b30Smrg output_verbose_link_cmd='echo' 31863a925b30Smrg _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}" 31873a925b30Smrg _LT_AC_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" 31883a925b30Smrg _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}" 31893a925b30Smrg _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}" 31903a925b30Smrg if test "$lt_cv_apple_cc_single_mod" != "yes"; then 31913a925b30Smrg _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}" 31923a925b30Smrg _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}" 31933a925b30Smrg fi 31943a925b30Smrg else 31953a925b30Smrg case $cc_basename in 31963a925b30Smrg xlc*) 31973a925b30Smrg output_verbose_link_cmd='echo' 31983a925b30Smrg _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' 31993a925b30Smrg _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' 32003a925b30Smrg # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds 32013a925b30Smrg _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}' 32023a925b30Smrg _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}' 32033a925b30Smrg ;; 32043a925b30Smrg *) 32053a925b30Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 32063a925b30Smrg ;; 32073a925b30Smrg esac 32083a925b30Smrg fi 32093a925b30Smrg ;; 32103a925b30Smrg 32113a925b30Smrg dgux*) 32123a925b30Smrg case $cc_basename in 32133a925b30Smrg ec++*) 32143a925b30Smrg # FIXME: insert proper C++ library support 32153a925b30Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 32163a925b30Smrg ;; 32173a925b30Smrg ghcx*) 32183a925b30Smrg # Green Hills C++ Compiler 32193a925b30Smrg # FIXME: insert proper C++ library support 32203a925b30Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 32213a925b30Smrg ;; 32223a925b30Smrg *) 32233a925b30Smrg # FIXME: insert proper C++ library support 32243a925b30Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 32253a925b30Smrg ;; 32263a925b30Smrg esac 32273a925b30Smrg ;; 32283a925b30Smrg freebsd[[12]]*) 32293a925b30Smrg # C++ shared libraries reported to be fairly broken before switch to ELF 32303a925b30Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 32313a925b30Smrg ;; 32323a925b30Smrg freebsd-elf*) 32333a925b30Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 32343a925b30Smrg ;; 32353a925b30Smrg freebsd* | dragonfly*) 32363a925b30Smrg # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 32373a925b30Smrg # conventions 32383a925b30Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=yes 32393a925b30Smrg ;; 32403a925b30Smrg gnu*) 32413a925b30Smrg ;; 32423a925b30Smrg hpux9*) 32433a925b30Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 32443a925b30Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 32453a925b30Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 32463a925b30Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 32473a925b30Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 32483a925b30Smrg # but as the default 32493a925b30Smrg # location of the library. 32503a925b30Smrg 32513a925b30Smrg case $cc_basename in 32523a925b30Smrg CC*) 32533a925b30Smrg # FIXME: insert proper C++ library support 32543a925b30Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 32553a925b30Smrg ;; 32563a925b30Smrg aCC*) 32573a925b30Smrg _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' 32583a925b30Smrg # Commands to make compiler produce verbose output that lists 32593a925b30Smrg # what "hidden" libraries, object files and flags are used when 32603a925b30Smrg # linking a shared library. 32613a925b30Smrg # 32623a925b30Smrg # There doesn't appear to be a way to prevent this compiler from 32633a925b30Smrg # explicitly linking system object files so we need to strip them 32643a925b30Smrg # from the output so that they don't get included in the library 32653a925b30Smrg # dependencies. 32663a925b30Smrg 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' 326750f2e948Smrg ;; 32683a925b30Smrg *) 32693a925b30Smrg if test "$GXX" = yes; then 32703a925b30Smrg _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' 32713a925b30Smrg else 32723a925b30Smrg # FIXME: insert proper C++ library support 32733a925b30Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 32743a925b30Smrg fi 32753a925b30Smrg ;; 32763a925b30Smrg esac 32773a925b30Smrg ;; 32783a925b30Smrg hpux10*|hpux11*) 32793a925b30Smrg if test $with_gnu_ld = no; then 32803a925b30Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 32813a925b30Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 328245bc899bSmrg 328350f2e948Smrg case $host_cpu in 32843a925b30Smrg hppa*64*|ia64*) ;; 32853a925b30Smrg *) 32863a925b30Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 328750f2e948Smrg ;; 328850f2e948Smrg esac 32893a925b30Smrg fi 32903a925b30Smrg case $host_cpu in 32913a925b30Smrg hppa*64*|ia64*) 32923a925b30Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 32933a925b30Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 329450f2e948Smrg ;; 32953a925b30Smrg *) 32963a925b30Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 32973a925b30Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 32983a925b30Smrg # but as the default 32993a925b30Smrg # location of the library. 33001ac89addSmrg ;; 3301226fade8Smrg esac 33023a925b30Smrg 33033a925b30Smrg case $cc_basename in 33043a925b30Smrg CC*) 33053a925b30Smrg # FIXME: insert proper C++ library support 33063a925b30Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 330750f2e948Smrg ;; 33083a925b30Smrg aCC*) 33093a925b30Smrg case $host_cpu in 33103a925b30Smrg hppa*64*) 33113a925b30Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 33123a925b30Smrg ;; 33133a925b30Smrg ia64*) 33143a925b30Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 33153a925b30Smrg ;; 33163a925b30Smrg *) 33173a925b30Smrg _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' 331850f2e948Smrg ;; 331950f2e948Smrg esac 33203a925b30Smrg # Commands to make compiler produce verbose output that lists 33213a925b30Smrg # what "hidden" libraries, object files and flags are used when 33223a925b30Smrg # linking a shared library. 33233a925b30Smrg # 33243a925b30Smrg # There doesn't appear to be a way to prevent this compiler from 33253a925b30Smrg # explicitly linking system object files so we need to strip them 33263a925b30Smrg # from the output so that they don't get included in the library 33273a925b30Smrg # dependencies. 33283a925b30Smrg 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' 332950f2e948Smrg ;; 33303a925b30Smrg *) 33313a925b30Smrg if test "$GXX" = yes; then 33323a925b30Smrg if test $with_gnu_ld = no; then 333350f2e948Smrg case $host_cpu in 33343a925b30Smrg hppa*64*) 33353a925b30Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 33363a925b30Smrg ;; 33373a925b30Smrg ia64*) 33383a925b30Smrg _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' 333950f2e948Smrg ;; 334050f2e948Smrg *) 33413a925b30Smrg _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' 334250f2e948Smrg ;; 334350f2e948Smrg esac 33443a925b30Smrg fi 33453a925b30Smrg else 33463a925b30Smrg # FIXME: insert proper C++ library support 33473a925b30Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 33483a925b30Smrg fi 334950f2e948Smrg ;; 33503a925b30Smrg esac 33513a925b30Smrg ;; 33523a925b30Smrg interix[[3-9]]*) 33533a925b30Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 33543a925b30Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 33553a925b30Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 33563a925b30Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 33573a925b30Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 33583a925b30Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 33593a925b30Smrg # default) and relocated if they conflict, which is a slow very memory 33603a925b30Smrg # consuming and fragmenting process. To avoid this, we pick a random, 33613a925b30Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 33623a925b30Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 33633a925b30Smrg _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' 33643a925b30Smrg _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' 33653a925b30Smrg ;; 33663a925b30Smrg irix5* | irix6*) 33673a925b30Smrg case $cc_basename in 33683a925b30Smrg CC*) 33693a925b30Smrg # SGI C++ 33703a925b30Smrg _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' 33713a925b30Smrg 33723a925b30Smrg # Archives containing C++ object files must be created using 33733a925b30Smrg # "CC -ar", where "CC" is the IRIX C++ compiler. This is 33743a925b30Smrg # necessary to make sure instantiated templates are included 33753a925b30Smrg # in the archive. 33763a925b30Smrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 337750f2e948Smrg ;; 33783a925b30Smrg *) 33793a925b30Smrg if test "$GXX" = yes; then 33803a925b30Smrg if test "$with_gnu_ld" = no; then 33813a925b30Smrg _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' 33823a925b30Smrg else 33833a925b30Smrg _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' 33843a925b30Smrg fi 33853a925b30Smrg fi 33863a925b30Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 338750f2e948Smrg ;; 33883a925b30Smrg esac 33893a925b30Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 33903a925b30Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 33913a925b30Smrg ;; 33923a925b30Smrg linux* | k*bsd*-gnu) 33933a925b30Smrg case $cc_basename in 33943a925b30Smrg KCC*) 33953a925b30Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 33963a925b30Smrg 33973a925b30Smrg # KCC will only create a shared library if the output file 33983a925b30Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 33993a925b30Smrg # to its proper name (with version) after linking. 34003a925b30Smrg _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' 34013a925b30Smrg _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' 34023a925b30Smrg # Commands to make compiler produce verbose output that lists 34033a925b30Smrg # what "hidden" libraries, object files and flags are used when 34043a925b30Smrg # linking a shared library. 34053a925b30Smrg # 34063a925b30Smrg # There doesn't appear to be a way to prevent this compiler from 34073a925b30Smrg # explicitly linking system object files so we need to strip them 34083a925b30Smrg # from the output so that they don't get included in the library 34093a925b30Smrg # dependencies. 34103a925b30Smrg 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' 34113a925b30Smrg 34123a925b30Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir' 34133a925b30Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 34143a925b30Smrg 34153a925b30Smrg # Archives containing C++ object files must be created using 34163a925b30Smrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 34173a925b30Smrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 341850f2e948Smrg ;; 34193a925b30Smrg icpc*) 34203a925b30Smrg # Intel C++ 34213a925b30Smrg with_gnu_ld=yes 34223a925b30Smrg # version 8.0 and above of icpc choke on multiply defined symbols 34233a925b30Smrg # if we add $predep_objects and $postdep_objects, however 7.1 and 34243a925b30Smrg # earlier do not add the objects themselves. 34253a925b30Smrg case `$CC -V 2>&1` in 34263a925b30Smrg *"Version 7."*) 34273a925b30Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 34283a925b30Smrg _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' 34293a925b30Smrg ;; 34303a925b30Smrg *) # Version 8.0 or newer 34313a925b30Smrg tmp_idyn= 34323a925b30Smrg case $host_cpu in 34333a925b30Smrg ia64*) tmp_idyn=' -i_dynamic';; 34343a925b30Smrg esac 34353a925b30Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 34363a925b30Smrg _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' 34373a925b30Smrg ;; 343850f2e948Smrg esac 34393a925b30Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 34403a925b30Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 34413a925b30Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 34423a925b30Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 344350f2e948Smrg ;; 34443a925b30Smrg pgCC* | pgcpp*) 34453a925b30Smrg # Portland Group C++ compiler 34463a925b30Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 34473a925b30Smrg _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' 34483a925b30Smrg 34493a925b30Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 34503a925b30Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 34513a925b30Smrg _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' 345250f2e948Smrg ;; 34533a925b30Smrg cxx*) 34543a925b30Smrg # Compaq C++ 34553a925b30Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 34563a925b30Smrg _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' 34573a925b30Smrg 34583a925b30Smrg runpath_var=LD_RUN_PATH 34593a925b30Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 34603a925b30Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 34613a925b30Smrg 34623a925b30Smrg # Commands to make compiler produce verbose output that lists 34633a925b30Smrg # what "hidden" libraries, object files and flags are used when 34643a925b30Smrg # linking a shared library. 34653a925b30Smrg # 34663a925b30Smrg # There doesn't appear to be a way to prevent this compiler from 34673a925b30Smrg # explicitly linking system object files so we need to strip them 34683a925b30Smrg # from the output so that they don't get included in the library 34693a925b30Smrg # dependencies. 34703a925b30Smrg 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' 347150f2e948Smrg ;; 34723a925b30Smrg *) 34733a925b30Smrg case `$CC -V 2>&1 | sed 5q` in 34743a925b30Smrg *Sun\ C*) 34753a925b30Smrg # Sun C++ 5.9 34763a925b30Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' 34773a925b30Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 34783a925b30Smrg _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' 34793a925b30Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 34803a925b30Smrg _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' 34813a925b30Smrg 34823a925b30Smrg # Not sure whether something based on 34833a925b30Smrg # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 34843a925b30Smrg # would be better. 34853a925b30Smrg output_verbose_link_cmd='echo' 34863a925b30Smrg 34873a925b30Smrg # Archives containing C++ object files must be created using 34883a925b30Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 34893a925b30Smrg # necessary to make sure instantiated templates are included 34903a925b30Smrg # in the archive. 34913a925b30Smrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 34923a925b30Smrg ;; 349350f2e948Smrg esac 349450f2e948Smrg ;; 34953a925b30Smrg esac 34963a925b30Smrg ;; 34973a925b30Smrg lynxos*) 34983a925b30Smrg # FIXME: insert proper C++ library support 34993a925b30Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 35003a925b30Smrg ;; 35013a925b30Smrg m88k*) 35023a925b30Smrg # FIXME: insert proper C++ library support 35033a925b30Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 35043a925b30Smrg ;; 35053a925b30Smrg mvs*) 35063a925b30Smrg case $cc_basename in 35073a925b30Smrg cxx*) 35083a925b30Smrg # FIXME: insert proper C++ library support 35093a925b30Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 351050f2e948Smrg ;; 351150f2e948Smrg *) 35123a925b30Smrg # FIXME: insert proper C++ library support 35133a925b30Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 351450f2e948Smrg ;; 351550f2e948Smrg esac 35163a925b30Smrg ;; 35173a925b30Smrg netbsd*) 35183a925b30Smrg if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then 35193a925b30Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 35203a925b30Smrg wlarc= 35213a925b30Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 35223a925b30Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 35233a925b30Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 35243a925b30Smrg fi 35253a925b30Smrg # Workaround some broken pre-1.5 toolchains 35263a925b30Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 35273a925b30Smrg ;; 35283a925b30Smrg openbsd2*) 35293a925b30Smrg # C++ shared libraries are fairly broken 35303a925b30Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 35313a925b30Smrg ;; 35323a925b30Smrg openbsd*) 35333a925b30Smrg if test -f /usr/libexec/ld.so; then 35343a925b30Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 35353a925b30Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 35363a925b30Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 35373a925b30Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 35383a925b30Smrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 35393a925b30Smrg _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' 35403a925b30Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 35413a925b30Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 354250f2e948Smrg fi 35433a925b30Smrg output_verbose_link_cmd='echo' 35443a925b30Smrg else 35453a925b30Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 35463a925b30Smrg fi 35473a925b30Smrg ;; 35483a925b30Smrg osf3*) 35493a925b30Smrg case $cc_basename in 35503a925b30Smrg KCC*) 35513a925b30Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 35521ac89addSmrg 35533a925b30Smrg # KCC will only create a shared library if the output file 35543a925b30Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 35553a925b30Smrg # to its proper name (with version) after linking. 35563a925b30Smrg _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' 35571ac89addSmrg 35583a925b30Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 35593a925b30Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 35601ac89addSmrg 35613a925b30Smrg # Archives containing C++ object files must be created using 35623a925b30Smrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 35633a925b30Smrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 35641ac89addSmrg 356550f2e948Smrg ;; 35663a925b30Smrg RCC*) 35673a925b30Smrg # Rational C++ 2.4.1 35683a925b30Smrg # FIXME: insert proper C++ library support 35693a925b30Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 357050f2e948Smrg ;; 35713a925b30Smrg cxx*) 35723a925b30Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 35733a925b30Smrg _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' 35743a925b30Smrg 35753a925b30Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 35763a925b30Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 35773a925b30Smrg 35783a925b30Smrg # Commands to make compiler produce verbose output that lists 35793a925b30Smrg # what "hidden" libraries, object files and flags are used when 35803a925b30Smrg # linking a shared library. 35813a925b30Smrg # 35823a925b30Smrg # There doesn't appear to be a way to prevent this compiler from 35833a925b30Smrg # explicitly linking system object files so we need to strip them 35843a925b30Smrg # from the output so that they don't get included in the library 35853a925b30Smrg # dependencies. 35863a925b30Smrg 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' 35873a925b30Smrg ;; 35883a925b30Smrg *) 35893a925b30Smrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 35903a925b30Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 35913a925b30Smrg _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' 359245bc899bSmrg 35933a925b30Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 35943a925b30Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 359545bc899bSmrg 35963a925b30Smrg # Commands to make compiler produce verbose output that lists 35973a925b30Smrg # what "hidden" libraries, object files and flags are used when 35983a925b30Smrg # linking a shared library. 35993a925b30Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' 360045bc899bSmrg 36013a925b30Smrg else 36023a925b30Smrg # FIXME: insert proper C++ library support 36033a925b30Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 36043a925b30Smrg fi 36053a925b30Smrg ;; 36063a925b30Smrg esac 36073a925b30Smrg ;; 36083a925b30Smrg osf4* | osf5*) 36093a925b30Smrg case $cc_basename in 36103a925b30Smrg KCC*) 36113a925b30Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 36123a925b30Smrg 36133a925b30Smrg # KCC will only create a shared library if the output file 36143a925b30Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 36153a925b30Smrg # to its proper name (with version) after linking. 36163a925b30Smrg _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' 36173a925b30Smrg 36183a925b30Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 36193a925b30Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 36203a925b30Smrg 36213a925b30Smrg # Archives containing C++ object files must be created using 36223a925b30Smrg # the KAI C++ compiler. 36233a925b30Smrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' 36243a925b30Smrg ;; 36253a925b30Smrg RCC*) 36263a925b30Smrg # Rational C++ 2.4.1 36273a925b30Smrg # FIXME: insert proper C++ library support 36283a925b30Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 36293a925b30Smrg ;; 36303a925b30Smrg cxx*) 36313a925b30Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 36323a925b30Smrg _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' 36333a925b30Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 36343a925b30Smrg echo "-hidden">> $lib.exp~ 36353a925b30Smrg $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~ 36363a925b30Smrg $rm $lib.exp' 36373a925b30Smrg 36383a925b30Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 36393a925b30Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 36403a925b30Smrg 36413a925b30Smrg # Commands to make compiler produce verbose output that lists 36423a925b30Smrg # what "hidden" libraries, object files and flags are used when 36433a925b30Smrg # linking a shared library. 36443a925b30Smrg # 36453a925b30Smrg # There doesn't appear to be a way to prevent this compiler from 36463a925b30Smrg # explicitly linking system object files so we need to strip them 36473a925b30Smrg # from the output so that they don't get included in the library 36483a925b30Smrg # dependencies. 36493a925b30Smrg 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' 36503a925b30Smrg ;; 36513a925b30Smrg *) 36523a925b30Smrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 36533a925b30Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 36543a925b30Smrg _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' 365545bc899bSmrg 36563a925b30Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 36573a925b30Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 365845bc899bSmrg 36593a925b30Smrg # Commands to make compiler produce verbose output that lists 36603a925b30Smrg # what "hidden" libraries, object files and flags are used when 36613a925b30Smrg # linking a shared library. 36623a925b30Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' 36633a925b30Smrg 36643a925b30Smrg else 36653a925b30Smrg # FIXME: insert proper C++ library support 36663a925b30Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 36673a925b30Smrg fi 36683a925b30Smrg ;; 366950f2e948Smrg esac 36703a925b30Smrg ;; 36713a925b30Smrg psos*) 36723a925b30Smrg # FIXME: insert proper C++ library support 36733a925b30Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 36743a925b30Smrg ;; 36753a925b30Smrg sunos4*) 36763a925b30Smrg case $cc_basename in 36773a925b30Smrg CC*) 36783a925b30Smrg # Sun C++ 4.x 36793a925b30Smrg # FIXME: insert proper C++ library support 36803a925b30Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 36813a925b30Smrg ;; 36823a925b30Smrg lcc*) 36833a925b30Smrg # Lucid 36843a925b30Smrg # FIXME: insert proper C++ library support 36853a925b30Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 36863a925b30Smrg ;; 36873a925b30Smrg *) 36883a925b30Smrg # FIXME: insert proper C++ library support 36893a925b30Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 36903a925b30Smrg ;; 36913a925b30Smrg esac 36923a925b30Smrg ;; 36933a925b30Smrg solaris*) 36943a925b30Smrg case $cc_basename in 36953a925b30Smrg CC*) 36963a925b30Smrg # Sun C++ 4.2, 5.x and Centerline C++ 36973a925b30Smrg _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes 36983a925b30Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' 36993a925b30Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 37003a925b30Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 37013a925b30Smrg $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' 37023a925b30Smrg 37033a925b30Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 37043a925b30Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 37053a925b30Smrg case $host_os in 37063a925b30Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 37073a925b30Smrg *) 37083a925b30Smrg # The compiler driver will combine and reorder linker options, 37093a925b30Smrg # but understands `-z linker_flag'. 37103a925b30Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 37113a925b30Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 37123a925b30Smrg ;; 37133a925b30Smrg esac 37143a925b30Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 371545bc899bSmrg 37163a925b30Smrg output_verbose_link_cmd='echo' 371745bc899bSmrg 37183a925b30Smrg # Archives containing C++ object files must be created using 37193a925b30Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 37203a925b30Smrg # necessary to make sure instantiated templates are included 37213a925b30Smrg # in the archive. 37223a925b30Smrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 372350f2e948Smrg ;; 37243a925b30Smrg gcx*) 37253a925b30Smrg # Green Hills C++ Compiler 37263a925b30Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 37273a925b30Smrg 37283a925b30Smrg # The C++ compiler must be used to create the archive. 37293a925b30Smrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 373050f2e948Smrg ;; 37313a925b30Smrg *) 37323a925b30Smrg # GNU C++ compiler with Solaris linker 37333a925b30Smrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 37343a925b30Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' 37353a925b30Smrg if $CC --version | grep -v '^2\.7' > /dev/null; then 37363a925b30Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 37373a925b30Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 37383a925b30Smrg $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' 373945bc899bSmrg 37403a925b30Smrg # Commands to make compiler produce verbose output that lists 37413a925b30Smrg # what "hidden" libraries, object files and flags are used when 37423a925b30Smrg # linking a shared library. 37433a925b30Smrg output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" 37443a925b30Smrg else 37453a925b30Smrg # g++ 2.7 appears to require `-G' NOT `-shared' on this 37463a925b30Smrg # platform. 37473a925b30Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 37483a925b30Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 37493a925b30Smrg $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' 375045bc899bSmrg 37513a925b30Smrg # Commands to make compiler produce verbose output that lists 37523a925b30Smrg # what "hidden" libraries, object files and flags are used when 37533a925b30Smrg # linking a shared library. 37543a925b30Smrg output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" 37553a925b30Smrg fi 37563a925b30Smrg 37573a925b30Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' 37583a925b30Smrg case $host_os in 37593a925b30Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 37603a925b30Smrg *) 37613a925b30Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 37623a925b30Smrg ;; 37633a925b30Smrg esac 37643a925b30Smrg fi 376550f2e948Smrg ;; 37663a925b30Smrg esac 37673a925b30Smrg ;; 37683a925b30Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 37693a925b30Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 37703a925b30Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 37713a925b30Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 37723a925b30Smrg runpath_var='LD_RUN_PATH' 37733a925b30Smrg 37743a925b30Smrg case $cc_basename in 37753a925b30Smrg CC*) 37763a925b30Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 37773a925b30Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 377850f2e948Smrg ;; 377950f2e948Smrg *) 37803a925b30Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 37813a925b30Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 378250f2e948Smrg ;; 37833a925b30Smrg esac 37843a925b30Smrg ;; 37853a925b30Smrg sysv5* | sco3.2v5* | sco5v6*) 37863a925b30Smrg # Note: We can NOT use -z defs as we might desire, because we do not 37873a925b30Smrg # link with -lc, and that would cause any symbols used from libc to 37883a925b30Smrg # always be unresolved, which means just about no library would 37893a925b30Smrg # ever link correctly. If we're not using GNU ld we use -z text 37903a925b30Smrg # though, which does catch some bad symbols but isn't as heavy-handed 37913a925b30Smrg # as -z defs. 37923a925b30Smrg # For security reasons, it is highly recommended that you always 37933a925b30Smrg # use absolute paths for naming shared libraries, and exclude the 37943a925b30Smrg # DT_RUNPATH tag from executables and libraries. But doing so 37953a925b30Smrg # requires that you compile everything twice, which is a pain. 37963a925b30Smrg # So that behaviour is only enabled if SCOABSPATH is set to a 37973a925b30Smrg # non-empty value in the environment. Most likely only useful for 37983a925b30Smrg # creating official distributions of packages. 37993a925b30Smrg # This is a hack until libtool officially supports absolute path 38003a925b30Smrg # names for shared libraries. 38013a925b30Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 38023a925b30Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 38033a925b30Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 38043a925b30Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 38053a925b30Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' 38063a925b30Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' 38073a925b30Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 38083a925b30Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 38093a925b30Smrg runpath_var='LD_RUN_PATH' 38103a925b30Smrg 38113a925b30Smrg case $cc_basename in 38123a925b30Smrg CC*) 38133a925b30Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' 38143a925b30Smrg _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' 38153a925b30Smrg ;; 38163a925b30Smrg *) 38173a925b30Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' 38183a925b30Smrg _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' 38193a925b30Smrg ;; 38203a925b30Smrg esac 38213a925b30Smrg ;; 38223a925b30Smrg tandem*) 38233a925b30Smrg case $cc_basename in 38243a925b30Smrg NCC*) 38253a925b30Smrg # NonStop-UX NCC 3.20 38263a925b30Smrg # FIXME: insert proper C++ library support 38273a925b30Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 38283a925b30Smrg ;; 38293a925b30Smrg *) 38303a925b30Smrg # FIXME: insert proper C++ library support 38313a925b30Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 38323a925b30Smrg ;; 38333a925b30Smrg esac 38343a925b30Smrg ;; 38353a925b30Smrg vxworks*) 38363a925b30Smrg # FIXME: insert proper C++ library support 38373a925b30Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 38383a925b30Smrg ;; 38393a925b30Smrg *) 38403a925b30Smrg # FIXME: insert proper C++ library support 38413a925b30Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 38423a925b30Smrg ;; 38433a925b30Smrgesac 38443a925b30SmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) 38453a925b30Smrgtest "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 384645bc899bSmrg 38473a925b30Smrg_LT_AC_TAGVAR(GCC, $1)="$GXX" 38483a925b30Smrg_LT_AC_TAGVAR(LD, $1)="$LD" 384945bc899bSmrg 38503a925b30SmrgAC_LIBTOOL_POSTDEP_PREDEP($1) 38513a925b30SmrgAC_LIBTOOL_PROG_COMPILER_PIC($1) 38523a925b30SmrgAC_LIBTOOL_PROG_CC_C_O($1) 38533a925b30SmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) 38543a925b30SmrgAC_LIBTOOL_PROG_LD_SHLIBS($1) 38553a925b30SmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1) 38563a925b30SmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) 385745bc899bSmrg 38583a925b30SmrgAC_LIBTOOL_CONFIG($1) 38591ac89addSmrg 38603a925b30SmrgAC_LANG_POP 38613a925b30SmrgCC=$lt_save_CC 38623a925b30SmrgLDCXX=$LD 38633a925b30SmrgLD=$lt_save_LD 38643a925b30SmrgGCC=$lt_save_GCC 38653a925b30Smrgwith_gnu_ldcxx=$with_gnu_ld 38663a925b30Smrgwith_gnu_ld=$lt_save_with_gnu_ld 38673a925b30Smrglt_cv_path_LDCXX=$lt_cv_path_LD 38683a925b30Smrglt_cv_path_LD=$lt_save_path_LD 38693a925b30Smrglt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 38703a925b30Smrglt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 38713a925b30Smrg])# AC_LIBTOOL_LANG_CXX_CONFIG 38723a925b30Smrg 38733a925b30Smrg# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME]) 38743a925b30Smrg# ------------------------------------ 38753a925b30Smrg# Figure out "hidden" library dependencies from verbose 38763a925b30Smrg# compiler output when linking a shared library. 38773a925b30Smrg# Parse the compiler output and extract the necessary 38783a925b30Smrg# objects, libraries and library flags. 38793a925b30SmrgAC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP], 38803a925b30Smrg[AC_REQUIRE([LT_AC_PROG_SED])dnl 38813a925b30Smrgdnl we can't use the lt_simple_compile_test_code here, 38823a925b30Smrgdnl because it contains code intended for an executable, 38833a925b30Smrgdnl not a library. It's possible we should let each 38843a925b30Smrgdnl tag define a new lt_????_link_test_code variable, 38853a925b30Smrgdnl but it's only used here... 38863a925b30Smrgifelse([$1],[],[cat > conftest.$ac_ext <<EOF 38873a925b30Smrgint a; 38883a925b30Smrgvoid foo (void) { a = 0; } 38893a925b30SmrgEOF 38903a925b30Smrg],[$1],[CXX],[cat > conftest.$ac_ext <<EOF 38913a925b30Smrgclass Foo 38923a925b30Smrg{ 38933a925b30Smrgpublic: 38943a925b30Smrg Foo (void) { a = 0; } 38953a925b30Smrgprivate: 38963a925b30Smrg int a; 38973a925b30Smrg}; 38983a925b30SmrgEOF 38993a925b30Smrg],[$1],[F77],[cat > conftest.$ac_ext <<EOF 39003a925b30Smrg subroutine foo 39013a925b30Smrg implicit none 39023a925b30Smrg integer*4 a 39033a925b30Smrg a=0 39043a925b30Smrg return 39053a925b30Smrg end 39063a925b30SmrgEOF 39073a925b30Smrg],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF 39083a925b30Smrgpublic class foo { 39093a925b30Smrg private int a; 39103a925b30Smrg public void bar (void) { 39113a925b30Smrg a = 0; 39123a925b30Smrg } 39133a925b30Smrg}; 39143a925b30SmrgEOF 39153a925b30Smrg]) 39163a925b30Smrgdnl Parse the compiler output and extract the necessary 39173a925b30Smrgdnl objects, libraries and library flags. 39183a925b30Smrgif AC_TRY_EVAL(ac_compile); then 39193a925b30Smrg # Parse the compiler output and extract the necessary 39203a925b30Smrg # objects, libraries and library flags. 39211ac89addSmrg 39223a925b30Smrg # Sentinel used to keep track of whether or not we are before 39233a925b30Smrg # the conftest object file. 39243a925b30Smrg pre_test_object_deps_done=no 39251ac89addSmrg 39263a925b30Smrg # The `*' in the case matches for architectures that use `case' in 39273a925b30Smrg # $output_verbose_cmd can trigger glob expansion during the loop 39283a925b30Smrg # eval without this substitution. 39293a925b30Smrg output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"` 39301ac89addSmrg 39313a925b30Smrg for p in `eval $output_verbose_link_cmd`; do 39323a925b30Smrg case $p in 393345bc899bSmrg 39343a925b30Smrg -L* | -R* | -l*) 39353a925b30Smrg # Some compilers place space between "-{L,R}" and the path. 39363a925b30Smrg # Remove the space. 39373a925b30Smrg if test $p = "-L" \ 39383a925b30Smrg || test $p = "-R"; then 39393a925b30Smrg prev=$p 39403a925b30Smrg continue 39413a925b30Smrg else 39423a925b30Smrg prev= 39433a925b30Smrg fi 394445bc899bSmrg 39453a925b30Smrg if test "$pre_test_object_deps_done" = no; then 39463a925b30Smrg case $p in 39473a925b30Smrg -L* | -R*) 39483a925b30Smrg # Internal compiler library paths should come after those 39493a925b30Smrg # provided the user. The postdeps already come after the 39503a925b30Smrg # user supplied libs so there is no need to process them. 39513a925b30Smrg if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then 39523a925b30Smrg _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" 39533a925b30Smrg else 39543a925b30Smrg _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" 39553a925b30Smrg fi 39563a925b30Smrg ;; 39573a925b30Smrg # The "-l" case would never come before the object being 39583a925b30Smrg # linked, so don't bother handling this case. 39593a925b30Smrg esac 39603a925b30Smrg else 39613a925b30Smrg if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then 39623a925b30Smrg _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}" 39633a925b30Smrg else 39643a925b30Smrg _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}" 39653a925b30Smrg fi 39663a925b30Smrg fi 39673a925b30Smrg ;; 396845bc899bSmrg 39693a925b30Smrg *.$objext) 39703a925b30Smrg # This assumes that the test object file only shows up 39713a925b30Smrg # once in the compiler output. 39723a925b30Smrg if test "$p" = "conftest.$objext"; then 39733a925b30Smrg pre_test_object_deps_done=yes 39743a925b30Smrg continue 39753a925b30Smrg fi 397645bc899bSmrg 39773a925b30Smrg if test "$pre_test_object_deps_done" = no; then 39783a925b30Smrg if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then 39793a925b30Smrg _LT_AC_TAGVAR(predep_objects, $1)="$p" 39803a925b30Smrg else 39813a925b30Smrg _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p" 39823a925b30Smrg fi 39833a925b30Smrg else 39843a925b30Smrg if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then 39853a925b30Smrg _LT_AC_TAGVAR(postdep_objects, $1)="$p" 39863a925b30Smrg else 39873a925b30Smrg _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p" 39883a925b30Smrg fi 39893a925b30Smrg fi 39903a925b30Smrg ;; 39913a925b30Smrg 39923a925b30Smrg *) ;; # Ignore the rest. 39931ac89addSmrg 399450f2e948Smrg esac 39953a925b30Smrg done 39961ac89addSmrg 39973a925b30Smrg # Clean up. 39983a925b30Smrg rm -f a.out a.exe 39993a925b30Smrgelse 40003a925b30Smrg echo "libtool.m4: error: problem compiling $1 test program" 400150f2e948Smrgfi 40021ac89addSmrg 40033a925b30Smrg$rm -f confest.$objext 40041ac89addSmrg 40053a925b30Smrg_LT_AC_TAGVAR(compiler_lib_search_dirs, $1)= 40063a925b30Smrgif test -n "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then 40073a925b30Smrg _LT_AC_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_AC_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` 40083a925b30Smrgfi 40091ac89addSmrg 40103a925b30Smrg# PORTME: override above test on systems where it is broken 40113a925b30Smrgifelse([$1],[CXX], 40123a925b30Smrg[case $host_os in 40133a925b30Smrginterix[[3-9]]*) 40143a925b30Smrg # Interix 3.5 installs completely hosed .la files for C++, so rather than 40153a925b30Smrg # hack all around it, let's just trust "g++" to DTRT. 40163a925b30Smrg _LT_AC_TAGVAR(predep_objects,$1)= 40173a925b30Smrg _LT_AC_TAGVAR(postdep_objects,$1)= 40183a925b30Smrg _LT_AC_TAGVAR(postdeps,$1)= 401950f2e948Smrg ;; 40201ac89addSmrg 40213a925b30Smrglinux*) 40223a925b30Smrg case `$CC -V 2>&1 | sed 5q` in 40233a925b30Smrg *Sun\ C*) 40243a925b30Smrg # Sun C++ 5.9 40253a925b30Smrg # 40263a925b30Smrg # The more standards-conforming stlport4 library is 40273a925b30Smrg # incompatible with the Cstd library. Avoid specifying 40283a925b30Smrg # it if it's in CXXFLAGS. Ignore libCrun as 40293a925b30Smrg # -library=stlport4 depends on it. 40303a925b30Smrg case " $CXX $CXXFLAGS " in 40313a925b30Smrg *" -library=stlport4 "*) 40323a925b30Smrg solaris_use_stlport4=yes 40333a925b30Smrg ;; 40343a925b30Smrg esac 40353a925b30Smrg if test "$solaris_use_stlport4" != yes; then 40363a925b30Smrg _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 403750f2e948Smrg fi 403850f2e948Smrg ;; 403950f2e948Smrg esac 40403a925b30Smrg ;; 40411ac89addSmrg 40423a925b30Smrgsolaris*) 40433a925b30Smrg case $cc_basename in 40443a925b30Smrg CC*) 40453a925b30Smrg # The more standards-conforming stlport4 library is 40463a925b30Smrg # incompatible with the Cstd library. Avoid specifying 40473a925b30Smrg # it if it's in CXXFLAGS. Ignore libCrun as 40483a925b30Smrg # -library=stlport4 depends on it. 40493a925b30Smrg case " $CXX $CXXFLAGS " in 40503a925b30Smrg *" -library=stlport4 "*) 40513a925b30Smrg solaris_use_stlport4=yes 40523a925b30Smrg ;; 40533a925b30Smrg esac 40541ac89addSmrg 40553a925b30Smrg # Adding this requires a known-good setup of shared libraries for 40563a925b30Smrg # Sun compiler versions before 5.6, else PIC objects from an old 40573a925b30Smrg # archive will be linked into the output, leading to subtle bugs. 40583a925b30Smrg if test "$solaris_use_stlport4" != yes; then 40593a925b30Smrg _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 406050f2e948Smrg fi 40613a925b30Smrg ;; 40623a925b30Smrg esac 40633a925b30Smrg ;; 40643a925b30Smrgesac 40653a925b30Smrg]) 40663a925b30Smrgcase " $_LT_AC_TAGVAR(postdeps, $1) " in 40673a925b30Smrg*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;; 40683a925b30Smrgesac 40693a925b30Smrg])# AC_LIBTOOL_POSTDEP_PREDEP 40701ac89addSmrg 40713a925b30Smrg# AC_LIBTOOL_LANG_F77_CONFIG 40723a925b30Smrg# -------------------------- 40733a925b30Smrg# Ensure that the configuration vars for the C compiler are 40743a925b30Smrg# suitably defined. Those variables are subsequently used by 40753a925b30Smrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 40763a925b30SmrgAC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)]) 40773a925b30SmrgAC_DEFUN([_LT_AC_LANG_F77_CONFIG], 40783a925b30Smrg[AC_REQUIRE([AC_PROG_F77]) 40793a925b30SmrgAC_LANG_PUSH(Fortran 77) 40801ac89addSmrg 40813a925b30Smrg_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 40823a925b30Smrg_LT_AC_TAGVAR(allow_undefined_flag, $1)= 40833a925b30Smrg_LT_AC_TAGVAR(always_export_symbols, $1)=no 40843a925b30Smrg_LT_AC_TAGVAR(archive_expsym_cmds, $1)= 40853a925b30Smrg_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= 40863a925b30Smrg_LT_AC_TAGVAR(hardcode_direct, $1)=no 40873a925b30Smrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= 40883a925b30Smrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 40893a925b30Smrg_LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 40903a925b30Smrg_LT_AC_TAGVAR(hardcode_minus_L, $1)=no 40913a925b30Smrg_LT_AC_TAGVAR(hardcode_automatic, $1)=no 40923a925b30Smrg_LT_AC_TAGVAR(module_cmds, $1)= 40933a925b30Smrg_LT_AC_TAGVAR(module_expsym_cmds, $1)= 40943a925b30Smrg_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown 40953a925b30Smrg_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 40963a925b30Smrg_LT_AC_TAGVAR(no_undefined_flag, $1)= 40973a925b30Smrg_LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 40983a925b30Smrg_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no 40991ac89addSmrg 41003a925b30Smrg# Source file extension for f77 test sources. 41013a925b30Smrgac_ext=f 41021ac89addSmrg 41033a925b30Smrg# Object file extension for compiled f77 test sources. 41043a925b30Smrgobjext=o 41053a925b30Smrg_LT_AC_TAGVAR(objext, $1)=$objext 41061ac89addSmrg 41073a925b30Smrg# Code to be used in simple compile tests 41083a925b30Smrglt_simple_compile_test_code="\ 41093a925b30Smrg subroutine t 41103a925b30Smrg return 41113a925b30Smrg end 41123a925b30Smrg" 41131ac89addSmrg 41143a925b30Smrg# Code to be used in simple link tests 41153a925b30Smrglt_simple_link_test_code="\ 41163a925b30Smrg program t 41173a925b30Smrg end 41183a925b30Smrg" 41191ac89addSmrg 41203a925b30Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 41213a925b30Smrg_LT_AC_SYS_COMPILER 41221ac89addSmrg 41233a925b30Smrg# save warnings/boilerplate of simple test code 41243a925b30Smrg_LT_COMPILER_BOILERPLATE 41253a925b30Smrg_LT_LINKER_BOILERPLATE 41261ac89addSmrg 41273a925b30Smrg# Allow CC to be a program name with arguments. 41283a925b30Smrglt_save_CC="$CC" 41293a925b30SmrgCC=${F77-"f77"} 41303a925b30Smrgcompiler=$CC 41313a925b30Smrg_LT_AC_TAGVAR(compiler, $1)=$CC 41323a925b30Smrg_LT_CC_BASENAME([$compiler]) 41331ac89addSmrg 41343a925b30SmrgAC_MSG_CHECKING([if libtool supports shared libraries]) 41353a925b30SmrgAC_MSG_RESULT([$can_build_shared]) 41361ac89addSmrg 41373a925b30SmrgAC_MSG_CHECKING([whether to build shared libraries]) 41383a925b30Smrgtest "$can_build_shared" = "no" && enable_shared=no 41391ac89addSmrg 41403a925b30Smrg# On AIX, shared libraries and static libraries use the same namespace, and 41413a925b30Smrg# are all built from PIC. 41423a925b30Smrgcase $host_os in 41433a925b30Smrgaix3*) 41443a925b30Smrg test "$enable_shared" = yes && enable_static=no 41453a925b30Smrg if test -n "$RANLIB"; then 41463a925b30Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 41473a925b30Smrg postinstall_cmds='$RANLIB $lib' 41483a925b30Smrg fi 41493a925b30Smrg ;; 41503a925b30Smrgaix[[4-9]]*) 41513a925b30Smrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 41523a925b30Smrg test "$enable_shared" = yes && enable_static=no 41533a925b30Smrg fi 41543a925b30Smrg ;; 41553a925b30Smrgesac 41563a925b30SmrgAC_MSG_RESULT([$enable_shared]) 41571ac89addSmrg 41583a925b30SmrgAC_MSG_CHECKING([whether to build static libraries]) 41593a925b30Smrg# Make sure either enable_shared or enable_static is yes. 41603a925b30Smrgtest "$enable_shared" = yes || enable_static=yes 41613a925b30SmrgAC_MSG_RESULT([$enable_static]) 41621ac89addSmrg 41633a925b30Smrg_LT_AC_TAGVAR(GCC, $1)="$G77" 41643a925b30Smrg_LT_AC_TAGVAR(LD, $1)="$LD" 41651ac89addSmrg 41663a925b30SmrgAC_LIBTOOL_PROG_COMPILER_PIC($1) 41673a925b30SmrgAC_LIBTOOL_PROG_CC_C_O($1) 41683a925b30SmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) 41693a925b30SmrgAC_LIBTOOL_PROG_LD_SHLIBS($1) 41703a925b30SmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1) 41713a925b30SmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) 41721ac89addSmrg 41733a925b30SmrgAC_LIBTOOL_CONFIG($1) 41741ac89addSmrg 41753a925b30SmrgAC_LANG_POP 41763a925b30SmrgCC="$lt_save_CC" 41773a925b30Smrg])# AC_LIBTOOL_LANG_F77_CONFIG 41781ac89addSmrg 41791ac89addSmrg 41803a925b30Smrg# AC_LIBTOOL_LANG_GCJ_CONFIG 41813a925b30Smrg# -------------------------- 41823a925b30Smrg# Ensure that the configuration vars for the C compiler are 41833a925b30Smrg# suitably defined. Those variables are subsequently used by 41843a925b30Smrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 41853a925b30SmrgAC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)]) 41863a925b30SmrgAC_DEFUN([_LT_AC_LANG_GCJ_CONFIG], 41873a925b30Smrg[AC_LANG_SAVE 41881ac89addSmrg 41893a925b30Smrg# Source file extension for Java test sources. 41903a925b30Smrgac_ext=java 41911ac89addSmrg 41923a925b30Smrg# Object file extension for compiled Java test sources. 41933a925b30Smrgobjext=o 41943a925b30Smrg_LT_AC_TAGVAR(objext, $1)=$objext 41951ac89addSmrg 41963a925b30Smrg# Code to be used in simple compile tests 41973a925b30Smrglt_simple_compile_test_code="class foo {}" 41981ac89addSmrg 41993a925b30Smrg# Code to be used in simple link tests 42003a925b30Smrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 42011ac89addSmrg 42023a925b30Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 42033a925b30Smrg_LT_AC_SYS_COMPILER 42041ac89addSmrg 42053a925b30Smrg# save warnings/boilerplate of simple test code 42063a925b30Smrg_LT_COMPILER_BOILERPLATE 42073a925b30Smrg_LT_LINKER_BOILERPLATE 42081ac89addSmrg 42093a925b30Smrg# Allow CC to be a program name with arguments. 42103a925b30Smrglt_save_CC="$CC" 42113a925b30SmrgCC=${GCJ-"gcj"} 42123a925b30Smrgcompiler=$CC 42133a925b30Smrg_LT_AC_TAGVAR(compiler, $1)=$CC 42143a925b30Smrg_LT_CC_BASENAME([$compiler]) 42151ac89addSmrg 42163a925b30Smrg# GCJ did not exist at the time GCC didn't implicitly link libc in. 42173a925b30Smrg_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 42181ac89addSmrg 42193a925b30Smrg_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 42201ac89addSmrg 42213a925b30SmrgAC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) 42223a925b30SmrgAC_LIBTOOL_PROG_COMPILER_PIC($1) 42233a925b30SmrgAC_LIBTOOL_PROG_CC_C_O($1) 42243a925b30SmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) 42253a925b30SmrgAC_LIBTOOL_PROG_LD_SHLIBS($1) 42263a925b30SmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1) 42273a925b30SmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) 42281ac89addSmrg 42293a925b30SmrgAC_LIBTOOL_CONFIG($1) 42301ac89addSmrg 42313a925b30SmrgAC_LANG_RESTORE 42323a925b30SmrgCC="$lt_save_CC" 42333a925b30Smrg])# AC_LIBTOOL_LANG_GCJ_CONFIG 42341ac89addSmrg 42351ac89addSmrg 42363a925b30Smrg# AC_LIBTOOL_LANG_RC_CONFIG 42373a925b30Smrg# ------------------------- 42383a925b30Smrg# Ensure that the configuration vars for the Windows resource compiler are 42393a925b30Smrg# suitably defined. Those variables are subsequently used by 42403a925b30Smrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 42413a925b30SmrgAC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)]) 42423a925b30SmrgAC_DEFUN([_LT_AC_LANG_RC_CONFIG], 42433a925b30Smrg[AC_LANG_SAVE 42441ac89addSmrg 42453a925b30Smrg# Source file extension for RC test sources. 42463a925b30Smrgac_ext=rc 42471ac89addSmrg 42483a925b30Smrg# Object file extension for compiled RC test sources. 42493a925b30Smrgobjext=o 42503a925b30Smrg_LT_AC_TAGVAR(objext, $1)=$objext 42511ac89addSmrg 42523a925b30Smrg# Code to be used in simple compile tests 42533a925b30Smrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 425445bc899bSmrg 42553a925b30Smrg# Code to be used in simple link tests 42563a925b30Smrglt_simple_link_test_code="$lt_simple_compile_test_code" 425745bc899bSmrg 42583a925b30Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 42593a925b30Smrg_LT_AC_SYS_COMPILER 426045bc899bSmrg 42613a925b30Smrg# save warnings/boilerplate of simple test code 42623a925b30Smrg_LT_COMPILER_BOILERPLATE 42633a925b30Smrg_LT_LINKER_BOILERPLATE 426445bc899bSmrg 42653a925b30Smrg# Allow CC to be a program name with arguments. 42663a925b30Smrglt_save_CC="$CC" 42673a925b30SmrgCC=${RC-"windres"} 42683a925b30Smrgcompiler=$CC 42693a925b30Smrg_LT_AC_TAGVAR(compiler, $1)=$CC 42703a925b30Smrg_LT_CC_BASENAME([$compiler]) 42713a925b30Smrg_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 427245bc899bSmrg 42733a925b30SmrgAC_LIBTOOL_CONFIG($1) 427445bc899bSmrg 42753a925b30SmrgAC_LANG_RESTORE 42763a925b30SmrgCC="$lt_save_CC" 42773a925b30Smrg])# AC_LIBTOOL_LANG_RC_CONFIG 427845bc899bSmrg 427945bc899bSmrg 42803a925b30Smrg# AC_LIBTOOL_CONFIG([TAGNAME]) 42813a925b30Smrg# ---------------------------- 42823a925b30Smrg# If TAGNAME is not passed, then create an initial libtool script 42833a925b30Smrg# with a default configuration from the untagged config vars. Otherwise 42843a925b30Smrg# add code to config.status for appending the configuration named by 42853a925b30Smrg# TAGNAME from the matching tagged config vars. 42863a925b30SmrgAC_DEFUN([AC_LIBTOOL_CONFIG], 42873a925b30Smrg[# The else clause should only fire when bootstrapping the 42883a925b30Smrg# libtool distribution, otherwise you forgot to ship ltmain.sh 42893a925b30Smrg# with your package, and you will get complaints that there are 42903a925b30Smrg# no rules to generate ltmain.sh. 42913a925b30Smrgif test -f "$ltmain"; then 42923a925b30Smrg # See if we are running on zsh, and set the options which allow our commands through 42933a925b30Smrg # without removal of \ escapes. 42943a925b30Smrg if test -n "${ZSH_VERSION+set}" ; then 42953a925b30Smrg setopt NO_GLOB_SUBST 42963a925b30Smrg fi 42973a925b30Smrg # Now quote all the things that may contain metacharacters while being 42983a925b30Smrg # careful not to overquote the AC_SUBSTed values. We take copies of the 42993a925b30Smrg # variables and quote the copies for generation of the libtool script. 43003a925b30Smrg for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ 43013a925b30Smrg SED SHELL STRIP \ 43023a925b30Smrg libname_spec library_names_spec soname_spec extract_expsyms_cmds \ 43033a925b30Smrg old_striplib striplib file_magic_cmd finish_cmds finish_eval \ 43043a925b30Smrg deplibs_check_method reload_flag reload_cmds need_locks \ 43053a925b30Smrg lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ 43063a925b30Smrg lt_cv_sys_global_symbol_to_c_name_address \ 43073a925b30Smrg sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ 43083a925b30Smrg old_postinstall_cmds old_postuninstall_cmds \ 43093a925b30Smrg _LT_AC_TAGVAR(compiler, $1) \ 43103a925b30Smrg _LT_AC_TAGVAR(CC, $1) \ 43113a925b30Smrg _LT_AC_TAGVAR(LD, $1) \ 43123a925b30Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \ 43133a925b30Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \ 43143a925b30Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \ 43153a925b30Smrg _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \ 43163a925b30Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \ 43173a925b30Smrg _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \ 43183a925b30Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \ 43193a925b30Smrg _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \ 43203a925b30Smrg _LT_AC_TAGVAR(old_archive_cmds, $1) \ 43213a925b30Smrg _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \ 43223a925b30Smrg _LT_AC_TAGVAR(predep_objects, $1) \ 43233a925b30Smrg _LT_AC_TAGVAR(postdep_objects, $1) \ 43243a925b30Smrg _LT_AC_TAGVAR(predeps, $1) \ 43253a925b30Smrg _LT_AC_TAGVAR(postdeps, $1) \ 43263a925b30Smrg _LT_AC_TAGVAR(compiler_lib_search_path, $1) \ 43273a925b30Smrg _LT_AC_TAGVAR(compiler_lib_search_dirs, $1) \ 43283a925b30Smrg _LT_AC_TAGVAR(archive_cmds, $1) \ 43293a925b30Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1) \ 43303a925b30Smrg _LT_AC_TAGVAR(postinstall_cmds, $1) \ 43313a925b30Smrg _LT_AC_TAGVAR(postuninstall_cmds, $1) \ 43323a925b30Smrg _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \ 43333a925b30Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1) \ 43343a925b30Smrg _LT_AC_TAGVAR(no_undefined_flag, $1) \ 43353a925b30Smrg _LT_AC_TAGVAR(export_symbols_cmds, $1) \ 43363a925b30Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \ 43373a925b30Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \ 43383a925b30Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \ 43393a925b30Smrg _LT_AC_TAGVAR(hardcode_automatic, $1) \ 43403a925b30Smrg _LT_AC_TAGVAR(module_cmds, $1) \ 43413a925b30Smrg _LT_AC_TAGVAR(module_expsym_cmds, $1) \ 43423a925b30Smrg _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \ 43433a925b30Smrg _LT_AC_TAGVAR(fix_srcfile_path, $1) \ 43443a925b30Smrg _LT_AC_TAGVAR(exclude_expsyms, $1) \ 43453a925b30Smrg _LT_AC_TAGVAR(include_expsyms, $1); do 43463a925b30Smrg 43473a925b30Smrg case $var in 43483a925b30Smrg _LT_AC_TAGVAR(old_archive_cmds, $1) | \ 43493a925b30Smrg _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \ 43503a925b30Smrg _LT_AC_TAGVAR(archive_cmds, $1) | \ 43513a925b30Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \ 43523a925b30Smrg _LT_AC_TAGVAR(module_cmds, $1) | \ 43533a925b30Smrg _LT_AC_TAGVAR(module_expsym_cmds, $1) | \ 43543a925b30Smrg _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \ 43553a925b30Smrg _LT_AC_TAGVAR(export_symbols_cmds, $1) | \ 43563a925b30Smrg extract_expsyms_cmds | reload_cmds | finish_cmds | \ 43573a925b30Smrg postinstall_cmds | postuninstall_cmds | \ 43583a925b30Smrg old_postinstall_cmds | old_postuninstall_cmds | \ 43593a925b30Smrg sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) 43603a925b30Smrg # Double-quote double-evaled strings. 43613a925b30Smrg eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" 436250f2e948Smrg ;; 43633a925b30Smrg *) 43643a925b30Smrg eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" 436550f2e948Smrg ;; 43663a925b30Smrg esac 43673a925b30Smrg done 43681ac89addSmrg 43693a925b30Smrg case $lt_echo in 43703a925b30Smrg *'\[$]0 --fallback-echo"') 43713a925b30Smrg lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'` 43723a925b30Smrg ;; 43733a925b30Smrg esac 43741ac89addSmrg 43753a925b30Smrgifelse([$1], [], 43763a925b30Smrg [cfgfile="${ofile}T" 43773a925b30Smrg trap "$rm \"$cfgfile\"; exit 1" 1 2 15 43783a925b30Smrg $rm -f "$cfgfile" 43793a925b30Smrg AC_MSG_NOTICE([creating $ofile])], 43803a925b30Smrg [cfgfile="$ofile"]) 43811ac89addSmrg 43823a925b30Smrg cat <<__EOF__ >> "$cfgfile" 43833a925b30Smrgifelse([$1], [], 43843a925b30Smrg[#! $SHELL 43851ac89addSmrg 43863a925b30Smrg# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. 43873a925b30Smrg# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) 43883a925b30Smrg# NOTE: Changes made to this file will be lost: look at ltmain.sh. 43893a925b30Smrg# 43903a925b30Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 43913a925b30Smrg# Free Software Foundation, Inc. 43923a925b30Smrg# 43933a925b30Smrg# This file is part of GNU Libtool: 43943a925b30Smrg# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 43953a925b30Smrg# 43963a925b30Smrg# This program is free software; you can redistribute it and/or modify 43973a925b30Smrg# it under the terms of the GNU General Public License as published by 43983a925b30Smrg# the Free Software Foundation; either version 2 of the License, or 43993a925b30Smrg# (at your option) any later version. 44003a925b30Smrg# 44013a925b30Smrg# This program is distributed in the hope that it will be useful, but 44023a925b30Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 44033a925b30Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 44043a925b30Smrg# General Public License for more details. 44053a925b30Smrg# 44063a925b30Smrg# You should have received a copy of the GNU General Public License 44073a925b30Smrg# along with this program; if not, write to the Free Software 44083a925b30Smrg# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 44093a925b30Smrg# 44103a925b30Smrg# As a special exception to the GNU General Public License, if you 44113a925b30Smrg# distribute this file as part of a program that contains a 44123a925b30Smrg# configuration script generated by Autoconf, you may include it under 44133a925b30Smrg# the same distribution terms that you use for the rest of that program. 44141ac89addSmrg 44153a925b30Smrg# A sed program that does not truncate output. 44163a925b30SmrgSED=$lt_SED 44171ac89addSmrg 44183a925b30Smrg# Sed that helps us avoid accidentally triggering echo(1) options like -n. 44193a925b30SmrgXsed="$SED -e 1s/^X//" 44201ac89addSmrg 44213a925b30Smrg# The HP-UX ksh and POSIX shell print the target directory to stdout 44223a925b30Smrg# if CDPATH is set. 44233a925b30Smrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 44241ac89addSmrg 44253a925b30Smrg# The names of the tagged configurations supported by this script. 44263a925b30Smrgavailable_tags= 44271ac89addSmrg 44283a925b30Smrg# ### BEGIN LIBTOOL CONFIG], 44293a925b30Smrg[# ### BEGIN LIBTOOL TAG CONFIG: $tagname]) 44301ac89addSmrg 44313a925b30Smrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 44321ac89addSmrg 44333a925b30Smrg# Shell to use when invoking shell scripts. 44343a925b30SmrgSHELL=$lt_SHELL 44351ac89addSmrg 44363a925b30Smrg# Whether or not to build shared libraries. 44373a925b30Smrgbuild_libtool_libs=$enable_shared 44381ac89addSmrg 44393a925b30Smrg# Whether or not to build static libraries. 44403a925b30Smrgbuild_old_libs=$enable_static 44411ac89addSmrg 44423a925b30Smrg# Whether or not to add -lc for building shared libraries. 44433a925b30Smrgbuild_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1) 44441ac89addSmrg 44453a925b30Smrg# Whether or not to disallow shared libs when runtime libs are static 44463a925b30Smrgallow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) 44471ac89addSmrg 44483a925b30Smrg# Whether or not to optimize for fast installation. 44493a925b30Smrgfast_install=$enable_fast_install 44501ac89addSmrg 44513a925b30Smrg# The host system. 44523a925b30Smrghost_alias=$host_alias 44533a925b30Smrghost=$host 44543a925b30Smrghost_os=$host_os 44551ac89addSmrg 44563a925b30Smrg# The build system. 44573a925b30Smrgbuild_alias=$build_alias 44583a925b30Smrgbuild=$build 44593a925b30Smrgbuild_os=$build_os 446050f2e948Smrg 44613a925b30Smrg# An echo program that does not interpret backslashes. 44623a925b30Smrgecho=$lt_echo 446350f2e948Smrg 44643a925b30Smrg# The archiver. 44653a925b30SmrgAR=$lt_AR 44663a925b30SmrgAR_FLAGS=$lt_AR_FLAGS 446750f2e948Smrg 44683a925b30Smrg# A C compiler. 44693a925b30SmrgLTCC=$lt_LTCC 447050f2e948Smrg 44713a925b30Smrg# LTCC compiler flags. 44723a925b30SmrgLTCFLAGS=$lt_LTCFLAGS 447350f2e948Smrg 44743a925b30Smrg# A language-specific compiler. 44753a925b30SmrgCC=$lt_[]_LT_AC_TAGVAR(compiler, $1) 44761ac89addSmrg 44773a925b30Smrg# Is the compiler the GNU C compiler? 44783a925b30Smrgwith_gcc=$_LT_AC_TAGVAR(GCC, $1) 44791ac89addSmrg 44803a925b30Smrg# An ERE matcher. 44813a925b30SmrgEGREP=$lt_EGREP 44821ac89addSmrg 44833a925b30Smrg# The linker used to build libraries. 44843a925b30SmrgLD=$lt_[]_LT_AC_TAGVAR(LD, $1) 44851ac89addSmrg 44863a925b30Smrg# Whether we need hard or soft links. 44873a925b30SmrgLN_S=$lt_LN_S 44881ac89addSmrg 44893a925b30Smrg# A BSD-compatible nm program. 44903a925b30SmrgNM=$lt_NM 44911ac89addSmrg 44923a925b30Smrg# A symbol stripping program 44933a925b30SmrgSTRIP=$lt_STRIP 44941ac89addSmrg 44953a925b30Smrg# Used to examine libraries when file_magic_cmd begins "file" 44963a925b30SmrgMAGIC_CMD=$MAGIC_CMD 44971ac89addSmrg 44983a925b30Smrg# Used on cygwin: DLL creation program. 44993a925b30SmrgDLLTOOL="$DLLTOOL" 45001ac89addSmrg 45013a925b30Smrg# Used on cygwin: object dumper. 45023a925b30SmrgOBJDUMP="$OBJDUMP" 45031ac89addSmrg 45043a925b30Smrg# Used on cygwin: assembler. 45053a925b30SmrgAS="$AS" 45061ac89addSmrg 45073a925b30Smrg# The name of the directory that contains temporary libtool files. 45083a925b30Smrgobjdir=$objdir 45091ac89addSmrg 45103a925b30Smrg# How to create reloadable object files. 45113a925b30Smrgreload_flag=$lt_reload_flag 45123a925b30Smrgreload_cmds=$lt_reload_cmds 45131ac89addSmrg 45143a925b30Smrg# How to pass a linker flag through the compiler. 45153a925b30Smrgwl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) 451650f2e948Smrg 45173a925b30Smrg# Object file suffix (normally "o"). 45183a925b30Smrgobjext="$ac_objext" 451950f2e948Smrg 45203a925b30Smrg# Old archive suffix (normally "a"). 45213a925b30Smrglibext="$libext" 452250f2e948Smrg 45233a925b30Smrg# Shared library suffix (normally ".so"). 45243a925b30Smrgshrext_cmds='$shrext_cmds' 452550f2e948Smrg 45263a925b30Smrg# Executable file suffix (normally ""). 45273a925b30Smrgexeext="$exeext" 452850f2e948Smrg 45293a925b30Smrg# Additional compiler flags for building library objects. 45303a925b30Smrgpic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) 45313a925b30Smrgpic_mode=$pic_mode 45321ac89addSmrg 45333a925b30Smrg# What is the maximum length of a command? 45343a925b30Smrgmax_cmd_len=$lt_cv_sys_max_cmd_len 45351ac89addSmrg 45363a925b30Smrg# Does compiler simultaneously support -c and -o options? 45373a925b30Smrgcompiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) 45381ac89addSmrg 45393a925b30Smrg# Must we lock files when doing compilation? 45403a925b30Smrgneed_locks=$lt_need_locks 45411ac89addSmrg 45423a925b30Smrg# Do we need the lib prefix for modules? 45433a925b30Smrgneed_lib_prefix=$need_lib_prefix 454450f2e948Smrg 45453a925b30Smrg# Do we need a version for libraries? 45463a925b30Smrgneed_version=$need_version 454750f2e948Smrg 45483a925b30Smrg# Whether dlopen is supported. 45493a925b30Smrgdlopen_support=$enable_dlopen 455050f2e948Smrg 45513a925b30Smrg# Whether dlopen of programs is supported. 45523a925b30Smrgdlopen_self=$enable_dlopen_self 455350f2e948Smrg 45543a925b30Smrg# Whether dlopen of statically linked programs is supported. 45553a925b30Smrgdlopen_self_static=$enable_dlopen_self_static 455650f2e948Smrg 45573a925b30Smrg# Compiler flag to prevent dynamic linking. 45583a925b30Smrglink_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1) 455950f2e948Smrg 45603a925b30Smrg# Compiler flag to turn off builtin functions. 45613a925b30Smrgno_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) 456250f2e948Smrg 45633a925b30Smrg# Compiler flag to allow reflexive dlopens. 45643a925b30Smrgexport_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1) 456550f2e948Smrg 45663a925b30Smrg# Compiler flag to generate shared objects directly from archives. 45673a925b30Smrgwhole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1) 456850f2e948Smrg 45693a925b30Smrg# Compiler flag to generate thread-safe objects. 45703a925b30Smrgthread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1) 457150f2e948Smrg 45723a925b30Smrg# Library versioning type. 45733a925b30Smrgversion_type=$version_type 457450f2e948Smrg 45753a925b30Smrg# Format of library name prefix. 45763a925b30Smrglibname_spec=$lt_libname_spec 457750f2e948Smrg 45783a925b30Smrg# List of archive names. First name is the real one, the rest are links. 45793a925b30Smrg# The last name is the one that the linker finds with -lNAME. 45803a925b30Smrglibrary_names_spec=$lt_library_names_spec 458150f2e948Smrg 45823a925b30Smrg# The coded name of the library, if different from the real name. 45833a925b30Smrgsoname_spec=$lt_soname_spec 458450f2e948Smrg 45853a925b30Smrg# Commands used to build and install an old-style archive. 45863a925b30SmrgRANLIB=$lt_RANLIB 45873a925b30Smrgold_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1) 45883a925b30Smrgold_postinstall_cmds=$lt_old_postinstall_cmds 45893a925b30Smrgold_postuninstall_cmds=$lt_old_postuninstall_cmds 459050f2e948Smrg 45913a925b30Smrg# Create an old-style archive from a shared archive. 45923a925b30Smrgold_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1) 459350f2e948Smrg 45943a925b30Smrg# Create a temporary old-style archive to link instead of a shared archive. 45953a925b30Smrgold_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) 459650f2e948Smrg 45973a925b30Smrg# Commands used to build and install a shared archive. 45983a925b30Smrgarchive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1) 45993a925b30Smrgarchive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1) 46003a925b30Smrgpostinstall_cmds=$lt_postinstall_cmds 46013a925b30Smrgpostuninstall_cmds=$lt_postuninstall_cmds 460250f2e948Smrg 46033a925b30Smrg# Commands used to build a loadable module (assumed same as above if empty) 46043a925b30Smrgmodule_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1) 46053a925b30Smrgmodule_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1) 460650f2e948Smrg 46073a925b30Smrg# Commands to strip libraries. 46083a925b30Smrgold_striplib=$lt_old_striplib 46093a925b30Smrgstriplib=$lt_striplib 461050f2e948Smrg 46113a925b30Smrg# Dependencies to place before the objects being linked to create a 46123a925b30Smrg# shared library. 46133a925b30Smrgpredep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1) 461450f2e948Smrg 46153a925b30Smrg# Dependencies to place after the objects being linked to create a 46163a925b30Smrg# shared library. 46173a925b30Smrgpostdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1) 461850f2e948Smrg 46193a925b30Smrg# Dependencies to place before the objects being linked to create a 46203a925b30Smrg# shared library. 46213a925b30Smrgpredeps=$lt_[]_LT_AC_TAGVAR(predeps, $1) 462250f2e948Smrg 46233a925b30Smrg# Dependencies to place after the objects being linked to create a 46243a925b30Smrg# shared library. 46253a925b30Smrgpostdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1) 462650f2e948Smrg 46273a925b30Smrg# The directories searched by this compiler when creating a shared 46283a925b30Smrg# library 46293a925b30Smrgcompiler_lib_search_dirs=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_dirs, $1) 463050f2e948Smrg 46313a925b30Smrg# The library search path used internally by the compiler when linking 46323a925b30Smrg# a shared library. 46333a925b30Smrgcompiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1) 463450f2e948Smrg 46353a925b30Smrg# Method to check whether dependent libraries are shared objects. 46363a925b30Smrgdeplibs_check_method=$lt_deplibs_check_method 463750f2e948Smrg 46383a925b30Smrg# Command to use when deplibs_check_method == file_magic. 46393a925b30Smrgfile_magic_cmd=$lt_file_magic_cmd 464050f2e948Smrg 46413a925b30Smrg# Flag that allows shared libraries with undefined symbols to be built. 46423a925b30Smrgallow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1) 464350f2e948Smrg 46443a925b30Smrg# Flag that forces no undefined symbols. 46453a925b30Smrgno_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1) 464650f2e948Smrg 46473a925b30Smrg# Commands used to finish a libtool library installation in a directory. 46483a925b30Smrgfinish_cmds=$lt_finish_cmds 464950f2e948Smrg 46503a925b30Smrg# Same as above, but a single script fragment to be evaled but not shown. 46513a925b30Smrgfinish_eval=$lt_finish_eval 465250f2e948Smrg 46533a925b30Smrg# Take the output of nm and produce a listing of raw symbols and C names. 46543a925b30Smrgglobal_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe 465550f2e948Smrg 46563a925b30Smrg# Transform the output of nm in a proper C declaration 46573a925b30Smrgglobal_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl 465850f2e948Smrg 46593a925b30Smrg# Transform the output of nm in a C name address pair 46603a925b30Smrgglobal_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address 466150f2e948Smrg 46623a925b30Smrg# This is the shared library runtime path variable. 46633a925b30Smrgrunpath_var=$runpath_var 466450f2e948Smrg 46653a925b30Smrg# This is the shared library path variable. 46663a925b30Smrgshlibpath_var=$shlibpath_var 466750f2e948Smrg 46683a925b30Smrg# Is shlibpath searched before the hard-coded library search path? 46693a925b30Smrgshlibpath_overrides_runpath=$shlibpath_overrides_runpath 467050f2e948Smrg 46713a925b30Smrg# How to hardcode a shared library path into an executable. 46723a925b30Smrghardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1) 467350f2e948Smrg 46743a925b30Smrg# Whether we should hardcode library paths into libraries. 46753a925b30Smrghardcode_into_libs=$hardcode_into_libs 467650f2e948Smrg 46773a925b30Smrg# Flag to hardcode \$libdir into a binary during linking. 46783a925b30Smrg# This must work even if \$libdir does not exist. 46793a925b30Smrghardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) 468050f2e948Smrg 46813a925b30Smrg# If ld is used when linking, flag to hardcode \$libdir into 46823a925b30Smrg# a binary during linking. This must work even if \$libdir does 46833a925b30Smrg# not exist. 46843a925b30Smrghardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) 468550f2e948Smrg 46863a925b30Smrg# Whether we need a single -rpath flag with a separated argument. 46873a925b30Smrghardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1) 468850f2e948Smrg 46893a925b30Smrg# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the 46903a925b30Smrg# resulting binary. 46913a925b30Smrghardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1) 469250f2e948Smrg 46933a925b30Smrg# Set to yes if using the -LDIR flag during linking hardcodes DIR into the 46943a925b30Smrg# resulting binary. 46953a925b30Smrghardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1) 469650f2e948Smrg 46973a925b30Smrg# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into 46983a925b30Smrg# the resulting binary. 46993a925b30Smrghardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1) 470050f2e948Smrg 47013a925b30Smrg# Set to yes if building a shared library automatically hardcodes DIR into the library 47023a925b30Smrg# and all subsequent libraries and executables linked against it. 47033a925b30Smrghardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1) 470450f2e948Smrg 47053a925b30Smrg# Variables whose values should be saved in libtool wrapper scripts and 47063a925b30Smrg# restored at relink time. 47073a925b30Smrgvariables_saved_for_relink="$variables_saved_for_relink" 47081ac89addSmrg 47093a925b30Smrg# Whether libtool must link a program against all its dependency libraries. 47103a925b30Smrglink_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1) 47111ac89addSmrg 47123a925b30Smrg# Compile-time system search path for libraries 47133a925b30Smrgsys_lib_search_path_spec=$lt_sys_lib_search_path_spec 47141ac89addSmrg 47153a925b30Smrg# Run-time system search path for libraries 47163a925b30Smrgsys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec 47171ac89addSmrg 47183a925b30Smrg# Fix the shell variable \$srcfile for the compiler. 47193a925b30Smrgfix_srcfile_path=$lt_fix_srcfile_path 47201ac89addSmrg 47213a925b30Smrg# Set to yes if exported symbols are required. 47223a925b30Smrgalways_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1) 47231ac89addSmrg 47243a925b30Smrg# The commands to list exported symbols. 47253a925b30Smrgexport_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1) 472645bc899bSmrg 47273a925b30Smrg# The commands to extract the exported symbol list from a shared archive. 47283a925b30Smrgextract_expsyms_cmds=$lt_extract_expsyms_cmds 472945bc899bSmrg 47303a925b30Smrg# Symbols that should not be listed in the preloaded symbols. 47313a925b30Smrgexclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1) 473245bc899bSmrg 47333a925b30Smrg# Symbols that must always be exported. 47343a925b30Smrginclude_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1) 473550f2e948Smrg 47363a925b30Smrgifelse([$1],[], 47373a925b30Smrg[# ### END LIBTOOL CONFIG], 47383a925b30Smrg[# ### END LIBTOOL TAG CONFIG: $tagname]) 473950f2e948Smrg 47403a925b30Smrg__EOF__ 474150f2e948Smrg 47423a925b30Smrgifelse([$1],[], [ 47433a925b30Smrg case $host_os in 47443a925b30Smrg aix3*) 47453a925b30Smrg cat <<\EOF >> "$cfgfile" 474650f2e948Smrg 47473a925b30Smrg# AIX sometimes has problems with the GCC collect2 program. For some 47483a925b30Smrg# reason, if we set the COLLECT_NAMES environment variable, the problems 47493a925b30Smrg# vanish in a puff of smoke. 47503a925b30Smrgif test "X${COLLECT_NAMES+set}" != Xset; then 47513a925b30Smrg COLLECT_NAMES= 47523a925b30Smrg export COLLECT_NAMES 47533a925b30Smrgfi 47543a925b30SmrgEOF 47553a925b30Smrg ;; 47563a925b30Smrg esac 475750f2e948Smrg 47583a925b30Smrg # We use sed instead of cat because bash on DJGPP gets confused if 47593a925b30Smrg # if finds mixed CR/LF and LF-only lines. Since sed operates in 47603a925b30Smrg # text mode, it properly converts lines to CR/LF. This bash problem 47613a925b30Smrg # is reportedly fixed, but why not run on old versions too? 47623a925b30Smrg sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1) 47633a925b30Smrg 47643a925b30Smrg mv -f "$cfgfile" "$ofile" || \ 47653a925b30Smrg (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 47663a925b30Smrg chmod +x "$ofile" 47673a925b30Smrg]) 476850f2e948Smrgelse 47693a925b30Smrg # If there is no Makefile yet, we rely on a make rule to execute 47703a925b30Smrg # `config.status --recheck' to rerun these tests and create the 47713a925b30Smrg # libtool script then. 47723a925b30Smrg ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` 47733a925b30Smrg if test -f "$ltmain_in"; then 47743a925b30Smrg test -f Makefile && make "$ltmain" 47753a925b30Smrg fi 477650f2e948Smrgfi 47773a925b30Smrg])# AC_LIBTOOL_CONFIG 477850f2e948Smrg 477950f2e948Smrg 47803a925b30Smrg# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME]) 47813a925b30Smrg# ------------------------------------------- 47823a925b30SmrgAC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], 47833a925b30Smrg[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl 478450f2e948Smrg 47853a925b30Smrg_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 478650f2e948Smrg 47873a925b30Smrgif test "$GCC" = yes; then 47883a925b30Smrg _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 478950f2e948Smrg 47903a925b30Smrg AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 47913a925b30Smrg lt_cv_prog_compiler_rtti_exceptions, 47923a925b30Smrg [-fno-rtti -fno-exceptions], [], 47933a925b30Smrg [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 479450f2e948Smrgfi 47953a925b30Smrg])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI 479650f2e948Smrg 479750f2e948Smrg 47983a925b30Smrg# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE 47993a925b30Smrg# --------------------------------- 48003a925b30SmrgAC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], 48013a925b30Smrg[AC_REQUIRE([AC_CANONICAL_HOST]) 48023a925b30SmrgAC_REQUIRE([LT_AC_PROG_SED]) 48033a925b30SmrgAC_REQUIRE([AC_PROG_NM]) 48043a925b30SmrgAC_REQUIRE([AC_OBJEXT]) 48053a925b30Smrg# Check for command to grab the raw symbol name followed by C symbol from nm. 48063a925b30SmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object]) 48073a925b30SmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 48083a925b30Smrg[ 48093a925b30Smrg# These are sane defaults that work on at least a few old systems. 48103a925b30Smrg# [They come from Ultrix. What could be older than Ultrix?!! ;)] 481150f2e948Smrg 48123a925b30Smrg# Character class describing NM global symbol codes. 48133a925b30Smrgsymcode='[[BCDEGRST]]' 481450f2e948Smrg 48153a925b30Smrg# Regexp to match symbols that can be accessed directly from C. 48163a925b30Smrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 481750f2e948Smrg 48183a925b30Smrg# Transform an extracted symbol line into a proper C declaration 48193a925b30Smrglt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'" 482050f2e948Smrg 48213a925b30Smrg# Transform an extracted symbol line into symbol name and symbol address 48223a925b30Smrglt_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'" 482350f2e948Smrg 48243a925b30Smrg# Define system-specific variables. 48253a925b30Smrgcase $host_os in 48263a925b30Smrgaix*) 48273a925b30Smrg symcode='[[BCDT]]' 48283a925b30Smrg ;; 48293a925b30Smrgcygwin* | mingw* | pw32*) 48303a925b30Smrg symcode='[[ABCDGISTW]]' 48313a925b30Smrg ;; 48323a925b30Smrghpux*) # Its linker distinguishes data from code symbols 48333a925b30Smrg if test "$host_cpu" = ia64; then 48343a925b30Smrg symcode='[[ABCDEGRST]]' 48353a925b30Smrg fi 48363a925b30Smrg lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 48373a925b30Smrg 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'" 48383a925b30Smrg ;; 48393a925b30Smrglinux* | k*bsd*-gnu) 48403a925b30Smrg if test "$host_cpu" = ia64; then 48413a925b30Smrg symcode='[[ABCDGIRSTW]]' 48423a925b30Smrg lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 48433a925b30Smrg 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'" 48443a925b30Smrg fi 48453a925b30Smrg ;; 48463a925b30Smrgirix* | nonstopux*) 48473a925b30Smrg symcode='[[BCDEGRST]]' 48483a925b30Smrg ;; 48493a925b30Smrgosf*) 48503a925b30Smrg symcode='[[BCDEGQRST]]' 48513a925b30Smrg ;; 48523a925b30Smrgsolaris*) 48533a925b30Smrg symcode='[[BDRT]]' 48543a925b30Smrg ;; 48553a925b30Smrgsco3.2v5*) 48563a925b30Smrg symcode='[[DT]]' 48573a925b30Smrg ;; 48583a925b30Smrgsysv4.2uw2*) 48593a925b30Smrg symcode='[[DT]]' 48603a925b30Smrg ;; 48613a925b30Smrgsysv5* | sco5v6* | unixware* | OpenUNIX*) 48623a925b30Smrg symcode='[[ABDT]]' 48633a925b30Smrg ;; 48643a925b30Smrgsysv4) 48653a925b30Smrg symcode='[[DFNSTU]]' 48663a925b30Smrg ;; 48673a925b30Smrgesac 486850f2e948Smrg 48693a925b30Smrg# Handle CRLF in mingw tool chain 48703a925b30Smrgopt_cr= 48713a925b30Smrgcase $build_os in 48723a925b30Smrgmingw*) 48733a925b30Smrg opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp 48743a925b30Smrg ;; 48753a925b30Smrgesac 487650f2e948Smrg 48773a925b30Smrg# If we're using GNU nm, then use its standard symbol codes. 48783a925b30Smrgcase `$NM -V 2>&1` in 48793a925b30Smrg*GNU* | *'with BFD'*) 48803a925b30Smrg symcode='[[ABCDGIRSTW]]' ;; 48813a925b30Smrgesac 488250f2e948Smrg 48833a925b30Smrg# Try without a prefix undercore, then with it. 48843a925b30Smrgfor ac_symprfx in "" "_"; do 488550f2e948Smrg 48863a925b30Smrg # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 48873a925b30Smrg symxfrm="\\1 $ac_symprfx\\2 \\2" 488850f2e948Smrg 48893a925b30Smrg # Write the raw and C identifiers. 48903a925b30Smrg lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 489150f2e948Smrg 48923a925b30Smrg # Check to see that the pipe works correctly. 48933a925b30Smrg pipe_works=no 489450f2e948Smrg 48953a925b30Smrg rm -f conftest* 48963a925b30Smrg cat > conftest.$ac_ext <<EOF 48973a925b30Smrg#ifdef __cplusplus 48983a925b30Smrgextern "C" { 48993a925b30Smrg#endif 49003a925b30Smrgchar nm_test_var; 49013a925b30Smrgvoid nm_test_func(){} 49023a925b30Smrg#ifdef __cplusplus 49033a925b30Smrg} 49043a925b30Smrg#endif 49053a925b30Smrgint main(){nm_test_var='a';nm_test_func();return(0);} 49063a925b30SmrgEOF 490750f2e948Smrg 49083a925b30Smrg if AC_TRY_EVAL(ac_compile); then 49093a925b30Smrg # Now try to grab the symbols. 49103a925b30Smrg nlist=conftest.nm 49113a925b30Smrg if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then 49123a925b30Smrg # Try sorting and uniquifying the output. 49133a925b30Smrg if sort "$nlist" | uniq > "$nlist"T; then 49143a925b30Smrg mv -f "$nlist"T "$nlist" 49153a925b30Smrg else 49163a925b30Smrg rm -f "$nlist"T 49173a925b30Smrg fi 491850f2e948Smrg 49193a925b30Smrg # Make sure that we snagged all the symbols we need. 49203a925b30Smrg if grep ' nm_test_var$' "$nlist" >/dev/null; then 49213a925b30Smrg if grep ' nm_test_func$' "$nlist" >/dev/null; then 49223a925b30Smrg cat <<EOF > conftest.$ac_ext 49233a925b30Smrg#ifdef __cplusplus 49243a925b30Smrgextern "C" { 49253a925b30Smrg#endif 492650f2e948Smrg 49273a925b30SmrgEOF 49283a925b30Smrg # Now generate the symbol file. 49293a925b30Smrg eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' 493050f2e948Smrg 49313a925b30Smrg cat <<EOF >> conftest.$ac_ext 49323a925b30Smrg#if defined (__STDC__) && __STDC__ 49333a925b30Smrg# define lt_ptr_t void * 49343a925b30Smrg#else 49353a925b30Smrg# define lt_ptr_t char * 49363a925b30Smrg# define const 49373a925b30Smrg#endif 493850f2e948Smrg 49393a925b30Smrg/* The mapping between symbol names and symbols. */ 49403a925b30Smrgconst struct { 49413a925b30Smrg const char *name; 49423a925b30Smrg lt_ptr_t address; 49433a925b30Smrg} 49443a925b30Smrglt_preloaded_symbols[[]] = 49453a925b30Smrg{ 49463a925b30SmrgEOF 49473a925b30Smrg $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext 49483a925b30Smrg cat <<\EOF >> conftest.$ac_ext 49493a925b30Smrg {0, (lt_ptr_t) 0} 49503a925b30Smrg}; 495150f2e948Smrg 49523a925b30Smrg#ifdef __cplusplus 49533a925b30Smrg} 49543a925b30Smrg#endif 49553a925b30SmrgEOF 49563a925b30Smrg # Now try linking the two files. 49573a925b30Smrg mv conftest.$ac_objext conftstm.$ac_objext 49583a925b30Smrg lt_save_LIBS="$LIBS" 49593a925b30Smrg lt_save_CFLAGS="$CFLAGS" 49603a925b30Smrg LIBS="conftstm.$ac_objext" 49613a925b30Smrg CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 49623a925b30Smrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then 49633a925b30Smrg pipe_works=yes 49643a925b30Smrg fi 49653a925b30Smrg LIBS="$lt_save_LIBS" 49663a925b30Smrg CFLAGS="$lt_save_CFLAGS" 49673a925b30Smrg else 49683a925b30Smrg echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 496950f2e948Smrg fi 49703a925b30Smrg else 49713a925b30Smrg echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 49723a925b30Smrg fi 49733a925b30Smrg else 49743a925b30Smrg echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 49753a925b30Smrg fi 49763a925b30Smrg else 49773a925b30Smrg echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 49783a925b30Smrg cat conftest.$ac_ext >&5 49793a925b30Smrg fi 49803a925b30Smrg rm -rf conftest* conftst* 498150f2e948Smrg 49823a925b30Smrg # Do not use the global_symbol_pipe unless it works. 49833a925b30Smrg if test "$pipe_works" = yes; then 49843a925b30Smrg break 49853a925b30Smrg else 49863a925b30Smrg lt_cv_sys_global_symbol_pipe= 49873a925b30Smrg fi 49883a925b30Smrgdone 49893a925b30Smrg]) 49903a925b30Smrgif test -z "$lt_cv_sys_global_symbol_pipe"; then 49913a925b30Smrg lt_cv_sys_global_symbol_to_cdecl= 49923a925b30Smrgfi 49933a925b30Smrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 49943a925b30Smrg AC_MSG_RESULT(failed) 49953a925b30Smrgelse 49963a925b30Smrg AC_MSG_RESULT(ok) 49973a925b30Smrgfi 49983a925b30Smrg]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE 499950f2e948Smrg 500050f2e948Smrg 50013a925b30Smrg# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME]) 50023a925b30Smrg# --------------------------------------- 50033a925b30SmrgAC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC], 50043a925b30Smrg[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)= 50053a925b30Smrg_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 50063a925b30Smrg_LT_AC_TAGVAR(lt_prog_compiler_static, $1)= 500750f2e948Smrg 50083a925b30SmrgAC_MSG_CHECKING([for $compiler option to produce PIC]) 50093a925b30Smrg ifelse([$1],[CXX],[ 50103a925b30Smrg # C++ specific cases for pic, static, wl, etc. 50113a925b30Smrg if test "$GXX" = yes; then 50123a925b30Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 50133a925b30Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' 501450f2e948Smrg 50153a925b30Smrg case $host_os in 50163a925b30Smrg aix*) 50173a925b30Smrg # All AIX code is PIC. 50183a925b30Smrg if test "$host_cpu" = ia64; then 50193a925b30Smrg # AIX 5 now supports IA64 processor 50203a925b30Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 50213a925b30Smrg fi 50223a925b30Smrg ;; 50233a925b30Smrg amigaos*) 50243a925b30Smrg # FIXME: we need at least 68020 code to build shared libraries, but 50253a925b30Smrg # adding the `-m68020' flag to GCC prevents building anything better, 50263a925b30Smrg # like `-m68040'. 50273a925b30Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 50283a925b30Smrg ;; 50293a925b30Smrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 50303a925b30Smrg # PIC is the default for these OSes. 50313a925b30Smrg ;; 50323a925b30Smrg mingw* | cygwin* | os2* | pw32*) 50333a925b30Smrg # This hack is so that the source file can tell whether it is being 50343a925b30Smrg # built for inclusion in a dll (and should export symbols for example). 50353a925b30Smrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 50363a925b30Smrg # (--disable-auto-import) libraries 50373a925b30Smrg m4_if([$1], [GCJ], [], 50383a925b30Smrg [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 50393a925b30Smrg ;; 50403a925b30Smrg darwin* | rhapsody*) 50413a925b30Smrg # PIC is the default on this platform 50423a925b30Smrg # Common symbols not allowed in MH_DYLIB files 50433a925b30Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 50443a925b30Smrg ;; 50453a925b30Smrg *djgpp*) 50463a925b30Smrg # DJGPP does not support shared libraries at all 50473a925b30Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 50483a925b30Smrg ;; 50493a925b30Smrg interix[[3-9]]*) 50503a925b30Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 50513a925b30Smrg # Instead, we relocate shared libraries at runtime. 50523a925b30Smrg ;; 50533a925b30Smrg sysv4*MP*) 50543a925b30Smrg if test -d /usr/nec; then 50553a925b30Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 50563a925b30Smrg fi 50573a925b30Smrg ;; 50583a925b30Smrg hpux*) 50593a925b30Smrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 50603a925b30Smrg # not for PA HP-UX. 50613a925b30Smrg case $host_cpu in 50623a925b30Smrg hppa*64*|ia64*) 50633a925b30Smrg ;; 50643a925b30Smrg *) 50653a925b30Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 50663a925b30Smrg ;; 50673a925b30Smrg esac 50683a925b30Smrg ;; 50693a925b30Smrg *) 50703a925b30Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 50713a925b30Smrg ;; 50723a925b30Smrg esac 50733a925b30Smrg else 50743a925b30Smrg case $host_os in 50753a925b30Smrg aix[[4-9]]*) 50763a925b30Smrg # All AIX code is PIC. 50773a925b30Smrg if test "$host_cpu" = ia64; then 50783a925b30Smrg # AIX 5 now supports IA64 processor 50793a925b30Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 50803a925b30Smrg else 50813a925b30Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 50823a925b30Smrg fi 50833a925b30Smrg ;; 50843a925b30Smrg chorus*) 50853a925b30Smrg case $cc_basename in 50863a925b30Smrg cxch68*) 50873a925b30Smrg # Green Hills C++ Compiler 50883a925b30Smrg # _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" 50893a925b30Smrg ;; 50903a925b30Smrg esac 50913a925b30Smrg ;; 50923a925b30Smrg darwin*) 50933a925b30Smrg # PIC is the default on this platform 50943a925b30Smrg # Common symbols not allowed in MH_DYLIB files 50953a925b30Smrg case $cc_basename in 50963a925b30Smrg xlc*) 50973a925b30Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' 50983a925b30Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 50993a925b30Smrg ;; 51003a925b30Smrg esac 51013a925b30Smrg ;; 51023a925b30Smrg dgux*) 51033a925b30Smrg case $cc_basename in 51043a925b30Smrg ec++*) 51053a925b30Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 51063a925b30Smrg ;; 51073a925b30Smrg ghcx*) 51083a925b30Smrg # Green Hills C++ Compiler 51093a925b30Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 51103a925b30Smrg ;; 51113a925b30Smrg *) 51123a925b30Smrg ;; 51133a925b30Smrg esac 51143a925b30Smrg ;; 51153a925b30Smrg freebsd* | dragonfly*) 51163a925b30Smrg # FreeBSD uses GNU C++ 51173a925b30Smrg ;; 51183a925b30Smrg hpux9* | hpux10* | hpux11*) 51193a925b30Smrg case $cc_basename in 51203a925b30Smrg CC*) 51213a925b30Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 51223a925b30Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 51233a925b30Smrg if test "$host_cpu" != ia64; then 51243a925b30Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 51253a925b30Smrg fi 51263a925b30Smrg ;; 51273a925b30Smrg aCC*) 51283a925b30Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 51293a925b30Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 51303a925b30Smrg case $host_cpu in 51313a925b30Smrg hppa*64*|ia64*) 51323a925b30Smrg # +Z the default 51333a925b30Smrg ;; 51343a925b30Smrg *) 51353a925b30Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 51363a925b30Smrg ;; 51373a925b30Smrg esac 51383a925b30Smrg ;; 51393a925b30Smrg *) 51403a925b30Smrg ;; 51413a925b30Smrg esac 51423a925b30Smrg ;; 51433a925b30Smrg interix*) 51443a925b30Smrg # This is c89, which is MS Visual C++ (no shared libs) 51453a925b30Smrg # Anyone wants to do a port? 51463a925b30Smrg ;; 51473a925b30Smrg irix5* | irix6* | nonstopux*) 51483a925b30Smrg case $cc_basename in 51493a925b30Smrg CC*) 51503a925b30Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 51513a925b30Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 51523a925b30Smrg # CC pic flag -KPIC is the default. 51533a925b30Smrg ;; 51543a925b30Smrg *) 51553a925b30Smrg ;; 51563a925b30Smrg esac 51573a925b30Smrg ;; 51583a925b30Smrg linux* | k*bsd*-gnu) 51593a925b30Smrg case $cc_basename in 51603a925b30Smrg KCC*) 51613a925b30Smrg # KAI C++ Compiler 51623a925b30Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 51633a925b30Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 51643a925b30Smrg ;; 51653a925b30Smrg icpc* | ecpc*) 51663a925b30Smrg # Intel C++ 51673a925b30Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 51683a925b30Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 51693a925b30Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' 51703a925b30Smrg ;; 51713a925b30Smrg pgCC* | pgcpp*) 51723a925b30Smrg # Portland Group C++ compiler. 51733a925b30Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 51743a925b30Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 51753a925b30Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 51763a925b30Smrg ;; 51773a925b30Smrg cxx*) 51783a925b30Smrg # Compaq C++ 51793a925b30Smrg # Make sure the PIC flag is empty. It appears that all Alpha 51803a925b30Smrg # Linux and Compaq Tru64 Unix objects are PIC. 51813a925b30Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 51823a925b30Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 51833a925b30Smrg ;; 51843a925b30Smrg *) 51853a925b30Smrg case `$CC -V 2>&1 | sed 5q` in 51863a925b30Smrg *Sun\ C*) 51873a925b30Smrg # Sun C++ 5.9 51883a925b30Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 51893a925b30Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 51903a925b30Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 51913a925b30Smrg ;; 51923a925b30Smrg esac 51933a925b30Smrg ;; 51943a925b30Smrg esac 51953a925b30Smrg ;; 51963a925b30Smrg lynxos*) 51973a925b30Smrg ;; 51983a925b30Smrg m88k*) 51993a925b30Smrg ;; 52003a925b30Smrg mvs*) 52013a925b30Smrg case $cc_basename in 52023a925b30Smrg cxx*) 52033a925b30Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 52043a925b30Smrg ;; 52053a925b30Smrg *) 52063a925b30Smrg ;; 52073a925b30Smrg esac 52083a925b30Smrg ;; 52093a925b30Smrg netbsd*) 52103a925b30Smrg ;; 52113a925b30Smrg osf3* | osf4* | osf5*) 52123a925b30Smrg case $cc_basename in 52133a925b30Smrg KCC*) 52143a925b30Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 52153a925b30Smrg ;; 52163a925b30Smrg RCC*) 52173a925b30Smrg # Rational C++ 2.4.1 52183a925b30Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 52193a925b30Smrg ;; 52203a925b30Smrg cxx*) 52213a925b30Smrg # Digital/Compaq C++ 52223a925b30Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 52233a925b30Smrg # Make sure the PIC flag is empty. It appears that all Alpha 52243a925b30Smrg # Linux and Compaq Tru64 Unix objects are PIC. 52253a925b30Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 52263a925b30Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 52273a925b30Smrg ;; 52283a925b30Smrg *) 52293a925b30Smrg ;; 52303a925b30Smrg esac 52313a925b30Smrg ;; 52323a925b30Smrg psos*) 52333a925b30Smrg ;; 52343a925b30Smrg solaris*) 52353a925b30Smrg case $cc_basename in 52363a925b30Smrg CC*) 52373a925b30Smrg # Sun C++ 4.2, 5.x and Centerline C++ 52383a925b30Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 52393a925b30Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 52403a925b30Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 52413a925b30Smrg ;; 52423a925b30Smrg gcx*) 52433a925b30Smrg # Green Hills C++ Compiler 52443a925b30Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 52453a925b30Smrg ;; 52463a925b30Smrg *) 52473a925b30Smrg ;; 52483a925b30Smrg esac 52493a925b30Smrg ;; 52503a925b30Smrg sunos4*) 52513a925b30Smrg case $cc_basename in 52523a925b30Smrg CC*) 52533a925b30Smrg # Sun C++ 4.x 52543a925b30Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 52553a925b30Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 52563a925b30Smrg ;; 52573a925b30Smrg lcc*) 52583a925b30Smrg # Lucid 52593a925b30Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 52603a925b30Smrg ;; 52613a925b30Smrg *) 52623a925b30Smrg ;; 52633a925b30Smrg esac 52643a925b30Smrg ;; 52653a925b30Smrg tandem*) 52663a925b30Smrg case $cc_basename in 52673a925b30Smrg NCC*) 52683a925b30Smrg # NonStop-UX NCC 3.20 52693a925b30Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 52703a925b30Smrg ;; 52713a925b30Smrg *) 52723a925b30Smrg ;; 52733a925b30Smrg esac 52743a925b30Smrg ;; 52753a925b30Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 52763a925b30Smrg case $cc_basename in 52773a925b30Smrg CC*) 52783a925b30Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 52793a925b30Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 52803a925b30Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 52813a925b30Smrg ;; 52823a925b30Smrg esac 52833a925b30Smrg ;; 52843a925b30Smrg vxworks*) 52853a925b30Smrg ;; 52863a925b30Smrg *) 52873a925b30Smrg _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 52883a925b30Smrg ;; 52893a925b30Smrg esac 52903a925b30Smrg fi 52913a925b30Smrg], 52923a925b30Smrg[ 52933a925b30Smrg if test "$GCC" = yes; then 52943a925b30Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 52953a925b30Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' 529650f2e948Smrg 52973a925b30Smrg case $host_os in 52983a925b30Smrg aix*) 52993a925b30Smrg # All AIX code is PIC. 53003a925b30Smrg if test "$host_cpu" = ia64; then 53013a925b30Smrg # AIX 5 now supports IA64 processor 53023a925b30Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 53033a925b30Smrg fi 53043a925b30Smrg ;; 530550f2e948Smrg 53063a925b30Smrg amigaos*) 53073a925b30Smrg # FIXME: we need at least 68020 code to build shared libraries, but 53083a925b30Smrg # adding the `-m68020' flag to GCC prevents building anything better, 53093a925b30Smrg # like `-m68040'. 53103a925b30Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 53113a925b30Smrg ;; 531250f2e948Smrg 53133a925b30Smrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 53143a925b30Smrg # PIC is the default for these OSes. 53153a925b30Smrg ;; 531650f2e948Smrg 53173a925b30Smrg mingw* | cygwin* | pw32* | os2*) 53183a925b30Smrg # This hack is so that the source file can tell whether it is being 53193a925b30Smrg # built for inclusion in a dll (and should export symbols for example). 53203a925b30Smrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 53213a925b30Smrg # (--disable-auto-import) libraries 53223a925b30Smrg m4_if([$1], [GCJ], [], 53233a925b30Smrg [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 53243a925b30Smrg ;; 532550f2e948Smrg 53263a925b30Smrg darwin* | rhapsody*) 53273a925b30Smrg # PIC is the default on this platform 53283a925b30Smrg # Common symbols not allowed in MH_DYLIB files 53293a925b30Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 53303a925b30Smrg ;; 533150f2e948Smrg 53323a925b30Smrg interix[[3-9]]*) 53333a925b30Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 53343a925b30Smrg # Instead, we relocate shared libraries at runtime. 53353a925b30Smrg ;; 533650f2e948Smrg 53373a925b30Smrg msdosdjgpp*) 53383a925b30Smrg # Just because we use GCC doesn't mean we suddenly get shared libraries 53393a925b30Smrg # on systems that don't support them. 53403a925b30Smrg _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 53413a925b30Smrg enable_shared=no 53423a925b30Smrg ;; 534350f2e948Smrg 53443a925b30Smrg sysv4*MP*) 53453a925b30Smrg if test -d /usr/nec; then 53463a925b30Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 53473a925b30Smrg fi 53483a925b30Smrg ;; 534945bc899bSmrg 53503a925b30Smrg hpux*) 53513a925b30Smrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 53523a925b30Smrg # not for PA HP-UX. 53533a925b30Smrg case $host_cpu in 53543a925b30Smrg hppa*64*|ia64*) 53553a925b30Smrg # +Z the default 53563a925b30Smrg ;; 53573a925b30Smrg *) 53583a925b30Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 53593a925b30Smrg ;; 53603a925b30Smrg esac 53613a925b30Smrg ;; 536245bc899bSmrg 53633a925b30Smrg *) 53643a925b30Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 53653a925b30Smrg ;; 53663a925b30Smrg esac 53673a925b30Smrg else 53683a925b30Smrg # PORTME Check for flag to pass linker flags through the system compiler. 53693a925b30Smrg case $host_os in 53703a925b30Smrg aix*) 53713a925b30Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 53723a925b30Smrg if test "$host_cpu" = ia64; then 53733a925b30Smrg # AIX 5 now supports IA64 processor 53743a925b30Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 53753a925b30Smrg else 53763a925b30Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 53773a925b30Smrg fi 53783a925b30Smrg ;; 53793a925b30Smrg darwin*) 53803a925b30Smrg # PIC is the default on this platform 53813a925b30Smrg # Common symbols not allowed in MH_DYLIB files 53823a925b30Smrg case $cc_basename in 53833a925b30Smrg xlc*) 53843a925b30Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' 53853a925b30Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 53863a925b30Smrg ;; 53873a925b30Smrg esac 53883a925b30Smrg ;; 538945bc899bSmrg 53903a925b30Smrg mingw* | cygwin* | pw32* | os2*) 53913a925b30Smrg # This hack is so that the source file can tell whether it is being 53923a925b30Smrg # built for inclusion in a dll (and should export symbols for example). 53933a925b30Smrg m4_if([$1], [GCJ], [], 53943a925b30Smrg [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 53953a925b30Smrg ;; 539645bc899bSmrg 53973a925b30Smrg hpux9* | hpux10* | hpux11*) 53983a925b30Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 53993a925b30Smrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 54003a925b30Smrg # not for PA HP-UX. 54013a925b30Smrg case $host_cpu in 54023a925b30Smrg hppa*64*|ia64*) 54033a925b30Smrg # +Z the default 54043a925b30Smrg ;; 54053a925b30Smrg *) 54063a925b30Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 54073a925b30Smrg ;; 54083a925b30Smrg esac 54093a925b30Smrg # Is there a better lt_prog_compiler_static that works with the bundled CC? 54103a925b30Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 54113a925b30Smrg ;; 541245bc899bSmrg 54133a925b30Smrg irix5* | irix6* | nonstopux*) 54143a925b30Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 54153a925b30Smrg # PIC (with -KPIC) is the default. 54163a925b30Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 54173a925b30Smrg ;; 541845bc899bSmrg 54193a925b30Smrg newsos6) 54203a925b30Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 54213a925b30Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 54223a925b30Smrg ;; 542345bc899bSmrg 54243a925b30Smrg linux* | k*bsd*-gnu) 54253a925b30Smrg case $cc_basename in 54263a925b30Smrg icc* | ecc*) 54273a925b30Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 54283a925b30Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 54293a925b30Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' 54303a925b30Smrg ;; 54313a925b30Smrg pgcc* | pgf77* | pgf90* | pgf95*) 54323a925b30Smrg # Portland Group compilers (*not* the Pentium gcc compiler, 54333a925b30Smrg # which looks to be a dead project) 54343a925b30Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 54353a925b30Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 54363a925b30Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 54373a925b30Smrg ;; 54383a925b30Smrg ccc*) 54393a925b30Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 54403a925b30Smrg # All Alpha code is PIC. 54413a925b30Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 54423a925b30Smrg ;; 54433a925b30Smrg *) 54443a925b30Smrg case `$CC -V 2>&1 | sed 5q` in 54453a925b30Smrg *Sun\ C*) 54463a925b30Smrg # Sun C 5.9 54473a925b30Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 54483a925b30Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 54493a925b30Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 54503a925b30Smrg ;; 54513a925b30Smrg *Sun\ F*) 54523a925b30Smrg # Sun Fortran 8.3 passes all unrecognized flags to the linker 54533a925b30Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 54543a925b30Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 54553a925b30Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='' 54563a925b30Smrg ;; 54573a925b30Smrg esac 54583a925b30Smrg ;; 54593a925b30Smrg esac 54603a925b30Smrg ;; 546145bc899bSmrg 54623a925b30Smrg osf3* | osf4* | osf5*) 54633a925b30Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 54643a925b30Smrg # All OSF/1 code is PIC. 54653a925b30Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 54663a925b30Smrg ;; 546745bc899bSmrg 54683a925b30Smrg rdos*) 54693a925b30Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 54703a925b30Smrg ;; 547145bc899bSmrg 54723a925b30Smrg solaris*) 54733a925b30Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 54743a925b30Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 54753a925b30Smrg case $cc_basename in 54763a925b30Smrg f77* | f90* | f95*) 54773a925b30Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 54783a925b30Smrg *) 54793a925b30Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 54803a925b30Smrg esac 54813a925b30Smrg ;; 54821ac89addSmrg 54833a925b30Smrg sunos4*) 54843a925b30Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 54853a925b30Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 54863a925b30Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 54873a925b30Smrg ;; 54881ac89addSmrg 54893a925b30Smrg sysv4 | sysv4.2uw2* | sysv4.3*) 54903a925b30Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 54913a925b30Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 54923a925b30Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 54933a925b30Smrg ;; 54941ac89addSmrg 54953a925b30Smrg sysv4*MP*) 54963a925b30Smrg if test -d /usr/nec ;then 54973a925b30Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 54983a925b30Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 54993a925b30Smrg fi 55003a925b30Smrg ;; 5501226fade8Smrg 55023a925b30Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 55033a925b30Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 55043a925b30Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 55053a925b30Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 55063a925b30Smrg ;; 550750f2e948Smrg 55083a925b30Smrg unicos*) 55093a925b30Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 55103a925b30Smrg _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 55113a925b30Smrg ;; 551250f2e948Smrg 55133a925b30Smrg uts4*) 55143a925b30Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 55153a925b30Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 55163a925b30Smrg ;; 551750f2e948Smrg 55183a925b30Smrg *) 55193a925b30Smrg _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 55203a925b30Smrg ;; 55213a925b30Smrg esac 552245bc899bSmrg fi 552345bc899bSmrg]) 55243a925b30SmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)]) 55251ac89addSmrg 55263a925b30Smrg# 55273a925b30Smrg# Check to make sure the PIC flag actually works. 55283a925b30Smrg# 55293a925b30Smrgif test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then 55303a925b30Smrg AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works], 55313a925b30Smrg _LT_AC_TAGVAR(lt_cv_prog_compiler_pic_works, $1), 55323a925b30Smrg [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [], 55333a925b30Smrg [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in 55343a925b30Smrg "" | " "*) ;; 55353a925b30Smrg *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;; 55363a925b30Smrg esac], 55373a925b30Smrg [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 55383a925b30Smrg _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 553945bc899bSmrgfi 55403a925b30Smrgcase $host_os in 55413a925b30Smrg # For platforms which do not support PIC, -DPIC is meaningless: 55423a925b30Smrg *djgpp*) 55433a925b30Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 55443a925b30Smrg ;; 55453a925b30Smrg *) 55463a925b30Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])" 55473a925b30Smrg ;; 554845bc899bSmrgesac 554950f2e948Smrg 55503a925b30Smrg# 55513a925b30Smrg# Check to make sure the static flag actually works. 55523a925b30Smrg# 55533a925b30Smrgwl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\" 55543a925b30SmrgAC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 55553a925b30Smrg _LT_AC_TAGVAR(lt_cv_prog_compiler_static_works, $1), 55563a925b30Smrg $lt_tmp_static_flag, 55573a925b30Smrg [], 55583a925b30Smrg [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=]) 55593a925b30Smrg]) 556050f2e948Smrg 556150f2e948Smrg 55623a925b30Smrg# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME]) 55633a925b30Smrg# ------------------------------------ 55643a925b30Smrg# See if the linker supports building shared libraries. 55653a925b30SmrgAC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS], 55663a925b30Smrg[AC_REQUIRE([LT_AC_PROG_SED])dnl 55673a925b30SmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 55683a925b30Smrgifelse([$1],[CXX],[ 55693a925b30Smrg _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 55703a925b30Smrg case $host_os in 55713a925b30Smrg aix[[4-9]]*) 55723a925b30Smrg # If we're using GNU nm, then we don't want the "-C" option. 55733a925b30Smrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 55743a925b30Smrg if $NM -V 2>&1 | grep 'GNU' > /dev/null; then 55753a925b30Smrg _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' 55763a925b30Smrg else 55773a925b30Smrg _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' 55783a925b30Smrg fi 55793a925b30Smrg ;; 55803a925b30Smrg pw32*) 55813a925b30Smrg _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" 55823a925b30Smrg ;; 55833a925b30Smrg cygwin* | mingw*) 55843a925b30Smrg _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' 55853a925b30Smrg ;; 55863a925b30Smrg *) 55873a925b30Smrg _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 55883a925b30Smrg ;; 55891ac89addSmrg esac 55903a925b30Smrg _LT_AC_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 55913a925b30Smrg],[ 55923a925b30Smrg runpath_var= 55933a925b30Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)= 55943a925b30Smrg _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no 55953a925b30Smrg _LT_AC_TAGVAR(archive_cmds, $1)= 55963a925b30Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)= 55973a925b30Smrg _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)= 55983a925b30Smrg _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)= 55993a925b30Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= 56003a925b30Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 56013a925b30Smrg _LT_AC_TAGVAR(thread_safe_flag_spec, $1)= 56023a925b30Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= 56033a925b30Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 56043a925b30Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 56053a925b30Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 56063a925b30Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=no 56073a925b30Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 56083a925b30Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown 56093a925b30Smrg _LT_AC_TAGVAR(hardcode_automatic, $1)=no 56103a925b30Smrg _LT_AC_TAGVAR(module_cmds, $1)= 56113a925b30Smrg _LT_AC_TAGVAR(module_expsym_cmds, $1)= 56123a925b30Smrg _LT_AC_TAGVAR(always_export_symbols, $1)=no 56133a925b30Smrg _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 56143a925b30Smrg # include_expsyms should be a list of space-separated symbols to be *always* 56153a925b30Smrg # included in the symbol list 56163a925b30Smrg _LT_AC_TAGVAR(include_expsyms, $1)= 56173a925b30Smrg # exclude_expsyms can be an extended regexp of symbols to exclude 56183a925b30Smrg # it will be wrapped by ` (' and `)$', so one must not match beginning or 56193a925b30Smrg # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', 56203a925b30Smrg # as well as any symbol that contains `d'. 56213a925b30Smrg _LT_AC_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 56223a925b30Smrg # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 56233a925b30Smrg # platforms (ab)use it in PIC code, but their linkers get confused if 56243a925b30Smrg # the symbol is explicitly referenced. Since portable code cannot 56253a925b30Smrg # rely on this symbol name, it's probably fine to never include it in 56263a925b30Smrg # preloaded symbol tables. 56273a925b30Smrg # Exclude shared library initialization/finalization symbols. 56283a925b30Smrgdnl Note also adjust exclude_expsyms for C++ above. 56293a925b30Smrg extract_expsyms_cmds= 56303a925b30Smrg # Just being paranoid about ensuring that cc_basename is set. 56313a925b30Smrg _LT_CC_BASENAME([$compiler]) 56323a925b30Smrg case $host_os in 56333a925b30Smrg cygwin* | mingw* | pw32*) 56343a925b30Smrg # FIXME: the MSVC++ port hasn't been tested in a loooong time 56353a925b30Smrg # When not using gcc, we currently assume that we are using 56363a925b30Smrg # Microsoft Visual C++. 56373a925b30Smrg if test "$GCC" != yes; then 56383a925b30Smrg with_gnu_ld=no 56393a925b30Smrg fi 56403a925b30Smrg ;; 56413a925b30Smrg interix*) 56423a925b30Smrg # we just hope/assume this is gcc and not c89 (= MSVC++) 56433a925b30Smrg with_gnu_ld=yes 56443a925b30Smrg ;; 56453a925b30Smrg openbsd*) 56463a925b30Smrg with_gnu_ld=no 564750f2e948Smrg ;; 564850f2e948Smrg esac 564945bc899bSmrg 56503a925b30Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=yes 56513a925b30Smrg if test "$with_gnu_ld" = yes; then 56523a925b30Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 56533a925b30Smrg wlarc='${wl}' 565445bc899bSmrg 56553a925b30Smrg # Set some defaults for GNU ld with shared library support. These 56563a925b30Smrg # are reset later if shared libraries are not supported. Putting them 56573a925b30Smrg # here allows them to be overridden if necessary. 56583a925b30Smrg runpath_var=LD_RUN_PATH 56593a925b30Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 56603a925b30Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 56613a925b30Smrg # ancient GNU ld didn't support --whole-archive et. al. 56623a925b30Smrg if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then 56633a925b30Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 56643a925b30Smrg else 56653a925b30Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 56663a925b30Smrg fi 56673a925b30Smrg supports_anon_versioning=no 56683a925b30Smrg case `$LD -v 2>/dev/null` in 56693a925b30Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 56703a925b30Smrg *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 56713a925b30Smrg *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 56723a925b30Smrg *\ 2.11.*) ;; # other 2.11 versions 56733a925b30Smrg *) supports_anon_versioning=yes ;; 56743a925b30Smrg esac 567545bc899bSmrg 56763a925b30Smrg # See if GNU ld supports shared libraries. 56773a925b30Smrg case $host_os in 56783a925b30Smrg aix[[3-9]]*) 56793a925b30Smrg # On AIX/PPC, the GNU linker is very broken 56803a925b30Smrg if test "$host_cpu" != ia64; then 56813a925b30Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 56823a925b30Smrg cat <<EOF 1>&2 568345bc899bSmrg 56843a925b30Smrg*** Warning: the GNU linker, at least up to release 2.9.1, is reported 56853a925b30Smrg*** to be unable to reliably create shared libraries on AIX. 56863a925b30Smrg*** Therefore, libtool is disabling shared libraries support. If you 56873a925b30Smrg*** really care for shared libraries, you may want to modify your PATH 56883a925b30Smrg*** so that a non-GNU linker is found, and then restart. 568945bc899bSmrg 56903a925b30SmrgEOF 56913a925b30Smrg fi 56923a925b30Smrg ;; 569345bc899bSmrg 56943a925b30Smrg amigaos*) 56953a925b30Smrg _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)' 56963a925b30Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 56973a925b30Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 56983a925b30Smrg 56993a925b30Smrg # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports 57003a925b30Smrg # that the semantics of dynamic libraries on AmigaOS, at least up 57013a925b30Smrg # to version 4, is to share data among multiple programs linked 57023a925b30Smrg # with the same dynamic library. Since this doesn't match the 57033a925b30Smrg # behavior of shared libraries on other platforms, we can't use 57043a925b30Smrg # them. 57053a925b30Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 57063a925b30Smrg ;; 570745bc899bSmrg 57083a925b30Smrg beos*) 57093a925b30Smrg if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 57103a925b30Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 57113a925b30Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 57123a925b30Smrg # support --undefined. This deserves some investigation. FIXME 57133a925b30Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 57143a925b30Smrg else 57153a925b30Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 57163a925b30Smrg fi 57173a925b30Smrg ;; 571845bc899bSmrg 57193a925b30Smrg cygwin* | mingw* | pw32*) 57203a925b30Smrg # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 57213a925b30Smrg # as there is no search path for DLLs. 57223a925b30Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 57233a925b30Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 57243a925b30Smrg _LT_AC_TAGVAR(always_export_symbols, $1)=no 57253a925b30Smrg _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 57263a925b30Smrg _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' 57273a925b30Smrg 57283a925b30Smrg if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then 57293a925b30Smrg _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' 57303a925b30Smrg # If the export-symbols file already is a .def file (1st line 57313a925b30Smrg # is EXPORTS), use it as is; otherwise, prepend... 57323a925b30Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 57333a925b30Smrg cp $export_symbols $output_objdir/$soname.def; 57343a925b30Smrg else 57353a925b30Smrg echo EXPORTS > $output_objdir/$soname.def; 57363a925b30Smrg cat $export_symbols >> $output_objdir/$soname.def; 57373a925b30Smrg fi~ 57383a925b30Smrg $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 57393a925b30Smrg else 57403a925b30Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 57413a925b30Smrg fi 57423a925b30Smrg ;; 574345bc899bSmrg 57443a925b30Smrg interix[[3-9]]*) 57453a925b30Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 57463a925b30Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 57473a925b30Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 57483a925b30Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 57493a925b30Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 57503a925b30Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 57513a925b30Smrg # default) and relocated if they conflict, which is a slow very memory 57523a925b30Smrg # consuming and fragmenting process. To avoid this, we pick a random, 57533a925b30Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 57543a925b30Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 57553a925b30Smrg _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' 57563a925b30Smrg _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' 57573a925b30Smrg ;; 575845bc899bSmrg 57593a925b30Smrg gnu* | linux* | k*bsd*-gnu) 57603a925b30Smrg if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 57613a925b30Smrg tmp_addflag= 57623a925b30Smrg case $cc_basename,$host_cpu in 57633a925b30Smrg pgcc*) # Portland Group C compiler 57643a925b30Smrg _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' 57653a925b30Smrg tmp_addflag=' $pic_flag' 57663a925b30Smrg ;; 57673a925b30Smrg pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers 57683a925b30Smrg _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' 57693a925b30Smrg tmp_addflag=' $pic_flag -Mnomain' ;; 57703a925b30Smrg ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 57713a925b30Smrg tmp_addflag=' -i_dynamic' ;; 57723a925b30Smrg efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 57733a925b30Smrg tmp_addflag=' -i_dynamic -nofor_main' ;; 57743a925b30Smrg ifc* | ifort*) # Intel Fortran compiler 57753a925b30Smrg tmp_addflag=' -nofor_main' ;; 57763a925b30Smrg esac 57773a925b30Smrg case `$CC -V 2>&1 | sed 5q` in 57783a925b30Smrg *Sun\ C*) # Sun C 5.9 57793a925b30Smrg _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' 57803a925b30Smrg tmp_sharedflag='-G' ;; 57813a925b30Smrg *Sun\ F*) # Sun Fortran 8.3 57823a925b30Smrg tmp_sharedflag='-G' ;; 57833a925b30Smrg *) 57843a925b30Smrg tmp_sharedflag='-shared' ;; 57853a925b30Smrg esac 57863a925b30Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 578745bc899bSmrg 57883a925b30Smrg if test $supports_anon_versioning = yes; then 57893a925b30Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~ 57903a925b30Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 57913a925b30Smrg $echo "local: *; };" >> $output_objdir/$libname.ver~ 57923a925b30Smrg $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 57933a925b30Smrg fi 57943a925b30Smrg else 57953a925b30Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 57963a925b30Smrg fi 57973a925b30Smrg ;; 579845bc899bSmrg 57993a925b30Smrg netbsd*) 58003a925b30Smrg if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then 58013a925b30Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 58023a925b30Smrg wlarc= 58033a925b30Smrg else 58043a925b30Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 58053a925b30Smrg _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' 58063a925b30Smrg fi 58073a925b30Smrg ;; 580845bc899bSmrg 58093a925b30Smrg solaris*) 58103a925b30Smrg if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then 58113a925b30Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 58123a925b30Smrg cat <<EOF 1>&2 581345bc899bSmrg 58143a925b30Smrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably 58153a925b30Smrg*** create shared libraries on Solaris systems. Therefore, libtool 58163a925b30Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 58173a925b30Smrg*** binutils to release 2.9.1 or newer. Another option is to modify 58183a925b30Smrg*** your PATH or compiler configuration so that the native linker is 58193a925b30Smrg*** used, and then restart. 582045bc899bSmrg 58213a925b30SmrgEOF 58223a925b30Smrg elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 58233a925b30Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 58243a925b30Smrg _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' 58253a925b30Smrg else 58263a925b30Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 58273a925b30Smrg fi 58283a925b30Smrg ;; 582945bc899bSmrg 58303a925b30Smrg sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 58313a925b30Smrg case `$LD -v 2>&1` in 58323a925b30Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 58333a925b30Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 58343a925b30Smrg cat <<_LT_EOF 1>&2 583545bc899bSmrg 58363a925b30Smrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not 58373a925b30Smrg*** reliably create shared libraries on SCO systems. Therefore, libtool 58383a925b30Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 58393a925b30Smrg*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 58403a925b30Smrg*** your PATH or compiler configuration so that the native linker is 58413a925b30Smrg*** used, and then restart. 58421ac89addSmrg 58433a925b30Smrg_LT_EOF 58443a925b30Smrg ;; 58453a925b30Smrg *) 58463a925b30Smrg if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 58473a925b30Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' 58483a925b30Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' 58493a925b30Smrg _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' 58503a925b30Smrg else 58513a925b30Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 58523a925b30Smrg fi 58533a925b30Smrg ;; 58543a925b30Smrg esac 58553a925b30Smrg ;; 58561ac89addSmrg 58573a925b30Smrg sunos4*) 58583a925b30Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 58593a925b30Smrg wlarc= 58603a925b30Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 58613a925b30Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 58623a925b30Smrg ;; 58631ac89addSmrg 58643a925b30Smrg *) 58653a925b30Smrg if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 58663a925b30Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 58673a925b30Smrg _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' 58683a925b30Smrg else 58693a925b30Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 58703a925b30Smrg fi 58713a925b30Smrg ;; 58723a925b30Smrg esac 587345bc899bSmrg 58743a925b30Smrg if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then 58753a925b30Smrg runpath_var= 58763a925b30Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= 58773a925b30Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= 58783a925b30Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 58793a925b30Smrg fi 58803a925b30Smrg else 58813a925b30Smrg # PORTME fill in a description of your system's linker (not GNU ld) 58823a925b30Smrg case $host_os in 58833a925b30Smrg aix3*) 58843a925b30Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 58853a925b30Smrg _LT_AC_TAGVAR(always_export_symbols, $1)=yes 58863a925b30Smrg _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' 58873a925b30Smrg # Note: this linker hardcodes the directories in LIBPATH if there 58883a925b30Smrg # are no directories specified by -L. 58893a925b30Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 58903a925b30Smrg if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then 58913a925b30Smrg # Neither direct hardcoding nor static linking is supported with a 58923a925b30Smrg # broken collect2. 58933a925b30Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported 58943a925b30Smrg fi 58953a925b30Smrg ;; 589645bc899bSmrg 58973a925b30Smrg aix[[4-9]]*) 58983a925b30Smrg if test "$host_cpu" = ia64; then 58993a925b30Smrg # On IA64, the linker does run time linking by default, so we don't 59003a925b30Smrg # have to do anything special. 59013a925b30Smrg aix_use_runtimelinking=no 59023a925b30Smrg exp_sym_flag='-Bexport' 59033a925b30Smrg no_entry_flag="" 59043a925b30Smrg else 59053a925b30Smrg # If we're using GNU nm, then we don't want the "-C" option. 59063a925b30Smrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 59073a925b30Smrg if $NM -V 2>&1 | grep 'GNU' > /dev/null; then 59083a925b30Smrg _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' 59093a925b30Smrg else 59103a925b30Smrg _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' 59113a925b30Smrg fi 59123a925b30Smrg aix_use_runtimelinking=no 591345bc899bSmrg 59143a925b30Smrg # Test if we are trying to use run time linking or normal 59153a925b30Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 59163a925b30Smrg # need to do runtime linking. 59173a925b30Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 59183a925b30Smrg for ld_flag in $LDFLAGS; do 59193a925b30Smrg if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then 59203a925b30Smrg aix_use_runtimelinking=yes 59213a925b30Smrg break 59223a925b30Smrg fi 59233a925b30Smrg done 59243a925b30Smrg ;; 59253a925b30Smrg esac 592645bc899bSmrg 59273a925b30Smrg exp_sym_flag='-bexport' 59283a925b30Smrg no_entry_flag='-bnoentry' 59293a925b30Smrg fi 593045bc899bSmrg 59313a925b30Smrg # When large executables or shared objects are built, AIX ld can 59323a925b30Smrg # have problems creating the table of contents. If linking a library 59333a925b30Smrg # or program results in "error TOC overflow" add -mminimal-toc to 59343a925b30Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 59353a925b30Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 593645bc899bSmrg 59373a925b30Smrg _LT_AC_TAGVAR(archive_cmds, $1)='' 59383a925b30Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 59393a925b30Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' 59403a925b30Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 594150f2e948Smrg 59423a925b30Smrg if test "$GCC" = yes; then 59433a925b30Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 59443a925b30Smrg # We only want to do this on AIX 4.2 and lower, the check 59453a925b30Smrg # below for broken collect2 doesn't work under 4.3+ 59463a925b30Smrg collect2name=`${CC} -print-prog-name=collect2` 59473a925b30Smrg if test -f "$collect2name" && \ 59483a925b30Smrg strings "$collect2name" | grep resolve_lib_name >/dev/null 59493a925b30Smrg then 59503a925b30Smrg # We have reworked collect2 59513a925b30Smrg : 59523a925b30Smrg else 59533a925b30Smrg # We have old collect2 59543a925b30Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported 59553a925b30Smrg # It fails to find uninstalled libraries when the uninstalled 59563a925b30Smrg # path is not listed in the libpath. Setting hardcode_minus_L 59573a925b30Smrg # to unsupported forces relinking 59583a925b30Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 59593a925b30Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 59603a925b30Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 59613a925b30Smrg fi 59623a925b30Smrg ;; 59633a925b30Smrg esac 59643a925b30Smrg shared_flag='-shared' 59653a925b30Smrg if test "$aix_use_runtimelinking" = yes; then 59663a925b30Smrg shared_flag="$shared_flag "'${wl}-G' 59673a925b30Smrg fi 59683a925b30Smrg else 59693a925b30Smrg # not using gcc 59703a925b30Smrg if test "$host_cpu" = ia64; then 59713a925b30Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 59723a925b30Smrg # chokes on -Wl,-G. The following line is correct: 59733a925b30Smrg shared_flag='-G' 59743a925b30Smrg else 59753a925b30Smrg if test "$aix_use_runtimelinking" = yes; then 59763a925b30Smrg shared_flag='${wl}-G' 59773a925b30Smrg else 59783a925b30Smrg shared_flag='${wl}-bM:SRE' 59793a925b30Smrg fi 59803a925b30Smrg fi 59813a925b30Smrg fi 598250f2e948Smrg 59833a925b30Smrg # It seems that -bexpall does not export symbols beginning with 59843a925b30Smrg # underscore (_), so it is better to generate a list of symbols to export. 59853a925b30Smrg _LT_AC_TAGVAR(always_export_symbols, $1)=yes 59863a925b30Smrg if test "$aix_use_runtimelinking" = yes; then 59873a925b30Smrg # Warning - without using the other runtime loading flags (-brtl), 59883a925b30Smrg # -berok will link without error, but may produce a broken library. 59893a925b30Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' 59903a925b30Smrg # Determine the default libpath from the value encoded in an empty executable. 59913a925b30Smrg _LT_AC_SYS_LIBPATH_AIX 59923a925b30Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 59933a925b30Smrg _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" 59943a925b30Smrg else 59953a925b30Smrg if test "$host_cpu" = ia64; then 59963a925b30Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 59973a925b30Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 59983a925b30Smrg _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" 59993a925b30Smrg else 60003a925b30Smrg # Determine the default libpath from the value encoded in an empty executable. 60013a925b30Smrg _LT_AC_SYS_LIBPATH_AIX 60023a925b30Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 60033a925b30Smrg # Warning - without using the other run time loading flags, 60043a925b30Smrg # -berok will link without error, but may produce a broken library. 60053a925b30Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 60063a925b30Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 60073a925b30Smrg # Exported symbols can be pulled into shared objects from archives 60083a925b30Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 60093a925b30Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes 60103a925b30Smrg # This is similar to how AIX traditionally builds its shared libraries. 60113a925b30Smrg _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' 60123a925b30Smrg fi 60133a925b30Smrg fi 60143a925b30Smrg ;; 601550f2e948Smrg 60163a925b30Smrg amigaos*) 60173a925b30Smrg _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)' 60183a925b30Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 60193a925b30Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 60203a925b30Smrg # see comment about different semantics on the GNU ld section 60213a925b30Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 60223a925b30Smrg ;; 602345bc899bSmrg 60243a925b30Smrg bsdi[[45]]*) 60253a925b30Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 60263a925b30Smrg ;; 602745bc899bSmrg 60283a925b30Smrg cygwin* | mingw* | pw32*) 60293a925b30Smrg # When not using gcc, we currently assume that we are using 60303a925b30Smrg # Microsoft Visual C++. 60313a925b30Smrg # hardcode_libdir_flag_spec is actually meaningless, as there is 60323a925b30Smrg # no search path for DLLs. 60333a925b30Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 60343a925b30Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 60353a925b30Smrg # Tell ltmain to make .lib files, not .a files. 60363a925b30Smrg libext=lib 60373a925b30Smrg # Tell ltmain to make .dll files, not .so files. 60383a925b30Smrg shrext_cmds=".dll" 60393a925b30Smrg # FIXME: Setting linknames here is a bad hack. 60403a925b30Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' 60413a925b30Smrg # The linker will automatically build a .lib file if we build a DLL. 60423a925b30Smrg _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true' 60433a925b30Smrg # FIXME: Should let the user specify the lib program. 60443a925b30Smrg _LT_AC_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 60453a925b30Smrg _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' 60463a925b30Smrg _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 60473a925b30Smrg ;; 604845bc899bSmrg 60493a925b30Smrg darwin* | rhapsody*) 60503a925b30Smrg case $host_os in 60513a925b30Smrg rhapsody* | darwin1.[[012]]) 60523a925b30Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' 60533a925b30Smrg ;; 60543a925b30Smrg *) # Darwin 1.3 on 60553a925b30Smrg if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then 60563a925b30Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' 60573a925b30Smrg else 60583a925b30Smrg case ${MACOSX_DEPLOYMENT_TARGET} in 60593a925b30Smrg 10.[[012]]) 60603a925b30Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' 60613a925b30Smrg ;; 60623a925b30Smrg 10.*) 60633a925b30Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup' 60643a925b30Smrg ;; 60653a925b30Smrg esac 60663a925b30Smrg fi 60673a925b30Smrg ;; 60683a925b30Smrg esac 60693a925b30Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 60703a925b30Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 60713a925b30Smrg _LT_AC_TAGVAR(hardcode_automatic, $1)=yes 60723a925b30Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 60733a925b30Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' 60743a925b30Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 60753a925b30Smrg if test "$GCC" = yes ; then 60763a925b30Smrg output_verbose_link_cmd='echo' 60773a925b30Smrg _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}" 60783a925b30Smrg _LT_AC_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" 60793a925b30Smrg _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}" 60803a925b30Smrg _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}" 60813a925b30Smrg else 60823a925b30Smrg case $cc_basename in 60833a925b30Smrg xlc*) 60843a925b30Smrg output_verbose_link_cmd='echo' 60853a925b30Smrg _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' 60863a925b30Smrg _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' 60873a925b30Smrg # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds 60883a925b30Smrg _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}' 60893a925b30Smrg _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}' 60903a925b30Smrg ;; 60913a925b30Smrg *) 60923a925b30Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 60933a925b30Smrg ;; 60943a925b30Smrg esac 60953a925b30Smrg fi 60963a925b30Smrg ;; 609745bc899bSmrg 60983a925b30Smrg dgux*) 60993a925b30Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 61003a925b30Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 61013a925b30Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 61023a925b30Smrg ;; 610345bc899bSmrg 61043a925b30Smrg freebsd1*) 61053a925b30Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 61063a925b30Smrg ;; 610745bc899bSmrg 61083a925b30Smrg # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 61093a925b30Smrg # support. Future versions do this automatically, but an explicit c++rt0.o 61103a925b30Smrg # does not break anything, and helps significantly (at the cost of a little 61113a925b30Smrg # extra space). 61123a925b30Smrg freebsd2.2*) 61133a925b30Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 61143a925b30Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 61153a925b30Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 61163a925b30Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 61173a925b30Smrg ;; 611845bc899bSmrg 61193a925b30Smrg # Unfortunately, older versions of FreeBSD 2 do not have this feature. 61203a925b30Smrg freebsd2*) 61213a925b30Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 61223a925b30Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 61233a925b30Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 61243a925b30Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6125226fade8Smrg ;; 612645bc899bSmrg 61273a925b30Smrg # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 61283a925b30Smrg freebsd* | dragonfly*) 61293a925b30Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' 61303a925b30Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 61313a925b30Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 61323a925b30Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 61333a925b30Smrg ;; 613445bc899bSmrg 61353a925b30Smrg hpux9*) 61363a925b30Smrg if test "$GCC" = yes; then 61373a925b30Smrg _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' 61383a925b30Smrg else 61393a925b30Smrg _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' 61403a925b30Smrg fi 61413a925b30Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 61423a925b30Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 61433a925b30Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 614445bc899bSmrg 61453a925b30Smrg # hardcode_minus_L: Not really in the search PATH, 61463a925b30Smrg # but as the default location of the library. 61473a925b30Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 61483a925b30Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 61493a925b30Smrg ;; 615045bc899bSmrg 61513a925b30Smrg hpux10*) 61523a925b30Smrg if test "$GCC" = yes -a "$with_gnu_ld" = no; then 61533a925b30Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 61543a925b30Smrg else 61553a925b30Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 61563a925b30Smrg fi 61573a925b30Smrg if test "$with_gnu_ld" = no; then 61583a925b30Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 61593a925b30Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 616045bc899bSmrg 61613a925b30Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 61623a925b30Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 616345bc899bSmrg 61643a925b30Smrg # hardcode_minus_L: Not really in the search PATH, 61653a925b30Smrg # but as the default location of the library. 61663a925b30Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 61673a925b30Smrg fi 61683a925b30Smrg ;; 616945bc899bSmrg 61703a925b30Smrg hpux11*) 61713a925b30Smrg if test "$GCC" = yes -a "$with_gnu_ld" = no; then 61723a925b30Smrg case $host_cpu in 61733a925b30Smrg hppa*64*) 61743a925b30Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 61753a925b30Smrg ;; 61763a925b30Smrg ia64*) 61773a925b30Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 61783a925b30Smrg ;; 61793a925b30Smrg *) 61803a925b30Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 61813a925b30Smrg ;; 61823a925b30Smrg esac 61833a925b30Smrg else 61843a925b30Smrg case $host_cpu in 61853a925b30Smrg hppa*64*) 61863a925b30Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 61873a925b30Smrg ;; 61883a925b30Smrg ia64*) 61893a925b30Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 61903a925b30Smrg ;; 61913a925b30Smrg *) 61923a925b30Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 61933a925b30Smrg ;; 61943a925b30Smrg esac 61953a925b30Smrg fi 61963a925b30Smrg if test "$with_gnu_ld" = no; then 61973a925b30Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 61983a925b30Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 619945bc899bSmrg 62003a925b30Smrg case $host_cpu in 62013a925b30Smrg hppa*64*|ia64*) 62023a925b30Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' 62033a925b30Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 62043a925b30Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 62053a925b30Smrg ;; 62063a925b30Smrg *) 62073a925b30Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 62083a925b30Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 620945bc899bSmrg 62103a925b30Smrg # hardcode_minus_L: Not really in the search PATH, 62113a925b30Smrg # but as the default location of the library. 62123a925b30Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 62133a925b30Smrg ;; 62143a925b30Smrg esac 62153a925b30Smrg fi 6216226fade8Smrg ;; 621745bc899bSmrg 62183a925b30Smrg irix5* | irix6* | nonstopux*) 62193a925b30Smrg if test "$GCC" = yes; then 62203a925b30Smrg _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' 62213a925b30Smrg else 62223a925b30Smrg _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' 62233a925b30Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' 62243a925b30Smrg fi 62253a925b30Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 62263a925b30Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 62273a925b30Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 62283a925b30Smrg ;; 622945bc899bSmrg 62303a925b30Smrg netbsd*) 62313a925b30Smrg if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then 62323a925b30Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 62333a925b30Smrg else 62343a925b30Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 62353a925b30Smrg fi 62363a925b30Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 62373a925b30Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 62383a925b30Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 62393a925b30Smrg ;; 624045bc899bSmrg 62413a925b30Smrg newsos6) 62423a925b30Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 62433a925b30Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 62443a925b30Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 62453a925b30Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 62463a925b30Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 62473a925b30Smrg ;; 624845bc899bSmrg 62493a925b30Smrg openbsd*) 62503a925b30Smrg if test -f /usr/libexec/ld.so; then 62513a925b30Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 62523a925b30Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 62533a925b30Smrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 62543a925b30Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 62553a925b30Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' 62563a925b30Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 62573a925b30Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 62583a925b30Smrg else 62593a925b30Smrg case $host_os in 62603a925b30Smrg openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) 62613a925b30Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 62623a925b30Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 62633a925b30Smrg ;; 62643a925b30Smrg *) 62653a925b30Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 62663a925b30Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 62673a925b30Smrg ;; 62683a925b30Smrg esac 62693a925b30Smrg fi 62703a925b30Smrg else 62713a925b30Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 62723a925b30Smrg fi 62733a925b30Smrg ;; 627445bc899bSmrg 62753a925b30Smrg os2*) 62763a925b30Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 62773a925b30Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 62783a925b30Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 62793a925b30Smrg _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' 62803a925b30Smrg _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' 62813a925b30Smrg ;; 628245bc899bSmrg 62833a925b30Smrg osf3*) 62843a925b30Smrg if test "$GCC" = yes; then 62853a925b30Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 62863a925b30Smrg _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' 62873a925b30Smrg else 62883a925b30Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 62893a925b30Smrg _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' 62903a925b30Smrg fi 62913a925b30Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 62923a925b30Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 62933a925b30Smrg ;; 629445bc899bSmrg 62953a925b30Smrg osf4* | osf5*) # as osf3* with the addition of -msym flag 62963a925b30Smrg if test "$GCC" = yes; then 62973a925b30Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 62983a925b30Smrg _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' 62993a925b30Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 63003a925b30Smrg else 63013a925b30Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 63023a925b30Smrg _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' 63033a925b30Smrg _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~ 63043a925b30Smrg $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' 630545bc899bSmrg 63063a925b30Smrg # Both c and cxx compiler support -rpath directly 63073a925b30Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 63083a925b30Smrg fi 63093a925b30Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 63103a925b30Smrg ;; 631145bc899bSmrg 63123a925b30Smrg solaris*) 63133a925b30Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text' 63143a925b30Smrg if test "$GCC" = yes; then 63153a925b30Smrg wlarc='${wl}' 63163a925b30Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 63173a925b30Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 63183a925b30Smrg $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' 63193a925b30Smrg else 63203a925b30Smrg wlarc='' 63213a925b30Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' 63223a925b30Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 63233a925b30Smrg $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' 63243a925b30Smrg fi 63253a925b30Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 63263a925b30Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 63273a925b30Smrg case $host_os in 63283a925b30Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 63293a925b30Smrg *) 63303a925b30Smrg # The compiler driver will combine and reorder linker options, 63313a925b30Smrg # but understands `-z linker_flag'. GCC discards it without `$wl', 63323a925b30Smrg # but is careful enough not to reorder. 63333a925b30Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 63343a925b30Smrg if test "$GCC" = yes; then 63353a925b30Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 63363a925b30Smrg else 63373a925b30Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 633850f2e948Smrg fi 63393a925b30Smrg ;; 63403a925b30Smrg esac 63413a925b30Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 6342226fade8Smrg ;; 634345bc899bSmrg 63443a925b30Smrg sunos4*) 63453a925b30Smrg if test "x$host_vendor" = xsequent; then 63463a925b30Smrg # Use $CC to link under sequent, because it throws in some extra .o 63473a925b30Smrg # files that make .init and .fini sections work. 63483a925b30Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' 63493a925b30Smrg else 63503a925b30Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 63513a925b30Smrg fi 63523a925b30Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 63533a925b30Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 63543a925b30Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 63553a925b30Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 63563a925b30Smrg ;; 635745bc899bSmrg 63583a925b30Smrg sysv4) 63593a925b30Smrg case $host_vendor in 63603a925b30Smrg sni) 63613a925b30Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 63623a925b30Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 63633a925b30Smrg ;; 63643a925b30Smrg siemens) 63653a925b30Smrg ## LD is ld it makes a PLAMLIB 63663a925b30Smrg ## CC just makes a GrossModule. 63673a925b30Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 63683a925b30Smrg _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 63693a925b30Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 63703a925b30Smrg ;; 63713a925b30Smrg motorola) 63723a925b30Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 63733a925b30Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 63743a925b30Smrg ;; 63753a925b30Smrg esac 63763a925b30Smrg runpath_var='LD_RUN_PATH' 63773a925b30Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 63783a925b30Smrg ;; 63791ac89addSmrg 63803a925b30Smrg sysv4.3*) 63813a925b30Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 63823a925b30Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 63833a925b30Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 63843a925b30Smrg ;; 63851ac89addSmrg 63863a925b30Smrg sysv4*MP*) 63873a925b30Smrg if test -d /usr/nec; then 63883a925b30Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 63893a925b30Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 63903a925b30Smrg runpath_var=LD_RUN_PATH 63913a925b30Smrg hardcode_runpath_var=yes 63923a925b30Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=yes 63933a925b30Smrg fi 63943a925b30Smrg ;; 63951ac89addSmrg 63963a925b30Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 63973a925b30Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 63983a925b30Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 63993a925b30Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 64003a925b30Smrg runpath_var='LD_RUN_PATH' 64011ac89addSmrg 64023a925b30Smrg if test "$GCC" = yes; then 64033a925b30Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 64043a925b30Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 64053a925b30Smrg else 64063a925b30Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 64073a925b30Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 64083a925b30Smrg fi 64093a925b30Smrg ;; 641050f2e948Smrg 64113a925b30Smrg sysv5* | sco3.2v5* | sco5v6*) 64123a925b30Smrg # Note: We can NOT use -z defs as we might desire, because we do not 64133a925b30Smrg # link with -lc, and that would cause any symbols used from libc to 64143a925b30Smrg # always be unresolved, which means just about no library would 64153a925b30Smrg # ever link correctly. If we're not using GNU ld we use -z text 64163a925b30Smrg # though, which does catch some bad symbols but isn't as heavy-handed 64173a925b30Smrg # as -z defs. 64183a925b30Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 64193a925b30Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 64203a925b30Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 64213a925b30Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 64223a925b30Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' 64233a925b30Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' 64243a925b30Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 64253a925b30Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 64263a925b30Smrg runpath_var='LD_RUN_PATH' 64271ac89addSmrg 64283a925b30Smrg if test "$GCC" = yes; then 64293a925b30Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' 64303a925b30Smrg _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' 64313a925b30Smrg else 64323a925b30Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' 64333a925b30Smrg _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' 64343a925b30Smrg fi 64353a925b30Smrg ;; 64361ac89addSmrg 64373a925b30Smrg uts4*) 64383a925b30Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 64393a925b30Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 64403a925b30Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 64413a925b30Smrg ;; 644250f2e948Smrg 64433a925b30Smrg *) 64443a925b30Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 64453a925b30Smrg ;; 64463a925b30Smrg esac 64473a925b30Smrg fi 644850f2e948Smrg]) 64493a925b30SmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) 64503a925b30Smrgtest "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 645150f2e948Smrg 64523a925b30Smrg# 64533a925b30Smrg# Do we need to explicitly link libc? 64543a925b30Smrg# 64553a925b30Smrgcase "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in 64563a925b30Smrgx|xyes) 64573a925b30Smrg # Assume -lc should be added 64583a925b30Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes 645950f2e948Smrg 64603a925b30Smrg if test "$enable_shared" = yes && test "$GCC" = yes; then 64613a925b30Smrg case $_LT_AC_TAGVAR(archive_cmds, $1) in 64623a925b30Smrg *'~'*) 64633a925b30Smrg # FIXME: we may have to deal with multi-command sequences. 64643a925b30Smrg ;; 64653a925b30Smrg '$CC '*) 64663a925b30Smrg # Test whether the compiler implicitly links with -lc since on some 64673a925b30Smrg # systems, -lgcc has to come before -lc. If gcc already passes -lc 64683a925b30Smrg # to ld, don't add -lc before -lgcc. 64693a925b30Smrg AC_MSG_CHECKING([whether -lc should be explicitly linked in]) 64703a925b30Smrg $rm conftest* 64713a925b30Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 647250f2e948Smrg 64733a925b30Smrg if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 64743a925b30Smrg soname=conftest 64753a925b30Smrg lib=conftest 64763a925b30Smrg libobjs=conftest.$ac_objext 64773a925b30Smrg deplibs= 64783a925b30Smrg wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) 64793a925b30Smrg pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) 64803a925b30Smrg compiler_flags=-v 64813a925b30Smrg linker_flags=-v 64823a925b30Smrg verstring= 64833a925b30Smrg output_objdir=. 64843a925b30Smrg libname=conftest 64853a925b30Smrg lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1) 64863a925b30Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)= 64873a925b30Smrg if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 64883a925b30Smrg then 64893a925b30Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 64903a925b30Smrg else 64913a925b30Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes 64923a925b30Smrg fi 64933a925b30Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 64943a925b30Smrg else 64953a925b30Smrg cat conftest.err 1>&5 64963a925b30Smrg fi 64973a925b30Smrg $rm conftest* 64983a925b30Smrg AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)]) 64993a925b30Smrg ;; 65003a925b30Smrg esac 65013a925b30Smrg fi 65023a925b30Smrg ;; 65033a925b30Smrgesac 65043a925b30Smrg])# AC_LIBTOOL_PROG_LD_SHLIBS 650550f2e948Smrg 650650f2e948Smrg 65073a925b30Smrg# _LT_AC_FILE_LTDLL_C 65083a925b30Smrg# ------------------- 65093a925b30Smrg# Be careful that the start marker always follows a newline. 65103a925b30SmrgAC_DEFUN([_LT_AC_FILE_LTDLL_C], [ 65113a925b30Smrg# /* ltdll.c starts here */ 65123a925b30Smrg# #define WIN32_LEAN_AND_MEAN 65133a925b30Smrg# #include <windows.h> 65143a925b30Smrg# #undef WIN32_LEAN_AND_MEAN 65153a925b30Smrg# #include <stdio.h> 651645bc899bSmrg# 65173a925b30Smrg# #ifndef __CYGWIN__ 65183a925b30Smrg# # ifdef __CYGWIN32__ 65193a925b30Smrg# # define __CYGWIN__ __CYGWIN32__ 65203a925b30Smrg# # endif 65213a925b30Smrg# #endif 652245bc899bSmrg# 65233a925b30Smrg# #ifdef __cplusplus 65243a925b30Smrg# extern "C" { 65253a925b30Smrg# #endif 65263a925b30Smrg# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved); 65273a925b30Smrg# #ifdef __cplusplus 65283a925b30Smrg# } 65293a925b30Smrg# #endif 6530226fade8Smrg# 65313a925b30Smrg# #ifdef __CYGWIN__ 65323a925b30Smrg# #include <cygwin/cygwin_dll.h> 65333a925b30Smrg# DECLARE_CYGWIN_DLL( DllMain ); 65343a925b30Smrg# #endif 65353a925b30Smrg# HINSTANCE __hDllInstance_base; 65363a925b30Smrg# 65373a925b30Smrg# BOOL APIENTRY 65383a925b30Smrg# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved) 65393a925b30Smrg# { 65403a925b30Smrg# __hDllInstance_base = hInst; 65413a925b30Smrg# return TRUE; 65423a925b30Smrg# } 65433a925b30Smrg# /* ltdll.c ends here */ 65443a925b30Smrg])# _LT_AC_FILE_LTDLL_C 654545bc899bSmrg 654645bc899bSmrg 65473a925b30Smrg# _LT_AC_TAGVAR(VARNAME, [TAGNAME]) 65483a925b30Smrg# --------------------------------- 65493a925b30SmrgAC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])]) 655045bc899bSmrg 655145bc899bSmrg 65523a925b30Smrg# old names 65533a925b30SmrgAC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL]) 65543a925b30SmrgAC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 65553a925b30SmrgAC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 65563a925b30SmrgAC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 65573a925b30SmrgAC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 65583a925b30SmrgAC_DEFUN([AM_PROG_LD], [AC_PROG_LD]) 65593a925b30SmrgAC_DEFUN([AM_PROG_NM], [AC_PROG_NM]) 656045bc899bSmrg 65613a925b30Smrg# This is just to silence aclocal about the macro not being used 65623a925b30Smrgifelse([AC_DISABLE_FAST_INSTALL]) 65631ac89addSmrg 65643a925b30SmrgAC_DEFUN([LT_AC_PROG_GCJ], 65653a925b30Smrg[AC_CHECK_TOOL(GCJ, gcj, no) 65663a925b30Smrg test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" 65673a925b30Smrg AC_SUBST(GCJFLAGS) 65683a925b30Smrg]) 656945bc899bSmrg 65703a925b30SmrgAC_DEFUN([LT_AC_PROG_RC], 65713a925b30Smrg[AC_CHECK_TOOL(RC, windres, no) 6572226fade8Smrg]) 657350f2e948Smrg 657450f2e948Smrg 65753a925b30Smrg# Cheap backport of AS_EXECUTABLE_P and required macros 65763a925b30Smrg# from Autoconf 2.59; we should not use $as_executable_p directly. 657750f2e948Smrg 65783a925b30Smrg# _AS_TEST_PREPARE 65793a925b30Smrg# ---------------- 65803a925b30Smrgm4_ifndef([_AS_TEST_PREPARE], 65813a925b30Smrg[m4_defun([_AS_TEST_PREPARE], 65823a925b30Smrg[if test -x / >/dev/null 2>&1; then 65833a925b30Smrg as_executable_p='test -x' 65843a925b30Smrgelse 65853a925b30Smrg as_executable_p='test -f' 65863a925b30Smrgfi 65873a925b30Smrg])])# _AS_TEST_PREPARE 658850f2e948Smrg 65893a925b30Smrg# AS_EXECUTABLE_P 65903a925b30Smrg# --------------- 65913a925b30Smrg# Check whether a file is executable. 65923a925b30Smrgm4_ifndef([AS_EXECUTABLE_P], 65933a925b30Smrg[m4_defun([AS_EXECUTABLE_P], 65943a925b30Smrg[AS_REQUIRE([_AS_TEST_PREPARE])dnl 65953a925b30Smrg$as_executable_p $1[]dnl 65963a925b30Smrg])])# AS_EXECUTABLE_P 659750f2e948Smrg 65983a925b30Smrg# NOTE: This macro has been submitted for inclusion into # 65993a925b30Smrg# GNU Autoconf as AC_PROG_SED. When it is available in # 66003a925b30Smrg# a released version of Autoconf we should remove this # 66013a925b30Smrg# macro and use it instead. # 66023a925b30Smrg# LT_AC_PROG_SED 66033a925b30Smrg# -------------- 66043a925b30Smrg# Check for a fully-functional sed program, that truncates 66053a925b30Smrg# as few characters as possible. Prefer GNU sed if found. 66063a925b30SmrgAC_DEFUN([LT_AC_PROG_SED], 66073a925b30Smrg[AC_MSG_CHECKING([for a sed that does not truncate output]) 66083a925b30SmrgAC_CACHE_VAL(lt_cv_path_SED, 66093a925b30Smrg[# Loop through the user's path and test for sed and gsed. 66103a925b30Smrg# Then use that list of sed's as ones to test for truncation. 66113a925b30Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 66123a925b30Smrgfor as_dir in $PATH 66133a925b30Smrgdo 66143a925b30Smrg IFS=$as_save_IFS 66153a925b30Smrg test -z "$as_dir" && as_dir=. 66163a925b30Smrg for lt_ac_prog in sed gsed; do 66173a925b30Smrg for ac_exec_ext in '' $ac_executable_extensions; do 66183a925b30Smrg if AS_EXECUTABLE_P(["$as_dir/$lt_ac_prog$ac_exec_ext"]); then 66193a925b30Smrg lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 66203a925b30Smrg fi 66213a925b30Smrg done 66223a925b30Smrg done 66233a925b30Smrgdone 66243a925b30SmrgIFS=$as_save_IFS 66253a925b30Smrglt_ac_max=0 66263a925b30Smrglt_ac_count=0 66273a925b30Smrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris 66283a925b30Smrg# along with /bin/sed that truncates output. 66293a925b30Smrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 66303a925b30Smrg test ! -f $lt_ac_sed && continue 66313a925b30Smrg cat /dev/null > conftest.in 66323a925b30Smrg lt_ac_count=0 66333a925b30Smrg echo $ECHO_N "0123456789$ECHO_C" >conftest.in 66343a925b30Smrg # Check for GNU sed and select it if it is found. 66353a925b30Smrg if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 66363a925b30Smrg lt_cv_path_SED=$lt_ac_sed 66373a925b30Smrg break 66383a925b30Smrg fi 66393a925b30Smrg while true; do 66403a925b30Smrg cat conftest.in conftest.in >conftest.tmp 66413a925b30Smrg mv conftest.tmp conftest.in 66423a925b30Smrg cp conftest.in conftest.nl 66433a925b30Smrg echo >>conftest.nl 66443a925b30Smrg $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 66453a925b30Smrg cmp -s conftest.out conftest.nl || break 66463a925b30Smrg # 10000 chars as input seems more than enough 66473a925b30Smrg test $lt_ac_count -gt 10 && break 66483a925b30Smrg lt_ac_count=`expr $lt_ac_count + 1` 66493a925b30Smrg if test $lt_ac_count -gt $lt_ac_max; then 66503a925b30Smrg lt_ac_max=$lt_ac_count 66513a925b30Smrg lt_cv_path_SED=$lt_ac_sed 66523a925b30Smrg fi 66533a925b30Smrg done 66543a925b30Smrgdone 66553a925b30Smrg]) 66563a925b30SmrgSED=$lt_cv_path_SED 66573a925b30SmrgAC_SUBST([SED]) 66583a925b30SmrgAC_MSG_RESULT([$SED]) 6659226fade8Smrg]) 666050f2e948Smrg 666145bc899bSmrg# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 666245bc899bSmrg# 666345bc899bSmrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 666445bc899bSmrg# 666545bc899bSmrg# This program is free software; you can redistribute it and/or modify 666645bc899bSmrg# it under the terms of the GNU General Public License as published by 666745bc899bSmrg# the Free Software Foundation; either version 2 of the License, or 666845bc899bSmrg# (at your option) any later version. 666945bc899bSmrg# 667045bc899bSmrg# This program is distributed in the hope that it will be useful, but 667145bc899bSmrg# WITHOUT ANY WARRANTY; without even the implied warranty of 667245bc899bSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 667345bc899bSmrg# General Public License for more details. 667445bc899bSmrg# 667545bc899bSmrg# You should have received a copy of the GNU General Public License 667645bc899bSmrg# along with this program; if not, write to the Free Software 667745bc899bSmrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 667845bc899bSmrg# 667945bc899bSmrg# As a special exception to the GNU General Public License, if you 668045bc899bSmrg# distribute this file as part of a program that contains a 668145bc899bSmrg# configuration script generated by Autoconf, you may include it under 668245bc899bSmrg# the same distribution terms that you use for the rest of that program. 668345bc899bSmrg 668445bc899bSmrg# PKG_PROG_PKG_CONFIG([MIN-VERSION]) 668545bc899bSmrg# ---------------------------------- 668645bc899bSmrgAC_DEFUN([PKG_PROG_PKG_CONFIG], 668745bc899bSmrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 668845bc899bSmrgm4_pattern_allow([^PKG_CONFIG(_PATH)?$]) 668945bc899bSmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl 669045bc899bSmrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 669145bc899bSmrg AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 669245bc899bSmrgfi 669345bc899bSmrgif test -n "$PKG_CONFIG"; then 669445bc899bSmrg _pkg_min_version=m4_default([$1], [0.9.0]) 669545bc899bSmrg AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 669645bc899bSmrg if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 669745bc899bSmrg AC_MSG_RESULT([yes]) 669845bc899bSmrg else 669945bc899bSmrg AC_MSG_RESULT([no]) 670045bc899bSmrg PKG_CONFIG="" 670145bc899bSmrg fi 670245bc899bSmrg 670345bc899bSmrgfi[]dnl 670445bc899bSmrg])# PKG_PROG_PKG_CONFIG 670545bc899bSmrg 670645bc899bSmrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 670745bc899bSmrg# 670845bc899bSmrg# Check to see whether a particular set of modules exists. Similar 670945bc899bSmrg# to PKG_CHECK_MODULES(), but does not set variables or print errors. 671045bc899bSmrg# 671145bc899bSmrg# 671245bc899bSmrg# Similar to PKG_CHECK_MODULES, make sure that the first instance of 671345bc899bSmrg# this or PKG_CHECK_MODULES is called, or make sure to call 671445bc899bSmrg# PKG_CHECK_EXISTS manually 671545bc899bSmrg# -------------------------------------------------------------- 671645bc899bSmrgAC_DEFUN([PKG_CHECK_EXISTS], 671745bc899bSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 671845bc899bSmrgif test -n "$PKG_CONFIG" && \ 671945bc899bSmrg AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 672045bc899bSmrg m4_ifval([$2], [$2], [:]) 672145bc899bSmrgm4_ifvaln([$3], [else 672245bc899bSmrg $3])dnl 672345bc899bSmrgfi]) 672445bc899bSmrg 672545bc899bSmrg 672645bc899bSmrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 672745bc899bSmrg# --------------------------------------------- 672845bc899bSmrgm4_define([_PKG_CONFIG], 672950f2e948Smrg[if test -n "$$1"; then 673050f2e948Smrg pkg_cv_[]$1="$$1" 673150f2e948Smrg elif test -n "$PKG_CONFIG"; then 673250f2e948Smrg PKG_CHECK_EXISTS([$3], 673350f2e948Smrg [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], 673450f2e948Smrg [pkg_failed=yes]) 673550f2e948Smrg else 673650f2e948Smrg pkg_failed=untried 673745bc899bSmrgfi[]dnl 673845bc899bSmrg])# _PKG_CONFIG 673945bc899bSmrg 674045bc899bSmrg# _PKG_SHORT_ERRORS_SUPPORTED 674145bc899bSmrg# ----------------------------- 674245bc899bSmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 674345bc899bSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 674445bc899bSmrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 674545bc899bSmrg _pkg_short_errors_supported=yes 674645bc899bSmrgelse 674745bc899bSmrg _pkg_short_errors_supported=no 674845bc899bSmrgfi[]dnl 674945bc899bSmrg])# _PKG_SHORT_ERRORS_SUPPORTED 675045bc899bSmrg 675145bc899bSmrg 675245bc899bSmrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 675345bc899bSmrg# [ACTION-IF-NOT-FOUND]) 675445bc899bSmrg# 675545bc899bSmrg# 675645bc899bSmrg# Note that if there is a possibility the first call to 675745bc899bSmrg# PKG_CHECK_MODULES might not happen, you should be sure to include an 675845bc899bSmrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 675945bc899bSmrg# 676045bc899bSmrg# 676145bc899bSmrg# -------------------------------------------------------------- 676245bc899bSmrgAC_DEFUN([PKG_CHECK_MODULES], 676345bc899bSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 676445bc899bSmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 676545bc899bSmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 676645bc899bSmrg 676745bc899bSmrgpkg_failed=no 676845bc899bSmrgAC_MSG_CHECKING([for $1]) 676945bc899bSmrg 677045bc899bSmrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 677145bc899bSmrg_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 677245bc899bSmrg 677345bc899bSmrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 677445bc899bSmrgand $1[]_LIBS to avoid the need to call pkg-config. 677545bc899bSmrgSee the pkg-config man page for more details.]) 677645bc899bSmrg 677745bc899bSmrgif test $pkg_failed = yes; then 677845bc899bSmrg _PKG_SHORT_ERRORS_SUPPORTED 677945bc899bSmrg if test $_pkg_short_errors_supported = yes; then 678050f2e948Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1` 678145bc899bSmrg else 678250f2e948Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1` 678345bc899bSmrg fi 678445bc899bSmrg # Put the nasty error message in config.log where it belongs 678545bc899bSmrg echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 678645bc899bSmrg 678745bc899bSmrg ifelse([$4], , [AC_MSG_ERROR(dnl 678845bc899bSmrg[Package requirements ($2) were not met: 678945bc899bSmrg 679045bc899bSmrg$$1_PKG_ERRORS 679145bc899bSmrg 679245bc899bSmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you 679345bc899bSmrginstalled software in a non-standard prefix. 679445bc899bSmrg 679545bc899bSmrg_PKG_TEXT 679645bc899bSmrg])], 679745bc899bSmrg [AC_MSG_RESULT([no]) 679845bc899bSmrg $4]) 679945bc899bSmrgelif test $pkg_failed = untried; then 680045bc899bSmrg ifelse([$4], , [AC_MSG_FAILURE(dnl 680145bc899bSmrg[The pkg-config script could not be found or is too old. Make sure it 680245bc899bSmrgis in your PATH or set the PKG_CONFIG environment variable to the full 680345bc899bSmrgpath to pkg-config. 680445bc899bSmrg 680545bc899bSmrg_PKG_TEXT 680645bc899bSmrg 680750f2e948SmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.])], 680845bc899bSmrg [$4]) 680945bc899bSmrgelse 681045bc899bSmrg $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 681145bc899bSmrg $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 681245bc899bSmrg AC_MSG_RESULT([yes]) 681345bc899bSmrg ifelse([$3], , :, [$3]) 681445bc899bSmrgfi[]dnl 681545bc899bSmrg])# PKG_CHECK_MODULES 681645bc899bSmrg 681750f2e948Smrgdnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. 681845bc899bSmrgdnl 681945bc899bSmrgdnl Copyright 2005-2006 Sun Microsystems, Inc. All rights reserved. 682045bc899bSmrgdnl 682145bc899bSmrgdnl Permission is hereby granted, free of charge, to any person obtaining a 682245bc899bSmrgdnl copy of this software and associated documentation files (the 682345bc899bSmrgdnl "Software"), to deal in the Software without restriction, including 682445bc899bSmrgdnl without limitation the rights to use, copy, modify, merge, publish, 682545bc899bSmrgdnl distribute, and/or sell copies of the Software, and to permit persons 682645bc899bSmrgdnl to whom the Software is furnished to do so, provided that the above 682745bc899bSmrgdnl copyright notice(s) and this permission notice appear in all copies of 682845bc899bSmrgdnl the Software and that both the above copyright notice(s) and this 682945bc899bSmrgdnl permission notice appear in supporting documentation. 683045bc899bSmrgdnl 683145bc899bSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 683245bc899bSmrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 683345bc899bSmrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT 683445bc899bSmrgdnl OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR 683545bc899bSmrgdnl HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL 683645bc899bSmrgdnl INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING 683745bc899bSmrgdnl FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, 683845bc899bSmrgdnl NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION 683945bc899bSmrgdnl WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 684045bc899bSmrgdnl 684145bc899bSmrgdnl Except as contained in this notice, the name of a copyright holder 684245bc899bSmrgdnl shall not be used in advertising or otherwise to promote the sale, use 684345bc899bSmrgdnl or other dealings in this Software without prior written authorization 684445bc899bSmrgdnl of the copyright holder. 684545bc899bSmrg 684645bc899bSmrg# XORG_MACROS_VERSION(required-version) 684745bc899bSmrg# ------------------------------------- 684845bc899bSmrg# Minimum version: 1.1.0 684945bc899bSmrg# 685045bc899bSmrg# If you're using a macro added in Version 1.1 or newer, include this in 685145bc899bSmrg# your configure.ac with the minimum required version, such as: 685245bc899bSmrg# XORG_MACROS_VERSION(1.1) 685345bc899bSmrg# 685445bc899bSmrg# To force at least a version with this macro defined, also add: 685545bc899bSmrg# m4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 685645bc899bSmrg# 685745bc899bSmrg# 685845bc899bSmrg# See the "minimum version" comment for each macro you use to see what 685945bc899bSmrg# version you require. 686045bc899bSmrgAC_DEFUN([XORG_MACROS_VERSION],[ 686145bc899bSmrg [XORG_MACROS_needed_version=$1 686245bc899bSmrg XORG_MACROS_needed_major=`echo $XORG_MACROS_needed_version | sed 's/\..*$//'` 686345bc899bSmrg XORG_MACROS_needed_minor=`echo $XORG_MACROS_needed_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`] 686445bc899bSmrg AC_MSG_CHECKING([if xorg-macros used to generate configure is at least ${XORG_MACROS_needed_major}.${XORG_MACROS_needed_minor}]) 686550f2e948Smrg [XORG_MACROS_version=1.2.1 686645bc899bSmrg XORG_MACROS_major=`echo $XORG_MACROS_version | sed 's/\..*$//'` 686745bc899bSmrg XORG_MACROS_minor=`echo $XORG_MACROS_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`] 686845bc899bSmrg if test $XORG_MACROS_major -ne $XORG_MACROS_needed_major ; then 686945bc899bSmrg AC_MSG_ERROR([configure built with incompatible version of xorg-macros.m4 - requires version ${XORG_MACROS_major}.x]) 687045bc899bSmrg fi 687145bc899bSmrg if test $XORG_MACROS_minor -lt $XORG_MACROS_needed_minor ; then 687245bc899bSmrg AC_MSG_ERROR([configure built with too old of a version of xorg-macros.m4 - requires version ${XORG_MACROS_major}.${XORG_MACROS_minor}.0 or newer]) 687345bc899bSmrg fi 687445bc899bSmrg AC_MSG_RESULT([yes, $XORG_MACROS_version]) 687545bc899bSmrg]) # XORG_MACROS_VERSION 687645bc899bSmrg 687745bc899bSmrg# XORG_PROG_RAWCPP() 687845bc899bSmrg# ------------------ 687945bc899bSmrg# Minimum version: 1.0.0 688045bc899bSmrg# 688145bc899bSmrg# Find cpp program and necessary flags for use in pre-processing text files 688245bc899bSmrg# such as man pages and config files 688345bc899bSmrgAC_DEFUN([XORG_PROG_RAWCPP],[ 688445bc899bSmrgAC_REQUIRE([AC_PROG_CPP]) 688545bc899bSmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 688645bc899bSmrg [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 688745bc899bSmrg 688845bc899bSmrg# Check for flag to avoid builtin definitions - assumes unix is predefined, 688945bc899bSmrg# which is not the best choice for supporting other OS'es, but covers most 689045bc899bSmrg# of the ones we need for now. 689145bc899bSmrgAC_MSG_CHECKING([if $RAWCPP requires -undef]) 689245bc899bSmrgAC_LANG_CONFTEST([Does cpp redefine unix ?]) 689345bc899bSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 689445bc899bSmrg AC_MSG_RESULT([no]) 689545bc899bSmrgelse 689645bc899bSmrg if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 689745bc899bSmrg RAWCPPFLAGS=-undef 689845bc899bSmrg AC_MSG_RESULT([yes]) 689950f2e948Smrg # under Cygwin unix is still defined even with -undef 690050f2e948Smrg elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 690150f2e948Smrg RAWCPPFLAGS="-undef -ansi" 690250f2e948Smrg AC_MSG_RESULT([yes, with -ansi]) 690345bc899bSmrg else 690445bc899bSmrg AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 690545bc899bSmrg fi 690645bc899bSmrgfi 690745bc899bSmrgrm -f conftest.$ac_ext 690845bc899bSmrg 690945bc899bSmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional]) 691045bc899bSmrgAC_LANG_CONFTEST([Does cpp preserve "whitespace"?]) 691145bc899bSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 691245bc899bSmrg AC_MSG_RESULT([no]) 691345bc899bSmrgelse 691445bc899bSmrg if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 691545bc899bSmrg RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 691645bc899bSmrg AC_MSG_RESULT([yes]) 691745bc899bSmrg else 691845bc899bSmrg AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 691945bc899bSmrg fi 692045bc899bSmrgfi 692145bc899bSmrgrm -f conftest.$ac_ext 692245bc899bSmrgAC_SUBST(RAWCPPFLAGS) 692345bc899bSmrg]) # XORG_PROG_RAWCPP 692445bc899bSmrg 692545bc899bSmrg# XORG_MANPAGE_SECTIONS() 692645bc899bSmrg# ----------------------- 692745bc899bSmrg# Minimum version: 1.0.0 692845bc899bSmrg# 692945bc899bSmrg# Determine which sections man pages go in for the different man page types 693045bc899bSmrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 693145bc899bSmrg# Not sure if there's any better way than just hardcoding by OS name. 693245bc899bSmrg# Override default settings by setting environment variables 693345bc899bSmrg 693445bc899bSmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[ 693545bc899bSmrgAC_REQUIRE([AC_CANONICAL_HOST]) 693645bc899bSmrg 693745bc899bSmrgif test x$APP_MAN_SUFFIX = x ; then 693845bc899bSmrg APP_MAN_SUFFIX=1 693945bc899bSmrgfi 694045bc899bSmrgif test x$APP_MAN_DIR = x ; then 694145bc899bSmrg APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 694245bc899bSmrgfi 694345bc899bSmrg 694445bc899bSmrgif test x$LIB_MAN_SUFFIX = x ; then 694545bc899bSmrg LIB_MAN_SUFFIX=3 694645bc899bSmrgfi 694745bc899bSmrgif test x$LIB_MAN_DIR = x ; then 694845bc899bSmrg LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 694945bc899bSmrgfi 695045bc899bSmrg 695145bc899bSmrgif test x$FILE_MAN_SUFFIX = x ; then 695245bc899bSmrg case $host_os in 695345bc899bSmrg solaris*) FILE_MAN_SUFFIX=4 ;; 695445bc899bSmrg *) FILE_MAN_SUFFIX=5 ;; 695545bc899bSmrg esac 695645bc899bSmrgfi 695745bc899bSmrgif test x$FILE_MAN_DIR = x ; then 695845bc899bSmrg FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 695945bc899bSmrgfi 696045bc899bSmrg 696145bc899bSmrgif test x$MISC_MAN_SUFFIX = x ; then 696245bc899bSmrg case $host_os in 696345bc899bSmrg solaris*) MISC_MAN_SUFFIX=5 ;; 696445bc899bSmrg *) MISC_MAN_SUFFIX=7 ;; 696545bc899bSmrg esac 696645bc899bSmrgfi 696745bc899bSmrgif test x$MISC_MAN_DIR = x ; then 696845bc899bSmrg MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 696945bc899bSmrgfi 697045bc899bSmrg 697145bc899bSmrgif test x$DRIVER_MAN_SUFFIX = x ; then 697245bc899bSmrg case $host_os in 697345bc899bSmrg solaris*) DRIVER_MAN_SUFFIX=7 ;; 697445bc899bSmrg *) DRIVER_MAN_SUFFIX=4 ;; 697545bc899bSmrg esac 697645bc899bSmrgfi 697745bc899bSmrgif test x$DRIVER_MAN_DIR = x ; then 697845bc899bSmrg DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 697945bc899bSmrgfi 698045bc899bSmrg 698145bc899bSmrgif test x$ADMIN_MAN_SUFFIX = x ; then 698245bc899bSmrg case $host_os in 698345bc899bSmrg solaris*) ADMIN_MAN_SUFFIX=1m ;; 698445bc899bSmrg *) ADMIN_MAN_SUFFIX=8 ;; 698545bc899bSmrg esac 698645bc899bSmrgfi 698745bc899bSmrgif test x$ADMIN_MAN_DIR = x ; then 698845bc899bSmrg ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 698945bc899bSmrgfi 699045bc899bSmrg 699145bc899bSmrg 699245bc899bSmrgAC_SUBST([APP_MAN_SUFFIX]) 699345bc899bSmrgAC_SUBST([LIB_MAN_SUFFIX]) 699445bc899bSmrgAC_SUBST([FILE_MAN_SUFFIX]) 699545bc899bSmrgAC_SUBST([MISC_MAN_SUFFIX]) 699645bc899bSmrgAC_SUBST([DRIVER_MAN_SUFFIX]) 699745bc899bSmrgAC_SUBST([ADMIN_MAN_SUFFIX]) 699845bc899bSmrgAC_SUBST([APP_MAN_DIR]) 699945bc899bSmrgAC_SUBST([LIB_MAN_DIR]) 700045bc899bSmrgAC_SUBST([FILE_MAN_DIR]) 700145bc899bSmrgAC_SUBST([MISC_MAN_DIR]) 700245bc899bSmrgAC_SUBST([DRIVER_MAN_DIR]) 700345bc899bSmrgAC_SUBST([ADMIN_MAN_DIR]) 700445bc899bSmrg]) # XORG_MANPAGE_SECTIONS 700545bc899bSmrg 700645bc899bSmrg# XORG_CHECK_LINUXDOC 700745bc899bSmrg# ------------------- 700845bc899bSmrg# Minimum version: 1.0.0 700945bc899bSmrg# 701045bc899bSmrg# Defines the variable MAKE_TEXT if the necessary tools and 701145bc899bSmrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 701245bc899bSmrg# Whether or not the necessary tools and files are found can be checked 701345bc899bSmrg# with the AM_CONDITIONAL "BUILD_LINUXDOC" 701445bc899bSmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[ 701550f2e948Smrgif test x$XORG_SGML_PATH = x ; then 701650f2e948Smrg XORG_SGML_PATH=$prefix/share/sgml 701750f2e948Smrgfi 701850f2e948SmrgHAVE_DEFS_ENT= 701950f2e948Smrg 702050f2e948Smrgif test x"$cross_compiling" = x"yes" ; then 702150f2e948Smrg HAVE_DEFS_ENT=no 702250f2e948Smrgelse 702350f2e948Smrg AC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes]) 702450f2e948Smrgfi 702545bc899bSmrg 702645bc899bSmrgAC_PATH_PROG(LINUXDOC, linuxdoc) 702745bc899bSmrgAC_PATH_PROG(PS2PDF, ps2pdf) 702845bc899bSmrg 702945bc899bSmrgAC_MSG_CHECKING([Whether to build documentation]) 703045bc899bSmrg 703150f2e948Smrgif test x$HAVE_DEFS_ENT != x && test x$LINUXDOC != x ; then 703245bc899bSmrg BUILDDOC=yes 703345bc899bSmrgelse 703445bc899bSmrg BUILDDOC=no 703545bc899bSmrgfi 703645bc899bSmrg 703745bc899bSmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 703845bc899bSmrg 703945bc899bSmrgAC_MSG_RESULT([$BUILDDOC]) 704045bc899bSmrg 704145bc899bSmrgAC_MSG_CHECKING([Whether to build pdf documentation]) 704245bc899bSmrg 704350f2e948Smrgif test x$PS2PDF != x && test x$BUILD_PDFDOC != xno; then 704445bc899bSmrg BUILDPDFDOC=yes 704545bc899bSmrgelse 704645bc899bSmrg BUILDPDFDOC=no 704745bc899bSmrgfi 704845bc899bSmrg 704945bc899bSmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 705045bc899bSmrg 705145bc899bSmrgAC_MSG_RESULT([$BUILDPDFDOC]) 705245bc899bSmrg 705350f2e948SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt" 705450f2e948SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 705545bc899bSmrgMAKE_PDF="$PS2PDF" 705650f2e948SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 705745bc899bSmrg 705845bc899bSmrgAC_SUBST(MAKE_TEXT) 705945bc899bSmrgAC_SUBST(MAKE_PS) 706045bc899bSmrgAC_SUBST(MAKE_PDF) 706145bc899bSmrgAC_SUBST(MAKE_HTML) 706245bc899bSmrg]) # XORG_CHECK_LINUXDOC 706345bc899bSmrg 706450f2e948Smrg# XORG_CHECK_DOCBOOK 706550f2e948Smrg# ------------------- 706650f2e948Smrg# Minimum version: 1.0.0 706750f2e948Smrg# 706850f2e948Smrg# Checks for the ability to build output formats from SGML DocBook source. 706950f2e948Smrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 707050f2e948Smrg# indicates whether the necessary tools and files are found and, if set, 707150f2e948Smrg# $(MAKE_XXX) blah.sgml will produce blah.xxx. 707250f2e948SmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[ 707350f2e948Smrgif test x$XORG_SGML_PATH = x ; then 707450f2e948Smrg XORG_SGML_PATH=$prefix/share/sgml 707550f2e948Smrgfi 707650f2e948SmrgHAVE_DEFS_ENT= 707750f2e948SmrgBUILDTXTDOC=no 707850f2e948SmrgBUILDPDFDOC=no 707950f2e948SmrgBUILDPSDOC=no 708050f2e948SmrgBUILDHTMLDOC=no 708150f2e948Smrg 708250f2e948SmrgAC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes]) 708350f2e948Smrg 708450f2e948SmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps) 708550f2e948SmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 708650f2e948SmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html) 708750f2e948SmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt) 708850f2e948Smrg 708950f2e948SmrgAC_MSG_CHECKING([Whether to build text documentation]) 709050f2e948Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKTXT != x && 709150f2e948Smrg test x$BUILD_TXTDOC != xno; then 709250f2e948Smrg BUILDTXTDOC=yes 709350f2e948Smrgfi 709450f2e948SmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 709550f2e948SmrgAC_MSG_RESULT([$BUILDTXTDOC]) 709650f2e948Smrg 709750f2e948SmrgAC_MSG_CHECKING([Whether to build PDF documentation]) 709850f2e948Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPDF != x && 709950f2e948Smrg test x$BUILD_PDFDOC != xno; then 710050f2e948Smrg BUILDPDFDOC=yes 710150f2e948Smrgfi 710250f2e948SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 710350f2e948SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 710450f2e948Smrg 710550f2e948SmrgAC_MSG_CHECKING([Whether to build PostScript documentation]) 710650f2e948Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPS != x && 710750f2e948Smrg test x$BUILD_PSDOC != xno; then 710850f2e948Smrg BUILDPSDOC=yes 710950f2e948Smrgfi 711050f2e948SmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 711150f2e948SmrgAC_MSG_RESULT([$BUILDPSDOC]) 711250f2e948Smrg 711350f2e948SmrgAC_MSG_CHECKING([Whether to build HTML documentation]) 711450f2e948Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKHTML != x && 711550f2e948Smrg test x$BUILD_HTMLDOC != xno; then 711650f2e948Smrg BUILDHTMLDOC=yes 711750f2e948Smrgfi 711850f2e948SmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 711950f2e948SmrgAC_MSG_RESULT([$BUILDHTMLDOC]) 712050f2e948Smrg 712150f2e948SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 712250f2e948SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 712350f2e948SmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 712450f2e948SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 712550f2e948Smrg 712650f2e948SmrgAC_SUBST(MAKE_TEXT) 712750f2e948SmrgAC_SUBST(MAKE_PS) 712850f2e948SmrgAC_SUBST(MAKE_PDF) 712950f2e948SmrgAC_SUBST(MAKE_HTML) 713050f2e948Smrg]) # XORG_CHECK_DOCBOOK 713150f2e948Smrg 713245bc899bSmrg# XORG_CHECK_MALLOC_ZERO 713345bc899bSmrg# ---------------------- 713445bc899bSmrg# Minimum version: 1.0.0 713545bc899bSmrg# 713645bc899bSmrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 713745bc899bSmrg# malloc(0) returns NULL. Packages should add one of these cflags to 713845bc899bSmrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 713945bc899bSmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 714045bc899bSmrgAC_ARG_ENABLE(malloc0returnsnull, 714145bc899bSmrg AC_HELP_STRING([--enable-malloc0returnsnull], 714245bc899bSmrg [malloc(0) returns NULL (default: auto)]), 714345bc899bSmrg [MALLOC_ZERO_RETURNS_NULL=$enableval], 714445bc899bSmrg [MALLOC_ZERO_RETURNS_NULL=auto]) 714545bc899bSmrg 714645bc899bSmrgAC_MSG_CHECKING([whether malloc(0) returns NULL]) 714745bc899bSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 714845bc899bSmrg AC_RUN_IFELSE([ 714945bc899bSmrgchar *malloc(); 715045bc899bSmrgchar *realloc(); 715145bc899bSmrgchar *calloc(); 715245bc899bSmrgmain() { 715345bc899bSmrg char *m0, *r0, *c0, *p; 715445bc899bSmrg m0 = malloc(0); 715545bc899bSmrg p = malloc(10); 715645bc899bSmrg r0 = realloc(p,0); 715745bc899bSmrg c0 = calloc(0); 715845bc899bSmrg exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1); 715945bc899bSmrg}], 716045bc899bSmrg [MALLOC_ZERO_RETURNS_NULL=yes], 716145bc899bSmrg [MALLOC_ZERO_RETURNS_NULL=no]) 716245bc899bSmrgfi 716345bc899bSmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 716445bc899bSmrg 716545bc899bSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 716645bc899bSmrg MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 716745bc899bSmrg XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 716845bc899bSmrg XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 716945bc899bSmrgelse 717045bc899bSmrg MALLOC_ZERO_CFLAGS="" 717145bc899bSmrg XMALLOC_ZERO_CFLAGS="" 717245bc899bSmrg XTMALLOC_ZERO_CFLAGS="" 717345bc899bSmrgfi 717445bc899bSmrg 717545bc899bSmrgAC_SUBST([MALLOC_ZERO_CFLAGS]) 717645bc899bSmrgAC_SUBST([XMALLOC_ZERO_CFLAGS]) 717745bc899bSmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS]) 717845bc899bSmrg]) # XORG_CHECK_MALLOC_ZERO 717945bc899bSmrg 718045bc899bSmrg# XORG_WITH_LINT() 718145bc899bSmrg# ---------------- 718245bc899bSmrg# Minimum version: 1.1.0 718345bc899bSmrg# 718445bc899bSmrg# Sets up flags for source checkers such as lint and sparse if --with-lint 718545bc899bSmrg# is specified. (Use --with-lint=sparse for sparse.) 718645bc899bSmrg# Sets $LINT to name of source checker passed with --with-lint (default: lint) 718745bc899bSmrg# Sets $LINT_FLAGS to flags to pass to source checker 718845bc899bSmrg# Sets LINT automake conditional if enabled (default: disabled) 718945bc899bSmrg# 719045bc899bSmrgAC_DEFUN([XORG_WITH_LINT],[ 719145bc899bSmrg 719245bc899bSmrg# Allow checking code with lint, sparse, etc. 719345bc899bSmrgAC_ARG_WITH(lint, [AC_HELP_STRING([--with-lint], 719445bc899bSmrg [Use a lint-style source code checker (default: disabled)])], 719545bc899bSmrg [use_lint=$withval], [use_lint=no]) 719645bc899bSmrgif test "x$use_lint" = "xyes" ; then 719745bc899bSmrg LINT="lint" 719845bc899bSmrgelse 719945bc899bSmrg LINT="$use_lint" 720045bc899bSmrgfi 720145bc899bSmrgif test "x$LINT_FLAGS" = "x" -a "x$LINT" != "xno" ; then 720245bc899bSmrg case $LINT in 720345bc899bSmrg lint|*/lint) 720445bc899bSmrg case $host_os in 720545bc899bSmrg solaris*) 720645bc899bSmrg LINT_FLAGS="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 720745bc899bSmrg ;; 720845bc899bSmrg esac 720945bc899bSmrg ;; 721045bc899bSmrg esac 721145bc899bSmrgfi 721245bc899bSmrg 721345bc899bSmrgAC_SUBST(LINT) 721445bc899bSmrgAC_SUBST(LINT_FLAGS) 721545bc899bSmrgAM_CONDITIONAL(LINT, [test x$LINT != xno]) 721645bc899bSmrg 721745bc899bSmrg]) # XORG_WITH_LINT 721845bc899bSmrg 721945bc899bSmrg# XORG_LINT_LIBRARY(LIBNAME) 722045bc899bSmrg# -------------------------- 722145bc899bSmrg# Minimum version: 1.1.0 722245bc899bSmrg# 722345bc899bSmrg# Sets up flags for building lint libraries for checking programs that call 722445bc899bSmrg# functions in the library. 722545bc899bSmrg# Disabled by default, enable with --enable-lint-library 722645bc899bSmrg# Sets: 722745bc899bSmrg# @LINTLIB@ - name of lint library file to make 722845bc899bSmrg# MAKE_LINT_LIB - automake conditional 722945bc899bSmrg# 723045bc899bSmrg 723145bc899bSmrgAC_DEFUN([XORG_LINT_LIBRARY],[ 723245bc899bSmrgAC_REQUIRE([XORG_WITH_LINT]) 723345bc899bSmrg# Build lint "library" for more indepth checks of programs calling this library 723445bc899bSmrgAC_ARG_ENABLE(lint-library, [AC_HELP_STRING([--enable-lint-library], 723545bc899bSmrg [Create lint library (default: disabled)])], 723645bc899bSmrg [make_lint_lib=$enableval], [make_lint_lib=no]) 723745bc899bSmrgif test "x$make_lint_lib" != "xno" ; then 723845bc899bSmrg if test "x$LINT" = "xno" ; then 723945bc899bSmrg AC_MSG_ERROR([Cannot make lint library without --with-lint]) 724045bc899bSmrg fi 724145bc899bSmrg if test "x$make_lint_lib" = "xyes" ; then 724245bc899bSmrg LINTLIB=llib-l$1.ln 724345bc899bSmrg else 724445bc899bSmrg LINTLIB=$make_lint_lib 724545bc899bSmrg fi 724645bc899bSmrgfi 724745bc899bSmrgAC_SUBST(LINTLIB) 724845bc899bSmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 724945bc899bSmrg 725045bc899bSmrg]) # XORG_LINT_LIBRARY 725145bc899bSmrg 725250f2e948Smrg# XORG_CWARNFLAGS 725350f2e948Smrg# --------------- 725450f2e948Smrg# Minimum version: 1.2.0 725550f2e948Smrg# 725650f2e948Smrg# Defines CWARNFLAGS to enable C compiler warnings. 725750f2e948Smrg# 725850f2e948SmrgAC_DEFUN([XORG_CWARNFLAGS], [ 725950f2e948SmrgAC_REQUIRE([AC_PROG_CC]) 726050f2e948Smrgif test "x$GCC" = xyes ; then 726150f2e948Smrg CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \ 726250f2e948Smrg-Wmissing-declarations -Wnested-externs -fno-strict-aliasing \ 726350f2e948Smrg-Wbad-function-cast" 726450f2e948Smrg case `gcc -dumpversion` in 726550f2e948Smrg 3.4.* | 4.*) 726650f2e948Smrg CWARNFLAGS+=" -Wold-style-definition -Wdeclaration-after-statement" 726750f2e948Smrg ;; 726850f2e948Smrg esac 726950f2e948Smrgelse 727050f2e948Smrg AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 727150f2e948Smrg if test "x$SUNCC" = "xyes"; then 727250f2e948Smrg CWARNFLAGS="-v" 727350f2e948Smrg fi 727450f2e948Smrgfi 727550f2e948SmrgAC_SUBST(CWARNFLAGS) 727650f2e948Smrg]) # XORG_CWARNFLAGS 727750f2e948Smrgdnl Copyright 2005 Red Hat, Inc 727850f2e948Smrgdnl 727950f2e948Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its 728050f2e948Smrgdnl documentation for any purpose is hereby granted without fee, provided that 728150f2e948Smrgdnl the above copyright notice appear in all copies and that both that 728250f2e948Smrgdnl copyright notice and this permission notice appear in supporting 728350f2e948Smrgdnl documentation. 728450f2e948Smrgdnl 728550f2e948Smrgdnl The above copyright notice and this permission notice shall be included 728650f2e948Smrgdnl in all copies or substantial portions of the Software. 728750f2e948Smrgdnl 728850f2e948Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 728950f2e948Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 729050f2e948Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 729150f2e948Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 729250f2e948Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 729350f2e948Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 729450f2e948Smrgdnl OTHER DEALINGS IN THE SOFTWARE. 729550f2e948Smrgdnl 729650f2e948Smrgdnl Except as contained in this notice, the name of the copyright holders shall 729750f2e948Smrgdnl not be used in advertising or otherwise to promote the sale, use or 729850f2e948Smrgdnl other dealings in this Software without prior written authorization 729950f2e948Smrgdnl from the copyright holders. 730050f2e948Smrgdnl 730150f2e948Smrg 730250f2e948Smrg# XORG_RELEASE_VERSION 730350f2e948Smrg# -------------------- 730450f2e948Smrg# Adds --with/without-release-string and changes the PACKAGE and 730550f2e948Smrg# PACKAGE_TARNAME to use "$PACKAGE{_TARNAME}-$RELEASE_VERSION". If 730650f2e948Smrg# no option is given, PACKAGE and PACKAGE_TARNAME are unchanged. Also 730750f2e948Smrg# defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 730850f2e948Smrg 730950f2e948SmrgAC_DEFUN([XORG_RELEASE_VERSION],[ 731050f2e948Smrg AC_ARG_WITH(release-version, 731150f2e948Smrg AC_HELP_STRING([--with-release-version=STRING], 731250f2e948Smrg [Use release version string in package name]), 731350f2e948Smrg [RELEASE_VERSION="$withval"], 731450f2e948Smrg [RELEASE_VERSION=""]) 731550f2e948Smrg if test "x$RELEASE_VERSION" != "x"; then 731650f2e948Smrg PACKAGE="$PACKAGE-$RELEASE_VERSION" 731750f2e948Smrg PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION" 731850f2e948Smrg AC_MSG_NOTICE([Building with package name set to $PACKAGE]) 731950f2e948Smrg fi 732050f2e948Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 732150f2e948Smrg [`echo $PACKAGE_VERSION | cut -d . -f 1`], 732250f2e948Smrg [Major version of this package]) 732350f2e948Smrg PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 732450f2e948Smrg if test "x$PVM" = "x"; then 732550f2e948Smrg PVM="0" 732650f2e948Smrg fi 732750f2e948Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 732850f2e948Smrg [$PVM], 732950f2e948Smrg [Minor version of this package]) 733050f2e948Smrg PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 733150f2e948Smrg if test "x$PVP" = "x"; then 733250f2e948Smrg PVP="0" 733350f2e948Smrg fi 733450f2e948Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 733550f2e948Smrg [$PVP], 733650f2e948Smrg [Patch version of this package]) 733750f2e948Smrg]) 733850f2e948Smrg 733950f2e948Smrg# XORG_CHANGELOG() 734050f2e948Smrg# ---------------- 734150f2e948Smrg# Minimum version: 1.2.0 734250f2e948Smrg# 734350f2e948Smrg# Defines the variable CHANGELOG_CMD as the command to generate 734450f2e948Smrg# ChangeLog from git. 734550f2e948Smrg# 734650f2e948Smrg# Arrange that distcleancheck ignores ChangeLog left over by distclean. 734750f2e948Smrg# 734850f2e948SmrgAC_DEFUN([XORG_CHANGELOG], [ 734950f2e948SmrgCHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > .changelog.tmp && \ 735050f2e948Smrgmv .changelog.tmp ChangeLog) || (rm -f .changelog.tmp; touch ChangeLog; \ 735150f2e948Smrgecho 'git directory not found: installing possibly empty changelog.' >&2)" 735250f2e948SmrgAC_SUBST([CHANGELOG_CMD]) 735350f2e948SmrgAC_SUBST([distcleancheck_listfiles], ['find . -type f ! -name ChangeLog -print']) 735450f2e948Smrg]) # XORG_CHANGELOG 735550f2e948Smrg 735650f2e948Smrg# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. 735745bc899bSmrg# 735845bc899bSmrg# This file is free software; the Free Software Foundation 735945bc899bSmrg# gives unlimited permission to copy and/or distribute it, 736045bc899bSmrg# with or without modifications, as long as this notice is preserved. 736145bc899bSmrg 736245bc899bSmrg# AM_AUTOMAKE_VERSION(VERSION) 736345bc899bSmrg# ---------------------------- 736445bc899bSmrg# Automake X.Y traces this macro to ensure aclocal.m4 has been 736545bc899bSmrg# generated from the m4 files accompanying Automake X.Y. 736650f2e948Smrg# (This private macro should not be called outside this file.) 736750f2e948SmrgAC_DEFUN([AM_AUTOMAKE_VERSION], 73683a925b30Smrg[am__api_version='1.11' 736950f2e948Smrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 737050f2e948Smrgdnl require some minimum version. Point them to the right macro. 73713a925b30Smrgm4_if([$1], [1.11], [], 737250f2e948Smrg [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 737350f2e948Smrg]) 737450f2e948Smrg 737550f2e948Smrg# _AM_AUTOCONF_VERSION(VERSION) 737650f2e948Smrg# ----------------------------- 737750f2e948Smrg# aclocal traces this macro to find the Autoconf version. 737850f2e948Smrg# This is a private macro too. Using m4_define simplifies 737950f2e948Smrg# the logic in aclocal, which can simply ignore this definition. 738050f2e948Smrgm4_define([_AM_AUTOCONF_VERSION], []) 738145bc899bSmrg 738245bc899bSmrg# AM_SET_CURRENT_AUTOMAKE_VERSION 738345bc899bSmrg# ------------------------------- 738450f2e948Smrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 738550f2e948Smrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 738645bc899bSmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 73873a925b30Smrg[AM_AUTOMAKE_VERSION([1.11])dnl 738850f2e948Smrgm4_ifndef([AC_AUTOCONF_VERSION], 738950f2e948Smrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 739050f2e948Smrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 739145bc899bSmrg 739245bc899bSmrg# AM_AUX_DIR_EXPAND -*- Autoconf -*- 739345bc899bSmrg 739445bc899bSmrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 739545bc899bSmrg# 739645bc899bSmrg# This file is free software; the Free Software Foundation 739745bc899bSmrg# gives unlimited permission to copy and/or distribute it, 739845bc899bSmrg# with or without modifications, as long as this notice is preserved. 739945bc899bSmrg 740045bc899bSmrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 740145bc899bSmrg# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to 740245bc899bSmrg# `$srcdir', `$srcdir/..', or `$srcdir/../..'. 740345bc899bSmrg# 740445bc899bSmrg# Of course, Automake must honor this variable whenever it calls a 740545bc899bSmrg# tool from the auxiliary directory. The problem is that $srcdir (and 740645bc899bSmrg# therefore $ac_aux_dir as well) can be either absolute or relative, 740745bc899bSmrg# depending on how configure is run. This is pretty annoying, since 740845bc899bSmrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top 740945bc899bSmrg# source directory, any form will work fine, but in subdirectories a 741045bc899bSmrg# relative path needs to be adjusted first. 741145bc899bSmrg# 741245bc899bSmrg# $ac_aux_dir/missing 741345bc899bSmrg# fails when called from a subdirectory if $ac_aux_dir is relative 741445bc899bSmrg# $top_srcdir/$ac_aux_dir/missing 741545bc899bSmrg# fails if $ac_aux_dir is absolute, 741645bc899bSmrg# fails when called from a subdirectory in a VPATH build with 741745bc899bSmrg# a relative $ac_aux_dir 741845bc899bSmrg# 741945bc899bSmrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 742045bc899bSmrg# are both prefixed by $srcdir. In an in-source build this is usually 742145bc899bSmrg# harmless because $srcdir is `.', but things will broke when you 742245bc899bSmrg# start a VPATH build or use an absolute $srcdir. 742345bc899bSmrg# 742445bc899bSmrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 742545bc899bSmrg# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 742645bc899bSmrg# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 742745bc899bSmrg# and then we would define $MISSING as 742845bc899bSmrg# MISSING="\${SHELL} $am_aux_dir/missing" 742945bc899bSmrg# This will work as long as MISSING is not called from configure, because 743045bc899bSmrg# unfortunately $(top_srcdir) has no meaning in configure. 743145bc899bSmrg# However there are other variables, like CC, which are often used in 743245bc899bSmrg# configure, and could therefore not use this "fixed" $ac_aux_dir. 743345bc899bSmrg# 743445bc899bSmrg# Another solution, used here, is to always expand $ac_aux_dir to an 743545bc899bSmrg# absolute PATH. The drawback is that using absolute paths prevent a 743645bc899bSmrg# configured tree to be moved without reconfiguration. 743745bc899bSmrg 743845bc899bSmrgAC_DEFUN([AM_AUX_DIR_EXPAND], 743945bc899bSmrg[dnl Rely on autoconf to set up CDPATH properly. 744045bc899bSmrgAC_PREREQ([2.50])dnl 744145bc899bSmrg# expand $ac_aux_dir to an absolute path 744245bc899bSmrgam_aux_dir=`cd $ac_aux_dir && pwd` 744345bc899bSmrg]) 744445bc899bSmrg 744545bc899bSmrg# AM_CONDITIONAL -*- Autoconf -*- 744645bc899bSmrg 74473a925b30Smrg# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 744845bc899bSmrg# Free Software Foundation, Inc. 744945bc899bSmrg# 745045bc899bSmrg# This file is free software; the Free Software Foundation 745145bc899bSmrg# gives unlimited permission to copy and/or distribute it, 745245bc899bSmrg# with or without modifications, as long as this notice is preserved. 745345bc899bSmrg 74543a925b30Smrg# serial 9 745545bc899bSmrg 745645bc899bSmrg# AM_CONDITIONAL(NAME, SHELL-CONDITION) 745745bc899bSmrg# ------------------------------------- 745845bc899bSmrg# Define a conditional. 745945bc899bSmrgAC_DEFUN([AM_CONDITIONAL], 746045bc899bSmrg[AC_PREREQ(2.52)dnl 746145bc899bSmrg ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 746245bc899bSmrg [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 746350f2e948SmrgAC_SUBST([$1_TRUE])dnl 746450f2e948SmrgAC_SUBST([$1_FALSE])dnl 746550f2e948Smrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl 746650f2e948Smrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl 74673a925b30Smrgm4_define([_AM_COND_VALUE_$1], [$2])dnl 746845bc899bSmrgif $2; then 746945bc899bSmrg $1_TRUE= 747045bc899bSmrg $1_FALSE='#' 747145bc899bSmrgelse 747245bc899bSmrg $1_TRUE='#' 747345bc899bSmrg $1_FALSE= 747445bc899bSmrgfi 747545bc899bSmrgAC_CONFIG_COMMANDS_PRE( 747645bc899bSmrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 747745bc899bSmrg AC_MSG_ERROR([[conditional "$1" was never defined. 747845bc899bSmrgUsually this means the macro was only invoked conditionally.]]) 747945bc899bSmrgfi])]) 748045bc899bSmrg 74813a925b30Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009 748245bc899bSmrg# Free Software Foundation, Inc. 748345bc899bSmrg# 748445bc899bSmrg# This file is free software; the Free Software Foundation 748545bc899bSmrg# gives unlimited permission to copy and/or distribute it, 748645bc899bSmrg# with or without modifications, as long as this notice is preserved. 748745bc899bSmrg 74883a925b30Smrg# serial 10 748945bc899bSmrg 749045bc899bSmrg# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be 749145bc899bSmrg# written in clear, in which case automake, when reading aclocal.m4, 749245bc899bSmrg# will think it sees a *use*, and therefore will trigger all it's 749345bc899bSmrg# C support machinery. Also note that it means that autoscan, seeing 749445bc899bSmrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 749545bc899bSmrg 749645bc899bSmrg 749745bc899bSmrg# _AM_DEPENDENCIES(NAME) 749845bc899bSmrg# ---------------------- 749945bc899bSmrg# See how the compiler implements dependency checking. 750045bc899bSmrg# NAME is "CC", "CXX", "GCJ", or "OBJC". 750145bc899bSmrg# We try a few techniques and use that to set a single cache variable. 750245bc899bSmrg# 750345bc899bSmrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 750445bc899bSmrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 750545bc899bSmrg# dependency, and given that the user is not expected to run this macro, 750645bc899bSmrg# just rely on AC_PROG_CC. 750745bc899bSmrgAC_DEFUN([_AM_DEPENDENCIES], 750845bc899bSmrg[AC_REQUIRE([AM_SET_DEPDIR])dnl 750945bc899bSmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 751045bc899bSmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl 751145bc899bSmrgAC_REQUIRE([AM_DEP_TRACK])dnl 751245bc899bSmrg 751345bc899bSmrgifelse([$1], CC, [depcc="$CC" am_compiler_list=], 751445bc899bSmrg [$1], CXX, [depcc="$CXX" am_compiler_list=], 751545bc899bSmrg [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 751650f2e948Smrg [$1], UPC, [depcc="$UPC" am_compiler_list=], 751745bc899bSmrg [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 751845bc899bSmrg [depcc="$$1" am_compiler_list=]) 751945bc899bSmrg 752045bc899bSmrgAC_CACHE_CHECK([dependency style of $depcc], 752145bc899bSmrg [am_cv_$1_dependencies_compiler_type], 752245bc899bSmrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 752345bc899bSmrg # We make a subdir and do the tests there. Otherwise we can end up 752445bc899bSmrg # making bogus files that we don't know about and never remove. For 752545bc899bSmrg # instance it was reported that on HP-UX the gcc test will end up 752645bc899bSmrg # making a dummy file named `D' -- because `-MD' means `put the output 752745bc899bSmrg # in D'. 752845bc899bSmrg mkdir conftest.dir 752945bc899bSmrg # Copy depcomp to subdir because otherwise we won't find it if we're 753045bc899bSmrg # using a relative directory. 753145bc899bSmrg cp "$am_depcomp" conftest.dir 753245bc899bSmrg cd conftest.dir 753345bc899bSmrg # We will build objects and dependencies in a subdirectory because 753445bc899bSmrg # it helps to detect inapplicable dependency modes. For instance 753545bc899bSmrg # both Tru64's cc and ICC support -MD to output dependencies as a 753645bc899bSmrg # side effect of compilation, but ICC will put the dependencies in 753745bc899bSmrg # the current directory while Tru64 will put them in the object 753845bc899bSmrg # directory. 753945bc899bSmrg mkdir sub 754045bc899bSmrg 754145bc899bSmrg am_cv_$1_dependencies_compiler_type=none 754245bc899bSmrg if test "$am_compiler_list" = ""; then 754345bc899bSmrg am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 754445bc899bSmrg fi 75453a925b30Smrg am__universal=false 75463a925b30Smrg m4_case([$1], [CC], 75473a925b30Smrg [case " $depcc " in #( 75483a925b30Smrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 75493a925b30Smrg esac], 75503a925b30Smrg [CXX], 75513a925b30Smrg [case " $depcc " in #( 75523a925b30Smrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 75533a925b30Smrg esac]) 75543a925b30Smrg 755545bc899bSmrg for depmode in $am_compiler_list; do 755645bc899bSmrg # Setup a source with many dependencies, because some compilers 755745bc899bSmrg # like to wrap large dependency lists on column 80 (with \), and 755845bc899bSmrg # we should not choose a depcomp mode which is confused by this. 755945bc899bSmrg # 756045bc899bSmrg # We need to recreate these files for each test, as the compiler may 756145bc899bSmrg # overwrite some of them when testing with obscure command lines. 756245bc899bSmrg # This happens at least with the AIX C compiler. 756345bc899bSmrg : > sub/conftest.c 756445bc899bSmrg for i in 1 2 3 4 5 6; do 756545bc899bSmrg echo '#include "conftst'$i'.h"' >> sub/conftest.c 756645bc899bSmrg # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with 756745bc899bSmrg # Solaris 8's {/usr,}/bin/sh. 756845bc899bSmrg touch sub/conftst$i.h 756945bc899bSmrg done 757045bc899bSmrg echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 757145bc899bSmrg 75723a925b30Smrg # We check with `-c' and `-o' for the sake of the "dashmstdout" 75733a925b30Smrg # mode. It turns out that the SunPro C++ compiler does not properly 75743a925b30Smrg # handle `-M -o', and we need to detect this. Also, some Intel 75753a925b30Smrg # versions had trouble with output in subdirs 75763a925b30Smrg am__obj=sub/conftest.${OBJEXT-o} 75773a925b30Smrg am__minus_obj="-o $am__obj" 757845bc899bSmrg case $depmode in 75793a925b30Smrg gcc) 75803a925b30Smrg # This depmode causes a compiler race in universal mode. 75813a925b30Smrg test "$am__universal" = false || continue 75823a925b30Smrg ;; 758345bc899bSmrg nosideeffect) 758445bc899bSmrg # after this tag, mechanisms are not by side-effect, so they'll 758545bc899bSmrg # only be used when explicitly requested 758645bc899bSmrg if test "x$enable_dependency_tracking" = xyes; then 758745bc899bSmrg continue 758845bc899bSmrg else 758945bc899bSmrg break 759045bc899bSmrg fi 759145bc899bSmrg ;; 75923a925b30Smrg msvisualcpp | msvcmsys) 75933a925b30Smrg # This compiler won't grok `-c -o', but also, the minuso test has 75943a925b30Smrg # not run yet. These depmodes are late enough in the game, and 75953a925b30Smrg # so weak that their functioning should not be impacted. 75963a925b30Smrg am__obj=conftest.${OBJEXT-o} 75973a925b30Smrg am__minus_obj= 75983a925b30Smrg ;; 759945bc899bSmrg none) break ;; 760045bc899bSmrg esac 760145bc899bSmrg if depmode=$depmode \ 76023a925b30Smrg source=sub/conftest.c object=$am__obj \ 760345bc899bSmrg depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 76043a925b30Smrg $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ 760545bc899bSmrg >/dev/null 2>conftest.err && 760650f2e948Smrg grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 760745bc899bSmrg grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 76083a925b30Smrg grep $am__obj sub/conftest.Po > /dev/null 2>&1 && 760945bc899bSmrg ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 761045bc899bSmrg # icc doesn't choke on unknown options, it will just issue warnings 761145bc899bSmrg # or remarks (even with -Werror). So we grep stderr for any message 761245bc899bSmrg # that says an option was ignored or not supported. 761345bc899bSmrg # When given -MP, icc 7.0 and 7.1 complain thusly: 761445bc899bSmrg # icc: Command line warning: ignoring option '-M'; no argument required 761545bc899bSmrg # The diagnosis changed in icc 8.0: 761645bc899bSmrg # icc: Command line remark: option '-MP' not supported 761745bc899bSmrg if (grep 'ignoring option' conftest.err || 761845bc899bSmrg grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 761945bc899bSmrg am_cv_$1_dependencies_compiler_type=$depmode 762045bc899bSmrg break 762145bc899bSmrg fi 762245bc899bSmrg fi 762345bc899bSmrg done 762445bc899bSmrg 762545bc899bSmrg cd .. 762645bc899bSmrg rm -rf conftest.dir 762745bc899bSmrgelse 762845bc899bSmrg am_cv_$1_dependencies_compiler_type=none 762945bc899bSmrgfi 763045bc899bSmrg]) 763145bc899bSmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 763245bc899bSmrgAM_CONDITIONAL([am__fastdep$1], [ 763345bc899bSmrg test "x$enable_dependency_tracking" != xno \ 763445bc899bSmrg && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 763545bc899bSmrg]) 763645bc899bSmrg 763745bc899bSmrg 763845bc899bSmrg# AM_SET_DEPDIR 763945bc899bSmrg# ------------- 764045bc899bSmrg# Choose a directory name for dependency files. 764145bc899bSmrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES 764245bc899bSmrgAC_DEFUN([AM_SET_DEPDIR], 764345bc899bSmrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 764445bc899bSmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 764545bc899bSmrg]) 764645bc899bSmrg 764745bc899bSmrg 764845bc899bSmrg# AM_DEP_TRACK 764945bc899bSmrg# ------------ 765045bc899bSmrgAC_DEFUN([AM_DEP_TRACK], 765145bc899bSmrg[AC_ARG_ENABLE(dependency-tracking, 765245bc899bSmrg[ --disable-dependency-tracking speeds up one-time build 765345bc899bSmrg --enable-dependency-tracking do not reject slow dependency extractors]) 765445bc899bSmrgif test "x$enable_dependency_tracking" != xno; then 765545bc899bSmrg am_depcomp="$ac_aux_dir/depcomp" 765645bc899bSmrg AMDEPBACKSLASH='\' 765745bc899bSmrgfi 765845bc899bSmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 765950f2e948SmrgAC_SUBST([AMDEPBACKSLASH])dnl 766050f2e948Smrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 766145bc899bSmrg]) 766245bc899bSmrg 766345bc899bSmrg# Generate code to set up dependency tracking. -*- Autoconf -*- 766445bc899bSmrg 766550f2e948Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 766645bc899bSmrg# Free Software Foundation, Inc. 766745bc899bSmrg# 766845bc899bSmrg# This file is free software; the Free Software Foundation 766945bc899bSmrg# gives unlimited permission to copy and/or distribute it, 767045bc899bSmrg# with or without modifications, as long as this notice is preserved. 767145bc899bSmrg 76723a925b30Smrg#serial 5 767345bc899bSmrg 767445bc899bSmrg# _AM_OUTPUT_DEPENDENCY_COMMANDS 767545bc899bSmrg# ------------------------------ 767645bc899bSmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 76773a925b30Smrg[{ 76783a925b30Smrg # Autoconf 2.62 quotes --file arguments for eval, but not when files 76793a925b30Smrg # are listed without --file. Let's play safe and only enable the eval 76803a925b30Smrg # if we detect the quoting. 76813a925b30Smrg case $CONFIG_FILES in 76823a925b30Smrg *\'*) eval set x "$CONFIG_FILES" ;; 76833a925b30Smrg *) set x $CONFIG_FILES ;; 76843a925b30Smrg esac 76853a925b30Smrg shift 76863a925b30Smrg for mf 76873a925b30Smrg do 76883a925b30Smrg # Strip MF so we end up with the name of the file. 76893a925b30Smrg mf=`echo "$mf" | sed -e 's/:.*$//'` 76903a925b30Smrg # Check whether this is an Automake generated Makefile or not. 76913a925b30Smrg # We used to match only the files named `Makefile.in', but 76923a925b30Smrg # some people rename them; so instead we look at the file content. 76933a925b30Smrg # Grep'ing the first line is not enough: some people post-process 76943a925b30Smrg # each Makefile.in and add a new line on top of each file to say so. 76953a925b30Smrg # Grep'ing the whole file is not good either: AIX grep has a line 76963a925b30Smrg # limit of 2048, but all sed's we know have understand at least 4000. 76973a925b30Smrg if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then 76983a925b30Smrg dirpart=`AS_DIRNAME("$mf")` 76993a925b30Smrg else 77003a925b30Smrg continue 77013a925b30Smrg fi 77023a925b30Smrg # Extract the definition of DEPDIR, am__include, and am__quote 77033a925b30Smrg # from the Makefile without running `make'. 77043a925b30Smrg DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` 77053a925b30Smrg test -z "$DEPDIR" && continue 77063a925b30Smrg am__include=`sed -n 's/^am__include = //p' < "$mf"` 77073a925b30Smrg test -z "am__include" && continue 77083a925b30Smrg am__quote=`sed -n 's/^am__quote = //p' < "$mf"` 77093a925b30Smrg # When using ansi2knr, U may be empty or an underscore; expand it 77103a925b30Smrg U=`sed -n 's/^U = //p' < "$mf"` 77113a925b30Smrg # Find all dependency output files, they are included files with 77123a925b30Smrg # $(DEPDIR) in their names. We invoke sed twice because it is the 77133a925b30Smrg # simplest approach to changing $(DEPDIR) to its actual value in the 77143a925b30Smrg # expansion. 77153a925b30Smrg for file in `sed -n " 77163a925b30Smrg s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ 77173a925b30Smrg sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do 77183a925b30Smrg # Make sure the directory exists. 77193a925b30Smrg test -f "$dirpart/$file" && continue 77203a925b30Smrg fdir=`AS_DIRNAME(["$file"])` 77213a925b30Smrg AS_MKDIR_P([$dirpart/$fdir]) 77223a925b30Smrg # echo "creating $dirpart/$file" 77233a925b30Smrg echo '# dummy' > "$dirpart/$file" 77243a925b30Smrg done 772545bc899bSmrg done 77263a925b30Smrg} 772745bc899bSmrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS 772845bc899bSmrg 772945bc899bSmrg 773045bc899bSmrg# AM_OUTPUT_DEPENDENCY_COMMANDS 773145bc899bSmrg# ----------------------------- 773245bc899bSmrg# This macro should only be invoked once -- use via AC_REQUIRE. 773345bc899bSmrg# 773445bc899bSmrg# This code is only required when automatic dependency tracking 773545bc899bSmrg# is enabled. FIXME. This creates each `.P' file that we will 773645bc899bSmrg# need in order to bootstrap the dependency handling code. 773745bc899bSmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 773845bc899bSmrg[AC_CONFIG_COMMANDS([depfiles], 773945bc899bSmrg [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 774045bc899bSmrg [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 774145bc899bSmrg]) 774245bc899bSmrg 774345bc899bSmrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 774445bc899bSmrg# Free Software Foundation, Inc. 774545bc899bSmrg# 774645bc899bSmrg# This file is free software; the Free Software Foundation 774745bc899bSmrg# gives unlimited permission to copy and/or distribute it, 774845bc899bSmrg# with or without modifications, as long as this notice is preserved. 774945bc899bSmrg 775045bc899bSmrg# serial 8 775145bc899bSmrg 775245bc899bSmrg# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. 775345bc899bSmrgAU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) 775445bc899bSmrg 775545bc899bSmrg# Do all the work for Automake. -*- Autoconf -*- 775645bc899bSmrg 775750f2e948Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 77583a925b30Smrg# 2005, 2006, 2008, 2009 Free Software Foundation, Inc. 775945bc899bSmrg# 776045bc899bSmrg# This file is free software; the Free Software Foundation 776145bc899bSmrg# gives unlimited permission to copy and/or distribute it, 776245bc899bSmrg# with or without modifications, as long as this notice is preserved. 776345bc899bSmrg 77643a925b30Smrg# serial 16 776545bc899bSmrg 776645bc899bSmrg# This macro actually does too much. Some checks are only needed if 776745bc899bSmrg# your package does certain things. But this isn't really a big deal. 776845bc899bSmrg 776945bc899bSmrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 777045bc899bSmrg# AM_INIT_AUTOMAKE([OPTIONS]) 777145bc899bSmrg# ----------------------------------------------- 777245bc899bSmrg# The call with PACKAGE and VERSION arguments is the old style 777345bc899bSmrg# call (pre autoconf-2.50), which is being phased out. PACKAGE 777445bc899bSmrg# and VERSION should now be passed to AC_INIT and removed from 777545bc899bSmrg# the call to AM_INIT_AUTOMAKE. 777645bc899bSmrg# We support both call styles for the transition. After 777745bc899bSmrg# the next Automake release, Autoconf can make the AC_INIT 777845bc899bSmrg# arguments mandatory, and then we can depend on a new Autoconf 777945bc899bSmrg# release and drop the old call support. 778045bc899bSmrgAC_DEFUN([AM_INIT_AUTOMAKE], 77813a925b30Smrg[AC_PREREQ([2.62])dnl 778245bc899bSmrgdnl Autoconf wants to disallow AM_ names. We explicitly allow 778345bc899bSmrgdnl the ones we care about. 778445bc899bSmrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 778545bc899bSmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 778645bc899bSmrgAC_REQUIRE([AC_PROG_INSTALL])dnl 778750f2e948Smrgif test "`cd $srcdir && pwd`" != "`pwd`"; then 778850f2e948Smrg # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 778950f2e948Smrg # is not polluted with repeated "-I." 779050f2e948Smrg AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 779150f2e948Smrg # test to see if srcdir already configured 779250f2e948Smrg if test -f $srcdir/config.status; then 779350f2e948Smrg AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 779450f2e948Smrg fi 779545bc899bSmrgfi 779645bc899bSmrg 779745bc899bSmrg# test whether we have cygpath 779845bc899bSmrgif test -z "$CYGPATH_W"; then 779945bc899bSmrg if (cygpath --version) >/dev/null 2>/dev/null; then 780045bc899bSmrg CYGPATH_W='cygpath -w' 780145bc899bSmrg else 780245bc899bSmrg CYGPATH_W=echo 780345bc899bSmrg fi 780445bc899bSmrgfi 780545bc899bSmrgAC_SUBST([CYGPATH_W]) 780645bc899bSmrg 780745bc899bSmrg# Define the identity of the package. 780845bc899bSmrgdnl Distinguish between old-style and new-style calls. 780945bc899bSmrgm4_ifval([$2], 781045bc899bSmrg[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 781145bc899bSmrg AC_SUBST([PACKAGE], [$1])dnl 781245bc899bSmrg AC_SUBST([VERSION], [$2])], 781345bc899bSmrg[_AM_SET_OPTIONS([$1])dnl 781450f2e948Smrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 781550f2e948Smrgm4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, 781650f2e948Smrg [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 781745bc899bSmrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 781845bc899bSmrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 781945bc899bSmrg 782045bc899bSmrg_AM_IF_OPTION([no-define],, 782145bc899bSmrg[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) 782245bc899bSmrg AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl 782345bc899bSmrg 782445bc899bSmrg# Some tools Automake needs. 782545bc899bSmrgAC_REQUIRE([AM_SANITY_CHECK])dnl 782645bc899bSmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl 782745bc899bSmrgAM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) 782845bc899bSmrgAM_MISSING_PROG(AUTOCONF, autoconf) 782945bc899bSmrgAM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) 783045bc899bSmrgAM_MISSING_PROG(AUTOHEADER, autoheader) 783145bc899bSmrgAM_MISSING_PROG(MAKEINFO, makeinfo) 78323a925b30SmrgAC_REQUIRE([AM_PROG_INSTALL_SH])dnl 78333a925b30SmrgAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 783445bc899bSmrgAC_REQUIRE([AM_PROG_MKDIR_P])dnl 783545bc899bSmrg# We need awk for the "check" target. The system "awk" is bad on 783645bc899bSmrg# some platforms. 783745bc899bSmrgAC_REQUIRE([AC_PROG_AWK])dnl 783845bc899bSmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl 783945bc899bSmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl 784045bc899bSmrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 78413a925b30Smrg [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 78423a925b30Smrg [_AM_PROG_TAR([v7])])]) 784345bc899bSmrg_AM_IF_OPTION([no-dependencies],, 784445bc899bSmrg[AC_PROVIDE_IFELSE([AC_PROG_CC], 78453a925b30Smrg [_AM_DEPENDENCIES(CC)], 78463a925b30Smrg [define([AC_PROG_CC], 78473a925b30Smrg defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl 784845bc899bSmrgAC_PROVIDE_IFELSE([AC_PROG_CXX], 78493a925b30Smrg [_AM_DEPENDENCIES(CXX)], 78503a925b30Smrg [define([AC_PROG_CXX], 78513a925b30Smrg defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl 785250f2e948SmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC], 78533a925b30Smrg [_AM_DEPENDENCIES(OBJC)], 78543a925b30Smrg [define([AC_PROG_OBJC], 78553a925b30Smrg defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl 785645bc899bSmrg]) 78573a925b30Smrg_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl 78583a925b30Smrgdnl The `parallel-tests' driver may need to know about EXEEXT, so add the 78593a925b30Smrgdnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro 78603a925b30Smrgdnl is hooked onto _AC_COMPILER_EXEEXT early, see below. 78613a925b30SmrgAC_CONFIG_COMMANDS_PRE(dnl 78623a925b30Smrg[m4_provide_if([_AM_COMPILER_EXEEXT], 78633a925b30Smrg [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 786445bc899bSmrg]) 786545bc899bSmrg 78663a925b30Smrgdnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 78673a925b30Smrgdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 78683a925b30Smrgdnl mangled by Autoconf and run in a shell conditional statement. 78693a925b30Smrgm4_define([_AC_COMPILER_EXEEXT], 78703a925b30Smrgm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) 78713a925b30Smrg 787245bc899bSmrg 787345bc899bSmrg# When config.status generates a header, we must update the stamp-h file. 787445bc899bSmrg# This file resides in the same directory as the config header 787545bc899bSmrg# that is generated. The stamp files are numbered to have different names. 787645bc899bSmrg 787745bc899bSmrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 787845bc899bSmrg# loop where config.status creates the headers, so we can generate 787945bc899bSmrg# our stamp files there. 788045bc899bSmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 788145bc899bSmrg[# Compute $1's index in $config_headers. 788250f2e948Smrg_am_arg=$1 788345bc899bSmrg_am_stamp_count=1 788445bc899bSmrgfor _am_header in $config_headers :; do 788545bc899bSmrg case $_am_header in 788650f2e948Smrg $_am_arg | $_am_arg:* ) 788745bc899bSmrg break ;; 788845bc899bSmrg * ) 788945bc899bSmrg _am_stamp_count=`expr $_am_stamp_count + 1` ;; 789045bc899bSmrg esac 789145bc899bSmrgdone 789250f2e948Smrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 789345bc899bSmrg 78943a925b30Smrg# Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc. 789545bc899bSmrg# 789645bc899bSmrg# This file is free software; the Free Software Foundation 789745bc899bSmrg# gives unlimited permission to copy and/or distribute it, 789845bc899bSmrg# with or without modifications, as long as this notice is preserved. 789945bc899bSmrg 790045bc899bSmrg# AM_PROG_INSTALL_SH 790145bc899bSmrg# ------------------ 790245bc899bSmrg# Define $install_sh. 790345bc899bSmrgAC_DEFUN([AM_PROG_INSTALL_SH], 790445bc899bSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 79053a925b30Smrgif test x"${install_sh}" != xset; then 79063a925b30Smrg case $am_aux_dir in 79073a925b30Smrg *\ * | *\ *) 79083a925b30Smrg install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 79093a925b30Smrg *) 79103a925b30Smrg install_sh="\${SHELL} $am_aux_dir/install-sh" 79113a925b30Smrg esac 79123a925b30Smrgfi 791345bc899bSmrgAC_SUBST(install_sh)]) 791445bc899bSmrg 791545bc899bSmrg# Copyright (C) 2003, 2005 Free Software Foundation, Inc. 791645bc899bSmrg# 791745bc899bSmrg# This file is free software; the Free Software Foundation 791845bc899bSmrg# gives unlimited permission to copy and/or distribute it, 791945bc899bSmrg# with or without modifications, as long as this notice is preserved. 792045bc899bSmrg 792145bc899bSmrg# serial 2 792245bc899bSmrg 792345bc899bSmrg# Check whether the underlying file-system supports filenames 792445bc899bSmrg# with a leading dot. For instance MS-DOS doesn't. 792545bc899bSmrgAC_DEFUN([AM_SET_LEADING_DOT], 792645bc899bSmrg[rm -rf .tst 2>/dev/null 792745bc899bSmrgmkdir .tst 2>/dev/null 792845bc899bSmrgif test -d .tst; then 792945bc899bSmrg am__leading_dot=. 793045bc899bSmrgelse 793145bc899bSmrg am__leading_dot=_ 793245bc899bSmrgfi 793345bc899bSmrgrmdir .tst 2>/dev/null 793445bc899bSmrgAC_SUBST([am__leading_dot])]) 793545bc899bSmrg 793645bc899bSmrg# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- 793745bc899bSmrg# From Jim Meyering 793845bc899bSmrg 79393a925b30Smrg# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008 794045bc899bSmrg# Free Software Foundation, Inc. 794145bc899bSmrg# 794245bc899bSmrg# This file is free software; the Free Software Foundation 794345bc899bSmrg# gives unlimited permission to copy and/or distribute it, 794445bc899bSmrg# with or without modifications, as long as this notice is preserved. 794545bc899bSmrg 79463a925b30Smrg# serial 5 794745bc899bSmrg 79483a925b30Smrg# AM_MAINTAINER_MODE([DEFAULT-MODE]) 79493a925b30Smrg# ---------------------------------- 79503a925b30Smrg# Control maintainer-specific portions of Makefiles. 79513a925b30Smrg# Default is to disable them, unless `enable' is passed literally. 79523a925b30Smrg# For symmetry, `disable' may be passed as well. Anyway, the user 79533a925b30Smrg# can override the default with the --enable/--disable switch. 795445bc899bSmrgAC_DEFUN([AM_MAINTAINER_MODE], 79553a925b30Smrg[m4_case(m4_default([$1], [disable]), 79563a925b30Smrg [enable], [m4_define([am_maintainer_other], [disable])], 79573a925b30Smrg [disable], [m4_define([am_maintainer_other], [enable])], 79583a925b30Smrg [m4_define([am_maintainer_other], [enable]) 79593a925b30Smrg m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) 79603a925b30SmrgAC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles]) 79613a925b30Smrg dnl maintainer-mode's default is 'disable' unless 'enable' is passed 79623a925b30Smrg AC_ARG_ENABLE([maintainer-mode], 79633a925b30Smrg[ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful 796445bc899bSmrg (and sometimes confusing) to the casual installer], 79653a925b30Smrg [USE_MAINTAINER_MODE=$enableval], 79663a925b30Smrg [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) 796745bc899bSmrg AC_MSG_RESULT([$USE_MAINTAINER_MODE]) 79683a925b30Smrg AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) 796945bc899bSmrg MAINT=$MAINTAINER_MODE_TRUE 79703a925b30Smrg AC_SUBST([MAINT])dnl 797145bc899bSmrg] 797245bc899bSmrg) 797345bc899bSmrg 797445bc899bSmrgAU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) 797545bc899bSmrg 797645bc899bSmrg# Check to see how 'make' treats includes. -*- Autoconf -*- 797745bc899bSmrg 79783a925b30Smrg# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. 797945bc899bSmrg# 798045bc899bSmrg# This file is free software; the Free Software Foundation 798145bc899bSmrg# gives unlimited permission to copy and/or distribute it, 798245bc899bSmrg# with or without modifications, as long as this notice is preserved. 798345bc899bSmrg 79843a925b30Smrg# serial 4 798545bc899bSmrg 798645bc899bSmrg# AM_MAKE_INCLUDE() 798745bc899bSmrg# ----------------- 798845bc899bSmrg# Check to see how make treats includes. 798945bc899bSmrgAC_DEFUN([AM_MAKE_INCLUDE], 799045bc899bSmrg[am_make=${MAKE-make} 799145bc899bSmrgcat > confinc << 'END' 799245bc899bSmrgam__doit: 79933a925b30Smrg @echo this is the am__doit target 799445bc899bSmrg.PHONY: am__doit 799545bc899bSmrgEND 799645bc899bSmrg# If we don't find an include directive, just comment out the code. 799745bc899bSmrgAC_MSG_CHECKING([for style of include used by $am_make]) 799845bc899bSmrgam__include="#" 799945bc899bSmrgam__quote= 800045bc899bSmrg_am_result=none 800145bc899bSmrg# First try GNU make style include. 800245bc899bSmrgecho "include confinc" > confmf 80033a925b30Smrg# Ignore all kinds of additional output from `make'. 80043a925b30Smrgcase `$am_make -s -f confmf 2> /dev/null` in #( 80053a925b30Smrg*the\ am__doit\ target*) 80063a925b30Smrg am__include=include 80073a925b30Smrg am__quote= 80083a925b30Smrg _am_result=GNU 80093a925b30Smrg ;; 80103a925b30Smrgesac 801145bc899bSmrg# Now try BSD make style include. 801245bc899bSmrgif test "$am__include" = "#"; then 801345bc899bSmrg echo '.include "confinc"' > confmf 80143a925b30Smrg case `$am_make -s -f confmf 2> /dev/null` in #( 80153a925b30Smrg *the\ am__doit\ target*) 80163a925b30Smrg am__include=.include 80173a925b30Smrg am__quote="\"" 80183a925b30Smrg _am_result=BSD 80193a925b30Smrg ;; 80203a925b30Smrg esac 802145bc899bSmrgfi 802245bc899bSmrgAC_SUBST([am__include]) 802345bc899bSmrgAC_SUBST([am__quote]) 802445bc899bSmrgAC_MSG_RESULT([$_am_result]) 802545bc899bSmrgrm -f confinc confmf 802645bc899bSmrg]) 802745bc899bSmrg 802845bc899bSmrg# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 802945bc899bSmrg 80303a925b30Smrg# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 803145bc899bSmrg# Free Software Foundation, Inc. 803245bc899bSmrg# 803345bc899bSmrg# This file is free software; the Free Software Foundation 803445bc899bSmrg# gives unlimited permission to copy and/or distribute it, 803545bc899bSmrg# with or without modifications, as long as this notice is preserved. 803645bc899bSmrg 80373a925b30Smrg# serial 6 803845bc899bSmrg 803945bc899bSmrg# AM_MISSING_PROG(NAME, PROGRAM) 804045bc899bSmrg# ------------------------------ 804145bc899bSmrgAC_DEFUN([AM_MISSING_PROG], 804245bc899bSmrg[AC_REQUIRE([AM_MISSING_HAS_RUN]) 804345bc899bSmrg$1=${$1-"${am_missing_run}$2"} 804445bc899bSmrgAC_SUBST($1)]) 804545bc899bSmrg 804645bc899bSmrg 804745bc899bSmrg# AM_MISSING_HAS_RUN 804845bc899bSmrg# ------------------ 804945bc899bSmrg# Define MISSING if not defined so far and test if it supports --run. 805045bc899bSmrg# If it does, set am_missing_run to use it, otherwise, to nothing. 805145bc899bSmrgAC_DEFUN([AM_MISSING_HAS_RUN], 805245bc899bSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 805350f2e948SmrgAC_REQUIRE_AUX_FILE([missing])dnl 80543a925b30Smrgif test x"${MISSING+set}" != xset; then 80553a925b30Smrg case $am_aux_dir in 80563a925b30Smrg *\ * | *\ *) 80573a925b30Smrg MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; 80583a925b30Smrg *) 80593a925b30Smrg MISSING="\${SHELL} $am_aux_dir/missing" ;; 80603a925b30Smrg esac 80613a925b30Smrgfi 806245bc899bSmrg# Use eval to expand $SHELL 806345bc899bSmrgif eval "$MISSING --run true"; then 806445bc899bSmrg am_missing_run="$MISSING --run " 806545bc899bSmrgelse 806645bc899bSmrg am_missing_run= 806745bc899bSmrg AC_MSG_WARN([`missing' script is too old or missing]) 806845bc899bSmrgfi 806945bc899bSmrg]) 807045bc899bSmrg 807150f2e948Smrg# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. 807245bc899bSmrg# 807345bc899bSmrg# This file is free software; the Free Software Foundation 807445bc899bSmrg# gives unlimited permission to copy and/or distribute it, 807545bc899bSmrg# with or without modifications, as long as this notice is preserved. 807645bc899bSmrg 807745bc899bSmrg# AM_PROG_MKDIR_P 807845bc899bSmrg# --------------- 807950f2e948Smrg# Check for `mkdir -p'. 808045bc899bSmrgAC_DEFUN([AM_PROG_MKDIR_P], 808150f2e948Smrg[AC_PREREQ([2.60])dnl 808250f2e948SmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl 808350f2e948Smrgdnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, 808450f2e948Smrgdnl while keeping a definition of mkdir_p for backward compatibility. 808550f2e948Smrgdnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. 808650f2e948Smrgdnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of 808750f2e948Smrgdnl Makefile.ins that do not define MKDIR_P, so we do our own 808850f2e948Smrgdnl adjustment using top_builddir (which is defined more often than 808950f2e948Smrgdnl MKDIR_P). 809050f2e948SmrgAC_SUBST([mkdir_p], ["$MKDIR_P"])dnl 809150f2e948Smrgcase $mkdir_p in 809250f2e948Smrg [[\\/$]]* | ?:[[\\/]]*) ;; 809350f2e948Smrg */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; 809450f2e948Smrgesac 809550f2e948Smrg]) 809645bc899bSmrg 809745bc899bSmrg# Helper functions for option handling. -*- Autoconf -*- 809845bc899bSmrg 809950f2e948Smrg# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc. 810045bc899bSmrg# 810145bc899bSmrg# This file is free software; the Free Software Foundation 810245bc899bSmrg# gives unlimited permission to copy and/or distribute it, 810345bc899bSmrg# with or without modifications, as long as this notice is preserved. 810445bc899bSmrg 810550f2e948Smrg# serial 4 810645bc899bSmrg 810745bc899bSmrg# _AM_MANGLE_OPTION(NAME) 810845bc899bSmrg# ----------------------- 810945bc899bSmrgAC_DEFUN([_AM_MANGLE_OPTION], 811045bc899bSmrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 811145bc899bSmrg 811245bc899bSmrg# _AM_SET_OPTION(NAME) 811345bc899bSmrg# ------------------------------ 811445bc899bSmrg# Set option NAME. Presently that only means defining a flag for this option. 811545bc899bSmrgAC_DEFUN([_AM_SET_OPTION], 811645bc899bSmrg[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) 811745bc899bSmrg 811845bc899bSmrg# _AM_SET_OPTIONS(OPTIONS) 811945bc899bSmrg# ---------------------------------- 812045bc899bSmrg# OPTIONS is a space-separated list of Automake options. 812145bc899bSmrgAC_DEFUN([_AM_SET_OPTIONS], 812250f2e948Smrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 812345bc899bSmrg 812445bc899bSmrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 812545bc899bSmrg# ------------------------------------------- 812645bc899bSmrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 812745bc899bSmrgAC_DEFUN([_AM_IF_OPTION], 812845bc899bSmrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 812945bc899bSmrg 813045bc899bSmrg# Check to make sure that the build environment is sane. -*- Autoconf -*- 813145bc899bSmrg 81323a925b30Smrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 813345bc899bSmrg# Free Software Foundation, Inc. 813445bc899bSmrg# 813545bc899bSmrg# This file is free software; the Free Software Foundation 813645bc899bSmrg# gives unlimited permission to copy and/or distribute it, 813745bc899bSmrg# with or without modifications, as long as this notice is preserved. 813845bc899bSmrg 81393a925b30Smrg# serial 5 814045bc899bSmrg 814145bc899bSmrg# AM_SANITY_CHECK 814245bc899bSmrg# --------------- 814345bc899bSmrgAC_DEFUN([AM_SANITY_CHECK], 814445bc899bSmrg[AC_MSG_CHECKING([whether build environment is sane]) 814545bc899bSmrg# Just in case 814645bc899bSmrgsleep 1 814745bc899bSmrgecho timestamp > conftest.file 81483a925b30Smrg# Reject unsafe characters in $srcdir or the absolute working directory 81493a925b30Smrg# name. Accept space and tab only in the latter. 81503a925b30Smrgam_lf=' 81513a925b30Smrg' 81523a925b30Smrgcase `pwd` in 81533a925b30Smrg *[[\\\"\#\$\&\'\`$am_lf]]*) 81543a925b30Smrg AC_MSG_ERROR([unsafe absolute working directory name]);; 81553a925b30Smrgesac 81563a925b30Smrgcase $srcdir in 81573a925b30Smrg *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 81583a925b30Smrg AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; 81593a925b30Smrgesac 81603a925b30Smrg 816145bc899bSmrg# Do `set' in a subshell so we don't clobber the current shell's 816245bc899bSmrg# arguments. Must try -L first in case configure is actually a 816345bc899bSmrg# symlink; some systems play weird games with the mod time of symlinks 816445bc899bSmrg# (eg FreeBSD returns the mod time of the symlink's containing 816545bc899bSmrg# directory). 816645bc899bSmrgif ( 81673a925b30Smrg set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 816845bc899bSmrg if test "$[*]" = "X"; then 816945bc899bSmrg # -L didn't work. 81703a925b30Smrg set X `ls -t "$srcdir/configure" conftest.file` 817145bc899bSmrg fi 817245bc899bSmrg rm -f conftest.file 817345bc899bSmrg if test "$[*]" != "X $srcdir/configure conftest.file" \ 817445bc899bSmrg && test "$[*]" != "X conftest.file $srcdir/configure"; then 817545bc899bSmrg 817645bc899bSmrg # If neither matched, then we have a broken ls. This can happen 817745bc899bSmrg # if, for instance, CONFIG_SHELL is bash and it inherits a 817845bc899bSmrg # broken ls alias from the environment. This has actually 817945bc899bSmrg # happened. Such a system could not be considered "sane". 818045bc899bSmrg AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 818145bc899bSmrgalias in your environment]) 818245bc899bSmrg fi 818345bc899bSmrg 818445bc899bSmrg test "$[2]" = conftest.file 818545bc899bSmrg ) 818645bc899bSmrgthen 818745bc899bSmrg # Ok. 818845bc899bSmrg : 818945bc899bSmrgelse 819045bc899bSmrg AC_MSG_ERROR([newly created file is older than distributed files! 819145bc899bSmrgCheck your system clock]) 819245bc899bSmrgfi 819345bc899bSmrgAC_MSG_RESULT(yes)]) 819445bc899bSmrg 819545bc899bSmrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 819645bc899bSmrg# 819745bc899bSmrg# This file is free software; the Free Software Foundation 819845bc899bSmrg# gives unlimited permission to copy and/or distribute it, 819945bc899bSmrg# with or without modifications, as long as this notice is preserved. 820045bc899bSmrg 820145bc899bSmrg# AM_PROG_INSTALL_STRIP 820245bc899bSmrg# --------------------- 820345bc899bSmrg# One issue with vendor `install' (even GNU) is that you can't 820445bc899bSmrg# specify the program used to strip binaries. This is especially 820545bc899bSmrg# annoying in cross-compiling environments, where the build's strip 820645bc899bSmrg# is unlikely to handle the host's binaries. 820745bc899bSmrg# Fortunately install-sh will honor a STRIPPROG variable, so we 820845bc899bSmrg# always use install-sh in `make install-strip', and initialize 820945bc899bSmrg# STRIPPROG with the value of the STRIP variable (set by the user). 821045bc899bSmrgAC_DEFUN([AM_PROG_INSTALL_STRIP], 821145bc899bSmrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 821245bc899bSmrg# Installed binaries are usually stripped using `strip' when the user 821345bc899bSmrg# run `make install-strip'. However `strip' might not be the right 821445bc899bSmrg# tool to use in cross-compilation environments, therefore Automake 821545bc899bSmrg# will honor the `STRIP' environment variable to overrule this program. 821645bc899bSmrgdnl Don't test for $cross_compiling = yes, because it might be `maybe'. 821745bc899bSmrgif test "$cross_compiling" != no; then 821845bc899bSmrg AC_CHECK_TOOL([STRIP], [strip], :) 821945bc899bSmrgfi 822050f2e948SmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 822145bc899bSmrgAC_SUBST([INSTALL_STRIP_PROGRAM])]) 822245bc899bSmrg 82233a925b30Smrg# Copyright (C) 2006, 2008 Free Software Foundation, Inc. 822450f2e948Smrg# 822550f2e948Smrg# This file is free software; the Free Software Foundation 822650f2e948Smrg# gives unlimited permission to copy and/or distribute it, 822750f2e948Smrg# with or without modifications, as long as this notice is preserved. 822850f2e948Smrg 82293a925b30Smrg# serial 2 82303a925b30Smrg 823150f2e948Smrg# _AM_SUBST_NOTMAKE(VARIABLE) 823250f2e948Smrg# --------------------------- 823350f2e948Smrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 823450f2e948Smrg# This macro is traced by Automake. 823550f2e948SmrgAC_DEFUN([_AM_SUBST_NOTMAKE]) 823650f2e948Smrg 82373a925b30Smrg# AM_SUBST_NOTMAKE(VARIABLE) 82383a925b30Smrg# --------------------------- 82393a925b30Smrg# Public sister of _AM_SUBST_NOTMAKE. 82403a925b30SmrgAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 82413a925b30Smrg 824245bc899bSmrg# Check how to create a tarball. -*- Autoconf -*- 824345bc899bSmrg 824445bc899bSmrg# Copyright (C) 2004, 2005 Free Software Foundation, Inc. 824545bc899bSmrg# 824645bc899bSmrg# This file is free software; the Free Software Foundation 824745bc899bSmrg# gives unlimited permission to copy and/or distribute it, 824845bc899bSmrg# with or without modifications, as long as this notice is preserved. 824945bc899bSmrg 825045bc899bSmrg# serial 2 825145bc899bSmrg 825245bc899bSmrg# _AM_PROG_TAR(FORMAT) 825345bc899bSmrg# -------------------- 825445bc899bSmrg# Check how to create a tarball in format FORMAT. 825545bc899bSmrg# FORMAT should be one of `v7', `ustar', or `pax'. 825645bc899bSmrg# 825745bc899bSmrg# Substitute a variable $(am__tar) that is a command 825845bc899bSmrg# writing to stdout a FORMAT-tarball containing the directory 825945bc899bSmrg# $tardir. 826045bc899bSmrg# tardir=directory && $(am__tar) > result.tar 826145bc899bSmrg# 826245bc899bSmrg# Substitute a variable $(am__untar) that extract such 826345bc899bSmrg# a tarball read from stdin. 826445bc899bSmrg# $(am__untar) < result.tar 826545bc899bSmrgAC_DEFUN([_AM_PROG_TAR], 826645bc899bSmrg[# Always define AMTAR for backward compatibility. 826745bc899bSmrgAM_MISSING_PROG([AMTAR], [tar]) 826845bc899bSmrgm4_if([$1], [v7], 826945bc899bSmrg [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], 827045bc899bSmrg [m4_case([$1], [ustar],, [pax],, 827145bc899bSmrg [m4_fatal([Unknown tar format])]) 827245bc899bSmrgAC_MSG_CHECKING([how to create a $1 tar archive]) 827345bc899bSmrg# Loop over all known methods to create a tar archive until one works. 827445bc899bSmrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 827545bc899bSmrg_am_tools=${am_cv_prog_tar_$1-$_am_tools} 827645bc899bSmrg# Do not fold the above two line into one, because Tru64 sh and 827745bc899bSmrg# Solaris sh will not grok spaces in the rhs of `-'. 827845bc899bSmrgfor _am_tool in $_am_tools 827945bc899bSmrgdo 828045bc899bSmrg case $_am_tool in 828145bc899bSmrg gnutar) 828245bc899bSmrg for _am_tar in tar gnutar gtar; 828345bc899bSmrg do 828445bc899bSmrg AM_RUN_LOG([$_am_tar --version]) && break 828545bc899bSmrg done 828645bc899bSmrg am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 828745bc899bSmrg am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 828845bc899bSmrg am__untar="$_am_tar -xf -" 828945bc899bSmrg ;; 829045bc899bSmrg plaintar) 829145bc899bSmrg # Must skip GNU tar: if it does not support --format= it doesn't create 829245bc899bSmrg # ustar tarball either. 829345bc899bSmrg (tar --version) >/dev/null 2>&1 && continue 829445bc899bSmrg am__tar='tar chf - "$$tardir"' 829545bc899bSmrg am__tar_='tar chf - "$tardir"' 829645bc899bSmrg am__untar='tar xf -' 829745bc899bSmrg ;; 829845bc899bSmrg pax) 829945bc899bSmrg am__tar='pax -L -x $1 -w "$$tardir"' 830045bc899bSmrg am__tar_='pax -L -x $1 -w "$tardir"' 830145bc899bSmrg am__untar='pax -r' 830245bc899bSmrg ;; 830345bc899bSmrg cpio) 830445bc899bSmrg am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 830545bc899bSmrg am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 830645bc899bSmrg am__untar='cpio -i -H $1 -d' 830745bc899bSmrg ;; 830845bc899bSmrg none) 830945bc899bSmrg am__tar=false 831045bc899bSmrg am__tar_=false 831145bc899bSmrg am__untar=false 831245bc899bSmrg ;; 831345bc899bSmrg esac 831445bc899bSmrg 831545bc899bSmrg # If the value was cached, stop now. We just wanted to have am__tar 831645bc899bSmrg # and am__untar set. 831745bc899bSmrg test -n "${am_cv_prog_tar_$1}" && break 831845bc899bSmrg 831945bc899bSmrg # tar/untar a dummy directory, and stop if the command works 832045bc899bSmrg rm -rf conftest.dir 832145bc899bSmrg mkdir conftest.dir 832245bc899bSmrg echo GrepMe > conftest.dir/file 832345bc899bSmrg AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 832445bc899bSmrg rm -rf conftest.dir 832545bc899bSmrg if test -s conftest.tar; then 832645bc899bSmrg AM_RUN_LOG([$am__untar <conftest.tar]) 832745bc899bSmrg grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 832845bc899bSmrg fi 832945bc899bSmrgdone 833045bc899bSmrgrm -rf conftest.dir 833145bc899bSmrg 833245bc899bSmrgAC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 833345bc899bSmrgAC_MSG_RESULT([$am_cv_prog_tar_$1])]) 833445bc899bSmrgAC_SUBST([am__tar]) 833545bc899bSmrgAC_SUBST([am__untar]) 833645bc899bSmrg]) # _AM_PROG_TAR 833745bc899bSmrg 83383a925b30Smrgdnl Copyright 2005 Red Hat, Inc 83393a925b30Smrgdnl 83403a925b30Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its 83413a925b30Smrgdnl documentation for any purpose is hereby granted without fee, provided that 83423a925b30Smrgdnl the above copyright notice appear in all copies and that both that 83433a925b30Smrgdnl copyright notice and this permission notice appear in supporting 83443a925b30Smrgdnl documentation. 83453a925b30Smrgdnl 83463a925b30Smrgdnl The above copyright notice and this permission notice shall be included 83473a925b30Smrgdnl in all copies or substantial portions of the Software. 83483a925b30Smrgdnl 83493a925b30Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 83503a925b30Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 83513a925b30Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 83523a925b30Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 83533a925b30Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 83543a925b30Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 83553a925b30Smrgdnl OTHER DEALINGS IN THE SOFTWARE. 83563a925b30Smrgdnl 83573a925b30Smrgdnl Except as contained in this notice, the name of the copyright holders shall 83583a925b30Smrgdnl not be used in advertising or otherwise to promote the sale, use or 83593a925b30Smrgdnl other dealings in this Software without prior written authorization 83603a925b30Smrgdnl from the copyright holders. 83613a925b30Smrgdnl 83623a925b30Smrg 83633a925b30Smrg# XORG_DRIVER_CHECK_EXT() 83643a925b30Smrg# -------------------------- 83653a925b30Smrg# Checks for the $1 define in xorg-server.h (from the sdk). If it 83663a925b30Smrg# is defined, then add $1 to $REQUIRED_MODULES. 83673a925b30Smrg 83683a925b30SmrgAC_DEFUN([XORG_DRIVER_CHECK_EXT],[ 83693a925b30Smrg SAVE_CFLAGS="$CFLAGS" 83703a925b30Smrg CFLAGS="$CFLAGS -I`pkg-config --variable=sdkdir xorg-server`" 83713a925b30Smrg AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ 83723a925b30Smrg#include "xorg-server.h" 83733a925b30Smrg#if !defined $1 83743a925b30Smrg#error $1 not defined 83753a925b30Smrg#endif 83763a925b30Smrg ]])], 83773a925b30Smrg [_EXT_CHECK=yes], 83783a925b30Smrg [_EXT_CHECK=no]) 83793a925b30Smrg CFLAGS="$SAVE_CFLAGS" 83803a925b30Smrg AC_MSG_CHECKING([if $1 is defined]) 83813a925b30Smrg AC_MSG_RESULT([$_EXT_CHECK]) 83823a925b30Smrg if test "$_EXT_CHECK" != no; then 83833a925b30Smrg REQUIRED_MODULES="$REQUIRED_MODULES $2" 83843a925b30Smrg fi 83853a925b30Smrg]) 83863a925b30Smrg 8387