aclocal.m4 revision 45bc899b
145bc899bSmrg# generated automatically by aclocal 1.9.6 -*- Autoconf -*- 245bc899bSmrg 345bc899bSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 445bc899bSmrg# 2005 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 1445bc899bSmrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 1545bc899bSmrg 1645bc899bSmrg# serial 48 AC_PROG_LIBTOOL 1745bc899bSmrg 1845bc899bSmrg 1945bc899bSmrg# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED) 2045bc899bSmrg# ----------------------------------------------------------- 2145bc899bSmrg# If this macro is not defined by Autoconf, define it here. 2245bc899bSmrgm4_ifdef([AC_PROVIDE_IFELSE], 2345bc899bSmrg [], 2445bc899bSmrg [m4_define([AC_PROVIDE_IFELSE], 2545bc899bSmrg [m4_ifdef([AC_PROVIDE_$1], 2645bc899bSmrg [$2], [$3])])]) 2745bc899bSmrg 2845bc899bSmrg 2945bc899bSmrg# AC_PROG_LIBTOOL 3045bc899bSmrg# --------------- 3145bc899bSmrgAC_DEFUN([AC_PROG_LIBTOOL], 3245bc899bSmrg[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl 3345bc899bSmrgdnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX 3445bc899bSmrgdnl immediately, otherwise, hook it in at the end of AC_PROG_CXX. 3545bc899bSmrg AC_PROVIDE_IFELSE([AC_PROG_CXX], 3645bc899bSmrg [AC_LIBTOOL_CXX], 3745bc899bSmrg [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX 3845bc899bSmrg ])]) 3945bc899bSmrgdnl And a similar setup for Fortran 77 support 4045bc899bSmrg AC_PROVIDE_IFELSE([AC_PROG_F77], 4145bc899bSmrg [AC_LIBTOOL_F77], 4245bc899bSmrg [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77 4345bc899bSmrg])]) 4445bc899bSmrg 4545bc899bSmrgdnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly. 4645bc899bSmrgdnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run 4745bc899bSmrgdnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both. 4845bc899bSmrg AC_PROVIDE_IFELSE([AC_PROG_GCJ], 4945bc899bSmrg [AC_LIBTOOL_GCJ], 5045bc899bSmrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 5145bc899bSmrg [AC_LIBTOOL_GCJ], 5245bc899bSmrg [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ], 5345bc899bSmrg [AC_LIBTOOL_GCJ], 5445bc899bSmrg [ifdef([AC_PROG_GCJ], 5545bc899bSmrg [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])]) 5645bc899bSmrg ifdef([A][M_PROG_GCJ], 5745bc899bSmrg [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])]) 5845bc899bSmrg ifdef([LT_AC_PROG_GCJ], 5945bc899bSmrg [define([LT_AC_PROG_GCJ], 6045bc899bSmrg defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])]) 6145bc899bSmrg])])# AC_PROG_LIBTOOL 6245bc899bSmrg 6345bc899bSmrg 6445bc899bSmrg# _AC_PROG_LIBTOOL 6545bc899bSmrg# ---------------- 6645bc899bSmrgAC_DEFUN([_AC_PROG_LIBTOOL], 6745bc899bSmrg[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl 6845bc899bSmrgAC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl 6945bc899bSmrgAC_BEFORE([$0],[AC_LIBTOOL_F77])dnl 7045bc899bSmrgAC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl 7145bc899bSmrg 7245bc899bSmrg# This can be used to rebuild libtool when needed 7345bc899bSmrgLIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" 7445bc899bSmrg 7545bc899bSmrg# Always use our own libtool. 7645bc899bSmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool' 7745bc899bSmrgAC_SUBST(LIBTOOL)dnl 7845bc899bSmrg 7945bc899bSmrg# Prevent multiple expansion 8045bc899bSmrgdefine([AC_PROG_LIBTOOL], []) 8145bc899bSmrg])# _AC_PROG_LIBTOOL 8245bc899bSmrg 8345bc899bSmrg 8445bc899bSmrg# AC_LIBTOOL_SETUP 8545bc899bSmrg# ---------------- 8645bc899bSmrgAC_DEFUN([AC_LIBTOOL_SETUP], 8745bc899bSmrg[AC_PREREQ(2.50)dnl 8845bc899bSmrgAC_REQUIRE([AC_ENABLE_SHARED])dnl 8945bc899bSmrgAC_REQUIRE([AC_ENABLE_STATIC])dnl 9045bc899bSmrgAC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl 9145bc899bSmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 9245bc899bSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 9345bc899bSmrgAC_REQUIRE([AC_PROG_CC])dnl 9445bc899bSmrgAC_REQUIRE([AC_PROG_LD])dnl 9545bc899bSmrgAC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl 9645bc899bSmrgAC_REQUIRE([AC_PROG_NM])dnl 9745bc899bSmrg 9845bc899bSmrgAC_REQUIRE([AC_PROG_LN_S])dnl 9945bc899bSmrgAC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl 10045bc899bSmrg# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! 10145bc899bSmrgAC_REQUIRE([AC_OBJEXT])dnl 10245bc899bSmrgAC_REQUIRE([AC_EXEEXT])dnl 10345bc899bSmrgdnl 10445bc899bSmrg 10545bc899bSmrgAC_LIBTOOL_SYS_MAX_CMD_LEN 10645bc899bSmrgAC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE 10745bc899bSmrgAC_LIBTOOL_OBJDIR 10845bc899bSmrg 10945bc899bSmrgAC_REQUIRE([_LT_AC_SYS_COMPILER])dnl 11045bc899bSmrg_LT_AC_PROG_ECHO_BACKSLASH 11145bc899bSmrg 11245bc899bSmrgcase $host_os in 11345bc899bSmrgaix3*) 11445bc899bSmrg # AIX sometimes has problems with the GCC collect2 program. For some 11545bc899bSmrg # reason, if we set the COLLECT_NAMES environment variable, the problems 11645bc899bSmrg # vanish in a puff of smoke. 11745bc899bSmrg if test "X${COLLECT_NAMES+set}" != Xset; then 11845bc899bSmrg COLLECT_NAMES= 11945bc899bSmrg export COLLECT_NAMES 12045bc899bSmrg fi 12145bc899bSmrg ;; 12245bc899bSmrgesac 12345bc899bSmrg 12445bc899bSmrg# Sed substitution that helps us do robust quoting. It backslashifies 12545bc899bSmrg# metacharacters that are still active within double-quoted strings. 12645bc899bSmrgXsed='sed -e 1s/^X//' 12745bc899bSmrg[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'] 12845bc899bSmrg 12945bc899bSmrg# Same as above, but do not quote variable references. 13045bc899bSmrg[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'] 13145bc899bSmrg 13245bc899bSmrg# Sed substitution to delay expansion of an escaped shell variable in a 13345bc899bSmrg# double_quote_subst'ed string. 13445bc899bSmrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 13545bc899bSmrg 13645bc899bSmrg# Sed substitution to avoid accidental globbing in evaled expressions 13745bc899bSmrgno_glob_subst='s/\*/\\\*/g' 13845bc899bSmrg 13945bc899bSmrg# Constants: 14045bc899bSmrgrm="rm -f" 14145bc899bSmrg 14245bc899bSmrg# Global variables: 14345bc899bSmrgdefault_ofile=libtool 14445bc899bSmrgcan_build_shared=yes 14545bc899bSmrg 14645bc899bSmrg# All known linkers require a `.a' archive for static linking (except MSVC, 14745bc899bSmrg# which needs '.lib'). 14845bc899bSmrglibext=a 14945bc899bSmrgltmain="$ac_aux_dir/ltmain.sh" 15045bc899bSmrgofile="$default_ofile" 15145bc899bSmrgwith_gnu_ld="$lt_cv_prog_gnu_ld" 15245bc899bSmrg 15345bc899bSmrgAC_CHECK_TOOL(AR, ar, false) 15445bc899bSmrgAC_CHECK_TOOL(RANLIB, ranlib, :) 15545bc899bSmrgAC_CHECK_TOOL(STRIP, strip, :) 15645bc899bSmrg 15745bc899bSmrgold_CC="$CC" 15845bc899bSmrgold_CFLAGS="$CFLAGS" 15945bc899bSmrg 16045bc899bSmrg# Set sane defaults for various variables 16145bc899bSmrgtest -z "$AR" && AR=ar 16245bc899bSmrgtest -z "$AR_FLAGS" && AR_FLAGS=cru 16345bc899bSmrgtest -z "$AS" && AS=as 16445bc899bSmrgtest -z "$CC" && CC=cc 16545bc899bSmrgtest -z "$LTCC" && LTCC=$CC 16645bc899bSmrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 16745bc899bSmrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 16845bc899bSmrgtest -z "$LD" && LD=ld 16945bc899bSmrgtest -z "$LN_S" && LN_S="ln -s" 17045bc899bSmrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file 17145bc899bSmrgtest -z "$NM" && NM=nm 17245bc899bSmrgtest -z "$SED" && SED=sed 17345bc899bSmrgtest -z "$OBJDUMP" && OBJDUMP=objdump 17445bc899bSmrgtest -z "$RANLIB" && RANLIB=: 17545bc899bSmrgtest -z "$STRIP" && STRIP=: 17645bc899bSmrgtest -z "$ac_objext" && ac_objext=o 17745bc899bSmrg 17845bc899bSmrg# Determine commands to create old-style static archives. 17945bc899bSmrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs' 18045bc899bSmrgold_postinstall_cmds='chmod 644 $oldlib' 18145bc899bSmrgold_postuninstall_cmds= 18245bc899bSmrg 18345bc899bSmrgif test -n "$RANLIB"; then 18445bc899bSmrg case $host_os in 18545bc899bSmrg openbsd*) 18645bc899bSmrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" 18745bc899bSmrg ;; 18845bc899bSmrg *) 18945bc899bSmrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" 19045bc899bSmrg ;; 19145bc899bSmrg esac 19245bc899bSmrg old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" 19345bc899bSmrgfi 19445bc899bSmrg 19545bc899bSmrg_LT_CC_BASENAME([$compiler]) 19645bc899bSmrg 19745bc899bSmrg# Only perform the check for file, if the check method requires it 19845bc899bSmrgcase $deplibs_check_method in 19945bc899bSmrgfile_magic*) 20045bc899bSmrg if test "$file_magic_cmd" = '$MAGIC_CMD'; then 20145bc899bSmrg AC_PATH_MAGIC 20245bc899bSmrg fi 20345bc899bSmrg ;; 20445bc899bSmrgesac 20545bc899bSmrg 20645bc899bSmrgAC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no) 20745bc899bSmrgAC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], 20845bc899bSmrgenable_win32_dll=yes, enable_win32_dll=no) 20945bc899bSmrg 21045bc899bSmrgAC_ARG_ENABLE([libtool-lock], 21145bc899bSmrg [AC_HELP_STRING([--disable-libtool-lock], 21245bc899bSmrg [avoid locking (might break parallel builds)])]) 21345bc899bSmrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes 21445bc899bSmrg 21545bc899bSmrgAC_ARG_WITH([pic], 21645bc899bSmrg [AC_HELP_STRING([--with-pic], 21745bc899bSmrg [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 21845bc899bSmrg [pic_mode="$withval"], 21945bc899bSmrg [pic_mode=default]) 22045bc899bSmrgtest -z "$pic_mode" && pic_mode=default 22145bc899bSmrg 22245bc899bSmrg# Use C for the default configuration in the libtool script 22345bc899bSmrgtagname= 22445bc899bSmrgAC_LIBTOOL_LANG_C_CONFIG 22545bc899bSmrg_LT_AC_TAGCONFIG 22645bc899bSmrg])# AC_LIBTOOL_SETUP 22745bc899bSmrg 22845bc899bSmrg 22945bc899bSmrg# _LT_AC_SYS_COMPILER 23045bc899bSmrg# ------------------- 23145bc899bSmrgAC_DEFUN([_LT_AC_SYS_COMPILER], 23245bc899bSmrg[AC_REQUIRE([AC_PROG_CC])dnl 23345bc899bSmrg 23445bc899bSmrg# If no C compiler was specified, use CC. 23545bc899bSmrgLTCC=${LTCC-"$CC"} 23645bc899bSmrg 23745bc899bSmrg# If no C compiler flags were specified, use CFLAGS. 23845bc899bSmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"} 23945bc899bSmrg 24045bc899bSmrg# Allow CC to be a program name with arguments. 24145bc899bSmrgcompiler=$CC 24245bc899bSmrg])# _LT_AC_SYS_COMPILER 24345bc899bSmrg 24445bc899bSmrg 24545bc899bSmrg# _LT_CC_BASENAME(CC) 24645bc899bSmrg# ------------------- 24745bc899bSmrg# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 24845bc899bSmrgAC_DEFUN([_LT_CC_BASENAME], 24945bc899bSmrg[for cc_temp in $1""; do 25045bc899bSmrg case $cc_temp in 25145bc899bSmrg compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 25245bc899bSmrg distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 25345bc899bSmrg \-*) ;; 25445bc899bSmrg *) break;; 25545bc899bSmrg esac 25645bc899bSmrgdone 25745bc899bSmrgcc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` 25845bc899bSmrg]) 25945bc899bSmrg 26045bc899bSmrg 26145bc899bSmrg# _LT_COMPILER_BOILERPLATE 26245bc899bSmrg# ------------------------ 26345bc899bSmrg# Check for compiler boilerplate output or warnings with 26445bc899bSmrg# the simple compiler test code. 26545bc899bSmrgAC_DEFUN([_LT_COMPILER_BOILERPLATE], 26645bc899bSmrg[ac_outfile=conftest.$ac_objext 26745bc899bSmrgprintf "$lt_simple_compile_test_code" >conftest.$ac_ext 26845bc899bSmrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 26945bc899bSmrg_lt_compiler_boilerplate=`cat conftest.err` 27045bc899bSmrg$rm conftest* 27145bc899bSmrg])# _LT_COMPILER_BOILERPLATE 27245bc899bSmrg 27345bc899bSmrg 27445bc899bSmrg# _LT_LINKER_BOILERPLATE 27545bc899bSmrg# ---------------------- 27645bc899bSmrg# Check for linker boilerplate output or warnings with 27745bc899bSmrg# the simple link test code. 27845bc899bSmrgAC_DEFUN([_LT_LINKER_BOILERPLATE], 27945bc899bSmrg[ac_outfile=conftest.$ac_objext 28045bc899bSmrgprintf "$lt_simple_link_test_code" >conftest.$ac_ext 28145bc899bSmrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 28245bc899bSmrg_lt_linker_boilerplate=`cat conftest.err` 28345bc899bSmrg$rm conftest* 28445bc899bSmrg])# _LT_LINKER_BOILERPLATE 28545bc899bSmrg 28645bc899bSmrg 28745bc899bSmrg# _LT_AC_SYS_LIBPATH_AIX 28845bc899bSmrg# ---------------------- 28945bc899bSmrg# Links a minimal program and checks the executable 29045bc899bSmrg# for the system default hardcoded library path. In most cases, 29145bc899bSmrg# this is /usr/lib:/lib, but when the MPI compilers are used 29245bc899bSmrg# the location of the communication and MPI libs are included too. 29345bc899bSmrg# If we don't find anything, use the default library path according 29445bc899bSmrg# to the aix ld manual. 29545bc899bSmrgAC_DEFUN([_LT_AC_SYS_LIBPATH_AIX], 29645bc899bSmrg[AC_LINK_IFELSE(AC_LANG_PROGRAM,[ 29745bc899bSmrgaix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } 29845bc899bSmrg}'` 29945bc899bSmrg# Check for a 64-bit object if we didn't find anything. 30045bc899bSmrgif test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } 30145bc899bSmrg}'`; fi],[]) 30245bc899bSmrgif test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi 30345bc899bSmrg])# _LT_AC_SYS_LIBPATH_AIX 30445bc899bSmrg 30545bc899bSmrg 30645bc899bSmrg# _LT_AC_SHELL_INIT(ARG) 30745bc899bSmrg# ---------------------- 30845bc899bSmrgAC_DEFUN([_LT_AC_SHELL_INIT], 30945bc899bSmrg[ifdef([AC_DIVERSION_NOTICE], 31045bc899bSmrg [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], 31145bc899bSmrg [AC_DIVERT_PUSH(NOTICE)]) 31245bc899bSmrg$1 31345bc899bSmrgAC_DIVERT_POP 31445bc899bSmrg])# _LT_AC_SHELL_INIT 31545bc899bSmrg 31645bc899bSmrg 31745bc899bSmrg# _LT_AC_PROG_ECHO_BACKSLASH 31845bc899bSmrg# -------------------------- 31945bc899bSmrg# Add some code to the start of the generated configure script which 32045bc899bSmrg# will find an echo command which doesn't interpret backslashes. 32145bc899bSmrgAC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH], 32245bc899bSmrg[_LT_AC_SHELL_INIT([ 32345bc899bSmrg# Check that we are running under the correct shell. 32445bc899bSmrgSHELL=${CONFIG_SHELL-/bin/sh} 32545bc899bSmrg 32645bc899bSmrgcase X$ECHO in 32745bc899bSmrgX*--fallback-echo) 32845bc899bSmrg # Remove one level of quotation (which was required for Make). 32945bc899bSmrg ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` 33045bc899bSmrg ;; 33145bc899bSmrgesac 33245bc899bSmrg 33345bc899bSmrgecho=${ECHO-echo} 33445bc899bSmrgif test "X[$]1" = X--no-reexec; then 33545bc899bSmrg # Discard the --no-reexec flag, and continue. 33645bc899bSmrg shift 33745bc899bSmrgelif test "X[$]1" = X--fallback-echo; then 33845bc899bSmrg # Avoid inline document here, it may be left over 33945bc899bSmrg : 34045bc899bSmrgelif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then 34145bc899bSmrg # Yippee, $echo works! 34245bc899bSmrg : 34345bc899bSmrgelse 34445bc899bSmrg # Restart under the correct shell. 34545bc899bSmrg exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} 34645bc899bSmrgfi 34745bc899bSmrg 34845bc899bSmrgif test "X[$]1" = X--fallback-echo; then 34945bc899bSmrg # used as fallback echo 35045bc899bSmrg shift 35145bc899bSmrg cat <<EOF 35245bc899bSmrg[$]* 35345bc899bSmrgEOF 35445bc899bSmrg exit 0 35545bc899bSmrgfi 35645bc899bSmrg 35745bc899bSmrg# The HP-UX ksh and POSIX shell print the target directory to stdout 35845bc899bSmrg# if CDPATH is set. 35945bc899bSmrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 36045bc899bSmrg 36145bc899bSmrgif test -z "$ECHO"; then 36245bc899bSmrgif test "X${echo_test_string+set}" != Xset; then 36345bc899bSmrg# find a string as large as possible, as long as the shell can cope with it 36445bc899bSmrg for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do 36545bc899bSmrg # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... 36645bc899bSmrg if (echo_test_string=`eval $cmd`) 2>/dev/null && 36745bc899bSmrg echo_test_string=`eval $cmd` && 36845bc899bSmrg (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null 36945bc899bSmrg then 37045bc899bSmrg break 37145bc899bSmrg fi 37245bc899bSmrg done 37345bc899bSmrgfi 37445bc899bSmrg 37545bc899bSmrgif test "X`($echo '\t') 2>/dev/null`" = 'X\t' && 37645bc899bSmrg echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && 37745bc899bSmrg test "X$echo_testing_string" = "X$echo_test_string"; then 37845bc899bSmrg : 37945bc899bSmrgelse 38045bc899bSmrg # The Solaris, AIX, and Digital Unix default echo programs unquote 38145bc899bSmrg # backslashes. This makes it impossible to quote backslashes using 38245bc899bSmrg # echo "$something" | sed 's/\\/\\\\/g' 38345bc899bSmrg # 38445bc899bSmrg # So, first we look for a working echo in the user's PATH. 38545bc899bSmrg 38645bc899bSmrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 38745bc899bSmrg for dir in $PATH /usr/ucb; do 38845bc899bSmrg IFS="$lt_save_ifs" 38945bc899bSmrg if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && 39045bc899bSmrg test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && 39145bc899bSmrg echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && 39245bc899bSmrg test "X$echo_testing_string" = "X$echo_test_string"; then 39345bc899bSmrg echo="$dir/echo" 39445bc899bSmrg break 39545bc899bSmrg fi 39645bc899bSmrg done 39745bc899bSmrg IFS="$lt_save_ifs" 39845bc899bSmrg 39945bc899bSmrg if test "X$echo" = Xecho; then 40045bc899bSmrg # We didn't find a better echo, so look for alternatives. 40145bc899bSmrg if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && 40245bc899bSmrg echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && 40345bc899bSmrg test "X$echo_testing_string" = "X$echo_test_string"; then 40445bc899bSmrg # This shell has a builtin print -r that does the trick. 40545bc899bSmrg echo='print -r' 40645bc899bSmrg elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && 40745bc899bSmrg test "X$CONFIG_SHELL" != X/bin/ksh; then 40845bc899bSmrg # If we have ksh, try running configure again with it. 40945bc899bSmrg ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} 41045bc899bSmrg export ORIGINAL_CONFIG_SHELL 41145bc899bSmrg CONFIG_SHELL=/bin/ksh 41245bc899bSmrg export CONFIG_SHELL 41345bc899bSmrg exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} 41445bc899bSmrg else 41545bc899bSmrg # Try using printf. 41645bc899bSmrg echo='printf %s\n' 41745bc899bSmrg if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && 41845bc899bSmrg echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && 41945bc899bSmrg test "X$echo_testing_string" = "X$echo_test_string"; then 42045bc899bSmrg # Cool, printf works 42145bc899bSmrg : 42245bc899bSmrg elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && 42345bc899bSmrg test "X$echo_testing_string" = 'X\t' && 42445bc899bSmrg echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && 42545bc899bSmrg test "X$echo_testing_string" = "X$echo_test_string"; then 42645bc899bSmrg CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL 42745bc899bSmrg export CONFIG_SHELL 42845bc899bSmrg SHELL="$CONFIG_SHELL" 42945bc899bSmrg export SHELL 43045bc899bSmrg echo="$CONFIG_SHELL [$]0 --fallback-echo" 43145bc899bSmrg elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && 43245bc899bSmrg test "X$echo_testing_string" = 'X\t' && 43345bc899bSmrg echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && 43445bc899bSmrg test "X$echo_testing_string" = "X$echo_test_string"; then 43545bc899bSmrg echo="$CONFIG_SHELL [$]0 --fallback-echo" 43645bc899bSmrg else 43745bc899bSmrg # maybe with a smaller string... 43845bc899bSmrg prev=: 43945bc899bSmrg 44045bc899bSmrg for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do 44145bc899bSmrg if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null 44245bc899bSmrg then 44345bc899bSmrg break 44445bc899bSmrg fi 44545bc899bSmrg prev="$cmd" 44645bc899bSmrg done 44745bc899bSmrg 44845bc899bSmrg if test "$prev" != 'sed 50q "[$]0"'; then 44945bc899bSmrg echo_test_string=`eval $prev` 45045bc899bSmrg export echo_test_string 45145bc899bSmrg exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} 45245bc899bSmrg else 45345bc899bSmrg # Oops. We lost completely, so just stick with echo. 45445bc899bSmrg echo=echo 45545bc899bSmrg fi 45645bc899bSmrg fi 45745bc899bSmrg fi 45845bc899bSmrg fi 45945bc899bSmrgfi 46045bc899bSmrgfi 46145bc899bSmrg 46245bc899bSmrg# Copy echo and quote the copy suitably for passing to libtool from 46345bc899bSmrg# the Makefile, instead of quoting the original, which is used later. 46445bc899bSmrgECHO=$echo 46545bc899bSmrgif test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then 46645bc899bSmrg ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" 46745bc899bSmrgfi 46845bc899bSmrg 46945bc899bSmrgAC_SUBST(ECHO) 47045bc899bSmrg])])# _LT_AC_PROG_ECHO_BACKSLASH 47145bc899bSmrg 47245bc899bSmrg 47345bc899bSmrg# _LT_AC_LOCK 47445bc899bSmrg# ----------- 47545bc899bSmrgAC_DEFUN([_LT_AC_LOCK], 47645bc899bSmrg[AC_ARG_ENABLE([libtool-lock], 47745bc899bSmrg [AC_HELP_STRING([--disable-libtool-lock], 47845bc899bSmrg [avoid locking (might break parallel builds)])]) 47945bc899bSmrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes 48045bc899bSmrg 48145bc899bSmrg# Some flags need to be propagated to the compiler or linker for good 48245bc899bSmrg# libtool support. 48345bc899bSmrgcase $host in 48445bc899bSmrgia64-*-hpux*) 48545bc899bSmrg # Find out which ABI we are using. 48645bc899bSmrg echo 'int i;' > conftest.$ac_ext 48745bc899bSmrg if AC_TRY_EVAL(ac_compile); then 48845bc899bSmrg case `/usr/bin/file conftest.$ac_objext` in 48945bc899bSmrg *ELF-32*) 49045bc899bSmrg HPUX_IA64_MODE="32" 49145bc899bSmrg ;; 49245bc899bSmrg *ELF-64*) 49345bc899bSmrg HPUX_IA64_MODE="64" 49445bc899bSmrg ;; 49545bc899bSmrg esac 49645bc899bSmrg fi 49745bc899bSmrg rm -rf conftest* 49845bc899bSmrg ;; 49945bc899bSmrg*-*-irix6*) 50045bc899bSmrg # Find out which ABI we are using. 50145bc899bSmrg echo '[#]line __oline__ "configure"' > conftest.$ac_ext 50245bc899bSmrg if AC_TRY_EVAL(ac_compile); then 50345bc899bSmrg if test "$lt_cv_prog_gnu_ld" = yes; then 50445bc899bSmrg case `/usr/bin/file conftest.$ac_objext` in 50545bc899bSmrg *32-bit*) 50645bc899bSmrg LD="${LD-ld} -melf32bsmip" 50745bc899bSmrg ;; 50845bc899bSmrg *N32*) 50945bc899bSmrg LD="${LD-ld} -melf32bmipn32" 51045bc899bSmrg ;; 51145bc899bSmrg *64-bit*) 51245bc899bSmrg LD="${LD-ld} -melf64bmip" 51345bc899bSmrg ;; 51445bc899bSmrg esac 51545bc899bSmrg else 51645bc899bSmrg case `/usr/bin/file conftest.$ac_objext` in 51745bc899bSmrg *32-bit*) 51845bc899bSmrg LD="${LD-ld} -32" 51945bc899bSmrg ;; 52045bc899bSmrg *N32*) 52145bc899bSmrg LD="${LD-ld} -n32" 52245bc899bSmrg ;; 52345bc899bSmrg *64-bit*) 52445bc899bSmrg LD="${LD-ld} -64" 52545bc899bSmrg ;; 52645bc899bSmrg esac 52745bc899bSmrg fi 52845bc899bSmrg fi 52945bc899bSmrg rm -rf conftest* 53045bc899bSmrg ;; 53145bc899bSmrg 53245bc899bSmrgx86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*) 53345bc899bSmrg # Find out which ABI we are using. 53445bc899bSmrg echo 'int i;' > conftest.$ac_ext 53545bc899bSmrg if AC_TRY_EVAL(ac_compile); then 53645bc899bSmrg case `/usr/bin/file conftest.o` in 53745bc899bSmrg *32-bit*) 53845bc899bSmrg case $host in 53945bc899bSmrg x86_64-*linux*) 54045bc899bSmrg LD="${LD-ld} -m elf_i386" 54145bc899bSmrg ;; 54245bc899bSmrg ppc64-*linux*|powerpc64-*linux*) 54345bc899bSmrg LD="${LD-ld} -m elf32ppclinux" 54445bc899bSmrg ;; 54545bc899bSmrg s390x-*linux*) 54645bc899bSmrg LD="${LD-ld} -m elf_s390" 54745bc899bSmrg ;; 54845bc899bSmrg sparc64-*linux*) 54945bc899bSmrg LD="${LD-ld} -m elf32_sparc" 55045bc899bSmrg ;; 55145bc899bSmrg esac 55245bc899bSmrg ;; 55345bc899bSmrg *64-bit*) 55445bc899bSmrg case $host in 55545bc899bSmrg x86_64-*linux*) 55645bc899bSmrg LD="${LD-ld} -m elf_x86_64" 55745bc899bSmrg ;; 55845bc899bSmrg ppc*-*linux*|powerpc*-*linux*) 55945bc899bSmrg LD="${LD-ld} -m elf64ppc" 56045bc899bSmrg ;; 56145bc899bSmrg s390*-*linux*) 56245bc899bSmrg LD="${LD-ld} -m elf64_s390" 56345bc899bSmrg ;; 56445bc899bSmrg sparc*-*linux*) 56545bc899bSmrg LD="${LD-ld} -m elf64_sparc" 56645bc899bSmrg ;; 56745bc899bSmrg esac 56845bc899bSmrg ;; 56945bc899bSmrg esac 57045bc899bSmrg fi 57145bc899bSmrg rm -rf conftest* 57245bc899bSmrg ;; 57345bc899bSmrg 57445bc899bSmrg*-*-sco3.2v5*) 57545bc899bSmrg # On SCO OpenServer 5, we need -belf to get full-featured binaries. 57645bc899bSmrg SAVE_CFLAGS="$CFLAGS" 57745bc899bSmrg CFLAGS="$CFLAGS -belf" 57845bc899bSmrg AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 57945bc899bSmrg [AC_LANG_PUSH(C) 58045bc899bSmrg AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 58145bc899bSmrg AC_LANG_POP]) 58245bc899bSmrg if test x"$lt_cv_cc_needs_belf" != x"yes"; then 58345bc899bSmrg # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 58445bc899bSmrg CFLAGS="$SAVE_CFLAGS" 58545bc899bSmrg fi 58645bc899bSmrg ;; 58745bc899bSmrgsparc*-*solaris*) 58845bc899bSmrg # Find out which ABI we are using. 58945bc899bSmrg echo 'int i;' > conftest.$ac_ext 59045bc899bSmrg if AC_TRY_EVAL(ac_compile); then 59145bc899bSmrg case `/usr/bin/file conftest.o` in 59245bc899bSmrg *64-bit*) 59345bc899bSmrg case $lt_cv_prog_gnu_ld in 59445bc899bSmrg yes*) LD="${LD-ld} -m elf64_sparc" ;; 59545bc899bSmrg *) LD="${LD-ld} -64" ;; 59645bc899bSmrg esac 59745bc899bSmrg ;; 59845bc899bSmrg esac 59945bc899bSmrg fi 60045bc899bSmrg rm -rf conftest* 60145bc899bSmrg ;; 60245bc899bSmrg 60345bc899bSmrgAC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], 60445bc899bSmrg[*-*-cygwin* | *-*-mingw* | *-*-pw32*) 60545bc899bSmrg AC_CHECK_TOOL(DLLTOOL, dlltool, false) 60645bc899bSmrg AC_CHECK_TOOL(AS, as, false) 60745bc899bSmrg AC_CHECK_TOOL(OBJDUMP, objdump, false) 60845bc899bSmrg ;; 60945bc899bSmrg ]) 61045bc899bSmrgesac 61145bc899bSmrg 61245bc899bSmrgneed_locks="$enable_libtool_lock" 61345bc899bSmrg 61445bc899bSmrg])# _LT_AC_LOCK 61545bc899bSmrg 61645bc899bSmrg 61745bc899bSmrg# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 61845bc899bSmrg# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 61945bc899bSmrg# ---------------------------------------------------------------- 62045bc899bSmrg# Check whether the given compiler option works 62145bc899bSmrgAC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], 62245bc899bSmrg[AC_REQUIRE([LT_AC_PROG_SED]) 62345bc899bSmrgAC_CACHE_CHECK([$1], [$2], 62445bc899bSmrg [$2=no 62545bc899bSmrg ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 62645bc899bSmrg printf "$lt_simple_compile_test_code" > conftest.$ac_ext 62745bc899bSmrg lt_compiler_flag="$3" 62845bc899bSmrg # Insert the option either (1) after the last *FLAGS variable, or 62945bc899bSmrg # (2) before a word containing "conftest.", or (3) at the end. 63045bc899bSmrg # Note that $ac_compile itself does not contain backslashes and begins 63145bc899bSmrg # with a dollar sign (not a hyphen), so the echo should work correctly. 63245bc899bSmrg # The option is referenced via a variable to avoid confusing sed. 63345bc899bSmrg lt_compile=`echo "$ac_compile" | $SED \ 63445bc899bSmrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 63545bc899bSmrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 63645bc899bSmrg -e 's:$: $lt_compiler_flag:'` 63745bc899bSmrg (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 63845bc899bSmrg (eval "$lt_compile" 2>conftest.err) 63945bc899bSmrg ac_status=$? 64045bc899bSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 64145bc899bSmrg echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 64245bc899bSmrg if (exit $ac_status) && test -s "$ac_outfile"; then 64345bc899bSmrg # The compiler can only warn and ignore the option if not recognized 64445bc899bSmrg # So say no if there are warnings other than the usual output. 64545bc899bSmrg $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp 64645bc899bSmrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 64745bc899bSmrg if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 64845bc899bSmrg $2=yes 64945bc899bSmrg fi 65045bc899bSmrg fi 65145bc899bSmrg $rm conftest* 65245bc899bSmrg]) 65345bc899bSmrg 65445bc899bSmrgif test x"[$]$2" = xyes; then 65545bc899bSmrg ifelse([$5], , :, [$5]) 65645bc899bSmrgelse 65745bc899bSmrg ifelse([$6], , :, [$6]) 65845bc899bSmrgfi 65945bc899bSmrg])# AC_LIBTOOL_COMPILER_OPTION 66045bc899bSmrg 66145bc899bSmrg 66245bc899bSmrg# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 66345bc899bSmrg# [ACTION-SUCCESS], [ACTION-FAILURE]) 66445bc899bSmrg# ------------------------------------------------------------ 66545bc899bSmrg# Check whether the given compiler option works 66645bc899bSmrgAC_DEFUN([AC_LIBTOOL_LINKER_OPTION], 66745bc899bSmrg[AC_CACHE_CHECK([$1], [$2], 66845bc899bSmrg [$2=no 66945bc899bSmrg save_LDFLAGS="$LDFLAGS" 67045bc899bSmrg LDFLAGS="$LDFLAGS $3" 67145bc899bSmrg printf "$lt_simple_link_test_code" > conftest.$ac_ext 67245bc899bSmrg if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 67345bc899bSmrg # The linker can only warn and ignore the option if not recognized 67445bc899bSmrg # So say no if there are warnings 67545bc899bSmrg if test -s conftest.err; then 67645bc899bSmrg # Append any errors to the config.log. 67745bc899bSmrg cat conftest.err 1>&AS_MESSAGE_LOG_FD 67845bc899bSmrg $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp 67945bc899bSmrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 68045bc899bSmrg if diff conftest.exp conftest.er2 >/dev/null; then 68145bc899bSmrg $2=yes 68245bc899bSmrg fi 68345bc899bSmrg else 68445bc899bSmrg $2=yes 68545bc899bSmrg fi 68645bc899bSmrg fi 68745bc899bSmrg $rm conftest* 68845bc899bSmrg LDFLAGS="$save_LDFLAGS" 68945bc899bSmrg]) 69045bc899bSmrg 69145bc899bSmrgif test x"[$]$2" = xyes; then 69245bc899bSmrg ifelse([$4], , :, [$4]) 69345bc899bSmrgelse 69445bc899bSmrg ifelse([$5], , :, [$5]) 69545bc899bSmrgfi 69645bc899bSmrg])# AC_LIBTOOL_LINKER_OPTION 69745bc899bSmrg 69845bc899bSmrg 69945bc899bSmrg# AC_LIBTOOL_SYS_MAX_CMD_LEN 70045bc899bSmrg# -------------------------- 70145bc899bSmrgAC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], 70245bc899bSmrg[# find the maximum length of command line arguments 70345bc899bSmrgAC_MSG_CHECKING([the maximum length of command line arguments]) 70445bc899bSmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 70545bc899bSmrg i=0 70645bc899bSmrg teststring="ABCD" 70745bc899bSmrg 70845bc899bSmrg case $build_os in 70945bc899bSmrg msdosdjgpp*) 71045bc899bSmrg # On DJGPP, this test can blow up pretty badly due to problems in libc 71145bc899bSmrg # (any single argument exceeding 2000 bytes causes a buffer overrun 71245bc899bSmrg # during glob expansion). Even if it were fixed, the result of this 71345bc899bSmrg # check would be larger than it should be. 71445bc899bSmrg lt_cv_sys_max_cmd_len=12288; # 12K is about right 71545bc899bSmrg ;; 71645bc899bSmrg 71745bc899bSmrg gnu*) 71845bc899bSmrg # Under GNU Hurd, this test is not required because there is 71945bc899bSmrg # no limit to the length of command line arguments. 72045bc899bSmrg # Libtool will interpret -1 as no limit whatsoever 72145bc899bSmrg lt_cv_sys_max_cmd_len=-1; 72245bc899bSmrg ;; 72345bc899bSmrg 72445bc899bSmrg cygwin* | mingw*) 72545bc899bSmrg # On Win9x/ME, this test blows up -- it succeeds, but takes 72645bc899bSmrg # about 5 minutes as the teststring grows exponentially. 72745bc899bSmrg # Worse, since 9x/ME are not pre-emptively multitasking, 72845bc899bSmrg # you end up with a "frozen" computer, even though with patience 72945bc899bSmrg # the test eventually succeeds (with a max line length of 256k). 73045bc899bSmrg # Instead, let's just punt: use the minimum linelength reported by 73145bc899bSmrg # all of the supported platforms: 8192 (on NT/2K/XP). 73245bc899bSmrg lt_cv_sys_max_cmd_len=8192; 73345bc899bSmrg ;; 73445bc899bSmrg 73545bc899bSmrg amigaos*) 73645bc899bSmrg # On AmigaOS with pdksh, this test takes hours, literally. 73745bc899bSmrg # So we just punt and use a minimum line length of 8192. 73845bc899bSmrg lt_cv_sys_max_cmd_len=8192; 73945bc899bSmrg ;; 74045bc899bSmrg 74145bc899bSmrg netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) 74245bc899bSmrg # This has been around since 386BSD, at least. Likely further. 74345bc899bSmrg if test -x /sbin/sysctl; then 74445bc899bSmrg lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 74545bc899bSmrg elif test -x /usr/sbin/sysctl; then 74645bc899bSmrg lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 74745bc899bSmrg else 74845bc899bSmrg lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 74945bc899bSmrg fi 75045bc899bSmrg # And add a safety zone 75145bc899bSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 75245bc899bSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 75345bc899bSmrg ;; 75445bc899bSmrg 75545bc899bSmrg interix*) 75645bc899bSmrg # We know the value 262144 and hardcode it with a safety zone (like BSD) 75745bc899bSmrg lt_cv_sys_max_cmd_len=196608 75845bc899bSmrg ;; 75945bc899bSmrg 76045bc899bSmrg osf*) 76145bc899bSmrg # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 76245bc899bSmrg # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 76345bc899bSmrg # nice to cause kernel panics so lets avoid the loop below. 76445bc899bSmrg # First set a reasonable default. 76545bc899bSmrg lt_cv_sys_max_cmd_len=16384 76645bc899bSmrg # 76745bc899bSmrg if test -x /sbin/sysconfig; then 76845bc899bSmrg case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 76945bc899bSmrg *1*) lt_cv_sys_max_cmd_len=-1 ;; 77045bc899bSmrg esac 77145bc899bSmrg fi 77245bc899bSmrg ;; 77345bc899bSmrg sco3.2v5*) 77445bc899bSmrg lt_cv_sys_max_cmd_len=102400 77545bc899bSmrg ;; 77645bc899bSmrg sysv5* | sco5v6* | sysv4.2uw2*) 77745bc899bSmrg kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 77845bc899bSmrg if test -n "$kargmax"; then 77945bc899bSmrg lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` 78045bc899bSmrg else 78145bc899bSmrg lt_cv_sys_max_cmd_len=32768 78245bc899bSmrg fi 78345bc899bSmrg ;; 78445bc899bSmrg *) 78545bc899bSmrg # If test is not a shell built-in, we'll probably end up computing a 78645bc899bSmrg # maximum length that is only half of the actual maximum length, but 78745bc899bSmrg # we can't tell. 78845bc899bSmrg SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 78945bc899bSmrg while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \ 79045bc899bSmrg = "XX$teststring") >/dev/null 2>&1 && 79145bc899bSmrg new_result=`expr "X$teststring" : ".*" 2>&1` && 79245bc899bSmrg lt_cv_sys_max_cmd_len=$new_result && 79345bc899bSmrg test $i != 17 # 1/2 MB should be enough 79445bc899bSmrg do 79545bc899bSmrg i=`expr $i + 1` 79645bc899bSmrg teststring=$teststring$teststring 79745bc899bSmrg done 79845bc899bSmrg teststring= 79945bc899bSmrg # Add a significant safety factor because C++ compilers can tack on massive 80045bc899bSmrg # amounts of additional arguments before passing them to the linker. 80145bc899bSmrg # It appears as though 1/2 is a usable value. 80245bc899bSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 80345bc899bSmrg ;; 80445bc899bSmrg esac 80545bc899bSmrg]) 80645bc899bSmrgif test -n $lt_cv_sys_max_cmd_len ; then 80745bc899bSmrg AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 80845bc899bSmrgelse 80945bc899bSmrg AC_MSG_RESULT(none) 81045bc899bSmrgfi 81145bc899bSmrg])# AC_LIBTOOL_SYS_MAX_CMD_LEN 81245bc899bSmrg 81345bc899bSmrg 81445bc899bSmrg# _LT_AC_CHECK_DLFCN 81545bc899bSmrg# ------------------ 81645bc899bSmrgAC_DEFUN([_LT_AC_CHECK_DLFCN], 81745bc899bSmrg[AC_CHECK_HEADERS(dlfcn.h)dnl 81845bc899bSmrg])# _LT_AC_CHECK_DLFCN 81945bc899bSmrg 82045bc899bSmrg 82145bc899bSmrg# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 82245bc899bSmrg# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 82345bc899bSmrg# --------------------------------------------------------------------- 82445bc899bSmrgAC_DEFUN([_LT_AC_TRY_DLOPEN_SELF], 82545bc899bSmrg[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl 82645bc899bSmrgif test "$cross_compiling" = yes; then : 82745bc899bSmrg [$4] 82845bc899bSmrgelse 82945bc899bSmrg lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 83045bc899bSmrg lt_status=$lt_dlunknown 83145bc899bSmrg cat > conftest.$ac_ext <<EOF 83245bc899bSmrg[#line __oline__ "configure" 83345bc899bSmrg#include "confdefs.h" 83445bc899bSmrg 83545bc899bSmrg#if HAVE_DLFCN_H 83645bc899bSmrg#include <dlfcn.h> 83745bc899bSmrg#endif 83845bc899bSmrg 83945bc899bSmrg#include <stdio.h> 84045bc899bSmrg 84145bc899bSmrg#ifdef RTLD_GLOBAL 84245bc899bSmrg# define LT_DLGLOBAL RTLD_GLOBAL 84345bc899bSmrg#else 84445bc899bSmrg# ifdef DL_GLOBAL 84545bc899bSmrg# define LT_DLGLOBAL DL_GLOBAL 84645bc899bSmrg# else 84745bc899bSmrg# define LT_DLGLOBAL 0 84845bc899bSmrg# endif 84945bc899bSmrg#endif 85045bc899bSmrg 85145bc899bSmrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 85245bc899bSmrg find out it does not work in some platform. */ 85345bc899bSmrg#ifndef LT_DLLAZY_OR_NOW 85445bc899bSmrg# ifdef RTLD_LAZY 85545bc899bSmrg# define LT_DLLAZY_OR_NOW RTLD_LAZY 85645bc899bSmrg# else 85745bc899bSmrg# ifdef DL_LAZY 85845bc899bSmrg# define LT_DLLAZY_OR_NOW DL_LAZY 85945bc899bSmrg# else 86045bc899bSmrg# ifdef RTLD_NOW 86145bc899bSmrg# define LT_DLLAZY_OR_NOW RTLD_NOW 86245bc899bSmrg# else 86345bc899bSmrg# ifdef DL_NOW 86445bc899bSmrg# define LT_DLLAZY_OR_NOW DL_NOW 86545bc899bSmrg# else 86645bc899bSmrg# define LT_DLLAZY_OR_NOW 0 86745bc899bSmrg# endif 86845bc899bSmrg# endif 86945bc899bSmrg# endif 87045bc899bSmrg# endif 87145bc899bSmrg#endif 87245bc899bSmrg 87345bc899bSmrg#ifdef __cplusplus 87445bc899bSmrgextern "C" void exit (int); 87545bc899bSmrg#endif 87645bc899bSmrg 87745bc899bSmrgvoid fnord() { int i=42;} 87845bc899bSmrgint main () 87945bc899bSmrg{ 88045bc899bSmrg void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 88145bc899bSmrg int status = $lt_dlunknown; 88245bc899bSmrg 88345bc899bSmrg if (self) 88445bc899bSmrg { 88545bc899bSmrg if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 88645bc899bSmrg else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 88745bc899bSmrg /* dlclose (self); */ 88845bc899bSmrg } 88945bc899bSmrg else 89045bc899bSmrg puts (dlerror ()); 89145bc899bSmrg 89245bc899bSmrg exit (status); 89345bc899bSmrg}] 89445bc899bSmrgEOF 89545bc899bSmrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then 89645bc899bSmrg (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 89745bc899bSmrg lt_status=$? 89845bc899bSmrg case x$lt_status in 89945bc899bSmrg x$lt_dlno_uscore) $1 ;; 90045bc899bSmrg x$lt_dlneed_uscore) $2 ;; 90145bc899bSmrg x$lt_dlunknown|x*) $3 ;; 90245bc899bSmrg esac 90345bc899bSmrg else : 90445bc899bSmrg # compilation failed 90545bc899bSmrg $3 90645bc899bSmrg fi 90745bc899bSmrgfi 90845bc899bSmrgrm -fr conftest* 90945bc899bSmrg])# _LT_AC_TRY_DLOPEN_SELF 91045bc899bSmrg 91145bc899bSmrg 91245bc899bSmrg# AC_LIBTOOL_DLOPEN_SELF 91345bc899bSmrg# ---------------------- 91445bc899bSmrgAC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], 91545bc899bSmrg[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl 91645bc899bSmrgif test "x$enable_dlopen" != xyes; then 91745bc899bSmrg enable_dlopen=unknown 91845bc899bSmrg enable_dlopen_self=unknown 91945bc899bSmrg enable_dlopen_self_static=unknown 92045bc899bSmrgelse 92145bc899bSmrg lt_cv_dlopen=no 92245bc899bSmrg lt_cv_dlopen_libs= 92345bc899bSmrg 92445bc899bSmrg case $host_os in 92545bc899bSmrg beos*) 92645bc899bSmrg lt_cv_dlopen="load_add_on" 92745bc899bSmrg lt_cv_dlopen_libs= 92845bc899bSmrg lt_cv_dlopen_self=yes 92945bc899bSmrg ;; 93045bc899bSmrg 93145bc899bSmrg mingw* | pw32*) 93245bc899bSmrg lt_cv_dlopen="LoadLibrary" 93345bc899bSmrg lt_cv_dlopen_libs= 93445bc899bSmrg ;; 93545bc899bSmrg 93645bc899bSmrg cygwin*) 93745bc899bSmrg lt_cv_dlopen="dlopen" 93845bc899bSmrg lt_cv_dlopen_libs= 93945bc899bSmrg ;; 94045bc899bSmrg 94145bc899bSmrg darwin*) 94245bc899bSmrg # if libdl is installed we need to link against it 94345bc899bSmrg AC_CHECK_LIB([dl], [dlopen], 94445bc899bSmrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ 94545bc899bSmrg lt_cv_dlopen="dyld" 94645bc899bSmrg lt_cv_dlopen_libs= 94745bc899bSmrg lt_cv_dlopen_self=yes 94845bc899bSmrg ]) 94945bc899bSmrg ;; 95045bc899bSmrg 95145bc899bSmrg *) 95245bc899bSmrg AC_CHECK_FUNC([shl_load], 95345bc899bSmrg [lt_cv_dlopen="shl_load"], 95445bc899bSmrg [AC_CHECK_LIB([dld], [shl_load], 95545bc899bSmrg [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"], 95645bc899bSmrg [AC_CHECK_FUNC([dlopen], 95745bc899bSmrg [lt_cv_dlopen="dlopen"], 95845bc899bSmrg [AC_CHECK_LIB([dl], [dlopen], 95945bc899bSmrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], 96045bc899bSmrg [AC_CHECK_LIB([svld], [dlopen], 96145bc899bSmrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], 96245bc899bSmrg [AC_CHECK_LIB([dld], [dld_link], 96345bc899bSmrg [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"]) 96445bc899bSmrg ]) 96545bc899bSmrg ]) 96645bc899bSmrg ]) 96745bc899bSmrg ]) 96845bc899bSmrg ]) 96945bc899bSmrg ;; 97045bc899bSmrg esac 97145bc899bSmrg 97245bc899bSmrg if test "x$lt_cv_dlopen" != xno; then 97345bc899bSmrg enable_dlopen=yes 97445bc899bSmrg else 97545bc899bSmrg enable_dlopen=no 97645bc899bSmrg fi 97745bc899bSmrg 97845bc899bSmrg case $lt_cv_dlopen in 97945bc899bSmrg dlopen) 98045bc899bSmrg save_CPPFLAGS="$CPPFLAGS" 98145bc899bSmrg test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 98245bc899bSmrg 98345bc899bSmrg save_LDFLAGS="$LDFLAGS" 98445bc899bSmrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 98545bc899bSmrg 98645bc899bSmrg save_LIBS="$LIBS" 98745bc899bSmrg LIBS="$lt_cv_dlopen_libs $LIBS" 98845bc899bSmrg 98945bc899bSmrg AC_CACHE_CHECK([whether a program can dlopen itself], 99045bc899bSmrg lt_cv_dlopen_self, [dnl 99145bc899bSmrg _LT_AC_TRY_DLOPEN_SELF( 99245bc899bSmrg lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 99345bc899bSmrg lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 99445bc899bSmrg ]) 99545bc899bSmrg 99645bc899bSmrg if test "x$lt_cv_dlopen_self" = xyes; then 99745bc899bSmrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 99845bc899bSmrg AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 99945bc899bSmrg lt_cv_dlopen_self_static, [dnl 100045bc899bSmrg _LT_AC_TRY_DLOPEN_SELF( 100145bc899bSmrg lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 100245bc899bSmrg lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 100345bc899bSmrg ]) 100445bc899bSmrg fi 100545bc899bSmrg 100645bc899bSmrg CPPFLAGS="$save_CPPFLAGS" 100745bc899bSmrg LDFLAGS="$save_LDFLAGS" 100845bc899bSmrg LIBS="$save_LIBS" 100945bc899bSmrg ;; 101045bc899bSmrg esac 101145bc899bSmrg 101245bc899bSmrg case $lt_cv_dlopen_self in 101345bc899bSmrg yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 101445bc899bSmrg *) enable_dlopen_self=unknown ;; 101545bc899bSmrg esac 101645bc899bSmrg 101745bc899bSmrg case $lt_cv_dlopen_self_static in 101845bc899bSmrg yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 101945bc899bSmrg *) enable_dlopen_self_static=unknown ;; 102045bc899bSmrg esac 102145bc899bSmrgfi 102245bc899bSmrg])# AC_LIBTOOL_DLOPEN_SELF 102345bc899bSmrg 102445bc899bSmrg 102545bc899bSmrg# AC_LIBTOOL_PROG_CC_C_O([TAGNAME]) 102645bc899bSmrg# --------------------------------- 102745bc899bSmrg# Check to see if options -c and -o are simultaneously supported by compiler 102845bc899bSmrgAC_DEFUN([AC_LIBTOOL_PROG_CC_C_O], 102945bc899bSmrg[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl 103045bc899bSmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 103145bc899bSmrg [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 103245bc899bSmrg [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 103345bc899bSmrg $rm -r conftest 2>/dev/null 103445bc899bSmrg mkdir conftest 103545bc899bSmrg cd conftest 103645bc899bSmrg mkdir out 103745bc899bSmrg printf "$lt_simple_compile_test_code" > conftest.$ac_ext 103845bc899bSmrg 103945bc899bSmrg lt_compiler_flag="-o out/conftest2.$ac_objext" 104045bc899bSmrg # Insert the option either (1) after the last *FLAGS variable, or 104145bc899bSmrg # (2) before a word containing "conftest.", or (3) at the end. 104245bc899bSmrg # Note that $ac_compile itself does not contain backslashes and begins 104345bc899bSmrg # with a dollar sign (not a hyphen), so the echo should work correctly. 104445bc899bSmrg lt_compile=`echo "$ac_compile" | $SED \ 104545bc899bSmrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 104645bc899bSmrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 104745bc899bSmrg -e 's:$: $lt_compiler_flag:'` 104845bc899bSmrg (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 104945bc899bSmrg (eval "$lt_compile" 2>out/conftest.err) 105045bc899bSmrg ac_status=$? 105145bc899bSmrg cat out/conftest.err >&AS_MESSAGE_LOG_FD 105245bc899bSmrg echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 105345bc899bSmrg if (exit $ac_status) && test -s out/conftest2.$ac_objext 105445bc899bSmrg then 105545bc899bSmrg # The compiler can only warn and ignore the option if not recognized 105645bc899bSmrg # So say no if there are warnings 105745bc899bSmrg $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp 105845bc899bSmrg $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 105945bc899bSmrg if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 106045bc899bSmrg _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 106145bc899bSmrg fi 106245bc899bSmrg fi 106345bc899bSmrg chmod u+w . 2>&AS_MESSAGE_LOG_FD 106445bc899bSmrg $rm conftest* 106545bc899bSmrg # SGI C++ compiler will create directory out/ii_files/ for 106645bc899bSmrg # template instantiation 106745bc899bSmrg test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files 106845bc899bSmrg $rm out/* && rmdir out 106945bc899bSmrg cd .. 107045bc899bSmrg rmdir conftest 107145bc899bSmrg $rm conftest* 107245bc899bSmrg]) 107345bc899bSmrg])# AC_LIBTOOL_PROG_CC_C_O 107445bc899bSmrg 107545bc899bSmrg 107645bc899bSmrg# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME]) 107745bc899bSmrg# ----------------------------------------- 107845bc899bSmrg# Check to see if we can do hard links to lock some files if needed 107945bc899bSmrgAC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], 108045bc899bSmrg[AC_REQUIRE([_LT_AC_LOCK])dnl 108145bc899bSmrg 108245bc899bSmrghard_links="nottested" 108345bc899bSmrgif test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then 108445bc899bSmrg # do not overwrite the value of need_locks provided by the user 108545bc899bSmrg AC_MSG_CHECKING([if we can lock with hard links]) 108645bc899bSmrg hard_links=yes 108745bc899bSmrg $rm conftest* 108845bc899bSmrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 108945bc899bSmrg touch conftest.a 109045bc899bSmrg ln conftest.a conftest.b 2>&5 || hard_links=no 109145bc899bSmrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 109245bc899bSmrg AC_MSG_RESULT([$hard_links]) 109345bc899bSmrg if test "$hard_links" = no; then 109445bc899bSmrg AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) 109545bc899bSmrg need_locks=warn 109645bc899bSmrg fi 109745bc899bSmrgelse 109845bc899bSmrg need_locks=no 109945bc899bSmrgfi 110045bc899bSmrg])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS 110145bc899bSmrg 110245bc899bSmrg 110345bc899bSmrg# AC_LIBTOOL_OBJDIR 110445bc899bSmrg# ----------------- 110545bc899bSmrgAC_DEFUN([AC_LIBTOOL_OBJDIR], 110645bc899bSmrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 110745bc899bSmrg[rm -f .libs 2>/dev/null 110845bc899bSmrgmkdir .libs 2>/dev/null 110945bc899bSmrgif test -d .libs; then 111045bc899bSmrg lt_cv_objdir=.libs 111145bc899bSmrgelse 111245bc899bSmrg # MS-DOS does not allow filenames that begin with a dot. 111345bc899bSmrg lt_cv_objdir=_libs 111445bc899bSmrgfi 111545bc899bSmrgrmdir .libs 2>/dev/null]) 111645bc899bSmrgobjdir=$lt_cv_objdir 111745bc899bSmrg])# AC_LIBTOOL_OBJDIR 111845bc899bSmrg 111945bc899bSmrg 112045bc899bSmrg# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME]) 112145bc899bSmrg# ---------------------------------------------- 112245bc899bSmrg# Check hardcoding attributes. 112345bc899bSmrgAC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], 112445bc899bSmrg[AC_MSG_CHECKING([how to hardcode library paths into programs]) 112545bc899bSmrg_LT_AC_TAGVAR(hardcode_action, $1)= 112645bc899bSmrgif test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \ 112745bc899bSmrg test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \ 112845bc899bSmrg test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then 112945bc899bSmrg 113045bc899bSmrg # We can hardcode non-existant directories. 113145bc899bSmrg if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no && 113245bc899bSmrg # If the only mechanism to avoid hardcoding is shlibpath_var, we 113345bc899bSmrg # have to relink, otherwise we might link with an installed library 113445bc899bSmrg # when we should be linking with a yet-to-be-installed one 113545bc899bSmrg ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no && 113645bc899bSmrg test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then 113745bc899bSmrg # Linking always hardcodes the temporary library directory. 113845bc899bSmrg _LT_AC_TAGVAR(hardcode_action, $1)=relink 113945bc899bSmrg else 114045bc899bSmrg # We can link without hardcoding, and we can hardcode nonexisting dirs. 114145bc899bSmrg _LT_AC_TAGVAR(hardcode_action, $1)=immediate 114245bc899bSmrg fi 114345bc899bSmrgelse 114445bc899bSmrg # We cannot hardcode anything, or else we can only hardcode existing 114545bc899bSmrg # directories. 114645bc899bSmrg _LT_AC_TAGVAR(hardcode_action, $1)=unsupported 114745bc899bSmrgfi 114845bc899bSmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)]) 114945bc899bSmrg 115045bc899bSmrgif test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then 115145bc899bSmrg # Fast installation is not supported 115245bc899bSmrg enable_fast_install=no 115345bc899bSmrgelif test "$shlibpath_overrides_runpath" = yes || 115445bc899bSmrg test "$enable_shared" = no; then 115545bc899bSmrg # Fast installation is not necessary 115645bc899bSmrg enable_fast_install=needless 115745bc899bSmrgfi 115845bc899bSmrg])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH 115945bc899bSmrg 116045bc899bSmrg 116145bc899bSmrg# AC_LIBTOOL_SYS_LIB_STRIP 116245bc899bSmrg# ------------------------ 116345bc899bSmrgAC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP], 116445bc899bSmrg[striplib= 116545bc899bSmrgold_striplib= 116645bc899bSmrgAC_MSG_CHECKING([whether stripping libraries is possible]) 116745bc899bSmrgif test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then 116845bc899bSmrg test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" 116945bc899bSmrg test -z "$striplib" && striplib="$STRIP --strip-unneeded" 117045bc899bSmrg AC_MSG_RESULT([yes]) 117145bc899bSmrgelse 117245bc899bSmrg# FIXME - insert some real tests, host_os isn't really good enough 117345bc899bSmrg case $host_os in 117445bc899bSmrg darwin*) 117545bc899bSmrg if test -n "$STRIP" ; then 117645bc899bSmrg striplib="$STRIP -x" 117745bc899bSmrg AC_MSG_RESULT([yes]) 117845bc899bSmrg else 117945bc899bSmrg AC_MSG_RESULT([no]) 118045bc899bSmrgfi 118145bc899bSmrg ;; 118245bc899bSmrg *) 118345bc899bSmrg AC_MSG_RESULT([no]) 118445bc899bSmrg ;; 118545bc899bSmrg esac 118645bc899bSmrgfi 118745bc899bSmrg])# AC_LIBTOOL_SYS_LIB_STRIP 118845bc899bSmrg 118945bc899bSmrg 119045bc899bSmrg# AC_LIBTOOL_SYS_DYNAMIC_LINKER 119145bc899bSmrg# ----------------------------- 119245bc899bSmrg# PORTME Fill in your ld.so characteristics 119345bc899bSmrgAC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER], 119445bc899bSmrg[AC_MSG_CHECKING([dynamic linker characteristics]) 119545bc899bSmrglibrary_names_spec= 119645bc899bSmrglibname_spec='lib$name' 119745bc899bSmrgsoname_spec= 119845bc899bSmrgshrext_cmds=".so" 119945bc899bSmrgpostinstall_cmds= 120045bc899bSmrgpostuninstall_cmds= 120145bc899bSmrgfinish_cmds= 120245bc899bSmrgfinish_eval= 120345bc899bSmrgshlibpath_var= 120445bc899bSmrgshlibpath_overrides_runpath=unknown 120545bc899bSmrgversion_type=none 120645bc899bSmrgdynamic_linker="$host_os ld.so" 120745bc899bSmrgsys_lib_dlsearch_path_spec="/lib /usr/lib" 120845bc899bSmrgif test "$GCC" = yes; then 120945bc899bSmrg sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` 121045bc899bSmrg if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then 121145bc899bSmrg # if the path contains ";" then we assume it to be the separator 121245bc899bSmrg # otherwise default to the standard path separator (i.e. ":") - it is 121345bc899bSmrg # assumed that no part of a normal pathname contains ";" but that should 121445bc899bSmrg # okay in the real world where ";" in dirpaths is itself problematic. 121545bc899bSmrg sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 121645bc899bSmrg else 121745bc899bSmrg sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 121845bc899bSmrg fi 121945bc899bSmrgelse 122045bc899bSmrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 122145bc899bSmrgfi 122245bc899bSmrgneed_lib_prefix=unknown 122345bc899bSmrghardcode_into_libs=no 122445bc899bSmrg 122545bc899bSmrg# when you set need_version to no, make sure it does not cause -set_version 122645bc899bSmrg# flags to be left without arguments 122745bc899bSmrgneed_version=unknown 122845bc899bSmrg 122945bc899bSmrgcase $host_os in 123045bc899bSmrgaix3*) 123145bc899bSmrg version_type=linux 123245bc899bSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' 123345bc899bSmrg shlibpath_var=LIBPATH 123445bc899bSmrg 123545bc899bSmrg # AIX 3 has no versioning support, so we append a major version to the name. 123645bc899bSmrg soname_spec='${libname}${release}${shared_ext}$major' 123745bc899bSmrg ;; 123845bc899bSmrg 123945bc899bSmrgaix4* | aix5*) 124045bc899bSmrg version_type=linux 124145bc899bSmrg need_lib_prefix=no 124245bc899bSmrg need_version=no 124345bc899bSmrg hardcode_into_libs=yes 124445bc899bSmrg if test "$host_cpu" = ia64; then 124545bc899bSmrg # AIX 5 supports IA64 124645bc899bSmrg library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' 124745bc899bSmrg shlibpath_var=LD_LIBRARY_PATH 124845bc899bSmrg else 124945bc899bSmrg # With GCC up to 2.95.x, collect2 would create an import file 125045bc899bSmrg # for dependence libraries. The import file would start with 125145bc899bSmrg # the line `#! .'. This would cause the generated library to 125245bc899bSmrg # depend on `.', always an invalid library. This was fixed in 125345bc899bSmrg # development snapshots of GCC prior to 3.0. 125445bc899bSmrg case $host_os in 125545bc899bSmrg aix4 | aix4.[[01]] | aix4.[[01]].*) 125645bc899bSmrg if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 125745bc899bSmrg echo ' yes ' 125845bc899bSmrg echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then 125945bc899bSmrg : 126045bc899bSmrg else 126145bc899bSmrg can_build_shared=no 126245bc899bSmrg fi 126345bc899bSmrg ;; 126445bc899bSmrg esac 126545bc899bSmrg # AIX (on Power*) has no versioning support, so currently we can not hardcode correct 126645bc899bSmrg # soname into executable. Probably we can add versioning support to 126745bc899bSmrg # collect2, so additional links can be useful in future. 126845bc899bSmrg if test "$aix_use_runtimelinking" = yes; then 126945bc899bSmrg # If using run time linking (on AIX 4.2 or later) use lib<name>.so 127045bc899bSmrg # instead of lib<name>.a to let people know that these are not 127145bc899bSmrg # typical AIX shared libraries. 127245bc899bSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 127345bc899bSmrg else 127445bc899bSmrg # We preserve .a as extension for shared libraries through AIX4.2 127545bc899bSmrg # and later when we are not doing run time linking. 127645bc899bSmrg library_names_spec='${libname}${release}.a $libname.a' 127745bc899bSmrg soname_spec='${libname}${release}${shared_ext}$major' 127845bc899bSmrg fi 127945bc899bSmrg shlibpath_var=LIBPATH 128045bc899bSmrg fi 128145bc899bSmrg ;; 128245bc899bSmrg 128345bc899bSmrgamigaos*) 128445bc899bSmrg library_names_spec='$libname.ixlibrary $libname.a' 128545bc899bSmrg # Create ${libname}_ixlibrary.a entries in /sys/libs. 128645bc899bSmrg 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' 128745bc899bSmrg ;; 128845bc899bSmrg 128945bc899bSmrgbeos*) 129045bc899bSmrg library_names_spec='${libname}${shared_ext}' 129145bc899bSmrg dynamic_linker="$host_os ld.so" 129245bc899bSmrg shlibpath_var=LIBRARY_PATH 129345bc899bSmrg ;; 129445bc899bSmrg 129545bc899bSmrgbsdi[[45]]*) 129645bc899bSmrg version_type=linux 129745bc899bSmrg need_version=no 129845bc899bSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 129945bc899bSmrg soname_spec='${libname}${release}${shared_ext}$major' 130045bc899bSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 130145bc899bSmrg shlibpath_var=LD_LIBRARY_PATH 130245bc899bSmrg sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 130345bc899bSmrg sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 130445bc899bSmrg # the default ld.so.conf also contains /usr/contrib/lib and 130545bc899bSmrg # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 130645bc899bSmrg # libtool to hard-code these into programs 130745bc899bSmrg ;; 130845bc899bSmrg 130945bc899bSmrgcygwin* | mingw* | pw32*) 131045bc899bSmrg version_type=windows 131145bc899bSmrg shrext_cmds=".dll" 131245bc899bSmrg need_version=no 131345bc899bSmrg need_lib_prefix=no 131445bc899bSmrg 131545bc899bSmrg case $GCC,$host_os in 131645bc899bSmrg yes,cygwin* | yes,mingw* | yes,pw32*) 131745bc899bSmrg library_names_spec='$libname.dll.a' 131845bc899bSmrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 131945bc899bSmrg postinstall_cmds='base_file=`basename \${file}`~ 132045bc899bSmrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ 132145bc899bSmrg dldir=$destdir/`dirname \$dlpath`~ 132245bc899bSmrg test -d \$dldir || mkdir -p \$dldir~ 132345bc899bSmrg $install_prog $dir/$dlname \$dldir/$dlname~ 132445bc899bSmrg chmod a+x \$dldir/$dlname' 132545bc899bSmrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 132645bc899bSmrg dlpath=$dir/\$dldll~ 132745bc899bSmrg $rm \$dlpath' 132845bc899bSmrg shlibpath_overrides_runpath=yes 132945bc899bSmrg 133045bc899bSmrg case $host_os in 133145bc899bSmrg cygwin*) 133245bc899bSmrg # Cygwin DLLs use 'cyg' prefix rather than 'lib' 133345bc899bSmrg soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 133445bc899bSmrg sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" 133545bc899bSmrg ;; 133645bc899bSmrg mingw*) 133745bc899bSmrg # MinGW DLLs use traditional 'lib' prefix 133845bc899bSmrg soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 133945bc899bSmrg sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` 134045bc899bSmrg if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then 134145bc899bSmrg # It is most probably a Windows format PATH printed by 134245bc899bSmrg # mingw gcc, but we are running on Cygwin. Gcc prints its search 134345bc899bSmrg # path with ; separators, and with drive letters. We can handle the 134445bc899bSmrg # drive letters (cygwin fileutils understands them), so leave them, 134545bc899bSmrg # especially as we might pass files found there to a mingw objdump, 134645bc899bSmrg # which wouldn't understand a cygwinified path. Ahh. 134745bc899bSmrg sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 134845bc899bSmrg else 134945bc899bSmrg sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 135045bc899bSmrg fi 135145bc899bSmrg ;; 135245bc899bSmrg pw32*) 135345bc899bSmrg # pw32 DLLs use 'pw' prefix rather than 'lib' 135445bc899bSmrg library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 135545bc899bSmrg ;; 135645bc899bSmrg esac 135745bc899bSmrg ;; 135845bc899bSmrg 135945bc899bSmrg *) 136045bc899bSmrg library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' 136145bc899bSmrg ;; 136245bc899bSmrg esac 136345bc899bSmrg dynamic_linker='Win32 ld.exe' 136445bc899bSmrg # FIXME: first we should search . and the directory the executable is in 136545bc899bSmrg shlibpath_var=PATH 136645bc899bSmrg ;; 136745bc899bSmrg 136845bc899bSmrgdarwin* | rhapsody*) 136945bc899bSmrg dynamic_linker="$host_os dyld" 137045bc899bSmrg version_type=darwin 137145bc899bSmrg need_lib_prefix=no 137245bc899bSmrg need_version=no 137345bc899bSmrg library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' 137445bc899bSmrg soname_spec='${libname}${release}${major}$shared_ext' 137545bc899bSmrg shlibpath_overrides_runpath=yes 137645bc899bSmrg shlibpath_var=DYLD_LIBRARY_PATH 137745bc899bSmrg shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 137845bc899bSmrg # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. 137945bc899bSmrg if test "$GCC" = yes; then 138045bc899bSmrg sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` 138145bc899bSmrg else 138245bc899bSmrg sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' 138345bc899bSmrg fi 138445bc899bSmrg sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 138545bc899bSmrg ;; 138645bc899bSmrg 138745bc899bSmrgdgux*) 138845bc899bSmrg version_type=linux 138945bc899bSmrg need_lib_prefix=no 139045bc899bSmrg need_version=no 139145bc899bSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' 139245bc899bSmrg soname_spec='${libname}${release}${shared_ext}$major' 139345bc899bSmrg shlibpath_var=LD_LIBRARY_PATH 139445bc899bSmrg ;; 139545bc899bSmrg 139645bc899bSmrgfreebsd1*) 139745bc899bSmrg dynamic_linker=no 139845bc899bSmrg ;; 139945bc899bSmrg 140045bc899bSmrgkfreebsd*-gnu) 140145bc899bSmrg version_type=linux 140245bc899bSmrg need_lib_prefix=no 140345bc899bSmrg need_version=no 140445bc899bSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 140545bc899bSmrg soname_spec='${libname}${release}${shared_ext}$major' 140645bc899bSmrg shlibpath_var=LD_LIBRARY_PATH 140745bc899bSmrg shlibpath_overrides_runpath=no 140845bc899bSmrg hardcode_into_libs=yes 140945bc899bSmrg dynamic_linker='GNU ld.so' 141045bc899bSmrg ;; 141145bc899bSmrg 141245bc899bSmrgfreebsd* | dragonfly*) 141345bc899bSmrg # DragonFly does not have aout. When/if they implement a new 141445bc899bSmrg # versioning mechanism, adjust this. 141545bc899bSmrg if test -x /usr/bin/objformat; then 141645bc899bSmrg objformat=`/usr/bin/objformat` 141745bc899bSmrg else 141845bc899bSmrg case $host_os in 141945bc899bSmrg freebsd[[123]]*) objformat=aout ;; 142045bc899bSmrg *) objformat=elf ;; 142145bc899bSmrg esac 142245bc899bSmrg fi 142345bc899bSmrg version_type=freebsd-$objformat 142445bc899bSmrg case $version_type in 142545bc899bSmrg freebsd-elf*) 142645bc899bSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 142745bc899bSmrg need_version=no 142845bc899bSmrg need_lib_prefix=no 142945bc899bSmrg ;; 143045bc899bSmrg freebsd-*) 143145bc899bSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' 143245bc899bSmrg need_version=yes 143345bc899bSmrg ;; 143445bc899bSmrg esac 143545bc899bSmrg shlibpath_var=LD_LIBRARY_PATH 143645bc899bSmrg case $host_os in 143745bc899bSmrg freebsd2*) 143845bc899bSmrg shlibpath_overrides_runpath=yes 143945bc899bSmrg ;; 144045bc899bSmrg freebsd3.[[01]]* | freebsdelf3.[[01]]*) 144145bc899bSmrg shlibpath_overrides_runpath=yes 144245bc899bSmrg hardcode_into_libs=yes 144345bc899bSmrg ;; 144445bc899bSmrg freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 144545bc899bSmrg freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 144645bc899bSmrg shlibpath_overrides_runpath=no 144745bc899bSmrg hardcode_into_libs=yes 144845bc899bSmrg ;; 144945bc899bSmrg freebsd*) # from 4.6 on 145045bc899bSmrg shlibpath_overrides_runpath=yes 145145bc899bSmrg hardcode_into_libs=yes 145245bc899bSmrg ;; 145345bc899bSmrg esac 145445bc899bSmrg ;; 145545bc899bSmrg 145645bc899bSmrggnu*) 145745bc899bSmrg version_type=linux 145845bc899bSmrg need_lib_prefix=no 145945bc899bSmrg need_version=no 146045bc899bSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 146145bc899bSmrg soname_spec='${libname}${release}${shared_ext}$major' 146245bc899bSmrg shlibpath_var=LD_LIBRARY_PATH 146345bc899bSmrg hardcode_into_libs=yes 146445bc899bSmrg ;; 146545bc899bSmrg 146645bc899bSmrghpux9* | hpux10* | hpux11*) 146745bc899bSmrg # Give a soname corresponding to the major version so that dld.sl refuses to 146845bc899bSmrg # link against other versions. 146945bc899bSmrg version_type=sunos 147045bc899bSmrg need_lib_prefix=no 147145bc899bSmrg need_version=no 147245bc899bSmrg case $host_cpu in 147345bc899bSmrg ia64*) 147445bc899bSmrg shrext_cmds='.so' 147545bc899bSmrg hardcode_into_libs=yes 147645bc899bSmrg dynamic_linker="$host_os dld.so" 147745bc899bSmrg shlibpath_var=LD_LIBRARY_PATH 147845bc899bSmrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 147945bc899bSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 148045bc899bSmrg soname_spec='${libname}${release}${shared_ext}$major' 148145bc899bSmrg if test "X$HPUX_IA64_MODE" = X32; then 148245bc899bSmrg sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 148345bc899bSmrg else 148445bc899bSmrg sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 148545bc899bSmrg fi 148645bc899bSmrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 148745bc899bSmrg ;; 148845bc899bSmrg hppa*64*) 148945bc899bSmrg shrext_cmds='.sl' 149045bc899bSmrg hardcode_into_libs=yes 149145bc899bSmrg dynamic_linker="$host_os dld.sl" 149245bc899bSmrg shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 149345bc899bSmrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 149445bc899bSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 149545bc899bSmrg soname_spec='${libname}${release}${shared_ext}$major' 149645bc899bSmrg sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 149745bc899bSmrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 149845bc899bSmrg ;; 149945bc899bSmrg *) 150045bc899bSmrg shrext_cmds='.sl' 150145bc899bSmrg dynamic_linker="$host_os dld.sl" 150245bc899bSmrg shlibpath_var=SHLIB_PATH 150345bc899bSmrg shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 150445bc899bSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 150545bc899bSmrg soname_spec='${libname}${release}${shared_ext}$major' 150645bc899bSmrg ;; 150745bc899bSmrg esac 150845bc899bSmrg # HP-UX runs *really* slowly unless shared libraries are mode 555. 150945bc899bSmrg postinstall_cmds='chmod 555 $lib' 151045bc899bSmrg ;; 151145bc899bSmrg 151245bc899bSmrginterix3*) 151345bc899bSmrg version_type=linux 151445bc899bSmrg need_lib_prefix=no 151545bc899bSmrg need_version=no 151645bc899bSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 151745bc899bSmrg soname_spec='${libname}${release}${shared_ext}$major' 151845bc899bSmrg dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 151945bc899bSmrg shlibpath_var=LD_LIBRARY_PATH 152045bc899bSmrg shlibpath_overrides_runpath=no 152145bc899bSmrg hardcode_into_libs=yes 152245bc899bSmrg ;; 152345bc899bSmrg 152445bc899bSmrgirix5* | irix6* | nonstopux*) 152545bc899bSmrg case $host_os in 152645bc899bSmrg nonstopux*) version_type=nonstopux ;; 152745bc899bSmrg *) 152845bc899bSmrg if test "$lt_cv_prog_gnu_ld" = yes; then 152945bc899bSmrg version_type=linux 153045bc899bSmrg else 153145bc899bSmrg version_type=irix 153245bc899bSmrg fi ;; 153345bc899bSmrg esac 153445bc899bSmrg need_lib_prefix=no 153545bc899bSmrg need_version=no 153645bc899bSmrg soname_spec='${libname}${release}${shared_ext}$major' 153745bc899bSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' 153845bc899bSmrg case $host_os in 153945bc899bSmrg irix5* | nonstopux*) 154045bc899bSmrg libsuff= shlibsuff= 154145bc899bSmrg ;; 154245bc899bSmrg *) 154345bc899bSmrg case $LD in # libtool.m4 will add one of these switches to LD 154445bc899bSmrg *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 154545bc899bSmrg libsuff= shlibsuff= libmagic=32-bit;; 154645bc899bSmrg *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 154745bc899bSmrg libsuff=32 shlibsuff=N32 libmagic=N32;; 154845bc899bSmrg *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 154945bc899bSmrg libsuff=64 shlibsuff=64 libmagic=64-bit;; 155045bc899bSmrg *) libsuff= shlibsuff= libmagic=never-match;; 155145bc899bSmrg esac 155245bc899bSmrg ;; 155345bc899bSmrg esac 155445bc899bSmrg shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 155545bc899bSmrg shlibpath_overrides_runpath=no 155645bc899bSmrg sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" 155745bc899bSmrg sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" 155845bc899bSmrg hardcode_into_libs=yes 155945bc899bSmrg ;; 156045bc899bSmrg 156145bc899bSmrg# No shared lib support for Linux oldld, aout, or coff. 156245bc899bSmrglinux*oldld* | linux*aout* | linux*coff*) 156345bc899bSmrg dynamic_linker=no 156445bc899bSmrg ;; 156545bc899bSmrg 156645bc899bSmrg# This must be Linux ELF. 156745bc899bSmrglinux*) 156845bc899bSmrg version_type=linux 156945bc899bSmrg need_lib_prefix=no 157045bc899bSmrg need_version=no 157145bc899bSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 157245bc899bSmrg soname_spec='${libname}${release}${shared_ext}$major' 157345bc899bSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 157445bc899bSmrg shlibpath_var=LD_LIBRARY_PATH 157545bc899bSmrg shlibpath_overrides_runpath=no 157645bc899bSmrg # This implies no fast_install, which is unacceptable. 157745bc899bSmrg # Some rework will be needed to allow for fast_install 157845bc899bSmrg # before this can be enabled. 157945bc899bSmrg hardcode_into_libs=yes 158045bc899bSmrg 158145bc899bSmrg # find out which ABI we are using 158245bc899bSmrg libsuff= 158345bc899bSmrg case "$host_cpu" in 158445bc899bSmrg x86_64*|s390x*|powerpc64*) 158545bc899bSmrg echo '[#]line __oline__ "configure"' > conftest.$ac_ext 158645bc899bSmrg if AC_TRY_EVAL(ac_compile); then 158745bc899bSmrg case `/usr/bin/file conftest.$ac_objext` in 158845bc899bSmrg *64-bit*) 158945bc899bSmrg libsuff=64 159045bc899bSmrg sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}" 159145bc899bSmrg ;; 159245bc899bSmrg esac 159345bc899bSmrg fi 159445bc899bSmrg rm -rf conftest* 159545bc899bSmrg ;; 159645bc899bSmrg esac 159745bc899bSmrg 159845bc899bSmrg # Append ld.so.conf contents to the search path 159945bc899bSmrg if test -f /etc/ld.so.conf; then 160045bc899bSmrg 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/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` 160145bc899bSmrg sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra" 160245bc899bSmrg fi 160345bc899bSmrg 160445bc899bSmrg # We used to test for /lib/ld.so.1 and disable shared libraries on 160545bc899bSmrg # powerpc, because MkLinux only supported shared libraries with the 160645bc899bSmrg # GNU dynamic linker. Since this was broken with cross compilers, 160745bc899bSmrg # most powerpc-linux boxes support dynamic linking these days and 160845bc899bSmrg # people can always --disable-shared, the test was removed, and we 160945bc899bSmrg # assume the GNU/Linux dynamic linker is in use. 161045bc899bSmrg dynamic_linker='GNU/Linux ld.so' 161145bc899bSmrg ;; 161245bc899bSmrg 161345bc899bSmrgknetbsd*-gnu) 161445bc899bSmrg version_type=linux 161545bc899bSmrg need_lib_prefix=no 161645bc899bSmrg need_version=no 161745bc899bSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 161845bc899bSmrg soname_spec='${libname}${release}${shared_ext}$major' 161945bc899bSmrg shlibpath_var=LD_LIBRARY_PATH 162045bc899bSmrg shlibpath_overrides_runpath=no 162145bc899bSmrg hardcode_into_libs=yes 162245bc899bSmrg dynamic_linker='GNU ld.so' 162345bc899bSmrg ;; 162445bc899bSmrg 162545bc899bSmrgnetbsd*) 162645bc899bSmrg version_type=sunos 162745bc899bSmrg need_lib_prefix=no 162845bc899bSmrg need_version=no 162945bc899bSmrg if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then 163045bc899bSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 163145bc899bSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 163245bc899bSmrg dynamic_linker='NetBSD (a.out) ld.so' 163345bc899bSmrg else 163445bc899bSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 163545bc899bSmrg soname_spec='${libname}${release}${shared_ext}$major' 163645bc899bSmrg dynamic_linker='NetBSD ld.elf_so' 163745bc899bSmrg fi 163845bc899bSmrg shlibpath_var=LD_LIBRARY_PATH 163945bc899bSmrg shlibpath_overrides_runpath=yes 164045bc899bSmrg hardcode_into_libs=yes 164145bc899bSmrg ;; 164245bc899bSmrg 164345bc899bSmrgnewsos6) 164445bc899bSmrg version_type=linux 164545bc899bSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 164645bc899bSmrg shlibpath_var=LD_LIBRARY_PATH 164745bc899bSmrg shlibpath_overrides_runpath=yes 164845bc899bSmrg ;; 164945bc899bSmrg 165045bc899bSmrgnto-qnx*) 165145bc899bSmrg version_type=linux 165245bc899bSmrg need_lib_prefix=no 165345bc899bSmrg need_version=no 165445bc899bSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 165545bc899bSmrg soname_spec='${libname}${release}${shared_ext}$major' 165645bc899bSmrg shlibpath_var=LD_LIBRARY_PATH 165745bc899bSmrg shlibpath_overrides_runpath=yes 165845bc899bSmrg ;; 165945bc899bSmrg 166045bc899bSmrgopenbsd*) 166145bc899bSmrg version_type=sunos 166245bc899bSmrg sys_lib_dlsearch_path_spec="/usr/lib" 166345bc899bSmrg need_lib_prefix=no 166445bc899bSmrg # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. 166545bc899bSmrg case $host_os in 166645bc899bSmrg openbsd3.3 | openbsd3.3.*) need_version=yes ;; 166745bc899bSmrg *) need_version=no ;; 166845bc899bSmrg esac 166945bc899bSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 167045bc899bSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 167145bc899bSmrg shlibpath_var=LD_LIBRARY_PATH 167245bc899bSmrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 167345bc899bSmrg case $host_os in 167445bc899bSmrg openbsd2.[[89]] | openbsd2.[[89]].*) 167545bc899bSmrg shlibpath_overrides_runpath=no 167645bc899bSmrg ;; 167745bc899bSmrg *) 167845bc899bSmrg shlibpath_overrides_runpath=yes 167945bc899bSmrg ;; 168045bc899bSmrg esac 168145bc899bSmrg else 168245bc899bSmrg shlibpath_overrides_runpath=yes 168345bc899bSmrg fi 168445bc899bSmrg ;; 168545bc899bSmrg 168645bc899bSmrgos2*) 168745bc899bSmrg libname_spec='$name' 168845bc899bSmrg shrext_cmds=".dll" 168945bc899bSmrg need_lib_prefix=no 169045bc899bSmrg library_names_spec='$libname${shared_ext} $libname.a' 169145bc899bSmrg dynamic_linker='OS/2 ld.exe' 169245bc899bSmrg shlibpath_var=LIBPATH 169345bc899bSmrg ;; 169445bc899bSmrg 169545bc899bSmrgosf3* | osf4* | osf5*) 169645bc899bSmrg version_type=osf 169745bc899bSmrg need_lib_prefix=no 169845bc899bSmrg need_version=no 169945bc899bSmrg soname_spec='${libname}${release}${shared_ext}$major' 170045bc899bSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 170145bc899bSmrg shlibpath_var=LD_LIBRARY_PATH 170245bc899bSmrg sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 170345bc899bSmrg sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" 170445bc899bSmrg ;; 170545bc899bSmrg 170645bc899bSmrgsolaris*) 170745bc899bSmrg version_type=linux 170845bc899bSmrg need_lib_prefix=no 170945bc899bSmrg need_version=no 171045bc899bSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 171145bc899bSmrg soname_spec='${libname}${release}${shared_ext}$major' 171245bc899bSmrg shlibpath_var=LD_LIBRARY_PATH 171345bc899bSmrg shlibpath_overrides_runpath=yes 171445bc899bSmrg hardcode_into_libs=yes 171545bc899bSmrg # ldd complains unless libraries are executable 171645bc899bSmrg postinstall_cmds='chmod +x $lib' 171745bc899bSmrg ;; 171845bc899bSmrg 171945bc899bSmrgsunos4*) 172045bc899bSmrg version_type=sunos 172145bc899bSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 172245bc899bSmrg finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 172345bc899bSmrg shlibpath_var=LD_LIBRARY_PATH 172445bc899bSmrg shlibpath_overrides_runpath=yes 172545bc899bSmrg if test "$with_gnu_ld" = yes; then 172645bc899bSmrg need_lib_prefix=no 172745bc899bSmrg fi 172845bc899bSmrg need_version=yes 172945bc899bSmrg ;; 173045bc899bSmrg 173145bc899bSmrgsysv4 | sysv4.3*) 173245bc899bSmrg version_type=linux 173345bc899bSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 173445bc899bSmrg soname_spec='${libname}${release}${shared_ext}$major' 173545bc899bSmrg shlibpath_var=LD_LIBRARY_PATH 173645bc899bSmrg case $host_vendor in 173745bc899bSmrg sni) 173845bc899bSmrg shlibpath_overrides_runpath=no 173945bc899bSmrg need_lib_prefix=no 174045bc899bSmrg export_dynamic_flag_spec='${wl}-Blargedynsym' 174145bc899bSmrg runpath_var=LD_RUN_PATH 174245bc899bSmrg ;; 174345bc899bSmrg siemens) 174445bc899bSmrg need_lib_prefix=no 174545bc899bSmrg ;; 174645bc899bSmrg motorola) 174745bc899bSmrg need_lib_prefix=no 174845bc899bSmrg need_version=no 174945bc899bSmrg shlibpath_overrides_runpath=no 175045bc899bSmrg sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 175145bc899bSmrg ;; 175245bc899bSmrg esac 175345bc899bSmrg ;; 175445bc899bSmrg 175545bc899bSmrgsysv4*MP*) 175645bc899bSmrg if test -d /usr/nec ;then 175745bc899bSmrg version_type=linux 175845bc899bSmrg library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' 175945bc899bSmrg soname_spec='$libname${shared_ext}.$major' 176045bc899bSmrg shlibpath_var=LD_LIBRARY_PATH 176145bc899bSmrg fi 176245bc899bSmrg ;; 176345bc899bSmrg 176445bc899bSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 176545bc899bSmrg version_type=freebsd-elf 176645bc899bSmrg need_lib_prefix=no 176745bc899bSmrg need_version=no 176845bc899bSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 176945bc899bSmrg soname_spec='${libname}${release}${shared_ext}$major' 177045bc899bSmrg shlibpath_var=LD_LIBRARY_PATH 177145bc899bSmrg hardcode_into_libs=yes 177245bc899bSmrg if test "$with_gnu_ld" = yes; then 177345bc899bSmrg sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 177445bc899bSmrg shlibpath_overrides_runpath=no 177545bc899bSmrg else 177645bc899bSmrg sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 177745bc899bSmrg shlibpath_overrides_runpath=yes 177845bc899bSmrg case $host_os in 177945bc899bSmrg sco3.2v5*) 178045bc899bSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 178145bc899bSmrg ;; 178245bc899bSmrg esac 178345bc899bSmrg fi 178445bc899bSmrg sys_lib_dlsearch_path_spec='/usr/lib' 178545bc899bSmrg ;; 178645bc899bSmrg 178745bc899bSmrguts4*) 178845bc899bSmrg version_type=linux 178945bc899bSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 179045bc899bSmrg soname_spec='${libname}${release}${shared_ext}$major' 179145bc899bSmrg shlibpath_var=LD_LIBRARY_PATH 179245bc899bSmrg ;; 179345bc899bSmrg 179445bc899bSmrg*) 179545bc899bSmrg dynamic_linker=no 179645bc899bSmrg ;; 179745bc899bSmrgesac 179845bc899bSmrgAC_MSG_RESULT([$dynamic_linker]) 179945bc899bSmrgtest "$dynamic_linker" = no && can_build_shared=no 180045bc899bSmrg 180145bc899bSmrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var" 180245bc899bSmrgif test "$GCC" = yes; then 180345bc899bSmrg variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 180445bc899bSmrgfi 180545bc899bSmrg])# AC_LIBTOOL_SYS_DYNAMIC_LINKER 180645bc899bSmrg 180745bc899bSmrg 180845bc899bSmrg# _LT_AC_TAGCONFIG 180945bc899bSmrg# ---------------- 181045bc899bSmrgAC_DEFUN([_LT_AC_TAGCONFIG], 181145bc899bSmrg[AC_ARG_WITH([tags], 181245bc899bSmrg [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@], 181345bc899bSmrg [include additional configurations @<:@automatic@:>@])], 181445bc899bSmrg [tagnames="$withval"]) 181545bc899bSmrg 181645bc899bSmrgif test -f "$ltmain" && test -n "$tagnames"; then 181745bc899bSmrg if test ! -f "${ofile}"; then 181845bc899bSmrg AC_MSG_WARN([output file `$ofile' does not exist]) 181945bc899bSmrg fi 182045bc899bSmrg 182145bc899bSmrg if test -z "$LTCC"; then 182245bc899bSmrg eval "`$SHELL ${ofile} --config | grep '^LTCC='`" 182345bc899bSmrg if test -z "$LTCC"; then 182445bc899bSmrg AC_MSG_WARN([output file `$ofile' does not look like a libtool script]) 182545bc899bSmrg else 182645bc899bSmrg AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile']) 182745bc899bSmrg fi 182845bc899bSmrg fi 182945bc899bSmrg if test -z "$LTCFLAGS"; then 183045bc899bSmrg eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`" 183145bc899bSmrg fi 183245bc899bSmrg 183345bc899bSmrg # Extract list of available tagged configurations in $ofile. 183445bc899bSmrg # Note that this assumes the entire list is on one line. 183545bc899bSmrg available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` 183645bc899bSmrg 183745bc899bSmrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 183845bc899bSmrg for tagname in $tagnames; do 183945bc899bSmrg IFS="$lt_save_ifs" 184045bc899bSmrg # Check whether tagname contains only valid characters 184145bc899bSmrg case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in 184245bc899bSmrg "") ;; 184345bc899bSmrg *) AC_MSG_ERROR([invalid tag name: $tagname]) 184445bc899bSmrg ;; 184545bc899bSmrg esac 184645bc899bSmrg 184745bc899bSmrg if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null 184845bc899bSmrg then 184945bc899bSmrg AC_MSG_ERROR([tag name \"$tagname\" already exists]) 185045bc899bSmrg fi 185145bc899bSmrg 185245bc899bSmrg # Update the list of available tags. 185345bc899bSmrg if test -n "$tagname"; then 185445bc899bSmrg echo appending configuration tag \"$tagname\" to $ofile 185545bc899bSmrg 185645bc899bSmrg case $tagname in 185745bc899bSmrg CXX) 185845bc899bSmrg if test -n "$CXX" && ( test "X$CXX" != "Xno" && 185945bc899bSmrg ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || 186045bc899bSmrg (test "X$CXX" != "Xg++"))) ; then 186145bc899bSmrg AC_LIBTOOL_LANG_CXX_CONFIG 186245bc899bSmrg else 186345bc899bSmrg tagname="" 186445bc899bSmrg fi 186545bc899bSmrg ;; 186645bc899bSmrg 186745bc899bSmrg F77) 186845bc899bSmrg if test -n "$F77" && test "X$F77" != "Xno"; then 186945bc899bSmrg AC_LIBTOOL_LANG_F77_CONFIG 187045bc899bSmrg else 187145bc899bSmrg tagname="" 187245bc899bSmrg fi 187345bc899bSmrg ;; 187445bc899bSmrg 187545bc899bSmrg GCJ) 187645bc899bSmrg if test -n "$GCJ" && test "X$GCJ" != "Xno"; then 187745bc899bSmrg AC_LIBTOOL_LANG_GCJ_CONFIG 187845bc899bSmrg else 187945bc899bSmrg tagname="" 188045bc899bSmrg fi 188145bc899bSmrg ;; 188245bc899bSmrg 188345bc899bSmrg RC) 188445bc899bSmrg AC_LIBTOOL_LANG_RC_CONFIG 188545bc899bSmrg ;; 188645bc899bSmrg 188745bc899bSmrg *) 188845bc899bSmrg AC_MSG_ERROR([Unsupported tag name: $tagname]) 188945bc899bSmrg ;; 189045bc899bSmrg esac 189145bc899bSmrg 189245bc899bSmrg # Append the new tag name to the list of available tags. 189345bc899bSmrg if test -n "$tagname" ; then 189445bc899bSmrg available_tags="$available_tags $tagname" 189545bc899bSmrg fi 189645bc899bSmrg fi 189745bc899bSmrg done 189845bc899bSmrg IFS="$lt_save_ifs" 189945bc899bSmrg 190045bc899bSmrg # Now substitute the updated list of available tags. 190145bc899bSmrg if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then 190245bc899bSmrg mv "${ofile}T" "$ofile" 190345bc899bSmrg chmod +x "$ofile" 190445bc899bSmrg else 190545bc899bSmrg rm -f "${ofile}T" 190645bc899bSmrg AC_MSG_ERROR([unable to update list of available tagged configurations.]) 190745bc899bSmrg fi 190845bc899bSmrgfi 190945bc899bSmrg])# _LT_AC_TAGCONFIG 191045bc899bSmrg 191145bc899bSmrg 191245bc899bSmrg# AC_LIBTOOL_DLOPEN 191345bc899bSmrg# ----------------- 191445bc899bSmrg# enable checks for dlopen support 191545bc899bSmrgAC_DEFUN([AC_LIBTOOL_DLOPEN], 191645bc899bSmrg [AC_BEFORE([$0],[AC_LIBTOOL_SETUP]) 191745bc899bSmrg])# AC_LIBTOOL_DLOPEN 191845bc899bSmrg 191945bc899bSmrg 192045bc899bSmrg# AC_LIBTOOL_WIN32_DLL 192145bc899bSmrg# -------------------- 192245bc899bSmrg# declare package support for building win32 DLLs 192345bc899bSmrgAC_DEFUN([AC_LIBTOOL_WIN32_DLL], 192445bc899bSmrg[AC_BEFORE([$0], [AC_LIBTOOL_SETUP]) 192545bc899bSmrg])# AC_LIBTOOL_WIN32_DLL 192645bc899bSmrg 192745bc899bSmrg 192845bc899bSmrg# AC_ENABLE_SHARED([DEFAULT]) 192945bc899bSmrg# --------------------------- 193045bc899bSmrg# implement the --enable-shared flag 193145bc899bSmrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 193245bc899bSmrgAC_DEFUN([AC_ENABLE_SHARED], 193345bc899bSmrg[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl 193445bc899bSmrgAC_ARG_ENABLE([shared], 193545bc899bSmrg [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 193645bc899bSmrg [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])], 193745bc899bSmrg [p=${PACKAGE-default} 193845bc899bSmrg case $enableval in 193945bc899bSmrg yes) enable_shared=yes ;; 194045bc899bSmrg no) enable_shared=no ;; 194145bc899bSmrg *) 194245bc899bSmrg enable_shared=no 194345bc899bSmrg # Look at the argument we got. We use all the common list separators. 194445bc899bSmrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 194545bc899bSmrg for pkg in $enableval; do 194645bc899bSmrg IFS="$lt_save_ifs" 194745bc899bSmrg if test "X$pkg" = "X$p"; then 194845bc899bSmrg enable_shared=yes 194945bc899bSmrg fi 195045bc899bSmrg done 195145bc899bSmrg IFS="$lt_save_ifs" 195245bc899bSmrg ;; 195345bc899bSmrg esac], 195445bc899bSmrg [enable_shared=]AC_ENABLE_SHARED_DEFAULT) 195545bc899bSmrg])# AC_ENABLE_SHARED 195645bc899bSmrg 195745bc899bSmrg 195845bc899bSmrg# AC_DISABLE_SHARED 195945bc899bSmrg# ----------------- 196045bc899bSmrg# set the default shared flag to --disable-shared 196145bc899bSmrgAC_DEFUN([AC_DISABLE_SHARED], 196245bc899bSmrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 196345bc899bSmrgAC_ENABLE_SHARED(no) 196445bc899bSmrg])# AC_DISABLE_SHARED 196545bc899bSmrg 196645bc899bSmrg 196745bc899bSmrg# AC_ENABLE_STATIC([DEFAULT]) 196845bc899bSmrg# --------------------------- 196945bc899bSmrg# implement the --enable-static flag 197045bc899bSmrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 197145bc899bSmrgAC_DEFUN([AC_ENABLE_STATIC], 197245bc899bSmrg[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl 197345bc899bSmrgAC_ARG_ENABLE([static], 197445bc899bSmrg [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@], 197545bc899bSmrg [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])], 197645bc899bSmrg [p=${PACKAGE-default} 197745bc899bSmrg case $enableval in 197845bc899bSmrg yes) enable_static=yes ;; 197945bc899bSmrg no) enable_static=no ;; 198045bc899bSmrg *) 198145bc899bSmrg enable_static=no 198245bc899bSmrg # Look at the argument we got. We use all the common list separators. 198345bc899bSmrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 198445bc899bSmrg for pkg in $enableval; do 198545bc899bSmrg IFS="$lt_save_ifs" 198645bc899bSmrg if test "X$pkg" = "X$p"; then 198745bc899bSmrg enable_static=yes 198845bc899bSmrg fi 198945bc899bSmrg done 199045bc899bSmrg IFS="$lt_save_ifs" 199145bc899bSmrg ;; 199245bc899bSmrg esac], 199345bc899bSmrg [enable_static=]AC_ENABLE_STATIC_DEFAULT) 199445bc899bSmrg])# AC_ENABLE_STATIC 199545bc899bSmrg 199645bc899bSmrg 199745bc899bSmrg# AC_DISABLE_STATIC 199845bc899bSmrg# ----------------- 199945bc899bSmrg# set the default static flag to --disable-static 200045bc899bSmrgAC_DEFUN([AC_DISABLE_STATIC], 200145bc899bSmrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 200245bc899bSmrgAC_ENABLE_STATIC(no) 200345bc899bSmrg])# AC_DISABLE_STATIC 200445bc899bSmrg 200545bc899bSmrg 200645bc899bSmrg# AC_ENABLE_FAST_INSTALL([DEFAULT]) 200745bc899bSmrg# --------------------------------- 200845bc899bSmrg# implement the --enable-fast-install flag 200945bc899bSmrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 201045bc899bSmrgAC_DEFUN([AC_ENABLE_FAST_INSTALL], 201145bc899bSmrg[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl 201245bc899bSmrgAC_ARG_ENABLE([fast-install], 201345bc899bSmrg [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 201445bc899bSmrg [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 201545bc899bSmrg [p=${PACKAGE-default} 201645bc899bSmrg case $enableval in 201745bc899bSmrg yes) enable_fast_install=yes ;; 201845bc899bSmrg no) enable_fast_install=no ;; 201945bc899bSmrg *) 202045bc899bSmrg enable_fast_install=no 202145bc899bSmrg # Look at the argument we got. We use all the common list separators. 202245bc899bSmrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 202345bc899bSmrg for pkg in $enableval; do 202445bc899bSmrg IFS="$lt_save_ifs" 202545bc899bSmrg if test "X$pkg" = "X$p"; then 202645bc899bSmrg enable_fast_install=yes 202745bc899bSmrg fi 202845bc899bSmrg done 202945bc899bSmrg IFS="$lt_save_ifs" 203045bc899bSmrg ;; 203145bc899bSmrg esac], 203245bc899bSmrg [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT) 203345bc899bSmrg])# AC_ENABLE_FAST_INSTALL 203445bc899bSmrg 203545bc899bSmrg 203645bc899bSmrg# AC_DISABLE_FAST_INSTALL 203745bc899bSmrg# ----------------------- 203845bc899bSmrg# set the default to --disable-fast-install 203945bc899bSmrgAC_DEFUN([AC_DISABLE_FAST_INSTALL], 204045bc899bSmrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 204145bc899bSmrgAC_ENABLE_FAST_INSTALL(no) 204245bc899bSmrg])# AC_DISABLE_FAST_INSTALL 204345bc899bSmrg 204445bc899bSmrg 204545bc899bSmrg# AC_LIBTOOL_PICMODE([MODE]) 204645bc899bSmrg# -------------------------- 204745bc899bSmrg# implement the --with-pic flag 204845bc899bSmrg# MODE is either `yes' or `no'. If omitted, it defaults to `both'. 204945bc899bSmrgAC_DEFUN([AC_LIBTOOL_PICMODE], 205045bc899bSmrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 205145bc899bSmrgpic_mode=ifelse($#,1,$1,default) 205245bc899bSmrg])# AC_LIBTOOL_PICMODE 205345bc899bSmrg 205445bc899bSmrg 205545bc899bSmrg# AC_PROG_EGREP 205645bc899bSmrg# ------------- 205745bc899bSmrg# This is predefined starting with Autoconf 2.54, so this conditional 205845bc899bSmrg# definition can be removed once we require Autoconf 2.54 or later. 205945bc899bSmrgm4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP], 206045bc899bSmrg[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep], 206145bc899bSmrg [if echo a | (grep -E '(a|b)') >/dev/null 2>&1 206245bc899bSmrg then ac_cv_prog_egrep='grep -E' 206345bc899bSmrg else ac_cv_prog_egrep='egrep' 206445bc899bSmrg fi]) 206545bc899bSmrg EGREP=$ac_cv_prog_egrep 206645bc899bSmrg AC_SUBST([EGREP]) 206745bc899bSmrg])]) 206845bc899bSmrg 206945bc899bSmrg 207045bc899bSmrg# AC_PATH_TOOL_PREFIX 207145bc899bSmrg# ------------------- 207245bc899bSmrg# find a file program which can recognise shared library 207345bc899bSmrgAC_DEFUN([AC_PATH_TOOL_PREFIX], 207445bc899bSmrg[AC_REQUIRE([AC_PROG_EGREP])dnl 207545bc899bSmrgAC_MSG_CHECKING([for $1]) 207645bc899bSmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 207745bc899bSmrg[case $MAGIC_CMD in 207845bc899bSmrg[[\\/*] | ?:[\\/]*]) 207945bc899bSmrg lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. 208045bc899bSmrg ;; 208145bc899bSmrg*) 208245bc899bSmrg lt_save_MAGIC_CMD="$MAGIC_CMD" 208345bc899bSmrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 208445bc899bSmrgdnl $ac_dummy forces splitting on constant user-supplied paths. 208545bc899bSmrgdnl POSIX.2 word splitting is done only on the output of word expansions, 208645bc899bSmrgdnl not every word. This closes a longstanding sh security hole. 208745bc899bSmrg ac_dummy="ifelse([$2], , $PATH, [$2])" 208845bc899bSmrg for ac_dir in $ac_dummy; do 208945bc899bSmrg IFS="$lt_save_ifs" 209045bc899bSmrg test -z "$ac_dir" && ac_dir=. 209145bc899bSmrg if test -f $ac_dir/$1; then 209245bc899bSmrg lt_cv_path_MAGIC_CMD="$ac_dir/$1" 209345bc899bSmrg if test -n "$file_magic_test_file"; then 209445bc899bSmrg case $deplibs_check_method in 209545bc899bSmrg "file_magic "*) 209645bc899bSmrg file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 209745bc899bSmrg MAGIC_CMD="$lt_cv_path_MAGIC_CMD" 209845bc899bSmrg if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 209945bc899bSmrg $EGREP "$file_magic_regex" > /dev/null; then 210045bc899bSmrg : 210145bc899bSmrg else 210245bc899bSmrg cat <<EOF 1>&2 210345bc899bSmrg 210445bc899bSmrg*** Warning: the command libtool uses to detect shared libraries, 210545bc899bSmrg*** $file_magic_cmd, produces output that libtool cannot recognize. 210645bc899bSmrg*** The result is that libtool may fail to recognize shared libraries 210745bc899bSmrg*** as such. This will affect the creation of libtool libraries that 210845bc899bSmrg*** depend on shared libraries, but programs linked with such libtool 210945bc899bSmrg*** libraries will work regardless of this problem. Nevertheless, you 211045bc899bSmrg*** may want to report the problem to your system manager and/or to 211145bc899bSmrg*** bug-libtool@gnu.org 211245bc899bSmrg 211345bc899bSmrgEOF 211445bc899bSmrg fi ;; 211545bc899bSmrg esac 211645bc899bSmrg fi 211745bc899bSmrg break 211845bc899bSmrg fi 211945bc899bSmrg done 212045bc899bSmrg IFS="$lt_save_ifs" 212145bc899bSmrg MAGIC_CMD="$lt_save_MAGIC_CMD" 212245bc899bSmrg ;; 212345bc899bSmrgesac]) 212445bc899bSmrgMAGIC_CMD="$lt_cv_path_MAGIC_CMD" 212545bc899bSmrgif test -n "$MAGIC_CMD"; then 212645bc899bSmrg AC_MSG_RESULT($MAGIC_CMD) 212745bc899bSmrgelse 212845bc899bSmrg AC_MSG_RESULT(no) 212945bc899bSmrgfi 213045bc899bSmrg])# AC_PATH_TOOL_PREFIX 213145bc899bSmrg 213245bc899bSmrg 213345bc899bSmrg# AC_PATH_MAGIC 213445bc899bSmrg# ------------- 213545bc899bSmrg# find a file program which can recognise a shared library 213645bc899bSmrgAC_DEFUN([AC_PATH_MAGIC], 213745bc899bSmrg[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 213845bc899bSmrgif test -z "$lt_cv_path_MAGIC_CMD"; then 213945bc899bSmrg if test -n "$ac_tool_prefix"; then 214045bc899bSmrg AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 214145bc899bSmrg else 214245bc899bSmrg MAGIC_CMD=: 214345bc899bSmrg fi 214445bc899bSmrgfi 214545bc899bSmrg])# AC_PATH_MAGIC 214645bc899bSmrg 214745bc899bSmrg 214845bc899bSmrg# AC_PROG_LD 214945bc899bSmrg# ---------- 215045bc899bSmrg# find the pathname to the GNU or non-GNU linker 215145bc899bSmrgAC_DEFUN([AC_PROG_LD], 215245bc899bSmrg[AC_ARG_WITH([gnu-ld], 215345bc899bSmrg [AC_HELP_STRING([--with-gnu-ld], 215445bc899bSmrg [assume the C compiler uses GNU ld @<:@default=no@:>@])], 215545bc899bSmrg [test "$withval" = no || with_gnu_ld=yes], 215645bc899bSmrg [with_gnu_ld=no]) 215745bc899bSmrgAC_REQUIRE([LT_AC_PROG_SED])dnl 215845bc899bSmrgAC_REQUIRE([AC_PROG_CC])dnl 215945bc899bSmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 216045bc899bSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 216145bc899bSmrgac_prog=ld 216245bc899bSmrgif test "$GCC" = yes; then 216345bc899bSmrg # Check if gcc -print-prog-name=ld gives a path. 216445bc899bSmrg AC_MSG_CHECKING([for ld used by $CC]) 216545bc899bSmrg case $host in 216645bc899bSmrg *-*-mingw*) 216745bc899bSmrg # gcc leaves a trailing carriage return which upsets mingw 216845bc899bSmrg ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 216945bc899bSmrg *) 217045bc899bSmrg ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 217145bc899bSmrg esac 217245bc899bSmrg case $ac_prog in 217345bc899bSmrg # Accept absolute paths. 217445bc899bSmrg [[\\/]]* | ?:[[\\/]]*) 217545bc899bSmrg re_direlt='/[[^/]][[^/]]*/\.\./' 217645bc899bSmrg # Canonicalize the pathname of ld 217745bc899bSmrg ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` 217845bc899bSmrg while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do 217945bc899bSmrg ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` 218045bc899bSmrg done 218145bc899bSmrg test -z "$LD" && LD="$ac_prog" 218245bc899bSmrg ;; 218345bc899bSmrg "") 218445bc899bSmrg # If it fails, then pretend we aren't using GCC. 218545bc899bSmrg ac_prog=ld 218645bc899bSmrg ;; 218745bc899bSmrg *) 218845bc899bSmrg # If it is relative, then search for the first ld in PATH. 218945bc899bSmrg with_gnu_ld=unknown 219045bc899bSmrg ;; 219145bc899bSmrg esac 219245bc899bSmrgelif test "$with_gnu_ld" = yes; then 219345bc899bSmrg AC_MSG_CHECKING([for GNU ld]) 219445bc899bSmrgelse 219545bc899bSmrg AC_MSG_CHECKING([for non-GNU ld]) 219645bc899bSmrgfi 219745bc899bSmrgAC_CACHE_VAL(lt_cv_path_LD, 219845bc899bSmrg[if test -z "$LD"; then 219945bc899bSmrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 220045bc899bSmrg for ac_dir in $PATH; do 220145bc899bSmrg IFS="$lt_save_ifs" 220245bc899bSmrg test -z "$ac_dir" && ac_dir=. 220345bc899bSmrg if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 220445bc899bSmrg lt_cv_path_LD="$ac_dir/$ac_prog" 220545bc899bSmrg # Check to see if the program is GNU ld. I'd rather use --version, 220645bc899bSmrg # but apparently some variants of GNU ld only accept -v. 220745bc899bSmrg # Break only if it was the GNU/non-GNU ld that we prefer. 220845bc899bSmrg case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 220945bc899bSmrg *GNU* | *'with BFD'*) 221045bc899bSmrg test "$with_gnu_ld" != no && break 221145bc899bSmrg ;; 221245bc899bSmrg *) 221345bc899bSmrg test "$with_gnu_ld" != yes && break 221445bc899bSmrg ;; 221545bc899bSmrg esac 221645bc899bSmrg fi 221745bc899bSmrg done 221845bc899bSmrg IFS="$lt_save_ifs" 221945bc899bSmrgelse 222045bc899bSmrg lt_cv_path_LD="$LD" # Let the user override the test with a path. 222145bc899bSmrgfi]) 222245bc899bSmrgLD="$lt_cv_path_LD" 222345bc899bSmrgif test -n "$LD"; then 222445bc899bSmrg AC_MSG_RESULT($LD) 222545bc899bSmrgelse 222645bc899bSmrg AC_MSG_RESULT(no) 222745bc899bSmrgfi 222845bc899bSmrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 222945bc899bSmrgAC_PROG_LD_GNU 223045bc899bSmrg])# AC_PROG_LD 223145bc899bSmrg 223245bc899bSmrg 223345bc899bSmrg# AC_PROG_LD_GNU 223445bc899bSmrg# -------------- 223545bc899bSmrgAC_DEFUN([AC_PROG_LD_GNU], 223645bc899bSmrg[AC_REQUIRE([AC_PROG_EGREP])dnl 223745bc899bSmrgAC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 223845bc899bSmrg[# I'd rather use --version here, but apparently some GNU lds only accept -v. 223945bc899bSmrgcase `$LD -v 2>&1 </dev/null` in 224045bc899bSmrg*GNU* | *'with BFD'*) 224145bc899bSmrg lt_cv_prog_gnu_ld=yes 224245bc899bSmrg ;; 224345bc899bSmrg*) 224445bc899bSmrg lt_cv_prog_gnu_ld=no 224545bc899bSmrg ;; 224645bc899bSmrgesac]) 224745bc899bSmrgwith_gnu_ld=$lt_cv_prog_gnu_ld 224845bc899bSmrg])# AC_PROG_LD_GNU 224945bc899bSmrg 225045bc899bSmrg 225145bc899bSmrg# AC_PROG_LD_RELOAD_FLAG 225245bc899bSmrg# ---------------------- 225345bc899bSmrg# find reload flag for linker 225445bc899bSmrg# -- PORTME Some linkers may need a different reload flag. 225545bc899bSmrgAC_DEFUN([AC_PROG_LD_RELOAD_FLAG], 225645bc899bSmrg[AC_CACHE_CHECK([for $LD option to reload object files], 225745bc899bSmrg lt_cv_ld_reload_flag, 225845bc899bSmrg [lt_cv_ld_reload_flag='-r']) 225945bc899bSmrgreload_flag=$lt_cv_ld_reload_flag 226045bc899bSmrgcase $reload_flag in 226145bc899bSmrg"" | " "*) ;; 226245bc899bSmrg*) reload_flag=" $reload_flag" ;; 226345bc899bSmrgesac 226445bc899bSmrgreload_cmds='$LD$reload_flag -o $output$reload_objs' 226545bc899bSmrgcase $host_os in 226645bc899bSmrg darwin*) 226745bc899bSmrg if test "$GCC" = yes; then 226845bc899bSmrg reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' 226945bc899bSmrg else 227045bc899bSmrg reload_cmds='$LD$reload_flag -o $output$reload_objs' 227145bc899bSmrg fi 227245bc899bSmrg ;; 227345bc899bSmrgesac 227445bc899bSmrg])# AC_PROG_LD_RELOAD_FLAG 227545bc899bSmrg 227645bc899bSmrg 227745bc899bSmrg# AC_DEPLIBS_CHECK_METHOD 227845bc899bSmrg# ----------------------- 227945bc899bSmrg# how to check for library dependencies 228045bc899bSmrg# -- PORTME fill in with the dynamic library characteristics 228145bc899bSmrgAC_DEFUN([AC_DEPLIBS_CHECK_METHOD], 228245bc899bSmrg[AC_CACHE_CHECK([how to recognise dependent libraries], 228345bc899bSmrglt_cv_deplibs_check_method, 228445bc899bSmrg[lt_cv_file_magic_cmd='$MAGIC_CMD' 228545bc899bSmrglt_cv_file_magic_test_file= 228645bc899bSmrglt_cv_deplibs_check_method='unknown' 228745bc899bSmrg# Need to set the preceding variable on all platforms that support 228845bc899bSmrg# interlibrary dependencies. 228945bc899bSmrg# 'none' -- dependencies not supported. 229045bc899bSmrg# `unknown' -- same as none, but documents that we really don't know. 229145bc899bSmrg# 'pass_all' -- all dependencies passed with no checks. 229245bc899bSmrg# 'test_compile' -- check by making test program. 229345bc899bSmrg# 'file_magic [[regex]]' -- check by looking for files in library path 229445bc899bSmrg# which responds to the $file_magic_cmd with a given extended regex. 229545bc899bSmrg# If you have `file' or equivalent on your system and you're not sure 229645bc899bSmrg# whether `pass_all' will *always* work, you probably want this one. 229745bc899bSmrg 229845bc899bSmrgcase $host_os in 229945bc899bSmrgaix4* | aix5*) 230045bc899bSmrg lt_cv_deplibs_check_method=pass_all 230145bc899bSmrg ;; 230245bc899bSmrg 230345bc899bSmrgbeos*) 230445bc899bSmrg lt_cv_deplibs_check_method=pass_all 230545bc899bSmrg ;; 230645bc899bSmrg 230745bc899bSmrgbsdi[[45]]*) 230845bc899bSmrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 230945bc899bSmrg lt_cv_file_magic_cmd='/usr/bin/file -L' 231045bc899bSmrg lt_cv_file_magic_test_file=/shlib/libc.so 231145bc899bSmrg ;; 231245bc899bSmrg 231345bc899bSmrgcygwin*) 231445bc899bSmrg # func_win32_libid is a shell function defined in ltmain.sh 231545bc899bSmrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 231645bc899bSmrg lt_cv_file_magic_cmd='func_win32_libid' 231745bc899bSmrg ;; 231845bc899bSmrg 231945bc899bSmrgmingw* | pw32*) 232045bc899bSmrg # Base MSYS/MinGW do not provide the 'file' command needed by 232145bc899bSmrg # func_win32_libid shell function, so use a weaker test based on 'objdump'. 232245bc899bSmrg lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' 232345bc899bSmrg lt_cv_file_magic_cmd='$OBJDUMP -f' 232445bc899bSmrg ;; 232545bc899bSmrg 232645bc899bSmrgdarwin* | rhapsody*) 232745bc899bSmrg lt_cv_deplibs_check_method=pass_all 232845bc899bSmrg ;; 232945bc899bSmrg 233045bc899bSmrgfreebsd* | kfreebsd*-gnu | dragonfly*) 233145bc899bSmrg if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then 233245bc899bSmrg case $host_cpu in 233345bc899bSmrg i*86 ) 233445bc899bSmrg # Not sure whether the presence of OpenBSD here was a mistake. 233545bc899bSmrg # Let's accept both of them until this is cleared up. 233645bc899bSmrg lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 233745bc899bSmrg lt_cv_file_magic_cmd=/usr/bin/file 233845bc899bSmrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 233945bc899bSmrg ;; 234045bc899bSmrg esac 234145bc899bSmrg else 234245bc899bSmrg lt_cv_deplibs_check_method=pass_all 234345bc899bSmrg fi 234445bc899bSmrg ;; 234545bc899bSmrg 234645bc899bSmrggnu*) 234745bc899bSmrg lt_cv_deplibs_check_method=pass_all 234845bc899bSmrg ;; 234945bc899bSmrg 235045bc899bSmrghpux10.20* | hpux11*) 235145bc899bSmrg lt_cv_file_magic_cmd=/usr/bin/file 235245bc899bSmrg case $host_cpu in 235345bc899bSmrg ia64*) 235445bc899bSmrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 235545bc899bSmrg lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 235645bc899bSmrg ;; 235745bc899bSmrg hppa*64*) 235845bc899bSmrg [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]'] 235945bc899bSmrg lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 236045bc899bSmrg ;; 236145bc899bSmrg *) 236245bc899bSmrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' 236345bc899bSmrg lt_cv_file_magic_test_file=/usr/lib/libc.sl 236445bc899bSmrg ;; 236545bc899bSmrg esac 236645bc899bSmrg ;; 236745bc899bSmrg 236845bc899bSmrginterix3*) 236945bc899bSmrg # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 237045bc899bSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 237145bc899bSmrg ;; 237245bc899bSmrg 237345bc899bSmrgirix5* | irix6* | nonstopux*) 237445bc899bSmrg case $LD in 237545bc899bSmrg *-32|*"-32 ") libmagic=32-bit;; 237645bc899bSmrg *-n32|*"-n32 ") libmagic=N32;; 237745bc899bSmrg *-64|*"-64 ") libmagic=64-bit;; 237845bc899bSmrg *) libmagic=never-match;; 237945bc899bSmrg esac 238045bc899bSmrg lt_cv_deplibs_check_method=pass_all 238145bc899bSmrg ;; 238245bc899bSmrg 238345bc899bSmrg# This must be Linux ELF. 238445bc899bSmrglinux*) 238545bc899bSmrg lt_cv_deplibs_check_method=pass_all 238645bc899bSmrg ;; 238745bc899bSmrg 238845bc899bSmrgnetbsd*) 238945bc899bSmrg if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then 239045bc899bSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 239145bc899bSmrg else 239245bc899bSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 239345bc899bSmrg fi 239445bc899bSmrg ;; 239545bc899bSmrg 239645bc899bSmrgnewos6*) 239745bc899bSmrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 239845bc899bSmrg lt_cv_file_magic_cmd=/usr/bin/file 239945bc899bSmrg lt_cv_file_magic_test_file=/usr/lib/libnls.so 240045bc899bSmrg ;; 240145bc899bSmrg 240245bc899bSmrgnto-qnx*) 240345bc899bSmrg lt_cv_deplibs_check_method=unknown 240445bc899bSmrg ;; 240545bc899bSmrg 240645bc899bSmrgopenbsd*) 240745bc899bSmrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 240845bc899bSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 240945bc899bSmrg else 241045bc899bSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 241145bc899bSmrg fi 241245bc899bSmrg ;; 241345bc899bSmrg 241445bc899bSmrgosf3* | osf4* | osf5*) 241545bc899bSmrg lt_cv_deplibs_check_method=pass_all 241645bc899bSmrg ;; 241745bc899bSmrg 241845bc899bSmrgsolaris*) 241945bc899bSmrg lt_cv_deplibs_check_method=pass_all 242045bc899bSmrg ;; 242145bc899bSmrg 242245bc899bSmrgsysv4 | sysv4.3*) 242345bc899bSmrg case $host_vendor in 242445bc899bSmrg motorola) 242545bc899bSmrg 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]]' 242645bc899bSmrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 242745bc899bSmrg ;; 242845bc899bSmrg ncr) 242945bc899bSmrg lt_cv_deplibs_check_method=pass_all 243045bc899bSmrg ;; 243145bc899bSmrg sequent) 243245bc899bSmrg lt_cv_file_magic_cmd='/bin/file' 243345bc899bSmrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 243445bc899bSmrg ;; 243545bc899bSmrg sni) 243645bc899bSmrg lt_cv_file_magic_cmd='/bin/file' 243745bc899bSmrg lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 243845bc899bSmrg lt_cv_file_magic_test_file=/lib/libc.so 243945bc899bSmrg ;; 244045bc899bSmrg siemens) 244145bc899bSmrg lt_cv_deplibs_check_method=pass_all 244245bc899bSmrg ;; 244345bc899bSmrg pc) 244445bc899bSmrg lt_cv_deplibs_check_method=pass_all 244545bc899bSmrg ;; 244645bc899bSmrg esac 244745bc899bSmrg ;; 244845bc899bSmrg 244945bc899bSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 245045bc899bSmrg lt_cv_deplibs_check_method=pass_all 245145bc899bSmrg ;; 245245bc899bSmrgesac 245345bc899bSmrg]) 245445bc899bSmrgfile_magic_cmd=$lt_cv_file_magic_cmd 245545bc899bSmrgdeplibs_check_method=$lt_cv_deplibs_check_method 245645bc899bSmrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown 245745bc899bSmrg])# AC_DEPLIBS_CHECK_METHOD 245845bc899bSmrg 245945bc899bSmrg 246045bc899bSmrg# AC_PROG_NM 246145bc899bSmrg# ---------- 246245bc899bSmrg# find the pathname to a BSD-compatible name lister 246345bc899bSmrgAC_DEFUN([AC_PROG_NM], 246445bc899bSmrg[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM, 246545bc899bSmrg[if test -n "$NM"; then 246645bc899bSmrg # Let the user override the test. 246745bc899bSmrg lt_cv_path_NM="$NM" 246845bc899bSmrgelse 246945bc899bSmrg lt_nm_to_check="${ac_tool_prefix}nm" 247045bc899bSmrg if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 247145bc899bSmrg lt_nm_to_check="$lt_nm_to_check nm" 247245bc899bSmrg fi 247345bc899bSmrg for lt_tmp_nm in $lt_nm_to_check; do 247445bc899bSmrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 247545bc899bSmrg for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 247645bc899bSmrg IFS="$lt_save_ifs" 247745bc899bSmrg test -z "$ac_dir" && ac_dir=. 247845bc899bSmrg tmp_nm="$ac_dir/$lt_tmp_nm" 247945bc899bSmrg if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then 248045bc899bSmrg # Check to see if the nm accepts a BSD-compat flag. 248145bc899bSmrg # Adding the `sed 1q' prevents false positives on HP-UX, which says: 248245bc899bSmrg # nm: unknown option "B" ignored 248345bc899bSmrg # Tru64's nm complains that /dev/null is an invalid object file 248445bc899bSmrg case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in 248545bc899bSmrg */dev/null* | *'Invalid file or object type'*) 248645bc899bSmrg lt_cv_path_NM="$tmp_nm -B" 248745bc899bSmrg break 248845bc899bSmrg ;; 248945bc899bSmrg *) 249045bc899bSmrg case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in 249145bc899bSmrg */dev/null*) 249245bc899bSmrg lt_cv_path_NM="$tmp_nm -p" 249345bc899bSmrg break 249445bc899bSmrg ;; 249545bc899bSmrg *) 249645bc899bSmrg lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 249745bc899bSmrg continue # so that we can try to find one that supports BSD flags 249845bc899bSmrg ;; 249945bc899bSmrg esac 250045bc899bSmrg ;; 250145bc899bSmrg esac 250245bc899bSmrg fi 250345bc899bSmrg done 250445bc899bSmrg IFS="$lt_save_ifs" 250545bc899bSmrg done 250645bc899bSmrg test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm 250745bc899bSmrgfi]) 250845bc899bSmrgNM="$lt_cv_path_NM" 250945bc899bSmrg])# AC_PROG_NM 251045bc899bSmrg 251145bc899bSmrg 251245bc899bSmrg# AC_CHECK_LIBM 251345bc899bSmrg# ------------- 251445bc899bSmrg# check for math library 251545bc899bSmrgAC_DEFUN([AC_CHECK_LIBM], 251645bc899bSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 251745bc899bSmrgLIBM= 251845bc899bSmrgcase $host in 251945bc899bSmrg*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) 252045bc899bSmrg # These system don't have libm, or don't need it 252145bc899bSmrg ;; 252245bc899bSmrg*-ncr-sysv4.3*) 252345bc899bSmrg AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") 252445bc899bSmrg AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 252545bc899bSmrg ;; 252645bc899bSmrg*) 252745bc899bSmrg AC_CHECK_LIB(m, cos, LIBM="-lm") 252845bc899bSmrg ;; 252945bc899bSmrgesac 253045bc899bSmrg])# AC_CHECK_LIBM 253145bc899bSmrg 253245bc899bSmrg 253345bc899bSmrg# AC_LIBLTDL_CONVENIENCE([DIRECTORY]) 253445bc899bSmrg# ----------------------------------- 253545bc899bSmrg# sets LIBLTDL to the link flags for the libltdl convenience library and 253645bc899bSmrg# LTDLINCL to the include flags for the libltdl header and adds 253745bc899bSmrg# --enable-ltdl-convenience to the configure arguments. Note that 253845bc899bSmrg# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, 253945bc899bSmrg# it is assumed to be `libltdl'. LIBLTDL will be prefixed with 254045bc899bSmrg# '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/' 254145bc899bSmrg# (note the single quotes!). If your package is not flat and you're not 254245bc899bSmrg# using automake, define top_builddir and top_srcdir appropriately in 254345bc899bSmrg# the Makefiles. 254445bc899bSmrgAC_DEFUN([AC_LIBLTDL_CONVENIENCE], 254545bc899bSmrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 254645bc899bSmrg case $enable_ltdl_convenience in 254745bc899bSmrg no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; 254845bc899bSmrg "") enable_ltdl_convenience=yes 254945bc899bSmrg ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; 255045bc899bSmrg esac 255145bc899bSmrg LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la 255245bc899bSmrg LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) 255345bc899bSmrg # For backwards non-gettext consistent compatibility... 255445bc899bSmrg INCLTDL="$LTDLINCL" 255545bc899bSmrg])# AC_LIBLTDL_CONVENIENCE 255645bc899bSmrg 255745bc899bSmrg 255845bc899bSmrg# AC_LIBLTDL_INSTALLABLE([DIRECTORY]) 255945bc899bSmrg# ----------------------------------- 256045bc899bSmrg# sets LIBLTDL to the link flags for the libltdl installable library and 256145bc899bSmrg# LTDLINCL to the include flags for the libltdl header and adds 256245bc899bSmrg# --enable-ltdl-install to the configure arguments. Note that 256345bc899bSmrg# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, 256445bc899bSmrg# and an installed libltdl is not found, it is assumed to be `libltdl'. 256545bc899bSmrg# LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with 256645bc899bSmrg# '${top_srcdir}/' (note the single quotes!). If your package is not 256745bc899bSmrg# flat and you're not using automake, define top_builddir and top_srcdir 256845bc899bSmrg# appropriately in the Makefiles. 256945bc899bSmrg# In the future, this macro may have to be called after AC_PROG_LIBTOOL. 257045bc899bSmrgAC_DEFUN([AC_LIBLTDL_INSTALLABLE], 257145bc899bSmrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 257245bc899bSmrg AC_CHECK_LIB(ltdl, lt_dlinit, 257345bc899bSmrg [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no], 257445bc899bSmrg [if test x"$enable_ltdl_install" = xno; then 257545bc899bSmrg AC_MSG_WARN([libltdl not installed, but installation disabled]) 257645bc899bSmrg else 257745bc899bSmrg enable_ltdl_install=yes 257845bc899bSmrg fi 257945bc899bSmrg ]) 258045bc899bSmrg if test x"$enable_ltdl_install" = x"yes"; then 258145bc899bSmrg ac_configure_args="$ac_configure_args --enable-ltdl-install" 258245bc899bSmrg LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la 258345bc899bSmrg LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) 258445bc899bSmrg else 258545bc899bSmrg ac_configure_args="$ac_configure_args --enable-ltdl-install=no" 258645bc899bSmrg LIBLTDL="-lltdl" 258745bc899bSmrg LTDLINCL= 258845bc899bSmrg fi 258945bc899bSmrg # For backwards non-gettext consistent compatibility... 259045bc899bSmrg INCLTDL="$LTDLINCL" 259145bc899bSmrg])# AC_LIBLTDL_INSTALLABLE 259245bc899bSmrg 259345bc899bSmrg 259445bc899bSmrg# AC_LIBTOOL_CXX 259545bc899bSmrg# -------------- 259645bc899bSmrg# enable support for C++ libraries 259745bc899bSmrgAC_DEFUN([AC_LIBTOOL_CXX], 259845bc899bSmrg[AC_REQUIRE([_LT_AC_LANG_CXX]) 259945bc899bSmrg])# AC_LIBTOOL_CXX 260045bc899bSmrg 260145bc899bSmrg 260245bc899bSmrg# _LT_AC_LANG_CXX 260345bc899bSmrg# --------------- 260445bc899bSmrgAC_DEFUN([_LT_AC_LANG_CXX], 260545bc899bSmrg[AC_REQUIRE([AC_PROG_CXX]) 260645bc899bSmrgAC_REQUIRE([_LT_AC_PROG_CXXCPP]) 260745bc899bSmrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX]) 260845bc899bSmrg])# _LT_AC_LANG_CXX 260945bc899bSmrg 261045bc899bSmrg# _LT_AC_PROG_CXXCPP 261145bc899bSmrg# ------------------ 261245bc899bSmrgAC_DEFUN([_LT_AC_PROG_CXXCPP], 261345bc899bSmrg[ 261445bc899bSmrgAC_REQUIRE([AC_PROG_CXX]) 261545bc899bSmrgif test -n "$CXX" && ( test "X$CXX" != "Xno" && 261645bc899bSmrg ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || 261745bc899bSmrg (test "X$CXX" != "Xg++"))) ; then 261845bc899bSmrg AC_PROG_CXXCPP 261945bc899bSmrgfi 262045bc899bSmrg])# _LT_AC_PROG_CXXCPP 262145bc899bSmrg 262245bc899bSmrg# AC_LIBTOOL_F77 262345bc899bSmrg# -------------- 262445bc899bSmrg# enable support for Fortran 77 libraries 262545bc899bSmrgAC_DEFUN([AC_LIBTOOL_F77], 262645bc899bSmrg[AC_REQUIRE([_LT_AC_LANG_F77]) 262745bc899bSmrg])# AC_LIBTOOL_F77 262845bc899bSmrg 262945bc899bSmrg 263045bc899bSmrg# _LT_AC_LANG_F77 263145bc899bSmrg# --------------- 263245bc899bSmrgAC_DEFUN([_LT_AC_LANG_F77], 263345bc899bSmrg[AC_REQUIRE([AC_PROG_F77]) 263445bc899bSmrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77]) 263545bc899bSmrg])# _LT_AC_LANG_F77 263645bc899bSmrg 263745bc899bSmrg 263845bc899bSmrg# AC_LIBTOOL_GCJ 263945bc899bSmrg# -------------- 264045bc899bSmrg# enable support for GCJ libraries 264145bc899bSmrgAC_DEFUN([AC_LIBTOOL_GCJ], 264245bc899bSmrg[AC_REQUIRE([_LT_AC_LANG_GCJ]) 264345bc899bSmrg])# AC_LIBTOOL_GCJ 264445bc899bSmrg 264545bc899bSmrg 264645bc899bSmrg# _LT_AC_LANG_GCJ 264745bc899bSmrg# --------------- 264845bc899bSmrgAC_DEFUN([_LT_AC_LANG_GCJ], 264945bc899bSmrg[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[], 265045bc899bSmrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[], 265145bc899bSmrg [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[], 265245bc899bSmrg [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])], 265345bc899bSmrg [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])], 265445bc899bSmrg [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])]) 265545bc899bSmrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ]) 265645bc899bSmrg])# _LT_AC_LANG_GCJ 265745bc899bSmrg 265845bc899bSmrg 265945bc899bSmrg# AC_LIBTOOL_RC 266045bc899bSmrg# ------------- 266145bc899bSmrg# enable support for Windows resource files 266245bc899bSmrgAC_DEFUN([AC_LIBTOOL_RC], 266345bc899bSmrg[AC_REQUIRE([LT_AC_PROG_RC]) 266445bc899bSmrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC]) 266545bc899bSmrg])# AC_LIBTOOL_RC 266645bc899bSmrg 266745bc899bSmrg 266845bc899bSmrg# AC_LIBTOOL_LANG_C_CONFIG 266945bc899bSmrg# ------------------------ 267045bc899bSmrg# Ensure that the configuration vars for the C compiler are 267145bc899bSmrg# suitably defined. Those variables are subsequently used by 267245bc899bSmrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 267345bc899bSmrgAC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG]) 267445bc899bSmrgAC_DEFUN([_LT_AC_LANG_C_CONFIG], 267545bc899bSmrg[lt_save_CC="$CC" 267645bc899bSmrgAC_LANG_PUSH(C) 267745bc899bSmrg 267845bc899bSmrg# Source file extension for C test sources. 267945bc899bSmrgac_ext=c 268045bc899bSmrg 268145bc899bSmrg# Object file extension for compiled C test sources. 268245bc899bSmrgobjext=o 268345bc899bSmrg_LT_AC_TAGVAR(objext, $1)=$objext 268445bc899bSmrg 268545bc899bSmrg# Code to be used in simple compile tests 268645bc899bSmrglt_simple_compile_test_code="int some_variable = 0;\n" 268745bc899bSmrg 268845bc899bSmrg# Code to be used in simple link tests 268945bc899bSmrglt_simple_link_test_code='int main(){return(0);}\n' 269045bc899bSmrg 269145bc899bSmrg_LT_AC_SYS_COMPILER 269245bc899bSmrg 269345bc899bSmrg# save warnings/boilerplate of simple test code 269445bc899bSmrg_LT_COMPILER_BOILERPLATE 269545bc899bSmrg_LT_LINKER_BOILERPLATE 269645bc899bSmrg 269745bc899bSmrgAC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) 269845bc899bSmrgAC_LIBTOOL_PROG_COMPILER_PIC($1) 269945bc899bSmrgAC_LIBTOOL_PROG_CC_C_O($1) 270045bc899bSmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) 270145bc899bSmrgAC_LIBTOOL_PROG_LD_SHLIBS($1) 270245bc899bSmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1) 270345bc899bSmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) 270445bc899bSmrgAC_LIBTOOL_SYS_LIB_STRIP 270545bc899bSmrgAC_LIBTOOL_DLOPEN_SELF 270645bc899bSmrg 270745bc899bSmrg# Report which library types will actually be built 270845bc899bSmrgAC_MSG_CHECKING([if libtool supports shared libraries]) 270945bc899bSmrgAC_MSG_RESULT([$can_build_shared]) 271045bc899bSmrg 271145bc899bSmrgAC_MSG_CHECKING([whether to build shared libraries]) 271245bc899bSmrgtest "$can_build_shared" = "no" && enable_shared=no 271345bc899bSmrg 271445bc899bSmrg# On AIX, shared libraries and static libraries use the same namespace, and 271545bc899bSmrg# are all built from PIC. 271645bc899bSmrgcase $host_os in 271745bc899bSmrgaix3*) 271845bc899bSmrg test "$enable_shared" = yes && enable_static=no 271945bc899bSmrg if test -n "$RANLIB"; then 272045bc899bSmrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 272145bc899bSmrg postinstall_cmds='$RANLIB $lib' 272245bc899bSmrg fi 272345bc899bSmrg ;; 272445bc899bSmrg 272545bc899bSmrgaix4* | aix5*) 272645bc899bSmrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 272745bc899bSmrg test "$enable_shared" = yes && enable_static=no 272845bc899bSmrg fi 272945bc899bSmrg ;; 273045bc899bSmrgesac 273145bc899bSmrgAC_MSG_RESULT([$enable_shared]) 273245bc899bSmrg 273345bc899bSmrgAC_MSG_CHECKING([whether to build static libraries]) 273445bc899bSmrg# Make sure either enable_shared or enable_static is yes. 273545bc899bSmrgtest "$enable_shared" = yes || enable_static=yes 273645bc899bSmrgAC_MSG_RESULT([$enable_static]) 273745bc899bSmrg 273845bc899bSmrgAC_LIBTOOL_CONFIG($1) 273945bc899bSmrg 274045bc899bSmrgAC_LANG_POP 274145bc899bSmrgCC="$lt_save_CC" 274245bc899bSmrg])# AC_LIBTOOL_LANG_C_CONFIG 274345bc899bSmrg 274445bc899bSmrg 274545bc899bSmrg# AC_LIBTOOL_LANG_CXX_CONFIG 274645bc899bSmrg# -------------------------- 274745bc899bSmrg# Ensure that the configuration vars for the C compiler are 274845bc899bSmrg# suitably defined. Those variables are subsequently used by 274945bc899bSmrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 275045bc899bSmrgAC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)]) 275145bc899bSmrgAC_DEFUN([_LT_AC_LANG_CXX_CONFIG], 275245bc899bSmrg[AC_LANG_PUSH(C++) 275345bc899bSmrgAC_REQUIRE([AC_PROG_CXX]) 275445bc899bSmrgAC_REQUIRE([_LT_AC_PROG_CXXCPP]) 275545bc899bSmrg 275645bc899bSmrg_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 275745bc899bSmrg_LT_AC_TAGVAR(allow_undefined_flag, $1)= 275845bc899bSmrg_LT_AC_TAGVAR(always_export_symbols, $1)=no 275945bc899bSmrg_LT_AC_TAGVAR(archive_expsym_cmds, $1)= 276045bc899bSmrg_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= 276145bc899bSmrg_LT_AC_TAGVAR(hardcode_direct, $1)=no 276245bc899bSmrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= 276345bc899bSmrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 276445bc899bSmrg_LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 276545bc899bSmrg_LT_AC_TAGVAR(hardcode_minus_L, $1)=no 276645bc899bSmrg_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 276745bc899bSmrg_LT_AC_TAGVAR(hardcode_automatic, $1)=no 276845bc899bSmrg_LT_AC_TAGVAR(module_cmds, $1)= 276945bc899bSmrg_LT_AC_TAGVAR(module_expsym_cmds, $1)= 277045bc899bSmrg_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown 277145bc899bSmrg_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 277245bc899bSmrg_LT_AC_TAGVAR(no_undefined_flag, $1)= 277345bc899bSmrg_LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 277445bc899bSmrg_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no 277545bc899bSmrg 277645bc899bSmrg# Dependencies to place before and after the object being linked: 277745bc899bSmrg_LT_AC_TAGVAR(predep_objects, $1)= 277845bc899bSmrg_LT_AC_TAGVAR(postdep_objects, $1)= 277945bc899bSmrg_LT_AC_TAGVAR(predeps, $1)= 278045bc899bSmrg_LT_AC_TAGVAR(postdeps, $1)= 278145bc899bSmrg_LT_AC_TAGVAR(compiler_lib_search_path, $1)= 278245bc899bSmrg 278345bc899bSmrg# Source file extension for C++ test sources. 278445bc899bSmrgac_ext=cpp 278545bc899bSmrg 278645bc899bSmrg# Object file extension for compiled C++ test sources. 278745bc899bSmrgobjext=o 278845bc899bSmrg_LT_AC_TAGVAR(objext, $1)=$objext 278945bc899bSmrg 279045bc899bSmrg# Code to be used in simple compile tests 279145bc899bSmrglt_simple_compile_test_code="int some_variable = 0;\n" 279245bc899bSmrg 279345bc899bSmrg# Code to be used in simple link tests 279445bc899bSmrglt_simple_link_test_code='int main(int, char *[[]]) { return(0); }\n' 279545bc899bSmrg 279645bc899bSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 279745bc899bSmrg_LT_AC_SYS_COMPILER 279845bc899bSmrg 279945bc899bSmrg# save warnings/boilerplate of simple test code 280045bc899bSmrg_LT_COMPILER_BOILERPLATE 280145bc899bSmrg_LT_LINKER_BOILERPLATE 280245bc899bSmrg 280345bc899bSmrg# Allow CC to be a program name with arguments. 280445bc899bSmrglt_save_CC=$CC 280545bc899bSmrglt_save_LD=$LD 280645bc899bSmrglt_save_GCC=$GCC 280745bc899bSmrgGCC=$GXX 280845bc899bSmrglt_save_with_gnu_ld=$with_gnu_ld 280945bc899bSmrglt_save_path_LD=$lt_cv_path_LD 281045bc899bSmrgif test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 281145bc899bSmrg lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 281245bc899bSmrgelse 281345bc899bSmrg $as_unset lt_cv_prog_gnu_ld 281445bc899bSmrgfi 281545bc899bSmrgif test -n "${lt_cv_path_LDCXX+set}"; then 281645bc899bSmrg lt_cv_path_LD=$lt_cv_path_LDCXX 281745bc899bSmrgelse 281845bc899bSmrg $as_unset lt_cv_path_LD 281945bc899bSmrgfi 282045bc899bSmrgtest -z "${LDCXX+set}" || LD=$LDCXX 282145bc899bSmrgCC=${CXX-"c++"} 282245bc899bSmrgcompiler=$CC 282345bc899bSmrg_LT_AC_TAGVAR(compiler, $1)=$CC 282445bc899bSmrg_LT_CC_BASENAME([$compiler]) 282545bc899bSmrg 282645bc899bSmrg# We don't want -fno-exception wen compiling C++ code, so set the 282745bc899bSmrg# no_builtin_flag separately 282845bc899bSmrgif test "$GXX" = yes; then 282945bc899bSmrg _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 283045bc899bSmrgelse 283145bc899bSmrg _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 283245bc899bSmrgfi 283345bc899bSmrg 283445bc899bSmrgif test "$GXX" = yes; then 283545bc899bSmrg # Set up default GNU C++ configuration 283645bc899bSmrg 283745bc899bSmrg AC_PROG_LD 283845bc899bSmrg 283945bc899bSmrg # Check if GNU C++ uses GNU ld as the underlying linker, since the 284045bc899bSmrg # archiving commands below assume that GNU ld is being used. 284145bc899bSmrg if test "$with_gnu_ld" = yes; then 284245bc899bSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 284345bc899bSmrg _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' 284445bc899bSmrg 284545bc899bSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 284645bc899bSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 284745bc899bSmrg 284845bc899bSmrg # If archive_cmds runs LD, not CC, wlarc should be empty 284945bc899bSmrg # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 285045bc899bSmrg # investigate it a little bit more. (MM) 285145bc899bSmrg wlarc='${wl}' 285245bc899bSmrg 285345bc899bSmrg # ancient GNU ld didn't support --whole-archive et. al. 285445bc899bSmrg if eval "`$CC -print-prog-name=ld` --help 2>&1" | \ 285545bc899bSmrg grep 'no-whole-archive' > /dev/null; then 285645bc899bSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 285745bc899bSmrg else 285845bc899bSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 285945bc899bSmrg fi 286045bc899bSmrg else 286145bc899bSmrg with_gnu_ld=no 286245bc899bSmrg wlarc= 286345bc899bSmrg 286445bc899bSmrg # A generic and very simple default shared library creation 286545bc899bSmrg # command for GNU C++ for the case where it uses the native 286645bc899bSmrg # linker, instead of GNU ld. If possible, this setting should 286745bc899bSmrg # overridden to take advantage of the native linker features on 286845bc899bSmrg # the platform it is being used on. 286945bc899bSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 287045bc899bSmrg fi 287145bc899bSmrg 287245bc899bSmrg # Commands to make compiler produce verbose output that lists 287345bc899bSmrg # what "hidden" libraries, object files and flags are used when 287445bc899bSmrg # linking a shared library. 287545bc899bSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' 287645bc899bSmrg 287745bc899bSmrgelse 287845bc899bSmrg GXX=no 287945bc899bSmrg with_gnu_ld=no 288045bc899bSmrg wlarc= 288145bc899bSmrgfi 288245bc899bSmrg 288345bc899bSmrg# PORTME: fill in a description of your system's C++ link characteristics 288445bc899bSmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 288545bc899bSmrg_LT_AC_TAGVAR(ld_shlibs, $1)=yes 288645bc899bSmrgcase $host_os in 288745bc899bSmrg aix3*) 288845bc899bSmrg # FIXME: insert proper C++ library support 288945bc899bSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 289045bc899bSmrg ;; 289145bc899bSmrg aix4* | aix5*) 289245bc899bSmrg if test "$host_cpu" = ia64; then 289345bc899bSmrg # On IA64, the linker does run time linking by default, so we don't 289445bc899bSmrg # have to do anything special. 289545bc899bSmrg aix_use_runtimelinking=no 289645bc899bSmrg exp_sym_flag='-Bexport' 289745bc899bSmrg no_entry_flag="" 289845bc899bSmrg else 289945bc899bSmrg aix_use_runtimelinking=no 290045bc899bSmrg 290145bc899bSmrg # Test if we are trying to use run time linking or normal 290245bc899bSmrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 290345bc899bSmrg # need to do runtime linking. 290445bc899bSmrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*) 290545bc899bSmrg for ld_flag in $LDFLAGS; do 290645bc899bSmrg case $ld_flag in 290745bc899bSmrg *-brtl*) 290845bc899bSmrg aix_use_runtimelinking=yes 290945bc899bSmrg break 291045bc899bSmrg ;; 291145bc899bSmrg esac 291245bc899bSmrg done 291345bc899bSmrg ;; 291445bc899bSmrg esac 291545bc899bSmrg 291645bc899bSmrg exp_sym_flag='-bexport' 291745bc899bSmrg no_entry_flag='-bnoentry' 291845bc899bSmrg fi 291945bc899bSmrg 292045bc899bSmrg # When large executables or shared objects are built, AIX ld can 292145bc899bSmrg # have problems creating the table of contents. If linking a library 292245bc899bSmrg # or program results in "error TOC overflow" add -mminimal-toc to 292345bc899bSmrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 292445bc899bSmrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 292545bc899bSmrg 292645bc899bSmrg _LT_AC_TAGVAR(archive_cmds, $1)='' 292745bc899bSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 292845bc899bSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' 292945bc899bSmrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 293045bc899bSmrg 293145bc899bSmrg if test "$GXX" = yes; then 293245bc899bSmrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 293345bc899bSmrg # We only want to do this on AIX 4.2 and lower, the check 293445bc899bSmrg # below for broken collect2 doesn't work under 4.3+ 293545bc899bSmrg collect2name=`${CC} -print-prog-name=collect2` 293645bc899bSmrg if test -f "$collect2name" && \ 293745bc899bSmrg strings "$collect2name" | grep resolve_lib_name >/dev/null 293845bc899bSmrg then 293945bc899bSmrg # We have reworked collect2 294045bc899bSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 294145bc899bSmrg else 294245bc899bSmrg # We have old collect2 294345bc899bSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported 294445bc899bSmrg # It fails to find uninstalled libraries when the uninstalled 294545bc899bSmrg # path is not listed in the libpath. Setting hardcode_minus_L 294645bc899bSmrg # to unsupported forces relinking 294745bc899bSmrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 294845bc899bSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 294945bc899bSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 295045bc899bSmrg fi 295145bc899bSmrg ;; 295245bc899bSmrg esac 295345bc899bSmrg shared_flag='-shared' 295445bc899bSmrg if test "$aix_use_runtimelinking" = yes; then 295545bc899bSmrg shared_flag="$shared_flag "'${wl}-G' 295645bc899bSmrg fi 295745bc899bSmrg else 295845bc899bSmrg # not using gcc 295945bc899bSmrg if test "$host_cpu" = ia64; then 296045bc899bSmrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 296145bc899bSmrg # chokes on -Wl,-G. The following line is correct: 296245bc899bSmrg shared_flag='-G' 296345bc899bSmrg else 296445bc899bSmrg if test "$aix_use_runtimelinking" = yes; then 296545bc899bSmrg shared_flag='${wl}-G' 296645bc899bSmrg else 296745bc899bSmrg shared_flag='${wl}-bM:SRE' 296845bc899bSmrg fi 296945bc899bSmrg fi 297045bc899bSmrg fi 297145bc899bSmrg 297245bc899bSmrg # It seems that -bexpall does not export symbols beginning with 297345bc899bSmrg # underscore (_), so it is better to generate a list of symbols to export. 297445bc899bSmrg _LT_AC_TAGVAR(always_export_symbols, $1)=yes 297545bc899bSmrg if test "$aix_use_runtimelinking" = yes; then 297645bc899bSmrg # Warning - without using the other runtime loading flags (-brtl), 297745bc899bSmrg # -berok will link without error, but may produce a broken library. 297845bc899bSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' 297945bc899bSmrg # Determine the default libpath from the value encoded in an empty executable. 298045bc899bSmrg _LT_AC_SYS_LIBPATH_AIX 298145bc899bSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 298245bc899bSmrg 298345bc899bSmrg _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" 298445bc899bSmrg else 298545bc899bSmrg if test "$host_cpu" = ia64; then 298645bc899bSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 298745bc899bSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 298845bc899bSmrg _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" 298945bc899bSmrg else 299045bc899bSmrg # Determine the default libpath from the value encoded in an empty executable. 299145bc899bSmrg _LT_AC_SYS_LIBPATH_AIX 299245bc899bSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 299345bc899bSmrg # Warning - without using the other run time loading flags, 299445bc899bSmrg # -berok will link without error, but may produce a broken library. 299545bc899bSmrg _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 299645bc899bSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 299745bc899bSmrg # Exported symbols can be pulled into shared objects from archives 299845bc899bSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 299945bc899bSmrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes 300045bc899bSmrg # This is similar to how AIX traditionally builds its shared libraries. 300145bc899bSmrg _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' 300245bc899bSmrg fi 300345bc899bSmrg fi 300445bc899bSmrg ;; 300545bc899bSmrg 300645bc899bSmrg beos*) 300745bc899bSmrg if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 300845bc899bSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 300945bc899bSmrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 301045bc899bSmrg # support --undefined. This deserves some investigation. FIXME 301145bc899bSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 301245bc899bSmrg else 301345bc899bSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 301445bc899bSmrg fi 301545bc899bSmrg ;; 301645bc899bSmrg 301745bc899bSmrg chorus*) 301845bc899bSmrg case $cc_basename in 301945bc899bSmrg *) 302045bc899bSmrg # FIXME: insert proper C++ library support 302145bc899bSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 302245bc899bSmrg ;; 302345bc899bSmrg esac 302445bc899bSmrg ;; 302545bc899bSmrg 302645bc899bSmrg cygwin* | mingw* | pw32*) 302745bc899bSmrg # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 302845bc899bSmrg # as there is no search path for DLLs. 302945bc899bSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 303045bc899bSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 303145bc899bSmrg _LT_AC_TAGVAR(always_export_symbols, $1)=no 303245bc899bSmrg _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 303345bc899bSmrg 303445bc899bSmrg if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then 303545bc899bSmrg _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' 303645bc899bSmrg # If the export-symbols file already is a .def file (1st line 303745bc899bSmrg # is EXPORTS), use it as is; otherwise, prepend... 303845bc899bSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 303945bc899bSmrg cp $export_symbols $output_objdir/$soname.def; 304045bc899bSmrg else 304145bc899bSmrg echo EXPORTS > $output_objdir/$soname.def; 304245bc899bSmrg cat $export_symbols >> $output_objdir/$soname.def; 304345bc899bSmrg fi~ 304445bc899bSmrg $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' 304545bc899bSmrg else 304645bc899bSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 304745bc899bSmrg fi 304845bc899bSmrg ;; 304945bc899bSmrg darwin* | rhapsody*) 305045bc899bSmrg case $host_os in 305145bc899bSmrg rhapsody* | darwin1.[[012]]) 305245bc899bSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' 305345bc899bSmrg ;; 305445bc899bSmrg *) # Darwin 1.3 on 305545bc899bSmrg if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then 305645bc899bSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' 305745bc899bSmrg else 305845bc899bSmrg case ${MACOSX_DEPLOYMENT_TARGET} in 305945bc899bSmrg 10.[[012]]) 306045bc899bSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' 306145bc899bSmrg ;; 306245bc899bSmrg 10.*) 306345bc899bSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup' 306445bc899bSmrg ;; 306545bc899bSmrg esac 306645bc899bSmrg fi 306745bc899bSmrg ;; 306845bc899bSmrg esac 306945bc899bSmrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 307045bc899bSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 307145bc899bSmrg _LT_AC_TAGVAR(hardcode_automatic, $1)=yes 307245bc899bSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 307345bc899bSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' 307445bc899bSmrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 307545bc899bSmrg 307645bc899bSmrg if test "$GXX" = yes ; then 307745bc899bSmrg lt_int_apple_cc_single_mod=no 307845bc899bSmrg output_verbose_link_cmd='echo' 307945bc899bSmrg if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then 308045bc899bSmrg lt_int_apple_cc_single_mod=yes 308145bc899bSmrg fi 308245bc899bSmrg if test "X$lt_int_apple_cc_single_mod" = Xyes ; then 308345bc899bSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' 308445bc899bSmrg else 308545bc899bSmrg _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' 308645bc899bSmrg fi 308745bc899bSmrg _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' 308845bc899bSmrg # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds 308945bc899bSmrg if test "X$lt_int_apple_cc_single_mod" = Xyes ; then 309045bc899bSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' 309145bc899bSmrg else 309245bc899bSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "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~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' 309345bc899bSmrg fi 309445bc899bSmrg _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}' 309545bc899bSmrg else 309645bc899bSmrg case $cc_basename in 309745bc899bSmrg xlc*) 309845bc899bSmrg output_verbose_link_cmd='echo' 309945bc899bSmrg _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` $verstring' 310045bc899bSmrg _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' 310145bc899bSmrg # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds 310245bc899bSmrg _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 $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' 310345bc899bSmrg _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}' 310445bc899bSmrg ;; 310545bc899bSmrg *) 310645bc899bSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 310745bc899bSmrg ;; 310845bc899bSmrg esac 310945bc899bSmrg fi 311045bc899bSmrg ;; 311145bc899bSmrg 311245bc899bSmrg dgux*) 311345bc899bSmrg case $cc_basename in 311445bc899bSmrg ec++*) 311545bc899bSmrg # FIXME: insert proper C++ library support 311645bc899bSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 311745bc899bSmrg ;; 311845bc899bSmrg ghcx*) 311945bc899bSmrg # Green Hills C++ Compiler 312045bc899bSmrg # FIXME: insert proper C++ library support 312145bc899bSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 312245bc899bSmrg ;; 312345bc899bSmrg *) 312445bc899bSmrg # FIXME: insert proper C++ library support 312545bc899bSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 312645bc899bSmrg ;; 312745bc899bSmrg esac 312845bc899bSmrg ;; 312945bc899bSmrg freebsd[[12]]*) 313045bc899bSmrg # C++ shared libraries reported to be fairly broken before switch to ELF 313145bc899bSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 313245bc899bSmrg ;; 313345bc899bSmrg freebsd-elf*) 313445bc899bSmrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 313545bc899bSmrg ;; 313645bc899bSmrg freebsd* | kfreebsd*-gnu | dragonfly*) 313745bc899bSmrg # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 313845bc899bSmrg # conventions 313945bc899bSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=yes 314045bc899bSmrg ;; 314145bc899bSmrg gnu*) 314245bc899bSmrg ;; 314345bc899bSmrg hpux9*) 314445bc899bSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 314545bc899bSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 314645bc899bSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 314745bc899bSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 314845bc899bSmrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 314945bc899bSmrg # but as the default 315045bc899bSmrg # location of the library. 315145bc899bSmrg 315245bc899bSmrg case $cc_basename in 315345bc899bSmrg CC*) 315445bc899bSmrg # FIXME: insert proper C++ library support 315545bc899bSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 315645bc899bSmrg ;; 315745bc899bSmrg aCC*) 315845bc899bSmrg _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' 315945bc899bSmrg # Commands to make compiler produce verbose output that lists 316045bc899bSmrg # what "hidden" libraries, object files and flags are used when 316145bc899bSmrg # linking a shared library. 316245bc899bSmrg # 316345bc899bSmrg # There doesn't appear to be a way to prevent this compiler from 316445bc899bSmrg # explicitly linking system object files so we need to strip them 316545bc899bSmrg # from the output so that they don't get included in the library 316645bc899bSmrg # dependencies. 316745bc899bSmrg 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' 316845bc899bSmrg ;; 316945bc899bSmrg *) 317045bc899bSmrg if test "$GXX" = yes; then 317145bc899bSmrg _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' 317245bc899bSmrg else 317345bc899bSmrg # FIXME: insert proper C++ library support 317445bc899bSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 317545bc899bSmrg fi 317645bc899bSmrg ;; 317745bc899bSmrg esac 317845bc899bSmrg ;; 317945bc899bSmrg hpux10*|hpux11*) 318045bc899bSmrg if test $with_gnu_ld = no; then 318145bc899bSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 318245bc899bSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 318345bc899bSmrg 318445bc899bSmrg case $host_cpu in 318545bc899bSmrg hppa*64*|ia64*) 318645bc899bSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' 318745bc899bSmrg ;; 318845bc899bSmrg *) 318945bc899bSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 319045bc899bSmrg ;; 319145bc899bSmrg esac 319245bc899bSmrg fi 319345bc899bSmrg case $host_cpu in 319445bc899bSmrg hppa*64*|ia64*) 319545bc899bSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 319645bc899bSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 319745bc899bSmrg ;; 319845bc899bSmrg *) 319945bc899bSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 320045bc899bSmrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 320145bc899bSmrg # but as the default 320245bc899bSmrg # location of the library. 320345bc899bSmrg ;; 320445bc899bSmrg esac 320545bc899bSmrg 320645bc899bSmrg case $cc_basename in 320745bc899bSmrg CC*) 320845bc899bSmrg # FIXME: insert proper C++ library support 320945bc899bSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 321045bc899bSmrg ;; 321145bc899bSmrg aCC*) 321245bc899bSmrg case $host_cpu in 321345bc899bSmrg hppa*64*) 321445bc899bSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 321545bc899bSmrg ;; 321645bc899bSmrg ia64*) 321745bc899bSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 321845bc899bSmrg ;; 321945bc899bSmrg *) 322045bc899bSmrg _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' 322145bc899bSmrg ;; 322245bc899bSmrg esac 322345bc899bSmrg # Commands to make compiler produce verbose output that lists 322445bc899bSmrg # what "hidden" libraries, object files and flags are used when 322545bc899bSmrg # linking a shared library. 322645bc899bSmrg # 322745bc899bSmrg # There doesn't appear to be a way to prevent this compiler from 322845bc899bSmrg # explicitly linking system object files so we need to strip them 322945bc899bSmrg # from the output so that they don't get included in the library 323045bc899bSmrg # dependencies. 323145bc899bSmrg 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' 323245bc899bSmrg ;; 323345bc899bSmrg *) 323445bc899bSmrg if test "$GXX" = yes; then 323545bc899bSmrg if test $with_gnu_ld = no; then 323645bc899bSmrg case $host_cpu in 323745bc899bSmrg hppa*64*) 323845bc899bSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 323945bc899bSmrg ;; 324045bc899bSmrg ia64*) 324145bc899bSmrg _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' 324245bc899bSmrg ;; 324345bc899bSmrg *) 324445bc899bSmrg _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' 324545bc899bSmrg ;; 324645bc899bSmrg esac 324745bc899bSmrg fi 324845bc899bSmrg else 324945bc899bSmrg # FIXME: insert proper C++ library support 325045bc899bSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 325145bc899bSmrg fi 325245bc899bSmrg ;; 325345bc899bSmrg esac 325445bc899bSmrg ;; 325545bc899bSmrg interix3*) 325645bc899bSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 325745bc899bSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 325845bc899bSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 325945bc899bSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 326045bc899bSmrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 326145bc899bSmrg # Instead, shared libraries are loaded at an image base (0x10000000 by 326245bc899bSmrg # default) and relocated if they conflict, which is a slow very memory 326345bc899bSmrg # consuming and fragmenting process. To avoid this, we pick a random, 326445bc899bSmrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 326545bc899bSmrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 326645bc899bSmrg _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' 326745bc899bSmrg _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' 326845bc899bSmrg ;; 326945bc899bSmrg irix5* | irix6*) 327045bc899bSmrg case $cc_basename in 327145bc899bSmrg CC*) 327245bc899bSmrg # SGI C++ 327345bc899bSmrg _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' 327445bc899bSmrg 327545bc899bSmrg # Archives containing C++ object files must be created using 327645bc899bSmrg # "CC -ar", where "CC" is the IRIX C++ compiler. This is 327745bc899bSmrg # necessary to make sure instantiated templates are included 327845bc899bSmrg # in the archive. 327945bc899bSmrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 328045bc899bSmrg ;; 328145bc899bSmrg *) 328245bc899bSmrg if test "$GXX" = yes; then 328345bc899bSmrg if test "$with_gnu_ld" = no; then 328445bc899bSmrg _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' 328545bc899bSmrg else 328645bc899bSmrg _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' 328745bc899bSmrg fi 328845bc899bSmrg fi 328945bc899bSmrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 329045bc899bSmrg ;; 329145bc899bSmrg esac 329245bc899bSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 329345bc899bSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 329445bc899bSmrg ;; 329545bc899bSmrg linux*) 329645bc899bSmrg case $cc_basename in 329745bc899bSmrg KCC*) 329845bc899bSmrg # Kuck and Associates, Inc. (KAI) C++ Compiler 329945bc899bSmrg 330045bc899bSmrg # KCC will only create a shared library if the output file 330145bc899bSmrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 330245bc899bSmrg # to its proper name (with version) after linking. 330345bc899bSmrg _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' 330445bc899bSmrg _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' 330545bc899bSmrg # Commands to make compiler produce verbose output that lists 330645bc899bSmrg # what "hidden" libraries, object files and flags are used when 330745bc899bSmrg # linking a shared library. 330845bc899bSmrg # 330945bc899bSmrg # There doesn't appear to be a way to prevent this compiler from 331045bc899bSmrg # explicitly linking system object files so we need to strip them 331145bc899bSmrg # from the output so that they don't get included in the library 331245bc899bSmrg # dependencies. 331345bc899bSmrg 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' 331445bc899bSmrg 331545bc899bSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir' 331645bc899bSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 331745bc899bSmrg 331845bc899bSmrg # Archives containing C++ object files must be created using 331945bc899bSmrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 332045bc899bSmrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 332145bc899bSmrg ;; 332245bc899bSmrg icpc*) 332345bc899bSmrg # Intel C++ 332445bc899bSmrg with_gnu_ld=yes 332545bc899bSmrg # version 8.0 and above of icpc choke on multiply defined symbols 332645bc899bSmrg # if we add $predep_objects and $postdep_objects, however 7.1 and 332745bc899bSmrg # earlier do not add the objects themselves. 332845bc899bSmrg case `$CC -V 2>&1` in 332945bc899bSmrg *"Version 7."*) 333045bc899bSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 333145bc899bSmrg _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' 333245bc899bSmrg ;; 333345bc899bSmrg *) # Version 8.0 or newer 333445bc899bSmrg tmp_idyn= 333545bc899bSmrg case $host_cpu in 333645bc899bSmrg ia64*) tmp_idyn=' -i_dynamic';; 333745bc899bSmrg esac 333845bc899bSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 333945bc899bSmrg _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' 334045bc899bSmrg ;; 334145bc899bSmrg esac 334245bc899bSmrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 334345bc899bSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 334445bc899bSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 334545bc899bSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 334645bc899bSmrg ;; 334745bc899bSmrg pgCC*) 334845bc899bSmrg # Portland Group C++ compiler 334945bc899bSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 335045bc899bSmrg _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' 335145bc899bSmrg 335245bc899bSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 335345bc899bSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 335445bc899bSmrg _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' 335545bc899bSmrg ;; 335645bc899bSmrg cxx*) 335745bc899bSmrg # Compaq C++ 335845bc899bSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 335945bc899bSmrg _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' 336045bc899bSmrg 336145bc899bSmrg runpath_var=LD_RUN_PATH 336245bc899bSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 336345bc899bSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 336445bc899bSmrg 336545bc899bSmrg # Commands to make compiler produce verbose output that lists 336645bc899bSmrg # what "hidden" libraries, object files and flags are used when 336745bc899bSmrg # linking a shared library. 336845bc899bSmrg # 336945bc899bSmrg # There doesn't appear to be a way to prevent this compiler from 337045bc899bSmrg # explicitly linking system object files so we need to strip them 337145bc899bSmrg # from the output so that they don't get included in the library 337245bc899bSmrg # dependencies. 337345bc899bSmrg 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' 337445bc899bSmrg ;; 337545bc899bSmrg esac 337645bc899bSmrg ;; 337745bc899bSmrg lynxos*) 337845bc899bSmrg # FIXME: insert proper C++ library support 337945bc899bSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 338045bc899bSmrg ;; 338145bc899bSmrg m88k*) 338245bc899bSmrg # FIXME: insert proper C++ library support 338345bc899bSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 338445bc899bSmrg ;; 338545bc899bSmrg mvs*) 338645bc899bSmrg case $cc_basename in 338745bc899bSmrg cxx*) 338845bc899bSmrg # FIXME: insert proper C++ library support 338945bc899bSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 339045bc899bSmrg ;; 339145bc899bSmrg *) 339245bc899bSmrg # FIXME: insert proper C++ library support 339345bc899bSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 339445bc899bSmrg ;; 339545bc899bSmrg esac 339645bc899bSmrg ;; 339745bc899bSmrg netbsd*) 339845bc899bSmrg if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then 339945bc899bSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 340045bc899bSmrg wlarc= 340145bc899bSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 340245bc899bSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 340345bc899bSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 340445bc899bSmrg fi 340545bc899bSmrg # Workaround some broken pre-1.5 toolchains 340645bc899bSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 340745bc899bSmrg ;; 340845bc899bSmrg openbsd2*) 340945bc899bSmrg # C++ shared libraries are fairly broken 341045bc899bSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 341145bc899bSmrg ;; 341245bc899bSmrg openbsd*) 341345bc899bSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 341445bc899bSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 341545bc899bSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 341645bc899bSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 341745bc899bSmrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 341845bc899bSmrg _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' 341945bc899bSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 342045bc899bSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 342145bc899bSmrg fi 342245bc899bSmrg output_verbose_link_cmd='echo' 342345bc899bSmrg ;; 342445bc899bSmrg osf3*) 342545bc899bSmrg case $cc_basename in 342645bc899bSmrg KCC*) 342745bc899bSmrg # Kuck and Associates, Inc. (KAI) C++ Compiler 342845bc899bSmrg 342945bc899bSmrg # KCC will only create a shared library if the output file 343045bc899bSmrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 343145bc899bSmrg # to its proper name (with version) after linking. 343245bc899bSmrg _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' 343345bc899bSmrg 343445bc899bSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 343545bc899bSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 343645bc899bSmrg 343745bc899bSmrg # Archives containing C++ object files must be created using 343845bc899bSmrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 343945bc899bSmrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 344045bc899bSmrg 344145bc899bSmrg ;; 344245bc899bSmrg RCC*) 344345bc899bSmrg # Rational C++ 2.4.1 344445bc899bSmrg # FIXME: insert proper C++ library support 344545bc899bSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 344645bc899bSmrg ;; 344745bc899bSmrg cxx*) 344845bc899bSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 344945bc899bSmrg _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' 345045bc899bSmrg 345145bc899bSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 345245bc899bSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 345345bc899bSmrg 345445bc899bSmrg # Commands to make compiler produce verbose output that lists 345545bc899bSmrg # what "hidden" libraries, object files and flags are used when 345645bc899bSmrg # linking a shared library. 345745bc899bSmrg # 345845bc899bSmrg # There doesn't appear to be a way to prevent this compiler from 345945bc899bSmrg # explicitly linking system object files so we need to strip them 346045bc899bSmrg # from the output so that they don't get included in the library 346145bc899bSmrg # dependencies. 346245bc899bSmrg 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' 346345bc899bSmrg ;; 346445bc899bSmrg *) 346545bc899bSmrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 346645bc899bSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 346745bc899bSmrg _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' 346845bc899bSmrg 346945bc899bSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 347045bc899bSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 347145bc899bSmrg 347245bc899bSmrg # Commands to make compiler produce verbose output that lists 347345bc899bSmrg # what "hidden" libraries, object files and flags are used when 347445bc899bSmrg # linking a shared library. 347545bc899bSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' 347645bc899bSmrg 347745bc899bSmrg else 347845bc899bSmrg # FIXME: insert proper C++ library support 347945bc899bSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 348045bc899bSmrg fi 348145bc899bSmrg ;; 348245bc899bSmrg esac 348345bc899bSmrg ;; 348445bc899bSmrg osf4* | osf5*) 348545bc899bSmrg case $cc_basename in 348645bc899bSmrg KCC*) 348745bc899bSmrg # Kuck and Associates, Inc. (KAI) C++ Compiler 348845bc899bSmrg 348945bc899bSmrg # KCC will only create a shared library if the output file 349045bc899bSmrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 349145bc899bSmrg # to its proper name (with version) after linking. 349245bc899bSmrg _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' 349345bc899bSmrg 349445bc899bSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 349545bc899bSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 349645bc899bSmrg 349745bc899bSmrg # Archives containing C++ object files must be created using 349845bc899bSmrg # the KAI C++ compiler. 349945bc899bSmrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' 350045bc899bSmrg ;; 350145bc899bSmrg RCC*) 350245bc899bSmrg # Rational C++ 2.4.1 350345bc899bSmrg # FIXME: insert proper C++ library support 350445bc899bSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 350545bc899bSmrg ;; 350645bc899bSmrg cxx*) 350745bc899bSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 350845bc899bSmrg _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' 350945bc899bSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 351045bc899bSmrg echo "-hidden">> $lib.exp~ 351145bc899bSmrg $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~ 351245bc899bSmrg $rm $lib.exp' 351345bc899bSmrg 351445bc899bSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 351545bc899bSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 351645bc899bSmrg 351745bc899bSmrg # Commands to make compiler produce verbose output that lists 351845bc899bSmrg # what "hidden" libraries, object files and flags are used when 351945bc899bSmrg # linking a shared library. 352045bc899bSmrg # 352145bc899bSmrg # There doesn't appear to be a way to prevent this compiler from 352245bc899bSmrg # explicitly linking system object files so we need to strip them 352345bc899bSmrg # from the output so that they don't get included in the library 352445bc899bSmrg # dependencies. 352545bc899bSmrg 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' 352645bc899bSmrg ;; 352745bc899bSmrg *) 352845bc899bSmrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 352945bc899bSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 353045bc899bSmrg _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' 353145bc899bSmrg 353245bc899bSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 353345bc899bSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 353445bc899bSmrg 353545bc899bSmrg # Commands to make compiler produce verbose output that lists 353645bc899bSmrg # what "hidden" libraries, object files and flags are used when 353745bc899bSmrg # linking a shared library. 353845bc899bSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' 353945bc899bSmrg 354045bc899bSmrg else 354145bc899bSmrg # FIXME: insert proper C++ library support 354245bc899bSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 354345bc899bSmrg fi 354445bc899bSmrg ;; 354545bc899bSmrg esac 354645bc899bSmrg ;; 354745bc899bSmrg psos*) 354845bc899bSmrg # FIXME: insert proper C++ library support 354945bc899bSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 355045bc899bSmrg ;; 355145bc899bSmrg sunos4*) 355245bc899bSmrg case $cc_basename in 355345bc899bSmrg CC*) 355445bc899bSmrg # Sun C++ 4.x 355545bc899bSmrg # FIXME: insert proper C++ library support 355645bc899bSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 355745bc899bSmrg ;; 355845bc899bSmrg lcc*) 355945bc899bSmrg # Lucid 356045bc899bSmrg # FIXME: insert proper C++ library support 356145bc899bSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 356245bc899bSmrg ;; 356345bc899bSmrg *) 356445bc899bSmrg # FIXME: insert proper C++ library support 356545bc899bSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 356645bc899bSmrg ;; 356745bc899bSmrg esac 356845bc899bSmrg ;; 356945bc899bSmrg solaris*) 357045bc899bSmrg case $cc_basename in 357145bc899bSmrg CC*) 357245bc899bSmrg # Sun C++ 4.2, 5.x and Centerline C++ 357345bc899bSmrg _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes 357445bc899bSmrg _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' 357545bc899bSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 357645bc899bSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 357745bc899bSmrg $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' 357845bc899bSmrg 357945bc899bSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 358045bc899bSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 358145bc899bSmrg case $host_os in 358245bc899bSmrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 358345bc899bSmrg *) 358445bc899bSmrg # The C++ compiler is used as linker so we must use $wl 358545bc899bSmrg # flag to pass the commands to the underlying system 358645bc899bSmrg # linker. We must also pass each convience library through 358745bc899bSmrg # to the system linker between allextract/defaultextract. 358845bc899bSmrg # The C++ compiler will combine linker options so we 358945bc899bSmrg # cannot just pass the convience library names through 359045bc899bSmrg # without $wl. 359145bc899bSmrg # Supported since Solaris 2.6 (maybe 2.5.1?) 359245bc899bSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' 359345bc899bSmrg ;; 359445bc899bSmrg esac 359545bc899bSmrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 359645bc899bSmrg 359745bc899bSmrg output_verbose_link_cmd='echo' 359845bc899bSmrg 359945bc899bSmrg # Archives containing C++ object files must be created using 360045bc899bSmrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 360145bc899bSmrg # necessary to make sure instantiated templates are included 360245bc899bSmrg # in the archive. 360345bc899bSmrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 360445bc899bSmrg ;; 360545bc899bSmrg gcx*) 360645bc899bSmrg # Green Hills C++ Compiler 360745bc899bSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 360845bc899bSmrg 360945bc899bSmrg # The C++ compiler must be used to create the archive. 361045bc899bSmrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 361145bc899bSmrg ;; 361245bc899bSmrg *) 361345bc899bSmrg # GNU C++ compiler with Solaris linker 361445bc899bSmrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 361545bc899bSmrg _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' 361645bc899bSmrg if $CC --version | grep -v '^2\.7' > /dev/null; then 361745bc899bSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 361845bc899bSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 361945bc899bSmrg $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' 362045bc899bSmrg 362145bc899bSmrg # Commands to make compiler produce verbose output that lists 362245bc899bSmrg # what "hidden" libraries, object files and flags are used when 362345bc899bSmrg # linking a shared library. 362445bc899bSmrg output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" 362545bc899bSmrg else 362645bc899bSmrg # g++ 2.7 appears to require `-G' NOT `-shared' on this 362745bc899bSmrg # platform. 362845bc899bSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 362945bc899bSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 363045bc899bSmrg $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' 363145bc899bSmrg 363245bc899bSmrg # Commands to make compiler produce verbose output that lists 363345bc899bSmrg # what "hidden" libraries, object files and flags are used when 363445bc899bSmrg # linking a shared library. 363545bc899bSmrg output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" 363645bc899bSmrg fi 363745bc899bSmrg 363845bc899bSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' 363945bc899bSmrg fi 364045bc899bSmrg ;; 364145bc899bSmrg esac 364245bc899bSmrg ;; 364345bc899bSmrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 364445bc899bSmrg _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 364545bc899bSmrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 364645bc899bSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 364745bc899bSmrg runpath_var='LD_RUN_PATH' 364845bc899bSmrg 364945bc899bSmrg case $cc_basename in 365045bc899bSmrg CC*) 365145bc899bSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 365245bc899bSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 365345bc899bSmrg ;; 365445bc899bSmrg *) 365545bc899bSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 365645bc899bSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 365745bc899bSmrg ;; 365845bc899bSmrg esac 365945bc899bSmrg ;; 366045bc899bSmrg sysv5* | sco3.2v5* | sco5v6*) 366145bc899bSmrg # Note: We can NOT use -z defs as we might desire, because we do not 366245bc899bSmrg # link with -lc, and that would cause any symbols used from libc to 366345bc899bSmrg # always be unresolved, which means just about no library would 366445bc899bSmrg # ever link correctly. If we're not using GNU ld we use -z text 366545bc899bSmrg # though, which does catch some bad symbols but isn't as heavy-handed 366645bc899bSmrg # as -z defs. 366745bc899bSmrg # For security reasons, it is highly recommended that you always 366845bc899bSmrg # use absolute paths for naming shared libraries, and exclude the 366945bc899bSmrg # DT_RUNPATH tag from executables and libraries. But doing so 367045bc899bSmrg # requires that you compile everything twice, which is a pain. 367145bc899bSmrg # So that behaviour is only enabled if SCOABSPATH is set to a 367245bc899bSmrg # non-empty value in the environment. Most likely only useful for 367345bc899bSmrg # creating official distributions of packages. 367445bc899bSmrg # This is a hack until libtool officially supports absolute path 367545bc899bSmrg # names for shared libraries. 367645bc899bSmrg _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 367745bc899bSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 367845bc899bSmrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 367945bc899bSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 368045bc899bSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' 368145bc899bSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' 368245bc899bSmrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 368345bc899bSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 368445bc899bSmrg runpath_var='LD_RUN_PATH' 368545bc899bSmrg 368645bc899bSmrg case $cc_basename in 368745bc899bSmrg CC*) 368845bc899bSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' 368945bc899bSmrg _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' 369045bc899bSmrg ;; 369145bc899bSmrg *) 369245bc899bSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' 369345bc899bSmrg _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' 369445bc899bSmrg ;; 369545bc899bSmrg esac 369645bc899bSmrg ;; 369745bc899bSmrg tandem*) 369845bc899bSmrg case $cc_basename in 369945bc899bSmrg NCC*) 370045bc899bSmrg # NonStop-UX NCC 3.20 370145bc899bSmrg # FIXME: insert proper C++ library support 370245bc899bSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 370345bc899bSmrg ;; 370445bc899bSmrg *) 370545bc899bSmrg # FIXME: insert proper C++ library support 370645bc899bSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 370745bc899bSmrg ;; 370845bc899bSmrg esac 370945bc899bSmrg ;; 371045bc899bSmrg vxworks*) 371145bc899bSmrg # FIXME: insert proper C++ library support 371245bc899bSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 371345bc899bSmrg ;; 371445bc899bSmrg *) 371545bc899bSmrg # FIXME: insert proper C++ library support 371645bc899bSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 371745bc899bSmrg ;; 371845bc899bSmrgesac 371945bc899bSmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) 372045bc899bSmrgtest "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 372145bc899bSmrg 372245bc899bSmrg_LT_AC_TAGVAR(GCC, $1)="$GXX" 372345bc899bSmrg_LT_AC_TAGVAR(LD, $1)="$LD" 372445bc899bSmrg 372545bc899bSmrgAC_LIBTOOL_POSTDEP_PREDEP($1) 372645bc899bSmrgAC_LIBTOOL_PROG_COMPILER_PIC($1) 372745bc899bSmrgAC_LIBTOOL_PROG_CC_C_O($1) 372845bc899bSmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) 372945bc899bSmrgAC_LIBTOOL_PROG_LD_SHLIBS($1) 373045bc899bSmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1) 373145bc899bSmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) 373245bc899bSmrg 373345bc899bSmrgAC_LIBTOOL_CONFIG($1) 373445bc899bSmrg 373545bc899bSmrgAC_LANG_POP 373645bc899bSmrgCC=$lt_save_CC 373745bc899bSmrgLDCXX=$LD 373845bc899bSmrgLD=$lt_save_LD 373945bc899bSmrgGCC=$lt_save_GCC 374045bc899bSmrgwith_gnu_ldcxx=$with_gnu_ld 374145bc899bSmrgwith_gnu_ld=$lt_save_with_gnu_ld 374245bc899bSmrglt_cv_path_LDCXX=$lt_cv_path_LD 374345bc899bSmrglt_cv_path_LD=$lt_save_path_LD 374445bc899bSmrglt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 374545bc899bSmrglt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 374645bc899bSmrg])# AC_LIBTOOL_LANG_CXX_CONFIG 374745bc899bSmrg 374845bc899bSmrg# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME]) 374945bc899bSmrg# ------------------------------------ 375045bc899bSmrg# Figure out "hidden" library dependencies from verbose 375145bc899bSmrg# compiler output when linking a shared library. 375245bc899bSmrg# Parse the compiler output and extract the necessary 375345bc899bSmrg# objects, libraries and library flags. 375445bc899bSmrgAC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[ 375545bc899bSmrgdnl we can't use the lt_simple_compile_test_code here, 375645bc899bSmrgdnl because it contains code intended for an executable, 375745bc899bSmrgdnl not a library. It's possible we should let each 375845bc899bSmrgdnl tag define a new lt_????_link_test_code variable, 375945bc899bSmrgdnl but it's only used here... 376045bc899bSmrgifelse([$1],[],[cat > conftest.$ac_ext <<EOF 376145bc899bSmrgint a; 376245bc899bSmrgvoid foo (void) { a = 0; } 376345bc899bSmrgEOF 376445bc899bSmrg],[$1],[CXX],[cat > conftest.$ac_ext <<EOF 376545bc899bSmrgclass Foo 376645bc899bSmrg{ 376745bc899bSmrgpublic: 376845bc899bSmrg Foo (void) { a = 0; } 376945bc899bSmrgprivate: 377045bc899bSmrg int a; 377145bc899bSmrg}; 377245bc899bSmrgEOF 377345bc899bSmrg],[$1],[F77],[cat > conftest.$ac_ext <<EOF 377445bc899bSmrg subroutine foo 377545bc899bSmrg implicit none 377645bc899bSmrg integer*4 a 377745bc899bSmrg a=0 377845bc899bSmrg return 377945bc899bSmrg end 378045bc899bSmrgEOF 378145bc899bSmrg],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF 378245bc899bSmrgpublic class foo { 378345bc899bSmrg private int a; 378445bc899bSmrg public void bar (void) { 378545bc899bSmrg a = 0; 378645bc899bSmrg } 378745bc899bSmrg}; 378845bc899bSmrgEOF 378945bc899bSmrg]) 379045bc899bSmrgdnl Parse the compiler output and extract the necessary 379145bc899bSmrgdnl objects, libraries and library flags. 379245bc899bSmrgif AC_TRY_EVAL(ac_compile); then 379345bc899bSmrg # Parse the compiler output and extract the necessary 379445bc899bSmrg # objects, libraries and library flags. 379545bc899bSmrg 379645bc899bSmrg # Sentinel used to keep track of whether or not we are before 379745bc899bSmrg # the conftest object file. 379845bc899bSmrg pre_test_object_deps_done=no 379945bc899bSmrg 380045bc899bSmrg # The `*' in the case matches for architectures that use `case' in 380145bc899bSmrg # $output_verbose_cmd can trigger glob expansion during the loop 380245bc899bSmrg # eval without this substitution. 380345bc899bSmrg output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"` 380445bc899bSmrg 380545bc899bSmrg for p in `eval $output_verbose_link_cmd`; do 380645bc899bSmrg case $p in 380745bc899bSmrg 380845bc899bSmrg -L* | -R* | -l*) 380945bc899bSmrg # Some compilers place space between "-{L,R}" and the path. 381045bc899bSmrg # Remove the space. 381145bc899bSmrg if test $p = "-L" \ 381245bc899bSmrg || test $p = "-R"; then 381345bc899bSmrg prev=$p 381445bc899bSmrg continue 381545bc899bSmrg else 381645bc899bSmrg prev= 381745bc899bSmrg fi 381845bc899bSmrg 381945bc899bSmrg if test "$pre_test_object_deps_done" = no; then 382045bc899bSmrg case $p in 382145bc899bSmrg -L* | -R*) 382245bc899bSmrg # Internal compiler library paths should come after those 382345bc899bSmrg # provided the user. The postdeps already come after the 382445bc899bSmrg # user supplied libs so there is no need to process them. 382545bc899bSmrg if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then 382645bc899bSmrg _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" 382745bc899bSmrg else 382845bc899bSmrg _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" 382945bc899bSmrg fi 383045bc899bSmrg ;; 383145bc899bSmrg # The "-l" case would never come before the object being 383245bc899bSmrg # linked, so don't bother handling this case. 383345bc899bSmrg esac 383445bc899bSmrg else 383545bc899bSmrg if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then 383645bc899bSmrg _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}" 383745bc899bSmrg else 383845bc899bSmrg _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}" 383945bc899bSmrg fi 384045bc899bSmrg fi 384145bc899bSmrg ;; 384245bc899bSmrg 384345bc899bSmrg *.$objext) 384445bc899bSmrg # This assumes that the test object file only shows up 384545bc899bSmrg # once in the compiler output. 384645bc899bSmrg if test "$p" = "conftest.$objext"; then 384745bc899bSmrg pre_test_object_deps_done=yes 384845bc899bSmrg continue 384945bc899bSmrg fi 385045bc899bSmrg 385145bc899bSmrg if test "$pre_test_object_deps_done" = no; then 385245bc899bSmrg if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then 385345bc899bSmrg _LT_AC_TAGVAR(predep_objects, $1)="$p" 385445bc899bSmrg else 385545bc899bSmrg _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p" 385645bc899bSmrg fi 385745bc899bSmrg else 385845bc899bSmrg if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then 385945bc899bSmrg _LT_AC_TAGVAR(postdep_objects, $1)="$p" 386045bc899bSmrg else 386145bc899bSmrg _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p" 386245bc899bSmrg fi 386345bc899bSmrg fi 386445bc899bSmrg ;; 386545bc899bSmrg 386645bc899bSmrg *) ;; # Ignore the rest. 386745bc899bSmrg 386845bc899bSmrg esac 386945bc899bSmrg done 387045bc899bSmrg 387145bc899bSmrg # Clean up. 387245bc899bSmrg rm -f a.out a.exe 387345bc899bSmrgelse 387445bc899bSmrg echo "libtool.m4: error: problem compiling $1 test program" 387545bc899bSmrgfi 387645bc899bSmrg 387745bc899bSmrg$rm -f confest.$objext 387845bc899bSmrg 387945bc899bSmrg# PORTME: override above test on systems where it is broken 388045bc899bSmrgifelse([$1],[CXX], 388145bc899bSmrg[case $host_os in 388245bc899bSmrginterix3*) 388345bc899bSmrg # Interix 3.5 installs completely hosed .la files for C++, so rather than 388445bc899bSmrg # hack all around it, let's just trust "g++" to DTRT. 388545bc899bSmrg _LT_AC_TAGVAR(predep_objects,$1)= 388645bc899bSmrg _LT_AC_TAGVAR(postdep_objects,$1)= 388745bc899bSmrg _LT_AC_TAGVAR(postdeps,$1)= 388845bc899bSmrg ;; 388945bc899bSmrg 389045bc899bSmrgsolaris*) 389145bc899bSmrg case $cc_basename in 389245bc899bSmrg CC*) 389345bc899bSmrg # Adding this requires a known-good setup of shared libraries for 389445bc899bSmrg # Sun compiler versions before 5.6, else PIC objects from an old 389545bc899bSmrg # archive will be linked into the output, leading to subtle bugs. 389645bc899bSmrg _LT_AC_TAGVAR(postdeps,$1)='-lCstd -lCrun' 389745bc899bSmrg ;; 389845bc899bSmrg esac 389945bc899bSmrg ;; 390045bc899bSmrgesac 390145bc899bSmrg]) 390245bc899bSmrg 390345bc899bSmrgcase " $_LT_AC_TAGVAR(postdeps, $1) " in 390445bc899bSmrg*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;; 390545bc899bSmrgesac 390645bc899bSmrg])# AC_LIBTOOL_POSTDEP_PREDEP 390745bc899bSmrg 390845bc899bSmrg# AC_LIBTOOL_LANG_F77_CONFIG 390945bc899bSmrg# -------------------------- 391045bc899bSmrg# Ensure that the configuration vars for the C compiler are 391145bc899bSmrg# suitably defined. Those variables are subsequently used by 391245bc899bSmrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 391345bc899bSmrgAC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)]) 391445bc899bSmrgAC_DEFUN([_LT_AC_LANG_F77_CONFIG], 391545bc899bSmrg[AC_REQUIRE([AC_PROG_F77]) 391645bc899bSmrgAC_LANG_PUSH(Fortran 77) 391745bc899bSmrg 391845bc899bSmrg_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 391945bc899bSmrg_LT_AC_TAGVAR(allow_undefined_flag, $1)= 392045bc899bSmrg_LT_AC_TAGVAR(always_export_symbols, $1)=no 392145bc899bSmrg_LT_AC_TAGVAR(archive_expsym_cmds, $1)= 392245bc899bSmrg_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= 392345bc899bSmrg_LT_AC_TAGVAR(hardcode_direct, $1)=no 392445bc899bSmrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= 392545bc899bSmrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 392645bc899bSmrg_LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 392745bc899bSmrg_LT_AC_TAGVAR(hardcode_minus_L, $1)=no 392845bc899bSmrg_LT_AC_TAGVAR(hardcode_automatic, $1)=no 392945bc899bSmrg_LT_AC_TAGVAR(module_cmds, $1)= 393045bc899bSmrg_LT_AC_TAGVAR(module_expsym_cmds, $1)= 393145bc899bSmrg_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown 393245bc899bSmrg_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 393345bc899bSmrg_LT_AC_TAGVAR(no_undefined_flag, $1)= 393445bc899bSmrg_LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 393545bc899bSmrg_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no 393645bc899bSmrg 393745bc899bSmrg# Source file extension for f77 test sources. 393845bc899bSmrgac_ext=f 393945bc899bSmrg 394045bc899bSmrg# Object file extension for compiled f77 test sources. 394145bc899bSmrgobjext=o 394245bc899bSmrg_LT_AC_TAGVAR(objext, $1)=$objext 394345bc899bSmrg 394445bc899bSmrg# Code to be used in simple compile tests 394545bc899bSmrglt_simple_compile_test_code=" subroutine t\n return\n end\n" 394645bc899bSmrg 394745bc899bSmrg# Code to be used in simple link tests 394845bc899bSmrglt_simple_link_test_code=" program t\n end\n" 394945bc899bSmrg 395045bc899bSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 395145bc899bSmrg_LT_AC_SYS_COMPILER 395245bc899bSmrg 395345bc899bSmrg# save warnings/boilerplate of simple test code 395445bc899bSmrg_LT_COMPILER_BOILERPLATE 395545bc899bSmrg_LT_LINKER_BOILERPLATE 395645bc899bSmrg 395745bc899bSmrg# Allow CC to be a program name with arguments. 395845bc899bSmrglt_save_CC="$CC" 395945bc899bSmrgCC=${F77-"f77"} 396045bc899bSmrgcompiler=$CC 396145bc899bSmrg_LT_AC_TAGVAR(compiler, $1)=$CC 396245bc899bSmrg_LT_CC_BASENAME([$compiler]) 396345bc899bSmrg 396445bc899bSmrgAC_MSG_CHECKING([if libtool supports shared libraries]) 396545bc899bSmrgAC_MSG_RESULT([$can_build_shared]) 396645bc899bSmrg 396745bc899bSmrgAC_MSG_CHECKING([whether to build shared libraries]) 396845bc899bSmrgtest "$can_build_shared" = "no" && enable_shared=no 396945bc899bSmrg 397045bc899bSmrg# On AIX, shared libraries and static libraries use the same namespace, and 397145bc899bSmrg# are all built from PIC. 397245bc899bSmrgcase $host_os in 397345bc899bSmrgaix3*) 397445bc899bSmrg test "$enable_shared" = yes && enable_static=no 397545bc899bSmrg if test -n "$RANLIB"; then 397645bc899bSmrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 397745bc899bSmrg postinstall_cmds='$RANLIB $lib' 397845bc899bSmrg fi 397945bc899bSmrg ;; 398045bc899bSmrgaix4* | aix5*) 398145bc899bSmrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 398245bc899bSmrg test "$enable_shared" = yes && enable_static=no 398345bc899bSmrg fi 398445bc899bSmrg ;; 398545bc899bSmrgesac 398645bc899bSmrgAC_MSG_RESULT([$enable_shared]) 398745bc899bSmrg 398845bc899bSmrgAC_MSG_CHECKING([whether to build static libraries]) 398945bc899bSmrg# Make sure either enable_shared or enable_static is yes. 399045bc899bSmrgtest "$enable_shared" = yes || enable_static=yes 399145bc899bSmrgAC_MSG_RESULT([$enable_static]) 399245bc899bSmrg 399345bc899bSmrg_LT_AC_TAGVAR(GCC, $1)="$G77" 399445bc899bSmrg_LT_AC_TAGVAR(LD, $1)="$LD" 399545bc899bSmrg 399645bc899bSmrgAC_LIBTOOL_PROG_COMPILER_PIC($1) 399745bc899bSmrgAC_LIBTOOL_PROG_CC_C_O($1) 399845bc899bSmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) 399945bc899bSmrgAC_LIBTOOL_PROG_LD_SHLIBS($1) 400045bc899bSmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1) 400145bc899bSmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) 400245bc899bSmrg 400345bc899bSmrgAC_LIBTOOL_CONFIG($1) 400445bc899bSmrg 400545bc899bSmrgAC_LANG_POP 400645bc899bSmrgCC="$lt_save_CC" 400745bc899bSmrg])# AC_LIBTOOL_LANG_F77_CONFIG 400845bc899bSmrg 400945bc899bSmrg 401045bc899bSmrg# AC_LIBTOOL_LANG_GCJ_CONFIG 401145bc899bSmrg# -------------------------- 401245bc899bSmrg# Ensure that the configuration vars for the C compiler are 401345bc899bSmrg# suitably defined. Those variables are subsequently used by 401445bc899bSmrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 401545bc899bSmrgAC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)]) 401645bc899bSmrgAC_DEFUN([_LT_AC_LANG_GCJ_CONFIG], 401745bc899bSmrg[AC_LANG_SAVE 401845bc899bSmrg 401945bc899bSmrg# Source file extension for Java test sources. 402045bc899bSmrgac_ext=java 402145bc899bSmrg 402245bc899bSmrg# Object file extension for compiled Java test sources. 402345bc899bSmrgobjext=o 402445bc899bSmrg_LT_AC_TAGVAR(objext, $1)=$objext 402545bc899bSmrg 402645bc899bSmrg# Code to be used in simple compile tests 402745bc899bSmrglt_simple_compile_test_code="class foo {}\n" 402845bc899bSmrg 402945bc899bSmrg# Code to be used in simple link tests 403045bc899bSmrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }\n' 403145bc899bSmrg 403245bc899bSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 403345bc899bSmrg_LT_AC_SYS_COMPILER 403445bc899bSmrg 403545bc899bSmrg# save warnings/boilerplate of simple test code 403645bc899bSmrg_LT_COMPILER_BOILERPLATE 403745bc899bSmrg_LT_LINKER_BOILERPLATE 403845bc899bSmrg 403945bc899bSmrg# Allow CC to be a program name with arguments. 404045bc899bSmrglt_save_CC="$CC" 404145bc899bSmrgCC=${GCJ-"gcj"} 404245bc899bSmrgcompiler=$CC 404345bc899bSmrg_LT_AC_TAGVAR(compiler, $1)=$CC 404445bc899bSmrg_LT_CC_BASENAME([$compiler]) 404545bc899bSmrg 404645bc899bSmrg# GCJ did not exist at the time GCC didn't implicitly link libc in. 404745bc899bSmrg_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 404845bc899bSmrg 404945bc899bSmrg_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 405045bc899bSmrg 405145bc899bSmrgAC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) 405245bc899bSmrgAC_LIBTOOL_PROG_COMPILER_PIC($1) 405345bc899bSmrgAC_LIBTOOL_PROG_CC_C_O($1) 405445bc899bSmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) 405545bc899bSmrgAC_LIBTOOL_PROG_LD_SHLIBS($1) 405645bc899bSmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1) 405745bc899bSmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) 405845bc899bSmrg 405945bc899bSmrgAC_LIBTOOL_CONFIG($1) 406045bc899bSmrg 406145bc899bSmrgAC_LANG_RESTORE 406245bc899bSmrgCC="$lt_save_CC" 406345bc899bSmrg])# AC_LIBTOOL_LANG_GCJ_CONFIG 406445bc899bSmrg 406545bc899bSmrg 406645bc899bSmrg# AC_LIBTOOL_LANG_RC_CONFIG 406745bc899bSmrg# ------------------------- 406845bc899bSmrg# Ensure that the configuration vars for the Windows resource compiler are 406945bc899bSmrg# suitably defined. Those variables are subsequently used by 407045bc899bSmrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 407145bc899bSmrgAC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)]) 407245bc899bSmrgAC_DEFUN([_LT_AC_LANG_RC_CONFIG], 407345bc899bSmrg[AC_LANG_SAVE 407445bc899bSmrg 407545bc899bSmrg# Source file extension for RC test sources. 407645bc899bSmrgac_ext=rc 407745bc899bSmrg 407845bc899bSmrg# Object file extension for compiled RC test sources. 407945bc899bSmrgobjext=o 408045bc899bSmrg_LT_AC_TAGVAR(objext, $1)=$objext 408145bc899bSmrg 408245bc899bSmrg# Code to be used in simple compile tests 408345bc899bSmrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n' 408445bc899bSmrg 408545bc899bSmrg# Code to be used in simple link tests 408645bc899bSmrglt_simple_link_test_code="$lt_simple_compile_test_code" 408745bc899bSmrg 408845bc899bSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 408945bc899bSmrg_LT_AC_SYS_COMPILER 409045bc899bSmrg 409145bc899bSmrg# save warnings/boilerplate of simple test code 409245bc899bSmrg_LT_COMPILER_BOILERPLATE 409345bc899bSmrg_LT_LINKER_BOILERPLATE 409445bc899bSmrg 409545bc899bSmrg# Allow CC to be a program name with arguments. 409645bc899bSmrglt_save_CC="$CC" 409745bc899bSmrgCC=${RC-"windres"} 409845bc899bSmrgcompiler=$CC 409945bc899bSmrg_LT_AC_TAGVAR(compiler, $1)=$CC 410045bc899bSmrg_LT_CC_BASENAME([$compiler]) 410145bc899bSmrg_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 410245bc899bSmrg 410345bc899bSmrgAC_LIBTOOL_CONFIG($1) 410445bc899bSmrg 410545bc899bSmrgAC_LANG_RESTORE 410645bc899bSmrgCC="$lt_save_CC" 410745bc899bSmrg])# AC_LIBTOOL_LANG_RC_CONFIG 410845bc899bSmrg 410945bc899bSmrg 411045bc899bSmrg# AC_LIBTOOL_CONFIG([TAGNAME]) 411145bc899bSmrg# ---------------------------- 411245bc899bSmrg# If TAGNAME is not passed, then create an initial libtool script 411345bc899bSmrg# with a default configuration from the untagged config vars. Otherwise 411445bc899bSmrg# add code to config.status for appending the configuration named by 411545bc899bSmrg# TAGNAME from the matching tagged config vars. 411645bc899bSmrgAC_DEFUN([AC_LIBTOOL_CONFIG], 411745bc899bSmrg[# The else clause should only fire when bootstrapping the 411845bc899bSmrg# libtool distribution, otherwise you forgot to ship ltmain.sh 411945bc899bSmrg# with your package, and you will get complaints that there are 412045bc899bSmrg# no rules to generate ltmain.sh. 412145bc899bSmrgif test -f "$ltmain"; then 412245bc899bSmrg # See if we are running on zsh, and set the options which allow our commands through 412345bc899bSmrg # without removal of \ escapes. 412445bc899bSmrg if test -n "${ZSH_VERSION+set}" ; then 412545bc899bSmrg setopt NO_GLOB_SUBST 412645bc899bSmrg fi 412745bc899bSmrg # Now quote all the things that may contain metacharacters while being 412845bc899bSmrg # careful not to overquote the AC_SUBSTed values. We take copies of the 412945bc899bSmrg # variables and quote the copies for generation of the libtool script. 413045bc899bSmrg for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ 413145bc899bSmrg SED SHELL STRIP \ 413245bc899bSmrg libname_spec library_names_spec soname_spec extract_expsyms_cmds \ 413345bc899bSmrg old_striplib striplib file_magic_cmd finish_cmds finish_eval \ 413445bc899bSmrg deplibs_check_method reload_flag reload_cmds need_locks \ 413545bc899bSmrg lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ 413645bc899bSmrg lt_cv_sys_global_symbol_to_c_name_address \ 413745bc899bSmrg sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ 413845bc899bSmrg old_postinstall_cmds old_postuninstall_cmds \ 413945bc899bSmrg _LT_AC_TAGVAR(compiler, $1) \ 414045bc899bSmrg _LT_AC_TAGVAR(CC, $1) \ 414145bc899bSmrg _LT_AC_TAGVAR(LD, $1) \ 414245bc899bSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \ 414345bc899bSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \ 414445bc899bSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \ 414545bc899bSmrg _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \ 414645bc899bSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \ 414745bc899bSmrg _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \ 414845bc899bSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \ 414945bc899bSmrg _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \ 415045bc899bSmrg _LT_AC_TAGVAR(old_archive_cmds, $1) \ 415145bc899bSmrg _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \ 415245bc899bSmrg _LT_AC_TAGVAR(predep_objects, $1) \ 415345bc899bSmrg _LT_AC_TAGVAR(postdep_objects, $1) \ 415445bc899bSmrg _LT_AC_TAGVAR(predeps, $1) \ 415545bc899bSmrg _LT_AC_TAGVAR(postdeps, $1) \ 415645bc899bSmrg _LT_AC_TAGVAR(compiler_lib_search_path, $1) \ 415745bc899bSmrg _LT_AC_TAGVAR(archive_cmds, $1) \ 415845bc899bSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1) \ 415945bc899bSmrg _LT_AC_TAGVAR(postinstall_cmds, $1) \ 416045bc899bSmrg _LT_AC_TAGVAR(postuninstall_cmds, $1) \ 416145bc899bSmrg _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \ 416245bc899bSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1) \ 416345bc899bSmrg _LT_AC_TAGVAR(no_undefined_flag, $1) \ 416445bc899bSmrg _LT_AC_TAGVAR(export_symbols_cmds, $1) \ 416545bc899bSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \ 416645bc899bSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \ 416745bc899bSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \ 416845bc899bSmrg _LT_AC_TAGVAR(hardcode_automatic, $1) \ 416945bc899bSmrg _LT_AC_TAGVAR(module_cmds, $1) \ 417045bc899bSmrg _LT_AC_TAGVAR(module_expsym_cmds, $1) \ 417145bc899bSmrg _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \ 417245bc899bSmrg _LT_AC_TAGVAR(exclude_expsyms, $1) \ 417345bc899bSmrg _LT_AC_TAGVAR(include_expsyms, $1); do 417445bc899bSmrg 417545bc899bSmrg case $var in 417645bc899bSmrg _LT_AC_TAGVAR(old_archive_cmds, $1) | \ 417745bc899bSmrg _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \ 417845bc899bSmrg _LT_AC_TAGVAR(archive_cmds, $1) | \ 417945bc899bSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \ 418045bc899bSmrg _LT_AC_TAGVAR(module_cmds, $1) | \ 418145bc899bSmrg _LT_AC_TAGVAR(module_expsym_cmds, $1) | \ 418245bc899bSmrg _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \ 418345bc899bSmrg _LT_AC_TAGVAR(export_symbols_cmds, $1) | \ 418445bc899bSmrg extract_expsyms_cmds | reload_cmds | finish_cmds | \ 418545bc899bSmrg postinstall_cmds | postuninstall_cmds | \ 418645bc899bSmrg old_postinstall_cmds | old_postuninstall_cmds | \ 418745bc899bSmrg sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) 418845bc899bSmrg # Double-quote double-evaled strings. 418945bc899bSmrg eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" 419045bc899bSmrg ;; 419145bc899bSmrg *) 419245bc899bSmrg eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" 419345bc899bSmrg ;; 419445bc899bSmrg esac 419545bc899bSmrg done 419645bc899bSmrg 419745bc899bSmrg case $lt_echo in 419845bc899bSmrg *'\[$]0 --fallback-echo"') 419945bc899bSmrg lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'` 420045bc899bSmrg ;; 420145bc899bSmrg esac 420245bc899bSmrg 420345bc899bSmrgifelse([$1], [], 420445bc899bSmrg [cfgfile="${ofile}T" 420545bc899bSmrg trap "$rm \"$cfgfile\"; exit 1" 1 2 15 420645bc899bSmrg $rm -f "$cfgfile" 420745bc899bSmrg AC_MSG_NOTICE([creating $ofile])], 420845bc899bSmrg [cfgfile="$ofile"]) 420945bc899bSmrg 421045bc899bSmrg cat <<__EOF__ >> "$cfgfile" 421145bc899bSmrgifelse([$1], [], 421245bc899bSmrg[#! $SHELL 421345bc899bSmrg 421445bc899bSmrg# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. 421545bc899bSmrg# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) 421645bc899bSmrg# NOTE: Changes made to this file will be lost: look at ltmain.sh. 421745bc899bSmrg# 421845bc899bSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 421945bc899bSmrg# Free Software Foundation, Inc. 422045bc899bSmrg# 422145bc899bSmrg# This file is part of GNU Libtool: 422245bc899bSmrg# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 422345bc899bSmrg# 422445bc899bSmrg# This program is free software; you can redistribute it and/or modify 422545bc899bSmrg# it under the terms of the GNU General Public License as published by 422645bc899bSmrg# the Free Software Foundation; either version 2 of the License, or 422745bc899bSmrg# (at your option) any later version. 422845bc899bSmrg# 422945bc899bSmrg# This program is distributed in the hope that it will be useful, but 423045bc899bSmrg# WITHOUT ANY WARRANTY; without even the implied warranty of 423145bc899bSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 423245bc899bSmrg# General Public License for more details. 423345bc899bSmrg# 423445bc899bSmrg# You should have received a copy of the GNU General Public License 423545bc899bSmrg# along with this program; if not, write to the Free Software 423645bc899bSmrg# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 423745bc899bSmrg# 423845bc899bSmrg# As a special exception to the GNU General Public License, if you 423945bc899bSmrg# distribute this file as part of a program that contains a 424045bc899bSmrg# configuration script generated by Autoconf, you may include it under 424145bc899bSmrg# the same distribution terms that you use for the rest of that program. 424245bc899bSmrg 424345bc899bSmrg# A sed program that does not truncate output. 424445bc899bSmrgSED=$lt_SED 424545bc899bSmrg 424645bc899bSmrg# Sed that helps us avoid accidentally triggering echo(1) options like -n. 424745bc899bSmrgXsed="$SED -e 1s/^X//" 424845bc899bSmrg 424945bc899bSmrg# The HP-UX ksh and POSIX shell print the target directory to stdout 425045bc899bSmrg# if CDPATH is set. 425145bc899bSmrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 425245bc899bSmrg 425345bc899bSmrg# The names of the tagged configurations supported by this script. 425445bc899bSmrgavailable_tags= 425545bc899bSmrg 425645bc899bSmrg# ### BEGIN LIBTOOL CONFIG], 425745bc899bSmrg[# ### BEGIN LIBTOOL TAG CONFIG: $tagname]) 425845bc899bSmrg 425945bc899bSmrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 426045bc899bSmrg 426145bc899bSmrg# Shell to use when invoking shell scripts. 426245bc899bSmrgSHELL=$lt_SHELL 426345bc899bSmrg 426445bc899bSmrg# Whether or not to build shared libraries. 426545bc899bSmrgbuild_libtool_libs=$enable_shared 426645bc899bSmrg 426745bc899bSmrg# Whether or not to build static libraries. 426845bc899bSmrgbuild_old_libs=$enable_static 426945bc899bSmrg 427045bc899bSmrg# Whether or not to add -lc for building shared libraries. 427145bc899bSmrgbuild_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1) 427245bc899bSmrg 427345bc899bSmrg# Whether or not to disallow shared libs when runtime libs are static 427445bc899bSmrgallow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) 427545bc899bSmrg 427645bc899bSmrg# Whether or not to optimize for fast installation. 427745bc899bSmrgfast_install=$enable_fast_install 427845bc899bSmrg 427945bc899bSmrg# The host system. 428045bc899bSmrghost_alias=$host_alias 428145bc899bSmrghost=$host 428245bc899bSmrghost_os=$host_os 428345bc899bSmrg 428445bc899bSmrg# The build system. 428545bc899bSmrgbuild_alias=$build_alias 428645bc899bSmrgbuild=$build 428745bc899bSmrgbuild_os=$build_os 428845bc899bSmrg 428945bc899bSmrg# An echo program that does not interpret backslashes. 429045bc899bSmrgecho=$lt_echo 429145bc899bSmrg 429245bc899bSmrg# The archiver. 429345bc899bSmrgAR=$lt_AR 429445bc899bSmrgAR_FLAGS=$lt_AR_FLAGS 429545bc899bSmrg 429645bc899bSmrg# A C compiler. 429745bc899bSmrgLTCC=$lt_LTCC 429845bc899bSmrg 429945bc899bSmrg# LTCC compiler flags. 430045bc899bSmrgLTCFLAGS=$lt_LTCFLAGS 430145bc899bSmrg 430245bc899bSmrg# A language-specific compiler. 430345bc899bSmrgCC=$lt_[]_LT_AC_TAGVAR(compiler, $1) 430445bc899bSmrg 430545bc899bSmrg# Is the compiler the GNU C compiler? 430645bc899bSmrgwith_gcc=$_LT_AC_TAGVAR(GCC, $1) 430745bc899bSmrg 430845bc899bSmrggcc_dir=\`gcc -print-file-name=. | $SED 's,/\.$,,'\` 430945bc899bSmrggcc_ver=\`gcc -dumpversion\` 431045bc899bSmrg 431145bc899bSmrg# An ERE matcher. 431245bc899bSmrgEGREP=$lt_EGREP 431345bc899bSmrg 431445bc899bSmrg# The linker used to build libraries. 431545bc899bSmrgLD=$lt_[]_LT_AC_TAGVAR(LD, $1) 431645bc899bSmrg 431745bc899bSmrg# Whether we need hard or soft links. 431845bc899bSmrgLN_S=$lt_LN_S 431945bc899bSmrg 432045bc899bSmrg# A BSD-compatible nm program. 432145bc899bSmrgNM=$lt_NM 432245bc899bSmrg 432345bc899bSmrg# A symbol stripping program 432445bc899bSmrgSTRIP=$lt_STRIP 432545bc899bSmrg 432645bc899bSmrg# Used to examine libraries when file_magic_cmd begins "file" 432745bc899bSmrgMAGIC_CMD=$MAGIC_CMD 432845bc899bSmrg 432945bc899bSmrg# Used on cygwin: DLL creation program. 433045bc899bSmrgDLLTOOL="$DLLTOOL" 433145bc899bSmrg 433245bc899bSmrg# Used on cygwin: object dumper. 433345bc899bSmrgOBJDUMP="$OBJDUMP" 433445bc899bSmrg 433545bc899bSmrg# Used on cygwin: assembler. 433645bc899bSmrgAS="$AS" 433745bc899bSmrg 433845bc899bSmrg# The name of the directory that contains temporary libtool files. 433945bc899bSmrgobjdir=$objdir 434045bc899bSmrg 434145bc899bSmrg# How to create reloadable object files. 434245bc899bSmrgreload_flag=$lt_reload_flag 434345bc899bSmrgreload_cmds=$lt_reload_cmds 434445bc899bSmrg 434545bc899bSmrg# How to pass a linker flag through the compiler. 434645bc899bSmrgwl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) 434745bc899bSmrg 434845bc899bSmrg# Object file suffix (normally "o"). 434945bc899bSmrgobjext="$ac_objext" 435045bc899bSmrg 435145bc899bSmrg# Old archive suffix (normally "a"). 435245bc899bSmrglibext="$libext" 435345bc899bSmrg 435445bc899bSmrg# Shared library suffix (normally ".so"). 435545bc899bSmrgshrext_cmds='$shrext_cmds' 435645bc899bSmrg 435745bc899bSmrg# Executable file suffix (normally ""). 435845bc899bSmrgexeext="$exeext" 435945bc899bSmrg 436045bc899bSmrg# Additional compiler flags for building library objects. 436145bc899bSmrgpic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) 436245bc899bSmrgpic_mode=$pic_mode 436345bc899bSmrg 436445bc899bSmrg# What is the maximum length of a command? 436545bc899bSmrgmax_cmd_len=$lt_cv_sys_max_cmd_len 436645bc899bSmrg 436745bc899bSmrg# Does compiler simultaneously support -c and -o options? 436845bc899bSmrgcompiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) 436945bc899bSmrg 437045bc899bSmrg# Must we lock files when doing compilation? 437145bc899bSmrgneed_locks=$lt_need_locks 437245bc899bSmrg 437345bc899bSmrg# Do we need the lib prefix for modules? 437445bc899bSmrgneed_lib_prefix=$need_lib_prefix 437545bc899bSmrg 437645bc899bSmrg# Do we need a version for libraries? 437745bc899bSmrgneed_version=$need_version 437845bc899bSmrg 437945bc899bSmrg# Whether dlopen is supported. 438045bc899bSmrgdlopen_support=$enable_dlopen 438145bc899bSmrg 438245bc899bSmrg# Whether dlopen of programs is supported. 438345bc899bSmrgdlopen_self=$enable_dlopen_self 438445bc899bSmrg 438545bc899bSmrg# Whether dlopen of statically linked programs is supported. 438645bc899bSmrgdlopen_self_static=$enable_dlopen_self_static 438745bc899bSmrg 438845bc899bSmrg# Compiler flag to prevent dynamic linking. 438945bc899bSmrglink_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1) 439045bc899bSmrg 439145bc899bSmrg# Compiler flag to turn off builtin functions. 439245bc899bSmrgno_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) 439345bc899bSmrg 439445bc899bSmrg# Compiler flag to allow reflexive dlopens. 439545bc899bSmrgexport_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1) 439645bc899bSmrg 439745bc899bSmrg# Compiler flag to generate shared objects directly from archives. 439845bc899bSmrgwhole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1) 439945bc899bSmrg 440045bc899bSmrg# Compiler flag to generate thread-safe objects. 440145bc899bSmrgthread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1) 440245bc899bSmrg 440345bc899bSmrg# Library versioning type. 440445bc899bSmrgversion_type=$version_type 440545bc899bSmrg 440645bc899bSmrg# Format of library name prefix. 440745bc899bSmrglibname_spec=$lt_libname_spec 440845bc899bSmrg 440945bc899bSmrg# List of archive names. First name is the real one, the rest are links. 441045bc899bSmrg# The last name is the one that the linker finds with -lNAME. 441145bc899bSmrglibrary_names_spec=$lt_library_names_spec 441245bc899bSmrg 441345bc899bSmrg# The coded name of the library, if different from the real name. 441445bc899bSmrgsoname_spec=$lt_soname_spec 441545bc899bSmrg 441645bc899bSmrg# Commands used to build and install an old-style archive. 441745bc899bSmrgRANLIB=$lt_RANLIB 441845bc899bSmrgold_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1) 441945bc899bSmrgold_postinstall_cmds=$lt_old_postinstall_cmds 442045bc899bSmrgold_postuninstall_cmds=$lt_old_postuninstall_cmds 442145bc899bSmrg 442245bc899bSmrg# Create an old-style archive from a shared archive. 442345bc899bSmrgold_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1) 442445bc899bSmrg 442545bc899bSmrg# Create a temporary old-style archive to link instead of a shared archive. 442645bc899bSmrgold_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) 442745bc899bSmrg 442845bc899bSmrg# Commands used to build and install a shared archive. 442945bc899bSmrgarchive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1) 443045bc899bSmrgarchive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1) 443145bc899bSmrgpostinstall_cmds=$lt_postinstall_cmds 443245bc899bSmrgpostuninstall_cmds=$lt_postuninstall_cmds 443345bc899bSmrg 443445bc899bSmrg# Commands used to build a loadable module (assumed same as above if empty) 443545bc899bSmrgmodule_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1) 443645bc899bSmrgmodule_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1) 443745bc899bSmrg 443845bc899bSmrg# Commands to strip libraries. 443945bc899bSmrgold_striplib=$lt_old_striplib 444045bc899bSmrgstriplib=$lt_striplib 444145bc899bSmrg 444245bc899bSmrg# Dependencies to place before the objects being linked to create a 444345bc899bSmrg# shared library. 444445bc899bSmrgpredep_objects=\`echo $lt_[]_LT_AC_TAGVAR(predep_objects, $1) | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` 444545bc899bSmrg 444645bc899bSmrg# Dependencies to place after the objects being linked to create a 444745bc899bSmrg# shared library. 444845bc899bSmrgpostdep_objects=\`echo $lt_[]_LT_AC_TAGVAR(postdep_objects, $1) | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` 444945bc899bSmrg 445045bc899bSmrg# Dependencies to place before the objects being linked to create a 445145bc899bSmrg# shared library. 445245bc899bSmrgpredeps=$lt_[]_LT_AC_TAGVAR(predeps, $1) 445345bc899bSmrg 445445bc899bSmrg# Dependencies to place after the objects being linked to create a 445545bc899bSmrg# shared library. 445645bc899bSmrgpostdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1) 445745bc899bSmrg 445845bc899bSmrg# The library search path used internally by the compiler when linking 445945bc899bSmrg# a shared library. 446045bc899bSmrgcompiler_lib_search_path=\`echo $lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1) | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` 446145bc899bSmrg 446245bc899bSmrg# Method to check whether dependent libraries are shared objects. 446345bc899bSmrgdeplibs_check_method=$lt_deplibs_check_method 446445bc899bSmrg 446545bc899bSmrg# Command to use when deplibs_check_method == file_magic. 446645bc899bSmrgfile_magic_cmd=$lt_file_magic_cmd 446745bc899bSmrg 446845bc899bSmrg# Flag that allows shared libraries with undefined symbols to be built. 446945bc899bSmrgallow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1) 447045bc899bSmrg 447145bc899bSmrg# Flag that forces no undefined symbols. 447245bc899bSmrgno_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1) 447345bc899bSmrg 447445bc899bSmrg# Commands used to finish a libtool library installation in a directory. 447545bc899bSmrgfinish_cmds=$lt_finish_cmds 447645bc899bSmrg 447745bc899bSmrg# Same as above, but a single script fragment to be evaled but not shown. 447845bc899bSmrgfinish_eval=$lt_finish_eval 447945bc899bSmrg 448045bc899bSmrg# Take the output of nm and produce a listing of raw symbols and C names. 448145bc899bSmrgglobal_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe 448245bc899bSmrg 448345bc899bSmrg# Transform the output of nm in a proper C declaration 448445bc899bSmrgglobal_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl 448545bc899bSmrg 448645bc899bSmrg# Transform the output of nm in a C name address pair 448745bc899bSmrgglobal_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address 448845bc899bSmrg 448945bc899bSmrg# This is the shared library runtime path variable. 449045bc899bSmrgrunpath_var=$runpath_var 449145bc899bSmrg 449245bc899bSmrg# This is the shared library path variable. 449345bc899bSmrgshlibpath_var=$shlibpath_var 449445bc899bSmrg 449545bc899bSmrg# Is shlibpath searched before the hard-coded library search path? 449645bc899bSmrgshlibpath_overrides_runpath=$shlibpath_overrides_runpath 449745bc899bSmrg 449845bc899bSmrg# How to hardcode a shared library path into an executable. 449945bc899bSmrghardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1) 450045bc899bSmrg 450145bc899bSmrg# Whether we should hardcode library paths into libraries. 450245bc899bSmrghardcode_into_libs=$hardcode_into_libs 450345bc899bSmrg 450445bc899bSmrg# Flag to hardcode \$libdir into a binary during linking. 450545bc899bSmrg# This must work even if \$libdir does not exist. 450645bc899bSmrghardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) 450745bc899bSmrg 450845bc899bSmrg# If ld is used when linking, flag to hardcode \$libdir into 450945bc899bSmrg# a binary during linking. This must work even if \$libdir does 451045bc899bSmrg# not exist. 451145bc899bSmrghardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) 451245bc899bSmrg 451345bc899bSmrg# Whether we need a single -rpath flag with a separated argument. 451445bc899bSmrghardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1) 451545bc899bSmrg 451645bc899bSmrg# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the 451745bc899bSmrg# resulting binary. 451845bc899bSmrghardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1) 451945bc899bSmrg 452045bc899bSmrg# Set to yes if using the -LDIR flag during linking hardcodes DIR into the 452145bc899bSmrg# resulting binary. 452245bc899bSmrghardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1) 452345bc899bSmrg 452445bc899bSmrg# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into 452545bc899bSmrg# the resulting binary. 452645bc899bSmrghardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1) 452745bc899bSmrg 452845bc899bSmrg# Set to yes if building a shared library automatically hardcodes DIR into the library 452945bc899bSmrg# and all subsequent libraries and executables linked against it. 453045bc899bSmrghardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1) 453145bc899bSmrg 453245bc899bSmrg# Variables whose values should be saved in libtool wrapper scripts and 453345bc899bSmrg# restored at relink time. 453445bc899bSmrgvariables_saved_for_relink="$variables_saved_for_relink" 453545bc899bSmrg 453645bc899bSmrg# Whether libtool must link a program against all its dependency libraries. 453745bc899bSmrglink_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1) 453845bc899bSmrg 453945bc899bSmrg# Compile-time system search path for libraries 454045bc899bSmrgsys_lib_search_path_spec=\`echo $lt_sys_lib_search_path_spec | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` 454145bc899bSmrg 454245bc899bSmrg# Run-time system search path for libraries 454345bc899bSmrgsys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec 454445bc899bSmrg 454545bc899bSmrg# Fix the shell variable \$srcfile for the compiler. 454645bc899bSmrgfix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)" 454745bc899bSmrg 454845bc899bSmrg# Set to yes if exported symbols are required. 454945bc899bSmrgalways_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1) 455045bc899bSmrg 455145bc899bSmrg# The commands to list exported symbols. 455245bc899bSmrgexport_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1) 455345bc899bSmrg 455445bc899bSmrg# The commands to extract the exported symbol list from a shared archive. 455545bc899bSmrgextract_expsyms_cmds=$lt_extract_expsyms_cmds 455645bc899bSmrg 455745bc899bSmrg# Symbols that should not be listed in the preloaded symbols. 455845bc899bSmrgexclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1) 455945bc899bSmrg 456045bc899bSmrg# Symbols that must always be exported. 456145bc899bSmrginclude_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1) 456245bc899bSmrg 456345bc899bSmrgifelse([$1],[], 456445bc899bSmrg[# ### END LIBTOOL CONFIG], 456545bc899bSmrg[# ### END LIBTOOL TAG CONFIG: $tagname]) 456645bc899bSmrg 456745bc899bSmrg__EOF__ 456845bc899bSmrg 456945bc899bSmrgifelse([$1],[], [ 457045bc899bSmrg case $host_os in 457145bc899bSmrg aix3*) 457245bc899bSmrg cat <<\EOF >> "$cfgfile" 457345bc899bSmrg 457445bc899bSmrg# AIX sometimes has problems with the GCC collect2 program. For some 457545bc899bSmrg# reason, if we set the COLLECT_NAMES environment variable, the problems 457645bc899bSmrg# vanish in a puff of smoke. 457745bc899bSmrgif test "X${COLLECT_NAMES+set}" != Xset; then 457845bc899bSmrg COLLECT_NAMES= 457945bc899bSmrg export COLLECT_NAMES 458045bc899bSmrgfi 458145bc899bSmrgEOF 458245bc899bSmrg ;; 458345bc899bSmrg esac 458445bc899bSmrg 458545bc899bSmrg # We use sed instead of cat because bash on DJGPP gets confused if 458645bc899bSmrg # if finds mixed CR/LF and LF-only lines. Since sed operates in 458745bc899bSmrg # text mode, it properly converts lines to CR/LF. This bash problem 458845bc899bSmrg # is reportedly fixed, but why not run on old versions too? 458945bc899bSmrg sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1) 459045bc899bSmrg 459145bc899bSmrg mv -f "$cfgfile" "$ofile" || \ 459245bc899bSmrg (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 459345bc899bSmrg chmod +x "$ofile" 459445bc899bSmrg]) 459545bc899bSmrgelse 459645bc899bSmrg # If there is no Makefile yet, we rely on a make rule to execute 459745bc899bSmrg # `config.status --recheck' to rerun these tests and create the 459845bc899bSmrg # libtool script then. 459945bc899bSmrg ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` 460045bc899bSmrg if test -f "$ltmain_in"; then 460145bc899bSmrg test -f Makefile && make "$ltmain" 460245bc899bSmrg fi 460345bc899bSmrgfi 460445bc899bSmrg])# AC_LIBTOOL_CONFIG 460545bc899bSmrg 460645bc899bSmrg 460745bc899bSmrg# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME]) 460845bc899bSmrg# ------------------------------------------- 460945bc899bSmrgAC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], 461045bc899bSmrg[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl 461145bc899bSmrg 461245bc899bSmrg_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 461345bc899bSmrg 461445bc899bSmrgif test "$GCC" = yes; then 461545bc899bSmrg _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 461645bc899bSmrg 461745bc899bSmrg AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 461845bc899bSmrg lt_cv_prog_compiler_rtti_exceptions, 461945bc899bSmrg [-fno-rtti -fno-exceptions], [], 462045bc899bSmrg [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 462145bc899bSmrgfi 462245bc899bSmrg])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI 462345bc899bSmrg 462445bc899bSmrg 462545bc899bSmrg# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE 462645bc899bSmrg# --------------------------------- 462745bc899bSmrgAC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], 462845bc899bSmrg[AC_REQUIRE([AC_CANONICAL_HOST]) 462945bc899bSmrgAC_REQUIRE([AC_PROG_NM]) 463045bc899bSmrgAC_REQUIRE([AC_OBJEXT]) 463145bc899bSmrg# Check for command to grab the raw symbol name followed by C symbol from nm. 463245bc899bSmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object]) 463345bc899bSmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 463445bc899bSmrg[ 463545bc899bSmrg# These are sane defaults that work on at least a few old systems. 463645bc899bSmrg# [They come from Ultrix. What could be older than Ultrix?!! ;)] 463745bc899bSmrg 463845bc899bSmrg# Character class describing NM global symbol codes. 463945bc899bSmrgsymcode='[[BCDEGRST]]' 464045bc899bSmrg 464145bc899bSmrg# Regexp to match symbols that can be accessed directly from C. 464245bc899bSmrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 464345bc899bSmrg 464445bc899bSmrg# Transform an extracted symbol line into a proper C declaration 464545bc899bSmrglt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'" 464645bc899bSmrg 464745bc899bSmrg# Transform an extracted symbol line into symbol name and symbol address 464845bc899bSmrglt_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'" 464945bc899bSmrg 465045bc899bSmrg# Define system-specific variables. 465145bc899bSmrgcase $host_os in 465245bc899bSmrgaix*) 465345bc899bSmrg symcode='[[BCDT]]' 465445bc899bSmrg ;; 465545bc899bSmrgcygwin* | mingw* | pw32*) 465645bc899bSmrg symcode='[[ABCDGISTW]]' 465745bc899bSmrg ;; 465845bc899bSmrghpux*) # Its linker distinguishes data from code symbols 465945bc899bSmrg if test "$host_cpu" = ia64; then 466045bc899bSmrg symcode='[[ABCDEGRST]]' 466145bc899bSmrg fi 466245bc899bSmrg lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 466345bc899bSmrg 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'" 466445bc899bSmrg ;; 466545bc899bSmrglinux*) 466645bc899bSmrg if test "$host_cpu" = ia64; then 466745bc899bSmrg symcode='[[ABCDGIRSTW]]' 466845bc899bSmrg lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 466945bc899bSmrg 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'" 467045bc899bSmrg fi 467145bc899bSmrg ;; 467245bc899bSmrgirix* | nonstopux*) 467345bc899bSmrg symcode='[[BCDEGRST]]' 467445bc899bSmrg ;; 467545bc899bSmrgosf*) 467645bc899bSmrg symcode='[[BCDEGQRST]]' 467745bc899bSmrg ;; 467845bc899bSmrgsolaris*) 467945bc899bSmrg symcode='[[BDRT]]' 468045bc899bSmrg ;; 468145bc899bSmrgsco3.2v5*) 468245bc899bSmrg symcode='[[DT]]' 468345bc899bSmrg ;; 468445bc899bSmrgsysv4.2uw2*) 468545bc899bSmrg symcode='[[DT]]' 468645bc899bSmrg ;; 468745bc899bSmrgsysv5* | sco5v6* | unixware* | OpenUNIX*) 468845bc899bSmrg symcode='[[ABDT]]' 468945bc899bSmrg ;; 469045bc899bSmrgsysv4) 469145bc899bSmrg symcode='[[DFNSTU]]' 469245bc899bSmrg ;; 469345bc899bSmrgesac 469445bc899bSmrg 469545bc899bSmrg# Handle CRLF in mingw tool chain 469645bc899bSmrgopt_cr= 469745bc899bSmrgcase $build_os in 469845bc899bSmrgmingw*) 469945bc899bSmrg opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp 470045bc899bSmrg ;; 470145bc899bSmrgesac 470245bc899bSmrg 470345bc899bSmrg# If we're using GNU nm, then use its standard symbol codes. 470445bc899bSmrgcase `$NM -V 2>&1` in 470545bc899bSmrg*GNU* | *'with BFD'*) 470645bc899bSmrg symcode='[[ABCDGIRSTW]]' ;; 470745bc899bSmrgesac 470845bc899bSmrg 470945bc899bSmrg# Try without a prefix undercore, then with it. 471045bc899bSmrgfor ac_symprfx in "" "_"; do 471145bc899bSmrg 471245bc899bSmrg # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 471345bc899bSmrg symxfrm="\\1 $ac_symprfx\\2 \\2" 471445bc899bSmrg 471545bc899bSmrg # Write the raw and C identifiers. 471645bc899bSmrg lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 471745bc899bSmrg 471845bc899bSmrg # Check to see that the pipe works correctly. 471945bc899bSmrg pipe_works=no 472045bc899bSmrg 472145bc899bSmrg rm -f conftest* 472245bc899bSmrg cat > conftest.$ac_ext <<EOF 472345bc899bSmrg#ifdef __cplusplus 472445bc899bSmrgextern "C" { 472545bc899bSmrg#endif 472645bc899bSmrgchar nm_test_var; 472745bc899bSmrgvoid nm_test_func(){} 472845bc899bSmrg#ifdef __cplusplus 472945bc899bSmrg} 473045bc899bSmrg#endif 473145bc899bSmrgint main(){nm_test_var='a';nm_test_func();return(0);} 473245bc899bSmrgEOF 473345bc899bSmrg 473445bc899bSmrg if AC_TRY_EVAL(ac_compile); then 473545bc899bSmrg # Now try to grab the symbols. 473645bc899bSmrg nlist=conftest.nm 473745bc899bSmrg if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then 473845bc899bSmrg # Try sorting and uniquifying the output. 473945bc899bSmrg if sort "$nlist" | uniq > "$nlist"T; then 474045bc899bSmrg mv -f "$nlist"T "$nlist" 474145bc899bSmrg else 474245bc899bSmrg rm -f "$nlist"T 474345bc899bSmrg fi 474445bc899bSmrg 474545bc899bSmrg # Make sure that we snagged all the symbols we need. 474645bc899bSmrg if grep ' nm_test_var$' "$nlist" >/dev/null; then 474745bc899bSmrg if grep ' nm_test_func$' "$nlist" >/dev/null; then 474845bc899bSmrg cat <<EOF > conftest.$ac_ext 474945bc899bSmrg#ifdef __cplusplus 475045bc899bSmrgextern "C" { 475145bc899bSmrg#endif 475245bc899bSmrg 475345bc899bSmrgEOF 475445bc899bSmrg # Now generate the symbol file. 475545bc899bSmrg eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' 475645bc899bSmrg 475745bc899bSmrg cat <<EOF >> conftest.$ac_ext 475845bc899bSmrg#if defined (__STDC__) && __STDC__ 475945bc899bSmrg# define lt_ptr_t void * 476045bc899bSmrg#else 476145bc899bSmrg# define lt_ptr_t char * 476245bc899bSmrg# define const 476345bc899bSmrg#endif 476445bc899bSmrg 476545bc899bSmrg/* The mapping between symbol names and symbols. */ 476645bc899bSmrgconst struct { 476745bc899bSmrg const char *name; 476845bc899bSmrg lt_ptr_t address; 476945bc899bSmrg} 477045bc899bSmrglt_preloaded_symbols[[]] = 477145bc899bSmrg{ 477245bc899bSmrgEOF 477345bc899bSmrg $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext 477445bc899bSmrg cat <<\EOF >> conftest.$ac_ext 477545bc899bSmrg {0, (lt_ptr_t) 0} 477645bc899bSmrg}; 477745bc899bSmrg 477845bc899bSmrg#ifdef __cplusplus 477945bc899bSmrg} 478045bc899bSmrg#endif 478145bc899bSmrgEOF 478245bc899bSmrg # Now try linking the two files. 478345bc899bSmrg mv conftest.$ac_objext conftstm.$ac_objext 478445bc899bSmrg lt_save_LIBS="$LIBS" 478545bc899bSmrg lt_save_CFLAGS="$CFLAGS" 478645bc899bSmrg LIBS="conftstm.$ac_objext" 478745bc899bSmrg CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 478845bc899bSmrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then 478945bc899bSmrg pipe_works=yes 479045bc899bSmrg fi 479145bc899bSmrg LIBS="$lt_save_LIBS" 479245bc899bSmrg CFLAGS="$lt_save_CFLAGS" 479345bc899bSmrg else 479445bc899bSmrg echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 479545bc899bSmrg fi 479645bc899bSmrg else 479745bc899bSmrg echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 479845bc899bSmrg fi 479945bc899bSmrg else 480045bc899bSmrg echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 480145bc899bSmrg fi 480245bc899bSmrg else 480345bc899bSmrg echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 480445bc899bSmrg cat conftest.$ac_ext >&5 480545bc899bSmrg fi 480645bc899bSmrg rm -f conftest* conftst* 480745bc899bSmrg 480845bc899bSmrg # Do not use the global_symbol_pipe unless it works. 480945bc899bSmrg if test "$pipe_works" = yes; then 481045bc899bSmrg break 481145bc899bSmrg else 481245bc899bSmrg lt_cv_sys_global_symbol_pipe= 481345bc899bSmrg fi 481445bc899bSmrgdone 481545bc899bSmrg]) 481645bc899bSmrgif test -z "$lt_cv_sys_global_symbol_pipe"; then 481745bc899bSmrg lt_cv_sys_global_symbol_to_cdecl= 481845bc899bSmrgfi 481945bc899bSmrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 482045bc899bSmrg AC_MSG_RESULT(failed) 482145bc899bSmrgelse 482245bc899bSmrg AC_MSG_RESULT(ok) 482345bc899bSmrgfi 482445bc899bSmrg]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE 482545bc899bSmrg 482645bc899bSmrg 482745bc899bSmrg# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME]) 482845bc899bSmrg# --------------------------------------- 482945bc899bSmrgAC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC], 483045bc899bSmrg[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)= 483145bc899bSmrg_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 483245bc899bSmrg_LT_AC_TAGVAR(lt_prog_compiler_static, $1)= 483345bc899bSmrg 483445bc899bSmrgAC_MSG_CHECKING([for $compiler option to produce PIC]) 483545bc899bSmrg ifelse([$1],[CXX],[ 483645bc899bSmrg # C++ specific cases for pic, static, wl, etc. 483745bc899bSmrg if test "$GXX" = yes; then 483845bc899bSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 483945bc899bSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' 484045bc899bSmrg 484145bc899bSmrg case $host_os in 484245bc899bSmrg aix*) 484345bc899bSmrg # All AIX code is PIC. 484445bc899bSmrg if test "$host_cpu" = ia64; then 484545bc899bSmrg # AIX 5 now supports IA64 processor 484645bc899bSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 484745bc899bSmrg fi 484845bc899bSmrg ;; 484945bc899bSmrg amigaos*) 485045bc899bSmrg # FIXME: we need at least 68020 code to build shared libraries, but 485145bc899bSmrg # adding the `-m68020' flag to GCC prevents building anything better, 485245bc899bSmrg # like `-m68040'. 485345bc899bSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 485445bc899bSmrg ;; 485545bc899bSmrg beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 485645bc899bSmrg # PIC is the default for these OSes. 485745bc899bSmrg ;; 485845bc899bSmrg mingw* | os2* | pw32*) 485945bc899bSmrg # This hack is so that the source file can tell whether it is being 486045bc899bSmrg # built for inclusion in a dll (and should export symbols for example). 486145bc899bSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' 486245bc899bSmrg ;; 486345bc899bSmrg darwin* | rhapsody*) 486445bc899bSmrg # PIC is the default on this platform 486545bc899bSmrg # Common symbols not allowed in MH_DYLIB files 486645bc899bSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 486745bc899bSmrg ;; 486845bc899bSmrg *djgpp*) 486945bc899bSmrg # DJGPP does not support shared libraries at all 487045bc899bSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 487145bc899bSmrg ;; 487245bc899bSmrg interix3*) 487345bc899bSmrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 487445bc899bSmrg # Instead, we relocate shared libraries at runtime. 487545bc899bSmrg ;; 487645bc899bSmrg sysv4*MP*) 487745bc899bSmrg if test -d /usr/nec; then 487845bc899bSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 487945bc899bSmrg fi 488045bc899bSmrg ;; 488145bc899bSmrg hpux*) 488245bc899bSmrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 488345bc899bSmrg # not for PA HP-UX. 488445bc899bSmrg case $host_cpu in 488545bc899bSmrg hppa*64*|ia64*) 488645bc899bSmrg ;; 488745bc899bSmrg *) 488845bc899bSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 488945bc899bSmrg ;; 489045bc899bSmrg esac 489145bc899bSmrg ;; 489245bc899bSmrg *) 489345bc899bSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 489445bc899bSmrg ;; 489545bc899bSmrg esac 489645bc899bSmrg else 489745bc899bSmrg case $host_os in 489845bc899bSmrg aix4* | aix5*) 489945bc899bSmrg # All AIX code is PIC. 490045bc899bSmrg if test "$host_cpu" = ia64; then 490145bc899bSmrg # AIX 5 now supports IA64 processor 490245bc899bSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 490345bc899bSmrg else 490445bc899bSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 490545bc899bSmrg fi 490645bc899bSmrg ;; 490745bc899bSmrg chorus*) 490845bc899bSmrg case $cc_basename in 490945bc899bSmrg cxch68*) 491045bc899bSmrg # Green Hills C++ Compiler 491145bc899bSmrg # _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" 491245bc899bSmrg ;; 491345bc899bSmrg esac 491445bc899bSmrg ;; 491545bc899bSmrg darwin*) 491645bc899bSmrg # PIC is the default on this platform 491745bc899bSmrg # Common symbols not allowed in MH_DYLIB files 491845bc899bSmrg case $cc_basename in 491945bc899bSmrg xlc*) 492045bc899bSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' 492145bc899bSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 492245bc899bSmrg ;; 492345bc899bSmrg esac 492445bc899bSmrg ;; 492545bc899bSmrg dgux*) 492645bc899bSmrg case $cc_basename in 492745bc899bSmrg ec++*) 492845bc899bSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 492945bc899bSmrg ;; 493045bc899bSmrg ghcx*) 493145bc899bSmrg # Green Hills C++ Compiler 493245bc899bSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 493345bc899bSmrg ;; 493445bc899bSmrg *) 493545bc899bSmrg ;; 493645bc899bSmrg esac 493745bc899bSmrg ;; 493845bc899bSmrg freebsd* | kfreebsd*-gnu | dragonfly*) 493945bc899bSmrg # FreeBSD uses GNU C++ 494045bc899bSmrg ;; 494145bc899bSmrg hpux9* | hpux10* | hpux11*) 494245bc899bSmrg case $cc_basename in 494345bc899bSmrg CC*) 494445bc899bSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 494545bc899bSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 494645bc899bSmrg if test "$host_cpu" != ia64; then 494745bc899bSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 494845bc899bSmrg fi 494945bc899bSmrg ;; 495045bc899bSmrg aCC*) 495145bc899bSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 495245bc899bSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 495345bc899bSmrg case $host_cpu in 495445bc899bSmrg hppa*64*|ia64*) 495545bc899bSmrg # +Z the default 495645bc899bSmrg ;; 495745bc899bSmrg *) 495845bc899bSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 495945bc899bSmrg ;; 496045bc899bSmrg esac 496145bc899bSmrg ;; 496245bc899bSmrg *) 496345bc899bSmrg ;; 496445bc899bSmrg esac 496545bc899bSmrg ;; 496645bc899bSmrg interix*) 496745bc899bSmrg # This is c89, which is MS Visual C++ (no shared libs) 496845bc899bSmrg # Anyone wants to do a port? 496945bc899bSmrg ;; 497045bc899bSmrg irix5* | irix6* | nonstopux*) 497145bc899bSmrg case $cc_basename in 497245bc899bSmrg CC*) 497345bc899bSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 497445bc899bSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 497545bc899bSmrg # CC pic flag -KPIC is the default. 497645bc899bSmrg ;; 497745bc899bSmrg *) 497845bc899bSmrg ;; 497945bc899bSmrg esac 498045bc899bSmrg ;; 498145bc899bSmrg linux*) 498245bc899bSmrg case $cc_basename in 498345bc899bSmrg KCC*) 498445bc899bSmrg # KAI C++ Compiler 498545bc899bSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 498645bc899bSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 498745bc899bSmrg ;; 498845bc899bSmrg icpc* | ecpc*) 498945bc899bSmrg # Intel C++ 499045bc899bSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 499145bc899bSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 499245bc899bSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' 499345bc899bSmrg ;; 499445bc899bSmrg pgCC*) 499545bc899bSmrg # Portland Group C++ compiler. 499645bc899bSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 499745bc899bSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 499845bc899bSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 499945bc899bSmrg ;; 500045bc899bSmrg cxx*) 500145bc899bSmrg # Compaq C++ 500245bc899bSmrg # Make sure the PIC flag is empty. It appears that all Alpha 500345bc899bSmrg # Linux and Compaq Tru64 Unix objects are PIC. 500445bc899bSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 500545bc899bSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 500645bc899bSmrg ;; 500745bc899bSmrg *) 500845bc899bSmrg ;; 500945bc899bSmrg esac 501045bc899bSmrg ;; 501145bc899bSmrg lynxos*) 501245bc899bSmrg ;; 501345bc899bSmrg m88k*) 501445bc899bSmrg ;; 501545bc899bSmrg mvs*) 501645bc899bSmrg case $cc_basename in 501745bc899bSmrg cxx*) 501845bc899bSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 501945bc899bSmrg ;; 502045bc899bSmrg *) 502145bc899bSmrg ;; 502245bc899bSmrg esac 502345bc899bSmrg ;; 502445bc899bSmrg netbsd*) 502545bc899bSmrg ;; 502645bc899bSmrg osf3* | osf4* | osf5*) 502745bc899bSmrg case $cc_basename in 502845bc899bSmrg KCC*) 502945bc899bSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 503045bc899bSmrg ;; 503145bc899bSmrg RCC*) 503245bc899bSmrg # Rational C++ 2.4.1 503345bc899bSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 503445bc899bSmrg ;; 503545bc899bSmrg cxx*) 503645bc899bSmrg # Digital/Compaq C++ 503745bc899bSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 503845bc899bSmrg # Make sure the PIC flag is empty. It appears that all Alpha 503945bc899bSmrg # Linux and Compaq Tru64 Unix objects are PIC. 504045bc899bSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 504145bc899bSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 504245bc899bSmrg ;; 504345bc899bSmrg *) 504445bc899bSmrg ;; 504545bc899bSmrg esac 504645bc899bSmrg ;; 504745bc899bSmrg psos*) 504845bc899bSmrg ;; 504945bc899bSmrg solaris*) 505045bc899bSmrg case $cc_basename in 505145bc899bSmrg CC*) 505245bc899bSmrg # Sun C++ 4.2, 5.x and Centerline C++ 505345bc899bSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 505445bc899bSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 505545bc899bSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 505645bc899bSmrg ;; 505745bc899bSmrg gcx*) 505845bc899bSmrg # Green Hills C++ Compiler 505945bc899bSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 506045bc899bSmrg ;; 506145bc899bSmrg *) 506245bc899bSmrg ;; 506345bc899bSmrg esac 506445bc899bSmrg ;; 506545bc899bSmrg sunos4*) 506645bc899bSmrg case $cc_basename in 506745bc899bSmrg CC*) 506845bc899bSmrg # Sun C++ 4.x 506945bc899bSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 507045bc899bSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 507145bc899bSmrg ;; 507245bc899bSmrg lcc*) 507345bc899bSmrg # Lucid 507445bc899bSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 507545bc899bSmrg ;; 507645bc899bSmrg *) 507745bc899bSmrg ;; 507845bc899bSmrg esac 507945bc899bSmrg ;; 508045bc899bSmrg tandem*) 508145bc899bSmrg case $cc_basename in 508245bc899bSmrg NCC*) 508345bc899bSmrg # NonStop-UX NCC 3.20 508445bc899bSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 508545bc899bSmrg ;; 508645bc899bSmrg *) 508745bc899bSmrg ;; 508845bc899bSmrg esac 508945bc899bSmrg ;; 509045bc899bSmrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 509145bc899bSmrg case $cc_basename in 509245bc899bSmrg CC*) 509345bc899bSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 509445bc899bSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 509545bc899bSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 509645bc899bSmrg ;; 509745bc899bSmrg esac 509845bc899bSmrg ;; 509945bc899bSmrg vxworks*) 510045bc899bSmrg ;; 510145bc899bSmrg *) 510245bc899bSmrg _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 510345bc899bSmrg ;; 510445bc899bSmrg esac 510545bc899bSmrg fi 510645bc899bSmrg], 510745bc899bSmrg[ 510845bc899bSmrg if test "$GCC" = yes; then 510945bc899bSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 511045bc899bSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' 511145bc899bSmrg 511245bc899bSmrg case $host_os in 511345bc899bSmrg aix*) 511445bc899bSmrg # All AIX code is PIC. 511545bc899bSmrg if test "$host_cpu" = ia64; then 511645bc899bSmrg # AIX 5 now supports IA64 processor 511745bc899bSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 511845bc899bSmrg fi 511945bc899bSmrg ;; 512045bc899bSmrg 512145bc899bSmrg amigaos*) 512245bc899bSmrg # FIXME: we need at least 68020 code to build shared libraries, but 512345bc899bSmrg # adding the `-m68020' flag to GCC prevents building anything better, 512445bc899bSmrg # like `-m68040'. 512545bc899bSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 512645bc899bSmrg ;; 512745bc899bSmrg 512845bc899bSmrg beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 512945bc899bSmrg # PIC is the default for these OSes. 513045bc899bSmrg ;; 513145bc899bSmrg 513245bc899bSmrg mingw* | pw32* | os2*) 513345bc899bSmrg # This hack is so that the source file can tell whether it is being 513445bc899bSmrg # built for inclusion in a dll (and should export symbols for example). 513545bc899bSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' 513645bc899bSmrg ;; 513745bc899bSmrg 513845bc899bSmrg darwin* | rhapsody*) 513945bc899bSmrg # PIC is the default on this platform 514045bc899bSmrg # Common symbols not allowed in MH_DYLIB files 514145bc899bSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 514245bc899bSmrg ;; 514345bc899bSmrg 514445bc899bSmrg interix3*) 514545bc899bSmrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 514645bc899bSmrg # Instead, we relocate shared libraries at runtime. 514745bc899bSmrg ;; 514845bc899bSmrg 514945bc899bSmrg msdosdjgpp*) 515045bc899bSmrg # Just because we use GCC doesn't mean we suddenly get shared libraries 515145bc899bSmrg # on systems that don't support them. 515245bc899bSmrg _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 515345bc899bSmrg enable_shared=no 515445bc899bSmrg ;; 515545bc899bSmrg 515645bc899bSmrg sysv4*MP*) 515745bc899bSmrg if test -d /usr/nec; then 515845bc899bSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 515945bc899bSmrg fi 516045bc899bSmrg ;; 516145bc899bSmrg 516245bc899bSmrg hpux*) 516345bc899bSmrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 516445bc899bSmrg # not for PA HP-UX. 516545bc899bSmrg case $host_cpu in 516645bc899bSmrg hppa*64*|ia64*) 516745bc899bSmrg # +Z the default 516845bc899bSmrg ;; 516945bc899bSmrg *) 517045bc899bSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 517145bc899bSmrg ;; 517245bc899bSmrg esac 517345bc899bSmrg ;; 517445bc899bSmrg 517545bc899bSmrg *) 517645bc899bSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 517745bc899bSmrg ;; 517845bc899bSmrg esac 517945bc899bSmrg else 518045bc899bSmrg # PORTME Check for flag to pass linker flags through the system compiler. 518145bc899bSmrg case $host_os in 518245bc899bSmrg aix*) 518345bc899bSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 518445bc899bSmrg if test "$host_cpu" = ia64; then 518545bc899bSmrg # AIX 5 now supports IA64 processor 518645bc899bSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 518745bc899bSmrg else 518845bc899bSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 518945bc899bSmrg fi 519045bc899bSmrg ;; 519145bc899bSmrg darwin*) 519245bc899bSmrg # PIC is the default on this platform 519345bc899bSmrg # Common symbols not allowed in MH_DYLIB files 519445bc899bSmrg case $cc_basename in 519545bc899bSmrg xlc*) 519645bc899bSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' 519745bc899bSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 519845bc899bSmrg ;; 519945bc899bSmrg esac 520045bc899bSmrg ;; 520145bc899bSmrg 520245bc899bSmrg mingw* | pw32* | os2*) 520345bc899bSmrg # This hack is so that the source file can tell whether it is being 520445bc899bSmrg # built for inclusion in a dll (and should export symbols for example). 520545bc899bSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' 520645bc899bSmrg ;; 520745bc899bSmrg 520845bc899bSmrg hpux9* | hpux10* | hpux11*) 520945bc899bSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 521045bc899bSmrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 521145bc899bSmrg # not for PA HP-UX. 521245bc899bSmrg case $host_cpu in 521345bc899bSmrg hppa*64*|ia64*) 521445bc899bSmrg # +Z the default 521545bc899bSmrg ;; 521645bc899bSmrg *) 521745bc899bSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 521845bc899bSmrg ;; 521945bc899bSmrg esac 522045bc899bSmrg # Is there a better lt_prog_compiler_static that works with the bundled CC? 522145bc899bSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 522245bc899bSmrg ;; 522345bc899bSmrg 522445bc899bSmrg irix5* | irix6* | nonstopux*) 522545bc899bSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 522645bc899bSmrg # PIC (with -KPIC) is the default. 522745bc899bSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 522845bc899bSmrg ;; 522945bc899bSmrg 523045bc899bSmrg newsos6) 523145bc899bSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 523245bc899bSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 523345bc899bSmrg ;; 523445bc899bSmrg 523545bc899bSmrg linux*) 523645bc899bSmrg case $cc_basename in 523745bc899bSmrg icc* | ecc*) 523845bc899bSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 523945bc899bSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 524045bc899bSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' 524145bc899bSmrg ;; 524245bc899bSmrg pgcc* | pgf77* | pgf90* | pgf95*) 524345bc899bSmrg # Portland Group compilers (*not* the Pentium gcc compiler, 524445bc899bSmrg # which looks to be a dead project) 524545bc899bSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 524645bc899bSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 524745bc899bSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 524845bc899bSmrg ;; 524945bc899bSmrg ccc*) 525045bc899bSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 525145bc899bSmrg # All Alpha code is PIC. 525245bc899bSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 525345bc899bSmrg ;; 525445bc899bSmrg esac 525545bc899bSmrg ;; 525645bc899bSmrg 525745bc899bSmrg osf3* | osf4* | osf5*) 525845bc899bSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 525945bc899bSmrg # All OSF/1 code is PIC. 526045bc899bSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 526145bc899bSmrg ;; 526245bc899bSmrg 526345bc899bSmrg solaris*) 526445bc899bSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 526545bc899bSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 526645bc899bSmrg case $cc_basename in 526745bc899bSmrg f77* | f90* | f95*) 526845bc899bSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 526945bc899bSmrg *) 527045bc899bSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 527145bc899bSmrg esac 527245bc899bSmrg ;; 527345bc899bSmrg 527445bc899bSmrg sunos4*) 527545bc899bSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 527645bc899bSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 527745bc899bSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 527845bc899bSmrg ;; 527945bc899bSmrg 528045bc899bSmrg sysv4 | sysv4.2uw2* | sysv4.3*) 528145bc899bSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 528245bc899bSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 528345bc899bSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 528445bc899bSmrg ;; 528545bc899bSmrg 528645bc899bSmrg sysv4*MP*) 528745bc899bSmrg if test -d /usr/nec ;then 528845bc899bSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 528945bc899bSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 529045bc899bSmrg fi 529145bc899bSmrg ;; 529245bc899bSmrg 529345bc899bSmrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 529445bc899bSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 529545bc899bSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 529645bc899bSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 529745bc899bSmrg ;; 529845bc899bSmrg 529945bc899bSmrg unicos*) 530045bc899bSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 530145bc899bSmrg _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 530245bc899bSmrg ;; 530345bc899bSmrg 530445bc899bSmrg uts4*) 530545bc899bSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 530645bc899bSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 530745bc899bSmrg ;; 530845bc899bSmrg 530945bc899bSmrg *) 531045bc899bSmrg _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 531145bc899bSmrg ;; 531245bc899bSmrg esac 531345bc899bSmrg fi 531445bc899bSmrg]) 531545bc899bSmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)]) 531645bc899bSmrg 531745bc899bSmrg# 531845bc899bSmrg# Check to make sure the PIC flag actually works. 531945bc899bSmrg# 532045bc899bSmrgif test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then 532145bc899bSmrg AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works], 532245bc899bSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1), 532345bc899bSmrg [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [], 532445bc899bSmrg [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in 532545bc899bSmrg "" | " "*) ;; 532645bc899bSmrg *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;; 532745bc899bSmrg esac], 532845bc899bSmrg [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 532945bc899bSmrg _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 533045bc899bSmrgfi 533145bc899bSmrgcase $host_os in 533245bc899bSmrg # For platforms which do not support PIC, -DPIC is meaningless: 533345bc899bSmrg *djgpp*) 533445bc899bSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 533545bc899bSmrg ;; 533645bc899bSmrg *) 533745bc899bSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])" 533845bc899bSmrg ;; 533945bc899bSmrgesac 534045bc899bSmrg 534145bc899bSmrg# 534245bc899bSmrg# Check to make sure the static flag actually works. 534345bc899bSmrg# 534445bc899bSmrgwl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\" 534545bc899bSmrgAC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 534645bc899bSmrg _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1), 534745bc899bSmrg $lt_tmp_static_flag, 534845bc899bSmrg [], 534945bc899bSmrg [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=]) 535045bc899bSmrg]) 535145bc899bSmrg 535245bc899bSmrg 535345bc899bSmrg# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME]) 535445bc899bSmrg# ------------------------------------ 535545bc899bSmrg# See if the linker supports building shared libraries. 535645bc899bSmrgAC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS], 535745bc899bSmrg[AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 535845bc899bSmrgifelse([$1],[CXX],[ 535945bc899bSmrg _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 536045bc899bSmrg case $host_os in 536145bc899bSmrg aix4* | aix5*) 536245bc899bSmrg # If we're using GNU nm, then we don't want the "-C" option. 536345bc899bSmrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 536445bc899bSmrg if $NM -V 2>&1 | grep 'GNU' > /dev/null; then 536545bc899bSmrg _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' 536645bc899bSmrg else 536745bc899bSmrg _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' 536845bc899bSmrg fi 536945bc899bSmrg ;; 537045bc899bSmrg pw32*) 537145bc899bSmrg _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" 537245bc899bSmrg ;; 537345bc899bSmrg cygwin* | mingw*) 537445bc899bSmrg _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' 537545bc899bSmrg ;; 537645bc899bSmrg *) 537745bc899bSmrg _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 537845bc899bSmrg ;; 537945bc899bSmrg esac 538045bc899bSmrg],[ 538145bc899bSmrg runpath_var= 538245bc899bSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)= 538345bc899bSmrg _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no 538445bc899bSmrg _LT_AC_TAGVAR(archive_cmds, $1)= 538545bc899bSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)= 538645bc899bSmrg _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)= 538745bc899bSmrg _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)= 538845bc899bSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= 538945bc899bSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 539045bc899bSmrg _LT_AC_TAGVAR(thread_safe_flag_spec, $1)= 539145bc899bSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= 539245bc899bSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 539345bc899bSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 539445bc899bSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 539545bc899bSmrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=no 539645bc899bSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 539745bc899bSmrg _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown 539845bc899bSmrg _LT_AC_TAGVAR(hardcode_automatic, $1)=no 539945bc899bSmrg _LT_AC_TAGVAR(module_cmds, $1)= 540045bc899bSmrg _LT_AC_TAGVAR(module_expsym_cmds, $1)= 540145bc899bSmrg _LT_AC_TAGVAR(always_export_symbols, $1)=no 540245bc899bSmrg _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 540345bc899bSmrg # include_expsyms should be a list of space-separated symbols to be *always* 540445bc899bSmrg # included in the symbol list 540545bc899bSmrg _LT_AC_TAGVAR(include_expsyms, $1)= 540645bc899bSmrg # exclude_expsyms can be an extended regexp of symbols to exclude 540745bc899bSmrg # it will be wrapped by ` (' and `)$', so one must not match beginning or 540845bc899bSmrg # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', 540945bc899bSmrg # as well as any symbol that contains `d'. 541045bc899bSmrg _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_" 541145bc899bSmrg # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 541245bc899bSmrg # platforms (ab)use it in PIC code, but their linkers get confused if 541345bc899bSmrg # the symbol is explicitly referenced. Since portable code cannot 541445bc899bSmrg # rely on this symbol name, it's probably fine to never include it in 541545bc899bSmrg # preloaded symbol tables. 541645bc899bSmrg extract_expsyms_cmds= 541745bc899bSmrg # Just being paranoid about ensuring that cc_basename is set. 541845bc899bSmrg _LT_CC_BASENAME([$compiler]) 541945bc899bSmrg case $host_os in 542045bc899bSmrg cygwin* | mingw* | pw32*) 542145bc899bSmrg # FIXME: the MSVC++ port hasn't been tested in a loooong time 542245bc899bSmrg # When not using gcc, we currently assume that we are using 542345bc899bSmrg # Microsoft Visual C++. 542445bc899bSmrg if test "$GCC" != yes; then 542545bc899bSmrg with_gnu_ld=no 542645bc899bSmrg fi 542745bc899bSmrg ;; 542845bc899bSmrg interix*) 542945bc899bSmrg # we just hope/assume this is gcc and not c89 (= MSVC++) 543045bc899bSmrg with_gnu_ld=yes 543145bc899bSmrg ;; 543245bc899bSmrg openbsd*) 543345bc899bSmrg with_gnu_ld=no 543445bc899bSmrg ;; 543545bc899bSmrg esac 543645bc899bSmrg 543745bc899bSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=yes 543845bc899bSmrg if test "$with_gnu_ld" = yes; then 543945bc899bSmrg # If archive_cmds runs LD, not CC, wlarc should be empty 544045bc899bSmrg wlarc='${wl}' 544145bc899bSmrg 544245bc899bSmrg # Set some defaults for GNU ld with shared library support. These 544345bc899bSmrg # are reset later if shared libraries are not supported. Putting them 544445bc899bSmrg # here allows them to be overridden if necessary. 544545bc899bSmrg runpath_var=LD_RUN_PATH 544645bc899bSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 544745bc899bSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 544845bc899bSmrg # ancient GNU ld didn't support --whole-archive et. al. 544945bc899bSmrg if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then 545045bc899bSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 545145bc899bSmrg else 545245bc899bSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 545345bc899bSmrg fi 545445bc899bSmrg supports_anon_versioning=no 545545bc899bSmrg case `$LD -v 2>/dev/null` in 545645bc899bSmrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 545745bc899bSmrg *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 545845bc899bSmrg *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 545945bc899bSmrg *\ 2.11.*) ;; # other 2.11 versions 546045bc899bSmrg *) supports_anon_versioning=yes ;; 546145bc899bSmrg esac 546245bc899bSmrg 546345bc899bSmrg # See if GNU ld supports shared libraries. 546445bc899bSmrg case $host_os in 546545bc899bSmrg aix3* | aix4* | aix5*) 546645bc899bSmrg # On AIX/PPC, the GNU linker is very broken 546745bc899bSmrg if test "$host_cpu" != ia64; then 546845bc899bSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 546945bc899bSmrg cat <<EOF 1>&2 547045bc899bSmrg 547145bc899bSmrg*** Warning: the GNU linker, at least up to release 2.9.1, is reported 547245bc899bSmrg*** to be unable to reliably create shared libraries on AIX. 547345bc899bSmrg*** Therefore, libtool is disabling shared libraries support. If you 547445bc899bSmrg*** really care for shared libraries, you may want to modify your PATH 547545bc899bSmrg*** so that a non-GNU linker is found, and then restart. 547645bc899bSmrg 547745bc899bSmrgEOF 547845bc899bSmrg fi 547945bc899bSmrg ;; 548045bc899bSmrg 548145bc899bSmrg amigaos*) 548245bc899bSmrg _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)' 548345bc899bSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 548445bc899bSmrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 548545bc899bSmrg 548645bc899bSmrg # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports 548745bc899bSmrg # that the semantics of dynamic libraries on AmigaOS, at least up 548845bc899bSmrg # to version 4, is to share data among multiple programs linked 548945bc899bSmrg # with the same dynamic library. Since this doesn't match the 549045bc899bSmrg # behavior of shared libraries on other platforms, we can't use 549145bc899bSmrg # them. 549245bc899bSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 549345bc899bSmrg ;; 549445bc899bSmrg 549545bc899bSmrg beos*) 549645bc899bSmrg if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 549745bc899bSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 549845bc899bSmrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 549945bc899bSmrg # support --undefined. This deserves some investigation. FIXME 550045bc899bSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 550145bc899bSmrg else 550245bc899bSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 550345bc899bSmrg fi 550445bc899bSmrg ;; 550545bc899bSmrg 550645bc899bSmrg cygwin* | mingw* | pw32*) 550745bc899bSmrg # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 550845bc899bSmrg # as there is no search path for DLLs. 550945bc899bSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 551045bc899bSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 551145bc899bSmrg _LT_AC_TAGVAR(always_export_symbols, $1)=no 551245bc899bSmrg _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 551345bc899bSmrg _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols' 551445bc899bSmrg 551545bc899bSmrg if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then 551645bc899bSmrg _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' 551745bc899bSmrg # If the export-symbols file already is a .def file (1st line 551845bc899bSmrg # is EXPORTS), use it as is; otherwise, prepend... 551945bc899bSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 552045bc899bSmrg cp $export_symbols $output_objdir/$soname.def; 552145bc899bSmrg else 552245bc899bSmrg echo EXPORTS > $output_objdir/$soname.def; 552345bc899bSmrg cat $export_symbols >> $output_objdir/$soname.def; 552445bc899bSmrg fi~ 552545bc899bSmrg $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 552645bc899bSmrg else 552745bc899bSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 552845bc899bSmrg fi 552945bc899bSmrg ;; 553045bc899bSmrg 553145bc899bSmrg interix3*) 553245bc899bSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 553345bc899bSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 553445bc899bSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 553545bc899bSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 553645bc899bSmrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 553745bc899bSmrg # Instead, shared libraries are loaded at an image base (0x10000000 by 553845bc899bSmrg # default) and relocated if they conflict, which is a slow very memory 553945bc899bSmrg # consuming and fragmenting process. To avoid this, we pick a random, 554045bc899bSmrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 554145bc899bSmrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 554245bc899bSmrg _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' 554345bc899bSmrg _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' 554445bc899bSmrg ;; 554545bc899bSmrg 554645bc899bSmrg linux*) 554745bc899bSmrg if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 554845bc899bSmrg tmp_addflag= 554945bc899bSmrg case $cc_basename,$host_cpu in 555045bc899bSmrg pgcc*) # Portland Group C compiler 555145bc899bSmrg _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' 555245bc899bSmrg tmp_addflag=' $pic_flag' 555345bc899bSmrg ;; 555445bc899bSmrg pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers 555545bc899bSmrg _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' 555645bc899bSmrg tmp_addflag=' $pic_flag -Mnomain' ;; 555745bc899bSmrg ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 555845bc899bSmrg tmp_addflag=' -i_dynamic' ;; 555945bc899bSmrg efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 556045bc899bSmrg tmp_addflag=' -i_dynamic -nofor_main' ;; 556145bc899bSmrg ifc* | ifort*) # Intel Fortran compiler 556245bc899bSmrg tmp_addflag=' -nofor_main' ;; 556345bc899bSmrg esac 556445bc899bSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 556545bc899bSmrg 556645bc899bSmrg if test $supports_anon_versioning = yes; then 556745bc899bSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~ 556845bc899bSmrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 556945bc899bSmrg $echo "local: *; };" >> $output_objdir/$libname.ver~ 557045bc899bSmrg $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 557145bc899bSmrg fi 557245bc899bSmrg else 557345bc899bSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 557445bc899bSmrg fi 557545bc899bSmrg ;; 557645bc899bSmrg 557745bc899bSmrg netbsd*) 557845bc899bSmrg if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then 557945bc899bSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 558045bc899bSmrg wlarc= 558145bc899bSmrg else 558245bc899bSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 558345bc899bSmrg _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' 558445bc899bSmrg fi 558545bc899bSmrg ;; 558645bc899bSmrg 558745bc899bSmrg solaris*) 558845bc899bSmrg if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then 558945bc899bSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 559045bc899bSmrg cat <<EOF 1>&2 559145bc899bSmrg 559245bc899bSmrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably 559345bc899bSmrg*** create shared libraries on Solaris systems. Therefore, libtool 559445bc899bSmrg*** is disabling shared libraries support. We urge you to upgrade GNU 559545bc899bSmrg*** binutils to release 2.9.1 or newer. Another option is to modify 559645bc899bSmrg*** your PATH or compiler configuration so that the native linker is 559745bc899bSmrg*** used, and then restart. 559845bc899bSmrg 559945bc899bSmrgEOF 560045bc899bSmrg elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 560145bc899bSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 560245bc899bSmrg _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' 560345bc899bSmrg else 560445bc899bSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 560545bc899bSmrg fi 560645bc899bSmrg ;; 560745bc899bSmrg 560845bc899bSmrg sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 560945bc899bSmrg case `$LD -v 2>&1` in 561045bc899bSmrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 561145bc899bSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 561245bc899bSmrg cat <<_LT_EOF 1>&2 561345bc899bSmrg 561445bc899bSmrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not 561545bc899bSmrg*** reliably create shared libraries on SCO systems. Therefore, libtool 561645bc899bSmrg*** is disabling shared libraries support. We urge you to upgrade GNU 561745bc899bSmrg*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 561845bc899bSmrg*** your PATH or compiler configuration so that the native linker is 561945bc899bSmrg*** used, and then restart. 562045bc899bSmrg 562145bc899bSmrg_LT_EOF 562245bc899bSmrg ;; 562345bc899bSmrg *) 562445bc899bSmrg if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 562545bc899bSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' 562645bc899bSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' 562745bc899bSmrg _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' 562845bc899bSmrg else 562945bc899bSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 563045bc899bSmrg fi 563145bc899bSmrg ;; 563245bc899bSmrg esac 563345bc899bSmrg ;; 563445bc899bSmrg 563545bc899bSmrg sunos4*) 563645bc899bSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 563745bc899bSmrg wlarc= 563845bc899bSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 563945bc899bSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 564045bc899bSmrg ;; 564145bc899bSmrg 564245bc899bSmrg *) 564345bc899bSmrg if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 564445bc899bSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 564545bc899bSmrg _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' 564645bc899bSmrg else 564745bc899bSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 564845bc899bSmrg fi 564945bc899bSmrg ;; 565045bc899bSmrg esac 565145bc899bSmrg 565245bc899bSmrg if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then 565345bc899bSmrg runpath_var= 565445bc899bSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= 565545bc899bSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= 565645bc899bSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 565745bc899bSmrg fi 565845bc899bSmrg else 565945bc899bSmrg # PORTME fill in a description of your system's linker (not GNU ld) 566045bc899bSmrg case $host_os in 566145bc899bSmrg aix3*) 566245bc899bSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 566345bc899bSmrg _LT_AC_TAGVAR(always_export_symbols, $1)=yes 566445bc899bSmrg _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' 566545bc899bSmrg # Note: this linker hardcodes the directories in LIBPATH if there 566645bc899bSmrg # are no directories specified by -L. 566745bc899bSmrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 566845bc899bSmrg if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then 566945bc899bSmrg # Neither direct hardcoding nor static linking is supported with a 567045bc899bSmrg # broken collect2. 567145bc899bSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported 567245bc899bSmrg fi 567345bc899bSmrg ;; 567445bc899bSmrg 567545bc899bSmrg aix4* | aix5*) 567645bc899bSmrg if test "$host_cpu" = ia64; then 567745bc899bSmrg # On IA64, the linker does run time linking by default, so we don't 567845bc899bSmrg # have to do anything special. 567945bc899bSmrg aix_use_runtimelinking=no 568045bc899bSmrg exp_sym_flag='-Bexport' 568145bc899bSmrg no_entry_flag="" 568245bc899bSmrg else 568345bc899bSmrg # If we're using GNU nm, then we don't want the "-C" option. 568445bc899bSmrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 568545bc899bSmrg if $NM -V 2>&1 | grep 'GNU' > /dev/null; then 568645bc899bSmrg _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' 568745bc899bSmrg else 568845bc899bSmrg _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' 568945bc899bSmrg fi 569045bc899bSmrg aix_use_runtimelinking=no 569145bc899bSmrg 569245bc899bSmrg # Test if we are trying to use run time linking or normal 569345bc899bSmrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 569445bc899bSmrg # need to do runtime linking. 569545bc899bSmrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*) 569645bc899bSmrg for ld_flag in $LDFLAGS; do 569745bc899bSmrg if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then 569845bc899bSmrg aix_use_runtimelinking=yes 569945bc899bSmrg break 570045bc899bSmrg fi 570145bc899bSmrg done 570245bc899bSmrg ;; 570345bc899bSmrg esac 570445bc899bSmrg 570545bc899bSmrg exp_sym_flag='-bexport' 570645bc899bSmrg no_entry_flag='-bnoentry' 570745bc899bSmrg fi 570845bc899bSmrg 570945bc899bSmrg # When large executables or shared objects are built, AIX ld can 571045bc899bSmrg # have problems creating the table of contents. If linking a library 571145bc899bSmrg # or program results in "error TOC overflow" add -mminimal-toc to 571245bc899bSmrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 571345bc899bSmrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 571445bc899bSmrg 571545bc899bSmrg _LT_AC_TAGVAR(archive_cmds, $1)='' 571645bc899bSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 571745bc899bSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' 571845bc899bSmrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 571945bc899bSmrg 572045bc899bSmrg if test "$GCC" = yes; then 572145bc899bSmrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 572245bc899bSmrg # We only want to do this on AIX 4.2 and lower, the check 572345bc899bSmrg # below for broken collect2 doesn't work under 4.3+ 572445bc899bSmrg collect2name=`${CC} -print-prog-name=collect2` 572545bc899bSmrg if test -f "$collect2name" && \ 572645bc899bSmrg strings "$collect2name" | grep resolve_lib_name >/dev/null 572745bc899bSmrg then 572845bc899bSmrg # We have reworked collect2 572945bc899bSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 573045bc899bSmrg else 573145bc899bSmrg # We have old collect2 573245bc899bSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported 573345bc899bSmrg # It fails to find uninstalled libraries when the uninstalled 573445bc899bSmrg # path is not listed in the libpath. Setting hardcode_minus_L 573545bc899bSmrg # to unsupported forces relinking 573645bc899bSmrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 573745bc899bSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 573845bc899bSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 573945bc899bSmrg fi 574045bc899bSmrg ;; 574145bc899bSmrg esac 574245bc899bSmrg shared_flag='-shared' 574345bc899bSmrg if test "$aix_use_runtimelinking" = yes; then 574445bc899bSmrg shared_flag="$shared_flag "'${wl}-G' 574545bc899bSmrg fi 574645bc899bSmrg else 574745bc899bSmrg # not using gcc 574845bc899bSmrg if test "$host_cpu" = ia64; then 574945bc899bSmrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 575045bc899bSmrg # chokes on -Wl,-G. The following line is correct: 575145bc899bSmrg shared_flag='-G' 575245bc899bSmrg else 575345bc899bSmrg if test "$aix_use_runtimelinking" = yes; then 575445bc899bSmrg shared_flag='${wl}-G' 575545bc899bSmrg else 575645bc899bSmrg shared_flag='${wl}-bM:SRE' 575745bc899bSmrg fi 575845bc899bSmrg fi 575945bc899bSmrg fi 576045bc899bSmrg 576145bc899bSmrg # It seems that -bexpall does not export symbols beginning with 576245bc899bSmrg # underscore (_), so it is better to generate a list of symbols to export. 576345bc899bSmrg _LT_AC_TAGVAR(always_export_symbols, $1)=yes 576445bc899bSmrg if test "$aix_use_runtimelinking" = yes; then 576545bc899bSmrg # Warning - without using the other runtime loading flags (-brtl), 576645bc899bSmrg # -berok will link without error, but may produce a broken library. 576745bc899bSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' 576845bc899bSmrg # Determine the default libpath from the value encoded in an empty executable. 576945bc899bSmrg _LT_AC_SYS_LIBPATH_AIX 577045bc899bSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 577145bc899bSmrg _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" 577245bc899bSmrg else 577345bc899bSmrg if test "$host_cpu" = ia64; then 577445bc899bSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 577545bc899bSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 577645bc899bSmrg _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" 577745bc899bSmrg else 577845bc899bSmrg # Determine the default libpath from the value encoded in an empty executable. 577945bc899bSmrg _LT_AC_SYS_LIBPATH_AIX 578045bc899bSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 578145bc899bSmrg # Warning - without using the other run time loading flags, 578245bc899bSmrg # -berok will link without error, but may produce a broken library. 578345bc899bSmrg _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 578445bc899bSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 578545bc899bSmrg # Exported symbols can be pulled into shared objects from archives 578645bc899bSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 578745bc899bSmrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes 578845bc899bSmrg # This is similar to how AIX traditionally builds its shared libraries. 578945bc899bSmrg _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' 579045bc899bSmrg fi 579145bc899bSmrg fi 579245bc899bSmrg ;; 579345bc899bSmrg 579445bc899bSmrg amigaos*) 579545bc899bSmrg _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)' 579645bc899bSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 579745bc899bSmrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 579845bc899bSmrg # see comment about different semantics on the GNU ld section 579945bc899bSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 580045bc899bSmrg ;; 580145bc899bSmrg 580245bc899bSmrg bsdi[[45]]*) 580345bc899bSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 580445bc899bSmrg ;; 580545bc899bSmrg 580645bc899bSmrg cygwin* | mingw* | pw32*) 580745bc899bSmrg # When not using gcc, we currently assume that we are using 580845bc899bSmrg # Microsoft Visual C++. 580945bc899bSmrg # hardcode_libdir_flag_spec is actually meaningless, as there is 581045bc899bSmrg # no search path for DLLs. 581145bc899bSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 581245bc899bSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 581345bc899bSmrg # Tell ltmain to make .lib files, not .a files. 581445bc899bSmrg libext=lib 581545bc899bSmrg # Tell ltmain to make .dll files, not .so files. 581645bc899bSmrg shrext_cmds=".dll" 581745bc899bSmrg # FIXME: Setting linknames here is a bad hack. 581845bc899bSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' 581945bc899bSmrg # The linker will automatically build a .lib file if we build a DLL. 582045bc899bSmrg _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true' 582145bc899bSmrg # FIXME: Should let the user specify the lib program. 582245bc899bSmrg _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs' 582345bc899bSmrg _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' 582445bc899bSmrg _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 582545bc899bSmrg ;; 582645bc899bSmrg 582745bc899bSmrg darwin* | rhapsody*) 582845bc899bSmrg case $host_os in 582945bc899bSmrg rhapsody* | darwin1.[[012]]) 583045bc899bSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' 583145bc899bSmrg ;; 583245bc899bSmrg *) # Darwin 1.3 on 583345bc899bSmrg if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then 583445bc899bSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' 583545bc899bSmrg else 583645bc899bSmrg case ${MACOSX_DEPLOYMENT_TARGET} in 583745bc899bSmrg 10.[[012]]) 583845bc899bSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' 583945bc899bSmrg ;; 584045bc899bSmrg 10.*) 584145bc899bSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup' 584245bc899bSmrg ;; 584345bc899bSmrg esac 584445bc899bSmrg fi 584545bc899bSmrg ;; 584645bc899bSmrg esac 584745bc899bSmrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 584845bc899bSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 584945bc899bSmrg _LT_AC_TAGVAR(hardcode_automatic, $1)=yes 585045bc899bSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 585145bc899bSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' 585245bc899bSmrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 585345bc899bSmrg if test "$GCC" = yes ; then 585445bc899bSmrg output_verbose_link_cmd='echo' 585545bc899bSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' 585645bc899bSmrg _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' 585745bc899bSmrg # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds 585845bc899bSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' 585945bc899bSmrg _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}' 586045bc899bSmrg else 586145bc899bSmrg case $cc_basename in 586245bc899bSmrg xlc*) 586345bc899bSmrg output_verbose_link_cmd='echo' 586445bc899bSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' 586545bc899bSmrg _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' 586645bc899bSmrg # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds 586745bc899bSmrg _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 $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' 586845bc899bSmrg _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}' 586945bc899bSmrg ;; 587045bc899bSmrg *) 587145bc899bSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 587245bc899bSmrg ;; 587345bc899bSmrg esac 587445bc899bSmrg fi 587545bc899bSmrg ;; 587645bc899bSmrg 587745bc899bSmrg dgux*) 587845bc899bSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 587945bc899bSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 588045bc899bSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 588145bc899bSmrg ;; 588245bc899bSmrg 588345bc899bSmrg freebsd1*) 588445bc899bSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 588545bc899bSmrg ;; 588645bc899bSmrg 588745bc899bSmrg # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 588845bc899bSmrg # support. Future versions do this automatically, but an explicit c++rt0.o 588945bc899bSmrg # does not break anything, and helps significantly (at the cost of a little 589045bc899bSmrg # extra space). 589145bc899bSmrg freebsd2.2*) 589245bc899bSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 589345bc899bSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 589445bc899bSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 589545bc899bSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 589645bc899bSmrg ;; 589745bc899bSmrg 589845bc899bSmrg # Unfortunately, older versions of FreeBSD 2 do not have this feature. 589945bc899bSmrg freebsd2*) 590045bc899bSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 590145bc899bSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 590245bc899bSmrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 590345bc899bSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 590445bc899bSmrg ;; 590545bc899bSmrg 590645bc899bSmrg # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 590745bc899bSmrg freebsd* | kfreebsd*-gnu | dragonfly*) 590845bc899bSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' 590945bc899bSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 591045bc899bSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 591145bc899bSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 591245bc899bSmrg ;; 591345bc899bSmrg 591445bc899bSmrg hpux9*) 591545bc899bSmrg if test "$GCC" = yes; then 591645bc899bSmrg _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' 591745bc899bSmrg else 591845bc899bSmrg _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' 591945bc899bSmrg fi 592045bc899bSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 592145bc899bSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 592245bc899bSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 592345bc899bSmrg 592445bc899bSmrg # hardcode_minus_L: Not really in the search PATH, 592545bc899bSmrg # but as the default location of the library. 592645bc899bSmrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 592745bc899bSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 592845bc899bSmrg ;; 592945bc899bSmrg 593045bc899bSmrg hpux10*) 593145bc899bSmrg if test "$GCC" = yes -a "$with_gnu_ld" = no; then 593245bc899bSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 593345bc899bSmrg else 593445bc899bSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 593545bc899bSmrg fi 593645bc899bSmrg if test "$with_gnu_ld" = no; then 593745bc899bSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 593845bc899bSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 593945bc899bSmrg 594045bc899bSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 594145bc899bSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 594245bc899bSmrg 594345bc899bSmrg # hardcode_minus_L: Not really in the search PATH, 594445bc899bSmrg # but as the default location of the library. 594545bc899bSmrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 594645bc899bSmrg fi 594745bc899bSmrg ;; 594845bc899bSmrg 594945bc899bSmrg hpux11*) 595045bc899bSmrg if test "$GCC" = yes -a "$with_gnu_ld" = no; then 595145bc899bSmrg case $host_cpu in 595245bc899bSmrg hppa*64*) 595345bc899bSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 595445bc899bSmrg ;; 595545bc899bSmrg ia64*) 595645bc899bSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 595745bc899bSmrg ;; 595845bc899bSmrg *) 595945bc899bSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 596045bc899bSmrg ;; 596145bc899bSmrg esac 596245bc899bSmrg else 596345bc899bSmrg case $host_cpu in 596445bc899bSmrg hppa*64*) 596545bc899bSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 596645bc899bSmrg ;; 596745bc899bSmrg ia64*) 596845bc899bSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 596945bc899bSmrg ;; 597045bc899bSmrg *) 597145bc899bSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 597245bc899bSmrg ;; 597345bc899bSmrg esac 597445bc899bSmrg fi 597545bc899bSmrg if test "$with_gnu_ld" = no; then 597645bc899bSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 597745bc899bSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 597845bc899bSmrg 597945bc899bSmrg case $host_cpu in 598045bc899bSmrg hppa*64*|ia64*) 598145bc899bSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' 598245bc899bSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 598345bc899bSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 598445bc899bSmrg ;; 598545bc899bSmrg *) 598645bc899bSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 598745bc899bSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 598845bc899bSmrg 598945bc899bSmrg # hardcode_minus_L: Not really in the search PATH, 599045bc899bSmrg # but as the default location of the library. 599145bc899bSmrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 599245bc899bSmrg ;; 599345bc899bSmrg esac 599445bc899bSmrg fi 599545bc899bSmrg ;; 599645bc899bSmrg 599745bc899bSmrg irix5* | irix6* | nonstopux*) 599845bc899bSmrg if test "$GCC" = yes; then 599945bc899bSmrg _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' 600045bc899bSmrg else 600145bc899bSmrg _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' 600245bc899bSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' 600345bc899bSmrg fi 600445bc899bSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 600545bc899bSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 600645bc899bSmrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 600745bc899bSmrg ;; 600845bc899bSmrg 600945bc899bSmrg netbsd*) 601045bc899bSmrg if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then 601145bc899bSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 601245bc899bSmrg else 601345bc899bSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 601445bc899bSmrg fi 601545bc899bSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 601645bc899bSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 601745bc899bSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 601845bc899bSmrg ;; 601945bc899bSmrg 602045bc899bSmrg newsos6) 602145bc899bSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 602245bc899bSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 602345bc899bSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 602445bc899bSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 602545bc899bSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 602645bc899bSmrg ;; 602745bc899bSmrg 602845bc899bSmrg openbsd*) 602945bc899bSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 603045bc899bSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 603145bc899bSmrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 603245bc899bSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 603345bc899bSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' 603445bc899bSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 603545bc899bSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 603645bc899bSmrg else 603745bc899bSmrg case $host_os in 603845bc899bSmrg openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) 603945bc899bSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 604045bc899bSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 604145bc899bSmrg ;; 604245bc899bSmrg *) 604345bc899bSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 604445bc899bSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 604545bc899bSmrg ;; 604645bc899bSmrg esac 604745bc899bSmrg fi 604845bc899bSmrg ;; 604945bc899bSmrg 605045bc899bSmrg os2*) 605145bc899bSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 605245bc899bSmrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 605345bc899bSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 605445bc899bSmrg _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' 605545bc899bSmrg _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' 605645bc899bSmrg ;; 605745bc899bSmrg 605845bc899bSmrg osf3*) 605945bc899bSmrg if test "$GCC" = yes; then 606045bc899bSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 606145bc899bSmrg _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' 606245bc899bSmrg else 606345bc899bSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 606445bc899bSmrg _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' 606545bc899bSmrg fi 606645bc899bSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 606745bc899bSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 606845bc899bSmrg ;; 606945bc899bSmrg 607045bc899bSmrg osf4* | osf5*) # as osf3* with the addition of -msym flag 607145bc899bSmrg if test "$GCC" = yes; then 607245bc899bSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 607345bc899bSmrg _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' 607445bc899bSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 607545bc899bSmrg else 607645bc899bSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 607745bc899bSmrg _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' 607845bc899bSmrg _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~ 607945bc899bSmrg $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' 608045bc899bSmrg 608145bc899bSmrg # Both c and cxx compiler support -rpath directly 608245bc899bSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 608345bc899bSmrg fi 608445bc899bSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 608545bc899bSmrg ;; 608645bc899bSmrg 608745bc899bSmrg solaris*) 608845bc899bSmrg _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text' 608945bc899bSmrg if test "$GCC" = yes; then 609045bc899bSmrg wlarc='${wl}' 609145bc899bSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 609245bc899bSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 609345bc899bSmrg $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' 609445bc899bSmrg else 609545bc899bSmrg wlarc='' 609645bc899bSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' 609745bc899bSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 609845bc899bSmrg $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' 609945bc899bSmrg fi 610045bc899bSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 610145bc899bSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 610245bc899bSmrg case $host_os in 610345bc899bSmrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 610445bc899bSmrg *) 610545bc899bSmrg # The compiler driver will combine linker options so we 610645bc899bSmrg # cannot just pass the convience library names through 610745bc899bSmrg # without $wl, iff we do not link with $LD. 610845bc899bSmrg # Luckily, gcc supports the same syntax we need for Sun Studio. 610945bc899bSmrg # Supported since Solaris 2.6 (maybe 2.5.1?) 611045bc899bSmrg case $wlarc in 611145bc899bSmrg '') 611245bc899bSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; 611345bc899bSmrg *) 611445bc899bSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;; 611545bc899bSmrg esac ;; 611645bc899bSmrg esac 611745bc899bSmrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 611845bc899bSmrg ;; 611945bc899bSmrg 612045bc899bSmrg sunos4*) 612145bc899bSmrg if test "x$host_vendor" = xsequent; then 612245bc899bSmrg # Use $CC to link under sequent, because it throws in some extra .o 612345bc899bSmrg # files that make .init and .fini sections work. 612445bc899bSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' 612545bc899bSmrg else 612645bc899bSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 612745bc899bSmrg fi 612845bc899bSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 612945bc899bSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 613045bc899bSmrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 613145bc899bSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 613245bc899bSmrg ;; 613345bc899bSmrg 613445bc899bSmrg sysv4) 613545bc899bSmrg case $host_vendor in 613645bc899bSmrg sni) 613745bc899bSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 613845bc899bSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 613945bc899bSmrg ;; 614045bc899bSmrg siemens) 614145bc899bSmrg ## LD is ld it makes a PLAMLIB 614245bc899bSmrg ## CC just makes a GrossModule. 614345bc899bSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 614445bc899bSmrg _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 614545bc899bSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 614645bc899bSmrg ;; 614745bc899bSmrg motorola) 614845bc899bSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 614945bc899bSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 615045bc899bSmrg ;; 615145bc899bSmrg esac 615245bc899bSmrg runpath_var='LD_RUN_PATH' 615345bc899bSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 615445bc899bSmrg ;; 615545bc899bSmrg 615645bc899bSmrg sysv4.3*) 615745bc899bSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 615845bc899bSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 615945bc899bSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 616045bc899bSmrg ;; 616145bc899bSmrg 616245bc899bSmrg sysv4*MP*) 616345bc899bSmrg if test -d /usr/nec; then 616445bc899bSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 616545bc899bSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 616645bc899bSmrg runpath_var=LD_RUN_PATH 616745bc899bSmrg hardcode_runpath_var=yes 616845bc899bSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=yes 616945bc899bSmrg fi 617045bc899bSmrg ;; 617145bc899bSmrg 617245bc899bSmrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7*) 617345bc899bSmrg _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 617445bc899bSmrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 617545bc899bSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 617645bc899bSmrg runpath_var='LD_RUN_PATH' 617745bc899bSmrg 617845bc899bSmrg if test "$GCC" = yes; then 617945bc899bSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 618045bc899bSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 618145bc899bSmrg else 618245bc899bSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 618345bc899bSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 618445bc899bSmrg fi 618545bc899bSmrg ;; 618645bc899bSmrg 618745bc899bSmrg sysv5* | sco3.2v5* | sco5v6*) 618845bc899bSmrg # Note: We can NOT use -z defs as we might desire, because we do not 618945bc899bSmrg # link with -lc, and that would cause any symbols used from libc to 619045bc899bSmrg # always be unresolved, which means just about no library would 619145bc899bSmrg # ever link correctly. If we're not using GNU ld we use -z text 619245bc899bSmrg # though, which does catch some bad symbols but isn't as heavy-handed 619345bc899bSmrg # as -z defs. 619445bc899bSmrg _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 619545bc899bSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 619645bc899bSmrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 619745bc899bSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 619845bc899bSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' 619945bc899bSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' 620045bc899bSmrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 620145bc899bSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 620245bc899bSmrg runpath_var='LD_RUN_PATH' 620345bc899bSmrg 620445bc899bSmrg if test "$GCC" = yes; then 620545bc899bSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' 620645bc899bSmrg _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' 620745bc899bSmrg else 620845bc899bSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' 620945bc899bSmrg _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' 621045bc899bSmrg fi 621145bc899bSmrg ;; 621245bc899bSmrg 621345bc899bSmrg uts4*) 621445bc899bSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 621545bc899bSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 621645bc899bSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 621745bc899bSmrg ;; 621845bc899bSmrg 621945bc899bSmrg *) 622045bc899bSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 622145bc899bSmrg ;; 622245bc899bSmrg esac 622345bc899bSmrg fi 622445bc899bSmrg]) 622545bc899bSmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) 622645bc899bSmrgtest "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 622745bc899bSmrg 622845bc899bSmrg# 622945bc899bSmrg# Do we need to explicitly link libc? 623045bc899bSmrg# 623145bc899bSmrgcase "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in 623245bc899bSmrgx|xyes) 623345bc899bSmrg # Assume -lc should be added 623445bc899bSmrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes 623545bc899bSmrg 623645bc899bSmrg if test "$enable_shared" = yes && test "$GCC" = yes; then 623745bc899bSmrg case $_LT_AC_TAGVAR(archive_cmds, $1) in 623845bc899bSmrg *'~'*) 623945bc899bSmrg # FIXME: we may have to deal with multi-command sequences. 624045bc899bSmrg ;; 624145bc899bSmrg '$CC '*) 624245bc899bSmrg # Test whether the compiler implicitly links with -lc since on some 624345bc899bSmrg # systems, -lgcc has to come before -lc. If gcc already passes -lc 624445bc899bSmrg # to ld, don't add -lc before -lgcc. 624545bc899bSmrg AC_MSG_CHECKING([whether -lc should be explicitly linked in]) 624645bc899bSmrg $rm conftest* 624745bc899bSmrg printf "$lt_simple_compile_test_code" > conftest.$ac_ext 624845bc899bSmrg 624945bc899bSmrg if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 625045bc899bSmrg soname=conftest 625145bc899bSmrg lib=conftest 625245bc899bSmrg libobjs=conftest.$ac_objext 625345bc899bSmrg deplibs= 625445bc899bSmrg wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) 625545bc899bSmrg pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) 625645bc899bSmrg compiler_flags=-v 625745bc899bSmrg linker_flags=-v 625845bc899bSmrg verstring= 625945bc899bSmrg output_objdir=. 626045bc899bSmrg libname=conftest 626145bc899bSmrg lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1) 626245bc899bSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)= 626345bc899bSmrg if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 626445bc899bSmrg then 626545bc899bSmrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 626645bc899bSmrg else 626745bc899bSmrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes 626845bc899bSmrg fi 626945bc899bSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 627045bc899bSmrg else 627145bc899bSmrg cat conftest.err 1>&5 627245bc899bSmrg fi 627345bc899bSmrg $rm conftest* 627445bc899bSmrg AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)]) 627545bc899bSmrg ;; 627645bc899bSmrg esac 627745bc899bSmrg fi 627845bc899bSmrg ;; 627945bc899bSmrgesac 628045bc899bSmrg])# AC_LIBTOOL_PROG_LD_SHLIBS 628145bc899bSmrg 628245bc899bSmrg 628345bc899bSmrg# _LT_AC_FILE_LTDLL_C 628445bc899bSmrg# ------------------- 628545bc899bSmrg# Be careful that the start marker always follows a newline. 628645bc899bSmrgAC_DEFUN([_LT_AC_FILE_LTDLL_C], [ 628745bc899bSmrg# /* ltdll.c starts here */ 628845bc899bSmrg# #define WIN32_LEAN_AND_MEAN 628945bc899bSmrg# #include <windows.h> 629045bc899bSmrg# #undef WIN32_LEAN_AND_MEAN 629145bc899bSmrg# #include <stdio.h> 629245bc899bSmrg# 629345bc899bSmrg# #ifndef __CYGWIN__ 629445bc899bSmrg# # ifdef __CYGWIN32__ 629545bc899bSmrg# # define __CYGWIN__ __CYGWIN32__ 629645bc899bSmrg# # endif 629745bc899bSmrg# #endif 629845bc899bSmrg# 629945bc899bSmrg# #ifdef __cplusplus 630045bc899bSmrg# extern "C" { 630145bc899bSmrg# #endif 630245bc899bSmrg# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved); 630345bc899bSmrg# #ifdef __cplusplus 630445bc899bSmrg# } 630545bc899bSmrg# #endif 630645bc899bSmrg# 630745bc899bSmrg# #ifdef __CYGWIN__ 630845bc899bSmrg# #include <cygwin/cygwin_dll.h> 630945bc899bSmrg# DECLARE_CYGWIN_DLL( DllMain ); 631045bc899bSmrg# #endif 631145bc899bSmrg# HINSTANCE __hDllInstance_base; 631245bc899bSmrg# 631345bc899bSmrg# BOOL APIENTRY 631445bc899bSmrg# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved) 631545bc899bSmrg# { 631645bc899bSmrg# __hDllInstance_base = hInst; 631745bc899bSmrg# return TRUE; 631845bc899bSmrg# } 631945bc899bSmrg# /* ltdll.c ends here */ 632045bc899bSmrg])# _LT_AC_FILE_LTDLL_C 632145bc899bSmrg 632245bc899bSmrg 632345bc899bSmrg# _LT_AC_TAGVAR(VARNAME, [TAGNAME]) 632445bc899bSmrg# --------------------------------- 632545bc899bSmrgAC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])]) 632645bc899bSmrg 632745bc899bSmrg 632845bc899bSmrg# old names 632945bc899bSmrgAC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL]) 633045bc899bSmrgAC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 633145bc899bSmrgAC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 633245bc899bSmrgAC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 633345bc899bSmrgAC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 633445bc899bSmrgAC_DEFUN([AM_PROG_LD], [AC_PROG_LD]) 633545bc899bSmrgAC_DEFUN([AM_PROG_NM], [AC_PROG_NM]) 633645bc899bSmrg 633745bc899bSmrg# This is just to silence aclocal about the macro not being used 633845bc899bSmrgifelse([AC_DISABLE_FAST_INSTALL]) 633945bc899bSmrg 634045bc899bSmrgAC_DEFUN([LT_AC_PROG_GCJ], 634145bc899bSmrg[AC_CHECK_TOOL(GCJ, gcj, no) 634245bc899bSmrg test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" 634345bc899bSmrg AC_SUBST(GCJFLAGS) 634445bc899bSmrg]) 634545bc899bSmrg 634645bc899bSmrgAC_DEFUN([LT_AC_PROG_RC], 634745bc899bSmrg[AC_CHECK_TOOL(RC, windres, no) 634845bc899bSmrg]) 634945bc899bSmrg 635045bc899bSmrg# NOTE: This macro has been submitted for inclusion into # 635145bc899bSmrg# GNU Autoconf as AC_PROG_SED. When it is available in # 635245bc899bSmrg# a released version of Autoconf we should remove this # 635345bc899bSmrg# macro and use it instead. # 635445bc899bSmrg# LT_AC_PROG_SED 635545bc899bSmrg# -------------- 635645bc899bSmrg# Check for a fully-functional sed program, that truncates 635745bc899bSmrg# as few characters as possible. Prefer GNU sed if found. 635845bc899bSmrgAC_DEFUN([LT_AC_PROG_SED], 635945bc899bSmrg[AC_MSG_CHECKING([for a sed that does not truncate output]) 636045bc899bSmrgAC_CACHE_VAL(lt_cv_path_SED, 636145bc899bSmrg[# Loop through the user's path and test for sed and gsed. 636245bc899bSmrg# Then use that list of sed's as ones to test for truncation. 636345bc899bSmrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 636445bc899bSmrgfor as_dir in $PATH 636545bc899bSmrgdo 636645bc899bSmrg IFS=$as_save_IFS 636745bc899bSmrg test -z "$as_dir" && as_dir=. 636845bc899bSmrg for lt_ac_prog in sed gsed; do 636945bc899bSmrg for ac_exec_ext in '' $ac_executable_extensions; do 637045bc899bSmrg if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 637145bc899bSmrg lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 637245bc899bSmrg fi 637345bc899bSmrg done 637445bc899bSmrg done 637545bc899bSmrgdone 637645bc899bSmrgIFS=$as_save_IFS 637745bc899bSmrglt_ac_max=0 637845bc899bSmrglt_ac_count=0 637945bc899bSmrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris 638045bc899bSmrg# along with /bin/sed that truncates output. 638145bc899bSmrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 638245bc899bSmrg test ! -f $lt_ac_sed && continue 638345bc899bSmrg cat /dev/null > conftest.in 638445bc899bSmrg lt_ac_count=0 638545bc899bSmrg echo $ECHO_N "0123456789$ECHO_C" >conftest.in 638645bc899bSmrg # Check for GNU sed and select it if it is found. 638745bc899bSmrg if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 638845bc899bSmrg lt_cv_path_SED=$lt_ac_sed 638945bc899bSmrg break 639045bc899bSmrg fi 639145bc899bSmrg while true; do 639245bc899bSmrg cat conftest.in conftest.in >conftest.tmp 639345bc899bSmrg mv conftest.tmp conftest.in 639445bc899bSmrg cp conftest.in conftest.nl 639545bc899bSmrg echo >>conftest.nl 639645bc899bSmrg $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 639745bc899bSmrg cmp -s conftest.out conftest.nl || break 639845bc899bSmrg # 10000 chars as input seems more than enough 639945bc899bSmrg test $lt_ac_count -gt 10 && break 640045bc899bSmrg lt_ac_count=`expr $lt_ac_count + 1` 640145bc899bSmrg if test $lt_ac_count -gt $lt_ac_max; then 640245bc899bSmrg lt_ac_max=$lt_ac_count 640345bc899bSmrg lt_cv_path_SED=$lt_ac_sed 640445bc899bSmrg fi 640545bc899bSmrg done 640645bc899bSmrgdone 640745bc899bSmrg]) 640845bc899bSmrgSED=$lt_cv_path_SED 640945bc899bSmrgAC_SUBST([SED]) 641045bc899bSmrgAC_MSG_RESULT([$SED]) 641145bc899bSmrg]) 641245bc899bSmrg 641345bc899bSmrg# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 641445bc899bSmrg# 641545bc899bSmrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 641645bc899bSmrg# 641745bc899bSmrg# This program is free software; you can redistribute it and/or modify 641845bc899bSmrg# it under the terms of the GNU General Public License as published by 641945bc899bSmrg# the Free Software Foundation; either version 2 of the License, or 642045bc899bSmrg# (at your option) any later version. 642145bc899bSmrg# 642245bc899bSmrg# This program is distributed in the hope that it will be useful, but 642345bc899bSmrg# WITHOUT ANY WARRANTY; without even the implied warranty of 642445bc899bSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 642545bc899bSmrg# General Public License for more details. 642645bc899bSmrg# 642745bc899bSmrg# You should have received a copy of the GNU General Public License 642845bc899bSmrg# along with this program; if not, write to the Free Software 642945bc899bSmrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 643045bc899bSmrg# 643145bc899bSmrg# As a special exception to the GNU General Public License, if you 643245bc899bSmrg# distribute this file as part of a program that contains a 643345bc899bSmrg# configuration script generated by Autoconf, you may include it under 643445bc899bSmrg# the same distribution terms that you use for the rest of that program. 643545bc899bSmrg 643645bc899bSmrg# PKG_PROG_PKG_CONFIG([MIN-VERSION]) 643745bc899bSmrg# ---------------------------------- 643845bc899bSmrgAC_DEFUN([PKG_PROG_PKG_CONFIG], 643945bc899bSmrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 644045bc899bSmrgm4_pattern_allow([^PKG_CONFIG(_PATH)?$]) 644145bc899bSmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl 644245bc899bSmrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 644345bc899bSmrg AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 644445bc899bSmrgfi 644545bc899bSmrgif test -n "$PKG_CONFIG"; then 644645bc899bSmrg _pkg_min_version=m4_default([$1], [0.9.0]) 644745bc899bSmrg AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 644845bc899bSmrg if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 644945bc899bSmrg AC_MSG_RESULT([yes]) 645045bc899bSmrg else 645145bc899bSmrg AC_MSG_RESULT([no]) 645245bc899bSmrg PKG_CONFIG="" 645345bc899bSmrg fi 645445bc899bSmrg 645545bc899bSmrgfi[]dnl 645645bc899bSmrg])# PKG_PROG_PKG_CONFIG 645745bc899bSmrg 645845bc899bSmrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 645945bc899bSmrg# 646045bc899bSmrg# Check to see whether a particular set of modules exists. Similar 646145bc899bSmrg# to PKG_CHECK_MODULES(), but does not set variables or print errors. 646245bc899bSmrg# 646345bc899bSmrg# 646445bc899bSmrg# Similar to PKG_CHECK_MODULES, make sure that the first instance of 646545bc899bSmrg# this or PKG_CHECK_MODULES is called, or make sure to call 646645bc899bSmrg# PKG_CHECK_EXISTS manually 646745bc899bSmrg# -------------------------------------------------------------- 646845bc899bSmrgAC_DEFUN([PKG_CHECK_EXISTS], 646945bc899bSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 647045bc899bSmrgif test -n "$PKG_CONFIG" && \ 647145bc899bSmrg AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 647245bc899bSmrg m4_ifval([$2], [$2], [:]) 647345bc899bSmrgm4_ifvaln([$3], [else 647445bc899bSmrg $3])dnl 647545bc899bSmrgfi]) 647645bc899bSmrg 647745bc899bSmrg 647845bc899bSmrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 647945bc899bSmrg# --------------------------------------------- 648045bc899bSmrgm4_define([_PKG_CONFIG], 648145bc899bSmrg[if test -n "$PKG_CONFIG"; then 648245bc899bSmrg if test -n "$$1"; then 648345bc899bSmrg pkg_cv_[]$1="$$1" 648445bc899bSmrg else 648545bc899bSmrg PKG_CHECK_EXISTS([$3], 648645bc899bSmrg [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], 648745bc899bSmrg [pkg_failed=yes]) 648845bc899bSmrg fi 648945bc899bSmrgelse 649045bc899bSmrg pkg_failed=untried 649145bc899bSmrgfi[]dnl 649245bc899bSmrg])# _PKG_CONFIG 649345bc899bSmrg 649445bc899bSmrg# _PKG_SHORT_ERRORS_SUPPORTED 649545bc899bSmrg# ----------------------------- 649645bc899bSmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 649745bc899bSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 649845bc899bSmrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 649945bc899bSmrg _pkg_short_errors_supported=yes 650045bc899bSmrgelse 650145bc899bSmrg _pkg_short_errors_supported=no 650245bc899bSmrgfi[]dnl 650345bc899bSmrg])# _PKG_SHORT_ERRORS_SUPPORTED 650445bc899bSmrg 650545bc899bSmrg 650645bc899bSmrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 650745bc899bSmrg# [ACTION-IF-NOT-FOUND]) 650845bc899bSmrg# 650945bc899bSmrg# 651045bc899bSmrg# Note that if there is a possibility the first call to 651145bc899bSmrg# PKG_CHECK_MODULES might not happen, you should be sure to include an 651245bc899bSmrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 651345bc899bSmrg# 651445bc899bSmrg# 651545bc899bSmrg# -------------------------------------------------------------- 651645bc899bSmrgAC_DEFUN([PKG_CHECK_MODULES], 651745bc899bSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 651845bc899bSmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 651945bc899bSmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 652045bc899bSmrg 652145bc899bSmrgpkg_failed=no 652245bc899bSmrgAC_MSG_CHECKING([for $1]) 652345bc899bSmrg 652445bc899bSmrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 652545bc899bSmrg_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 652645bc899bSmrg 652745bc899bSmrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 652845bc899bSmrgand $1[]_LIBS to avoid the need to call pkg-config. 652945bc899bSmrgSee the pkg-config man page for more details.]) 653045bc899bSmrg 653145bc899bSmrgif test $pkg_failed = yes; then 653245bc899bSmrg _PKG_SHORT_ERRORS_SUPPORTED 653345bc899bSmrg if test $_pkg_short_errors_supported = yes; then 653445bc899bSmrg $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"` 653545bc899bSmrg else 653645bc899bSmrg $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` 653745bc899bSmrg fi 653845bc899bSmrg # Put the nasty error message in config.log where it belongs 653945bc899bSmrg echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 654045bc899bSmrg 654145bc899bSmrg ifelse([$4], , [AC_MSG_ERROR(dnl 654245bc899bSmrg[Package requirements ($2) were not met: 654345bc899bSmrg 654445bc899bSmrg$$1_PKG_ERRORS 654545bc899bSmrg 654645bc899bSmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you 654745bc899bSmrginstalled software in a non-standard prefix. 654845bc899bSmrg 654945bc899bSmrg_PKG_TEXT 655045bc899bSmrg])], 655145bc899bSmrg [AC_MSG_RESULT([no]) 655245bc899bSmrg $4]) 655345bc899bSmrgelif test $pkg_failed = untried; then 655445bc899bSmrg ifelse([$4], , [AC_MSG_FAILURE(dnl 655545bc899bSmrg[The pkg-config script could not be found or is too old. Make sure it 655645bc899bSmrgis in your PATH or set the PKG_CONFIG environment variable to the full 655745bc899bSmrgpath to pkg-config. 655845bc899bSmrg 655945bc899bSmrg_PKG_TEXT 656045bc899bSmrg 656145bc899bSmrgTo get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.])], 656245bc899bSmrg [$4]) 656345bc899bSmrgelse 656445bc899bSmrg $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 656545bc899bSmrg $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 656645bc899bSmrg AC_MSG_RESULT([yes]) 656745bc899bSmrg ifelse([$3], , :, [$3]) 656845bc899bSmrgfi[]dnl 656945bc899bSmrg])# PKG_CHECK_MODULES 657045bc899bSmrg 657145bc899bSmrgdnl 657245bc899bSmrgdnl Copyright 2005-2006 Sun Microsystems, Inc. All rights reserved. 657345bc899bSmrgdnl 657445bc899bSmrgdnl Permission is hereby granted, free of charge, to any person obtaining a 657545bc899bSmrgdnl copy of this software and associated documentation files (the 657645bc899bSmrgdnl "Software"), to deal in the Software without restriction, including 657745bc899bSmrgdnl without limitation the rights to use, copy, modify, merge, publish, 657845bc899bSmrgdnl distribute, and/or sell copies of the Software, and to permit persons 657945bc899bSmrgdnl to whom the Software is furnished to do so, provided that the above 658045bc899bSmrgdnl copyright notice(s) and this permission notice appear in all copies of 658145bc899bSmrgdnl the Software and that both the above copyright notice(s) and this 658245bc899bSmrgdnl permission notice appear in supporting documentation. 658345bc899bSmrgdnl 658445bc899bSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 658545bc899bSmrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 658645bc899bSmrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT 658745bc899bSmrgdnl OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR 658845bc899bSmrgdnl HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL 658945bc899bSmrgdnl INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING 659045bc899bSmrgdnl FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, 659145bc899bSmrgdnl NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION 659245bc899bSmrgdnl WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 659345bc899bSmrgdnl 659445bc899bSmrgdnl Except as contained in this notice, the name of a copyright holder 659545bc899bSmrgdnl shall not be used in advertising or otherwise to promote the sale, use 659645bc899bSmrgdnl or other dealings in this Software without prior written authorization 659745bc899bSmrgdnl of the copyright holder. 659845bc899bSmrg 659945bc899bSmrg# XORG_MACROS_VERSION(required-version) 660045bc899bSmrg# ------------------------------------- 660145bc899bSmrg# Minimum version: 1.1.0 660245bc899bSmrg# 660345bc899bSmrg# If you're using a macro added in Version 1.1 or newer, include this in 660445bc899bSmrg# your configure.ac with the minimum required version, such as: 660545bc899bSmrg# XORG_MACROS_VERSION(1.1) 660645bc899bSmrg# 660745bc899bSmrg# To force at least a version with this macro defined, also add: 660845bc899bSmrg# m4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 660945bc899bSmrg# 661045bc899bSmrg# 661145bc899bSmrg# See the "minimum version" comment for each macro you use to see what 661245bc899bSmrg# version you require. 661345bc899bSmrgAC_DEFUN([XORG_MACROS_VERSION],[ 661445bc899bSmrg [XORG_MACROS_needed_version=$1 661545bc899bSmrg XORG_MACROS_needed_major=`echo $XORG_MACROS_needed_version | sed 's/\..*$//'` 661645bc899bSmrg XORG_MACROS_needed_minor=`echo $XORG_MACROS_needed_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`] 661745bc899bSmrg AC_MSG_CHECKING([if xorg-macros used to generate configure is at least ${XORG_MACROS_needed_major}.${XORG_MACROS_needed_minor}]) 661845bc899bSmrg [XORG_MACROS_version=1.1.1 661945bc899bSmrg XORG_MACROS_major=`echo $XORG_MACROS_version | sed 's/\..*$//'` 662045bc899bSmrg XORG_MACROS_minor=`echo $XORG_MACROS_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`] 662145bc899bSmrg if test $XORG_MACROS_major -ne $XORG_MACROS_needed_major ; then 662245bc899bSmrg AC_MSG_ERROR([configure built with incompatible version of xorg-macros.m4 - requires version ${XORG_MACROS_major}.x]) 662345bc899bSmrg fi 662445bc899bSmrg if test $XORG_MACROS_minor -lt $XORG_MACROS_needed_minor ; then 662545bc899bSmrg 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]) 662645bc899bSmrg fi 662745bc899bSmrg AC_MSG_RESULT([yes, $XORG_MACROS_version]) 662845bc899bSmrg]) # XORG_MACROS_VERSION 662945bc899bSmrg 663045bc899bSmrg# XORG_PROG_RAWCPP() 663145bc899bSmrg# ------------------ 663245bc899bSmrg# Minimum version: 1.0.0 663345bc899bSmrg# 663445bc899bSmrg# Find cpp program and necessary flags for use in pre-processing text files 663545bc899bSmrg# such as man pages and config files 663645bc899bSmrgAC_DEFUN([XORG_PROG_RAWCPP],[ 663745bc899bSmrgAC_REQUIRE([AC_PROG_CPP]) 663845bc899bSmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 663945bc899bSmrg [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 664045bc899bSmrg 664145bc899bSmrg# Check for flag to avoid builtin definitions - assumes unix is predefined, 664245bc899bSmrg# which is not the best choice for supporting other OS'es, but covers most 664345bc899bSmrg# of the ones we need for now. 664445bc899bSmrgAC_MSG_CHECKING([if $RAWCPP requires -undef]) 664545bc899bSmrgAC_LANG_CONFTEST([Does cpp redefine unix ?]) 664645bc899bSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 664745bc899bSmrg AC_MSG_RESULT([no]) 664845bc899bSmrgelse 664945bc899bSmrg if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 665045bc899bSmrg RAWCPPFLAGS=-undef 665145bc899bSmrg AC_MSG_RESULT([yes]) 665245bc899bSmrg else 665345bc899bSmrg AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 665445bc899bSmrg fi 665545bc899bSmrgfi 665645bc899bSmrgrm -f conftest.$ac_ext 665745bc899bSmrg 665845bc899bSmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional]) 665945bc899bSmrgAC_LANG_CONFTEST([Does cpp preserve "whitespace"?]) 666045bc899bSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 666145bc899bSmrg AC_MSG_RESULT([no]) 666245bc899bSmrgelse 666345bc899bSmrg if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 666445bc899bSmrg RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 666545bc899bSmrg AC_MSG_RESULT([yes]) 666645bc899bSmrg else 666745bc899bSmrg AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 666845bc899bSmrg fi 666945bc899bSmrgfi 667045bc899bSmrgrm -f conftest.$ac_ext 667145bc899bSmrgAC_SUBST(RAWCPPFLAGS) 667245bc899bSmrg]) # XORG_PROG_RAWCPP 667345bc899bSmrg 667445bc899bSmrg# XORG_MANPAGE_SECTIONS() 667545bc899bSmrg# ----------------------- 667645bc899bSmrg# Minimum version: 1.0.0 667745bc899bSmrg# 667845bc899bSmrg# Determine which sections man pages go in for the different man page types 667945bc899bSmrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 668045bc899bSmrg# Not sure if there's any better way than just hardcoding by OS name. 668145bc899bSmrg# Override default settings by setting environment variables 668245bc899bSmrg 668345bc899bSmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[ 668445bc899bSmrgAC_REQUIRE([AC_CANONICAL_HOST]) 668545bc899bSmrg 668645bc899bSmrgif test x$APP_MAN_SUFFIX = x ; then 668745bc899bSmrg APP_MAN_SUFFIX=1 668845bc899bSmrgfi 668945bc899bSmrgif test x$APP_MAN_DIR = x ; then 669045bc899bSmrg APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 669145bc899bSmrgfi 669245bc899bSmrg 669345bc899bSmrgif test x$LIB_MAN_SUFFIX = x ; then 669445bc899bSmrg LIB_MAN_SUFFIX=3 669545bc899bSmrgfi 669645bc899bSmrgif test x$LIB_MAN_DIR = x ; then 669745bc899bSmrg LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 669845bc899bSmrgfi 669945bc899bSmrg 670045bc899bSmrgif test x$FILE_MAN_SUFFIX = x ; then 670145bc899bSmrg case $host_os in 670245bc899bSmrg solaris*) FILE_MAN_SUFFIX=4 ;; 670345bc899bSmrg *) FILE_MAN_SUFFIX=5 ;; 670445bc899bSmrg esac 670545bc899bSmrgfi 670645bc899bSmrgif test x$FILE_MAN_DIR = x ; then 670745bc899bSmrg FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 670845bc899bSmrgfi 670945bc899bSmrg 671045bc899bSmrgif test x$MISC_MAN_SUFFIX = x ; then 671145bc899bSmrg case $host_os in 671245bc899bSmrg solaris*) MISC_MAN_SUFFIX=5 ;; 671345bc899bSmrg *) MISC_MAN_SUFFIX=7 ;; 671445bc899bSmrg esac 671545bc899bSmrgfi 671645bc899bSmrgif test x$MISC_MAN_DIR = x ; then 671745bc899bSmrg MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 671845bc899bSmrgfi 671945bc899bSmrg 672045bc899bSmrgif test x$DRIVER_MAN_SUFFIX = x ; then 672145bc899bSmrg case $host_os in 672245bc899bSmrg solaris*) DRIVER_MAN_SUFFIX=7 ;; 672345bc899bSmrg *) DRIVER_MAN_SUFFIX=4 ;; 672445bc899bSmrg esac 672545bc899bSmrgfi 672645bc899bSmrgif test x$DRIVER_MAN_DIR = x ; then 672745bc899bSmrg DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 672845bc899bSmrgfi 672945bc899bSmrg 673045bc899bSmrgif test x$ADMIN_MAN_SUFFIX = x ; then 673145bc899bSmrg case $host_os in 673245bc899bSmrg solaris*) ADMIN_MAN_SUFFIX=1m ;; 673345bc899bSmrg *) ADMIN_MAN_SUFFIX=8 ;; 673445bc899bSmrg esac 673545bc899bSmrgfi 673645bc899bSmrgif test x$ADMIN_MAN_DIR = x ; then 673745bc899bSmrg ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 673845bc899bSmrgfi 673945bc899bSmrg 674045bc899bSmrg 674145bc899bSmrgAC_SUBST([APP_MAN_SUFFIX]) 674245bc899bSmrgAC_SUBST([LIB_MAN_SUFFIX]) 674345bc899bSmrgAC_SUBST([FILE_MAN_SUFFIX]) 674445bc899bSmrgAC_SUBST([MISC_MAN_SUFFIX]) 674545bc899bSmrgAC_SUBST([DRIVER_MAN_SUFFIX]) 674645bc899bSmrgAC_SUBST([ADMIN_MAN_SUFFIX]) 674745bc899bSmrgAC_SUBST([APP_MAN_DIR]) 674845bc899bSmrgAC_SUBST([LIB_MAN_DIR]) 674945bc899bSmrgAC_SUBST([FILE_MAN_DIR]) 675045bc899bSmrgAC_SUBST([MISC_MAN_DIR]) 675145bc899bSmrgAC_SUBST([DRIVER_MAN_DIR]) 675245bc899bSmrgAC_SUBST([ADMIN_MAN_DIR]) 675345bc899bSmrg]) # XORG_MANPAGE_SECTIONS 675445bc899bSmrg 675545bc899bSmrg# XORG_CHECK_LINUXDOC 675645bc899bSmrg# ------------------- 675745bc899bSmrg# Minimum version: 1.0.0 675845bc899bSmrg# 675945bc899bSmrg# Defines the variable MAKE_TEXT if the necessary tools and 676045bc899bSmrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 676145bc899bSmrg# Whether or not the necessary tools and files are found can be checked 676245bc899bSmrg# with the AM_CONDITIONAL "BUILD_LINUXDOC" 676345bc899bSmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[ 676445bc899bSmrgAC_CHECK_FILE( 676545bc899bSmrg [$prefix/share/X11/sgml/defs.ent], 676645bc899bSmrg [DEFS_ENT_PATH=$prefix/share/X11/sgml], 676745bc899bSmrg [DEFS_ENT_PATH=] 676845bc899bSmrg) 676945bc899bSmrg 677045bc899bSmrgAC_PATH_PROG(LINUXDOC, linuxdoc) 677145bc899bSmrgAC_PATH_PROG(PS2PDF, ps2pdf) 677245bc899bSmrg 677345bc899bSmrgAC_MSG_CHECKING([Whether to build documentation]) 677445bc899bSmrg 677545bc899bSmrgif test x$DEFS_ENT_PATH != x && test x$LINUXDOC != x ; then 677645bc899bSmrg BUILDDOC=yes 677745bc899bSmrgelse 677845bc899bSmrg BUILDDOC=no 677945bc899bSmrgfi 678045bc899bSmrg 678145bc899bSmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 678245bc899bSmrg 678345bc899bSmrgAC_MSG_RESULT([$BUILDDOC]) 678445bc899bSmrg 678545bc899bSmrgAC_MSG_CHECKING([Whether to build pdf documentation]) 678645bc899bSmrg 678745bc899bSmrgif test x$PS2PDF != x ; then 678845bc899bSmrg BUILDPDFDOC=yes 678945bc899bSmrgelse 679045bc899bSmrg BUILDPDFDOC=no 679145bc899bSmrgfi 679245bc899bSmrg 679345bc899bSmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 679445bc899bSmrg 679545bc899bSmrgAC_MSG_RESULT([$BUILDPDFDOC]) 679645bc899bSmrg 679745bc899bSmrgMAKE_TEXT="SGML_SEARCH_PATH=$DEFS_ENT_PATH GROFF_NO_SGR=y $LINUXDOC -B txt" 679845bc899bSmrgMAKE_PS="SGML_SEARCH_PATH=$DEFS_ENT_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 679945bc899bSmrgMAKE_PDF="$PS2PDF" 680045bc899bSmrgMAKE_HTML="SGML_SEARCH_PATH=$DEFS_ENT_PATH $LINUXDOC -B html --split=0" 680145bc899bSmrg 680245bc899bSmrgAC_SUBST(MAKE_TEXT) 680345bc899bSmrgAC_SUBST(MAKE_PS) 680445bc899bSmrgAC_SUBST(MAKE_PDF) 680545bc899bSmrgAC_SUBST(MAKE_HTML) 680645bc899bSmrg]) # XORG_CHECK_LINUXDOC 680745bc899bSmrg 680845bc899bSmrg# XORG_CHECK_MALLOC_ZERO 680945bc899bSmrg# ---------------------- 681045bc899bSmrg# Minimum version: 1.0.0 681145bc899bSmrg# 681245bc899bSmrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 681345bc899bSmrg# malloc(0) returns NULL. Packages should add one of these cflags to 681445bc899bSmrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 681545bc899bSmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 681645bc899bSmrgAC_ARG_ENABLE(malloc0returnsnull, 681745bc899bSmrg AC_HELP_STRING([--enable-malloc0returnsnull], 681845bc899bSmrg [malloc(0) returns NULL (default: auto)]), 681945bc899bSmrg [MALLOC_ZERO_RETURNS_NULL=$enableval], 682045bc899bSmrg [MALLOC_ZERO_RETURNS_NULL=auto]) 682145bc899bSmrg 682245bc899bSmrgAC_MSG_CHECKING([whether malloc(0) returns NULL]) 682345bc899bSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 682445bc899bSmrg AC_RUN_IFELSE([ 682545bc899bSmrgchar *malloc(); 682645bc899bSmrgchar *realloc(); 682745bc899bSmrgchar *calloc(); 682845bc899bSmrgmain() { 682945bc899bSmrg char *m0, *r0, *c0, *p; 683045bc899bSmrg m0 = malloc(0); 683145bc899bSmrg p = malloc(10); 683245bc899bSmrg r0 = realloc(p,0); 683345bc899bSmrg c0 = calloc(0); 683445bc899bSmrg exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1); 683545bc899bSmrg}], 683645bc899bSmrg [MALLOC_ZERO_RETURNS_NULL=yes], 683745bc899bSmrg [MALLOC_ZERO_RETURNS_NULL=no]) 683845bc899bSmrgfi 683945bc899bSmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 684045bc899bSmrg 684145bc899bSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 684245bc899bSmrg MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 684345bc899bSmrg XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 684445bc899bSmrg XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 684545bc899bSmrgelse 684645bc899bSmrg MALLOC_ZERO_CFLAGS="" 684745bc899bSmrg XMALLOC_ZERO_CFLAGS="" 684845bc899bSmrg XTMALLOC_ZERO_CFLAGS="" 684945bc899bSmrgfi 685045bc899bSmrg 685145bc899bSmrgAC_SUBST([MALLOC_ZERO_CFLAGS]) 685245bc899bSmrgAC_SUBST([XMALLOC_ZERO_CFLAGS]) 685345bc899bSmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS]) 685445bc899bSmrg]) # XORG_CHECK_MALLOC_ZERO 685545bc899bSmrg 685645bc899bSmrg# XORG_WITH_LINT() 685745bc899bSmrg# ---------------- 685845bc899bSmrg# Minimum version: 1.1.0 685945bc899bSmrg# 686045bc899bSmrg# Sets up flags for source checkers such as lint and sparse if --with-lint 686145bc899bSmrg# is specified. (Use --with-lint=sparse for sparse.) 686245bc899bSmrg# Sets $LINT to name of source checker passed with --with-lint (default: lint) 686345bc899bSmrg# Sets $LINT_FLAGS to flags to pass to source checker 686445bc899bSmrg# Sets LINT automake conditional if enabled (default: disabled) 686545bc899bSmrg# 686645bc899bSmrgAC_DEFUN([XORG_WITH_LINT],[ 686745bc899bSmrg 686845bc899bSmrg# Allow checking code with lint, sparse, etc. 686945bc899bSmrgAC_ARG_WITH(lint, [AC_HELP_STRING([--with-lint], 687045bc899bSmrg [Use a lint-style source code checker (default: disabled)])], 687145bc899bSmrg [use_lint=$withval], [use_lint=no]) 687245bc899bSmrgif test "x$use_lint" = "xyes" ; then 687345bc899bSmrg LINT="lint" 687445bc899bSmrgelse 687545bc899bSmrg LINT="$use_lint" 687645bc899bSmrgfi 687745bc899bSmrgif test "x$LINT_FLAGS" = "x" -a "x$LINT" != "xno" ; then 687845bc899bSmrg case $LINT in 687945bc899bSmrg lint|*/lint) 688045bc899bSmrg case $host_os in 688145bc899bSmrg solaris*) 688245bc899bSmrg LINT_FLAGS="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 688345bc899bSmrg ;; 688445bc899bSmrg esac 688545bc899bSmrg ;; 688645bc899bSmrg esac 688745bc899bSmrgfi 688845bc899bSmrg 688945bc899bSmrgAC_SUBST(LINT) 689045bc899bSmrgAC_SUBST(LINT_FLAGS) 689145bc899bSmrgAM_CONDITIONAL(LINT, [test x$LINT != xno]) 689245bc899bSmrg 689345bc899bSmrg]) # XORG_WITH_LINT 689445bc899bSmrg 689545bc899bSmrg# XORG_LINT_LIBRARY(LIBNAME) 689645bc899bSmrg# -------------------------- 689745bc899bSmrg# Minimum version: 1.1.0 689845bc899bSmrg# 689945bc899bSmrg# Sets up flags for building lint libraries for checking programs that call 690045bc899bSmrg# functions in the library. 690145bc899bSmrg# Disabled by default, enable with --enable-lint-library 690245bc899bSmrg# Sets: 690345bc899bSmrg# @LINTLIB@ - name of lint library file to make 690445bc899bSmrg# MAKE_LINT_LIB - automake conditional 690545bc899bSmrg# 690645bc899bSmrg 690745bc899bSmrgAC_DEFUN([XORG_LINT_LIBRARY],[ 690845bc899bSmrgAC_REQUIRE([XORG_WITH_LINT]) 690945bc899bSmrg# Build lint "library" for more indepth checks of programs calling this library 691045bc899bSmrgAC_ARG_ENABLE(lint-library, [AC_HELP_STRING([--enable-lint-library], 691145bc899bSmrg [Create lint library (default: disabled)])], 691245bc899bSmrg [make_lint_lib=$enableval], [make_lint_lib=no]) 691345bc899bSmrgif test "x$make_lint_lib" != "xno" ; then 691445bc899bSmrg if test "x$LINT" = "xno" ; then 691545bc899bSmrg AC_MSG_ERROR([Cannot make lint library without --with-lint]) 691645bc899bSmrg fi 691745bc899bSmrg if test "x$make_lint_lib" = "xyes" ; then 691845bc899bSmrg LINTLIB=llib-l$1.ln 691945bc899bSmrg else 692045bc899bSmrg LINTLIB=$make_lint_lib 692145bc899bSmrg fi 692245bc899bSmrgfi 692345bc899bSmrgAC_SUBST(LINTLIB) 692445bc899bSmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 692545bc899bSmrg 692645bc899bSmrg]) # XORG_LINT_LIBRARY 692745bc899bSmrg 692845bc899bSmrgdnl Copyright 2005 Red Hat, Inc 692945bc899bSmrgdnl 693045bc899bSmrgdnl Permission to use, copy, modify, distribute, and sell this software and its 693145bc899bSmrgdnl documentation for any purpose is hereby granted without fee, provided that 693245bc899bSmrgdnl the above copyright notice appear in all copies and that both that 693345bc899bSmrgdnl copyright notice and this permission notice appear in supporting 693445bc899bSmrgdnl documentation. 693545bc899bSmrgdnl 693645bc899bSmrgdnl The above copyright notice and this permission notice shall be included 693745bc899bSmrgdnl in all copies or substantial portions of the Software. 693845bc899bSmrgdnl 693945bc899bSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 694045bc899bSmrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 694145bc899bSmrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 694245bc899bSmrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 694345bc899bSmrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 694445bc899bSmrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 694545bc899bSmrgdnl OTHER DEALINGS IN THE SOFTWARE. 694645bc899bSmrgdnl 694745bc899bSmrgdnl Except as contained in this notice, the name of the copyright holders shall 694845bc899bSmrgdnl not be used in advertising or otherwise to promote the sale, use or 694945bc899bSmrgdnl other dealings in this Software without prior written authorization 695045bc899bSmrgdnl from the copyright holders. 695145bc899bSmrgdnl 695245bc899bSmrg 695345bc899bSmrg# XORG_DRIVER_CHECK_EXT() 695445bc899bSmrg# -------------------------- 695545bc899bSmrg# Checks for the $1 define in xorg-server.h (from the sdk). If it 695645bc899bSmrg# is defined, then add $1 to $REQUIRED_MODULES. 695745bc899bSmrg 695845bc899bSmrgAC_DEFUN([XORG_DRIVER_CHECK_EXT],[ 695945bc899bSmrg SAVE_CFLAGS="$CFLAGS" 696045bc899bSmrg CFLAGS="$CFLAGS -I`pkg-config --variable=sdkdir xorg-server`" 696145bc899bSmrg AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ 696245bc899bSmrg#include "xorg-server.h" 696345bc899bSmrg#if !defined $1 696445bc899bSmrg#error $1 not defined 696545bc899bSmrg#endif 696645bc899bSmrg ]])], 696745bc899bSmrg [_EXT_CHECK=yes], 696845bc899bSmrg [_EXT_CHECK=no]) 696945bc899bSmrg CFLAGS="$SAVE_CFLAGS" 697045bc899bSmrg AC_MSG_CHECKING([if $1 is defined]) 697145bc899bSmrg AC_MSG_RESULT([$_EXT_CHECK]) 697245bc899bSmrg if test "$_EXT_CHECK" != no; then 697345bc899bSmrg REQUIRED_MODULES="$REQUIRED_MODULES $2" 697445bc899bSmrg fi 697545bc899bSmrg]) 697645bc899bSmrg 697745bc899bSmrgdnl Copyright 2005 Red Hat, Inc 697845bc899bSmrgdnl 697945bc899bSmrgdnl Permission to use, copy, modify, distribute, and sell this software and its 698045bc899bSmrgdnl documentation for any purpose is hereby granted without fee, provided that 698145bc899bSmrgdnl the above copyright notice appear in all copies and that both that 698245bc899bSmrgdnl copyright notice and this permission notice appear in supporting 698345bc899bSmrgdnl documentation. 698445bc899bSmrgdnl 698545bc899bSmrgdnl The above copyright notice and this permission notice shall be included 698645bc899bSmrgdnl in all copies or substantial portions of the Software. 698745bc899bSmrgdnl 698845bc899bSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 698945bc899bSmrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 699045bc899bSmrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 699145bc899bSmrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 699245bc899bSmrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 699345bc899bSmrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 699445bc899bSmrgdnl OTHER DEALINGS IN THE SOFTWARE. 699545bc899bSmrgdnl 699645bc899bSmrgdnl Except as contained in this notice, the name of the copyright holders shall 699745bc899bSmrgdnl not be used in advertising or otherwise to promote the sale, use or 699845bc899bSmrgdnl other dealings in this Software without prior written authorization 699945bc899bSmrgdnl from the copyright holders. 700045bc899bSmrgdnl 700145bc899bSmrg 700245bc899bSmrg# XORG_RELEASE_VERSION 700345bc899bSmrg# -------------------- 700445bc899bSmrg# Adds --with/without-release-string and changes the PACKAGE and 700545bc899bSmrg# PACKAGE_TARNAME to use "$PACKAGE{_TARNAME}-$RELEASE_VERSION". If 700645bc899bSmrg# no option is given, PACKAGE and PACKAGE_TARNAME are unchanged. 700745bc899bSmrg 700845bc899bSmrgAC_DEFUN([XORG_RELEASE_VERSION],[ 700945bc899bSmrg AC_ARG_WITH(release-version, 701045bc899bSmrg AC_HELP_STRING([--with-release-version=STRING], 701145bc899bSmrg [Use release version string in package name]), 701245bc899bSmrg [RELEASE_VERSION="$withval"], 701345bc899bSmrg [RELEASE_VERSION=""]) 701445bc899bSmrg if test "x$RELEASE_VERSION" != "x"; then 701545bc899bSmrg PACKAGE="$PACKAGE-$RELEASE_VERSION" 701645bc899bSmrg PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION" 701745bc899bSmrg AC_MSG_NOTICE([Building with package name set to $PACKAGE]) 701845bc899bSmrg fi 701945bc899bSmrg]) 702045bc899bSmrg 702145bc899bSmrg# Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc. 702245bc899bSmrg# 702345bc899bSmrg# This file is free software; the Free Software Foundation 702445bc899bSmrg# gives unlimited permission to copy and/or distribute it, 702545bc899bSmrg# with or without modifications, as long as this notice is preserved. 702645bc899bSmrg 702745bc899bSmrg# AM_AUTOMAKE_VERSION(VERSION) 702845bc899bSmrg# ---------------------------- 702945bc899bSmrg# Automake X.Y traces this macro to ensure aclocal.m4 has been 703045bc899bSmrg# generated from the m4 files accompanying Automake X.Y. 703145bc899bSmrgAC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"]) 703245bc899bSmrg 703345bc899bSmrg# AM_SET_CURRENT_AUTOMAKE_VERSION 703445bc899bSmrg# ------------------------------- 703545bc899bSmrg# Call AM_AUTOMAKE_VERSION so it can be traced. 703645bc899bSmrg# This function is AC_REQUIREd by AC_INIT_AUTOMAKE. 703745bc899bSmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 703845bc899bSmrg [AM_AUTOMAKE_VERSION([1.9.6])]) 703945bc899bSmrg 704045bc899bSmrg# AM_AUX_DIR_EXPAND -*- Autoconf -*- 704145bc899bSmrg 704245bc899bSmrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 704345bc899bSmrg# 704445bc899bSmrg# This file is free software; the Free Software Foundation 704545bc899bSmrg# gives unlimited permission to copy and/or distribute it, 704645bc899bSmrg# with or without modifications, as long as this notice is preserved. 704745bc899bSmrg 704845bc899bSmrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 704945bc899bSmrg# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to 705045bc899bSmrg# `$srcdir', `$srcdir/..', or `$srcdir/../..'. 705145bc899bSmrg# 705245bc899bSmrg# Of course, Automake must honor this variable whenever it calls a 705345bc899bSmrg# tool from the auxiliary directory. The problem is that $srcdir (and 705445bc899bSmrg# therefore $ac_aux_dir as well) can be either absolute or relative, 705545bc899bSmrg# depending on how configure is run. This is pretty annoying, since 705645bc899bSmrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top 705745bc899bSmrg# source directory, any form will work fine, but in subdirectories a 705845bc899bSmrg# relative path needs to be adjusted first. 705945bc899bSmrg# 706045bc899bSmrg# $ac_aux_dir/missing 706145bc899bSmrg# fails when called from a subdirectory if $ac_aux_dir is relative 706245bc899bSmrg# $top_srcdir/$ac_aux_dir/missing 706345bc899bSmrg# fails if $ac_aux_dir is absolute, 706445bc899bSmrg# fails when called from a subdirectory in a VPATH build with 706545bc899bSmrg# a relative $ac_aux_dir 706645bc899bSmrg# 706745bc899bSmrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 706845bc899bSmrg# are both prefixed by $srcdir. In an in-source build this is usually 706945bc899bSmrg# harmless because $srcdir is `.', but things will broke when you 707045bc899bSmrg# start a VPATH build or use an absolute $srcdir. 707145bc899bSmrg# 707245bc899bSmrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 707345bc899bSmrg# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 707445bc899bSmrg# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 707545bc899bSmrg# and then we would define $MISSING as 707645bc899bSmrg# MISSING="\${SHELL} $am_aux_dir/missing" 707745bc899bSmrg# This will work as long as MISSING is not called from configure, because 707845bc899bSmrg# unfortunately $(top_srcdir) has no meaning in configure. 707945bc899bSmrg# However there are other variables, like CC, which are often used in 708045bc899bSmrg# configure, and could therefore not use this "fixed" $ac_aux_dir. 708145bc899bSmrg# 708245bc899bSmrg# Another solution, used here, is to always expand $ac_aux_dir to an 708345bc899bSmrg# absolute PATH. The drawback is that using absolute paths prevent a 708445bc899bSmrg# configured tree to be moved without reconfiguration. 708545bc899bSmrg 708645bc899bSmrgAC_DEFUN([AM_AUX_DIR_EXPAND], 708745bc899bSmrg[dnl Rely on autoconf to set up CDPATH properly. 708845bc899bSmrgAC_PREREQ([2.50])dnl 708945bc899bSmrg# expand $ac_aux_dir to an absolute path 709045bc899bSmrgam_aux_dir=`cd $ac_aux_dir && pwd` 709145bc899bSmrg]) 709245bc899bSmrg 709345bc899bSmrg# AM_CONDITIONAL -*- Autoconf -*- 709445bc899bSmrg 709545bc899bSmrg# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005 709645bc899bSmrg# Free Software Foundation, Inc. 709745bc899bSmrg# 709845bc899bSmrg# This file is free software; the Free Software Foundation 709945bc899bSmrg# gives unlimited permission to copy and/or distribute it, 710045bc899bSmrg# with or without modifications, as long as this notice is preserved. 710145bc899bSmrg 710245bc899bSmrg# serial 7 710345bc899bSmrg 710445bc899bSmrg# AM_CONDITIONAL(NAME, SHELL-CONDITION) 710545bc899bSmrg# ------------------------------------- 710645bc899bSmrg# Define a conditional. 710745bc899bSmrgAC_DEFUN([AM_CONDITIONAL], 710845bc899bSmrg[AC_PREREQ(2.52)dnl 710945bc899bSmrg ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 711045bc899bSmrg [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 711145bc899bSmrgAC_SUBST([$1_TRUE]) 711245bc899bSmrgAC_SUBST([$1_FALSE]) 711345bc899bSmrgif $2; then 711445bc899bSmrg $1_TRUE= 711545bc899bSmrg $1_FALSE='#' 711645bc899bSmrgelse 711745bc899bSmrg $1_TRUE='#' 711845bc899bSmrg $1_FALSE= 711945bc899bSmrgfi 712045bc899bSmrgAC_CONFIG_COMMANDS_PRE( 712145bc899bSmrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 712245bc899bSmrg AC_MSG_ERROR([[conditional "$1" was never defined. 712345bc899bSmrgUsually this means the macro was only invoked conditionally.]]) 712445bc899bSmrgfi])]) 712545bc899bSmrg 712645bc899bSmrg 712745bc899bSmrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 712845bc899bSmrg# Free Software Foundation, Inc. 712945bc899bSmrg# 713045bc899bSmrg# This file is free software; the Free Software Foundation 713145bc899bSmrg# gives unlimited permission to copy and/or distribute it, 713245bc899bSmrg# with or without modifications, as long as this notice is preserved. 713345bc899bSmrg 713445bc899bSmrg# serial 8 713545bc899bSmrg 713645bc899bSmrg# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be 713745bc899bSmrg# written in clear, in which case automake, when reading aclocal.m4, 713845bc899bSmrg# will think it sees a *use*, and therefore will trigger all it's 713945bc899bSmrg# C support machinery. Also note that it means that autoscan, seeing 714045bc899bSmrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 714145bc899bSmrg 714245bc899bSmrg 714345bc899bSmrg# _AM_DEPENDENCIES(NAME) 714445bc899bSmrg# ---------------------- 714545bc899bSmrg# See how the compiler implements dependency checking. 714645bc899bSmrg# NAME is "CC", "CXX", "GCJ", or "OBJC". 714745bc899bSmrg# We try a few techniques and use that to set a single cache variable. 714845bc899bSmrg# 714945bc899bSmrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 715045bc899bSmrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 715145bc899bSmrg# dependency, and given that the user is not expected to run this macro, 715245bc899bSmrg# just rely on AC_PROG_CC. 715345bc899bSmrgAC_DEFUN([_AM_DEPENDENCIES], 715445bc899bSmrg[AC_REQUIRE([AM_SET_DEPDIR])dnl 715545bc899bSmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 715645bc899bSmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl 715745bc899bSmrgAC_REQUIRE([AM_DEP_TRACK])dnl 715845bc899bSmrg 715945bc899bSmrgifelse([$1], CC, [depcc="$CC" am_compiler_list=], 716045bc899bSmrg [$1], CXX, [depcc="$CXX" am_compiler_list=], 716145bc899bSmrg [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 716245bc899bSmrg [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 716345bc899bSmrg [depcc="$$1" am_compiler_list=]) 716445bc899bSmrg 716545bc899bSmrgAC_CACHE_CHECK([dependency style of $depcc], 716645bc899bSmrg [am_cv_$1_dependencies_compiler_type], 716745bc899bSmrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 716845bc899bSmrg # We make a subdir and do the tests there. Otherwise we can end up 716945bc899bSmrg # making bogus files that we don't know about and never remove. For 717045bc899bSmrg # instance it was reported that on HP-UX the gcc test will end up 717145bc899bSmrg # making a dummy file named `D' -- because `-MD' means `put the output 717245bc899bSmrg # in D'. 717345bc899bSmrg mkdir conftest.dir 717445bc899bSmrg # Copy depcomp to subdir because otherwise we won't find it if we're 717545bc899bSmrg # using a relative directory. 717645bc899bSmrg cp "$am_depcomp" conftest.dir 717745bc899bSmrg cd conftest.dir 717845bc899bSmrg # We will build objects and dependencies in a subdirectory because 717945bc899bSmrg # it helps to detect inapplicable dependency modes. For instance 718045bc899bSmrg # both Tru64's cc and ICC support -MD to output dependencies as a 718145bc899bSmrg # side effect of compilation, but ICC will put the dependencies in 718245bc899bSmrg # the current directory while Tru64 will put them in the object 718345bc899bSmrg # directory. 718445bc899bSmrg mkdir sub 718545bc899bSmrg 718645bc899bSmrg am_cv_$1_dependencies_compiler_type=none 718745bc899bSmrg if test "$am_compiler_list" = ""; then 718845bc899bSmrg am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 718945bc899bSmrg fi 719045bc899bSmrg for depmode in $am_compiler_list; do 719145bc899bSmrg # Setup a source with many dependencies, because some compilers 719245bc899bSmrg # like to wrap large dependency lists on column 80 (with \), and 719345bc899bSmrg # we should not choose a depcomp mode which is confused by this. 719445bc899bSmrg # 719545bc899bSmrg # We need to recreate these files for each test, as the compiler may 719645bc899bSmrg # overwrite some of them when testing with obscure command lines. 719745bc899bSmrg # This happens at least with the AIX C compiler. 719845bc899bSmrg : > sub/conftest.c 719945bc899bSmrg for i in 1 2 3 4 5 6; do 720045bc899bSmrg echo '#include "conftst'$i'.h"' >> sub/conftest.c 720145bc899bSmrg # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with 720245bc899bSmrg # Solaris 8's {/usr,}/bin/sh. 720345bc899bSmrg touch sub/conftst$i.h 720445bc899bSmrg done 720545bc899bSmrg echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 720645bc899bSmrg 720745bc899bSmrg case $depmode in 720845bc899bSmrg nosideeffect) 720945bc899bSmrg # after this tag, mechanisms are not by side-effect, so they'll 721045bc899bSmrg # only be used when explicitly requested 721145bc899bSmrg if test "x$enable_dependency_tracking" = xyes; then 721245bc899bSmrg continue 721345bc899bSmrg else 721445bc899bSmrg break 721545bc899bSmrg fi 721645bc899bSmrg ;; 721745bc899bSmrg none) break ;; 721845bc899bSmrg esac 721945bc899bSmrg # We check with `-c' and `-o' for the sake of the "dashmstdout" 722045bc899bSmrg # mode. It turns out that the SunPro C++ compiler does not properly 722145bc899bSmrg # handle `-M -o', and we need to detect this. 722245bc899bSmrg if depmode=$depmode \ 722345bc899bSmrg source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ 722445bc899bSmrg depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 722545bc899bSmrg $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ 722645bc899bSmrg >/dev/null 2>conftest.err && 722745bc899bSmrg grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 722845bc899bSmrg grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && 722945bc899bSmrg ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 723045bc899bSmrg # icc doesn't choke on unknown options, it will just issue warnings 723145bc899bSmrg # or remarks (even with -Werror). So we grep stderr for any message 723245bc899bSmrg # that says an option was ignored or not supported. 723345bc899bSmrg # When given -MP, icc 7.0 and 7.1 complain thusly: 723445bc899bSmrg # icc: Command line warning: ignoring option '-M'; no argument required 723545bc899bSmrg # The diagnosis changed in icc 8.0: 723645bc899bSmrg # icc: Command line remark: option '-MP' not supported 723745bc899bSmrg if (grep 'ignoring option' conftest.err || 723845bc899bSmrg grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 723945bc899bSmrg am_cv_$1_dependencies_compiler_type=$depmode 724045bc899bSmrg break 724145bc899bSmrg fi 724245bc899bSmrg fi 724345bc899bSmrg done 724445bc899bSmrg 724545bc899bSmrg cd .. 724645bc899bSmrg rm -rf conftest.dir 724745bc899bSmrgelse 724845bc899bSmrg am_cv_$1_dependencies_compiler_type=none 724945bc899bSmrgfi 725045bc899bSmrg]) 725145bc899bSmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 725245bc899bSmrgAM_CONDITIONAL([am__fastdep$1], [ 725345bc899bSmrg test "x$enable_dependency_tracking" != xno \ 725445bc899bSmrg && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 725545bc899bSmrg]) 725645bc899bSmrg 725745bc899bSmrg 725845bc899bSmrg# AM_SET_DEPDIR 725945bc899bSmrg# ------------- 726045bc899bSmrg# Choose a directory name for dependency files. 726145bc899bSmrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES 726245bc899bSmrgAC_DEFUN([AM_SET_DEPDIR], 726345bc899bSmrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 726445bc899bSmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 726545bc899bSmrg]) 726645bc899bSmrg 726745bc899bSmrg 726845bc899bSmrg# AM_DEP_TRACK 726945bc899bSmrg# ------------ 727045bc899bSmrgAC_DEFUN([AM_DEP_TRACK], 727145bc899bSmrg[AC_ARG_ENABLE(dependency-tracking, 727245bc899bSmrg[ --disable-dependency-tracking speeds up one-time build 727345bc899bSmrg --enable-dependency-tracking do not reject slow dependency extractors]) 727445bc899bSmrgif test "x$enable_dependency_tracking" != xno; then 727545bc899bSmrg am_depcomp="$ac_aux_dir/depcomp" 727645bc899bSmrg AMDEPBACKSLASH='\' 727745bc899bSmrgfi 727845bc899bSmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 727945bc899bSmrgAC_SUBST([AMDEPBACKSLASH]) 728045bc899bSmrg]) 728145bc899bSmrg 728245bc899bSmrg# Generate code to set up dependency tracking. -*- Autoconf -*- 728345bc899bSmrg 728445bc899bSmrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 728545bc899bSmrg# Free Software Foundation, Inc. 728645bc899bSmrg# 728745bc899bSmrg# This file is free software; the Free Software Foundation 728845bc899bSmrg# gives unlimited permission to copy and/or distribute it, 728945bc899bSmrg# with or without modifications, as long as this notice is preserved. 729045bc899bSmrg 729145bc899bSmrg#serial 3 729245bc899bSmrg 729345bc899bSmrg# _AM_OUTPUT_DEPENDENCY_COMMANDS 729445bc899bSmrg# ------------------------------ 729545bc899bSmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 729645bc899bSmrg[for mf in $CONFIG_FILES; do 729745bc899bSmrg # Strip MF so we end up with the name of the file. 729845bc899bSmrg mf=`echo "$mf" | sed -e 's/:.*$//'` 729945bc899bSmrg # Check whether this is an Automake generated Makefile or not. 730045bc899bSmrg # We used to match only the files named `Makefile.in', but 730145bc899bSmrg # some people rename them; so instead we look at the file content. 730245bc899bSmrg # Grep'ing the first line is not enough: some people post-process 730345bc899bSmrg # each Makefile.in and add a new line on top of each file to say so. 730445bc899bSmrg # So let's grep whole file. 730545bc899bSmrg if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then 730645bc899bSmrg dirpart=`AS_DIRNAME("$mf")` 730745bc899bSmrg else 730845bc899bSmrg continue 730945bc899bSmrg fi 731045bc899bSmrg # Extract the definition of DEPDIR, am__include, and am__quote 731145bc899bSmrg # from the Makefile without running `make'. 731245bc899bSmrg DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` 731345bc899bSmrg test -z "$DEPDIR" && continue 731445bc899bSmrg am__include=`sed -n 's/^am__include = //p' < "$mf"` 731545bc899bSmrg test -z "am__include" && continue 731645bc899bSmrg am__quote=`sed -n 's/^am__quote = //p' < "$mf"` 731745bc899bSmrg # When using ansi2knr, U may be empty or an underscore; expand it 731845bc899bSmrg U=`sed -n 's/^U = //p' < "$mf"` 731945bc899bSmrg # Find all dependency output files, they are included files with 732045bc899bSmrg # $(DEPDIR) in their names. We invoke sed twice because it is the 732145bc899bSmrg # simplest approach to changing $(DEPDIR) to its actual value in the 732245bc899bSmrg # expansion. 732345bc899bSmrg for file in `sed -n " 732445bc899bSmrg s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ 732545bc899bSmrg sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do 732645bc899bSmrg # Make sure the directory exists. 732745bc899bSmrg test -f "$dirpart/$file" && continue 732845bc899bSmrg fdir=`AS_DIRNAME(["$file"])` 732945bc899bSmrg AS_MKDIR_P([$dirpart/$fdir]) 733045bc899bSmrg # echo "creating $dirpart/$file" 733145bc899bSmrg echo '# dummy' > "$dirpart/$file" 733245bc899bSmrg done 733345bc899bSmrgdone 733445bc899bSmrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS 733545bc899bSmrg 733645bc899bSmrg 733745bc899bSmrg# AM_OUTPUT_DEPENDENCY_COMMANDS 733845bc899bSmrg# ----------------------------- 733945bc899bSmrg# This macro should only be invoked once -- use via AC_REQUIRE. 734045bc899bSmrg# 734145bc899bSmrg# This code is only required when automatic dependency tracking 734245bc899bSmrg# is enabled. FIXME. This creates each `.P' file that we will 734345bc899bSmrg# need in order to bootstrap the dependency handling code. 734445bc899bSmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 734545bc899bSmrg[AC_CONFIG_COMMANDS([depfiles], 734645bc899bSmrg [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 734745bc899bSmrg [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 734845bc899bSmrg]) 734945bc899bSmrg 735045bc899bSmrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 735145bc899bSmrg# Free Software Foundation, Inc. 735245bc899bSmrg# 735345bc899bSmrg# This file is free software; the Free Software Foundation 735445bc899bSmrg# gives unlimited permission to copy and/or distribute it, 735545bc899bSmrg# with or without modifications, as long as this notice is preserved. 735645bc899bSmrg 735745bc899bSmrg# serial 8 735845bc899bSmrg 735945bc899bSmrg# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. 736045bc899bSmrgAU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) 736145bc899bSmrg 736245bc899bSmrg# Do all the work for Automake. -*- Autoconf -*- 736345bc899bSmrg 736445bc899bSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 736545bc899bSmrg# Free Software Foundation, Inc. 736645bc899bSmrg# 736745bc899bSmrg# This file is free software; the Free Software Foundation 736845bc899bSmrg# gives unlimited permission to copy and/or distribute it, 736945bc899bSmrg# with or without modifications, as long as this notice is preserved. 737045bc899bSmrg 737145bc899bSmrg# serial 12 737245bc899bSmrg 737345bc899bSmrg# This macro actually does too much. Some checks are only needed if 737445bc899bSmrg# your package does certain things. But this isn't really a big deal. 737545bc899bSmrg 737645bc899bSmrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 737745bc899bSmrg# AM_INIT_AUTOMAKE([OPTIONS]) 737845bc899bSmrg# ----------------------------------------------- 737945bc899bSmrg# The call with PACKAGE and VERSION arguments is the old style 738045bc899bSmrg# call (pre autoconf-2.50), which is being phased out. PACKAGE 738145bc899bSmrg# and VERSION should now be passed to AC_INIT and removed from 738245bc899bSmrg# the call to AM_INIT_AUTOMAKE. 738345bc899bSmrg# We support both call styles for the transition. After 738445bc899bSmrg# the next Automake release, Autoconf can make the AC_INIT 738545bc899bSmrg# arguments mandatory, and then we can depend on a new Autoconf 738645bc899bSmrg# release and drop the old call support. 738745bc899bSmrgAC_DEFUN([AM_INIT_AUTOMAKE], 738845bc899bSmrg[AC_PREREQ([2.58])dnl 738945bc899bSmrgdnl Autoconf wants to disallow AM_ names. We explicitly allow 739045bc899bSmrgdnl the ones we care about. 739145bc899bSmrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 739245bc899bSmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 739345bc899bSmrgAC_REQUIRE([AC_PROG_INSTALL])dnl 739445bc899bSmrg# test to see if srcdir already configured 739545bc899bSmrgif test "`cd $srcdir && pwd`" != "`pwd`" && 739645bc899bSmrg test -f $srcdir/config.status; then 739745bc899bSmrg AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 739845bc899bSmrgfi 739945bc899bSmrg 740045bc899bSmrg# test whether we have cygpath 740145bc899bSmrgif test -z "$CYGPATH_W"; then 740245bc899bSmrg if (cygpath --version) >/dev/null 2>/dev/null; then 740345bc899bSmrg CYGPATH_W='cygpath -w' 740445bc899bSmrg else 740545bc899bSmrg CYGPATH_W=echo 740645bc899bSmrg fi 740745bc899bSmrgfi 740845bc899bSmrgAC_SUBST([CYGPATH_W]) 740945bc899bSmrg 741045bc899bSmrg# Define the identity of the package. 741145bc899bSmrgdnl Distinguish between old-style and new-style calls. 741245bc899bSmrgm4_ifval([$2], 741345bc899bSmrg[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 741445bc899bSmrg AC_SUBST([PACKAGE], [$1])dnl 741545bc899bSmrg AC_SUBST([VERSION], [$2])], 741645bc899bSmrg[_AM_SET_OPTIONS([$1])dnl 741745bc899bSmrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 741845bc899bSmrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 741945bc899bSmrg 742045bc899bSmrg_AM_IF_OPTION([no-define],, 742145bc899bSmrg[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) 742245bc899bSmrg AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl 742345bc899bSmrg 742445bc899bSmrg# Some tools Automake needs. 742545bc899bSmrgAC_REQUIRE([AM_SANITY_CHECK])dnl 742645bc899bSmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl 742745bc899bSmrgAM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) 742845bc899bSmrgAM_MISSING_PROG(AUTOCONF, autoconf) 742945bc899bSmrgAM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) 743045bc899bSmrgAM_MISSING_PROG(AUTOHEADER, autoheader) 743145bc899bSmrgAM_MISSING_PROG(MAKEINFO, makeinfo) 743245bc899bSmrgAM_PROG_INSTALL_SH 743345bc899bSmrgAM_PROG_INSTALL_STRIP 743445bc899bSmrgAC_REQUIRE([AM_PROG_MKDIR_P])dnl 743545bc899bSmrg# We need awk for the "check" target. The system "awk" is bad on 743645bc899bSmrg# some platforms. 743745bc899bSmrgAC_REQUIRE([AC_PROG_AWK])dnl 743845bc899bSmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl 743945bc899bSmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl 744045bc899bSmrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 744145bc899bSmrg [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 744245bc899bSmrg [_AM_PROG_TAR([v7])])]) 744345bc899bSmrg_AM_IF_OPTION([no-dependencies],, 744445bc899bSmrg[AC_PROVIDE_IFELSE([AC_PROG_CC], 744545bc899bSmrg [_AM_DEPENDENCIES(CC)], 744645bc899bSmrg [define([AC_PROG_CC], 744745bc899bSmrg defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl 744845bc899bSmrgAC_PROVIDE_IFELSE([AC_PROG_CXX], 744945bc899bSmrg [_AM_DEPENDENCIES(CXX)], 745045bc899bSmrg [define([AC_PROG_CXX], 745145bc899bSmrg defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl 745245bc899bSmrg]) 745345bc899bSmrg]) 745445bc899bSmrg 745545bc899bSmrg 745645bc899bSmrg# When config.status generates a header, we must update the stamp-h file. 745745bc899bSmrg# This file resides in the same directory as the config header 745845bc899bSmrg# that is generated. The stamp files are numbered to have different names. 745945bc899bSmrg 746045bc899bSmrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 746145bc899bSmrg# loop where config.status creates the headers, so we can generate 746245bc899bSmrg# our stamp files there. 746345bc899bSmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 746445bc899bSmrg[# Compute $1's index in $config_headers. 746545bc899bSmrg_am_stamp_count=1 746645bc899bSmrgfor _am_header in $config_headers :; do 746745bc899bSmrg case $_am_header in 746845bc899bSmrg $1 | $1:* ) 746945bc899bSmrg break ;; 747045bc899bSmrg * ) 747145bc899bSmrg _am_stamp_count=`expr $_am_stamp_count + 1` ;; 747245bc899bSmrg esac 747345bc899bSmrgdone 747445bc899bSmrgecho "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) 747545bc899bSmrg 747645bc899bSmrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 747745bc899bSmrg# 747845bc899bSmrg# This file is free software; the Free Software Foundation 747945bc899bSmrg# gives unlimited permission to copy and/or distribute it, 748045bc899bSmrg# with or without modifications, as long as this notice is preserved. 748145bc899bSmrg 748245bc899bSmrg# AM_PROG_INSTALL_SH 748345bc899bSmrg# ------------------ 748445bc899bSmrg# Define $install_sh. 748545bc899bSmrgAC_DEFUN([AM_PROG_INSTALL_SH], 748645bc899bSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 748745bc899bSmrginstall_sh=${install_sh-"$am_aux_dir/install-sh"} 748845bc899bSmrgAC_SUBST(install_sh)]) 748945bc899bSmrg 749045bc899bSmrg# Copyright (C) 2003, 2005 Free Software Foundation, Inc. 749145bc899bSmrg# 749245bc899bSmrg# This file is free software; the Free Software Foundation 749345bc899bSmrg# gives unlimited permission to copy and/or distribute it, 749445bc899bSmrg# with or without modifications, as long as this notice is preserved. 749545bc899bSmrg 749645bc899bSmrg# serial 2 749745bc899bSmrg 749845bc899bSmrg# Check whether the underlying file-system supports filenames 749945bc899bSmrg# with a leading dot. For instance MS-DOS doesn't. 750045bc899bSmrgAC_DEFUN([AM_SET_LEADING_DOT], 750145bc899bSmrg[rm -rf .tst 2>/dev/null 750245bc899bSmrgmkdir .tst 2>/dev/null 750345bc899bSmrgif test -d .tst; then 750445bc899bSmrg am__leading_dot=. 750545bc899bSmrgelse 750645bc899bSmrg am__leading_dot=_ 750745bc899bSmrgfi 750845bc899bSmrgrmdir .tst 2>/dev/null 750945bc899bSmrgAC_SUBST([am__leading_dot])]) 751045bc899bSmrg 751145bc899bSmrg# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- 751245bc899bSmrg# From Jim Meyering 751345bc899bSmrg 751445bc899bSmrg# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005 751545bc899bSmrg# Free Software Foundation, Inc. 751645bc899bSmrg# 751745bc899bSmrg# This file is free software; the Free Software Foundation 751845bc899bSmrg# gives unlimited permission to copy and/or distribute it, 751945bc899bSmrg# with or without modifications, as long as this notice is preserved. 752045bc899bSmrg 752145bc899bSmrg# serial 4 752245bc899bSmrg 752345bc899bSmrgAC_DEFUN([AM_MAINTAINER_MODE], 752445bc899bSmrg[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) 752545bc899bSmrg dnl maintainer-mode is disabled by default 752645bc899bSmrg AC_ARG_ENABLE(maintainer-mode, 752745bc899bSmrg[ --enable-maintainer-mode enable make rules and dependencies not useful 752845bc899bSmrg (and sometimes confusing) to the casual installer], 752945bc899bSmrg USE_MAINTAINER_MODE=$enableval, 753045bc899bSmrg USE_MAINTAINER_MODE=no) 753145bc899bSmrg AC_MSG_RESULT([$USE_MAINTAINER_MODE]) 753245bc899bSmrg AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes]) 753345bc899bSmrg MAINT=$MAINTAINER_MODE_TRUE 753445bc899bSmrg AC_SUBST(MAINT)dnl 753545bc899bSmrg] 753645bc899bSmrg) 753745bc899bSmrg 753845bc899bSmrgAU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) 753945bc899bSmrg 754045bc899bSmrg# Check to see how 'make' treats includes. -*- Autoconf -*- 754145bc899bSmrg 754245bc899bSmrg# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. 754345bc899bSmrg# 754445bc899bSmrg# This file is free software; the Free Software Foundation 754545bc899bSmrg# gives unlimited permission to copy and/or distribute it, 754645bc899bSmrg# with or without modifications, as long as this notice is preserved. 754745bc899bSmrg 754845bc899bSmrg# serial 3 754945bc899bSmrg 755045bc899bSmrg# AM_MAKE_INCLUDE() 755145bc899bSmrg# ----------------- 755245bc899bSmrg# Check to see how make treats includes. 755345bc899bSmrgAC_DEFUN([AM_MAKE_INCLUDE], 755445bc899bSmrg[am_make=${MAKE-make} 755545bc899bSmrgcat > confinc << 'END' 755645bc899bSmrgam__doit: 755745bc899bSmrg @echo done 755845bc899bSmrg.PHONY: am__doit 755945bc899bSmrgEND 756045bc899bSmrg# If we don't find an include directive, just comment out the code. 756145bc899bSmrgAC_MSG_CHECKING([for style of include used by $am_make]) 756245bc899bSmrgam__include="#" 756345bc899bSmrgam__quote= 756445bc899bSmrg_am_result=none 756545bc899bSmrg# First try GNU make style include. 756645bc899bSmrgecho "include confinc" > confmf 756745bc899bSmrg# We grep out `Entering directory' and `Leaving directory' 756845bc899bSmrg# messages which can occur if `w' ends up in MAKEFLAGS. 756945bc899bSmrg# In particular we don't look at `^make:' because GNU make might 757045bc899bSmrg# be invoked under some other name (usually "gmake"), in which 757145bc899bSmrg# case it prints its new name instead of `make'. 757245bc899bSmrgif test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then 757345bc899bSmrg am__include=include 757445bc899bSmrg am__quote= 757545bc899bSmrg _am_result=GNU 757645bc899bSmrgfi 757745bc899bSmrg# Now try BSD make style include. 757845bc899bSmrgif test "$am__include" = "#"; then 757945bc899bSmrg echo '.include "confinc"' > confmf 758045bc899bSmrg if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then 758145bc899bSmrg am__include=.include 758245bc899bSmrg am__quote="\"" 758345bc899bSmrg _am_result=BSD 758445bc899bSmrg fi 758545bc899bSmrgfi 758645bc899bSmrgAC_SUBST([am__include]) 758745bc899bSmrgAC_SUBST([am__quote]) 758845bc899bSmrgAC_MSG_RESULT([$_am_result]) 758945bc899bSmrgrm -f confinc confmf 759045bc899bSmrg]) 759145bc899bSmrg 759245bc899bSmrg# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 759345bc899bSmrg 759445bc899bSmrg# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005 759545bc899bSmrg# Free Software Foundation, Inc. 759645bc899bSmrg# 759745bc899bSmrg# This file is free software; the Free Software Foundation 759845bc899bSmrg# gives unlimited permission to copy and/or distribute it, 759945bc899bSmrg# with or without modifications, as long as this notice is preserved. 760045bc899bSmrg 760145bc899bSmrg# serial 4 760245bc899bSmrg 760345bc899bSmrg# AM_MISSING_PROG(NAME, PROGRAM) 760445bc899bSmrg# ------------------------------ 760545bc899bSmrgAC_DEFUN([AM_MISSING_PROG], 760645bc899bSmrg[AC_REQUIRE([AM_MISSING_HAS_RUN]) 760745bc899bSmrg$1=${$1-"${am_missing_run}$2"} 760845bc899bSmrgAC_SUBST($1)]) 760945bc899bSmrg 761045bc899bSmrg 761145bc899bSmrg# AM_MISSING_HAS_RUN 761245bc899bSmrg# ------------------ 761345bc899bSmrg# Define MISSING if not defined so far and test if it supports --run. 761445bc899bSmrg# If it does, set am_missing_run to use it, otherwise, to nothing. 761545bc899bSmrgAC_DEFUN([AM_MISSING_HAS_RUN], 761645bc899bSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 761745bc899bSmrgtest x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" 761845bc899bSmrg# Use eval to expand $SHELL 761945bc899bSmrgif eval "$MISSING --run true"; then 762045bc899bSmrg am_missing_run="$MISSING --run " 762145bc899bSmrgelse 762245bc899bSmrg am_missing_run= 762345bc899bSmrg AC_MSG_WARN([`missing' script is too old or missing]) 762445bc899bSmrgfi 762545bc899bSmrg]) 762645bc899bSmrg 762745bc899bSmrg# Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc. 762845bc899bSmrg# 762945bc899bSmrg# This file is free software; the Free Software Foundation 763045bc899bSmrg# gives unlimited permission to copy and/or distribute it, 763145bc899bSmrg# with or without modifications, as long as this notice is preserved. 763245bc899bSmrg 763345bc899bSmrg# AM_PROG_MKDIR_P 763445bc899bSmrg# --------------- 763545bc899bSmrg# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise. 763645bc899bSmrg# 763745bc899bSmrg# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories 763845bc899bSmrg# created by `make install' are always world readable, even if the 763945bc899bSmrg# installer happens to have an overly restrictive umask (e.g. 077). 764045bc899bSmrg# This was a mistake. There are at least two reasons why we must not 764145bc899bSmrg# use `-m 0755': 764245bc899bSmrg# - it causes special bits like SGID to be ignored, 764345bc899bSmrg# - it may be too restrictive (some setups expect 775 directories). 764445bc899bSmrg# 764545bc899bSmrg# Do not use -m 0755 and let people choose whatever they expect by 764645bc899bSmrg# setting umask. 764745bc899bSmrg# 764845bc899bSmrg# We cannot accept any implementation of `mkdir' that recognizes `-p'. 764945bc899bSmrg# Some implementations (such as Solaris 8's) are not thread-safe: if a 765045bc899bSmrg# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c' 765145bc899bSmrg# concurrently, both version can detect that a/ is missing, but only 765245bc899bSmrg# one can create it and the other will error out. Consequently we 765345bc899bSmrg# restrict ourselves to GNU make (using the --version option ensures 765445bc899bSmrg# this.) 765545bc899bSmrgAC_DEFUN([AM_PROG_MKDIR_P], 765645bc899bSmrg[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then 765745bc899bSmrg # We used to keeping the `.' as first argument, in order to 765845bc899bSmrg # allow $(mkdir_p) to be used without argument. As in 765945bc899bSmrg # $(mkdir_p) $(somedir) 766045bc899bSmrg # where $(somedir) is conditionally defined. However this is wrong 766145bc899bSmrg # for two reasons: 766245bc899bSmrg # 1. if the package is installed by a user who cannot write `.' 766345bc899bSmrg # make install will fail, 766445bc899bSmrg # 2. the above comment should most certainly read 766545bc899bSmrg # $(mkdir_p) $(DESTDIR)$(somedir) 766645bc899bSmrg # so it does not work when $(somedir) is undefined and 766745bc899bSmrg # $(DESTDIR) is not. 766845bc899bSmrg # To support the latter case, we have to write 766945bc899bSmrg # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir), 767045bc899bSmrg # so the `.' trick is pointless. 767145bc899bSmrg mkdir_p='mkdir -p --' 767245bc899bSmrgelse 767345bc899bSmrg # On NextStep and OpenStep, the `mkdir' command does not 767445bc899bSmrg # recognize any option. It will interpret all options as 767545bc899bSmrg # directories to create, and then abort because `.' already 767645bc899bSmrg # exists. 767745bc899bSmrg for d in ./-p ./--version; 767845bc899bSmrg do 767945bc899bSmrg test -d $d && rmdir $d 768045bc899bSmrg done 768145bc899bSmrg # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists. 768245bc899bSmrg if test -f "$ac_aux_dir/mkinstalldirs"; then 768345bc899bSmrg mkdir_p='$(mkinstalldirs)' 768445bc899bSmrg else 768545bc899bSmrg mkdir_p='$(install_sh) -d' 768645bc899bSmrg fi 768745bc899bSmrgfi 768845bc899bSmrgAC_SUBST([mkdir_p])]) 768945bc899bSmrg 769045bc899bSmrg# Helper functions for option handling. -*- Autoconf -*- 769145bc899bSmrg 769245bc899bSmrg# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. 769345bc899bSmrg# 769445bc899bSmrg# This file is free software; the Free Software Foundation 769545bc899bSmrg# gives unlimited permission to copy and/or distribute it, 769645bc899bSmrg# with or without modifications, as long as this notice is preserved. 769745bc899bSmrg 769845bc899bSmrg# serial 3 769945bc899bSmrg 770045bc899bSmrg# _AM_MANGLE_OPTION(NAME) 770145bc899bSmrg# ----------------------- 770245bc899bSmrgAC_DEFUN([_AM_MANGLE_OPTION], 770345bc899bSmrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 770445bc899bSmrg 770545bc899bSmrg# _AM_SET_OPTION(NAME) 770645bc899bSmrg# ------------------------------ 770745bc899bSmrg# Set option NAME. Presently that only means defining a flag for this option. 770845bc899bSmrgAC_DEFUN([_AM_SET_OPTION], 770945bc899bSmrg[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) 771045bc899bSmrg 771145bc899bSmrg# _AM_SET_OPTIONS(OPTIONS) 771245bc899bSmrg# ---------------------------------- 771345bc899bSmrg# OPTIONS is a space-separated list of Automake options. 771445bc899bSmrgAC_DEFUN([_AM_SET_OPTIONS], 771545bc899bSmrg[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 771645bc899bSmrg 771745bc899bSmrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 771845bc899bSmrg# ------------------------------------------- 771945bc899bSmrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 772045bc899bSmrgAC_DEFUN([_AM_IF_OPTION], 772145bc899bSmrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 772245bc899bSmrg 772345bc899bSmrg# Check to make sure that the build environment is sane. -*- Autoconf -*- 772445bc899bSmrg 772545bc899bSmrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 772645bc899bSmrg# Free Software Foundation, Inc. 772745bc899bSmrg# 772845bc899bSmrg# This file is free software; the Free Software Foundation 772945bc899bSmrg# gives unlimited permission to copy and/or distribute it, 773045bc899bSmrg# with or without modifications, as long as this notice is preserved. 773145bc899bSmrg 773245bc899bSmrg# serial 4 773345bc899bSmrg 773445bc899bSmrg# AM_SANITY_CHECK 773545bc899bSmrg# --------------- 773645bc899bSmrgAC_DEFUN([AM_SANITY_CHECK], 773745bc899bSmrg[AC_MSG_CHECKING([whether build environment is sane]) 773845bc899bSmrg# Just in case 773945bc899bSmrgsleep 1 774045bc899bSmrgecho timestamp > conftest.file 774145bc899bSmrg# Do `set' in a subshell so we don't clobber the current shell's 774245bc899bSmrg# arguments. Must try -L first in case configure is actually a 774345bc899bSmrg# symlink; some systems play weird games with the mod time of symlinks 774445bc899bSmrg# (eg FreeBSD returns the mod time of the symlink's containing 774545bc899bSmrg# directory). 774645bc899bSmrgif ( 774745bc899bSmrg set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` 774845bc899bSmrg if test "$[*]" = "X"; then 774945bc899bSmrg # -L didn't work. 775045bc899bSmrg set X `ls -t $srcdir/configure conftest.file` 775145bc899bSmrg fi 775245bc899bSmrg rm -f conftest.file 775345bc899bSmrg if test "$[*]" != "X $srcdir/configure conftest.file" \ 775445bc899bSmrg && test "$[*]" != "X conftest.file $srcdir/configure"; then 775545bc899bSmrg 775645bc899bSmrg # If neither matched, then we have a broken ls. This can happen 775745bc899bSmrg # if, for instance, CONFIG_SHELL is bash and it inherits a 775845bc899bSmrg # broken ls alias from the environment. This has actually 775945bc899bSmrg # happened. Such a system could not be considered "sane". 776045bc899bSmrg AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 776145bc899bSmrgalias in your environment]) 776245bc899bSmrg fi 776345bc899bSmrg 776445bc899bSmrg test "$[2]" = conftest.file 776545bc899bSmrg ) 776645bc899bSmrgthen 776745bc899bSmrg # Ok. 776845bc899bSmrg : 776945bc899bSmrgelse 777045bc899bSmrg AC_MSG_ERROR([newly created file is older than distributed files! 777145bc899bSmrgCheck your system clock]) 777245bc899bSmrgfi 777345bc899bSmrgAC_MSG_RESULT(yes)]) 777445bc899bSmrg 777545bc899bSmrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 777645bc899bSmrg# 777745bc899bSmrg# This file is free software; the Free Software Foundation 777845bc899bSmrg# gives unlimited permission to copy and/or distribute it, 777945bc899bSmrg# with or without modifications, as long as this notice is preserved. 778045bc899bSmrg 778145bc899bSmrg# AM_PROG_INSTALL_STRIP 778245bc899bSmrg# --------------------- 778345bc899bSmrg# One issue with vendor `install' (even GNU) is that you can't 778445bc899bSmrg# specify the program used to strip binaries. This is especially 778545bc899bSmrg# annoying in cross-compiling environments, where the build's strip 778645bc899bSmrg# is unlikely to handle the host's binaries. 778745bc899bSmrg# Fortunately install-sh will honor a STRIPPROG variable, so we 778845bc899bSmrg# always use install-sh in `make install-strip', and initialize 778945bc899bSmrg# STRIPPROG with the value of the STRIP variable (set by the user). 779045bc899bSmrgAC_DEFUN([AM_PROG_INSTALL_STRIP], 779145bc899bSmrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 779245bc899bSmrg# Installed binaries are usually stripped using `strip' when the user 779345bc899bSmrg# run `make install-strip'. However `strip' might not be the right 779445bc899bSmrg# tool to use in cross-compilation environments, therefore Automake 779545bc899bSmrg# will honor the `STRIP' environment variable to overrule this program. 779645bc899bSmrgdnl Don't test for $cross_compiling = yes, because it might be `maybe'. 779745bc899bSmrgif test "$cross_compiling" != no; then 779845bc899bSmrg AC_CHECK_TOOL([STRIP], [strip], :) 779945bc899bSmrgfi 780045bc899bSmrgINSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" 780145bc899bSmrgAC_SUBST([INSTALL_STRIP_PROGRAM])]) 780245bc899bSmrg 780345bc899bSmrg# Check how to create a tarball. -*- Autoconf -*- 780445bc899bSmrg 780545bc899bSmrg# Copyright (C) 2004, 2005 Free Software Foundation, Inc. 780645bc899bSmrg# 780745bc899bSmrg# This file is free software; the Free Software Foundation 780845bc899bSmrg# gives unlimited permission to copy and/or distribute it, 780945bc899bSmrg# with or without modifications, as long as this notice is preserved. 781045bc899bSmrg 781145bc899bSmrg# serial 2 781245bc899bSmrg 781345bc899bSmrg# _AM_PROG_TAR(FORMAT) 781445bc899bSmrg# -------------------- 781545bc899bSmrg# Check how to create a tarball in format FORMAT. 781645bc899bSmrg# FORMAT should be one of `v7', `ustar', or `pax'. 781745bc899bSmrg# 781845bc899bSmrg# Substitute a variable $(am__tar) that is a command 781945bc899bSmrg# writing to stdout a FORMAT-tarball containing the directory 782045bc899bSmrg# $tardir. 782145bc899bSmrg# tardir=directory && $(am__tar) > result.tar 782245bc899bSmrg# 782345bc899bSmrg# Substitute a variable $(am__untar) that extract such 782445bc899bSmrg# a tarball read from stdin. 782545bc899bSmrg# $(am__untar) < result.tar 782645bc899bSmrgAC_DEFUN([_AM_PROG_TAR], 782745bc899bSmrg[# Always define AMTAR for backward compatibility. 782845bc899bSmrgAM_MISSING_PROG([AMTAR], [tar]) 782945bc899bSmrgm4_if([$1], [v7], 783045bc899bSmrg [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], 783145bc899bSmrg [m4_case([$1], [ustar],, [pax],, 783245bc899bSmrg [m4_fatal([Unknown tar format])]) 783345bc899bSmrgAC_MSG_CHECKING([how to create a $1 tar archive]) 783445bc899bSmrg# Loop over all known methods to create a tar archive until one works. 783545bc899bSmrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 783645bc899bSmrg_am_tools=${am_cv_prog_tar_$1-$_am_tools} 783745bc899bSmrg# Do not fold the above two line into one, because Tru64 sh and 783845bc899bSmrg# Solaris sh will not grok spaces in the rhs of `-'. 783945bc899bSmrgfor _am_tool in $_am_tools 784045bc899bSmrgdo 784145bc899bSmrg case $_am_tool in 784245bc899bSmrg gnutar) 784345bc899bSmrg for _am_tar in tar gnutar gtar; 784445bc899bSmrg do 784545bc899bSmrg AM_RUN_LOG([$_am_tar --version]) && break 784645bc899bSmrg done 784745bc899bSmrg am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 784845bc899bSmrg am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 784945bc899bSmrg am__untar="$_am_tar -xf -" 785045bc899bSmrg ;; 785145bc899bSmrg plaintar) 785245bc899bSmrg # Must skip GNU tar: if it does not support --format= it doesn't create 785345bc899bSmrg # ustar tarball either. 785445bc899bSmrg (tar --version) >/dev/null 2>&1 && continue 785545bc899bSmrg am__tar='tar chf - "$$tardir"' 785645bc899bSmrg am__tar_='tar chf - "$tardir"' 785745bc899bSmrg am__untar='tar xf -' 785845bc899bSmrg ;; 785945bc899bSmrg pax) 786045bc899bSmrg am__tar='pax -L -x $1 -w "$$tardir"' 786145bc899bSmrg am__tar_='pax -L -x $1 -w "$tardir"' 786245bc899bSmrg am__untar='pax -r' 786345bc899bSmrg ;; 786445bc899bSmrg cpio) 786545bc899bSmrg am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 786645bc899bSmrg am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 786745bc899bSmrg am__untar='cpio -i -H $1 -d' 786845bc899bSmrg ;; 786945bc899bSmrg none) 787045bc899bSmrg am__tar=false 787145bc899bSmrg am__tar_=false 787245bc899bSmrg am__untar=false 787345bc899bSmrg ;; 787445bc899bSmrg esac 787545bc899bSmrg 787645bc899bSmrg # If the value was cached, stop now. We just wanted to have am__tar 787745bc899bSmrg # and am__untar set. 787845bc899bSmrg test -n "${am_cv_prog_tar_$1}" && break 787945bc899bSmrg 788045bc899bSmrg # tar/untar a dummy directory, and stop if the command works 788145bc899bSmrg rm -rf conftest.dir 788245bc899bSmrg mkdir conftest.dir 788345bc899bSmrg echo GrepMe > conftest.dir/file 788445bc899bSmrg AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 788545bc899bSmrg rm -rf conftest.dir 788645bc899bSmrg if test -s conftest.tar; then 788745bc899bSmrg AM_RUN_LOG([$am__untar <conftest.tar]) 788845bc899bSmrg grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 788945bc899bSmrg fi 789045bc899bSmrgdone 789145bc899bSmrgrm -rf conftest.dir 789245bc899bSmrg 789345bc899bSmrgAC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 789445bc899bSmrgAC_MSG_RESULT([$am_cv_prog_tar_$1])]) 789545bc899bSmrgAC_SUBST([am__tar]) 789645bc899bSmrgAC_SUBST([am__untar]) 789745bc899bSmrg]) # _AM_PROG_TAR 789845bc899bSmrg 7899