aclocal.m4 revision 15fb4814
115fb4814Smrg# generated automatically by aclocal 1.9.6 -*- Autoconf -*- 215fb4814Smrg 315fb4814Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 415fb4814Smrg# 2005 Free Software Foundation, Inc. 515fb4814Smrg# This file is free software; the Free Software Foundation 615fb4814Smrg# gives unlimited permission to copy and/or distribute it, 715fb4814Smrg# with or without modifications, as long as this notice is preserved. 815fb4814Smrg 915fb4814Smrg# This program is distributed in the hope that it will be useful, 1015fb4814Smrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 1115fb4814Smrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 1215fb4814Smrg# PARTICULAR PURPOSE. 1315fb4814Smrg 1415fb4814Smrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 1515fb4814Smrg 1615fb4814Smrg# serial 48 AC_PROG_LIBTOOL 1715fb4814Smrg 1815fb4814Smrg 1915fb4814Smrg# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED) 2015fb4814Smrg# ----------------------------------------------------------- 2115fb4814Smrg# If this macro is not defined by Autoconf, define it here. 2215fb4814Smrgm4_ifdef([AC_PROVIDE_IFELSE], 2315fb4814Smrg [], 2415fb4814Smrg [m4_define([AC_PROVIDE_IFELSE], 2515fb4814Smrg [m4_ifdef([AC_PROVIDE_$1], 2615fb4814Smrg [$2], [$3])])]) 2715fb4814Smrg 2815fb4814Smrg 2915fb4814Smrg# AC_PROG_LIBTOOL 3015fb4814Smrg# --------------- 3115fb4814SmrgAC_DEFUN([AC_PROG_LIBTOOL], 3215fb4814Smrg[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl 3315fb4814Smrgdnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX 3415fb4814Smrgdnl immediately, otherwise, hook it in at the end of AC_PROG_CXX. 3515fb4814Smrg AC_PROVIDE_IFELSE([AC_PROG_CXX], 3615fb4814Smrg [AC_LIBTOOL_CXX], 3715fb4814Smrg [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX 3815fb4814Smrg ])]) 3915fb4814Smrgdnl And a similar setup for Fortran 77 support 4015fb4814Smrg AC_PROVIDE_IFELSE([AC_PROG_F77], 4115fb4814Smrg [AC_LIBTOOL_F77], 4215fb4814Smrg [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77 4315fb4814Smrg])]) 4415fb4814Smrg 4515fb4814Smrgdnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly. 4615fb4814Smrgdnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run 4715fb4814Smrgdnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both. 4815fb4814Smrg AC_PROVIDE_IFELSE([AC_PROG_GCJ], 4915fb4814Smrg [AC_LIBTOOL_GCJ], 5015fb4814Smrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 5115fb4814Smrg [AC_LIBTOOL_GCJ], 5215fb4814Smrg [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ], 5315fb4814Smrg [AC_LIBTOOL_GCJ], 5415fb4814Smrg [ifdef([AC_PROG_GCJ], 5515fb4814Smrg [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])]) 5615fb4814Smrg ifdef([A][M_PROG_GCJ], 5715fb4814Smrg [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])]) 5815fb4814Smrg ifdef([LT_AC_PROG_GCJ], 5915fb4814Smrg [define([LT_AC_PROG_GCJ], 6015fb4814Smrg defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])]) 6115fb4814Smrg])])# AC_PROG_LIBTOOL 6215fb4814Smrg 6315fb4814Smrg 6415fb4814Smrg# _AC_PROG_LIBTOOL 6515fb4814Smrg# ---------------- 6615fb4814SmrgAC_DEFUN([_AC_PROG_LIBTOOL], 6715fb4814Smrg[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl 6815fb4814SmrgAC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl 6915fb4814SmrgAC_BEFORE([$0],[AC_LIBTOOL_F77])dnl 7015fb4814SmrgAC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl 7115fb4814Smrg 7215fb4814Smrg# This can be used to rebuild libtool when needed 7315fb4814SmrgLIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" 7415fb4814Smrg 7515fb4814Smrg# Always use our own libtool. 7615fb4814SmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool' 7715fb4814SmrgAC_SUBST(LIBTOOL)dnl 7815fb4814Smrg 7915fb4814Smrg# Prevent multiple expansion 8015fb4814Smrgdefine([AC_PROG_LIBTOOL], []) 8115fb4814Smrg])# _AC_PROG_LIBTOOL 8215fb4814Smrg 8315fb4814Smrg 8415fb4814Smrg# AC_LIBTOOL_SETUP 8515fb4814Smrg# ---------------- 8615fb4814SmrgAC_DEFUN([AC_LIBTOOL_SETUP], 8715fb4814Smrg[AC_PREREQ(2.50)dnl 8815fb4814SmrgAC_REQUIRE([AC_ENABLE_SHARED])dnl 8915fb4814SmrgAC_REQUIRE([AC_ENABLE_STATIC])dnl 9015fb4814SmrgAC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl 9115fb4814SmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 9215fb4814SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 9315fb4814SmrgAC_REQUIRE([AC_PROG_CC])dnl 9415fb4814SmrgAC_REQUIRE([AC_PROG_LD])dnl 9515fb4814SmrgAC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl 9615fb4814SmrgAC_REQUIRE([AC_PROG_NM])dnl 9715fb4814Smrg 9815fb4814SmrgAC_REQUIRE([AC_PROG_LN_S])dnl 9915fb4814SmrgAC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl 10015fb4814Smrg# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! 10115fb4814SmrgAC_REQUIRE([AC_OBJEXT])dnl 10215fb4814SmrgAC_REQUIRE([AC_EXEEXT])dnl 10315fb4814Smrgdnl 10415fb4814Smrg 10515fb4814SmrgAC_LIBTOOL_SYS_MAX_CMD_LEN 10615fb4814SmrgAC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE 10715fb4814SmrgAC_LIBTOOL_OBJDIR 10815fb4814Smrg 10915fb4814SmrgAC_REQUIRE([_LT_AC_SYS_COMPILER])dnl 11015fb4814Smrg_LT_AC_PROG_ECHO_BACKSLASH 11115fb4814Smrg 11215fb4814Smrgcase $host_os in 11315fb4814Smrgaix3*) 11415fb4814Smrg # AIX sometimes has problems with the GCC collect2 program. For some 11515fb4814Smrg # reason, if we set the COLLECT_NAMES environment variable, the problems 11615fb4814Smrg # vanish in a puff of smoke. 11715fb4814Smrg if test "X${COLLECT_NAMES+set}" != Xset; then 11815fb4814Smrg COLLECT_NAMES= 11915fb4814Smrg export COLLECT_NAMES 12015fb4814Smrg fi 12115fb4814Smrg ;; 12215fb4814Smrgesac 12315fb4814Smrg 12415fb4814Smrg# Sed substitution that helps us do robust quoting. It backslashifies 12515fb4814Smrg# metacharacters that are still active within double-quoted strings. 12615fb4814SmrgXsed='sed -e 1s/^X//' 12715fb4814Smrg[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'] 12815fb4814Smrg 12915fb4814Smrg# Same as above, but do not quote variable references. 13015fb4814Smrg[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'] 13115fb4814Smrg 13215fb4814Smrg# Sed substitution to delay expansion of an escaped shell variable in a 13315fb4814Smrg# double_quote_subst'ed string. 13415fb4814Smrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 13515fb4814Smrg 13615fb4814Smrg# Sed substitution to avoid accidental globbing in evaled expressions 13715fb4814Smrgno_glob_subst='s/\*/\\\*/g' 13815fb4814Smrg 13915fb4814Smrg# Constants: 14015fb4814Smrgrm="rm -f" 14115fb4814Smrg 14215fb4814Smrg# Global variables: 14315fb4814Smrgdefault_ofile=libtool 14415fb4814Smrgcan_build_shared=yes 14515fb4814Smrg 14615fb4814Smrg# All known linkers require a `.a' archive for static linking (except MSVC, 14715fb4814Smrg# which needs '.lib'). 14815fb4814Smrglibext=a 14915fb4814Smrgltmain="$ac_aux_dir/ltmain.sh" 15015fb4814Smrgofile="$default_ofile" 15115fb4814Smrgwith_gnu_ld="$lt_cv_prog_gnu_ld" 15215fb4814Smrg 15315fb4814SmrgAC_CHECK_TOOL(AR, ar, false) 15415fb4814SmrgAC_CHECK_TOOL(RANLIB, ranlib, :) 15515fb4814SmrgAC_CHECK_TOOL(STRIP, strip, :) 15615fb4814Smrg 15715fb4814Smrgold_CC="$CC" 15815fb4814Smrgold_CFLAGS="$CFLAGS" 15915fb4814Smrg 16015fb4814Smrg# Set sane defaults for various variables 16115fb4814Smrgtest -z "$AR" && AR=ar 16215fb4814Smrgtest -z "$AR_FLAGS" && AR_FLAGS=cru 16315fb4814Smrgtest -z "$AS" && AS=as 16415fb4814Smrgtest -z "$CC" && CC=cc 16515fb4814Smrgtest -z "$LTCC" && LTCC=$CC 16615fb4814Smrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 16715fb4814Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 16815fb4814Smrgtest -z "$LD" && LD=ld 16915fb4814Smrgtest -z "$LN_S" && LN_S="ln -s" 17015fb4814Smrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file 17115fb4814Smrgtest -z "$NM" && NM=nm 17215fb4814Smrgtest -z "$SED" && SED=sed 17315fb4814Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump 17415fb4814Smrgtest -z "$RANLIB" && RANLIB=: 17515fb4814Smrgtest -z "$STRIP" && STRIP=: 17615fb4814Smrgtest -z "$ac_objext" && ac_objext=o 17715fb4814Smrg 17815fb4814Smrg# Determine commands to create old-style static archives. 17915fb4814Smrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs' 18015fb4814Smrgold_postinstall_cmds='chmod 644 $oldlib' 18115fb4814Smrgold_postuninstall_cmds= 18215fb4814Smrg 18315fb4814Smrgif test -n "$RANLIB"; then 18415fb4814Smrg case $host_os in 18515fb4814Smrg openbsd*) 18615fb4814Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" 18715fb4814Smrg ;; 18815fb4814Smrg *) 18915fb4814Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" 19015fb4814Smrg ;; 19115fb4814Smrg esac 19215fb4814Smrg old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" 19315fb4814Smrgfi 19415fb4814Smrg 19515fb4814Smrg_LT_CC_BASENAME([$compiler]) 19615fb4814Smrg 19715fb4814Smrg# Only perform the check for file, if the check method requires it 19815fb4814Smrgcase $deplibs_check_method in 19915fb4814Smrgfile_magic*) 20015fb4814Smrg if test "$file_magic_cmd" = '$MAGIC_CMD'; then 20115fb4814Smrg AC_PATH_MAGIC 20215fb4814Smrg fi 20315fb4814Smrg ;; 20415fb4814Smrgesac 20515fb4814Smrg 20615fb4814SmrgAC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no) 20715fb4814SmrgAC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], 20815fb4814Smrgenable_win32_dll=yes, enable_win32_dll=no) 20915fb4814Smrg 21015fb4814SmrgAC_ARG_ENABLE([libtool-lock], 21115fb4814Smrg [AC_HELP_STRING([--disable-libtool-lock], 21215fb4814Smrg [avoid locking (might break parallel builds)])]) 21315fb4814Smrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes 21415fb4814Smrg 21515fb4814SmrgAC_ARG_WITH([pic], 21615fb4814Smrg [AC_HELP_STRING([--with-pic], 21715fb4814Smrg [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 21815fb4814Smrg [pic_mode="$withval"], 21915fb4814Smrg [pic_mode=default]) 22015fb4814Smrgtest -z "$pic_mode" && pic_mode=default 22115fb4814Smrg 22215fb4814Smrg# Use C for the default configuration in the libtool script 22315fb4814Smrgtagname= 22415fb4814SmrgAC_LIBTOOL_LANG_C_CONFIG 22515fb4814Smrg_LT_AC_TAGCONFIG 22615fb4814Smrg])# AC_LIBTOOL_SETUP 22715fb4814Smrg 22815fb4814Smrg 22915fb4814Smrg# _LT_AC_SYS_COMPILER 23015fb4814Smrg# ------------------- 23115fb4814SmrgAC_DEFUN([_LT_AC_SYS_COMPILER], 23215fb4814Smrg[AC_REQUIRE([AC_PROG_CC])dnl 23315fb4814Smrg 23415fb4814Smrg# If no C compiler was specified, use CC. 23515fb4814SmrgLTCC=${LTCC-"$CC"} 23615fb4814Smrg 23715fb4814Smrg# If no C compiler flags were specified, use CFLAGS. 23815fb4814SmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"} 23915fb4814Smrg 24015fb4814Smrg# Allow CC to be a program name with arguments. 24115fb4814Smrgcompiler=$CC 24215fb4814Smrg])# _LT_AC_SYS_COMPILER 24315fb4814Smrg 24415fb4814Smrg 24515fb4814Smrg# _LT_CC_BASENAME(CC) 24615fb4814Smrg# ------------------- 24715fb4814Smrg# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 24815fb4814SmrgAC_DEFUN([_LT_CC_BASENAME], 24915fb4814Smrg[for cc_temp in $1""; do 25015fb4814Smrg case $cc_temp in 25115fb4814Smrg compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 25215fb4814Smrg distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 25315fb4814Smrg \-*) ;; 25415fb4814Smrg *) break;; 25515fb4814Smrg esac 25615fb4814Smrgdone 25715fb4814Smrgcc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` 25815fb4814Smrg]) 25915fb4814Smrg 26015fb4814Smrg 26115fb4814Smrg# _LT_COMPILER_BOILERPLATE 26215fb4814Smrg# ------------------------ 26315fb4814Smrg# Check for compiler boilerplate output or warnings with 26415fb4814Smrg# the simple compiler test code. 26515fb4814SmrgAC_DEFUN([_LT_COMPILER_BOILERPLATE], 26615fb4814Smrg[ac_outfile=conftest.$ac_objext 26715fb4814Smrgprintf "$lt_simple_compile_test_code" >conftest.$ac_ext 26815fb4814Smrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 26915fb4814Smrg_lt_compiler_boilerplate=`cat conftest.err` 27015fb4814Smrg$rm conftest* 27115fb4814Smrg])# _LT_COMPILER_BOILERPLATE 27215fb4814Smrg 27315fb4814Smrg 27415fb4814Smrg# _LT_LINKER_BOILERPLATE 27515fb4814Smrg# ---------------------- 27615fb4814Smrg# Check for linker boilerplate output or warnings with 27715fb4814Smrg# the simple link test code. 27815fb4814SmrgAC_DEFUN([_LT_LINKER_BOILERPLATE], 27915fb4814Smrg[ac_outfile=conftest.$ac_objext 28015fb4814Smrgprintf "$lt_simple_link_test_code" >conftest.$ac_ext 28115fb4814Smrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 28215fb4814Smrg_lt_linker_boilerplate=`cat conftest.err` 28315fb4814Smrg$rm conftest* 28415fb4814Smrg])# _LT_LINKER_BOILERPLATE 28515fb4814Smrg 28615fb4814Smrg 28715fb4814Smrg# _LT_AC_SYS_LIBPATH_AIX 28815fb4814Smrg# ---------------------- 28915fb4814Smrg# Links a minimal program and checks the executable 29015fb4814Smrg# for the system default hardcoded library path. In most cases, 29115fb4814Smrg# this is /usr/lib:/lib, but when the MPI compilers are used 29215fb4814Smrg# the location of the communication and MPI libs are included too. 29315fb4814Smrg# If we don't find anything, use the default library path according 29415fb4814Smrg# to the aix ld manual. 29515fb4814SmrgAC_DEFUN([_LT_AC_SYS_LIBPATH_AIX], 29615fb4814Smrg[AC_LINK_IFELSE(AC_LANG_PROGRAM,[ 29715fb4814Smrgaix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } 29815fb4814Smrg}'` 29915fb4814Smrg# Check for a 64-bit object if we didn't find anything. 30015fb4814Smrgif 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; } 30115fb4814Smrg}'`; fi],[]) 30215fb4814Smrgif test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi 30315fb4814Smrg])# _LT_AC_SYS_LIBPATH_AIX 30415fb4814Smrg 30515fb4814Smrg 30615fb4814Smrg# _LT_AC_SHELL_INIT(ARG) 30715fb4814Smrg# ---------------------- 30815fb4814SmrgAC_DEFUN([_LT_AC_SHELL_INIT], 30915fb4814Smrg[ifdef([AC_DIVERSION_NOTICE], 31015fb4814Smrg [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], 31115fb4814Smrg [AC_DIVERT_PUSH(NOTICE)]) 31215fb4814Smrg$1 31315fb4814SmrgAC_DIVERT_POP 31415fb4814Smrg])# _LT_AC_SHELL_INIT 31515fb4814Smrg 31615fb4814Smrg 31715fb4814Smrg# _LT_AC_PROG_ECHO_BACKSLASH 31815fb4814Smrg# -------------------------- 31915fb4814Smrg# Add some code to the start of the generated configure script which 32015fb4814Smrg# will find an echo command which doesn't interpret backslashes. 32115fb4814SmrgAC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH], 32215fb4814Smrg[_LT_AC_SHELL_INIT([ 32315fb4814Smrg# Check that we are running under the correct shell. 32415fb4814SmrgSHELL=${CONFIG_SHELL-/bin/sh} 32515fb4814Smrg 32615fb4814Smrgcase X$ECHO in 32715fb4814SmrgX*--fallback-echo) 32815fb4814Smrg # Remove one level of quotation (which was required for Make). 32915fb4814Smrg ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` 33015fb4814Smrg ;; 33115fb4814Smrgesac 33215fb4814Smrg 33315fb4814Smrgecho=${ECHO-echo} 33415fb4814Smrgif test "X[$]1" = X--no-reexec; then 33515fb4814Smrg # Discard the --no-reexec flag, and continue. 33615fb4814Smrg shift 33715fb4814Smrgelif test "X[$]1" = X--fallback-echo; then 33815fb4814Smrg # Avoid inline document here, it may be left over 33915fb4814Smrg : 34015fb4814Smrgelif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then 34115fb4814Smrg # Yippee, $echo works! 34215fb4814Smrg : 34315fb4814Smrgelse 34415fb4814Smrg # Restart under the correct shell. 34515fb4814Smrg exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} 34615fb4814Smrgfi 34715fb4814Smrg 34815fb4814Smrgif test "X[$]1" = X--fallback-echo; then 34915fb4814Smrg # used as fallback echo 35015fb4814Smrg shift 35115fb4814Smrg cat <<EOF 35215fb4814Smrg[$]* 35315fb4814SmrgEOF 35415fb4814Smrg exit 0 35515fb4814Smrgfi 35615fb4814Smrg 35715fb4814Smrg# The HP-UX ksh and POSIX shell print the target directory to stdout 35815fb4814Smrg# if CDPATH is set. 35915fb4814Smrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 36015fb4814Smrg 36115fb4814Smrgif test -z "$ECHO"; then 36215fb4814Smrgif test "X${echo_test_string+set}" != Xset; then 36315fb4814Smrg# find a string as large as possible, as long as the shell can cope with it 36415fb4814Smrg for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do 36515fb4814Smrg # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... 36615fb4814Smrg if (echo_test_string=`eval $cmd`) 2>/dev/null && 36715fb4814Smrg echo_test_string=`eval $cmd` && 36815fb4814Smrg (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null 36915fb4814Smrg then 37015fb4814Smrg break 37115fb4814Smrg fi 37215fb4814Smrg done 37315fb4814Smrgfi 37415fb4814Smrg 37515fb4814Smrgif test "X`($echo '\t') 2>/dev/null`" = 'X\t' && 37615fb4814Smrg echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && 37715fb4814Smrg test "X$echo_testing_string" = "X$echo_test_string"; then 37815fb4814Smrg : 37915fb4814Smrgelse 38015fb4814Smrg # The Solaris, AIX, and Digital Unix default echo programs unquote 38115fb4814Smrg # backslashes. This makes it impossible to quote backslashes using 38215fb4814Smrg # echo "$something" | sed 's/\\/\\\\/g' 38315fb4814Smrg # 38415fb4814Smrg # So, first we look for a working echo in the user's PATH. 38515fb4814Smrg 38615fb4814Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 38715fb4814Smrg for dir in $PATH /usr/ucb; do 38815fb4814Smrg IFS="$lt_save_ifs" 38915fb4814Smrg if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && 39015fb4814Smrg test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && 39115fb4814Smrg echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && 39215fb4814Smrg test "X$echo_testing_string" = "X$echo_test_string"; then 39315fb4814Smrg echo="$dir/echo" 39415fb4814Smrg break 39515fb4814Smrg fi 39615fb4814Smrg done 39715fb4814Smrg IFS="$lt_save_ifs" 39815fb4814Smrg 39915fb4814Smrg if test "X$echo" = Xecho; then 40015fb4814Smrg # We didn't find a better echo, so look for alternatives. 40115fb4814Smrg if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && 40215fb4814Smrg echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && 40315fb4814Smrg test "X$echo_testing_string" = "X$echo_test_string"; then 40415fb4814Smrg # This shell has a builtin print -r that does the trick. 40515fb4814Smrg echo='print -r' 40615fb4814Smrg elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && 40715fb4814Smrg test "X$CONFIG_SHELL" != X/bin/ksh; then 40815fb4814Smrg # If we have ksh, try running configure again with it. 40915fb4814Smrg ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} 41015fb4814Smrg export ORIGINAL_CONFIG_SHELL 41115fb4814Smrg CONFIG_SHELL=/bin/ksh 41215fb4814Smrg export CONFIG_SHELL 41315fb4814Smrg exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} 41415fb4814Smrg else 41515fb4814Smrg # Try using printf. 41615fb4814Smrg echo='printf %s\n' 41715fb4814Smrg if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && 41815fb4814Smrg echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && 41915fb4814Smrg test "X$echo_testing_string" = "X$echo_test_string"; then 42015fb4814Smrg # Cool, printf works 42115fb4814Smrg : 42215fb4814Smrg elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && 42315fb4814Smrg test "X$echo_testing_string" = 'X\t' && 42415fb4814Smrg echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && 42515fb4814Smrg test "X$echo_testing_string" = "X$echo_test_string"; then 42615fb4814Smrg CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL 42715fb4814Smrg export CONFIG_SHELL 42815fb4814Smrg SHELL="$CONFIG_SHELL" 42915fb4814Smrg export SHELL 43015fb4814Smrg echo="$CONFIG_SHELL [$]0 --fallback-echo" 43115fb4814Smrg elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && 43215fb4814Smrg test "X$echo_testing_string" = 'X\t' && 43315fb4814Smrg echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && 43415fb4814Smrg test "X$echo_testing_string" = "X$echo_test_string"; then 43515fb4814Smrg echo="$CONFIG_SHELL [$]0 --fallback-echo" 43615fb4814Smrg else 43715fb4814Smrg # maybe with a smaller string... 43815fb4814Smrg prev=: 43915fb4814Smrg 44015fb4814Smrg for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do 44115fb4814Smrg if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null 44215fb4814Smrg then 44315fb4814Smrg break 44415fb4814Smrg fi 44515fb4814Smrg prev="$cmd" 44615fb4814Smrg done 44715fb4814Smrg 44815fb4814Smrg if test "$prev" != 'sed 50q "[$]0"'; then 44915fb4814Smrg echo_test_string=`eval $prev` 45015fb4814Smrg export echo_test_string 45115fb4814Smrg exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} 45215fb4814Smrg else 45315fb4814Smrg # Oops. We lost completely, so just stick with echo. 45415fb4814Smrg echo=echo 45515fb4814Smrg fi 45615fb4814Smrg fi 45715fb4814Smrg fi 45815fb4814Smrg fi 45915fb4814Smrgfi 46015fb4814Smrgfi 46115fb4814Smrg 46215fb4814Smrg# Copy echo and quote the copy suitably for passing to libtool from 46315fb4814Smrg# the Makefile, instead of quoting the original, which is used later. 46415fb4814SmrgECHO=$echo 46515fb4814Smrgif test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then 46615fb4814Smrg ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" 46715fb4814Smrgfi 46815fb4814Smrg 46915fb4814SmrgAC_SUBST(ECHO) 47015fb4814Smrg])])# _LT_AC_PROG_ECHO_BACKSLASH 47115fb4814Smrg 47215fb4814Smrg 47315fb4814Smrg# _LT_AC_LOCK 47415fb4814Smrg# ----------- 47515fb4814SmrgAC_DEFUN([_LT_AC_LOCK], 47615fb4814Smrg[AC_ARG_ENABLE([libtool-lock], 47715fb4814Smrg [AC_HELP_STRING([--disable-libtool-lock], 47815fb4814Smrg [avoid locking (might break parallel builds)])]) 47915fb4814Smrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes 48015fb4814Smrg 48115fb4814Smrg# Some flags need to be propagated to the compiler or linker for good 48215fb4814Smrg# libtool support. 48315fb4814Smrgcase $host in 48415fb4814Smrgia64-*-hpux*) 48515fb4814Smrg # Find out which ABI we are using. 48615fb4814Smrg echo 'int i;' > conftest.$ac_ext 48715fb4814Smrg if AC_TRY_EVAL(ac_compile); then 48815fb4814Smrg case `/usr/bin/file conftest.$ac_objext` in 48915fb4814Smrg *ELF-32*) 49015fb4814Smrg HPUX_IA64_MODE="32" 49115fb4814Smrg ;; 49215fb4814Smrg *ELF-64*) 49315fb4814Smrg HPUX_IA64_MODE="64" 49415fb4814Smrg ;; 49515fb4814Smrg esac 49615fb4814Smrg fi 49715fb4814Smrg rm -rf conftest* 49815fb4814Smrg ;; 49915fb4814Smrg*-*-irix6*) 50015fb4814Smrg # Find out which ABI we are using. 50115fb4814Smrg echo '[#]line __oline__ "configure"' > conftest.$ac_ext 50215fb4814Smrg if AC_TRY_EVAL(ac_compile); then 50315fb4814Smrg if test "$lt_cv_prog_gnu_ld" = yes; then 50415fb4814Smrg case `/usr/bin/file conftest.$ac_objext` in 50515fb4814Smrg *32-bit*) 50615fb4814Smrg LD="${LD-ld} -melf32bsmip" 50715fb4814Smrg ;; 50815fb4814Smrg *N32*) 50915fb4814Smrg LD="${LD-ld} -melf32bmipn32" 51015fb4814Smrg ;; 51115fb4814Smrg *64-bit*) 51215fb4814Smrg LD="${LD-ld} -melf64bmip" 51315fb4814Smrg ;; 51415fb4814Smrg esac 51515fb4814Smrg else 51615fb4814Smrg case `/usr/bin/file conftest.$ac_objext` in 51715fb4814Smrg *32-bit*) 51815fb4814Smrg LD="${LD-ld} -32" 51915fb4814Smrg ;; 52015fb4814Smrg *N32*) 52115fb4814Smrg LD="${LD-ld} -n32" 52215fb4814Smrg ;; 52315fb4814Smrg *64-bit*) 52415fb4814Smrg LD="${LD-ld} -64" 52515fb4814Smrg ;; 52615fb4814Smrg esac 52715fb4814Smrg fi 52815fb4814Smrg fi 52915fb4814Smrg rm -rf conftest* 53015fb4814Smrg ;; 53115fb4814Smrg 53215fb4814Smrgx86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*) 53315fb4814Smrg # Find out which ABI we are using. 53415fb4814Smrg echo 'int i;' > conftest.$ac_ext 53515fb4814Smrg if AC_TRY_EVAL(ac_compile); then 53615fb4814Smrg case `/usr/bin/file conftest.o` in 53715fb4814Smrg *32-bit*) 53815fb4814Smrg case $host in 53915fb4814Smrg x86_64-*linux*) 54015fb4814Smrg LD="${LD-ld} -m elf_i386" 54115fb4814Smrg ;; 54215fb4814Smrg ppc64-*linux*|powerpc64-*linux*) 54315fb4814Smrg LD="${LD-ld} -m elf32ppclinux" 54415fb4814Smrg ;; 54515fb4814Smrg s390x-*linux*) 54615fb4814Smrg LD="${LD-ld} -m elf_s390" 54715fb4814Smrg ;; 54815fb4814Smrg sparc64-*linux*) 54915fb4814Smrg LD="${LD-ld} -m elf32_sparc" 55015fb4814Smrg ;; 55115fb4814Smrg esac 55215fb4814Smrg ;; 55315fb4814Smrg *64-bit*) 55415fb4814Smrg case $host in 55515fb4814Smrg x86_64-*linux*) 55615fb4814Smrg LD="${LD-ld} -m elf_x86_64" 55715fb4814Smrg ;; 55815fb4814Smrg ppc*-*linux*|powerpc*-*linux*) 55915fb4814Smrg LD="${LD-ld} -m elf64ppc" 56015fb4814Smrg ;; 56115fb4814Smrg s390*-*linux*) 56215fb4814Smrg LD="${LD-ld} -m elf64_s390" 56315fb4814Smrg ;; 56415fb4814Smrg sparc*-*linux*) 56515fb4814Smrg LD="${LD-ld} -m elf64_sparc" 56615fb4814Smrg ;; 56715fb4814Smrg esac 56815fb4814Smrg ;; 56915fb4814Smrg esac 57015fb4814Smrg fi 57115fb4814Smrg rm -rf conftest* 57215fb4814Smrg ;; 57315fb4814Smrg 57415fb4814Smrg*-*-sco3.2v5*) 57515fb4814Smrg # On SCO OpenServer 5, we need -belf to get full-featured binaries. 57615fb4814Smrg SAVE_CFLAGS="$CFLAGS" 57715fb4814Smrg CFLAGS="$CFLAGS -belf" 57815fb4814Smrg AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 57915fb4814Smrg [AC_LANG_PUSH(C) 58015fb4814Smrg AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 58115fb4814Smrg AC_LANG_POP]) 58215fb4814Smrg if test x"$lt_cv_cc_needs_belf" != x"yes"; then 58315fb4814Smrg # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 58415fb4814Smrg CFLAGS="$SAVE_CFLAGS" 58515fb4814Smrg fi 58615fb4814Smrg ;; 58715fb4814Smrgsparc*-*solaris*) 58815fb4814Smrg # Find out which ABI we are using. 58915fb4814Smrg echo 'int i;' > conftest.$ac_ext 59015fb4814Smrg if AC_TRY_EVAL(ac_compile); then 59115fb4814Smrg case `/usr/bin/file conftest.o` in 59215fb4814Smrg *64-bit*) 59315fb4814Smrg case $lt_cv_prog_gnu_ld in 59415fb4814Smrg yes*) LD="${LD-ld} -m elf64_sparc" ;; 59515fb4814Smrg *) LD="${LD-ld} -64" ;; 59615fb4814Smrg esac 59715fb4814Smrg ;; 59815fb4814Smrg esac 59915fb4814Smrg fi 60015fb4814Smrg rm -rf conftest* 60115fb4814Smrg ;; 60215fb4814Smrg 60315fb4814SmrgAC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], 60415fb4814Smrg[*-*-cygwin* | *-*-mingw* | *-*-pw32*) 60515fb4814Smrg AC_CHECK_TOOL(DLLTOOL, dlltool, false) 60615fb4814Smrg AC_CHECK_TOOL(AS, as, false) 60715fb4814Smrg AC_CHECK_TOOL(OBJDUMP, objdump, false) 60815fb4814Smrg ;; 60915fb4814Smrg ]) 61015fb4814Smrgesac 61115fb4814Smrg 61215fb4814Smrgneed_locks="$enable_libtool_lock" 61315fb4814Smrg 61415fb4814Smrg])# _LT_AC_LOCK 61515fb4814Smrg 61615fb4814Smrg 61715fb4814Smrg# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 61815fb4814Smrg# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 61915fb4814Smrg# ---------------------------------------------------------------- 62015fb4814Smrg# Check whether the given compiler option works 62115fb4814SmrgAC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], 62215fb4814Smrg[AC_REQUIRE([LT_AC_PROG_SED]) 62315fb4814SmrgAC_CACHE_CHECK([$1], [$2], 62415fb4814Smrg [$2=no 62515fb4814Smrg ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 62615fb4814Smrg printf "$lt_simple_compile_test_code" > conftest.$ac_ext 62715fb4814Smrg lt_compiler_flag="$3" 62815fb4814Smrg # Insert the option either (1) after the last *FLAGS variable, or 62915fb4814Smrg # (2) before a word containing "conftest.", or (3) at the end. 63015fb4814Smrg # Note that $ac_compile itself does not contain backslashes and begins 63115fb4814Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 63215fb4814Smrg # The option is referenced via a variable to avoid confusing sed. 63315fb4814Smrg lt_compile=`echo "$ac_compile" | $SED \ 63415fb4814Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 63515fb4814Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 63615fb4814Smrg -e 's:$: $lt_compiler_flag:'` 63715fb4814Smrg (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 63815fb4814Smrg (eval "$lt_compile" 2>conftest.err) 63915fb4814Smrg ac_status=$? 64015fb4814Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 64115fb4814Smrg echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 64215fb4814Smrg if (exit $ac_status) && test -s "$ac_outfile"; then 64315fb4814Smrg # The compiler can only warn and ignore the option if not recognized 64415fb4814Smrg # So say no if there are warnings other than the usual output. 64515fb4814Smrg $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp 64615fb4814Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 64715fb4814Smrg if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 64815fb4814Smrg $2=yes 64915fb4814Smrg fi 65015fb4814Smrg fi 65115fb4814Smrg $rm conftest* 65215fb4814Smrg]) 65315fb4814Smrg 65415fb4814Smrgif test x"[$]$2" = xyes; then 65515fb4814Smrg ifelse([$5], , :, [$5]) 65615fb4814Smrgelse 65715fb4814Smrg ifelse([$6], , :, [$6]) 65815fb4814Smrgfi 65915fb4814Smrg])# AC_LIBTOOL_COMPILER_OPTION 66015fb4814Smrg 66115fb4814Smrg 66215fb4814Smrg# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 66315fb4814Smrg# [ACTION-SUCCESS], [ACTION-FAILURE]) 66415fb4814Smrg# ------------------------------------------------------------ 66515fb4814Smrg# Check whether the given compiler option works 66615fb4814SmrgAC_DEFUN([AC_LIBTOOL_LINKER_OPTION], 66715fb4814Smrg[AC_CACHE_CHECK([$1], [$2], 66815fb4814Smrg [$2=no 66915fb4814Smrg save_LDFLAGS="$LDFLAGS" 67015fb4814Smrg LDFLAGS="$LDFLAGS $3" 67115fb4814Smrg printf "$lt_simple_link_test_code" > conftest.$ac_ext 67215fb4814Smrg if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 67315fb4814Smrg # The linker can only warn and ignore the option if not recognized 67415fb4814Smrg # So say no if there are warnings 67515fb4814Smrg if test -s conftest.err; then 67615fb4814Smrg # Append any errors to the config.log. 67715fb4814Smrg cat conftest.err 1>&AS_MESSAGE_LOG_FD 67815fb4814Smrg $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp 67915fb4814Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 68015fb4814Smrg if diff conftest.exp conftest.er2 >/dev/null; then 68115fb4814Smrg $2=yes 68215fb4814Smrg fi 68315fb4814Smrg else 68415fb4814Smrg $2=yes 68515fb4814Smrg fi 68615fb4814Smrg fi 68715fb4814Smrg $rm conftest* 68815fb4814Smrg LDFLAGS="$save_LDFLAGS" 68915fb4814Smrg]) 69015fb4814Smrg 69115fb4814Smrgif test x"[$]$2" = xyes; then 69215fb4814Smrg ifelse([$4], , :, [$4]) 69315fb4814Smrgelse 69415fb4814Smrg ifelse([$5], , :, [$5]) 69515fb4814Smrgfi 69615fb4814Smrg])# AC_LIBTOOL_LINKER_OPTION 69715fb4814Smrg 69815fb4814Smrg 69915fb4814Smrg# AC_LIBTOOL_SYS_MAX_CMD_LEN 70015fb4814Smrg# -------------------------- 70115fb4814SmrgAC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], 70215fb4814Smrg[# find the maximum length of command line arguments 70315fb4814SmrgAC_MSG_CHECKING([the maximum length of command line arguments]) 70415fb4814SmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 70515fb4814Smrg i=0 70615fb4814Smrg teststring="ABCD" 70715fb4814Smrg 70815fb4814Smrg case $build_os in 70915fb4814Smrg msdosdjgpp*) 71015fb4814Smrg # On DJGPP, this test can blow up pretty badly due to problems in libc 71115fb4814Smrg # (any single argument exceeding 2000 bytes causes a buffer overrun 71215fb4814Smrg # during glob expansion). Even if it were fixed, the result of this 71315fb4814Smrg # check would be larger than it should be. 71415fb4814Smrg lt_cv_sys_max_cmd_len=12288; # 12K is about right 71515fb4814Smrg ;; 71615fb4814Smrg 71715fb4814Smrg gnu*) 71815fb4814Smrg # Under GNU Hurd, this test is not required because there is 71915fb4814Smrg # no limit to the length of command line arguments. 72015fb4814Smrg # Libtool will interpret -1 as no limit whatsoever 72115fb4814Smrg lt_cv_sys_max_cmd_len=-1; 72215fb4814Smrg ;; 72315fb4814Smrg 72415fb4814Smrg cygwin* | mingw*) 72515fb4814Smrg # On Win9x/ME, this test blows up -- it succeeds, but takes 72615fb4814Smrg # about 5 minutes as the teststring grows exponentially. 72715fb4814Smrg # Worse, since 9x/ME are not pre-emptively multitasking, 72815fb4814Smrg # you end up with a "frozen" computer, even though with patience 72915fb4814Smrg # the test eventually succeeds (with a max line length of 256k). 73015fb4814Smrg # Instead, let's just punt: use the minimum linelength reported by 73115fb4814Smrg # all of the supported platforms: 8192 (on NT/2K/XP). 73215fb4814Smrg lt_cv_sys_max_cmd_len=8192; 73315fb4814Smrg ;; 73415fb4814Smrg 73515fb4814Smrg amigaos*) 73615fb4814Smrg # On AmigaOS with pdksh, this test takes hours, literally. 73715fb4814Smrg # So we just punt and use a minimum line length of 8192. 73815fb4814Smrg lt_cv_sys_max_cmd_len=8192; 73915fb4814Smrg ;; 74015fb4814Smrg 74115fb4814Smrg netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) 74215fb4814Smrg # This has been around since 386BSD, at least. Likely further. 74315fb4814Smrg if test -x /sbin/sysctl; then 74415fb4814Smrg lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 74515fb4814Smrg elif test -x /usr/sbin/sysctl; then 74615fb4814Smrg lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 74715fb4814Smrg else 74815fb4814Smrg lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 74915fb4814Smrg fi 75015fb4814Smrg # And add a safety zone 75115fb4814Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 75215fb4814Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 75315fb4814Smrg ;; 75415fb4814Smrg 75515fb4814Smrg interix*) 75615fb4814Smrg # We know the value 262144 and hardcode it with a safety zone (like BSD) 75715fb4814Smrg lt_cv_sys_max_cmd_len=196608 75815fb4814Smrg ;; 75915fb4814Smrg 76015fb4814Smrg osf*) 76115fb4814Smrg # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 76215fb4814Smrg # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 76315fb4814Smrg # nice to cause kernel panics so lets avoid the loop below. 76415fb4814Smrg # First set a reasonable default. 76515fb4814Smrg lt_cv_sys_max_cmd_len=16384 76615fb4814Smrg # 76715fb4814Smrg if test -x /sbin/sysconfig; then 76815fb4814Smrg case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 76915fb4814Smrg *1*) lt_cv_sys_max_cmd_len=-1 ;; 77015fb4814Smrg esac 77115fb4814Smrg fi 77215fb4814Smrg ;; 77315fb4814Smrg sco3.2v5*) 77415fb4814Smrg lt_cv_sys_max_cmd_len=102400 77515fb4814Smrg ;; 77615fb4814Smrg sysv5* | sco5v6* | sysv4.2uw2*) 77715fb4814Smrg kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 77815fb4814Smrg if test -n "$kargmax"; then 77915fb4814Smrg lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` 78015fb4814Smrg else 78115fb4814Smrg lt_cv_sys_max_cmd_len=32768 78215fb4814Smrg fi 78315fb4814Smrg ;; 78415fb4814Smrg *) 78515fb4814Smrg # If test is not a shell built-in, we'll probably end up computing a 78615fb4814Smrg # maximum length that is only half of the actual maximum length, but 78715fb4814Smrg # we can't tell. 78815fb4814Smrg SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 78915fb4814Smrg while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \ 79015fb4814Smrg = "XX$teststring") >/dev/null 2>&1 && 79115fb4814Smrg new_result=`expr "X$teststring" : ".*" 2>&1` && 79215fb4814Smrg lt_cv_sys_max_cmd_len=$new_result && 79315fb4814Smrg test $i != 17 # 1/2 MB should be enough 79415fb4814Smrg do 79515fb4814Smrg i=`expr $i + 1` 79615fb4814Smrg teststring=$teststring$teststring 79715fb4814Smrg done 79815fb4814Smrg teststring= 79915fb4814Smrg # Add a significant safety factor because C++ compilers can tack on massive 80015fb4814Smrg # amounts of additional arguments before passing them to the linker. 80115fb4814Smrg # It appears as though 1/2 is a usable value. 80215fb4814Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 80315fb4814Smrg ;; 80415fb4814Smrg esac 80515fb4814Smrg]) 80615fb4814Smrgif test -n $lt_cv_sys_max_cmd_len ; then 80715fb4814Smrg AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 80815fb4814Smrgelse 80915fb4814Smrg AC_MSG_RESULT(none) 81015fb4814Smrgfi 81115fb4814Smrg])# AC_LIBTOOL_SYS_MAX_CMD_LEN 81215fb4814Smrg 81315fb4814Smrg 81415fb4814Smrg# _LT_AC_CHECK_DLFCN 81515fb4814Smrg# ------------------ 81615fb4814SmrgAC_DEFUN([_LT_AC_CHECK_DLFCN], 81715fb4814Smrg[AC_CHECK_HEADERS(dlfcn.h)dnl 81815fb4814Smrg])# _LT_AC_CHECK_DLFCN 81915fb4814Smrg 82015fb4814Smrg 82115fb4814Smrg# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 82215fb4814Smrg# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 82315fb4814Smrg# --------------------------------------------------------------------- 82415fb4814SmrgAC_DEFUN([_LT_AC_TRY_DLOPEN_SELF], 82515fb4814Smrg[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl 82615fb4814Smrgif test "$cross_compiling" = yes; then : 82715fb4814Smrg [$4] 82815fb4814Smrgelse 82915fb4814Smrg lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 83015fb4814Smrg lt_status=$lt_dlunknown 83115fb4814Smrg cat > conftest.$ac_ext <<EOF 83215fb4814Smrg[#line __oline__ "configure" 83315fb4814Smrg#include "confdefs.h" 83415fb4814Smrg 83515fb4814Smrg#if HAVE_DLFCN_H 83615fb4814Smrg#include <dlfcn.h> 83715fb4814Smrg#endif 83815fb4814Smrg 83915fb4814Smrg#include <stdio.h> 84015fb4814Smrg 84115fb4814Smrg#ifdef RTLD_GLOBAL 84215fb4814Smrg# define LT_DLGLOBAL RTLD_GLOBAL 84315fb4814Smrg#else 84415fb4814Smrg# ifdef DL_GLOBAL 84515fb4814Smrg# define LT_DLGLOBAL DL_GLOBAL 84615fb4814Smrg# else 84715fb4814Smrg# define LT_DLGLOBAL 0 84815fb4814Smrg# endif 84915fb4814Smrg#endif 85015fb4814Smrg 85115fb4814Smrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 85215fb4814Smrg find out it does not work in some platform. */ 85315fb4814Smrg#ifndef LT_DLLAZY_OR_NOW 85415fb4814Smrg# ifdef RTLD_LAZY 85515fb4814Smrg# define LT_DLLAZY_OR_NOW RTLD_LAZY 85615fb4814Smrg# else 85715fb4814Smrg# ifdef DL_LAZY 85815fb4814Smrg# define LT_DLLAZY_OR_NOW DL_LAZY 85915fb4814Smrg# else 86015fb4814Smrg# ifdef RTLD_NOW 86115fb4814Smrg# define LT_DLLAZY_OR_NOW RTLD_NOW 86215fb4814Smrg# else 86315fb4814Smrg# ifdef DL_NOW 86415fb4814Smrg# define LT_DLLAZY_OR_NOW DL_NOW 86515fb4814Smrg# else 86615fb4814Smrg# define LT_DLLAZY_OR_NOW 0 86715fb4814Smrg# endif 86815fb4814Smrg# endif 86915fb4814Smrg# endif 87015fb4814Smrg# endif 87115fb4814Smrg#endif 87215fb4814Smrg 87315fb4814Smrg#ifdef __cplusplus 87415fb4814Smrgextern "C" void exit (int); 87515fb4814Smrg#endif 87615fb4814Smrg 87715fb4814Smrgvoid fnord() { int i=42;} 87815fb4814Smrgint main () 87915fb4814Smrg{ 88015fb4814Smrg void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 88115fb4814Smrg int status = $lt_dlunknown; 88215fb4814Smrg 88315fb4814Smrg if (self) 88415fb4814Smrg { 88515fb4814Smrg if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 88615fb4814Smrg else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 88715fb4814Smrg /* dlclose (self); */ 88815fb4814Smrg } 88915fb4814Smrg else 89015fb4814Smrg puts (dlerror ()); 89115fb4814Smrg 89215fb4814Smrg exit (status); 89315fb4814Smrg}] 89415fb4814SmrgEOF 89515fb4814Smrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then 89615fb4814Smrg (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 89715fb4814Smrg lt_status=$? 89815fb4814Smrg case x$lt_status in 89915fb4814Smrg x$lt_dlno_uscore) $1 ;; 90015fb4814Smrg x$lt_dlneed_uscore) $2 ;; 90115fb4814Smrg x$lt_dlunknown|x*) $3 ;; 90215fb4814Smrg esac 90315fb4814Smrg else : 90415fb4814Smrg # compilation failed 90515fb4814Smrg $3 90615fb4814Smrg fi 90715fb4814Smrgfi 90815fb4814Smrgrm -fr conftest* 90915fb4814Smrg])# _LT_AC_TRY_DLOPEN_SELF 91015fb4814Smrg 91115fb4814Smrg 91215fb4814Smrg# AC_LIBTOOL_DLOPEN_SELF 91315fb4814Smrg# ---------------------- 91415fb4814SmrgAC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], 91515fb4814Smrg[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl 91615fb4814Smrgif test "x$enable_dlopen" != xyes; then 91715fb4814Smrg enable_dlopen=unknown 91815fb4814Smrg enable_dlopen_self=unknown 91915fb4814Smrg enable_dlopen_self_static=unknown 92015fb4814Smrgelse 92115fb4814Smrg lt_cv_dlopen=no 92215fb4814Smrg lt_cv_dlopen_libs= 92315fb4814Smrg 92415fb4814Smrg case $host_os in 92515fb4814Smrg beos*) 92615fb4814Smrg lt_cv_dlopen="load_add_on" 92715fb4814Smrg lt_cv_dlopen_libs= 92815fb4814Smrg lt_cv_dlopen_self=yes 92915fb4814Smrg ;; 93015fb4814Smrg 93115fb4814Smrg mingw* | pw32*) 93215fb4814Smrg lt_cv_dlopen="LoadLibrary" 93315fb4814Smrg lt_cv_dlopen_libs= 93415fb4814Smrg ;; 93515fb4814Smrg 93615fb4814Smrg cygwin*) 93715fb4814Smrg lt_cv_dlopen="dlopen" 93815fb4814Smrg lt_cv_dlopen_libs= 93915fb4814Smrg ;; 94015fb4814Smrg 94115fb4814Smrg darwin*) 94215fb4814Smrg # if libdl is installed we need to link against it 94315fb4814Smrg AC_CHECK_LIB([dl], [dlopen], 94415fb4814Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ 94515fb4814Smrg lt_cv_dlopen="dyld" 94615fb4814Smrg lt_cv_dlopen_libs= 94715fb4814Smrg lt_cv_dlopen_self=yes 94815fb4814Smrg ]) 94915fb4814Smrg ;; 95015fb4814Smrg 95115fb4814Smrg *) 95215fb4814Smrg AC_CHECK_FUNC([shl_load], 95315fb4814Smrg [lt_cv_dlopen="shl_load"], 95415fb4814Smrg [AC_CHECK_LIB([dld], [shl_load], 95515fb4814Smrg [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"], 95615fb4814Smrg [AC_CHECK_FUNC([dlopen], 95715fb4814Smrg [lt_cv_dlopen="dlopen"], 95815fb4814Smrg [AC_CHECK_LIB([dl], [dlopen], 95915fb4814Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], 96015fb4814Smrg [AC_CHECK_LIB([svld], [dlopen], 96115fb4814Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], 96215fb4814Smrg [AC_CHECK_LIB([dld], [dld_link], 96315fb4814Smrg [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"]) 96415fb4814Smrg ]) 96515fb4814Smrg ]) 96615fb4814Smrg ]) 96715fb4814Smrg ]) 96815fb4814Smrg ]) 96915fb4814Smrg ;; 97015fb4814Smrg esac 97115fb4814Smrg 97215fb4814Smrg if test "x$lt_cv_dlopen" != xno; then 97315fb4814Smrg enable_dlopen=yes 97415fb4814Smrg else 97515fb4814Smrg enable_dlopen=no 97615fb4814Smrg fi 97715fb4814Smrg 97815fb4814Smrg case $lt_cv_dlopen in 97915fb4814Smrg dlopen) 98015fb4814Smrg save_CPPFLAGS="$CPPFLAGS" 98115fb4814Smrg test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 98215fb4814Smrg 98315fb4814Smrg save_LDFLAGS="$LDFLAGS" 98415fb4814Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 98515fb4814Smrg 98615fb4814Smrg save_LIBS="$LIBS" 98715fb4814Smrg LIBS="$lt_cv_dlopen_libs $LIBS" 98815fb4814Smrg 98915fb4814Smrg AC_CACHE_CHECK([whether a program can dlopen itself], 99015fb4814Smrg lt_cv_dlopen_self, [dnl 99115fb4814Smrg _LT_AC_TRY_DLOPEN_SELF( 99215fb4814Smrg lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 99315fb4814Smrg lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 99415fb4814Smrg ]) 99515fb4814Smrg 99615fb4814Smrg if test "x$lt_cv_dlopen_self" = xyes; then 99715fb4814Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 99815fb4814Smrg AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 99915fb4814Smrg lt_cv_dlopen_self_static, [dnl 100015fb4814Smrg _LT_AC_TRY_DLOPEN_SELF( 100115fb4814Smrg lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 100215fb4814Smrg lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 100315fb4814Smrg ]) 100415fb4814Smrg fi 100515fb4814Smrg 100615fb4814Smrg CPPFLAGS="$save_CPPFLAGS" 100715fb4814Smrg LDFLAGS="$save_LDFLAGS" 100815fb4814Smrg LIBS="$save_LIBS" 100915fb4814Smrg ;; 101015fb4814Smrg esac 101115fb4814Smrg 101215fb4814Smrg case $lt_cv_dlopen_self in 101315fb4814Smrg yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 101415fb4814Smrg *) enable_dlopen_self=unknown ;; 101515fb4814Smrg esac 101615fb4814Smrg 101715fb4814Smrg case $lt_cv_dlopen_self_static in 101815fb4814Smrg yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 101915fb4814Smrg *) enable_dlopen_self_static=unknown ;; 102015fb4814Smrg esac 102115fb4814Smrgfi 102215fb4814Smrg])# AC_LIBTOOL_DLOPEN_SELF 102315fb4814Smrg 102415fb4814Smrg 102515fb4814Smrg# AC_LIBTOOL_PROG_CC_C_O([TAGNAME]) 102615fb4814Smrg# --------------------------------- 102715fb4814Smrg# Check to see if options -c and -o are simultaneously supported by compiler 102815fb4814SmrgAC_DEFUN([AC_LIBTOOL_PROG_CC_C_O], 102915fb4814Smrg[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl 103015fb4814SmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 103115fb4814Smrg [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 103215fb4814Smrg [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 103315fb4814Smrg $rm -r conftest 2>/dev/null 103415fb4814Smrg mkdir conftest 103515fb4814Smrg cd conftest 103615fb4814Smrg mkdir out 103715fb4814Smrg printf "$lt_simple_compile_test_code" > conftest.$ac_ext 103815fb4814Smrg 103915fb4814Smrg lt_compiler_flag="-o out/conftest2.$ac_objext" 104015fb4814Smrg # Insert the option either (1) after the last *FLAGS variable, or 104115fb4814Smrg # (2) before a word containing "conftest.", or (3) at the end. 104215fb4814Smrg # Note that $ac_compile itself does not contain backslashes and begins 104315fb4814Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 104415fb4814Smrg lt_compile=`echo "$ac_compile" | $SED \ 104515fb4814Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 104615fb4814Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 104715fb4814Smrg -e 's:$: $lt_compiler_flag:'` 104815fb4814Smrg (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 104915fb4814Smrg (eval "$lt_compile" 2>out/conftest.err) 105015fb4814Smrg ac_status=$? 105115fb4814Smrg cat out/conftest.err >&AS_MESSAGE_LOG_FD 105215fb4814Smrg echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 105315fb4814Smrg if (exit $ac_status) && test -s out/conftest2.$ac_objext 105415fb4814Smrg then 105515fb4814Smrg # The compiler can only warn and ignore the option if not recognized 105615fb4814Smrg # So say no if there are warnings 105715fb4814Smrg $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp 105815fb4814Smrg $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 105915fb4814Smrg if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 106015fb4814Smrg _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 106115fb4814Smrg fi 106215fb4814Smrg fi 106315fb4814Smrg chmod u+w . 2>&AS_MESSAGE_LOG_FD 106415fb4814Smrg $rm conftest* 106515fb4814Smrg # SGI C++ compiler will create directory out/ii_files/ for 106615fb4814Smrg # template instantiation 106715fb4814Smrg test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files 106815fb4814Smrg $rm out/* && rmdir out 106915fb4814Smrg cd .. 107015fb4814Smrg rmdir conftest 107115fb4814Smrg $rm conftest* 107215fb4814Smrg]) 107315fb4814Smrg])# AC_LIBTOOL_PROG_CC_C_O 107415fb4814Smrg 107515fb4814Smrg 107615fb4814Smrg# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME]) 107715fb4814Smrg# ----------------------------------------- 107815fb4814Smrg# Check to see if we can do hard links to lock some files if needed 107915fb4814SmrgAC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], 108015fb4814Smrg[AC_REQUIRE([_LT_AC_LOCK])dnl 108115fb4814Smrg 108215fb4814Smrghard_links="nottested" 108315fb4814Smrgif test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then 108415fb4814Smrg # do not overwrite the value of need_locks provided by the user 108515fb4814Smrg AC_MSG_CHECKING([if we can lock with hard links]) 108615fb4814Smrg hard_links=yes 108715fb4814Smrg $rm conftest* 108815fb4814Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 108915fb4814Smrg touch conftest.a 109015fb4814Smrg ln conftest.a conftest.b 2>&5 || hard_links=no 109115fb4814Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 109215fb4814Smrg AC_MSG_RESULT([$hard_links]) 109315fb4814Smrg if test "$hard_links" = no; then 109415fb4814Smrg AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) 109515fb4814Smrg need_locks=warn 109615fb4814Smrg fi 109715fb4814Smrgelse 109815fb4814Smrg need_locks=no 109915fb4814Smrgfi 110015fb4814Smrg])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS 110115fb4814Smrg 110215fb4814Smrg 110315fb4814Smrg# AC_LIBTOOL_OBJDIR 110415fb4814Smrg# ----------------- 110515fb4814SmrgAC_DEFUN([AC_LIBTOOL_OBJDIR], 110615fb4814Smrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 110715fb4814Smrg[rm -f .libs 2>/dev/null 110815fb4814Smrgmkdir .libs 2>/dev/null 110915fb4814Smrgif test -d .libs; then 111015fb4814Smrg lt_cv_objdir=.libs 111115fb4814Smrgelse 111215fb4814Smrg # MS-DOS does not allow filenames that begin with a dot. 111315fb4814Smrg lt_cv_objdir=_libs 111415fb4814Smrgfi 111515fb4814Smrgrmdir .libs 2>/dev/null]) 111615fb4814Smrgobjdir=$lt_cv_objdir 111715fb4814Smrg])# AC_LIBTOOL_OBJDIR 111815fb4814Smrg 111915fb4814Smrg 112015fb4814Smrg# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME]) 112115fb4814Smrg# ---------------------------------------------- 112215fb4814Smrg# Check hardcoding attributes. 112315fb4814SmrgAC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], 112415fb4814Smrg[AC_MSG_CHECKING([how to hardcode library paths into programs]) 112515fb4814Smrg_LT_AC_TAGVAR(hardcode_action, $1)= 112615fb4814Smrgif test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \ 112715fb4814Smrg test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \ 112815fb4814Smrg test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then 112915fb4814Smrg 113015fb4814Smrg # We can hardcode non-existant directories. 113115fb4814Smrg if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no && 113215fb4814Smrg # If the only mechanism to avoid hardcoding is shlibpath_var, we 113315fb4814Smrg # have to relink, otherwise we might link with an installed library 113415fb4814Smrg # when we should be linking with a yet-to-be-installed one 113515fb4814Smrg ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no && 113615fb4814Smrg test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then 113715fb4814Smrg # Linking always hardcodes the temporary library directory. 113815fb4814Smrg _LT_AC_TAGVAR(hardcode_action, $1)=relink 113915fb4814Smrg else 114015fb4814Smrg # We can link without hardcoding, and we can hardcode nonexisting dirs. 114115fb4814Smrg _LT_AC_TAGVAR(hardcode_action, $1)=immediate 114215fb4814Smrg fi 114315fb4814Smrgelse 114415fb4814Smrg # We cannot hardcode anything, or else we can only hardcode existing 114515fb4814Smrg # directories. 114615fb4814Smrg _LT_AC_TAGVAR(hardcode_action, $1)=unsupported 114715fb4814Smrgfi 114815fb4814SmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)]) 114915fb4814Smrg 115015fb4814Smrgif test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then 115115fb4814Smrg # Fast installation is not supported 115215fb4814Smrg enable_fast_install=no 115315fb4814Smrgelif test "$shlibpath_overrides_runpath" = yes || 115415fb4814Smrg test "$enable_shared" = no; then 115515fb4814Smrg # Fast installation is not necessary 115615fb4814Smrg enable_fast_install=needless 115715fb4814Smrgfi 115815fb4814Smrg])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH 115915fb4814Smrg 116015fb4814Smrg 116115fb4814Smrg# AC_LIBTOOL_SYS_LIB_STRIP 116215fb4814Smrg# ------------------------ 116315fb4814SmrgAC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP], 116415fb4814Smrg[striplib= 116515fb4814Smrgold_striplib= 116615fb4814SmrgAC_MSG_CHECKING([whether stripping libraries is possible]) 116715fb4814Smrgif test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then 116815fb4814Smrg test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" 116915fb4814Smrg test -z "$striplib" && striplib="$STRIP --strip-unneeded" 117015fb4814Smrg AC_MSG_RESULT([yes]) 117115fb4814Smrgelse 117215fb4814Smrg# FIXME - insert some real tests, host_os isn't really good enough 117315fb4814Smrg case $host_os in 117415fb4814Smrg darwin*) 117515fb4814Smrg if test -n "$STRIP" ; then 117615fb4814Smrg striplib="$STRIP -x" 117715fb4814Smrg AC_MSG_RESULT([yes]) 117815fb4814Smrg else 117915fb4814Smrg AC_MSG_RESULT([no]) 118015fb4814Smrgfi 118115fb4814Smrg ;; 118215fb4814Smrg *) 118315fb4814Smrg AC_MSG_RESULT([no]) 118415fb4814Smrg ;; 118515fb4814Smrg esac 118615fb4814Smrgfi 118715fb4814Smrg])# AC_LIBTOOL_SYS_LIB_STRIP 118815fb4814Smrg 118915fb4814Smrg 119015fb4814Smrg# AC_LIBTOOL_SYS_DYNAMIC_LINKER 119115fb4814Smrg# ----------------------------- 119215fb4814Smrg# PORTME Fill in your ld.so characteristics 119315fb4814SmrgAC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER], 119415fb4814Smrg[AC_MSG_CHECKING([dynamic linker characteristics]) 119515fb4814Smrglibrary_names_spec= 119615fb4814Smrglibname_spec='lib$name' 119715fb4814Smrgsoname_spec= 119815fb4814Smrgshrext_cmds=".so" 119915fb4814Smrgpostinstall_cmds= 120015fb4814Smrgpostuninstall_cmds= 120115fb4814Smrgfinish_cmds= 120215fb4814Smrgfinish_eval= 120315fb4814Smrgshlibpath_var= 120415fb4814Smrgshlibpath_overrides_runpath=unknown 120515fb4814Smrgversion_type=none 120615fb4814Smrgdynamic_linker="$host_os ld.so" 120715fb4814Smrgsys_lib_dlsearch_path_spec="/lib /usr/lib" 120815fb4814Smrgif test "$GCC" = yes; then 120915fb4814Smrg sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` 121015fb4814Smrg if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then 121115fb4814Smrg # if the path contains ";" then we assume it to be the separator 121215fb4814Smrg # otherwise default to the standard path separator (i.e. ":") - it is 121315fb4814Smrg # assumed that no part of a normal pathname contains ";" but that should 121415fb4814Smrg # okay in the real world where ";" in dirpaths is itself problematic. 121515fb4814Smrg sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 121615fb4814Smrg else 121715fb4814Smrg sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 121815fb4814Smrg fi 121915fb4814Smrgelse 122015fb4814Smrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 122115fb4814Smrgfi 122215fb4814Smrgneed_lib_prefix=unknown 122315fb4814Smrghardcode_into_libs=no 122415fb4814Smrg 122515fb4814Smrg# when you set need_version to no, make sure it does not cause -set_version 122615fb4814Smrg# flags to be left without arguments 122715fb4814Smrgneed_version=unknown 122815fb4814Smrg 122915fb4814Smrgcase $host_os in 123015fb4814Smrgaix3*) 123115fb4814Smrg version_type=linux 123215fb4814Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' 123315fb4814Smrg shlibpath_var=LIBPATH 123415fb4814Smrg 123515fb4814Smrg # AIX 3 has no versioning support, so we append a major version to the name. 123615fb4814Smrg soname_spec='${libname}${release}${shared_ext}$major' 123715fb4814Smrg ;; 123815fb4814Smrg 123915fb4814Smrgaix4* | aix5*) 124015fb4814Smrg version_type=linux 124115fb4814Smrg need_lib_prefix=no 124215fb4814Smrg need_version=no 124315fb4814Smrg hardcode_into_libs=yes 124415fb4814Smrg if test "$host_cpu" = ia64; then 124515fb4814Smrg # AIX 5 supports IA64 124615fb4814Smrg library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' 124715fb4814Smrg shlibpath_var=LD_LIBRARY_PATH 124815fb4814Smrg else 124915fb4814Smrg # With GCC up to 2.95.x, collect2 would create an import file 125015fb4814Smrg # for dependence libraries. The import file would start with 125115fb4814Smrg # the line `#! .'. This would cause the generated library to 125215fb4814Smrg # depend on `.', always an invalid library. This was fixed in 125315fb4814Smrg # development snapshots of GCC prior to 3.0. 125415fb4814Smrg case $host_os in 125515fb4814Smrg aix4 | aix4.[[01]] | aix4.[[01]].*) 125615fb4814Smrg if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 125715fb4814Smrg echo ' yes ' 125815fb4814Smrg echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then 125915fb4814Smrg : 126015fb4814Smrg else 126115fb4814Smrg can_build_shared=no 126215fb4814Smrg fi 126315fb4814Smrg ;; 126415fb4814Smrg esac 126515fb4814Smrg # AIX (on Power*) has no versioning support, so currently we can not hardcode correct 126615fb4814Smrg # soname into executable. Probably we can add versioning support to 126715fb4814Smrg # collect2, so additional links can be useful in future. 126815fb4814Smrg if test "$aix_use_runtimelinking" = yes; then 126915fb4814Smrg # If using run time linking (on AIX 4.2 or later) use lib<name>.so 127015fb4814Smrg # instead of lib<name>.a to let people know that these are not 127115fb4814Smrg # typical AIX shared libraries. 127215fb4814Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 127315fb4814Smrg else 127415fb4814Smrg # We preserve .a as extension for shared libraries through AIX4.2 127515fb4814Smrg # and later when we are not doing run time linking. 127615fb4814Smrg library_names_spec='${libname}${release}.a $libname.a' 127715fb4814Smrg soname_spec='${libname}${release}${shared_ext}$major' 127815fb4814Smrg fi 127915fb4814Smrg shlibpath_var=LIBPATH 128015fb4814Smrg fi 128115fb4814Smrg ;; 128215fb4814Smrg 128315fb4814Smrgamigaos*) 128415fb4814Smrg library_names_spec='$libname.ixlibrary $libname.a' 128515fb4814Smrg # Create ${libname}_ixlibrary.a entries in /sys/libs. 128615fb4814Smrg 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' 128715fb4814Smrg ;; 128815fb4814Smrg 128915fb4814Smrgbeos*) 129015fb4814Smrg library_names_spec='${libname}${shared_ext}' 129115fb4814Smrg dynamic_linker="$host_os ld.so" 129215fb4814Smrg shlibpath_var=LIBRARY_PATH 129315fb4814Smrg ;; 129415fb4814Smrg 129515fb4814Smrgbsdi[[45]]*) 129615fb4814Smrg version_type=linux 129715fb4814Smrg need_version=no 129815fb4814Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 129915fb4814Smrg soname_spec='${libname}${release}${shared_ext}$major' 130015fb4814Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 130115fb4814Smrg shlibpath_var=LD_LIBRARY_PATH 130215fb4814Smrg sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 130315fb4814Smrg sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 130415fb4814Smrg # the default ld.so.conf also contains /usr/contrib/lib and 130515fb4814Smrg # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 130615fb4814Smrg # libtool to hard-code these into programs 130715fb4814Smrg ;; 130815fb4814Smrg 130915fb4814Smrgcygwin* | mingw* | pw32*) 131015fb4814Smrg version_type=windows 131115fb4814Smrg shrext_cmds=".dll" 131215fb4814Smrg need_version=no 131315fb4814Smrg need_lib_prefix=no 131415fb4814Smrg 131515fb4814Smrg case $GCC,$host_os in 131615fb4814Smrg yes,cygwin* | yes,mingw* | yes,pw32*) 131715fb4814Smrg library_names_spec='$libname.dll.a' 131815fb4814Smrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 131915fb4814Smrg postinstall_cmds='base_file=`basename \${file}`~ 132015fb4814Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ 132115fb4814Smrg dldir=$destdir/`dirname \$dlpath`~ 132215fb4814Smrg test -d \$dldir || mkdir -p \$dldir~ 132315fb4814Smrg $install_prog $dir/$dlname \$dldir/$dlname~ 132415fb4814Smrg chmod a+x \$dldir/$dlname' 132515fb4814Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 132615fb4814Smrg dlpath=$dir/\$dldll~ 132715fb4814Smrg $rm \$dlpath' 132815fb4814Smrg shlibpath_overrides_runpath=yes 132915fb4814Smrg 133015fb4814Smrg case $host_os in 133115fb4814Smrg cygwin*) 133215fb4814Smrg # Cygwin DLLs use 'cyg' prefix rather than 'lib' 133315fb4814Smrg soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 133415fb4814Smrg sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" 133515fb4814Smrg ;; 133615fb4814Smrg mingw*) 133715fb4814Smrg # MinGW DLLs use traditional 'lib' prefix 133815fb4814Smrg soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 133915fb4814Smrg sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` 134015fb4814Smrg if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then 134115fb4814Smrg # It is most probably a Windows format PATH printed by 134215fb4814Smrg # mingw gcc, but we are running on Cygwin. Gcc prints its search 134315fb4814Smrg # path with ; separators, and with drive letters. We can handle the 134415fb4814Smrg # drive letters (cygwin fileutils understands them), so leave them, 134515fb4814Smrg # especially as we might pass files found there to a mingw objdump, 134615fb4814Smrg # which wouldn't understand a cygwinified path. Ahh. 134715fb4814Smrg sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 134815fb4814Smrg else 134915fb4814Smrg sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 135015fb4814Smrg fi 135115fb4814Smrg ;; 135215fb4814Smrg pw32*) 135315fb4814Smrg # pw32 DLLs use 'pw' prefix rather than 'lib' 135415fb4814Smrg library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 135515fb4814Smrg ;; 135615fb4814Smrg esac 135715fb4814Smrg ;; 135815fb4814Smrg 135915fb4814Smrg *) 136015fb4814Smrg library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' 136115fb4814Smrg ;; 136215fb4814Smrg esac 136315fb4814Smrg dynamic_linker='Win32 ld.exe' 136415fb4814Smrg # FIXME: first we should search . and the directory the executable is in 136515fb4814Smrg shlibpath_var=PATH 136615fb4814Smrg ;; 136715fb4814Smrg 136815fb4814Smrgdarwin* | rhapsody*) 136915fb4814Smrg dynamic_linker="$host_os dyld" 137015fb4814Smrg version_type=darwin 137115fb4814Smrg need_lib_prefix=no 137215fb4814Smrg need_version=no 137315fb4814Smrg library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' 137415fb4814Smrg soname_spec='${libname}${release}${major}$shared_ext' 137515fb4814Smrg shlibpath_overrides_runpath=yes 137615fb4814Smrg shlibpath_var=DYLD_LIBRARY_PATH 137715fb4814Smrg shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 137815fb4814Smrg # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. 137915fb4814Smrg if test "$GCC" = yes; then 138015fb4814Smrg 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"` 138115fb4814Smrg else 138215fb4814Smrg sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' 138315fb4814Smrg fi 138415fb4814Smrg sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 138515fb4814Smrg ;; 138615fb4814Smrg 138715fb4814Smrgdgux*) 138815fb4814Smrg version_type=linux 138915fb4814Smrg need_lib_prefix=no 139015fb4814Smrg need_version=no 139115fb4814Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' 139215fb4814Smrg soname_spec='${libname}${release}${shared_ext}$major' 139315fb4814Smrg shlibpath_var=LD_LIBRARY_PATH 139415fb4814Smrg ;; 139515fb4814Smrg 139615fb4814Smrgfreebsd1*) 139715fb4814Smrg dynamic_linker=no 139815fb4814Smrg ;; 139915fb4814Smrg 140015fb4814Smrgkfreebsd*-gnu) 140115fb4814Smrg version_type=linux 140215fb4814Smrg need_lib_prefix=no 140315fb4814Smrg need_version=no 140415fb4814Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 140515fb4814Smrg soname_spec='${libname}${release}${shared_ext}$major' 140615fb4814Smrg shlibpath_var=LD_LIBRARY_PATH 140715fb4814Smrg shlibpath_overrides_runpath=no 140815fb4814Smrg hardcode_into_libs=yes 140915fb4814Smrg dynamic_linker='GNU ld.so' 141015fb4814Smrg ;; 141115fb4814Smrg 141215fb4814Smrgfreebsd* | dragonfly*) 141315fb4814Smrg # DragonFly does not have aout. When/if they implement a new 141415fb4814Smrg # versioning mechanism, adjust this. 141515fb4814Smrg if test -x /usr/bin/objformat; then 141615fb4814Smrg objformat=`/usr/bin/objformat` 141715fb4814Smrg else 141815fb4814Smrg case $host_os in 141915fb4814Smrg freebsd[[123]]*) objformat=aout ;; 142015fb4814Smrg *) objformat=elf ;; 142115fb4814Smrg esac 142215fb4814Smrg fi 142315fb4814Smrg version_type=freebsd-$objformat 142415fb4814Smrg case $version_type in 142515fb4814Smrg freebsd-elf*) 142615fb4814Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 142715fb4814Smrg need_version=no 142815fb4814Smrg need_lib_prefix=no 142915fb4814Smrg ;; 143015fb4814Smrg freebsd-*) 143115fb4814Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' 143215fb4814Smrg need_version=yes 143315fb4814Smrg ;; 143415fb4814Smrg esac 143515fb4814Smrg shlibpath_var=LD_LIBRARY_PATH 143615fb4814Smrg case $host_os in 143715fb4814Smrg freebsd2*) 143815fb4814Smrg shlibpath_overrides_runpath=yes 143915fb4814Smrg ;; 144015fb4814Smrg freebsd3.[[01]]* | freebsdelf3.[[01]]*) 144115fb4814Smrg shlibpath_overrides_runpath=yes 144215fb4814Smrg hardcode_into_libs=yes 144315fb4814Smrg ;; 144415fb4814Smrg freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 144515fb4814Smrg freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 144615fb4814Smrg shlibpath_overrides_runpath=no 144715fb4814Smrg hardcode_into_libs=yes 144815fb4814Smrg ;; 144915fb4814Smrg freebsd*) # from 4.6 on 145015fb4814Smrg shlibpath_overrides_runpath=yes 145115fb4814Smrg hardcode_into_libs=yes 145215fb4814Smrg ;; 145315fb4814Smrg esac 145415fb4814Smrg ;; 145515fb4814Smrg 145615fb4814Smrggnu*) 145715fb4814Smrg version_type=linux 145815fb4814Smrg need_lib_prefix=no 145915fb4814Smrg need_version=no 146015fb4814Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 146115fb4814Smrg soname_spec='${libname}${release}${shared_ext}$major' 146215fb4814Smrg shlibpath_var=LD_LIBRARY_PATH 146315fb4814Smrg hardcode_into_libs=yes 146415fb4814Smrg ;; 146515fb4814Smrg 146615fb4814Smrghpux9* | hpux10* | hpux11*) 146715fb4814Smrg # Give a soname corresponding to the major version so that dld.sl refuses to 146815fb4814Smrg # link against other versions. 146915fb4814Smrg version_type=sunos 147015fb4814Smrg need_lib_prefix=no 147115fb4814Smrg need_version=no 147215fb4814Smrg case $host_cpu in 147315fb4814Smrg ia64*) 147415fb4814Smrg shrext_cmds='.so' 147515fb4814Smrg hardcode_into_libs=yes 147615fb4814Smrg dynamic_linker="$host_os dld.so" 147715fb4814Smrg shlibpath_var=LD_LIBRARY_PATH 147815fb4814Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 147915fb4814Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 148015fb4814Smrg soname_spec='${libname}${release}${shared_ext}$major' 148115fb4814Smrg if test "X$HPUX_IA64_MODE" = X32; then 148215fb4814Smrg sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 148315fb4814Smrg else 148415fb4814Smrg sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 148515fb4814Smrg fi 148615fb4814Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 148715fb4814Smrg ;; 148815fb4814Smrg hppa*64*) 148915fb4814Smrg shrext_cmds='.sl' 149015fb4814Smrg hardcode_into_libs=yes 149115fb4814Smrg dynamic_linker="$host_os dld.sl" 149215fb4814Smrg shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 149315fb4814Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 149415fb4814Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 149515fb4814Smrg soname_spec='${libname}${release}${shared_ext}$major' 149615fb4814Smrg sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 149715fb4814Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 149815fb4814Smrg ;; 149915fb4814Smrg *) 150015fb4814Smrg shrext_cmds='.sl' 150115fb4814Smrg dynamic_linker="$host_os dld.sl" 150215fb4814Smrg shlibpath_var=SHLIB_PATH 150315fb4814Smrg shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 150415fb4814Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 150515fb4814Smrg soname_spec='${libname}${release}${shared_ext}$major' 150615fb4814Smrg ;; 150715fb4814Smrg esac 150815fb4814Smrg # HP-UX runs *really* slowly unless shared libraries are mode 555. 150915fb4814Smrg postinstall_cmds='chmod 555 $lib' 151015fb4814Smrg ;; 151115fb4814Smrg 151215fb4814Smrginterix3*) 151315fb4814Smrg version_type=linux 151415fb4814Smrg need_lib_prefix=no 151515fb4814Smrg need_version=no 151615fb4814Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 151715fb4814Smrg soname_spec='${libname}${release}${shared_ext}$major' 151815fb4814Smrg dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 151915fb4814Smrg shlibpath_var=LD_LIBRARY_PATH 152015fb4814Smrg shlibpath_overrides_runpath=no 152115fb4814Smrg hardcode_into_libs=yes 152215fb4814Smrg ;; 152315fb4814Smrg 152415fb4814Smrgirix5* | irix6* | nonstopux*) 152515fb4814Smrg case $host_os in 152615fb4814Smrg nonstopux*) version_type=nonstopux ;; 152715fb4814Smrg *) 152815fb4814Smrg if test "$lt_cv_prog_gnu_ld" = yes; then 152915fb4814Smrg version_type=linux 153015fb4814Smrg else 153115fb4814Smrg version_type=irix 153215fb4814Smrg fi ;; 153315fb4814Smrg esac 153415fb4814Smrg need_lib_prefix=no 153515fb4814Smrg need_version=no 153615fb4814Smrg soname_spec='${libname}${release}${shared_ext}$major' 153715fb4814Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' 153815fb4814Smrg case $host_os in 153915fb4814Smrg irix5* | nonstopux*) 154015fb4814Smrg libsuff= shlibsuff= 154115fb4814Smrg ;; 154215fb4814Smrg *) 154315fb4814Smrg case $LD in # libtool.m4 will add one of these switches to LD 154415fb4814Smrg *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 154515fb4814Smrg libsuff= shlibsuff= libmagic=32-bit;; 154615fb4814Smrg *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 154715fb4814Smrg libsuff=32 shlibsuff=N32 libmagic=N32;; 154815fb4814Smrg *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 154915fb4814Smrg libsuff=64 shlibsuff=64 libmagic=64-bit;; 155015fb4814Smrg *) libsuff= shlibsuff= libmagic=never-match;; 155115fb4814Smrg esac 155215fb4814Smrg ;; 155315fb4814Smrg esac 155415fb4814Smrg shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 155515fb4814Smrg shlibpath_overrides_runpath=no 155615fb4814Smrg sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" 155715fb4814Smrg sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" 155815fb4814Smrg hardcode_into_libs=yes 155915fb4814Smrg ;; 156015fb4814Smrg 156115fb4814Smrg# No shared lib support for Linux oldld, aout, or coff. 156215fb4814Smrglinux*oldld* | linux*aout* | linux*coff*) 156315fb4814Smrg dynamic_linker=no 156415fb4814Smrg ;; 156515fb4814Smrg 156615fb4814Smrg# This must be Linux ELF. 156715fb4814Smrglinux*) 156815fb4814Smrg version_type=linux 156915fb4814Smrg need_lib_prefix=no 157015fb4814Smrg need_version=no 157115fb4814Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 157215fb4814Smrg soname_spec='${libname}${release}${shared_ext}$major' 157315fb4814Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 157415fb4814Smrg shlibpath_var=LD_LIBRARY_PATH 157515fb4814Smrg shlibpath_overrides_runpath=no 157615fb4814Smrg # This implies no fast_install, which is unacceptable. 157715fb4814Smrg # Some rework will be needed to allow for fast_install 157815fb4814Smrg # before this can be enabled. 157915fb4814Smrg hardcode_into_libs=yes 158015fb4814Smrg 158115fb4814Smrg # find out which ABI we are using 158215fb4814Smrg libsuff= 158315fb4814Smrg case "$host_cpu" in 158415fb4814Smrg x86_64*|s390x*|powerpc64*) 158515fb4814Smrg echo '[#]line __oline__ "configure"' > conftest.$ac_ext 158615fb4814Smrg if AC_TRY_EVAL(ac_compile); then 158715fb4814Smrg case `/usr/bin/file conftest.$ac_objext` in 158815fb4814Smrg *64-bit*) 158915fb4814Smrg libsuff=64 159015fb4814Smrg sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}" 159115fb4814Smrg ;; 159215fb4814Smrg esac 159315fb4814Smrg fi 159415fb4814Smrg rm -rf conftest* 159515fb4814Smrg ;; 159615fb4814Smrg esac 159715fb4814Smrg 159815fb4814Smrg # Append ld.so.conf contents to the search path 159915fb4814Smrg if test -f /etc/ld.so.conf; then 160015fb4814Smrg lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` 160115fb4814Smrg sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra" 160215fb4814Smrg fi 160315fb4814Smrg 160415fb4814Smrg # We used to test for /lib/ld.so.1 and disable shared libraries on 160515fb4814Smrg # powerpc, because MkLinux only supported shared libraries with the 160615fb4814Smrg # GNU dynamic linker. Since this was broken with cross compilers, 160715fb4814Smrg # most powerpc-linux boxes support dynamic linking these days and 160815fb4814Smrg # people can always --disable-shared, the test was removed, and we 160915fb4814Smrg # assume the GNU/Linux dynamic linker is in use. 161015fb4814Smrg dynamic_linker='GNU/Linux ld.so' 161115fb4814Smrg ;; 161215fb4814Smrg 161315fb4814Smrgknetbsd*-gnu) 161415fb4814Smrg version_type=linux 161515fb4814Smrg need_lib_prefix=no 161615fb4814Smrg need_version=no 161715fb4814Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 161815fb4814Smrg soname_spec='${libname}${release}${shared_ext}$major' 161915fb4814Smrg shlibpath_var=LD_LIBRARY_PATH 162015fb4814Smrg shlibpath_overrides_runpath=no 162115fb4814Smrg hardcode_into_libs=yes 162215fb4814Smrg dynamic_linker='GNU ld.so' 162315fb4814Smrg ;; 162415fb4814Smrg 162515fb4814Smrgnetbsd*) 162615fb4814Smrg version_type=sunos 162715fb4814Smrg need_lib_prefix=no 162815fb4814Smrg need_version=no 162915fb4814Smrg if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then 163015fb4814Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 163115fb4814Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 163215fb4814Smrg dynamic_linker='NetBSD (a.out) ld.so' 163315fb4814Smrg else 163415fb4814Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 163515fb4814Smrg soname_spec='${libname}${release}${shared_ext}$major' 163615fb4814Smrg dynamic_linker='NetBSD ld.elf_so' 163715fb4814Smrg fi 163815fb4814Smrg shlibpath_var=LD_LIBRARY_PATH 163915fb4814Smrg shlibpath_overrides_runpath=yes 164015fb4814Smrg hardcode_into_libs=yes 164115fb4814Smrg ;; 164215fb4814Smrg 164315fb4814Smrgnewsos6) 164415fb4814Smrg version_type=linux 164515fb4814Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 164615fb4814Smrg shlibpath_var=LD_LIBRARY_PATH 164715fb4814Smrg shlibpath_overrides_runpath=yes 164815fb4814Smrg ;; 164915fb4814Smrg 165015fb4814Smrgnto-qnx*) 165115fb4814Smrg version_type=linux 165215fb4814Smrg need_lib_prefix=no 165315fb4814Smrg need_version=no 165415fb4814Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 165515fb4814Smrg soname_spec='${libname}${release}${shared_ext}$major' 165615fb4814Smrg shlibpath_var=LD_LIBRARY_PATH 165715fb4814Smrg shlibpath_overrides_runpath=yes 165815fb4814Smrg ;; 165915fb4814Smrg 166015fb4814Smrgopenbsd*) 166115fb4814Smrg version_type=sunos 166215fb4814Smrg sys_lib_dlsearch_path_spec="/usr/lib" 166315fb4814Smrg need_lib_prefix=no 166415fb4814Smrg # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. 166515fb4814Smrg case $host_os in 166615fb4814Smrg openbsd3.3 | openbsd3.3.*) need_version=yes ;; 166715fb4814Smrg *) need_version=no ;; 166815fb4814Smrg esac 166915fb4814Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 167015fb4814Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 167115fb4814Smrg shlibpath_var=LD_LIBRARY_PATH 167215fb4814Smrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 167315fb4814Smrg case $host_os in 167415fb4814Smrg openbsd2.[[89]] | openbsd2.[[89]].*) 167515fb4814Smrg shlibpath_overrides_runpath=no 167615fb4814Smrg ;; 167715fb4814Smrg *) 167815fb4814Smrg shlibpath_overrides_runpath=yes 167915fb4814Smrg ;; 168015fb4814Smrg esac 168115fb4814Smrg else 168215fb4814Smrg shlibpath_overrides_runpath=yes 168315fb4814Smrg fi 168415fb4814Smrg ;; 168515fb4814Smrg 168615fb4814Smrgos2*) 168715fb4814Smrg libname_spec='$name' 168815fb4814Smrg shrext_cmds=".dll" 168915fb4814Smrg need_lib_prefix=no 169015fb4814Smrg library_names_spec='$libname${shared_ext} $libname.a' 169115fb4814Smrg dynamic_linker='OS/2 ld.exe' 169215fb4814Smrg shlibpath_var=LIBPATH 169315fb4814Smrg ;; 169415fb4814Smrg 169515fb4814Smrgosf3* | osf4* | osf5*) 169615fb4814Smrg version_type=osf 169715fb4814Smrg need_lib_prefix=no 169815fb4814Smrg need_version=no 169915fb4814Smrg soname_spec='${libname}${release}${shared_ext}$major' 170015fb4814Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 170115fb4814Smrg shlibpath_var=LD_LIBRARY_PATH 170215fb4814Smrg sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 170315fb4814Smrg sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" 170415fb4814Smrg ;; 170515fb4814Smrg 170615fb4814Smrgsolaris*) 170715fb4814Smrg version_type=linux 170815fb4814Smrg need_lib_prefix=no 170915fb4814Smrg need_version=no 171015fb4814Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 171115fb4814Smrg soname_spec='${libname}${release}${shared_ext}$major' 171215fb4814Smrg shlibpath_var=LD_LIBRARY_PATH 171315fb4814Smrg shlibpath_overrides_runpath=yes 171415fb4814Smrg hardcode_into_libs=yes 171515fb4814Smrg # ldd complains unless libraries are executable 171615fb4814Smrg postinstall_cmds='chmod +x $lib' 171715fb4814Smrg ;; 171815fb4814Smrg 171915fb4814Smrgsunos4*) 172015fb4814Smrg version_type=sunos 172115fb4814Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 172215fb4814Smrg finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 172315fb4814Smrg shlibpath_var=LD_LIBRARY_PATH 172415fb4814Smrg shlibpath_overrides_runpath=yes 172515fb4814Smrg if test "$with_gnu_ld" = yes; then 172615fb4814Smrg need_lib_prefix=no 172715fb4814Smrg fi 172815fb4814Smrg need_version=yes 172915fb4814Smrg ;; 173015fb4814Smrg 173115fb4814Smrgsysv4 | sysv4.3*) 173215fb4814Smrg version_type=linux 173315fb4814Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 173415fb4814Smrg soname_spec='${libname}${release}${shared_ext}$major' 173515fb4814Smrg shlibpath_var=LD_LIBRARY_PATH 173615fb4814Smrg case $host_vendor in 173715fb4814Smrg sni) 173815fb4814Smrg shlibpath_overrides_runpath=no 173915fb4814Smrg need_lib_prefix=no 174015fb4814Smrg export_dynamic_flag_spec='${wl}-Blargedynsym' 174115fb4814Smrg runpath_var=LD_RUN_PATH 174215fb4814Smrg ;; 174315fb4814Smrg siemens) 174415fb4814Smrg need_lib_prefix=no 174515fb4814Smrg ;; 174615fb4814Smrg motorola) 174715fb4814Smrg need_lib_prefix=no 174815fb4814Smrg need_version=no 174915fb4814Smrg shlibpath_overrides_runpath=no 175015fb4814Smrg sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 175115fb4814Smrg ;; 175215fb4814Smrg esac 175315fb4814Smrg ;; 175415fb4814Smrg 175515fb4814Smrgsysv4*MP*) 175615fb4814Smrg if test -d /usr/nec ;then 175715fb4814Smrg version_type=linux 175815fb4814Smrg library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' 175915fb4814Smrg soname_spec='$libname${shared_ext}.$major' 176015fb4814Smrg shlibpath_var=LD_LIBRARY_PATH 176115fb4814Smrg fi 176215fb4814Smrg ;; 176315fb4814Smrg 176415fb4814Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 176515fb4814Smrg version_type=freebsd-elf 176615fb4814Smrg need_lib_prefix=no 176715fb4814Smrg need_version=no 176815fb4814Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 176915fb4814Smrg soname_spec='${libname}${release}${shared_ext}$major' 177015fb4814Smrg shlibpath_var=LD_LIBRARY_PATH 177115fb4814Smrg hardcode_into_libs=yes 177215fb4814Smrg if test "$with_gnu_ld" = yes; then 177315fb4814Smrg sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 177415fb4814Smrg shlibpath_overrides_runpath=no 177515fb4814Smrg else 177615fb4814Smrg sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 177715fb4814Smrg shlibpath_overrides_runpath=yes 177815fb4814Smrg case $host_os in 177915fb4814Smrg sco3.2v5*) 178015fb4814Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 178115fb4814Smrg ;; 178215fb4814Smrg esac 178315fb4814Smrg fi 178415fb4814Smrg sys_lib_dlsearch_path_spec='/usr/lib' 178515fb4814Smrg ;; 178615fb4814Smrg 178715fb4814Smrguts4*) 178815fb4814Smrg version_type=linux 178915fb4814Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 179015fb4814Smrg soname_spec='${libname}${release}${shared_ext}$major' 179115fb4814Smrg shlibpath_var=LD_LIBRARY_PATH 179215fb4814Smrg ;; 179315fb4814Smrg 179415fb4814Smrg*) 179515fb4814Smrg dynamic_linker=no 179615fb4814Smrg ;; 179715fb4814Smrgesac 179815fb4814SmrgAC_MSG_RESULT([$dynamic_linker]) 179915fb4814Smrgtest "$dynamic_linker" = no && can_build_shared=no 180015fb4814Smrg 180115fb4814Smrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var" 180215fb4814Smrgif test "$GCC" = yes; then 180315fb4814Smrg variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 180415fb4814Smrgfi 180515fb4814Smrg])# AC_LIBTOOL_SYS_DYNAMIC_LINKER 180615fb4814Smrg 180715fb4814Smrg 180815fb4814Smrg# _LT_AC_TAGCONFIG 180915fb4814Smrg# ---------------- 181015fb4814SmrgAC_DEFUN([_LT_AC_TAGCONFIG], 181115fb4814Smrg[AC_ARG_WITH([tags], 181215fb4814Smrg [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@], 181315fb4814Smrg [include additional configurations @<:@automatic@:>@])], 181415fb4814Smrg [tagnames="$withval"]) 181515fb4814Smrg 181615fb4814Smrgif test -f "$ltmain" && test -n "$tagnames"; then 181715fb4814Smrg if test ! -f "${ofile}"; then 181815fb4814Smrg AC_MSG_WARN([output file `$ofile' does not exist]) 181915fb4814Smrg fi 182015fb4814Smrg 182115fb4814Smrg if test -z "$LTCC"; then 182215fb4814Smrg eval "`$SHELL ${ofile} --config | grep '^LTCC='`" 182315fb4814Smrg if test -z "$LTCC"; then 182415fb4814Smrg AC_MSG_WARN([output file `$ofile' does not look like a libtool script]) 182515fb4814Smrg else 182615fb4814Smrg AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile']) 182715fb4814Smrg fi 182815fb4814Smrg fi 182915fb4814Smrg if test -z "$LTCFLAGS"; then 183015fb4814Smrg eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`" 183115fb4814Smrg fi 183215fb4814Smrg 183315fb4814Smrg # Extract list of available tagged configurations in $ofile. 183415fb4814Smrg # Note that this assumes the entire list is on one line. 183515fb4814Smrg available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` 183615fb4814Smrg 183715fb4814Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 183815fb4814Smrg for tagname in $tagnames; do 183915fb4814Smrg IFS="$lt_save_ifs" 184015fb4814Smrg # Check whether tagname contains only valid characters 184115fb4814Smrg case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in 184215fb4814Smrg "") ;; 184315fb4814Smrg *) AC_MSG_ERROR([invalid tag name: $tagname]) 184415fb4814Smrg ;; 184515fb4814Smrg esac 184615fb4814Smrg 184715fb4814Smrg if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null 184815fb4814Smrg then 184915fb4814Smrg AC_MSG_ERROR([tag name \"$tagname\" already exists]) 185015fb4814Smrg fi 185115fb4814Smrg 185215fb4814Smrg # Update the list of available tags. 185315fb4814Smrg if test -n "$tagname"; then 185415fb4814Smrg echo appending configuration tag \"$tagname\" to $ofile 185515fb4814Smrg 185615fb4814Smrg case $tagname in 185715fb4814Smrg CXX) 185815fb4814Smrg if test -n "$CXX" && ( test "X$CXX" != "Xno" && 185915fb4814Smrg ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || 186015fb4814Smrg (test "X$CXX" != "Xg++"))) ; then 186115fb4814Smrg AC_LIBTOOL_LANG_CXX_CONFIG 186215fb4814Smrg else 186315fb4814Smrg tagname="" 186415fb4814Smrg fi 186515fb4814Smrg ;; 186615fb4814Smrg 186715fb4814Smrg F77) 186815fb4814Smrg if test -n "$F77" && test "X$F77" != "Xno"; then 186915fb4814Smrg AC_LIBTOOL_LANG_F77_CONFIG 187015fb4814Smrg else 187115fb4814Smrg tagname="" 187215fb4814Smrg fi 187315fb4814Smrg ;; 187415fb4814Smrg 187515fb4814Smrg GCJ) 187615fb4814Smrg if test -n "$GCJ" && test "X$GCJ" != "Xno"; then 187715fb4814Smrg AC_LIBTOOL_LANG_GCJ_CONFIG 187815fb4814Smrg else 187915fb4814Smrg tagname="" 188015fb4814Smrg fi 188115fb4814Smrg ;; 188215fb4814Smrg 188315fb4814Smrg RC) 188415fb4814Smrg AC_LIBTOOL_LANG_RC_CONFIG 188515fb4814Smrg ;; 188615fb4814Smrg 188715fb4814Smrg *) 188815fb4814Smrg AC_MSG_ERROR([Unsupported tag name: $tagname]) 188915fb4814Smrg ;; 189015fb4814Smrg esac 189115fb4814Smrg 189215fb4814Smrg # Append the new tag name to the list of available tags. 189315fb4814Smrg if test -n "$tagname" ; then 189415fb4814Smrg available_tags="$available_tags $tagname" 189515fb4814Smrg fi 189615fb4814Smrg fi 189715fb4814Smrg done 189815fb4814Smrg IFS="$lt_save_ifs" 189915fb4814Smrg 190015fb4814Smrg # Now substitute the updated list of available tags. 190115fb4814Smrg if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then 190215fb4814Smrg mv "${ofile}T" "$ofile" 190315fb4814Smrg chmod +x "$ofile" 190415fb4814Smrg else 190515fb4814Smrg rm -f "${ofile}T" 190615fb4814Smrg AC_MSG_ERROR([unable to update list of available tagged configurations.]) 190715fb4814Smrg fi 190815fb4814Smrgfi 190915fb4814Smrg])# _LT_AC_TAGCONFIG 191015fb4814Smrg 191115fb4814Smrg 191215fb4814Smrg# AC_LIBTOOL_DLOPEN 191315fb4814Smrg# ----------------- 191415fb4814Smrg# enable checks for dlopen support 191515fb4814SmrgAC_DEFUN([AC_LIBTOOL_DLOPEN], 191615fb4814Smrg [AC_BEFORE([$0],[AC_LIBTOOL_SETUP]) 191715fb4814Smrg])# AC_LIBTOOL_DLOPEN 191815fb4814Smrg 191915fb4814Smrg 192015fb4814Smrg# AC_LIBTOOL_WIN32_DLL 192115fb4814Smrg# -------------------- 192215fb4814Smrg# declare package support for building win32 DLLs 192315fb4814SmrgAC_DEFUN([AC_LIBTOOL_WIN32_DLL], 192415fb4814Smrg[AC_BEFORE([$0], [AC_LIBTOOL_SETUP]) 192515fb4814Smrg])# AC_LIBTOOL_WIN32_DLL 192615fb4814Smrg 192715fb4814Smrg 192815fb4814Smrg# AC_ENABLE_SHARED([DEFAULT]) 192915fb4814Smrg# --------------------------- 193015fb4814Smrg# implement the --enable-shared flag 193115fb4814Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 193215fb4814SmrgAC_DEFUN([AC_ENABLE_SHARED], 193315fb4814Smrg[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl 193415fb4814SmrgAC_ARG_ENABLE([shared], 193515fb4814Smrg [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 193615fb4814Smrg [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])], 193715fb4814Smrg [p=${PACKAGE-default} 193815fb4814Smrg case $enableval in 193915fb4814Smrg yes) enable_shared=yes ;; 194015fb4814Smrg no) enable_shared=no ;; 194115fb4814Smrg *) 194215fb4814Smrg enable_shared=no 194315fb4814Smrg # Look at the argument we got. We use all the common list separators. 194415fb4814Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 194515fb4814Smrg for pkg in $enableval; do 194615fb4814Smrg IFS="$lt_save_ifs" 194715fb4814Smrg if test "X$pkg" = "X$p"; then 194815fb4814Smrg enable_shared=yes 194915fb4814Smrg fi 195015fb4814Smrg done 195115fb4814Smrg IFS="$lt_save_ifs" 195215fb4814Smrg ;; 195315fb4814Smrg esac], 195415fb4814Smrg [enable_shared=]AC_ENABLE_SHARED_DEFAULT) 195515fb4814Smrg])# AC_ENABLE_SHARED 195615fb4814Smrg 195715fb4814Smrg 195815fb4814Smrg# AC_DISABLE_SHARED 195915fb4814Smrg# ----------------- 196015fb4814Smrg# set the default shared flag to --disable-shared 196115fb4814SmrgAC_DEFUN([AC_DISABLE_SHARED], 196215fb4814Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 196315fb4814SmrgAC_ENABLE_SHARED(no) 196415fb4814Smrg])# AC_DISABLE_SHARED 196515fb4814Smrg 196615fb4814Smrg 196715fb4814Smrg# AC_ENABLE_STATIC([DEFAULT]) 196815fb4814Smrg# --------------------------- 196915fb4814Smrg# implement the --enable-static flag 197015fb4814Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 197115fb4814SmrgAC_DEFUN([AC_ENABLE_STATIC], 197215fb4814Smrg[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl 197315fb4814SmrgAC_ARG_ENABLE([static], 197415fb4814Smrg [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@], 197515fb4814Smrg [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])], 197615fb4814Smrg [p=${PACKAGE-default} 197715fb4814Smrg case $enableval in 197815fb4814Smrg yes) enable_static=yes ;; 197915fb4814Smrg no) enable_static=no ;; 198015fb4814Smrg *) 198115fb4814Smrg enable_static=no 198215fb4814Smrg # Look at the argument we got. We use all the common list separators. 198315fb4814Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 198415fb4814Smrg for pkg in $enableval; do 198515fb4814Smrg IFS="$lt_save_ifs" 198615fb4814Smrg if test "X$pkg" = "X$p"; then 198715fb4814Smrg enable_static=yes 198815fb4814Smrg fi 198915fb4814Smrg done 199015fb4814Smrg IFS="$lt_save_ifs" 199115fb4814Smrg ;; 199215fb4814Smrg esac], 199315fb4814Smrg [enable_static=]AC_ENABLE_STATIC_DEFAULT) 199415fb4814Smrg])# AC_ENABLE_STATIC 199515fb4814Smrg 199615fb4814Smrg 199715fb4814Smrg# AC_DISABLE_STATIC 199815fb4814Smrg# ----------------- 199915fb4814Smrg# set the default static flag to --disable-static 200015fb4814SmrgAC_DEFUN([AC_DISABLE_STATIC], 200115fb4814Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 200215fb4814SmrgAC_ENABLE_STATIC(no) 200315fb4814Smrg])# AC_DISABLE_STATIC 200415fb4814Smrg 200515fb4814Smrg 200615fb4814Smrg# AC_ENABLE_FAST_INSTALL([DEFAULT]) 200715fb4814Smrg# --------------------------------- 200815fb4814Smrg# implement the --enable-fast-install flag 200915fb4814Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 201015fb4814SmrgAC_DEFUN([AC_ENABLE_FAST_INSTALL], 201115fb4814Smrg[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl 201215fb4814SmrgAC_ARG_ENABLE([fast-install], 201315fb4814Smrg [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 201415fb4814Smrg [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 201515fb4814Smrg [p=${PACKAGE-default} 201615fb4814Smrg case $enableval in 201715fb4814Smrg yes) enable_fast_install=yes ;; 201815fb4814Smrg no) enable_fast_install=no ;; 201915fb4814Smrg *) 202015fb4814Smrg enable_fast_install=no 202115fb4814Smrg # Look at the argument we got. We use all the common list separators. 202215fb4814Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 202315fb4814Smrg for pkg in $enableval; do 202415fb4814Smrg IFS="$lt_save_ifs" 202515fb4814Smrg if test "X$pkg" = "X$p"; then 202615fb4814Smrg enable_fast_install=yes 202715fb4814Smrg fi 202815fb4814Smrg done 202915fb4814Smrg IFS="$lt_save_ifs" 203015fb4814Smrg ;; 203115fb4814Smrg esac], 203215fb4814Smrg [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT) 203315fb4814Smrg])# AC_ENABLE_FAST_INSTALL 203415fb4814Smrg 203515fb4814Smrg 203615fb4814Smrg# AC_DISABLE_FAST_INSTALL 203715fb4814Smrg# ----------------------- 203815fb4814Smrg# set the default to --disable-fast-install 203915fb4814SmrgAC_DEFUN([AC_DISABLE_FAST_INSTALL], 204015fb4814Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 204115fb4814SmrgAC_ENABLE_FAST_INSTALL(no) 204215fb4814Smrg])# AC_DISABLE_FAST_INSTALL 204315fb4814Smrg 204415fb4814Smrg 204515fb4814Smrg# AC_LIBTOOL_PICMODE([MODE]) 204615fb4814Smrg# -------------------------- 204715fb4814Smrg# implement the --with-pic flag 204815fb4814Smrg# MODE is either `yes' or `no'. If omitted, it defaults to `both'. 204915fb4814SmrgAC_DEFUN([AC_LIBTOOL_PICMODE], 205015fb4814Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 205115fb4814Smrgpic_mode=ifelse($#,1,$1,default) 205215fb4814Smrg])# AC_LIBTOOL_PICMODE 205315fb4814Smrg 205415fb4814Smrg 205515fb4814Smrg# AC_PROG_EGREP 205615fb4814Smrg# ------------- 205715fb4814Smrg# This is predefined starting with Autoconf 2.54, so this conditional 205815fb4814Smrg# definition can be removed once we require Autoconf 2.54 or later. 205915fb4814Smrgm4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP], 206015fb4814Smrg[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep], 206115fb4814Smrg [if echo a | (grep -E '(a|b)') >/dev/null 2>&1 206215fb4814Smrg then ac_cv_prog_egrep='grep -E' 206315fb4814Smrg else ac_cv_prog_egrep='egrep' 206415fb4814Smrg fi]) 206515fb4814Smrg EGREP=$ac_cv_prog_egrep 206615fb4814Smrg AC_SUBST([EGREP]) 206715fb4814Smrg])]) 206815fb4814Smrg 206915fb4814Smrg 207015fb4814Smrg# AC_PATH_TOOL_PREFIX 207115fb4814Smrg# ------------------- 207215fb4814Smrg# find a file program which can recognise shared library 207315fb4814SmrgAC_DEFUN([AC_PATH_TOOL_PREFIX], 207415fb4814Smrg[AC_REQUIRE([AC_PROG_EGREP])dnl 207515fb4814SmrgAC_MSG_CHECKING([for $1]) 207615fb4814SmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 207715fb4814Smrg[case $MAGIC_CMD in 207815fb4814Smrg[[\\/*] | ?:[\\/]*]) 207915fb4814Smrg lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. 208015fb4814Smrg ;; 208115fb4814Smrg*) 208215fb4814Smrg lt_save_MAGIC_CMD="$MAGIC_CMD" 208315fb4814Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 208415fb4814Smrgdnl $ac_dummy forces splitting on constant user-supplied paths. 208515fb4814Smrgdnl POSIX.2 word splitting is done only on the output of word expansions, 208615fb4814Smrgdnl not every word. This closes a longstanding sh security hole. 208715fb4814Smrg ac_dummy="ifelse([$2], , $PATH, [$2])" 208815fb4814Smrg for ac_dir in $ac_dummy; do 208915fb4814Smrg IFS="$lt_save_ifs" 209015fb4814Smrg test -z "$ac_dir" && ac_dir=. 209115fb4814Smrg if test -f $ac_dir/$1; then 209215fb4814Smrg lt_cv_path_MAGIC_CMD="$ac_dir/$1" 209315fb4814Smrg if test -n "$file_magic_test_file"; then 209415fb4814Smrg case $deplibs_check_method in 209515fb4814Smrg "file_magic "*) 209615fb4814Smrg file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 209715fb4814Smrg MAGIC_CMD="$lt_cv_path_MAGIC_CMD" 209815fb4814Smrg if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 209915fb4814Smrg $EGREP "$file_magic_regex" > /dev/null; then 210015fb4814Smrg : 210115fb4814Smrg else 210215fb4814Smrg cat <<EOF 1>&2 210315fb4814Smrg 210415fb4814Smrg*** Warning: the command libtool uses to detect shared libraries, 210515fb4814Smrg*** $file_magic_cmd, produces output that libtool cannot recognize. 210615fb4814Smrg*** The result is that libtool may fail to recognize shared libraries 210715fb4814Smrg*** as such. This will affect the creation of libtool libraries that 210815fb4814Smrg*** depend on shared libraries, but programs linked with such libtool 210915fb4814Smrg*** libraries will work regardless of this problem. Nevertheless, you 211015fb4814Smrg*** may want to report the problem to your system manager and/or to 211115fb4814Smrg*** bug-libtool@gnu.org 211215fb4814Smrg 211315fb4814SmrgEOF 211415fb4814Smrg fi ;; 211515fb4814Smrg esac 211615fb4814Smrg fi 211715fb4814Smrg break 211815fb4814Smrg fi 211915fb4814Smrg done 212015fb4814Smrg IFS="$lt_save_ifs" 212115fb4814Smrg MAGIC_CMD="$lt_save_MAGIC_CMD" 212215fb4814Smrg ;; 212315fb4814Smrgesac]) 212415fb4814SmrgMAGIC_CMD="$lt_cv_path_MAGIC_CMD" 212515fb4814Smrgif test -n "$MAGIC_CMD"; then 212615fb4814Smrg AC_MSG_RESULT($MAGIC_CMD) 212715fb4814Smrgelse 212815fb4814Smrg AC_MSG_RESULT(no) 212915fb4814Smrgfi 213015fb4814Smrg])# AC_PATH_TOOL_PREFIX 213115fb4814Smrg 213215fb4814Smrg 213315fb4814Smrg# AC_PATH_MAGIC 213415fb4814Smrg# ------------- 213515fb4814Smrg# find a file program which can recognise a shared library 213615fb4814SmrgAC_DEFUN([AC_PATH_MAGIC], 213715fb4814Smrg[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 213815fb4814Smrgif test -z "$lt_cv_path_MAGIC_CMD"; then 213915fb4814Smrg if test -n "$ac_tool_prefix"; then 214015fb4814Smrg AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 214115fb4814Smrg else 214215fb4814Smrg MAGIC_CMD=: 214315fb4814Smrg fi 214415fb4814Smrgfi 214515fb4814Smrg])# AC_PATH_MAGIC 214615fb4814Smrg 214715fb4814Smrg 214815fb4814Smrg# AC_PROG_LD 214915fb4814Smrg# ---------- 215015fb4814Smrg# find the pathname to the GNU or non-GNU linker 215115fb4814SmrgAC_DEFUN([AC_PROG_LD], 215215fb4814Smrg[AC_ARG_WITH([gnu-ld], 215315fb4814Smrg [AC_HELP_STRING([--with-gnu-ld], 215415fb4814Smrg [assume the C compiler uses GNU ld @<:@default=no@:>@])], 215515fb4814Smrg [test "$withval" = no || with_gnu_ld=yes], 215615fb4814Smrg [with_gnu_ld=no]) 215715fb4814SmrgAC_REQUIRE([LT_AC_PROG_SED])dnl 215815fb4814SmrgAC_REQUIRE([AC_PROG_CC])dnl 215915fb4814SmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 216015fb4814SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 216115fb4814Smrgac_prog=ld 216215fb4814Smrgif test "$GCC" = yes; then 216315fb4814Smrg # Check if gcc -print-prog-name=ld gives a path. 216415fb4814Smrg AC_MSG_CHECKING([for ld used by $CC]) 216515fb4814Smrg case $host in 216615fb4814Smrg *-*-mingw*) 216715fb4814Smrg # gcc leaves a trailing carriage return which upsets mingw 216815fb4814Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 216915fb4814Smrg *) 217015fb4814Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 217115fb4814Smrg esac 217215fb4814Smrg case $ac_prog in 217315fb4814Smrg # Accept absolute paths. 217415fb4814Smrg [[\\/]]* | ?:[[\\/]]*) 217515fb4814Smrg re_direlt='/[[^/]][[^/]]*/\.\./' 217615fb4814Smrg # Canonicalize the pathname of ld 217715fb4814Smrg ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` 217815fb4814Smrg while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do 217915fb4814Smrg ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` 218015fb4814Smrg done 218115fb4814Smrg test -z "$LD" && LD="$ac_prog" 218215fb4814Smrg ;; 218315fb4814Smrg "") 218415fb4814Smrg # If it fails, then pretend we aren't using GCC. 218515fb4814Smrg ac_prog=ld 218615fb4814Smrg ;; 218715fb4814Smrg *) 218815fb4814Smrg # If it is relative, then search for the first ld in PATH. 218915fb4814Smrg with_gnu_ld=unknown 219015fb4814Smrg ;; 219115fb4814Smrg esac 219215fb4814Smrgelif test "$with_gnu_ld" = yes; then 219315fb4814Smrg AC_MSG_CHECKING([for GNU ld]) 219415fb4814Smrgelse 219515fb4814Smrg AC_MSG_CHECKING([for non-GNU ld]) 219615fb4814Smrgfi 219715fb4814SmrgAC_CACHE_VAL(lt_cv_path_LD, 219815fb4814Smrg[if test -z "$LD"; then 219915fb4814Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 220015fb4814Smrg for ac_dir in $PATH; do 220115fb4814Smrg IFS="$lt_save_ifs" 220215fb4814Smrg test -z "$ac_dir" && ac_dir=. 220315fb4814Smrg if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 220415fb4814Smrg lt_cv_path_LD="$ac_dir/$ac_prog" 220515fb4814Smrg # Check to see if the program is GNU ld. I'd rather use --version, 220615fb4814Smrg # but apparently some variants of GNU ld only accept -v. 220715fb4814Smrg # Break only if it was the GNU/non-GNU ld that we prefer. 220815fb4814Smrg case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 220915fb4814Smrg *GNU* | *'with BFD'*) 221015fb4814Smrg test "$with_gnu_ld" != no && break 221115fb4814Smrg ;; 221215fb4814Smrg *) 221315fb4814Smrg test "$with_gnu_ld" != yes && break 221415fb4814Smrg ;; 221515fb4814Smrg esac 221615fb4814Smrg fi 221715fb4814Smrg done 221815fb4814Smrg IFS="$lt_save_ifs" 221915fb4814Smrgelse 222015fb4814Smrg lt_cv_path_LD="$LD" # Let the user override the test with a path. 222115fb4814Smrgfi]) 222215fb4814SmrgLD="$lt_cv_path_LD" 222315fb4814Smrgif test -n "$LD"; then 222415fb4814Smrg AC_MSG_RESULT($LD) 222515fb4814Smrgelse 222615fb4814Smrg AC_MSG_RESULT(no) 222715fb4814Smrgfi 222815fb4814Smrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 222915fb4814SmrgAC_PROG_LD_GNU 223015fb4814Smrg])# AC_PROG_LD 223115fb4814Smrg 223215fb4814Smrg 223315fb4814Smrg# AC_PROG_LD_GNU 223415fb4814Smrg# -------------- 223515fb4814SmrgAC_DEFUN([AC_PROG_LD_GNU], 223615fb4814Smrg[AC_REQUIRE([AC_PROG_EGREP])dnl 223715fb4814SmrgAC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 223815fb4814Smrg[# I'd rather use --version here, but apparently some GNU lds only accept -v. 223915fb4814Smrgcase `$LD -v 2>&1 </dev/null` in 224015fb4814Smrg*GNU* | *'with BFD'*) 224115fb4814Smrg lt_cv_prog_gnu_ld=yes 224215fb4814Smrg ;; 224315fb4814Smrg*) 224415fb4814Smrg lt_cv_prog_gnu_ld=no 224515fb4814Smrg ;; 224615fb4814Smrgesac]) 224715fb4814Smrgwith_gnu_ld=$lt_cv_prog_gnu_ld 224815fb4814Smrg])# AC_PROG_LD_GNU 224915fb4814Smrg 225015fb4814Smrg 225115fb4814Smrg# AC_PROG_LD_RELOAD_FLAG 225215fb4814Smrg# ---------------------- 225315fb4814Smrg# find reload flag for linker 225415fb4814Smrg# -- PORTME Some linkers may need a different reload flag. 225515fb4814SmrgAC_DEFUN([AC_PROG_LD_RELOAD_FLAG], 225615fb4814Smrg[AC_CACHE_CHECK([for $LD option to reload object files], 225715fb4814Smrg lt_cv_ld_reload_flag, 225815fb4814Smrg [lt_cv_ld_reload_flag='-r']) 225915fb4814Smrgreload_flag=$lt_cv_ld_reload_flag 226015fb4814Smrgcase $reload_flag in 226115fb4814Smrg"" | " "*) ;; 226215fb4814Smrg*) reload_flag=" $reload_flag" ;; 226315fb4814Smrgesac 226415fb4814Smrgreload_cmds='$LD$reload_flag -o $output$reload_objs' 226515fb4814Smrgcase $host_os in 226615fb4814Smrg darwin*) 226715fb4814Smrg if test "$GCC" = yes; then 226815fb4814Smrg reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' 226915fb4814Smrg else 227015fb4814Smrg reload_cmds='$LD$reload_flag -o $output$reload_objs' 227115fb4814Smrg fi 227215fb4814Smrg ;; 227315fb4814Smrgesac 227415fb4814Smrg])# AC_PROG_LD_RELOAD_FLAG 227515fb4814Smrg 227615fb4814Smrg 227715fb4814Smrg# AC_DEPLIBS_CHECK_METHOD 227815fb4814Smrg# ----------------------- 227915fb4814Smrg# how to check for library dependencies 228015fb4814Smrg# -- PORTME fill in with the dynamic library characteristics 228115fb4814SmrgAC_DEFUN([AC_DEPLIBS_CHECK_METHOD], 228215fb4814Smrg[AC_CACHE_CHECK([how to recognise dependent libraries], 228315fb4814Smrglt_cv_deplibs_check_method, 228415fb4814Smrg[lt_cv_file_magic_cmd='$MAGIC_CMD' 228515fb4814Smrglt_cv_file_magic_test_file= 228615fb4814Smrglt_cv_deplibs_check_method='unknown' 228715fb4814Smrg# Need to set the preceding variable on all platforms that support 228815fb4814Smrg# interlibrary dependencies. 228915fb4814Smrg# 'none' -- dependencies not supported. 229015fb4814Smrg# `unknown' -- same as none, but documents that we really don't know. 229115fb4814Smrg# 'pass_all' -- all dependencies passed with no checks. 229215fb4814Smrg# 'test_compile' -- check by making test program. 229315fb4814Smrg# 'file_magic [[regex]]' -- check by looking for files in library path 229415fb4814Smrg# which responds to the $file_magic_cmd with a given extended regex. 229515fb4814Smrg# If you have `file' or equivalent on your system and you're not sure 229615fb4814Smrg# whether `pass_all' will *always* work, you probably want this one. 229715fb4814Smrg 229815fb4814Smrgcase $host_os in 229915fb4814Smrgaix4* | aix5*) 230015fb4814Smrg lt_cv_deplibs_check_method=pass_all 230115fb4814Smrg ;; 230215fb4814Smrg 230315fb4814Smrgbeos*) 230415fb4814Smrg lt_cv_deplibs_check_method=pass_all 230515fb4814Smrg ;; 230615fb4814Smrg 230715fb4814Smrgbsdi[[45]]*) 230815fb4814Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 230915fb4814Smrg lt_cv_file_magic_cmd='/usr/bin/file -L' 231015fb4814Smrg lt_cv_file_magic_test_file=/shlib/libc.so 231115fb4814Smrg ;; 231215fb4814Smrg 231315fb4814Smrgcygwin*) 231415fb4814Smrg # func_win32_libid is a shell function defined in ltmain.sh 231515fb4814Smrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 231615fb4814Smrg lt_cv_file_magic_cmd='func_win32_libid' 231715fb4814Smrg ;; 231815fb4814Smrg 231915fb4814Smrgmingw* | pw32*) 232015fb4814Smrg # Base MSYS/MinGW do not provide the 'file' command needed by 232115fb4814Smrg # func_win32_libid shell function, so use a weaker test based on 'objdump'. 232215fb4814Smrg lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' 232315fb4814Smrg lt_cv_file_magic_cmd='$OBJDUMP -f' 232415fb4814Smrg ;; 232515fb4814Smrg 232615fb4814Smrgdarwin* | rhapsody*) 232715fb4814Smrg lt_cv_deplibs_check_method=pass_all 232815fb4814Smrg ;; 232915fb4814Smrg 233015fb4814Smrgfreebsd* | kfreebsd*-gnu | dragonfly*) 233115fb4814Smrg if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then 233215fb4814Smrg case $host_cpu in 233315fb4814Smrg i*86 ) 233415fb4814Smrg # Not sure whether the presence of OpenBSD here was a mistake. 233515fb4814Smrg # Let's accept both of them until this is cleared up. 233615fb4814Smrg lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 233715fb4814Smrg lt_cv_file_magic_cmd=/usr/bin/file 233815fb4814Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 233915fb4814Smrg ;; 234015fb4814Smrg esac 234115fb4814Smrg else 234215fb4814Smrg lt_cv_deplibs_check_method=pass_all 234315fb4814Smrg fi 234415fb4814Smrg ;; 234515fb4814Smrg 234615fb4814Smrggnu*) 234715fb4814Smrg lt_cv_deplibs_check_method=pass_all 234815fb4814Smrg ;; 234915fb4814Smrg 235015fb4814Smrghpux10.20* | hpux11*) 235115fb4814Smrg lt_cv_file_magic_cmd=/usr/bin/file 235215fb4814Smrg case $host_cpu in 235315fb4814Smrg ia64*) 235415fb4814Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 235515fb4814Smrg lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 235615fb4814Smrg ;; 235715fb4814Smrg hppa*64*) 235815fb4814Smrg [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]'] 235915fb4814Smrg lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 236015fb4814Smrg ;; 236115fb4814Smrg *) 236215fb4814Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' 236315fb4814Smrg lt_cv_file_magic_test_file=/usr/lib/libc.sl 236415fb4814Smrg ;; 236515fb4814Smrg esac 236615fb4814Smrg ;; 236715fb4814Smrg 236815fb4814Smrginterix3*) 236915fb4814Smrg # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 237015fb4814Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 237115fb4814Smrg ;; 237215fb4814Smrg 237315fb4814Smrgirix5* | irix6* | nonstopux*) 237415fb4814Smrg case $LD in 237515fb4814Smrg *-32|*"-32 ") libmagic=32-bit;; 237615fb4814Smrg *-n32|*"-n32 ") libmagic=N32;; 237715fb4814Smrg *-64|*"-64 ") libmagic=64-bit;; 237815fb4814Smrg *) libmagic=never-match;; 237915fb4814Smrg esac 238015fb4814Smrg lt_cv_deplibs_check_method=pass_all 238115fb4814Smrg ;; 238215fb4814Smrg 238315fb4814Smrg# This must be Linux ELF. 238415fb4814Smrglinux*) 238515fb4814Smrg lt_cv_deplibs_check_method=pass_all 238615fb4814Smrg ;; 238715fb4814Smrg 238815fb4814Smrgnetbsd*) 238915fb4814Smrg if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then 239015fb4814Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 239115fb4814Smrg else 239215fb4814Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 239315fb4814Smrg fi 239415fb4814Smrg ;; 239515fb4814Smrg 239615fb4814Smrgnewos6*) 239715fb4814Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 239815fb4814Smrg lt_cv_file_magic_cmd=/usr/bin/file 239915fb4814Smrg lt_cv_file_magic_test_file=/usr/lib/libnls.so 240015fb4814Smrg ;; 240115fb4814Smrg 240215fb4814Smrgnto-qnx*) 240315fb4814Smrg lt_cv_deplibs_check_method=unknown 240415fb4814Smrg ;; 240515fb4814Smrg 240615fb4814Smrgopenbsd*) 240715fb4814Smrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 240815fb4814Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 240915fb4814Smrg else 241015fb4814Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 241115fb4814Smrg fi 241215fb4814Smrg ;; 241315fb4814Smrg 241415fb4814Smrgosf3* | osf4* | osf5*) 241515fb4814Smrg lt_cv_deplibs_check_method=pass_all 241615fb4814Smrg ;; 241715fb4814Smrg 241815fb4814Smrgsolaris*) 241915fb4814Smrg lt_cv_deplibs_check_method=pass_all 242015fb4814Smrg ;; 242115fb4814Smrg 242215fb4814Smrgsysv4 | sysv4.3*) 242315fb4814Smrg case $host_vendor in 242415fb4814Smrg motorola) 242515fb4814Smrg 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]]' 242615fb4814Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 242715fb4814Smrg ;; 242815fb4814Smrg ncr) 242915fb4814Smrg lt_cv_deplibs_check_method=pass_all 243015fb4814Smrg ;; 243115fb4814Smrg sequent) 243215fb4814Smrg lt_cv_file_magic_cmd='/bin/file' 243315fb4814Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 243415fb4814Smrg ;; 243515fb4814Smrg sni) 243615fb4814Smrg lt_cv_file_magic_cmd='/bin/file' 243715fb4814Smrg lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 243815fb4814Smrg lt_cv_file_magic_test_file=/lib/libc.so 243915fb4814Smrg ;; 244015fb4814Smrg siemens) 244115fb4814Smrg lt_cv_deplibs_check_method=pass_all 244215fb4814Smrg ;; 244315fb4814Smrg pc) 244415fb4814Smrg lt_cv_deplibs_check_method=pass_all 244515fb4814Smrg ;; 244615fb4814Smrg esac 244715fb4814Smrg ;; 244815fb4814Smrg 244915fb4814Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 245015fb4814Smrg lt_cv_deplibs_check_method=pass_all 245115fb4814Smrg ;; 245215fb4814Smrgesac 245315fb4814Smrg]) 245415fb4814Smrgfile_magic_cmd=$lt_cv_file_magic_cmd 245515fb4814Smrgdeplibs_check_method=$lt_cv_deplibs_check_method 245615fb4814Smrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown 245715fb4814Smrg])# AC_DEPLIBS_CHECK_METHOD 245815fb4814Smrg 245915fb4814Smrg 246015fb4814Smrg# AC_PROG_NM 246115fb4814Smrg# ---------- 246215fb4814Smrg# find the pathname to a BSD-compatible name lister 246315fb4814SmrgAC_DEFUN([AC_PROG_NM], 246415fb4814Smrg[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM, 246515fb4814Smrg[if test -n "$NM"; then 246615fb4814Smrg # Let the user override the test. 246715fb4814Smrg lt_cv_path_NM="$NM" 246815fb4814Smrgelse 246915fb4814Smrg lt_nm_to_check="${ac_tool_prefix}nm" 247015fb4814Smrg if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 247115fb4814Smrg lt_nm_to_check="$lt_nm_to_check nm" 247215fb4814Smrg fi 247315fb4814Smrg for lt_tmp_nm in $lt_nm_to_check; do 247415fb4814Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 247515fb4814Smrg for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 247615fb4814Smrg IFS="$lt_save_ifs" 247715fb4814Smrg test -z "$ac_dir" && ac_dir=. 247815fb4814Smrg tmp_nm="$ac_dir/$lt_tmp_nm" 247915fb4814Smrg if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then 248015fb4814Smrg # Check to see if the nm accepts a BSD-compat flag. 248115fb4814Smrg # Adding the `sed 1q' prevents false positives on HP-UX, which says: 248215fb4814Smrg # nm: unknown option "B" ignored 248315fb4814Smrg # Tru64's nm complains that /dev/null is an invalid object file 248415fb4814Smrg case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in 248515fb4814Smrg */dev/null* | *'Invalid file or object type'*) 248615fb4814Smrg lt_cv_path_NM="$tmp_nm -B" 248715fb4814Smrg break 248815fb4814Smrg ;; 248915fb4814Smrg *) 249015fb4814Smrg case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in 249115fb4814Smrg */dev/null*) 249215fb4814Smrg lt_cv_path_NM="$tmp_nm -p" 249315fb4814Smrg break 249415fb4814Smrg ;; 249515fb4814Smrg *) 249615fb4814Smrg lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 249715fb4814Smrg continue # so that we can try to find one that supports BSD flags 249815fb4814Smrg ;; 249915fb4814Smrg esac 250015fb4814Smrg ;; 250115fb4814Smrg esac 250215fb4814Smrg fi 250315fb4814Smrg done 250415fb4814Smrg IFS="$lt_save_ifs" 250515fb4814Smrg done 250615fb4814Smrg test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm 250715fb4814Smrgfi]) 250815fb4814SmrgNM="$lt_cv_path_NM" 250915fb4814Smrg])# AC_PROG_NM 251015fb4814Smrg 251115fb4814Smrg 251215fb4814Smrg# AC_CHECK_LIBM 251315fb4814Smrg# ------------- 251415fb4814Smrg# check for math library 251515fb4814SmrgAC_DEFUN([AC_CHECK_LIBM], 251615fb4814Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 251715fb4814SmrgLIBM= 251815fb4814Smrgcase $host in 251915fb4814Smrg*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) 252015fb4814Smrg # These system don't have libm, or don't need it 252115fb4814Smrg ;; 252215fb4814Smrg*-ncr-sysv4.3*) 252315fb4814Smrg AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") 252415fb4814Smrg AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 252515fb4814Smrg ;; 252615fb4814Smrg*) 252715fb4814Smrg AC_CHECK_LIB(m, cos, LIBM="-lm") 252815fb4814Smrg ;; 252915fb4814Smrgesac 253015fb4814Smrg])# AC_CHECK_LIBM 253115fb4814Smrg 253215fb4814Smrg 253315fb4814Smrg# AC_LIBLTDL_CONVENIENCE([DIRECTORY]) 253415fb4814Smrg# ----------------------------------- 253515fb4814Smrg# sets LIBLTDL to the link flags for the libltdl convenience library and 253615fb4814Smrg# LTDLINCL to the include flags for the libltdl header and adds 253715fb4814Smrg# --enable-ltdl-convenience to the configure arguments. Note that 253815fb4814Smrg# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, 253915fb4814Smrg# it is assumed to be `libltdl'. LIBLTDL will be prefixed with 254015fb4814Smrg# '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/' 254115fb4814Smrg# (note the single quotes!). If your package is not flat and you're not 254215fb4814Smrg# using automake, define top_builddir and top_srcdir appropriately in 254315fb4814Smrg# the Makefiles. 254415fb4814SmrgAC_DEFUN([AC_LIBLTDL_CONVENIENCE], 254515fb4814Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 254615fb4814Smrg case $enable_ltdl_convenience in 254715fb4814Smrg no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; 254815fb4814Smrg "") enable_ltdl_convenience=yes 254915fb4814Smrg ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; 255015fb4814Smrg esac 255115fb4814Smrg LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la 255215fb4814Smrg LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) 255315fb4814Smrg # For backwards non-gettext consistent compatibility... 255415fb4814Smrg INCLTDL="$LTDLINCL" 255515fb4814Smrg])# AC_LIBLTDL_CONVENIENCE 255615fb4814Smrg 255715fb4814Smrg 255815fb4814Smrg# AC_LIBLTDL_INSTALLABLE([DIRECTORY]) 255915fb4814Smrg# ----------------------------------- 256015fb4814Smrg# sets LIBLTDL to the link flags for the libltdl installable library and 256115fb4814Smrg# LTDLINCL to the include flags for the libltdl header and adds 256215fb4814Smrg# --enable-ltdl-install to the configure arguments. Note that 256315fb4814Smrg# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, 256415fb4814Smrg# and an installed libltdl is not found, it is assumed to be `libltdl'. 256515fb4814Smrg# LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with 256615fb4814Smrg# '${top_srcdir}/' (note the single quotes!). If your package is not 256715fb4814Smrg# flat and you're not using automake, define top_builddir and top_srcdir 256815fb4814Smrg# appropriately in the Makefiles. 256915fb4814Smrg# In the future, this macro may have to be called after AC_PROG_LIBTOOL. 257015fb4814SmrgAC_DEFUN([AC_LIBLTDL_INSTALLABLE], 257115fb4814Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 257215fb4814Smrg AC_CHECK_LIB(ltdl, lt_dlinit, 257315fb4814Smrg [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no], 257415fb4814Smrg [if test x"$enable_ltdl_install" = xno; then 257515fb4814Smrg AC_MSG_WARN([libltdl not installed, but installation disabled]) 257615fb4814Smrg else 257715fb4814Smrg enable_ltdl_install=yes 257815fb4814Smrg fi 257915fb4814Smrg ]) 258015fb4814Smrg if test x"$enable_ltdl_install" = x"yes"; then 258115fb4814Smrg ac_configure_args="$ac_configure_args --enable-ltdl-install" 258215fb4814Smrg LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la 258315fb4814Smrg LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) 258415fb4814Smrg else 258515fb4814Smrg ac_configure_args="$ac_configure_args --enable-ltdl-install=no" 258615fb4814Smrg LIBLTDL="-lltdl" 258715fb4814Smrg LTDLINCL= 258815fb4814Smrg fi 258915fb4814Smrg # For backwards non-gettext consistent compatibility... 259015fb4814Smrg INCLTDL="$LTDLINCL" 259115fb4814Smrg])# AC_LIBLTDL_INSTALLABLE 259215fb4814Smrg 259315fb4814Smrg 259415fb4814Smrg# AC_LIBTOOL_CXX 259515fb4814Smrg# -------------- 259615fb4814Smrg# enable support for C++ libraries 259715fb4814SmrgAC_DEFUN([AC_LIBTOOL_CXX], 259815fb4814Smrg[AC_REQUIRE([_LT_AC_LANG_CXX]) 259915fb4814Smrg])# AC_LIBTOOL_CXX 260015fb4814Smrg 260115fb4814Smrg 260215fb4814Smrg# _LT_AC_LANG_CXX 260315fb4814Smrg# --------------- 260415fb4814SmrgAC_DEFUN([_LT_AC_LANG_CXX], 260515fb4814Smrg[AC_REQUIRE([AC_PROG_CXX]) 260615fb4814SmrgAC_REQUIRE([_LT_AC_PROG_CXXCPP]) 260715fb4814Smrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX]) 260815fb4814Smrg])# _LT_AC_LANG_CXX 260915fb4814Smrg 261015fb4814Smrg# _LT_AC_PROG_CXXCPP 261115fb4814Smrg# ------------------ 261215fb4814SmrgAC_DEFUN([_LT_AC_PROG_CXXCPP], 261315fb4814Smrg[ 261415fb4814SmrgAC_REQUIRE([AC_PROG_CXX]) 261515fb4814Smrgif test -n "$CXX" && ( test "X$CXX" != "Xno" && 261615fb4814Smrg ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || 261715fb4814Smrg (test "X$CXX" != "Xg++"))) ; then 261815fb4814Smrg AC_PROG_CXXCPP 261915fb4814Smrgfi 262015fb4814Smrg])# _LT_AC_PROG_CXXCPP 262115fb4814Smrg 262215fb4814Smrg# AC_LIBTOOL_F77 262315fb4814Smrg# -------------- 262415fb4814Smrg# enable support for Fortran 77 libraries 262515fb4814SmrgAC_DEFUN([AC_LIBTOOL_F77], 262615fb4814Smrg[AC_REQUIRE([_LT_AC_LANG_F77]) 262715fb4814Smrg])# AC_LIBTOOL_F77 262815fb4814Smrg 262915fb4814Smrg 263015fb4814Smrg# _LT_AC_LANG_F77 263115fb4814Smrg# --------------- 263215fb4814SmrgAC_DEFUN([_LT_AC_LANG_F77], 263315fb4814Smrg[AC_REQUIRE([AC_PROG_F77]) 263415fb4814Smrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77]) 263515fb4814Smrg])# _LT_AC_LANG_F77 263615fb4814Smrg 263715fb4814Smrg 263815fb4814Smrg# AC_LIBTOOL_GCJ 263915fb4814Smrg# -------------- 264015fb4814Smrg# enable support for GCJ libraries 264115fb4814SmrgAC_DEFUN([AC_LIBTOOL_GCJ], 264215fb4814Smrg[AC_REQUIRE([_LT_AC_LANG_GCJ]) 264315fb4814Smrg])# AC_LIBTOOL_GCJ 264415fb4814Smrg 264515fb4814Smrg 264615fb4814Smrg# _LT_AC_LANG_GCJ 264715fb4814Smrg# --------------- 264815fb4814SmrgAC_DEFUN([_LT_AC_LANG_GCJ], 264915fb4814Smrg[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[], 265015fb4814Smrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[], 265115fb4814Smrg [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[], 265215fb4814Smrg [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])], 265315fb4814Smrg [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])], 265415fb4814Smrg [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])]) 265515fb4814Smrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ]) 265615fb4814Smrg])# _LT_AC_LANG_GCJ 265715fb4814Smrg 265815fb4814Smrg 265915fb4814Smrg# AC_LIBTOOL_RC 266015fb4814Smrg# ------------- 266115fb4814Smrg# enable support for Windows resource files 266215fb4814SmrgAC_DEFUN([AC_LIBTOOL_RC], 266315fb4814Smrg[AC_REQUIRE([LT_AC_PROG_RC]) 266415fb4814Smrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC]) 266515fb4814Smrg])# AC_LIBTOOL_RC 266615fb4814Smrg 266715fb4814Smrg 266815fb4814Smrg# AC_LIBTOOL_LANG_C_CONFIG 266915fb4814Smrg# ------------------------ 267015fb4814Smrg# Ensure that the configuration vars for the C compiler are 267115fb4814Smrg# suitably defined. Those variables are subsequently used by 267215fb4814Smrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 267315fb4814SmrgAC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG]) 267415fb4814SmrgAC_DEFUN([_LT_AC_LANG_C_CONFIG], 267515fb4814Smrg[lt_save_CC="$CC" 267615fb4814SmrgAC_LANG_PUSH(C) 267715fb4814Smrg 267815fb4814Smrg# Source file extension for C test sources. 267915fb4814Smrgac_ext=c 268015fb4814Smrg 268115fb4814Smrg# Object file extension for compiled C test sources. 268215fb4814Smrgobjext=o 268315fb4814Smrg_LT_AC_TAGVAR(objext, $1)=$objext 268415fb4814Smrg 268515fb4814Smrg# Code to be used in simple compile tests 268615fb4814Smrglt_simple_compile_test_code="int some_variable = 0;\n" 268715fb4814Smrg 268815fb4814Smrg# Code to be used in simple link tests 268915fb4814Smrglt_simple_link_test_code='int main(){return(0);}\n' 269015fb4814Smrg 269115fb4814Smrg_LT_AC_SYS_COMPILER 269215fb4814Smrg 269315fb4814Smrg# save warnings/boilerplate of simple test code 269415fb4814Smrg_LT_COMPILER_BOILERPLATE 269515fb4814Smrg_LT_LINKER_BOILERPLATE 269615fb4814Smrg 269715fb4814SmrgAC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) 269815fb4814SmrgAC_LIBTOOL_PROG_COMPILER_PIC($1) 269915fb4814SmrgAC_LIBTOOL_PROG_CC_C_O($1) 270015fb4814SmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) 270115fb4814SmrgAC_LIBTOOL_PROG_LD_SHLIBS($1) 270215fb4814SmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1) 270315fb4814SmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) 270415fb4814SmrgAC_LIBTOOL_SYS_LIB_STRIP 270515fb4814SmrgAC_LIBTOOL_DLOPEN_SELF 270615fb4814Smrg 270715fb4814Smrg# Report which library types will actually be built 270815fb4814SmrgAC_MSG_CHECKING([if libtool supports shared libraries]) 270915fb4814SmrgAC_MSG_RESULT([$can_build_shared]) 271015fb4814Smrg 271115fb4814SmrgAC_MSG_CHECKING([whether to build shared libraries]) 271215fb4814Smrgtest "$can_build_shared" = "no" && enable_shared=no 271315fb4814Smrg 271415fb4814Smrg# On AIX, shared libraries and static libraries use the same namespace, and 271515fb4814Smrg# are all built from PIC. 271615fb4814Smrgcase $host_os in 271715fb4814Smrgaix3*) 271815fb4814Smrg test "$enable_shared" = yes && enable_static=no 271915fb4814Smrg if test -n "$RANLIB"; then 272015fb4814Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 272115fb4814Smrg postinstall_cmds='$RANLIB $lib' 272215fb4814Smrg fi 272315fb4814Smrg ;; 272415fb4814Smrg 272515fb4814Smrgaix4* | aix5*) 272615fb4814Smrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 272715fb4814Smrg test "$enable_shared" = yes && enable_static=no 272815fb4814Smrg fi 272915fb4814Smrg ;; 273015fb4814Smrgesac 273115fb4814SmrgAC_MSG_RESULT([$enable_shared]) 273215fb4814Smrg 273315fb4814SmrgAC_MSG_CHECKING([whether to build static libraries]) 273415fb4814Smrg# Make sure either enable_shared or enable_static is yes. 273515fb4814Smrgtest "$enable_shared" = yes || enable_static=yes 273615fb4814SmrgAC_MSG_RESULT([$enable_static]) 273715fb4814Smrg 273815fb4814SmrgAC_LIBTOOL_CONFIG($1) 273915fb4814Smrg 274015fb4814SmrgAC_LANG_POP 274115fb4814SmrgCC="$lt_save_CC" 274215fb4814Smrg])# AC_LIBTOOL_LANG_C_CONFIG 274315fb4814Smrg 274415fb4814Smrg 274515fb4814Smrg# AC_LIBTOOL_LANG_CXX_CONFIG 274615fb4814Smrg# -------------------------- 274715fb4814Smrg# Ensure that the configuration vars for the C compiler are 274815fb4814Smrg# suitably defined. Those variables are subsequently used by 274915fb4814Smrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 275015fb4814SmrgAC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)]) 275115fb4814SmrgAC_DEFUN([_LT_AC_LANG_CXX_CONFIG], 275215fb4814Smrg[AC_LANG_PUSH(C++) 275315fb4814SmrgAC_REQUIRE([AC_PROG_CXX]) 275415fb4814SmrgAC_REQUIRE([_LT_AC_PROG_CXXCPP]) 275515fb4814Smrg 275615fb4814Smrg_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 275715fb4814Smrg_LT_AC_TAGVAR(allow_undefined_flag, $1)= 275815fb4814Smrg_LT_AC_TAGVAR(always_export_symbols, $1)=no 275915fb4814Smrg_LT_AC_TAGVAR(archive_expsym_cmds, $1)= 276015fb4814Smrg_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= 276115fb4814Smrg_LT_AC_TAGVAR(hardcode_direct, $1)=no 276215fb4814Smrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= 276315fb4814Smrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 276415fb4814Smrg_LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 276515fb4814Smrg_LT_AC_TAGVAR(hardcode_minus_L, $1)=no 276615fb4814Smrg_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 276715fb4814Smrg_LT_AC_TAGVAR(hardcode_automatic, $1)=no 276815fb4814Smrg_LT_AC_TAGVAR(module_cmds, $1)= 276915fb4814Smrg_LT_AC_TAGVAR(module_expsym_cmds, $1)= 277015fb4814Smrg_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown 277115fb4814Smrg_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 277215fb4814Smrg_LT_AC_TAGVAR(no_undefined_flag, $1)= 277315fb4814Smrg_LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 277415fb4814Smrg_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no 277515fb4814Smrg 277615fb4814Smrg# Dependencies to place before and after the object being linked: 277715fb4814Smrg_LT_AC_TAGVAR(predep_objects, $1)= 277815fb4814Smrg_LT_AC_TAGVAR(postdep_objects, $1)= 277915fb4814Smrg_LT_AC_TAGVAR(predeps, $1)= 278015fb4814Smrg_LT_AC_TAGVAR(postdeps, $1)= 278115fb4814Smrg_LT_AC_TAGVAR(compiler_lib_search_path, $1)= 278215fb4814Smrg 278315fb4814Smrg# Source file extension for C++ test sources. 278415fb4814Smrgac_ext=cpp 278515fb4814Smrg 278615fb4814Smrg# Object file extension for compiled C++ test sources. 278715fb4814Smrgobjext=o 278815fb4814Smrg_LT_AC_TAGVAR(objext, $1)=$objext 278915fb4814Smrg 279015fb4814Smrg# Code to be used in simple compile tests 279115fb4814Smrglt_simple_compile_test_code="int some_variable = 0;\n" 279215fb4814Smrg 279315fb4814Smrg# Code to be used in simple link tests 279415fb4814Smrglt_simple_link_test_code='int main(int, char *[[]]) { return(0); }\n' 279515fb4814Smrg 279615fb4814Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 279715fb4814Smrg_LT_AC_SYS_COMPILER 279815fb4814Smrg 279915fb4814Smrg# save warnings/boilerplate of simple test code 280015fb4814Smrg_LT_COMPILER_BOILERPLATE 280115fb4814Smrg_LT_LINKER_BOILERPLATE 280215fb4814Smrg 280315fb4814Smrg# Allow CC to be a program name with arguments. 280415fb4814Smrglt_save_CC=$CC 280515fb4814Smrglt_save_LD=$LD 280615fb4814Smrglt_save_GCC=$GCC 280715fb4814SmrgGCC=$GXX 280815fb4814Smrglt_save_with_gnu_ld=$with_gnu_ld 280915fb4814Smrglt_save_path_LD=$lt_cv_path_LD 281015fb4814Smrgif test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 281115fb4814Smrg lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 281215fb4814Smrgelse 281315fb4814Smrg $as_unset lt_cv_prog_gnu_ld 281415fb4814Smrgfi 281515fb4814Smrgif test -n "${lt_cv_path_LDCXX+set}"; then 281615fb4814Smrg lt_cv_path_LD=$lt_cv_path_LDCXX 281715fb4814Smrgelse 281815fb4814Smrg $as_unset lt_cv_path_LD 281915fb4814Smrgfi 282015fb4814Smrgtest -z "${LDCXX+set}" || LD=$LDCXX 282115fb4814SmrgCC=${CXX-"c++"} 282215fb4814Smrgcompiler=$CC 282315fb4814Smrg_LT_AC_TAGVAR(compiler, $1)=$CC 282415fb4814Smrg_LT_CC_BASENAME([$compiler]) 282515fb4814Smrg 282615fb4814Smrg# We don't want -fno-exception wen compiling C++ code, so set the 282715fb4814Smrg# no_builtin_flag separately 282815fb4814Smrgif test "$GXX" = yes; then 282915fb4814Smrg _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 283015fb4814Smrgelse 283115fb4814Smrg _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 283215fb4814Smrgfi 283315fb4814Smrg 283415fb4814Smrgif test "$GXX" = yes; then 283515fb4814Smrg # Set up default GNU C++ configuration 283615fb4814Smrg 283715fb4814Smrg AC_PROG_LD 283815fb4814Smrg 283915fb4814Smrg # Check if GNU C++ uses GNU ld as the underlying linker, since the 284015fb4814Smrg # archiving commands below assume that GNU ld is being used. 284115fb4814Smrg if test "$with_gnu_ld" = yes; then 284215fb4814Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 284315fb4814Smrg _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' 284415fb4814Smrg 284515fb4814Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 284615fb4814Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 284715fb4814Smrg 284815fb4814Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 284915fb4814Smrg # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 285015fb4814Smrg # investigate it a little bit more. (MM) 285115fb4814Smrg wlarc='${wl}' 285215fb4814Smrg 285315fb4814Smrg # ancient GNU ld didn't support --whole-archive et. al. 285415fb4814Smrg if eval "`$CC -print-prog-name=ld` --help 2>&1" | \ 285515fb4814Smrg grep 'no-whole-archive' > /dev/null; then 285615fb4814Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 285715fb4814Smrg else 285815fb4814Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 285915fb4814Smrg fi 286015fb4814Smrg else 286115fb4814Smrg with_gnu_ld=no 286215fb4814Smrg wlarc= 286315fb4814Smrg 286415fb4814Smrg # A generic and very simple default shared library creation 286515fb4814Smrg # command for GNU C++ for the case where it uses the native 286615fb4814Smrg # linker, instead of GNU ld. If possible, this setting should 286715fb4814Smrg # overridden to take advantage of the native linker features on 286815fb4814Smrg # the platform it is being used on. 286915fb4814Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 287015fb4814Smrg fi 287115fb4814Smrg 287215fb4814Smrg # Commands to make compiler produce verbose output that lists 287315fb4814Smrg # what "hidden" libraries, object files and flags are used when 287415fb4814Smrg # linking a shared library. 287515fb4814Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' 287615fb4814Smrg 287715fb4814Smrgelse 287815fb4814Smrg GXX=no 287915fb4814Smrg with_gnu_ld=no 288015fb4814Smrg wlarc= 288115fb4814Smrgfi 288215fb4814Smrg 288315fb4814Smrg# PORTME: fill in a description of your system's C++ link characteristics 288415fb4814SmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 288515fb4814Smrg_LT_AC_TAGVAR(ld_shlibs, $1)=yes 288615fb4814Smrgcase $host_os in 288715fb4814Smrg aix3*) 288815fb4814Smrg # FIXME: insert proper C++ library support 288915fb4814Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 289015fb4814Smrg ;; 289115fb4814Smrg aix4* | aix5*) 289215fb4814Smrg if test "$host_cpu" = ia64; then 289315fb4814Smrg # On IA64, the linker does run time linking by default, so we don't 289415fb4814Smrg # have to do anything special. 289515fb4814Smrg aix_use_runtimelinking=no 289615fb4814Smrg exp_sym_flag='-Bexport' 289715fb4814Smrg no_entry_flag="" 289815fb4814Smrg else 289915fb4814Smrg aix_use_runtimelinking=no 290015fb4814Smrg 290115fb4814Smrg # Test if we are trying to use run time linking or normal 290215fb4814Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 290315fb4814Smrg # need to do runtime linking. 290415fb4814Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*) 290515fb4814Smrg for ld_flag in $LDFLAGS; do 290615fb4814Smrg case $ld_flag in 290715fb4814Smrg *-brtl*) 290815fb4814Smrg aix_use_runtimelinking=yes 290915fb4814Smrg break 291015fb4814Smrg ;; 291115fb4814Smrg esac 291215fb4814Smrg done 291315fb4814Smrg ;; 291415fb4814Smrg esac 291515fb4814Smrg 291615fb4814Smrg exp_sym_flag='-bexport' 291715fb4814Smrg no_entry_flag='-bnoentry' 291815fb4814Smrg fi 291915fb4814Smrg 292015fb4814Smrg # When large executables or shared objects are built, AIX ld can 292115fb4814Smrg # have problems creating the table of contents. If linking a library 292215fb4814Smrg # or program results in "error TOC overflow" add -mminimal-toc to 292315fb4814Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 292415fb4814Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 292515fb4814Smrg 292615fb4814Smrg _LT_AC_TAGVAR(archive_cmds, $1)='' 292715fb4814Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 292815fb4814Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' 292915fb4814Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 293015fb4814Smrg 293115fb4814Smrg if test "$GXX" = yes; then 293215fb4814Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 293315fb4814Smrg # We only want to do this on AIX 4.2 and lower, the check 293415fb4814Smrg # below for broken collect2 doesn't work under 4.3+ 293515fb4814Smrg collect2name=`${CC} -print-prog-name=collect2` 293615fb4814Smrg if test -f "$collect2name" && \ 293715fb4814Smrg strings "$collect2name" | grep resolve_lib_name >/dev/null 293815fb4814Smrg then 293915fb4814Smrg # We have reworked collect2 294015fb4814Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 294115fb4814Smrg else 294215fb4814Smrg # We have old collect2 294315fb4814Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported 294415fb4814Smrg # It fails to find uninstalled libraries when the uninstalled 294515fb4814Smrg # path is not listed in the libpath. Setting hardcode_minus_L 294615fb4814Smrg # to unsupported forces relinking 294715fb4814Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 294815fb4814Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 294915fb4814Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 295015fb4814Smrg fi 295115fb4814Smrg ;; 295215fb4814Smrg esac 295315fb4814Smrg shared_flag='-shared' 295415fb4814Smrg if test "$aix_use_runtimelinking" = yes; then 295515fb4814Smrg shared_flag="$shared_flag "'${wl}-G' 295615fb4814Smrg fi 295715fb4814Smrg else 295815fb4814Smrg # not using gcc 295915fb4814Smrg if test "$host_cpu" = ia64; then 296015fb4814Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 296115fb4814Smrg # chokes on -Wl,-G. The following line is correct: 296215fb4814Smrg shared_flag='-G' 296315fb4814Smrg else 296415fb4814Smrg if test "$aix_use_runtimelinking" = yes; then 296515fb4814Smrg shared_flag='${wl}-G' 296615fb4814Smrg else 296715fb4814Smrg shared_flag='${wl}-bM:SRE' 296815fb4814Smrg fi 296915fb4814Smrg fi 297015fb4814Smrg fi 297115fb4814Smrg 297215fb4814Smrg # It seems that -bexpall does not export symbols beginning with 297315fb4814Smrg # underscore (_), so it is better to generate a list of symbols to export. 297415fb4814Smrg _LT_AC_TAGVAR(always_export_symbols, $1)=yes 297515fb4814Smrg if test "$aix_use_runtimelinking" = yes; then 297615fb4814Smrg # Warning - without using the other runtime loading flags (-brtl), 297715fb4814Smrg # -berok will link without error, but may produce a broken library. 297815fb4814Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' 297915fb4814Smrg # Determine the default libpath from the value encoded in an empty executable. 298015fb4814Smrg _LT_AC_SYS_LIBPATH_AIX 298115fb4814Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 298215fb4814Smrg 298315fb4814Smrg _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" 298415fb4814Smrg else 298515fb4814Smrg if test "$host_cpu" = ia64; then 298615fb4814Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 298715fb4814Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 298815fb4814Smrg _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" 298915fb4814Smrg else 299015fb4814Smrg # Determine the default libpath from the value encoded in an empty executable. 299115fb4814Smrg _LT_AC_SYS_LIBPATH_AIX 299215fb4814Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 299315fb4814Smrg # Warning - without using the other run time loading flags, 299415fb4814Smrg # -berok will link without error, but may produce a broken library. 299515fb4814Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 299615fb4814Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 299715fb4814Smrg # Exported symbols can be pulled into shared objects from archives 299815fb4814Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 299915fb4814Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes 300015fb4814Smrg # This is similar to how AIX traditionally builds its shared libraries. 300115fb4814Smrg _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' 300215fb4814Smrg fi 300315fb4814Smrg fi 300415fb4814Smrg ;; 300515fb4814Smrg 300615fb4814Smrg beos*) 300715fb4814Smrg if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 300815fb4814Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 300915fb4814Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 301015fb4814Smrg # support --undefined. This deserves some investigation. FIXME 301115fb4814Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 301215fb4814Smrg else 301315fb4814Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 301415fb4814Smrg fi 301515fb4814Smrg ;; 301615fb4814Smrg 301715fb4814Smrg chorus*) 301815fb4814Smrg case $cc_basename in 301915fb4814Smrg *) 302015fb4814Smrg # FIXME: insert proper C++ library support 302115fb4814Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 302215fb4814Smrg ;; 302315fb4814Smrg esac 302415fb4814Smrg ;; 302515fb4814Smrg 302615fb4814Smrg cygwin* | mingw* | pw32*) 302715fb4814Smrg # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 302815fb4814Smrg # as there is no search path for DLLs. 302915fb4814Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 303015fb4814Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 303115fb4814Smrg _LT_AC_TAGVAR(always_export_symbols, $1)=no 303215fb4814Smrg _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 303315fb4814Smrg 303415fb4814Smrg if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then 303515fb4814Smrg _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' 303615fb4814Smrg # If the export-symbols file already is a .def file (1st line 303715fb4814Smrg # is EXPORTS), use it as is; otherwise, prepend... 303815fb4814Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 303915fb4814Smrg cp $export_symbols $output_objdir/$soname.def; 304015fb4814Smrg else 304115fb4814Smrg echo EXPORTS > $output_objdir/$soname.def; 304215fb4814Smrg cat $export_symbols >> $output_objdir/$soname.def; 304315fb4814Smrg fi~ 304415fb4814Smrg $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' 304515fb4814Smrg else 304615fb4814Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 304715fb4814Smrg fi 304815fb4814Smrg ;; 304915fb4814Smrg darwin* | rhapsody*) 305015fb4814Smrg case $host_os in 305115fb4814Smrg rhapsody* | darwin1.[[012]]) 305215fb4814Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' 305315fb4814Smrg ;; 305415fb4814Smrg *) # Darwin 1.3 on 305515fb4814Smrg if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then 305615fb4814Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' 305715fb4814Smrg else 305815fb4814Smrg case ${MACOSX_DEPLOYMENT_TARGET} in 305915fb4814Smrg 10.[[012]]) 306015fb4814Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' 306115fb4814Smrg ;; 306215fb4814Smrg 10.*) 306315fb4814Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup' 306415fb4814Smrg ;; 306515fb4814Smrg esac 306615fb4814Smrg fi 306715fb4814Smrg ;; 306815fb4814Smrg esac 306915fb4814Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 307015fb4814Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 307115fb4814Smrg _LT_AC_TAGVAR(hardcode_automatic, $1)=yes 307215fb4814Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 307315fb4814Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' 307415fb4814Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 307515fb4814Smrg 307615fb4814Smrg if test "$GXX" = yes ; then 307715fb4814Smrg lt_int_apple_cc_single_mod=no 307815fb4814Smrg output_verbose_link_cmd='echo' 307915fb4814Smrg if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then 308015fb4814Smrg lt_int_apple_cc_single_mod=yes 308115fb4814Smrg fi 308215fb4814Smrg if test "X$lt_int_apple_cc_single_mod" = Xyes ; then 308315fb4814Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' 308415fb4814Smrg else 308515fb4814Smrg _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' 308615fb4814Smrg fi 308715fb4814Smrg _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' 308815fb4814Smrg # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds 308915fb4814Smrg if test "X$lt_int_apple_cc_single_mod" = Xyes ; then 309015fb4814Smrg _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}' 309115fb4814Smrg else 309215fb4814Smrg _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}' 309315fb4814Smrg fi 309415fb4814Smrg _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}' 309515fb4814Smrg else 309615fb4814Smrg case $cc_basename in 309715fb4814Smrg xlc*) 309815fb4814Smrg output_verbose_link_cmd='echo' 309915fb4814Smrg _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' 310015fb4814Smrg _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' 310115fb4814Smrg # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds 310215fb4814Smrg _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}' 310315fb4814Smrg _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}' 310415fb4814Smrg ;; 310515fb4814Smrg *) 310615fb4814Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 310715fb4814Smrg ;; 310815fb4814Smrg esac 310915fb4814Smrg fi 311015fb4814Smrg ;; 311115fb4814Smrg 311215fb4814Smrg dgux*) 311315fb4814Smrg case $cc_basename in 311415fb4814Smrg ec++*) 311515fb4814Smrg # FIXME: insert proper C++ library support 311615fb4814Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 311715fb4814Smrg ;; 311815fb4814Smrg ghcx*) 311915fb4814Smrg # Green Hills C++ Compiler 312015fb4814Smrg # FIXME: insert proper C++ library support 312115fb4814Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 312215fb4814Smrg ;; 312315fb4814Smrg *) 312415fb4814Smrg # FIXME: insert proper C++ library support 312515fb4814Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 312615fb4814Smrg ;; 312715fb4814Smrg esac 312815fb4814Smrg ;; 312915fb4814Smrg freebsd[[12]]*) 313015fb4814Smrg # C++ shared libraries reported to be fairly broken before switch to ELF 313115fb4814Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 313215fb4814Smrg ;; 313315fb4814Smrg freebsd-elf*) 313415fb4814Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 313515fb4814Smrg ;; 313615fb4814Smrg freebsd* | kfreebsd*-gnu | dragonfly*) 313715fb4814Smrg # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 313815fb4814Smrg # conventions 313915fb4814Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=yes 314015fb4814Smrg ;; 314115fb4814Smrg gnu*) 314215fb4814Smrg ;; 314315fb4814Smrg hpux9*) 314415fb4814Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 314515fb4814Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 314615fb4814Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 314715fb4814Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 314815fb4814Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 314915fb4814Smrg # but as the default 315015fb4814Smrg # location of the library. 315115fb4814Smrg 315215fb4814Smrg case $cc_basename in 315315fb4814Smrg CC*) 315415fb4814Smrg # FIXME: insert proper C++ library support 315515fb4814Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 315615fb4814Smrg ;; 315715fb4814Smrg aCC*) 315815fb4814Smrg _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' 315915fb4814Smrg # Commands to make compiler produce verbose output that lists 316015fb4814Smrg # what "hidden" libraries, object files and flags are used when 316115fb4814Smrg # linking a shared library. 316215fb4814Smrg # 316315fb4814Smrg # There doesn't appear to be a way to prevent this compiler from 316415fb4814Smrg # explicitly linking system object files so we need to strip them 316515fb4814Smrg # from the output so that they don't get included in the library 316615fb4814Smrg # dependencies. 316715fb4814Smrg 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' 316815fb4814Smrg ;; 316915fb4814Smrg *) 317015fb4814Smrg if test "$GXX" = yes; then 317115fb4814Smrg _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' 317215fb4814Smrg else 317315fb4814Smrg # FIXME: insert proper C++ library support 317415fb4814Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 317515fb4814Smrg fi 317615fb4814Smrg ;; 317715fb4814Smrg esac 317815fb4814Smrg ;; 317915fb4814Smrg hpux10*|hpux11*) 318015fb4814Smrg if test $with_gnu_ld = no; then 318115fb4814Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 318215fb4814Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 318315fb4814Smrg 318415fb4814Smrg case $host_cpu in 318515fb4814Smrg hppa*64*|ia64*) 318615fb4814Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' 318715fb4814Smrg ;; 318815fb4814Smrg *) 318915fb4814Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 319015fb4814Smrg ;; 319115fb4814Smrg esac 319215fb4814Smrg fi 319315fb4814Smrg case $host_cpu in 319415fb4814Smrg hppa*64*|ia64*) 319515fb4814Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 319615fb4814Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 319715fb4814Smrg ;; 319815fb4814Smrg *) 319915fb4814Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 320015fb4814Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 320115fb4814Smrg # but as the default 320215fb4814Smrg # location of the library. 320315fb4814Smrg ;; 320415fb4814Smrg esac 320515fb4814Smrg 320615fb4814Smrg case $cc_basename in 320715fb4814Smrg CC*) 320815fb4814Smrg # FIXME: insert proper C++ library support 320915fb4814Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 321015fb4814Smrg ;; 321115fb4814Smrg aCC*) 321215fb4814Smrg case $host_cpu in 321315fb4814Smrg hppa*64*) 321415fb4814Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 321515fb4814Smrg ;; 321615fb4814Smrg ia64*) 321715fb4814Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 321815fb4814Smrg ;; 321915fb4814Smrg *) 322015fb4814Smrg _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' 322115fb4814Smrg ;; 322215fb4814Smrg esac 322315fb4814Smrg # Commands to make compiler produce verbose output that lists 322415fb4814Smrg # what "hidden" libraries, object files and flags are used when 322515fb4814Smrg # linking a shared library. 322615fb4814Smrg # 322715fb4814Smrg # There doesn't appear to be a way to prevent this compiler from 322815fb4814Smrg # explicitly linking system object files so we need to strip them 322915fb4814Smrg # from the output so that they don't get included in the library 323015fb4814Smrg # dependencies. 323115fb4814Smrg 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' 323215fb4814Smrg ;; 323315fb4814Smrg *) 323415fb4814Smrg if test "$GXX" = yes; then 323515fb4814Smrg if test $with_gnu_ld = no; then 323615fb4814Smrg case $host_cpu in 323715fb4814Smrg hppa*64*) 323815fb4814Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 323915fb4814Smrg ;; 324015fb4814Smrg ia64*) 324115fb4814Smrg _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' 324215fb4814Smrg ;; 324315fb4814Smrg *) 324415fb4814Smrg _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' 324515fb4814Smrg ;; 324615fb4814Smrg esac 324715fb4814Smrg fi 324815fb4814Smrg else 324915fb4814Smrg # FIXME: insert proper C++ library support 325015fb4814Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 325115fb4814Smrg fi 325215fb4814Smrg ;; 325315fb4814Smrg esac 325415fb4814Smrg ;; 325515fb4814Smrg interix3*) 325615fb4814Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 325715fb4814Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 325815fb4814Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 325915fb4814Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 326015fb4814Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 326115fb4814Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 326215fb4814Smrg # default) and relocated if they conflict, which is a slow very memory 326315fb4814Smrg # consuming and fragmenting process. To avoid this, we pick a random, 326415fb4814Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 326515fb4814Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 326615fb4814Smrg _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' 326715fb4814Smrg _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' 326815fb4814Smrg ;; 326915fb4814Smrg irix5* | irix6*) 327015fb4814Smrg case $cc_basename in 327115fb4814Smrg CC*) 327215fb4814Smrg # SGI C++ 327315fb4814Smrg _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' 327415fb4814Smrg 327515fb4814Smrg # Archives containing C++ object files must be created using 327615fb4814Smrg # "CC -ar", where "CC" is the IRIX C++ compiler. This is 327715fb4814Smrg # necessary to make sure instantiated templates are included 327815fb4814Smrg # in the archive. 327915fb4814Smrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 328015fb4814Smrg ;; 328115fb4814Smrg *) 328215fb4814Smrg if test "$GXX" = yes; then 328315fb4814Smrg if test "$with_gnu_ld" = no; then 328415fb4814Smrg _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' 328515fb4814Smrg else 328615fb4814Smrg _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' 328715fb4814Smrg fi 328815fb4814Smrg fi 328915fb4814Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 329015fb4814Smrg ;; 329115fb4814Smrg esac 329215fb4814Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 329315fb4814Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 329415fb4814Smrg ;; 329515fb4814Smrg linux*) 329615fb4814Smrg case $cc_basename in 329715fb4814Smrg KCC*) 329815fb4814Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 329915fb4814Smrg 330015fb4814Smrg # KCC will only create a shared library if the output file 330115fb4814Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 330215fb4814Smrg # to its proper name (with version) after linking. 330315fb4814Smrg _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' 330415fb4814Smrg _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' 330515fb4814Smrg # Commands to make compiler produce verbose output that lists 330615fb4814Smrg # what "hidden" libraries, object files and flags are used when 330715fb4814Smrg # linking a shared library. 330815fb4814Smrg # 330915fb4814Smrg # There doesn't appear to be a way to prevent this compiler from 331015fb4814Smrg # explicitly linking system object files so we need to strip them 331115fb4814Smrg # from the output so that they don't get included in the library 331215fb4814Smrg # dependencies. 331315fb4814Smrg 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' 331415fb4814Smrg 331515fb4814Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir' 331615fb4814Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 331715fb4814Smrg 331815fb4814Smrg # Archives containing C++ object files must be created using 331915fb4814Smrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 332015fb4814Smrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 332115fb4814Smrg ;; 332215fb4814Smrg icpc*) 332315fb4814Smrg # Intel C++ 332415fb4814Smrg with_gnu_ld=yes 332515fb4814Smrg # version 8.0 and above of icpc choke on multiply defined symbols 332615fb4814Smrg # if we add $predep_objects and $postdep_objects, however 7.1 and 332715fb4814Smrg # earlier do not add the objects themselves. 332815fb4814Smrg case `$CC -V 2>&1` in 332915fb4814Smrg *"Version 7."*) 333015fb4814Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 333115fb4814Smrg _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' 333215fb4814Smrg ;; 333315fb4814Smrg *) # Version 8.0 or newer 333415fb4814Smrg tmp_idyn= 333515fb4814Smrg case $host_cpu in 333615fb4814Smrg ia64*) tmp_idyn=' -i_dynamic';; 333715fb4814Smrg esac 333815fb4814Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 333915fb4814Smrg _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' 334015fb4814Smrg ;; 334115fb4814Smrg esac 334215fb4814Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 334315fb4814Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 334415fb4814Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 334515fb4814Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 334615fb4814Smrg ;; 334715fb4814Smrg pgCC*) 334815fb4814Smrg # Portland Group C++ compiler 334915fb4814Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 335015fb4814Smrg _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' 335115fb4814Smrg 335215fb4814Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 335315fb4814Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 335415fb4814Smrg _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' 335515fb4814Smrg ;; 335615fb4814Smrg cxx*) 335715fb4814Smrg # Compaq C++ 335815fb4814Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 335915fb4814Smrg _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' 336015fb4814Smrg 336115fb4814Smrg runpath_var=LD_RUN_PATH 336215fb4814Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 336315fb4814Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 336415fb4814Smrg 336515fb4814Smrg # Commands to make compiler produce verbose output that lists 336615fb4814Smrg # what "hidden" libraries, object files and flags are used when 336715fb4814Smrg # linking a shared library. 336815fb4814Smrg # 336915fb4814Smrg # There doesn't appear to be a way to prevent this compiler from 337015fb4814Smrg # explicitly linking system object files so we need to strip them 337115fb4814Smrg # from the output so that they don't get included in the library 337215fb4814Smrg # dependencies. 337315fb4814Smrg 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' 337415fb4814Smrg ;; 337515fb4814Smrg esac 337615fb4814Smrg ;; 337715fb4814Smrg lynxos*) 337815fb4814Smrg # FIXME: insert proper C++ library support 337915fb4814Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 338015fb4814Smrg ;; 338115fb4814Smrg m88k*) 338215fb4814Smrg # FIXME: insert proper C++ library support 338315fb4814Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 338415fb4814Smrg ;; 338515fb4814Smrg mvs*) 338615fb4814Smrg case $cc_basename in 338715fb4814Smrg cxx*) 338815fb4814Smrg # FIXME: insert proper C++ library support 338915fb4814Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 339015fb4814Smrg ;; 339115fb4814Smrg *) 339215fb4814Smrg # FIXME: insert proper C++ library support 339315fb4814Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 339415fb4814Smrg ;; 339515fb4814Smrg esac 339615fb4814Smrg ;; 339715fb4814Smrg netbsd*) 339815fb4814Smrg if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then 339915fb4814Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 340015fb4814Smrg wlarc= 340115fb4814Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 340215fb4814Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 340315fb4814Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 340415fb4814Smrg fi 340515fb4814Smrg # Workaround some broken pre-1.5 toolchains 340615fb4814Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 340715fb4814Smrg ;; 340815fb4814Smrg openbsd2*) 340915fb4814Smrg # C++ shared libraries are fairly broken 341015fb4814Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 341115fb4814Smrg ;; 341215fb4814Smrg openbsd*) 341315fb4814Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 341415fb4814Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 341515fb4814Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 341615fb4814Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 341715fb4814Smrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 341815fb4814Smrg _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' 341915fb4814Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 342015fb4814Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 342115fb4814Smrg fi 342215fb4814Smrg output_verbose_link_cmd='echo' 342315fb4814Smrg ;; 342415fb4814Smrg osf3*) 342515fb4814Smrg case $cc_basename in 342615fb4814Smrg KCC*) 342715fb4814Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 342815fb4814Smrg 342915fb4814Smrg # KCC will only create a shared library if the output file 343015fb4814Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 343115fb4814Smrg # to its proper name (with version) after linking. 343215fb4814Smrg _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' 343315fb4814Smrg 343415fb4814Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 343515fb4814Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 343615fb4814Smrg 343715fb4814Smrg # Archives containing C++ object files must be created using 343815fb4814Smrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 343915fb4814Smrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 344015fb4814Smrg 344115fb4814Smrg ;; 344215fb4814Smrg RCC*) 344315fb4814Smrg # Rational C++ 2.4.1 344415fb4814Smrg # FIXME: insert proper C++ library support 344515fb4814Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 344615fb4814Smrg ;; 344715fb4814Smrg cxx*) 344815fb4814Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 344915fb4814Smrg _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' 345015fb4814Smrg 345115fb4814Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 345215fb4814Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 345315fb4814Smrg 345415fb4814Smrg # Commands to make compiler produce verbose output that lists 345515fb4814Smrg # what "hidden" libraries, object files and flags are used when 345615fb4814Smrg # linking a shared library. 345715fb4814Smrg # 345815fb4814Smrg # There doesn't appear to be a way to prevent this compiler from 345915fb4814Smrg # explicitly linking system object files so we need to strip them 346015fb4814Smrg # from the output so that they don't get included in the library 346115fb4814Smrg # dependencies. 346215fb4814Smrg 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' 346315fb4814Smrg ;; 346415fb4814Smrg *) 346515fb4814Smrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 346615fb4814Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 346715fb4814Smrg _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' 346815fb4814Smrg 346915fb4814Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 347015fb4814Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 347115fb4814Smrg 347215fb4814Smrg # Commands to make compiler produce verbose output that lists 347315fb4814Smrg # what "hidden" libraries, object files and flags are used when 347415fb4814Smrg # linking a shared library. 347515fb4814Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' 347615fb4814Smrg 347715fb4814Smrg else 347815fb4814Smrg # FIXME: insert proper C++ library support 347915fb4814Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 348015fb4814Smrg fi 348115fb4814Smrg ;; 348215fb4814Smrg esac 348315fb4814Smrg ;; 348415fb4814Smrg osf4* | osf5*) 348515fb4814Smrg case $cc_basename in 348615fb4814Smrg KCC*) 348715fb4814Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 348815fb4814Smrg 348915fb4814Smrg # KCC will only create a shared library if the output file 349015fb4814Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 349115fb4814Smrg # to its proper name (with version) after linking. 349215fb4814Smrg _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' 349315fb4814Smrg 349415fb4814Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 349515fb4814Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 349615fb4814Smrg 349715fb4814Smrg # Archives containing C++ object files must be created using 349815fb4814Smrg # the KAI C++ compiler. 349915fb4814Smrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' 350015fb4814Smrg ;; 350115fb4814Smrg RCC*) 350215fb4814Smrg # Rational C++ 2.4.1 350315fb4814Smrg # FIXME: insert proper C++ library support 350415fb4814Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 350515fb4814Smrg ;; 350615fb4814Smrg cxx*) 350715fb4814Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 350815fb4814Smrg _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' 350915fb4814Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 351015fb4814Smrg echo "-hidden">> $lib.exp~ 351115fb4814Smrg $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~ 351215fb4814Smrg $rm $lib.exp' 351315fb4814Smrg 351415fb4814Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 351515fb4814Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 351615fb4814Smrg 351715fb4814Smrg # Commands to make compiler produce verbose output that lists 351815fb4814Smrg # what "hidden" libraries, object files and flags are used when 351915fb4814Smrg # linking a shared library. 352015fb4814Smrg # 352115fb4814Smrg # There doesn't appear to be a way to prevent this compiler from 352215fb4814Smrg # explicitly linking system object files so we need to strip them 352315fb4814Smrg # from the output so that they don't get included in the library 352415fb4814Smrg # dependencies. 352515fb4814Smrg 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' 352615fb4814Smrg ;; 352715fb4814Smrg *) 352815fb4814Smrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 352915fb4814Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 353015fb4814Smrg _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' 353115fb4814Smrg 353215fb4814Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 353315fb4814Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 353415fb4814Smrg 353515fb4814Smrg # Commands to make compiler produce verbose output that lists 353615fb4814Smrg # what "hidden" libraries, object files and flags are used when 353715fb4814Smrg # linking a shared library. 353815fb4814Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' 353915fb4814Smrg 354015fb4814Smrg else 354115fb4814Smrg # FIXME: insert proper C++ library support 354215fb4814Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 354315fb4814Smrg fi 354415fb4814Smrg ;; 354515fb4814Smrg esac 354615fb4814Smrg ;; 354715fb4814Smrg psos*) 354815fb4814Smrg # FIXME: insert proper C++ library support 354915fb4814Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 355015fb4814Smrg ;; 355115fb4814Smrg sunos4*) 355215fb4814Smrg case $cc_basename in 355315fb4814Smrg CC*) 355415fb4814Smrg # Sun C++ 4.x 355515fb4814Smrg # FIXME: insert proper C++ library support 355615fb4814Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 355715fb4814Smrg ;; 355815fb4814Smrg lcc*) 355915fb4814Smrg # Lucid 356015fb4814Smrg # FIXME: insert proper C++ library support 356115fb4814Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 356215fb4814Smrg ;; 356315fb4814Smrg *) 356415fb4814Smrg # FIXME: insert proper C++ library support 356515fb4814Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 356615fb4814Smrg ;; 356715fb4814Smrg esac 356815fb4814Smrg ;; 356915fb4814Smrg solaris*) 357015fb4814Smrg case $cc_basename in 357115fb4814Smrg CC*) 357215fb4814Smrg # Sun C++ 4.2, 5.x and Centerline C++ 357315fb4814Smrg _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes 357415fb4814Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' 357515fb4814Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 357615fb4814Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 357715fb4814Smrg $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' 357815fb4814Smrg 357915fb4814Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 358015fb4814Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 358115fb4814Smrg case $host_os in 358215fb4814Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 358315fb4814Smrg *) 358415fb4814Smrg # The C++ compiler is used as linker so we must use $wl 358515fb4814Smrg # flag to pass the commands to the underlying system 358615fb4814Smrg # linker. We must also pass each convience library through 358715fb4814Smrg # to the system linker between allextract/defaultextract. 358815fb4814Smrg # The C++ compiler will combine linker options so we 358915fb4814Smrg # cannot just pass the convience library names through 359015fb4814Smrg # without $wl. 359115fb4814Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 359215fb4814Smrg _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' 359315fb4814Smrg ;; 359415fb4814Smrg esac 359515fb4814Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 359615fb4814Smrg 359715fb4814Smrg output_verbose_link_cmd='echo' 359815fb4814Smrg 359915fb4814Smrg # Archives containing C++ object files must be created using 360015fb4814Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 360115fb4814Smrg # necessary to make sure instantiated templates are included 360215fb4814Smrg # in the archive. 360315fb4814Smrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 360415fb4814Smrg ;; 360515fb4814Smrg gcx*) 360615fb4814Smrg # Green Hills C++ Compiler 360715fb4814Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 360815fb4814Smrg 360915fb4814Smrg # The C++ compiler must be used to create the archive. 361015fb4814Smrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 361115fb4814Smrg ;; 361215fb4814Smrg *) 361315fb4814Smrg # GNU C++ compiler with Solaris linker 361415fb4814Smrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 361515fb4814Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' 361615fb4814Smrg if $CC --version | grep -v '^2\.7' > /dev/null; then 361715fb4814Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 361815fb4814Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 361915fb4814Smrg $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' 362015fb4814Smrg 362115fb4814Smrg # Commands to make compiler produce verbose output that lists 362215fb4814Smrg # what "hidden" libraries, object files and flags are used when 362315fb4814Smrg # linking a shared library. 362415fb4814Smrg output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" 362515fb4814Smrg else 362615fb4814Smrg # g++ 2.7 appears to require `-G' NOT `-shared' on this 362715fb4814Smrg # platform. 362815fb4814Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 362915fb4814Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 363015fb4814Smrg $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' 363115fb4814Smrg 363215fb4814Smrg # Commands to make compiler produce verbose output that lists 363315fb4814Smrg # what "hidden" libraries, object files and flags are used when 363415fb4814Smrg # linking a shared library. 363515fb4814Smrg output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" 363615fb4814Smrg fi 363715fb4814Smrg 363815fb4814Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' 363915fb4814Smrg fi 364015fb4814Smrg ;; 364115fb4814Smrg esac 364215fb4814Smrg ;; 364315fb4814Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 364415fb4814Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 364515fb4814Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 364615fb4814Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 364715fb4814Smrg runpath_var='LD_RUN_PATH' 364815fb4814Smrg 364915fb4814Smrg case $cc_basename in 365015fb4814Smrg CC*) 365115fb4814Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 365215fb4814Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 365315fb4814Smrg ;; 365415fb4814Smrg *) 365515fb4814Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 365615fb4814Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 365715fb4814Smrg ;; 365815fb4814Smrg esac 365915fb4814Smrg ;; 366015fb4814Smrg sysv5* | sco3.2v5* | sco5v6*) 366115fb4814Smrg # Note: We can NOT use -z defs as we might desire, because we do not 366215fb4814Smrg # link with -lc, and that would cause any symbols used from libc to 366315fb4814Smrg # always be unresolved, which means just about no library would 366415fb4814Smrg # ever link correctly. If we're not using GNU ld we use -z text 366515fb4814Smrg # though, which does catch some bad symbols but isn't as heavy-handed 366615fb4814Smrg # as -z defs. 366715fb4814Smrg # For security reasons, it is highly recommended that you always 366815fb4814Smrg # use absolute paths for naming shared libraries, and exclude the 366915fb4814Smrg # DT_RUNPATH tag from executables and libraries. But doing so 367015fb4814Smrg # requires that you compile everything twice, which is a pain. 367115fb4814Smrg # So that behaviour is only enabled if SCOABSPATH is set to a 367215fb4814Smrg # non-empty value in the environment. Most likely only useful for 367315fb4814Smrg # creating official distributions of packages. 367415fb4814Smrg # This is a hack until libtool officially supports absolute path 367515fb4814Smrg # names for shared libraries. 367615fb4814Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 367715fb4814Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 367815fb4814Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 367915fb4814Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 368015fb4814Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' 368115fb4814Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' 368215fb4814Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 368315fb4814Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 368415fb4814Smrg runpath_var='LD_RUN_PATH' 368515fb4814Smrg 368615fb4814Smrg case $cc_basename in 368715fb4814Smrg CC*) 368815fb4814Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' 368915fb4814Smrg _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' 369015fb4814Smrg ;; 369115fb4814Smrg *) 369215fb4814Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' 369315fb4814Smrg _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' 369415fb4814Smrg ;; 369515fb4814Smrg esac 369615fb4814Smrg ;; 369715fb4814Smrg tandem*) 369815fb4814Smrg case $cc_basename in 369915fb4814Smrg NCC*) 370015fb4814Smrg # NonStop-UX NCC 3.20 370115fb4814Smrg # FIXME: insert proper C++ library support 370215fb4814Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 370315fb4814Smrg ;; 370415fb4814Smrg *) 370515fb4814Smrg # FIXME: insert proper C++ library support 370615fb4814Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 370715fb4814Smrg ;; 370815fb4814Smrg esac 370915fb4814Smrg ;; 371015fb4814Smrg vxworks*) 371115fb4814Smrg # FIXME: insert proper C++ library support 371215fb4814Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 371315fb4814Smrg ;; 371415fb4814Smrg *) 371515fb4814Smrg # FIXME: insert proper C++ library support 371615fb4814Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 371715fb4814Smrg ;; 371815fb4814Smrgesac 371915fb4814SmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) 372015fb4814Smrgtest "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 372115fb4814Smrg 372215fb4814Smrg_LT_AC_TAGVAR(GCC, $1)="$GXX" 372315fb4814Smrg_LT_AC_TAGVAR(LD, $1)="$LD" 372415fb4814Smrg 372515fb4814SmrgAC_LIBTOOL_POSTDEP_PREDEP($1) 372615fb4814SmrgAC_LIBTOOL_PROG_COMPILER_PIC($1) 372715fb4814SmrgAC_LIBTOOL_PROG_CC_C_O($1) 372815fb4814SmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) 372915fb4814SmrgAC_LIBTOOL_PROG_LD_SHLIBS($1) 373015fb4814SmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1) 373115fb4814SmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) 373215fb4814Smrg 373315fb4814SmrgAC_LIBTOOL_CONFIG($1) 373415fb4814Smrg 373515fb4814SmrgAC_LANG_POP 373615fb4814SmrgCC=$lt_save_CC 373715fb4814SmrgLDCXX=$LD 373815fb4814SmrgLD=$lt_save_LD 373915fb4814SmrgGCC=$lt_save_GCC 374015fb4814Smrgwith_gnu_ldcxx=$with_gnu_ld 374115fb4814Smrgwith_gnu_ld=$lt_save_with_gnu_ld 374215fb4814Smrglt_cv_path_LDCXX=$lt_cv_path_LD 374315fb4814Smrglt_cv_path_LD=$lt_save_path_LD 374415fb4814Smrglt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 374515fb4814Smrglt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 374615fb4814Smrg])# AC_LIBTOOL_LANG_CXX_CONFIG 374715fb4814Smrg 374815fb4814Smrg# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME]) 374915fb4814Smrg# ------------------------------------ 375015fb4814Smrg# Figure out "hidden" library dependencies from verbose 375115fb4814Smrg# compiler output when linking a shared library. 375215fb4814Smrg# Parse the compiler output and extract the necessary 375315fb4814Smrg# objects, libraries and library flags. 375415fb4814SmrgAC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[ 375515fb4814Smrgdnl we can't use the lt_simple_compile_test_code here, 375615fb4814Smrgdnl because it contains code intended for an executable, 375715fb4814Smrgdnl not a library. It's possible we should let each 375815fb4814Smrgdnl tag define a new lt_????_link_test_code variable, 375915fb4814Smrgdnl but it's only used here... 376015fb4814Smrgifelse([$1],[],[cat > conftest.$ac_ext <<EOF 376115fb4814Smrgint a; 376215fb4814Smrgvoid foo (void) { a = 0; } 376315fb4814SmrgEOF 376415fb4814Smrg],[$1],[CXX],[cat > conftest.$ac_ext <<EOF 376515fb4814Smrgclass Foo 376615fb4814Smrg{ 376715fb4814Smrgpublic: 376815fb4814Smrg Foo (void) { a = 0; } 376915fb4814Smrgprivate: 377015fb4814Smrg int a; 377115fb4814Smrg}; 377215fb4814SmrgEOF 377315fb4814Smrg],[$1],[F77],[cat > conftest.$ac_ext <<EOF 377415fb4814Smrg subroutine foo 377515fb4814Smrg implicit none 377615fb4814Smrg integer*4 a 377715fb4814Smrg a=0 377815fb4814Smrg return 377915fb4814Smrg end 378015fb4814SmrgEOF 378115fb4814Smrg],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF 378215fb4814Smrgpublic class foo { 378315fb4814Smrg private int a; 378415fb4814Smrg public void bar (void) { 378515fb4814Smrg a = 0; 378615fb4814Smrg } 378715fb4814Smrg}; 378815fb4814SmrgEOF 378915fb4814Smrg]) 379015fb4814Smrgdnl Parse the compiler output and extract the necessary 379115fb4814Smrgdnl objects, libraries and library flags. 379215fb4814Smrgif AC_TRY_EVAL(ac_compile); then 379315fb4814Smrg # Parse the compiler output and extract the necessary 379415fb4814Smrg # objects, libraries and library flags. 379515fb4814Smrg 379615fb4814Smrg # Sentinel used to keep track of whether or not we are before 379715fb4814Smrg # the conftest object file. 379815fb4814Smrg pre_test_object_deps_done=no 379915fb4814Smrg 380015fb4814Smrg # The `*' in the case matches for architectures that use `case' in 380115fb4814Smrg # $output_verbose_cmd can trigger glob expansion during the loop 380215fb4814Smrg # eval without this substitution. 380315fb4814Smrg output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"` 380415fb4814Smrg 380515fb4814Smrg for p in `eval $output_verbose_link_cmd`; do 380615fb4814Smrg case $p in 380715fb4814Smrg 380815fb4814Smrg -L* | -R* | -l*) 380915fb4814Smrg # Some compilers place space between "-{L,R}" and the path. 381015fb4814Smrg # Remove the space. 381115fb4814Smrg if test $p = "-L" \ 381215fb4814Smrg || test $p = "-R"; then 381315fb4814Smrg prev=$p 381415fb4814Smrg continue 381515fb4814Smrg else 381615fb4814Smrg prev= 381715fb4814Smrg fi 381815fb4814Smrg 381915fb4814Smrg if test "$pre_test_object_deps_done" = no; then 382015fb4814Smrg case $p in 382115fb4814Smrg -L* | -R*) 382215fb4814Smrg # Internal compiler library paths should come after those 382315fb4814Smrg # provided the user. The postdeps already come after the 382415fb4814Smrg # user supplied libs so there is no need to process them. 382515fb4814Smrg if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then 382615fb4814Smrg _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" 382715fb4814Smrg else 382815fb4814Smrg _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" 382915fb4814Smrg fi 383015fb4814Smrg ;; 383115fb4814Smrg # The "-l" case would never come before the object being 383215fb4814Smrg # linked, so don't bother handling this case. 383315fb4814Smrg esac 383415fb4814Smrg else 383515fb4814Smrg if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then 383615fb4814Smrg _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}" 383715fb4814Smrg else 383815fb4814Smrg _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}" 383915fb4814Smrg fi 384015fb4814Smrg fi 384115fb4814Smrg ;; 384215fb4814Smrg 384315fb4814Smrg *.$objext) 384415fb4814Smrg # This assumes that the test object file only shows up 384515fb4814Smrg # once in the compiler output. 384615fb4814Smrg if test "$p" = "conftest.$objext"; then 384715fb4814Smrg pre_test_object_deps_done=yes 384815fb4814Smrg continue 384915fb4814Smrg fi 385015fb4814Smrg 385115fb4814Smrg if test "$pre_test_object_deps_done" = no; then 385215fb4814Smrg if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then 385315fb4814Smrg _LT_AC_TAGVAR(predep_objects, $1)="$p" 385415fb4814Smrg else 385515fb4814Smrg _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p" 385615fb4814Smrg fi 385715fb4814Smrg else 385815fb4814Smrg if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then 385915fb4814Smrg _LT_AC_TAGVAR(postdep_objects, $1)="$p" 386015fb4814Smrg else 386115fb4814Smrg _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p" 386215fb4814Smrg fi 386315fb4814Smrg fi 386415fb4814Smrg ;; 386515fb4814Smrg 386615fb4814Smrg *) ;; # Ignore the rest. 386715fb4814Smrg 386815fb4814Smrg esac 386915fb4814Smrg done 387015fb4814Smrg 387115fb4814Smrg # Clean up. 387215fb4814Smrg rm -f a.out a.exe 387315fb4814Smrgelse 387415fb4814Smrg echo "libtool.m4: error: problem compiling $1 test program" 387515fb4814Smrgfi 387615fb4814Smrg 387715fb4814Smrg$rm -f confest.$objext 387815fb4814Smrg 387915fb4814Smrg# PORTME: override above test on systems where it is broken 388015fb4814Smrgifelse([$1],[CXX], 388115fb4814Smrg[case $host_os in 388215fb4814Smrginterix3*) 388315fb4814Smrg # Interix 3.5 installs completely hosed .la files for C++, so rather than 388415fb4814Smrg # hack all around it, let's just trust "g++" to DTRT. 388515fb4814Smrg _LT_AC_TAGVAR(predep_objects,$1)= 388615fb4814Smrg _LT_AC_TAGVAR(postdep_objects,$1)= 388715fb4814Smrg _LT_AC_TAGVAR(postdeps,$1)= 388815fb4814Smrg ;; 388915fb4814Smrg 389015fb4814Smrgsolaris*) 389115fb4814Smrg case $cc_basename in 389215fb4814Smrg CC*) 389315fb4814Smrg # Adding this requires a known-good setup of shared libraries for 389415fb4814Smrg # Sun compiler versions before 5.6, else PIC objects from an old 389515fb4814Smrg # archive will be linked into the output, leading to subtle bugs. 389615fb4814Smrg _LT_AC_TAGVAR(postdeps,$1)='-lCstd -lCrun' 389715fb4814Smrg ;; 389815fb4814Smrg esac 389915fb4814Smrg ;; 390015fb4814Smrgesac 390115fb4814Smrg]) 390215fb4814Smrg 390315fb4814Smrgcase " $_LT_AC_TAGVAR(postdeps, $1) " in 390415fb4814Smrg*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;; 390515fb4814Smrgesac 390615fb4814Smrg])# AC_LIBTOOL_POSTDEP_PREDEP 390715fb4814Smrg 390815fb4814Smrg# AC_LIBTOOL_LANG_F77_CONFIG 390915fb4814Smrg# -------------------------- 391015fb4814Smrg# Ensure that the configuration vars for the C compiler are 391115fb4814Smrg# suitably defined. Those variables are subsequently used by 391215fb4814Smrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 391315fb4814SmrgAC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)]) 391415fb4814SmrgAC_DEFUN([_LT_AC_LANG_F77_CONFIG], 391515fb4814Smrg[AC_REQUIRE([AC_PROG_F77]) 391615fb4814SmrgAC_LANG_PUSH(Fortran 77) 391715fb4814Smrg 391815fb4814Smrg_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 391915fb4814Smrg_LT_AC_TAGVAR(allow_undefined_flag, $1)= 392015fb4814Smrg_LT_AC_TAGVAR(always_export_symbols, $1)=no 392115fb4814Smrg_LT_AC_TAGVAR(archive_expsym_cmds, $1)= 392215fb4814Smrg_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= 392315fb4814Smrg_LT_AC_TAGVAR(hardcode_direct, $1)=no 392415fb4814Smrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= 392515fb4814Smrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 392615fb4814Smrg_LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 392715fb4814Smrg_LT_AC_TAGVAR(hardcode_minus_L, $1)=no 392815fb4814Smrg_LT_AC_TAGVAR(hardcode_automatic, $1)=no 392915fb4814Smrg_LT_AC_TAGVAR(module_cmds, $1)= 393015fb4814Smrg_LT_AC_TAGVAR(module_expsym_cmds, $1)= 393115fb4814Smrg_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown 393215fb4814Smrg_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 393315fb4814Smrg_LT_AC_TAGVAR(no_undefined_flag, $1)= 393415fb4814Smrg_LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 393515fb4814Smrg_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no 393615fb4814Smrg 393715fb4814Smrg# Source file extension for f77 test sources. 393815fb4814Smrgac_ext=f 393915fb4814Smrg 394015fb4814Smrg# Object file extension for compiled f77 test sources. 394115fb4814Smrgobjext=o 394215fb4814Smrg_LT_AC_TAGVAR(objext, $1)=$objext 394315fb4814Smrg 394415fb4814Smrg# Code to be used in simple compile tests 394515fb4814Smrglt_simple_compile_test_code=" subroutine t\n return\n end\n" 394615fb4814Smrg 394715fb4814Smrg# Code to be used in simple link tests 394815fb4814Smrglt_simple_link_test_code=" program t\n end\n" 394915fb4814Smrg 395015fb4814Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 395115fb4814Smrg_LT_AC_SYS_COMPILER 395215fb4814Smrg 395315fb4814Smrg# save warnings/boilerplate of simple test code 395415fb4814Smrg_LT_COMPILER_BOILERPLATE 395515fb4814Smrg_LT_LINKER_BOILERPLATE 395615fb4814Smrg 395715fb4814Smrg# Allow CC to be a program name with arguments. 395815fb4814Smrglt_save_CC="$CC" 395915fb4814SmrgCC=${F77-"f77"} 396015fb4814Smrgcompiler=$CC 396115fb4814Smrg_LT_AC_TAGVAR(compiler, $1)=$CC 396215fb4814Smrg_LT_CC_BASENAME([$compiler]) 396315fb4814Smrg 396415fb4814SmrgAC_MSG_CHECKING([if libtool supports shared libraries]) 396515fb4814SmrgAC_MSG_RESULT([$can_build_shared]) 396615fb4814Smrg 396715fb4814SmrgAC_MSG_CHECKING([whether to build shared libraries]) 396815fb4814Smrgtest "$can_build_shared" = "no" && enable_shared=no 396915fb4814Smrg 397015fb4814Smrg# On AIX, shared libraries and static libraries use the same namespace, and 397115fb4814Smrg# are all built from PIC. 397215fb4814Smrgcase $host_os in 397315fb4814Smrgaix3*) 397415fb4814Smrg test "$enable_shared" = yes && enable_static=no 397515fb4814Smrg if test -n "$RANLIB"; then 397615fb4814Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 397715fb4814Smrg postinstall_cmds='$RANLIB $lib' 397815fb4814Smrg fi 397915fb4814Smrg ;; 398015fb4814Smrgaix4* | aix5*) 398115fb4814Smrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 398215fb4814Smrg test "$enable_shared" = yes && enable_static=no 398315fb4814Smrg fi 398415fb4814Smrg ;; 398515fb4814Smrgesac 398615fb4814SmrgAC_MSG_RESULT([$enable_shared]) 398715fb4814Smrg 398815fb4814SmrgAC_MSG_CHECKING([whether to build static libraries]) 398915fb4814Smrg# Make sure either enable_shared or enable_static is yes. 399015fb4814Smrgtest "$enable_shared" = yes || enable_static=yes 399115fb4814SmrgAC_MSG_RESULT([$enable_static]) 399215fb4814Smrg 399315fb4814Smrg_LT_AC_TAGVAR(GCC, $1)="$G77" 399415fb4814Smrg_LT_AC_TAGVAR(LD, $1)="$LD" 399515fb4814Smrg 399615fb4814SmrgAC_LIBTOOL_PROG_COMPILER_PIC($1) 399715fb4814SmrgAC_LIBTOOL_PROG_CC_C_O($1) 399815fb4814SmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) 399915fb4814SmrgAC_LIBTOOL_PROG_LD_SHLIBS($1) 400015fb4814SmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1) 400115fb4814SmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) 400215fb4814Smrg 400315fb4814SmrgAC_LIBTOOL_CONFIG($1) 400415fb4814Smrg 400515fb4814SmrgAC_LANG_POP 400615fb4814SmrgCC="$lt_save_CC" 400715fb4814Smrg])# AC_LIBTOOL_LANG_F77_CONFIG 400815fb4814Smrg 400915fb4814Smrg 401015fb4814Smrg# AC_LIBTOOL_LANG_GCJ_CONFIG 401115fb4814Smrg# -------------------------- 401215fb4814Smrg# Ensure that the configuration vars for the C compiler are 401315fb4814Smrg# suitably defined. Those variables are subsequently used by 401415fb4814Smrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 401515fb4814SmrgAC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)]) 401615fb4814SmrgAC_DEFUN([_LT_AC_LANG_GCJ_CONFIG], 401715fb4814Smrg[AC_LANG_SAVE 401815fb4814Smrg 401915fb4814Smrg# Source file extension for Java test sources. 402015fb4814Smrgac_ext=java 402115fb4814Smrg 402215fb4814Smrg# Object file extension for compiled Java test sources. 402315fb4814Smrgobjext=o 402415fb4814Smrg_LT_AC_TAGVAR(objext, $1)=$objext 402515fb4814Smrg 402615fb4814Smrg# Code to be used in simple compile tests 402715fb4814Smrglt_simple_compile_test_code="class foo {}\n" 402815fb4814Smrg 402915fb4814Smrg# Code to be used in simple link tests 403015fb4814Smrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }\n' 403115fb4814Smrg 403215fb4814Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 403315fb4814Smrg_LT_AC_SYS_COMPILER 403415fb4814Smrg 403515fb4814Smrg# save warnings/boilerplate of simple test code 403615fb4814Smrg_LT_COMPILER_BOILERPLATE 403715fb4814Smrg_LT_LINKER_BOILERPLATE 403815fb4814Smrg 403915fb4814Smrg# Allow CC to be a program name with arguments. 404015fb4814Smrglt_save_CC="$CC" 404115fb4814SmrgCC=${GCJ-"gcj"} 404215fb4814Smrgcompiler=$CC 404315fb4814Smrg_LT_AC_TAGVAR(compiler, $1)=$CC 404415fb4814Smrg_LT_CC_BASENAME([$compiler]) 404515fb4814Smrg 404615fb4814Smrg# GCJ did not exist at the time GCC didn't implicitly link libc in. 404715fb4814Smrg_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 404815fb4814Smrg 404915fb4814Smrg_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 405015fb4814Smrg 405115fb4814SmrgAC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) 405215fb4814SmrgAC_LIBTOOL_PROG_COMPILER_PIC($1) 405315fb4814SmrgAC_LIBTOOL_PROG_CC_C_O($1) 405415fb4814SmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) 405515fb4814SmrgAC_LIBTOOL_PROG_LD_SHLIBS($1) 405615fb4814SmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1) 405715fb4814SmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) 405815fb4814Smrg 405915fb4814SmrgAC_LIBTOOL_CONFIG($1) 406015fb4814Smrg 406115fb4814SmrgAC_LANG_RESTORE 406215fb4814SmrgCC="$lt_save_CC" 406315fb4814Smrg])# AC_LIBTOOL_LANG_GCJ_CONFIG 406415fb4814Smrg 406515fb4814Smrg 406615fb4814Smrg# AC_LIBTOOL_LANG_RC_CONFIG 406715fb4814Smrg# ------------------------- 406815fb4814Smrg# Ensure that the configuration vars for the Windows resource compiler are 406915fb4814Smrg# suitably defined. Those variables are subsequently used by 407015fb4814Smrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 407115fb4814SmrgAC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)]) 407215fb4814SmrgAC_DEFUN([_LT_AC_LANG_RC_CONFIG], 407315fb4814Smrg[AC_LANG_SAVE 407415fb4814Smrg 407515fb4814Smrg# Source file extension for RC test sources. 407615fb4814Smrgac_ext=rc 407715fb4814Smrg 407815fb4814Smrg# Object file extension for compiled RC test sources. 407915fb4814Smrgobjext=o 408015fb4814Smrg_LT_AC_TAGVAR(objext, $1)=$objext 408115fb4814Smrg 408215fb4814Smrg# Code to be used in simple compile tests 408315fb4814Smrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n' 408415fb4814Smrg 408515fb4814Smrg# Code to be used in simple link tests 408615fb4814Smrglt_simple_link_test_code="$lt_simple_compile_test_code" 408715fb4814Smrg 408815fb4814Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 408915fb4814Smrg_LT_AC_SYS_COMPILER 409015fb4814Smrg 409115fb4814Smrg# save warnings/boilerplate of simple test code 409215fb4814Smrg_LT_COMPILER_BOILERPLATE 409315fb4814Smrg_LT_LINKER_BOILERPLATE 409415fb4814Smrg 409515fb4814Smrg# Allow CC to be a program name with arguments. 409615fb4814Smrglt_save_CC="$CC" 409715fb4814SmrgCC=${RC-"windres"} 409815fb4814Smrgcompiler=$CC 409915fb4814Smrg_LT_AC_TAGVAR(compiler, $1)=$CC 410015fb4814Smrg_LT_CC_BASENAME([$compiler]) 410115fb4814Smrg_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 410215fb4814Smrg 410315fb4814SmrgAC_LIBTOOL_CONFIG($1) 410415fb4814Smrg 410515fb4814SmrgAC_LANG_RESTORE 410615fb4814SmrgCC="$lt_save_CC" 410715fb4814Smrg])# AC_LIBTOOL_LANG_RC_CONFIG 410815fb4814Smrg 410915fb4814Smrg 411015fb4814Smrg# AC_LIBTOOL_CONFIG([TAGNAME]) 411115fb4814Smrg# ---------------------------- 411215fb4814Smrg# If TAGNAME is not passed, then create an initial libtool script 411315fb4814Smrg# with a default configuration from the untagged config vars. Otherwise 411415fb4814Smrg# add code to config.status for appending the configuration named by 411515fb4814Smrg# TAGNAME from the matching tagged config vars. 411615fb4814SmrgAC_DEFUN([AC_LIBTOOL_CONFIG], 411715fb4814Smrg[# The else clause should only fire when bootstrapping the 411815fb4814Smrg# libtool distribution, otherwise you forgot to ship ltmain.sh 411915fb4814Smrg# with your package, and you will get complaints that there are 412015fb4814Smrg# no rules to generate ltmain.sh. 412115fb4814Smrgif test -f "$ltmain"; then 412215fb4814Smrg # See if we are running on zsh, and set the options which allow our commands through 412315fb4814Smrg # without removal of \ escapes. 412415fb4814Smrg if test -n "${ZSH_VERSION+set}" ; then 412515fb4814Smrg setopt NO_GLOB_SUBST 412615fb4814Smrg fi 412715fb4814Smrg # Now quote all the things that may contain metacharacters while being 412815fb4814Smrg # careful not to overquote the AC_SUBSTed values. We take copies of the 412915fb4814Smrg # variables and quote the copies for generation of the libtool script. 413015fb4814Smrg for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ 413115fb4814Smrg SED SHELL STRIP \ 413215fb4814Smrg libname_spec library_names_spec soname_spec extract_expsyms_cmds \ 413315fb4814Smrg old_striplib striplib file_magic_cmd finish_cmds finish_eval \ 413415fb4814Smrg deplibs_check_method reload_flag reload_cmds need_locks \ 413515fb4814Smrg lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ 413615fb4814Smrg lt_cv_sys_global_symbol_to_c_name_address \ 413715fb4814Smrg sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ 413815fb4814Smrg old_postinstall_cmds old_postuninstall_cmds \ 413915fb4814Smrg _LT_AC_TAGVAR(compiler, $1) \ 414015fb4814Smrg _LT_AC_TAGVAR(CC, $1) \ 414115fb4814Smrg _LT_AC_TAGVAR(LD, $1) \ 414215fb4814Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \ 414315fb4814Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \ 414415fb4814Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \ 414515fb4814Smrg _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \ 414615fb4814Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \ 414715fb4814Smrg _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \ 414815fb4814Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \ 414915fb4814Smrg _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \ 415015fb4814Smrg _LT_AC_TAGVAR(old_archive_cmds, $1) \ 415115fb4814Smrg _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \ 415215fb4814Smrg _LT_AC_TAGVAR(predep_objects, $1) \ 415315fb4814Smrg _LT_AC_TAGVAR(postdep_objects, $1) \ 415415fb4814Smrg _LT_AC_TAGVAR(predeps, $1) \ 415515fb4814Smrg _LT_AC_TAGVAR(postdeps, $1) \ 415615fb4814Smrg _LT_AC_TAGVAR(compiler_lib_search_path, $1) \ 415715fb4814Smrg _LT_AC_TAGVAR(archive_cmds, $1) \ 415815fb4814Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1) \ 415915fb4814Smrg _LT_AC_TAGVAR(postinstall_cmds, $1) \ 416015fb4814Smrg _LT_AC_TAGVAR(postuninstall_cmds, $1) \ 416115fb4814Smrg _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \ 416215fb4814Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1) \ 416315fb4814Smrg _LT_AC_TAGVAR(no_undefined_flag, $1) \ 416415fb4814Smrg _LT_AC_TAGVAR(export_symbols_cmds, $1) \ 416515fb4814Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \ 416615fb4814Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \ 416715fb4814Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \ 416815fb4814Smrg _LT_AC_TAGVAR(hardcode_automatic, $1) \ 416915fb4814Smrg _LT_AC_TAGVAR(module_cmds, $1) \ 417015fb4814Smrg _LT_AC_TAGVAR(module_expsym_cmds, $1) \ 417115fb4814Smrg _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \ 417215fb4814Smrg _LT_AC_TAGVAR(exclude_expsyms, $1) \ 417315fb4814Smrg _LT_AC_TAGVAR(include_expsyms, $1); do 417415fb4814Smrg 417515fb4814Smrg case $var in 417615fb4814Smrg _LT_AC_TAGVAR(old_archive_cmds, $1) | \ 417715fb4814Smrg _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \ 417815fb4814Smrg _LT_AC_TAGVAR(archive_cmds, $1) | \ 417915fb4814Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \ 418015fb4814Smrg _LT_AC_TAGVAR(module_cmds, $1) | \ 418115fb4814Smrg _LT_AC_TAGVAR(module_expsym_cmds, $1) | \ 418215fb4814Smrg _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \ 418315fb4814Smrg _LT_AC_TAGVAR(export_symbols_cmds, $1) | \ 418415fb4814Smrg extract_expsyms_cmds | reload_cmds | finish_cmds | \ 418515fb4814Smrg postinstall_cmds | postuninstall_cmds | \ 418615fb4814Smrg old_postinstall_cmds | old_postuninstall_cmds | \ 418715fb4814Smrg sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) 418815fb4814Smrg # Double-quote double-evaled strings. 418915fb4814Smrg eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" 419015fb4814Smrg ;; 419115fb4814Smrg *) 419215fb4814Smrg eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" 419315fb4814Smrg ;; 419415fb4814Smrg esac 419515fb4814Smrg done 419615fb4814Smrg 419715fb4814Smrg case $lt_echo in 419815fb4814Smrg *'\[$]0 --fallback-echo"') 419915fb4814Smrg lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'` 420015fb4814Smrg ;; 420115fb4814Smrg esac 420215fb4814Smrg 420315fb4814Smrgifelse([$1], [], 420415fb4814Smrg [cfgfile="${ofile}T" 420515fb4814Smrg trap "$rm \"$cfgfile\"; exit 1" 1 2 15 420615fb4814Smrg $rm -f "$cfgfile" 420715fb4814Smrg AC_MSG_NOTICE([creating $ofile])], 420815fb4814Smrg [cfgfile="$ofile"]) 420915fb4814Smrg 421015fb4814Smrg cat <<__EOF__ >> "$cfgfile" 421115fb4814Smrgifelse([$1], [], 421215fb4814Smrg[#! $SHELL 421315fb4814Smrg 421415fb4814Smrg# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. 421515fb4814Smrg# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) 421615fb4814Smrg# NOTE: Changes made to this file will be lost: look at ltmain.sh. 421715fb4814Smrg# 421815fb4814Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 421915fb4814Smrg# Free Software Foundation, Inc. 422015fb4814Smrg# 422115fb4814Smrg# This file is part of GNU Libtool: 422215fb4814Smrg# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 422315fb4814Smrg# 422415fb4814Smrg# This program is free software; you can redistribute it and/or modify 422515fb4814Smrg# it under the terms of the GNU General Public License as published by 422615fb4814Smrg# the Free Software Foundation; either version 2 of the License, or 422715fb4814Smrg# (at your option) any later version. 422815fb4814Smrg# 422915fb4814Smrg# This program is distributed in the hope that it will be useful, but 423015fb4814Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 423115fb4814Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 423215fb4814Smrg# General Public License for more details. 423315fb4814Smrg# 423415fb4814Smrg# You should have received a copy of the GNU General Public License 423515fb4814Smrg# along with this program; if not, write to the Free Software 423615fb4814Smrg# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 423715fb4814Smrg# 423815fb4814Smrg# As a special exception to the GNU General Public License, if you 423915fb4814Smrg# distribute this file as part of a program that contains a 424015fb4814Smrg# configuration script generated by Autoconf, you may include it under 424115fb4814Smrg# the same distribution terms that you use for the rest of that program. 424215fb4814Smrg 424315fb4814Smrg# A sed program that does not truncate output. 424415fb4814SmrgSED=$lt_SED 424515fb4814Smrg 424615fb4814Smrg# Sed that helps us avoid accidentally triggering echo(1) options like -n. 424715fb4814SmrgXsed="$SED -e 1s/^X//" 424815fb4814Smrg 424915fb4814Smrg# The HP-UX ksh and POSIX shell print the target directory to stdout 425015fb4814Smrg# if CDPATH is set. 425115fb4814Smrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 425215fb4814Smrg 425315fb4814Smrg# The names of the tagged configurations supported by this script. 425415fb4814Smrgavailable_tags= 425515fb4814Smrg 425615fb4814Smrg# ### BEGIN LIBTOOL CONFIG], 425715fb4814Smrg[# ### BEGIN LIBTOOL TAG CONFIG: $tagname]) 425815fb4814Smrg 425915fb4814Smrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 426015fb4814Smrg 426115fb4814Smrg# Shell to use when invoking shell scripts. 426215fb4814SmrgSHELL=$lt_SHELL 426315fb4814Smrg 426415fb4814Smrg# Whether or not to build shared libraries. 426515fb4814Smrgbuild_libtool_libs=$enable_shared 426615fb4814Smrg 426715fb4814Smrg# Whether or not to build static libraries. 426815fb4814Smrgbuild_old_libs=$enable_static 426915fb4814Smrg 427015fb4814Smrg# Whether or not to add -lc for building shared libraries. 427115fb4814Smrgbuild_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1) 427215fb4814Smrg 427315fb4814Smrg# Whether or not to disallow shared libs when runtime libs are static 427415fb4814Smrgallow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) 427515fb4814Smrg 427615fb4814Smrg# Whether or not to optimize for fast installation. 427715fb4814Smrgfast_install=$enable_fast_install 427815fb4814Smrg 427915fb4814Smrg# The host system. 428015fb4814Smrghost_alias=$host_alias 428115fb4814Smrghost=$host 428215fb4814Smrghost_os=$host_os 428315fb4814Smrg 428415fb4814Smrg# The build system. 428515fb4814Smrgbuild_alias=$build_alias 428615fb4814Smrgbuild=$build 428715fb4814Smrgbuild_os=$build_os 428815fb4814Smrg 428915fb4814Smrg# An echo program that does not interpret backslashes. 429015fb4814Smrgecho=$lt_echo 429115fb4814Smrg 429215fb4814Smrg# The archiver. 429315fb4814SmrgAR=$lt_AR 429415fb4814SmrgAR_FLAGS=$lt_AR_FLAGS 429515fb4814Smrg 429615fb4814Smrg# A C compiler. 429715fb4814SmrgLTCC=$lt_LTCC 429815fb4814Smrg 429915fb4814Smrg# LTCC compiler flags. 430015fb4814SmrgLTCFLAGS=$lt_LTCFLAGS 430115fb4814Smrg 430215fb4814Smrg# A language-specific compiler. 430315fb4814SmrgCC=$lt_[]_LT_AC_TAGVAR(compiler, $1) 430415fb4814Smrg 430515fb4814Smrg# Is the compiler the GNU C compiler? 430615fb4814Smrgwith_gcc=$_LT_AC_TAGVAR(GCC, $1) 430715fb4814Smrg 430815fb4814Smrg# An ERE matcher. 430915fb4814SmrgEGREP=$lt_EGREP 431015fb4814Smrg 431115fb4814Smrg# The linker used to build libraries. 431215fb4814SmrgLD=$lt_[]_LT_AC_TAGVAR(LD, $1) 431315fb4814Smrg 431415fb4814Smrg# Whether we need hard or soft links. 431515fb4814SmrgLN_S=$lt_LN_S 431615fb4814Smrg 431715fb4814Smrg# A BSD-compatible nm program. 431815fb4814SmrgNM=$lt_NM 431915fb4814Smrg 432015fb4814Smrg# A symbol stripping program 432115fb4814SmrgSTRIP=$lt_STRIP 432215fb4814Smrg 432315fb4814Smrg# Used to examine libraries when file_magic_cmd begins "file" 432415fb4814SmrgMAGIC_CMD=$MAGIC_CMD 432515fb4814Smrg 432615fb4814Smrg# Used on cygwin: DLL creation program. 432715fb4814SmrgDLLTOOL="$DLLTOOL" 432815fb4814Smrg 432915fb4814Smrg# Used on cygwin: object dumper. 433015fb4814SmrgOBJDUMP="$OBJDUMP" 433115fb4814Smrg 433215fb4814Smrg# Used on cygwin: assembler. 433315fb4814SmrgAS="$AS" 433415fb4814Smrg 433515fb4814Smrg# The name of the directory that contains temporary libtool files. 433615fb4814Smrgobjdir=$objdir 433715fb4814Smrg 433815fb4814Smrg# How to create reloadable object files. 433915fb4814Smrgreload_flag=$lt_reload_flag 434015fb4814Smrgreload_cmds=$lt_reload_cmds 434115fb4814Smrg 434215fb4814Smrg# How to pass a linker flag through the compiler. 434315fb4814Smrgwl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) 434415fb4814Smrg 434515fb4814Smrg# Object file suffix (normally "o"). 434615fb4814Smrgobjext="$ac_objext" 434715fb4814Smrg 434815fb4814Smrg# Old archive suffix (normally "a"). 434915fb4814Smrglibext="$libext" 435015fb4814Smrg 435115fb4814Smrg# Shared library suffix (normally ".so"). 435215fb4814Smrgshrext_cmds='$shrext_cmds' 435315fb4814Smrg 435415fb4814Smrg# Executable file suffix (normally ""). 435515fb4814Smrgexeext="$exeext" 435615fb4814Smrg 435715fb4814Smrg# Additional compiler flags for building library objects. 435815fb4814Smrgpic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) 435915fb4814Smrgpic_mode=$pic_mode 436015fb4814Smrg 436115fb4814Smrg# What is the maximum length of a command? 436215fb4814Smrgmax_cmd_len=$lt_cv_sys_max_cmd_len 436315fb4814Smrg 436415fb4814Smrg# Does compiler simultaneously support -c and -o options? 436515fb4814Smrgcompiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) 436615fb4814Smrg 436715fb4814Smrg# Must we lock files when doing compilation? 436815fb4814Smrgneed_locks=$lt_need_locks 436915fb4814Smrg 437015fb4814Smrg# Do we need the lib prefix for modules? 437115fb4814Smrgneed_lib_prefix=$need_lib_prefix 437215fb4814Smrg 437315fb4814Smrg# Do we need a version for libraries? 437415fb4814Smrgneed_version=$need_version 437515fb4814Smrg 437615fb4814Smrg# Whether dlopen is supported. 437715fb4814Smrgdlopen_support=$enable_dlopen 437815fb4814Smrg 437915fb4814Smrg# Whether dlopen of programs is supported. 438015fb4814Smrgdlopen_self=$enable_dlopen_self 438115fb4814Smrg 438215fb4814Smrg# Whether dlopen of statically linked programs is supported. 438315fb4814Smrgdlopen_self_static=$enable_dlopen_self_static 438415fb4814Smrg 438515fb4814Smrg# Compiler flag to prevent dynamic linking. 438615fb4814Smrglink_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1) 438715fb4814Smrg 438815fb4814Smrg# Compiler flag to turn off builtin functions. 438915fb4814Smrgno_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) 439015fb4814Smrg 439115fb4814Smrg# Compiler flag to allow reflexive dlopens. 439215fb4814Smrgexport_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1) 439315fb4814Smrg 439415fb4814Smrg# Compiler flag to generate shared objects directly from archives. 439515fb4814Smrgwhole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1) 439615fb4814Smrg 439715fb4814Smrg# Compiler flag to generate thread-safe objects. 439815fb4814Smrgthread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1) 439915fb4814Smrg 440015fb4814Smrg# Library versioning type. 440115fb4814Smrgversion_type=$version_type 440215fb4814Smrg 440315fb4814Smrg# Format of library name prefix. 440415fb4814Smrglibname_spec=$lt_libname_spec 440515fb4814Smrg 440615fb4814Smrg# List of archive names. First name is the real one, the rest are links. 440715fb4814Smrg# The last name is the one that the linker finds with -lNAME. 440815fb4814Smrglibrary_names_spec=$lt_library_names_spec 440915fb4814Smrg 441015fb4814Smrg# The coded name of the library, if different from the real name. 441115fb4814Smrgsoname_spec=$lt_soname_spec 441215fb4814Smrg 441315fb4814Smrg# Commands used to build and install an old-style archive. 441415fb4814SmrgRANLIB=$lt_RANLIB 441515fb4814Smrgold_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1) 441615fb4814Smrgold_postinstall_cmds=$lt_old_postinstall_cmds 441715fb4814Smrgold_postuninstall_cmds=$lt_old_postuninstall_cmds 441815fb4814Smrg 441915fb4814Smrg# Create an old-style archive from a shared archive. 442015fb4814Smrgold_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1) 442115fb4814Smrg 442215fb4814Smrg# Create a temporary old-style archive to link instead of a shared archive. 442315fb4814Smrgold_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) 442415fb4814Smrg 442515fb4814Smrg# Commands used to build and install a shared archive. 442615fb4814Smrgarchive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1) 442715fb4814Smrgarchive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1) 442815fb4814Smrgpostinstall_cmds=$lt_postinstall_cmds 442915fb4814Smrgpostuninstall_cmds=$lt_postuninstall_cmds 443015fb4814Smrg 443115fb4814Smrg# Commands used to build a loadable module (assumed same as above if empty) 443215fb4814Smrgmodule_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1) 443315fb4814Smrgmodule_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1) 443415fb4814Smrg 443515fb4814Smrg# Commands to strip libraries. 443615fb4814Smrgold_striplib=$lt_old_striplib 443715fb4814Smrgstriplib=$lt_striplib 443815fb4814Smrg 443915fb4814Smrg# Dependencies to place before the objects being linked to create a 444015fb4814Smrg# shared library. 444115fb4814Smrgpredep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1) 444215fb4814Smrg 444315fb4814Smrg# Dependencies to place after the objects being linked to create a 444415fb4814Smrg# shared library. 444515fb4814Smrgpostdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1) 444615fb4814Smrg 444715fb4814Smrg# Dependencies to place before the objects being linked to create a 444815fb4814Smrg# shared library. 444915fb4814Smrgpredeps=$lt_[]_LT_AC_TAGVAR(predeps, $1) 445015fb4814Smrg 445115fb4814Smrg# Dependencies to place after the objects being linked to create a 445215fb4814Smrg# shared library. 445315fb4814Smrgpostdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1) 445415fb4814Smrg 445515fb4814Smrg# The library search path used internally by the compiler when linking 445615fb4814Smrg# a shared library. 445715fb4814Smrgcompiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1) 445815fb4814Smrg 445915fb4814Smrg# Method to check whether dependent libraries are shared objects. 446015fb4814Smrgdeplibs_check_method=$lt_deplibs_check_method 446115fb4814Smrg 446215fb4814Smrg# Command to use when deplibs_check_method == file_magic. 446315fb4814Smrgfile_magic_cmd=$lt_file_magic_cmd 446415fb4814Smrg 446515fb4814Smrg# Flag that allows shared libraries with undefined symbols to be built. 446615fb4814Smrgallow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1) 446715fb4814Smrg 446815fb4814Smrg# Flag that forces no undefined symbols. 446915fb4814Smrgno_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1) 447015fb4814Smrg 447115fb4814Smrg# Commands used to finish a libtool library installation in a directory. 447215fb4814Smrgfinish_cmds=$lt_finish_cmds 447315fb4814Smrg 447415fb4814Smrg# Same as above, but a single script fragment to be evaled but not shown. 447515fb4814Smrgfinish_eval=$lt_finish_eval 447615fb4814Smrg 447715fb4814Smrg# Take the output of nm and produce a listing of raw symbols and C names. 447815fb4814Smrgglobal_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe 447915fb4814Smrg 448015fb4814Smrg# Transform the output of nm in a proper C declaration 448115fb4814Smrgglobal_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl 448215fb4814Smrg 448315fb4814Smrg# Transform the output of nm in a C name address pair 448415fb4814Smrgglobal_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address 448515fb4814Smrg 448615fb4814Smrg# This is the shared library runtime path variable. 448715fb4814Smrgrunpath_var=$runpath_var 448815fb4814Smrg 448915fb4814Smrg# This is the shared library path variable. 449015fb4814Smrgshlibpath_var=$shlibpath_var 449115fb4814Smrg 449215fb4814Smrg# Is shlibpath searched before the hard-coded library search path? 449315fb4814Smrgshlibpath_overrides_runpath=$shlibpath_overrides_runpath 449415fb4814Smrg 449515fb4814Smrg# How to hardcode a shared library path into an executable. 449615fb4814Smrghardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1) 449715fb4814Smrg 449815fb4814Smrg# Whether we should hardcode library paths into libraries. 449915fb4814Smrghardcode_into_libs=$hardcode_into_libs 450015fb4814Smrg 450115fb4814Smrg# Flag to hardcode \$libdir into a binary during linking. 450215fb4814Smrg# This must work even if \$libdir does not exist. 450315fb4814Smrghardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) 450415fb4814Smrg 450515fb4814Smrg# If ld is used when linking, flag to hardcode \$libdir into 450615fb4814Smrg# a binary during linking. This must work even if \$libdir does 450715fb4814Smrg# not exist. 450815fb4814Smrghardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) 450915fb4814Smrg 451015fb4814Smrg# Whether we need a single -rpath flag with a separated argument. 451115fb4814Smrghardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1) 451215fb4814Smrg 451315fb4814Smrg# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the 451415fb4814Smrg# resulting binary. 451515fb4814Smrghardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1) 451615fb4814Smrg 451715fb4814Smrg# Set to yes if using the -LDIR flag during linking hardcodes DIR into the 451815fb4814Smrg# resulting binary. 451915fb4814Smrghardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1) 452015fb4814Smrg 452115fb4814Smrg# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into 452215fb4814Smrg# the resulting binary. 452315fb4814Smrghardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1) 452415fb4814Smrg 452515fb4814Smrg# Set to yes if building a shared library automatically hardcodes DIR into the library 452615fb4814Smrg# and all subsequent libraries and executables linked against it. 452715fb4814Smrghardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1) 452815fb4814Smrg 452915fb4814Smrg# Variables whose values should be saved in libtool wrapper scripts and 453015fb4814Smrg# restored at relink time. 453115fb4814Smrgvariables_saved_for_relink="$variables_saved_for_relink" 453215fb4814Smrg 453315fb4814Smrg# Whether libtool must link a program against all its dependency libraries. 453415fb4814Smrglink_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1) 453515fb4814Smrg 453615fb4814Smrg# Compile-time system search path for libraries 453715fb4814Smrgsys_lib_search_path_spec=$lt_sys_lib_search_path_spec 453815fb4814Smrg 453915fb4814Smrg# Run-time system search path for libraries 454015fb4814Smrgsys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec 454115fb4814Smrg 454215fb4814Smrg# Fix the shell variable \$srcfile for the compiler. 454315fb4814Smrgfix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)" 454415fb4814Smrg 454515fb4814Smrg# Set to yes if exported symbols are required. 454615fb4814Smrgalways_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1) 454715fb4814Smrg 454815fb4814Smrg# The commands to list exported symbols. 454915fb4814Smrgexport_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1) 455015fb4814Smrg 455115fb4814Smrg# The commands to extract the exported symbol list from a shared archive. 455215fb4814Smrgextract_expsyms_cmds=$lt_extract_expsyms_cmds 455315fb4814Smrg 455415fb4814Smrg# Symbols that should not be listed in the preloaded symbols. 455515fb4814Smrgexclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1) 455615fb4814Smrg 455715fb4814Smrg# Symbols that must always be exported. 455815fb4814Smrginclude_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1) 455915fb4814Smrg 456015fb4814Smrgifelse([$1],[], 456115fb4814Smrg[# ### END LIBTOOL CONFIG], 456215fb4814Smrg[# ### END LIBTOOL TAG CONFIG: $tagname]) 456315fb4814Smrg 456415fb4814Smrg__EOF__ 456515fb4814Smrg 456615fb4814Smrgifelse([$1],[], [ 456715fb4814Smrg case $host_os in 456815fb4814Smrg aix3*) 456915fb4814Smrg cat <<\EOF >> "$cfgfile" 457015fb4814Smrg 457115fb4814Smrg# AIX sometimes has problems with the GCC collect2 program. For some 457215fb4814Smrg# reason, if we set the COLLECT_NAMES environment variable, the problems 457315fb4814Smrg# vanish in a puff of smoke. 457415fb4814Smrgif test "X${COLLECT_NAMES+set}" != Xset; then 457515fb4814Smrg COLLECT_NAMES= 457615fb4814Smrg export COLLECT_NAMES 457715fb4814Smrgfi 457815fb4814SmrgEOF 457915fb4814Smrg ;; 458015fb4814Smrg esac 458115fb4814Smrg 458215fb4814Smrg # We use sed instead of cat because bash on DJGPP gets confused if 458315fb4814Smrg # if finds mixed CR/LF and LF-only lines. Since sed operates in 458415fb4814Smrg # text mode, it properly converts lines to CR/LF. This bash problem 458515fb4814Smrg # is reportedly fixed, but why not run on old versions too? 458615fb4814Smrg sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1) 458715fb4814Smrg 458815fb4814Smrg mv -f "$cfgfile" "$ofile" || \ 458915fb4814Smrg (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 459015fb4814Smrg chmod +x "$ofile" 459115fb4814Smrg]) 459215fb4814Smrgelse 459315fb4814Smrg # If there is no Makefile yet, we rely on a make rule to execute 459415fb4814Smrg # `config.status --recheck' to rerun these tests and create the 459515fb4814Smrg # libtool script then. 459615fb4814Smrg ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` 459715fb4814Smrg if test -f "$ltmain_in"; then 459815fb4814Smrg test -f Makefile && make "$ltmain" 459915fb4814Smrg fi 460015fb4814Smrgfi 460115fb4814Smrg])# AC_LIBTOOL_CONFIG 460215fb4814Smrg 460315fb4814Smrg 460415fb4814Smrg# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME]) 460515fb4814Smrg# ------------------------------------------- 460615fb4814SmrgAC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], 460715fb4814Smrg[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl 460815fb4814Smrg 460915fb4814Smrg_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 461015fb4814Smrg 461115fb4814Smrgif test "$GCC" = yes; then 461215fb4814Smrg _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 461315fb4814Smrg 461415fb4814Smrg AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 461515fb4814Smrg lt_cv_prog_compiler_rtti_exceptions, 461615fb4814Smrg [-fno-rtti -fno-exceptions], [], 461715fb4814Smrg [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 461815fb4814Smrgfi 461915fb4814Smrg])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI 462015fb4814Smrg 462115fb4814Smrg 462215fb4814Smrg# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE 462315fb4814Smrg# --------------------------------- 462415fb4814SmrgAC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], 462515fb4814Smrg[AC_REQUIRE([AC_CANONICAL_HOST]) 462615fb4814SmrgAC_REQUIRE([AC_PROG_NM]) 462715fb4814SmrgAC_REQUIRE([AC_OBJEXT]) 462815fb4814Smrg# Check for command to grab the raw symbol name followed by C symbol from nm. 462915fb4814SmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object]) 463015fb4814SmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 463115fb4814Smrg[ 463215fb4814Smrg# These are sane defaults that work on at least a few old systems. 463315fb4814Smrg# [They come from Ultrix. What could be older than Ultrix?!! ;)] 463415fb4814Smrg 463515fb4814Smrg# Character class describing NM global symbol codes. 463615fb4814Smrgsymcode='[[BCDEGRST]]' 463715fb4814Smrg 463815fb4814Smrg# Regexp to match symbols that can be accessed directly from C. 463915fb4814Smrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 464015fb4814Smrg 464115fb4814Smrg# Transform an extracted symbol line into a proper C declaration 464215fb4814Smrglt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'" 464315fb4814Smrg 464415fb4814Smrg# Transform an extracted symbol line into symbol name and symbol address 464515fb4814Smrglt_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'" 464615fb4814Smrg 464715fb4814Smrg# Define system-specific variables. 464815fb4814Smrgcase $host_os in 464915fb4814Smrgaix*) 465015fb4814Smrg symcode='[[BCDT]]' 465115fb4814Smrg ;; 465215fb4814Smrgcygwin* | mingw* | pw32*) 465315fb4814Smrg symcode='[[ABCDGISTW]]' 465415fb4814Smrg ;; 465515fb4814Smrghpux*) # Its linker distinguishes data from code symbols 465615fb4814Smrg if test "$host_cpu" = ia64; then 465715fb4814Smrg symcode='[[ABCDEGRST]]' 465815fb4814Smrg fi 465915fb4814Smrg lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 466015fb4814Smrg 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'" 466115fb4814Smrg ;; 466215fb4814Smrglinux*) 466315fb4814Smrg if test "$host_cpu" = ia64; then 466415fb4814Smrg symcode='[[ABCDGIRSTW]]' 466515fb4814Smrg lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 466615fb4814Smrg 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'" 466715fb4814Smrg fi 466815fb4814Smrg ;; 466915fb4814Smrgirix* | nonstopux*) 467015fb4814Smrg symcode='[[BCDEGRST]]' 467115fb4814Smrg ;; 467215fb4814Smrgosf*) 467315fb4814Smrg symcode='[[BCDEGQRST]]' 467415fb4814Smrg ;; 467515fb4814Smrgsolaris*) 467615fb4814Smrg symcode='[[BDRT]]' 467715fb4814Smrg ;; 467815fb4814Smrgsco3.2v5*) 467915fb4814Smrg symcode='[[DT]]' 468015fb4814Smrg ;; 468115fb4814Smrgsysv4.2uw2*) 468215fb4814Smrg symcode='[[DT]]' 468315fb4814Smrg ;; 468415fb4814Smrgsysv5* | sco5v6* | unixware* | OpenUNIX*) 468515fb4814Smrg symcode='[[ABDT]]' 468615fb4814Smrg ;; 468715fb4814Smrgsysv4) 468815fb4814Smrg symcode='[[DFNSTU]]' 468915fb4814Smrg ;; 469015fb4814Smrgesac 469115fb4814Smrg 469215fb4814Smrg# Handle CRLF in mingw tool chain 469315fb4814Smrgopt_cr= 469415fb4814Smrgcase $build_os in 469515fb4814Smrgmingw*) 469615fb4814Smrg opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp 469715fb4814Smrg ;; 469815fb4814Smrgesac 469915fb4814Smrg 470015fb4814Smrg# If we're using GNU nm, then use its standard symbol codes. 470115fb4814Smrgcase `$NM -V 2>&1` in 470215fb4814Smrg*GNU* | *'with BFD'*) 470315fb4814Smrg symcode='[[ABCDGIRSTW]]' ;; 470415fb4814Smrgesac 470515fb4814Smrg 470615fb4814Smrg# Try without a prefix undercore, then with it. 470715fb4814Smrgfor ac_symprfx in "" "_"; do 470815fb4814Smrg 470915fb4814Smrg # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 471015fb4814Smrg symxfrm="\\1 $ac_symprfx\\2 \\2" 471115fb4814Smrg 471215fb4814Smrg # Write the raw and C identifiers. 471315fb4814Smrg lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 471415fb4814Smrg 471515fb4814Smrg # Check to see that the pipe works correctly. 471615fb4814Smrg pipe_works=no 471715fb4814Smrg 471815fb4814Smrg rm -f conftest* 471915fb4814Smrg cat > conftest.$ac_ext <<EOF 472015fb4814Smrg#ifdef __cplusplus 472115fb4814Smrgextern "C" { 472215fb4814Smrg#endif 472315fb4814Smrgchar nm_test_var; 472415fb4814Smrgvoid nm_test_func(){} 472515fb4814Smrg#ifdef __cplusplus 472615fb4814Smrg} 472715fb4814Smrg#endif 472815fb4814Smrgint main(){nm_test_var='a';nm_test_func();return(0);} 472915fb4814SmrgEOF 473015fb4814Smrg 473115fb4814Smrg if AC_TRY_EVAL(ac_compile); then 473215fb4814Smrg # Now try to grab the symbols. 473315fb4814Smrg nlist=conftest.nm 473415fb4814Smrg if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then 473515fb4814Smrg # Try sorting and uniquifying the output. 473615fb4814Smrg if sort "$nlist" | uniq > "$nlist"T; then 473715fb4814Smrg mv -f "$nlist"T "$nlist" 473815fb4814Smrg else 473915fb4814Smrg rm -f "$nlist"T 474015fb4814Smrg fi 474115fb4814Smrg 474215fb4814Smrg # Make sure that we snagged all the symbols we need. 474315fb4814Smrg if grep ' nm_test_var$' "$nlist" >/dev/null; then 474415fb4814Smrg if grep ' nm_test_func$' "$nlist" >/dev/null; then 474515fb4814Smrg cat <<EOF > conftest.$ac_ext 474615fb4814Smrg#ifdef __cplusplus 474715fb4814Smrgextern "C" { 474815fb4814Smrg#endif 474915fb4814Smrg 475015fb4814SmrgEOF 475115fb4814Smrg # Now generate the symbol file. 475215fb4814Smrg eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' 475315fb4814Smrg 475415fb4814Smrg cat <<EOF >> conftest.$ac_ext 475515fb4814Smrg#if defined (__STDC__) && __STDC__ 475615fb4814Smrg# define lt_ptr_t void * 475715fb4814Smrg#else 475815fb4814Smrg# define lt_ptr_t char * 475915fb4814Smrg# define const 476015fb4814Smrg#endif 476115fb4814Smrg 476215fb4814Smrg/* The mapping between symbol names and symbols. */ 476315fb4814Smrgconst struct { 476415fb4814Smrg const char *name; 476515fb4814Smrg lt_ptr_t address; 476615fb4814Smrg} 476715fb4814Smrglt_preloaded_symbols[[]] = 476815fb4814Smrg{ 476915fb4814SmrgEOF 477015fb4814Smrg $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext 477115fb4814Smrg cat <<\EOF >> conftest.$ac_ext 477215fb4814Smrg {0, (lt_ptr_t) 0} 477315fb4814Smrg}; 477415fb4814Smrg 477515fb4814Smrg#ifdef __cplusplus 477615fb4814Smrg} 477715fb4814Smrg#endif 477815fb4814SmrgEOF 477915fb4814Smrg # Now try linking the two files. 478015fb4814Smrg mv conftest.$ac_objext conftstm.$ac_objext 478115fb4814Smrg lt_save_LIBS="$LIBS" 478215fb4814Smrg lt_save_CFLAGS="$CFLAGS" 478315fb4814Smrg LIBS="conftstm.$ac_objext" 478415fb4814Smrg CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 478515fb4814Smrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then 478615fb4814Smrg pipe_works=yes 478715fb4814Smrg fi 478815fb4814Smrg LIBS="$lt_save_LIBS" 478915fb4814Smrg CFLAGS="$lt_save_CFLAGS" 479015fb4814Smrg else 479115fb4814Smrg echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 479215fb4814Smrg fi 479315fb4814Smrg else 479415fb4814Smrg echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 479515fb4814Smrg fi 479615fb4814Smrg else 479715fb4814Smrg echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 479815fb4814Smrg fi 479915fb4814Smrg else 480015fb4814Smrg echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 480115fb4814Smrg cat conftest.$ac_ext >&5 480215fb4814Smrg fi 480315fb4814Smrg rm -f conftest* conftst* 480415fb4814Smrg 480515fb4814Smrg # Do not use the global_symbol_pipe unless it works. 480615fb4814Smrg if test "$pipe_works" = yes; then 480715fb4814Smrg break 480815fb4814Smrg else 480915fb4814Smrg lt_cv_sys_global_symbol_pipe= 481015fb4814Smrg fi 481115fb4814Smrgdone 481215fb4814Smrg]) 481315fb4814Smrgif test -z "$lt_cv_sys_global_symbol_pipe"; then 481415fb4814Smrg lt_cv_sys_global_symbol_to_cdecl= 481515fb4814Smrgfi 481615fb4814Smrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 481715fb4814Smrg AC_MSG_RESULT(failed) 481815fb4814Smrgelse 481915fb4814Smrg AC_MSG_RESULT(ok) 482015fb4814Smrgfi 482115fb4814Smrg]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE 482215fb4814Smrg 482315fb4814Smrg 482415fb4814Smrg# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME]) 482515fb4814Smrg# --------------------------------------- 482615fb4814SmrgAC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC], 482715fb4814Smrg[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)= 482815fb4814Smrg_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 482915fb4814Smrg_LT_AC_TAGVAR(lt_prog_compiler_static, $1)= 483015fb4814Smrg 483115fb4814SmrgAC_MSG_CHECKING([for $compiler option to produce PIC]) 483215fb4814Smrg ifelse([$1],[CXX],[ 483315fb4814Smrg # C++ specific cases for pic, static, wl, etc. 483415fb4814Smrg if test "$GXX" = yes; then 483515fb4814Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 483615fb4814Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' 483715fb4814Smrg 483815fb4814Smrg case $host_os in 483915fb4814Smrg aix*) 484015fb4814Smrg # All AIX code is PIC. 484115fb4814Smrg if test "$host_cpu" = ia64; then 484215fb4814Smrg # AIX 5 now supports IA64 processor 484315fb4814Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 484415fb4814Smrg fi 484515fb4814Smrg ;; 484615fb4814Smrg amigaos*) 484715fb4814Smrg # FIXME: we need at least 68020 code to build shared libraries, but 484815fb4814Smrg # adding the `-m68020' flag to GCC prevents building anything better, 484915fb4814Smrg # like `-m68040'. 485015fb4814Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 485115fb4814Smrg ;; 485215fb4814Smrg beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 485315fb4814Smrg # PIC is the default for these OSes. 485415fb4814Smrg ;; 485515fb4814Smrg mingw* | os2* | pw32*) 485615fb4814Smrg # This hack is so that the source file can tell whether it is being 485715fb4814Smrg # built for inclusion in a dll (and should export symbols for example). 485815fb4814Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' 485915fb4814Smrg ;; 486015fb4814Smrg darwin* | rhapsody*) 486115fb4814Smrg # PIC is the default on this platform 486215fb4814Smrg # Common symbols not allowed in MH_DYLIB files 486315fb4814Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 486415fb4814Smrg ;; 486515fb4814Smrg *djgpp*) 486615fb4814Smrg # DJGPP does not support shared libraries at all 486715fb4814Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 486815fb4814Smrg ;; 486915fb4814Smrg interix3*) 487015fb4814Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 487115fb4814Smrg # Instead, we relocate shared libraries at runtime. 487215fb4814Smrg ;; 487315fb4814Smrg sysv4*MP*) 487415fb4814Smrg if test -d /usr/nec; then 487515fb4814Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 487615fb4814Smrg fi 487715fb4814Smrg ;; 487815fb4814Smrg hpux*) 487915fb4814Smrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 488015fb4814Smrg # not for PA HP-UX. 488115fb4814Smrg case $host_cpu in 488215fb4814Smrg hppa*64*|ia64*) 488315fb4814Smrg ;; 488415fb4814Smrg *) 488515fb4814Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 488615fb4814Smrg ;; 488715fb4814Smrg esac 488815fb4814Smrg ;; 488915fb4814Smrg *) 489015fb4814Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 489115fb4814Smrg ;; 489215fb4814Smrg esac 489315fb4814Smrg else 489415fb4814Smrg case $host_os in 489515fb4814Smrg aix4* | aix5*) 489615fb4814Smrg # All AIX code is PIC. 489715fb4814Smrg if test "$host_cpu" = ia64; then 489815fb4814Smrg # AIX 5 now supports IA64 processor 489915fb4814Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 490015fb4814Smrg else 490115fb4814Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 490215fb4814Smrg fi 490315fb4814Smrg ;; 490415fb4814Smrg chorus*) 490515fb4814Smrg case $cc_basename in 490615fb4814Smrg cxch68*) 490715fb4814Smrg # Green Hills C++ Compiler 490815fb4814Smrg # _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" 490915fb4814Smrg ;; 491015fb4814Smrg esac 491115fb4814Smrg ;; 491215fb4814Smrg darwin*) 491315fb4814Smrg # PIC is the default on this platform 491415fb4814Smrg # Common symbols not allowed in MH_DYLIB files 491515fb4814Smrg case $cc_basename in 491615fb4814Smrg xlc*) 491715fb4814Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' 491815fb4814Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 491915fb4814Smrg ;; 492015fb4814Smrg esac 492115fb4814Smrg ;; 492215fb4814Smrg dgux*) 492315fb4814Smrg case $cc_basename in 492415fb4814Smrg ec++*) 492515fb4814Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 492615fb4814Smrg ;; 492715fb4814Smrg ghcx*) 492815fb4814Smrg # Green Hills C++ Compiler 492915fb4814Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 493015fb4814Smrg ;; 493115fb4814Smrg *) 493215fb4814Smrg ;; 493315fb4814Smrg esac 493415fb4814Smrg ;; 493515fb4814Smrg freebsd* | kfreebsd*-gnu | dragonfly*) 493615fb4814Smrg # FreeBSD uses GNU C++ 493715fb4814Smrg ;; 493815fb4814Smrg hpux9* | hpux10* | hpux11*) 493915fb4814Smrg case $cc_basename in 494015fb4814Smrg CC*) 494115fb4814Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 494215fb4814Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 494315fb4814Smrg if test "$host_cpu" != ia64; then 494415fb4814Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 494515fb4814Smrg fi 494615fb4814Smrg ;; 494715fb4814Smrg aCC*) 494815fb4814Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 494915fb4814Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 495015fb4814Smrg case $host_cpu in 495115fb4814Smrg hppa*64*|ia64*) 495215fb4814Smrg # +Z the default 495315fb4814Smrg ;; 495415fb4814Smrg *) 495515fb4814Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 495615fb4814Smrg ;; 495715fb4814Smrg esac 495815fb4814Smrg ;; 495915fb4814Smrg *) 496015fb4814Smrg ;; 496115fb4814Smrg esac 496215fb4814Smrg ;; 496315fb4814Smrg interix*) 496415fb4814Smrg # This is c89, which is MS Visual C++ (no shared libs) 496515fb4814Smrg # Anyone wants to do a port? 496615fb4814Smrg ;; 496715fb4814Smrg irix5* | irix6* | nonstopux*) 496815fb4814Smrg case $cc_basename in 496915fb4814Smrg CC*) 497015fb4814Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 497115fb4814Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 497215fb4814Smrg # CC pic flag -KPIC is the default. 497315fb4814Smrg ;; 497415fb4814Smrg *) 497515fb4814Smrg ;; 497615fb4814Smrg esac 497715fb4814Smrg ;; 497815fb4814Smrg linux*) 497915fb4814Smrg case $cc_basename in 498015fb4814Smrg KCC*) 498115fb4814Smrg # KAI C++ Compiler 498215fb4814Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 498315fb4814Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 498415fb4814Smrg ;; 498515fb4814Smrg icpc* | ecpc*) 498615fb4814Smrg # Intel C++ 498715fb4814Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 498815fb4814Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 498915fb4814Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' 499015fb4814Smrg ;; 499115fb4814Smrg pgCC*) 499215fb4814Smrg # Portland Group C++ compiler. 499315fb4814Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 499415fb4814Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 499515fb4814Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 499615fb4814Smrg ;; 499715fb4814Smrg cxx*) 499815fb4814Smrg # Compaq C++ 499915fb4814Smrg # Make sure the PIC flag is empty. It appears that all Alpha 500015fb4814Smrg # Linux and Compaq Tru64 Unix objects are PIC. 500115fb4814Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 500215fb4814Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 500315fb4814Smrg ;; 500415fb4814Smrg *) 500515fb4814Smrg ;; 500615fb4814Smrg esac 500715fb4814Smrg ;; 500815fb4814Smrg lynxos*) 500915fb4814Smrg ;; 501015fb4814Smrg m88k*) 501115fb4814Smrg ;; 501215fb4814Smrg mvs*) 501315fb4814Smrg case $cc_basename in 501415fb4814Smrg cxx*) 501515fb4814Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 501615fb4814Smrg ;; 501715fb4814Smrg *) 501815fb4814Smrg ;; 501915fb4814Smrg esac 502015fb4814Smrg ;; 502115fb4814Smrg netbsd*) 502215fb4814Smrg ;; 502315fb4814Smrg osf3* | osf4* | osf5*) 502415fb4814Smrg case $cc_basename in 502515fb4814Smrg KCC*) 502615fb4814Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 502715fb4814Smrg ;; 502815fb4814Smrg RCC*) 502915fb4814Smrg # Rational C++ 2.4.1 503015fb4814Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 503115fb4814Smrg ;; 503215fb4814Smrg cxx*) 503315fb4814Smrg # Digital/Compaq C++ 503415fb4814Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 503515fb4814Smrg # Make sure the PIC flag is empty. It appears that all Alpha 503615fb4814Smrg # Linux and Compaq Tru64 Unix objects are PIC. 503715fb4814Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 503815fb4814Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 503915fb4814Smrg ;; 504015fb4814Smrg *) 504115fb4814Smrg ;; 504215fb4814Smrg esac 504315fb4814Smrg ;; 504415fb4814Smrg psos*) 504515fb4814Smrg ;; 504615fb4814Smrg solaris*) 504715fb4814Smrg case $cc_basename in 504815fb4814Smrg CC*) 504915fb4814Smrg # Sun C++ 4.2, 5.x and Centerline C++ 505015fb4814Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 505115fb4814Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 505215fb4814Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 505315fb4814Smrg ;; 505415fb4814Smrg gcx*) 505515fb4814Smrg # Green Hills C++ Compiler 505615fb4814Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 505715fb4814Smrg ;; 505815fb4814Smrg *) 505915fb4814Smrg ;; 506015fb4814Smrg esac 506115fb4814Smrg ;; 506215fb4814Smrg sunos4*) 506315fb4814Smrg case $cc_basename in 506415fb4814Smrg CC*) 506515fb4814Smrg # Sun C++ 4.x 506615fb4814Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 506715fb4814Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 506815fb4814Smrg ;; 506915fb4814Smrg lcc*) 507015fb4814Smrg # Lucid 507115fb4814Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 507215fb4814Smrg ;; 507315fb4814Smrg *) 507415fb4814Smrg ;; 507515fb4814Smrg esac 507615fb4814Smrg ;; 507715fb4814Smrg tandem*) 507815fb4814Smrg case $cc_basename in 507915fb4814Smrg NCC*) 508015fb4814Smrg # NonStop-UX NCC 3.20 508115fb4814Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 508215fb4814Smrg ;; 508315fb4814Smrg *) 508415fb4814Smrg ;; 508515fb4814Smrg esac 508615fb4814Smrg ;; 508715fb4814Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 508815fb4814Smrg case $cc_basename in 508915fb4814Smrg CC*) 509015fb4814Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 509115fb4814Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 509215fb4814Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 509315fb4814Smrg ;; 509415fb4814Smrg esac 509515fb4814Smrg ;; 509615fb4814Smrg vxworks*) 509715fb4814Smrg ;; 509815fb4814Smrg *) 509915fb4814Smrg _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 510015fb4814Smrg ;; 510115fb4814Smrg esac 510215fb4814Smrg fi 510315fb4814Smrg], 510415fb4814Smrg[ 510515fb4814Smrg if test "$GCC" = yes; then 510615fb4814Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 510715fb4814Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' 510815fb4814Smrg 510915fb4814Smrg case $host_os in 511015fb4814Smrg aix*) 511115fb4814Smrg # All AIX code is PIC. 511215fb4814Smrg if test "$host_cpu" = ia64; then 511315fb4814Smrg # AIX 5 now supports IA64 processor 511415fb4814Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 511515fb4814Smrg fi 511615fb4814Smrg ;; 511715fb4814Smrg 511815fb4814Smrg amigaos*) 511915fb4814Smrg # FIXME: we need at least 68020 code to build shared libraries, but 512015fb4814Smrg # adding the `-m68020' flag to GCC prevents building anything better, 512115fb4814Smrg # like `-m68040'. 512215fb4814Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 512315fb4814Smrg ;; 512415fb4814Smrg 512515fb4814Smrg beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 512615fb4814Smrg # PIC is the default for these OSes. 512715fb4814Smrg ;; 512815fb4814Smrg 512915fb4814Smrg mingw* | pw32* | os2*) 513015fb4814Smrg # This hack is so that the source file can tell whether it is being 513115fb4814Smrg # built for inclusion in a dll (and should export symbols for example). 513215fb4814Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' 513315fb4814Smrg ;; 513415fb4814Smrg 513515fb4814Smrg darwin* | rhapsody*) 513615fb4814Smrg # PIC is the default on this platform 513715fb4814Smrg # Common symbols not allowed in MH_DYLIB files 513815fb4814Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 513915fb4814Smrg ;; 514015fb4814Smrg 514115fb4814Smrg interix3*) 514215fb4814Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 514315fb4814Smrg # Instead, we relocate shared libraries at runtime. 514415fb4814Smrg ;; 514515fb4814Smrg 514615fb4814Smrg msdosdjgpp*) 514715fb4814Smrg # Just because we use GCC doesn't mean we suddenly get shared libraries 514815fb4814Smrg # on systems that don't support them. 514915fb4814Smrg _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 515015fb4814Smrg enable_shared=no 515115fb4814Smrg ;; 515215fb4814Smrg 515315fb4814Smrg sysv4*MP*) 515415fb4814Smrg if test -d /usr/nec; then 515515fb4814Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 515615fb4814Smrg fi 515715fb4814Smrg ;; 515815fb4814Smrg 515915fb4814Smrg hpux*) 516015fb4814Smrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 516115fb4814Smrg # not for PA HP-UX. 516215fb4814Smrg case $host_cpu in 516315fb4814Smrg hppa*64*|ia64*) 516415fb4814Smrg # +Z the default 516515fb4814Smrg ;; 516615fb4814Smrg *) 516715fb4814Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 516815fb4814Smrg ;; 516915fb4814Smrg esac 517015fb4814Smrg ;; 517115fb4814Smrg 517215fb4814Smrg *) 517315fb4814Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 517415fb4814Smrg ;; 517515fb4814Smrg esac 517615fb4814Smrg else 517715fb4814Smrg # PORTME Check for flag to pass linker flags through the system compiler. 517815fb4814Smrg case $host_os in 517915fb4814Smrg aix*) 518015fb4814Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 518115fb4814Smrg if test "$host_cpu" = ia64; then 518215fb4814Smrg # AIX 5 now supports IA64 processor 518315fb4814Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 518415fb4814Smrg else 518515fb4814Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 518615fb4814Smrg fi 518715fb4814Smrg ;; 518815fb4814Smrg darwin*) 518915fb4814Smrg # PIC is the default on this platform 519015fb4814Smrg # Common symbols not allowed in MH_DYLIB files 519115fb4814Smrg case $cc_basename in 519215fb4814Smrg xlc*) 519315fb4814Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' 519415fb4814Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 519515fb4814Smrg ;; 519615fb4814Smrg esac 519715fb4814Smrg ;; 519815fb4814Smrg 519915fb4814Smrg mingw* | pw32* | os2*) 520015fb4814Smrg # This hack is so that the source file can tell whether it is being 520115fb4814Smrg # built for inclusion in a dll (and should export symbols for example). 520215fb4814Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' 520315fb4814Smrg ;; 520415fb4814Smrg 520515fb4814Smrg hpux9* | hpux10* | hpux11*) 520615fb4814Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 520715fb4814Smrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 520815fb4814Smrg # not for PA HP-UX. 520915fb4814Smrg case $host_cpu in 521015fb4814Smrg hppa*64*|ia64*) 521115fb4814Smrg # +Z the default 521215fb4814Smrg ;; 521315fb4814Smrg *) 521415fb4814Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 521515fb4814Smrg ;; 521615fb4814Smrg esac 521715fb4814Smrg # Is there a better lt_prog_compiler_static that works with the bundled CC? 521815fb4814Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 521915fb4814Smrg ;; 522015fb4814Smrg 522115fb4814Smrg irix5* | irix6* | nonstopux*) 522215fb4814Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 522315fb4814Smrg # PIC (with -KPIC) is the default. 522415fb4814Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 522515fb4814Smrg ;; 522615fb4814Smrg 522715fb4814Smrg newsos6) 522815fb4814Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 522915fb4814Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 523015fb4814Smrg ;; 523115fb4814Smrg 523215fb4814Smrg linux*) 523315fb4814Smrg case $cc_basename in 523415fb4814Smrg icc* | ecc*) 523515fb4814Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 523615fb4814Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 523715fb4814Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' 523815fb4814Smrg ;; 523915fb4814Smrg pgcc* | pgf77* | pgf90* | pgf95*) 524015fb4814Smrg # Portland Group compilers (*not* the Pentium gcc compiler, 524115fb4814Smrg # which looks to be a dead project) 524215fb4814Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 524315fb4814Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 524415fb4814Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 524515fb4814Smrg ;; 524615fb4814Smrg ccc*) 524715fb4814Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 524815fb4814Smrg # All Alpha code is PIC. 524915fb4814Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 525015fb4814Smrg ;; 525115fb4814Smrg esac 525215fb4814Smrg ;; 525315fb4814Smrg 525415fb4814Smrg osf3* | osf4* | osf5*) 525515fb4814Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 525615fb4814Smrg # All OSF/1 code is PIC. 525715fb4814Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 525815fb4814Smrg ;; 525915fb4814Smrg 526015fb4814Smrg solaris*) 526115fb4814Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 526215fb4814Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 526315fb4814Smrg case $cc_basename in 526415fb4814Smrg f77* | f90* | f95*) 526515fb4814Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 526615fb4814Smrg *) 526715fb4814Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 526815fb4814Smrg esac 526915fb4814Smrg ;; 527015fb4814Smrg 527115fb4814Smrg sunos4*) 527215fb4814Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 527315fb4814Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 527415fb4814Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 527515fb4814Smrg ;; 527615fb4814Smrg 527715fb4814Smrg sysv4 | sysv4.2uw2* | sysv4.3*) 527815fb4814Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 527915fb4814Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 528015fb4814Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 528115fb4814Smrg ;; 528215fb4814Smrg 528315fb4814Smrg sysv4*MP*) 528415fb4814Smrg if test -d /usr/nec ;then 528515fb4814Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 528615fb4814Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 528715fb4814Smrg fi 528815fb4814Smrg ;; 528915fb4814Smrg 529015fb4814Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 529115fb4814Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 529215fb4814Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 529315fb4814Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 529415fb4814Smrg ;; 529515fb4814Smrg 529615fb4814Smrg unicos*) 529715fb4814Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 529815fb4814Smrg _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 529915fb4814Smrg ;; 530015fb4814Smrg 530115fb4814Smrg uts4*) 530215fb4814Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 530315fb4814Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 530415fb4814Smrg ;; 530515fb4814Smrg 530615fb4814Smrg *) 530715fb4814Smrg _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 530815fb4814Smrg ;; 530915fb4814Smrg esac 531015fb4814Smrg fi 531115fb4814Smrg]) 531215fb4814SmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)]) 531315fb4814Smrg 531415fb4814Smrg# 531515fb4814Smrg# Check to make sure the PIC flag actually works. 531615fb4814Smrg# 531715fb4814Smrgif test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then 531815fb4814Smrg AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works], 531915fb4814Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1), 532015fb4814Smrg [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [], 532115fb4814Smrg [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in 532215fb4814Smrg "" | " "*) ;; 532315fb4814Smrg *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;; 532415fb4814Smrg esac], 532515fb4814Smrg [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 532615fb4814Smrg _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 532715fb4814Smrgfi 532815fb4814Smrgcase $host_os in 532915fb4814Smrg # For platforms which do not support PIC, -DPIC is meaningless: 533015fb4814Smrg *djgpp*) 533115fb4814Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 533215fb4814Smrg ;; 533315fb4814Smrg *) 533415fb4814Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])" 533515fb4814Smrg ;; 533615fb4814Smrgesac 533715fb4814Smrg 533815fb4814Smrg# 533915fb4814Smrg# Check to make sure the static flag actually works. 534015fb4814Smrg# 534115fb4814Smrgwl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\" 534215fb4814SmrgAC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 534315fb4814Smrg _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1), 534415fb4814Smrg $lt_tmp_static_flag, 534515fb4814Smrg [], 534615fb4814Smrg [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=]) 534715fb4814Smrg]) 534815fb4814Smrg 534915fb4814Smrg 535015fb4814Smrg# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME]) 535115fb4814Smrg# ------------------------------------ 535215fb4814Smrg# See if the linker supports building shared libraries. 535315fb4814SmrgAC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS], 535415fb4814Smrg[AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 535515fb4814Smrgifelse([$1],[CXX],[ 535615fb4814Smrg _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 535715fb4814Smrg case $host_os in 535815fb4814Smrg aix4* | aix5*) 535915fb4814Smrg # If we're using GNU nm, then we don't want the "-C" option. 536015fb4814Smrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 536115fb4814Smrg if $NM -V 2>&1 | grep 'GNU' > /dev/null; then 536215fb4814Smrg _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' 536315fb4814Smrg else 536415fb4814Smrg _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' 536515fb4814Smrg fi 536615fb4814Smrg ;; 536715fb4814Smrg pw32*) 536815fb4814Smrg _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" 536915fb4814Smrg ;; 537015fb4814Smrg cygwin* | mingw*) 537115fb4814Smrg _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' 537215fb4814Smrg ;; 537315fb4814Smrg *) 537415fb4814Smrg _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 537515fb4814Smrg ;; 537615fb4814Smrg esac 537715fb4814Smrg],[ 537815fb4814Smrg runpath_var= 537915fb4814Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)= 538015fb4814Smrg _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no 538115fb4814Smrg _LT_AC_TAGVAR(archive_cmds, $1)= 538215fb4814Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)= 538315fb4814Smrg _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)= 538415fb4814Smrg _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)= 538515fb4814Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= 538615fb4814Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 538715fb4814Smrg _LT_AC_TAGVAR(thread_safe_flag_spec, $1)= 538815fb4814Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= 538915fb4814Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 539015fb4814Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 539115fb4814Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 539215fb4814Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=no 539315fb4814Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 539415fb4814Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown 539515fb4814Smrg _LT_AC_TAGVAR(hardcode_automatic, $1)=no 539615fb4814Smrg _LT_AC_TAGVAR(module_cmds, $1)= 539715fb4814Smrg _LT_AC_TAGVAR(module_expsym_cmds, $1)= 539815fb4814Smrg _LT_AC_TAGVAR(always_export_symbols, $1)=no 539915fb4814Smrg _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 540015fb4814Smrg # include_expsyms should be a list of space-separated symbols to be *always* 540115fb4814Smrg # included in the symbol list 540215fb4814Smrg _LT_AC_TAGVAR(include_expsyms, $1)= 540315fb4814Smrg # exclude_expsyms can be an extended regexp of symbols to exclude 540415fb4814Smrg # it will be wrapped by ` (' and `)$', so one must not match beginning or 540515fb4814Smrg # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', 540615fb4814Smrg # as well as any symbol that contains `d'. 540715fb4814Smrg _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_" 540815fb4814Smrg # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 540915fb4814Smrg # platforms (ab)use it in PIC code, but their linkers get confused if 541015fb4814Smrg # the symbol is explicitly referenced. Since portable code cannot 541115fb4814Smrg # rely on this symbol name, it's probably fine to never include it in 541215fb4814Smrg # preloaded symbol tables. 541315fb4814Smrg extract_expsyms_cmds= 541415fb4814Smrg # Just being paranoid about ensuring that cc_basename is set. 541515fb4814Smrg _LT_CC_BASENAME([$compiler]) 541615fb4814Smrg case $host_os in 541715fb4814Smrg cygwin* | mingw* | pw32*) 541815fb4814Smrg # FIXME: the MSVC++ port hasn't been tested in a loooong time 541915fb4814Smrg # When not using gcc, we currently assume that we are using 542015fb4814Smrg # Microsoft Visual C++. 542115fb4814Smrg if test "$GCC" != yes; then 542215fb4814Smrg with_gnu_ld=no 542315fb4814Smrg fi 542415fb4814Smrg ;; 542515fb4814Smrg interix*) 542615fb4814Smrg # we just hope/assume this is gcc and not c89 (= MSVC++) 542715fb4814Smrg with_gnu_ld=yes 542815fb4814Smrg ;; 542915fb4814Smrg openbsd*) 543015fb4814Smrg with_gnu_ld=no 543115fb4814Smrg ;; 543215fb4814Smrg esac 543315fb4814Smrg 543415fb4814Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=yes 543515fb4814Smrg if test "$with_gnu_ld" = yes; then 543615fb4814Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 543715fb4814Smrg wlarc='${wl}' 543815fb4814Smrg 543915fb4814Smrg # Set some defaults for GNU ld with shared library support. These 544015fb4814Smrg # are reset later if shared libraries are not supported. Putting them 544115fb4814Smrg # here allows them to be overridden if necessary. 544215fb4814Smrg runpath_var=LD_RUN_PATH 544315fb4814Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 544415fb4814Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 544515fb4814Smrg # ancient GNU ld didn't support --whole-archive et. al. 544615fb4814Smrg if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then 544715fb4814Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 544815fb4814Smrg else 544915fb4814Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 545015fb4814Smrg fi 545115fb4814Smrg supports_anon_versioning=no 545215fb4814Smrg case `$LD -v 2>/dev/null` in 545315fb4814Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 545415fb4814Smrg *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 545515fb4814Smrg *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 545615fb4814Smrg *\ 2.11.*) ;; # other 2.11 versions 545715fb4814Smrg *) supports_anon_versioning=yes ;; 545815fb4814Smrg esac 545915fb4814Smrg 546015fb4814Smrg # See if GNU ld supports shared libraries. 546115fb4814Smrg case $host_os in 546215fb4814Smrg aix3* | aix4* | aix5*) 546315fb4814Smrg # On AIX/PPC, the GNU linker is very broken 546415fb4814Smrg if test "$host_cpu" != ia64; then 546515fb4814Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 546615fb4814Smrg cat <<EOF 1>&2 546715fb4814Smrg 546815fb4814Smrg*** Warning: the GNU linker, at least up to release 2.9.1, is reported 546915fb4814Smrg*** to be unable to reliably create shared libraries on AIX. 547015fb4814Smrg*** Therefore, libtool is disabling shared libraries support. If you 547115fb4814Smrg*** really care for shared libraries, you may want to modify your PATH 547215fb4814Smrg*** so that a non-GNU linker is found, and then restart. 547315fb4814Smrg 547415fb4814SmrgEOF 547515fb4814Smrg fi 547615fb4814Smrg ;; 547715fb4814Smrg 547815fb4814Smrg amigaos*) 547915fb4814Smrg _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)' 548015fb4814Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 548115fb4814Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 548215fb4814Smrg 548315fb4814Smrg # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports 548415fb4814Smrg # that the semantics of dynamic libraries on AmigaOS, at least up 548515fb4814Smrg # to version 4, is to share data among multiple programs linked 548615fb4814Smrg # with the same dynamic library. Since this doesn't match the 548715fb4814Smrg # behavior of shared libraries on other platforms, we can't use 548815fb4814Smrg # them. 548915fb4814Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 549015fb4814Smrg ;; 549115fb4814Smrg 549215fb4814Smrg beos*) 549315fb4814Smrg if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 549415fb4814Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 549515fb4814Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 549615fb4814Smrg # support --undefined. This deserves some investigation. FIXME 549715fb4814Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 549815fb4814Smrg else 549915fb4814Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 550015fb4814Smrg fi 550115fb4814Smrg ;; 550215fb4814Smrg 550315fb4814Smrg cygwin* | mingw* | pw32*) 550415fb4814Smrg # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 550515fb4814Smrg # as there is no search path for DLLs. 550615fb4814Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 550715fb4814Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 550815fb4814Smrg _LT_AC_TAGVAR(always_export_symbols, $1)=no 550915fb4814Smrg _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 551015fb4814Smrg _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' 551115fb4814Smrg 551215fb4814Smrg if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then 551315fb4814Smrg _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' 551415fb4814Smrg # If the export-symbols file already is a .def file (1st line 551515fb4814Smrg # is EXPORTS), use it as is; otherwise, prepend... 551615fb4814Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 551715fb4814Smrg cp $export_symbols $output_objdir/$soname.def; 551815fb4814Smrg else 551915fb4814Smrg echo EXPORTS > $output_objdir/$soname.def; 552015fb4814Smrg cat $export_symbols >> $output_objdir/$soname.def; 552115fb4814Smrg fi~ 552215fb4814Smrg $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 552315fb4814Smrg else 552415fb4814Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 552515fb4814Smrg fi 552615fb4814Smrg ;; 552715fb4814Smrg 552815fb4814Smrg interix3*) 552915fb4814Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 553015fb4814Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 553115fb4814Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 553215fb4814Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 553315fb4814Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 553415fb4814Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 553515fb4814Smrg # default) and relocated if they conflict, which is a slow very memory 553615fb4814Smrg # consuming and fragmenting process. To avoid this, we pick a random, 553715fb4814Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 553815fb4814Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 553915fb4814Smrg _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' 554015fb4814Smrg _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' 554115fb4814Smrg ;; 554215fb4814Smrg 554315fb4814Smrg linux*) 554415fb4814Smrg if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 554515fb4814Smrg tmp_addflag= 554615fb4814Smrg case $cc_basename,$host_cpu in 554715fb4814Smrg pgcc*) # Portland Group C compiler 554815fb4814Smrg _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' 554915fb4814Smrg tmp_addflag=' $pic_flag' 555015fb4814Smrg ;; 555115fb4814Smrg pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers 555215fb4814Smrg _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' 555315fb4814Smrg tmp_addflag=' $pic_flag -Mnomain' ;; 555415fb4814Smrg ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 555515fb4814Smrg tmp_addflag=' -i_dynamic' ;; 555615fb4814Smrg efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 555715fb4814Smrg tmp_addflag=' -i_dynamic -nofor_main' ;; 555815fb4814Smrg ifc* | ifort*) # Intel Fortran compiler 555915fb4814Smrg tmp_addflag=' -nofor_main' ;; 556015fb4814Smrg esac 556115fb4814Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 556215fb4814Smrg 556315fb4814Smrg if test $supports_anon_versioning = yes; then 556415fb4814Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~ 556515fb4814Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 556615fb4814Smrg $echo "local: *; };" >> $output_objdir/$libname.ver~ 556715fb4814Smrg $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 556815fb4814Smrg fi 556915fb4814Smrg else 557015fb4814Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 557115fb4814Smrg fi 557215fb4814Smrg ;; 557315fb4814Smrg 557415fb4814Smrg netbsd*) 557515fb4814Smrg if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then 557615fb4814Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 557715fb4814Smrg wlarc= 557815fb4814Smrg else 557915fb4814Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 558015fb4814Smrg _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' 558115fb4814Smrg fi 558215fb4814Smrg ;; 558315fb4814Smrg 558415fb4814Smrg solaris*) 558515fb4814Smrg if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then 558615fb4814Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 558715fb4814Smrg cat <<EOF 1>&2 558815fb4814Smrg 558915fb4814Smrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably 559015fb4814Smrg*** create shared libraries on Solaris systems. Therefore, libtool 559115fb4814Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 559215fb4814Smrg*** binutils to release 2.9.1 or newer. Another option is to modify 559315fb4814Smrg*** your PATH or compiler configuration so that the native linker is 559415fb4814Smrg*** used, and then restart. 559515fb4814Smrg 559615fb4814SmrgEOF 559715fb4814Smrg elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 559815fb4814Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 559915fb4814Smrg _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' 560015fb4814Smrg else 560115fb4814Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 560215fb4814Smrg fi 560315fb4814Smrg ;; 560415fb4814Smrg 560515fb4814Smrg sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 560615fb4814Smrg case `$LD -v 2>&1` in 560715fb4814Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 560815fb4814Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 560915fb4814Smrg cat <<_LT_EOF 1>&2 561015fb4814Smrg 561115fb4814Smrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not 561215fb4814Smrg*** reliably create shared libraries on SCO systems. Therefore, libtool 561315fb4814Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 561415fb4814Smrg*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 561515fb4814Smrg*** your PATH or compiler configuration so that the native linker is 561615fb4814Smrg*** used, and then restart. 561715fb4814Smrg 561815fb4814Smrg_LT_EOF 561915fb4814Smrg ;; 562015fb4814Smrg *) 562115fb4814Smrg if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 562215fb4814Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' 562315fb4814Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' 562415fb4814Smrg _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' 562515fb4814Smrg else 562615fb4814Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 562715fb4814Smrg fi 562815fb4814Smrg ;; 562915fb4814Smrg esac 563015fb4814Smrg ;; 563115fb4814Smrg 563215fb4814Smrg sunos4*) 563315fb4814Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 563415fb4814Smrg wlarc= 563515fb4814Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 563615fb4814Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 563715fb4814Smrg ;; 563815fb4814Smrg 563915fb4814Smrg *) 564015fb4814Smrg if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 564115fb4814Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 564215fb4814Smrg _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' 564315fb4814Smrg else 564415fb4814Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 564515fb4814Smrg fi 564615fb4814Smrg ;; 564715fb4814Smrg esac 564815fb4814Smrg 564915fb4814Smrg if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then 565015fb4814Smrg runpath_var= 565115fb4814Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= 565215fb4814Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= 565315fb4814Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 565415fb4814Smrg fi 565515fb4814Smrg else 565615fb4814Smrg # PORTME fill in a description of your system's linker (not GNU ld) 565715fb4814Smrg case $host_os in 565815fb4814Smrg aix3*) 565915fb4814Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 566015fb4814Smrg _LT_AC_TAGVAR(always_export_symbols, $1)=yes 566115fb4814Smrg _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' 566215fb4814Smrg # Note: this linker hardcodes the directories in LIBPATH if there 566315fb4814Smrg # are no directories specified by -L. 566415fb4814Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 566515fb4814Smrg if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then 566615fb4814Smrg # Neither direct hardcoding nor static linking is supported with a 566715fb4814Smrg # broken collect2. 566815fb4814Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported 566915fb4814Smrg fi 567015fb4814Smrg ;; 567115fb4814Smrg 567215fb4814Smrg aix4* | aix5*) 567315fb4814Smrg if test "$host_cpu" = ia64; then 567415fb4814Smrg # On IA64, the linker does run time linking by default, so we don't 567515fb4814Smrg # have to do anything special. 567615fb4814Smrg aix_use_runtimelinking=no 567715fb4814Smrg exp_sym_flag='-Bexport' 567815fb4814Smrg no_entry_flag="" 567915fb4814Smrg else 568015fb4814Smrg # If we're using GNU nm, then we don't want the "-C" option. 568115fb4814Smrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 568215fb4814Smrg if $NM -V 2>&1 | grep 'GNU' > /dev/null; then 568315fb4814Smrg _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' 568415fb4814Smrg else 568515fb4814Smrg _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' 568615fb4814Smrg fi 568715fb4814Smrg aix_use_runtimelinking=no 568815fb4814Smrg 568915fb4814Smrg # Test if we are trying to use run time linking or normal 569015fb4814Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 569115fb4814Smrg # need to do runtime linking. 569215fb4814Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*) 569315fb4814Smrg for ld_flag in $LDFLAGS; do 569415fb4814Smrg if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then 569515fb4814Smrg aix_use_runtimelinking=yes 569615fb4814Smrg break 569715fb4814Smrg fi 569815fb4814Smrg done 569915fb4814Smrg ;; 570015fb4814Smrg esac 570115fb4814Smrg 570215fb4814Smrg exp_sym_flag='-bexport' 570315fb4814Smrg no_entry_flag='-bnoentry' 570415fb4814Smrg fi 570515fb4814Smrg 570615fb4814Smrg # When large executables or shared objects are built, AIX ld can 570715fb4814Smrg # have problems creating the table of contents. If linking a library 570815fb4814Smrg # or program results in "error TOC overflow" add -mminimal-toc to 570915fb4814Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 571015fb4814Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 571115fb4814Smrg 571215fb4814Smrg _LT_AC_TAGVAR(archive_cmds, $1)='' 571315fb4814Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 571415fb4814Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' 571515fb4814Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 571615fb4814Smrg 571715fb4814Smrg if test "$GCC" = yes; then 571815fb4814Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 571915fb4814Smrg # We only want to do this on AIX 4.2 and lower, the check 572015fb4814Smrg # below for broken collect2 doesn't work under 4.3+ 572115fb4814Smrg collect2name=`${CC} -print-prog-name=collect2` 572215fb4814Smrg if test -f "$collect2name" && \ 572315fb4814Smrg strings "$collect2name" | grep resolve_lib_name >/dev/null 572415fb4814Smrg then 572515fb4814Smrg # We have reworked collect2 572615fb4814Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 572715fb4814Smrg else 572815fb4814Smrg # We have old collect2 572915fb4814Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported 573015fb4814Smrg # It fails to find uninstalled libraries when the uninstalled 573115fb4814Smrg # path is not listed in the libpath. Setting hardcode_minus_L 573215fb4814Smrg # to unsupported forces relinking 573315fb4814Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 573415fb4814Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 573515fb4814Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 573615fb4814Smrg fi 573715fb4814Smrg ;; 573815fb4814Smrg esac 573915fb4814Smrg shared_flag='-shared' 574015fb4814Smrg if test "$aix_use_runtimelinking" = yes; then 574115fb4814Smrg shared_flag="$shared_flag "'${wl}-G' 574215fb4814Smrg fi 574315fb4814Smrg else 574415fb4814Smrg # not using gcc 574515fb4814Smrg if test "$host_cpu" = ia64; then 574615fb4814Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 574715fb4814Smrg # chokes on -Wl,-G. The following line is correct: 574815fb4814Smrg shared_flag='-G' 574915fb4814Smrg else 575015fb4814Smrg if test "$aix_use_runtimelinking" = yes; then 575115fb4814Smrg shared_flag='${wl}-G' 575215fb4814Smrg else 575315fb4814Smrg shared_flag='${wl}-bM:SRE' 575415fb4814Smrg fi 575515fb4814Smrg fi 575615fb4814Smrg fi 575715fb4814Smrg 575815fb4814Smrg # It seems that -bexpall does not export symbols beginning with 575915fb4814Smrg # underscore (_), so it is better to generate a list of symbols to export. 576015fb4814Smrg _LT_AC_TAGVAR(always_export_symbols, $1)=yes 576115fb4814Smrg if test "$aix_use_runtimelinking" = yes; then 576215fb4814Smrg # Warning - without using the other runtime loading flags (-brtl), 576315fb4814Smrg # -berok will link without error, but may produce a broken library. 576415fb4814Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' 576515fb4814Smrg # Determine the default libpath from the value encoded in an empty executable. 576615fb4814Smrg _LT_AC_SYS_LIBPATH_AIX 576715fb4814Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 576815fb4814Smrg _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" 576915fb4814Smrg else 577015fb4814Smrg if test "$host_cpu" = ia64; then 577115fb4814Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 577215fb4814Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 577315fb4814Smrg _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" 577415fb4814Smrg else 577515fb4814Smrg # Determine the default libpath from the value encoded in an empty executable. 577615fb4814Smrg _LT_AC_SYS_LIBPATH_AIX 577715fb4814Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 577815fb4814Smrg # Warning - without using the other run time loading flags, 577915fb4814Smrg # -berok will link without error, but may produce a broken library. 578015fb4814Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 578115fb4814Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 578215fb4814Smrg # Exported symbols can be pulled into shared objects from archives 578315fb4814Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 578415fb4814Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes 578515fb4814Smrg # This is similar to how AIX traditionally builds its shared libraries. 578615fb4814Smrg _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' 578715fb4814Smrg fi 578815fb4814Smrg fi 578915fb4814Smrg ;; 579015fb4814Smrg 579115fb4814Smrg amigaos*) 579215fb4814Smrg _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)' 579315fb4814Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 579415fb4814Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 579515fb4814Smrg # see comment about different semantics on the GNU ld section 579615fb4814Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 579715fb4814Smrg ;; 579815fb4814Smrg 579915fb4814Smrg bsdi[[45]]*) 580015fb4814Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 580115fb4814Smrg ;; 580215fb4814Smrg 580315fb4814Smrg cygwin* | mingw* | pw32*) 580415fb4814Smrg # When not using gcc, we currently assume that we are using 580515fb4814Smrg # Microsoft Visual C++. 580615fb4814Smrg # hardcode_libdir_flag_spec is actually meaningless, as there is 580715fb4814Smrg # no search path for DLLs. 580815fb4814Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 580915fb4814Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 581015fb4814Smrg # Tell ltmain to make .lib files, not .a files. 581115fb4814Smrg libext=lib 581215fb4814Smrg # Tell ltmain to make .dll files, not .so files. 581315fb4814Smrg shrext_cmds=".dll" 581415fb4814Smrg # FIXME: Setting linknames here is a bad hack. 581515fb4814Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' 581615fb4814Smrg # The linker will automatically build a .lib file if we build a DLL. 581715fb4814Smrg _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true' 581815fb4814Smrg # FIXME: Should let the user specify the lib program. 581915fb4814Smrg _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs' 582015fb4814Smrg _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' 582115fb4814Smrg _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 582215fb4814Smrg ;; 582315fb4814Smrg 582415fb4814Smrg darwin* | rhapsody*) 582515fb4814Smrg case $host_os in 582615fb4814Smrg rhapsody* | darwin1.[[012]]) 582715fb4814Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' 582815fb4814Smrg ;; 582915fb4814Smrg *) # Darwin 1.3 on 583015fb4814Smrg if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then 583115fb4814Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' 583215fb4814Smrg else 583315fb4814Smrg case ${MACOSX_DEPLOYMENT_TARGET} in 583415fb4814Smrg 10.[[012]]) 583515fb4814Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' 583615fb4814Smrg ;; 583715fb4814Smrg 10.*) 583815fb4814Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup' 583915fb4814Smrg ;; 584015fb4814Smrg esac 584115fb4814Smrg fi 584215fb4814Smrg ;; 584315fb4814Smrg esac 584415fb4814Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 584515fb4814Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 584615fb4814Smrg _LT_AC_TAGVAR(hardcode_automatic, $1)=yes 584715fb4814Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 584815fb4814Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' 584915fb4814Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 585015fb4814Smrg if test "$GCC" = yes ; then 585115fb4814Smrg output_verbose_link_cmd='echo' 585215fb4814Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' 585315fb4814Smrg _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' 585415fb4814Smrg # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds 585515fb4814Smrg _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}' 585615fb4814Smrg _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}' 585715fb4814Smrg else 585815fb4814Smrg case $cc_basename in 585915fb4814Smrg xlc*) 586015fb4814Smrg output_verbose_link_cmd='echo' 586115fb4814Smrg _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' 586215fb4814Smrg _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' 586315fb4814Smrg # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds 586415fb4814Smrg _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}' 586515fb4814Smrg _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}' 586615fb4814Smrg ;; 586715fb4814Smrg *) 586815fb4814Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 586915fb4814Smrg ;; 587015fb4814Smrg esac 587115fb4814Smrg fi 587215fb4814Smrg ;; 587315fb4814Smrg 587415fb4814Smrg dgux*) 587515fb4814Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 587615fb4814Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 587715fb4814Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 587815fb4814Smrg ;; 587915fb4814Smrg 588015fb4814Smrg freebsd1*) 588115fb4814Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 588215fb4814Smrg ;; 588315fb4814Smrg 588415fb4814Smrg # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 588515fb4814Smrg # support. Future versions do this automatically, but an explicit c++rt0.o 588615fb4814Smrg # does not break anything, and helps significantly (at the cost of a little 588715fb4814Smrg # extra space). 588815fb4814Smrg freebsd2.2*) 588915fb4814Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 589015fb4814Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 589115fb4814Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 589215fb4814Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 589315fb4814Smrg ;; 589415fb4814Smrg 589515fb4814Smrg # Unfortunately, older versions of FreeBSD 2 do not have this feature. 589615fb4814Smrg freebsd2*) 589715fb4814Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 589815fb4814Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 589915fb4814Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 590015fb4814Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 590115fb4814Smrg ;; 590215fb4814Smrg 590315fb4814Smrg # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 590415fb4814Smrg freebsd* | kfreebsd*-gnu | dragonfly*) 590515fb4814Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' 590615fb4814Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 590715fb4814Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 590815fb4814Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 590915fb4814Smrg ;; 591015fb4814Smrg 591115fb4814Smrg hpux9*) 591215fb4814Smrg if test "$GCC" = yes; then 591315fb4814Smrg _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' 591415fb4814Smrg else 591515fb4814Smrg _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' 591615fb4814Smrg fi 591715fb4814Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 591815fb4814Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 591915fb4814Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 592015fb4814Smrg 592115fb4814Smrg # hardcode_minus_L: Not really in the search PATH, 592215fb4814Smrg # but as the default location of the library. 592315fb4814Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 592415fb4814Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 592515fb4814Smrg ;; 592615fb4814Smrg 592715fb4814Smrg hpux10*) 592815fb4814Smrg if test "$GCC" = yes -a "$with_gnu_ld" = no; then 592915fb4814Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 593015fb4814Smrg else 593115fb4814Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 593215fb4814Smrg fi 593315fb4814Smrg if test "$with_gnu_ld" = no; then 593415fb4814Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 593515fb4814Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 593615fb4814Smrg 593715fb4814Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 593815fb4814Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 593915fb4814Smrg 594015fb4814Smrg # hardcode_minus_L: Not really in the search PATH, 594115fb4814Smrg # but as the default location of the library. 594215fb4814Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 594315fb4814Smrg fi 594415fb4814Smrg ;; 594515fb4814Smrg 594615fb4814Smrg hpux11*) 594715fb4814Smrg if test "$GCC" = yes -a "$with_gnu_ld" = no; then 594815fb4814Smrg case $host_cpu in 594915fb4814Smrg hppa*64*) 595015fb4814Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 595115fb4814Smrg ;; 595215fb4814Smrg ia64*) 595315fb4814Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 595415fb4814Smrg ;; 595515fb4814Smrg *) 595615fb4814Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 595715fb4814Smrg ;; 595815fb4814Smrg esac 595915fb4814Smrg else 596015fb4814Smrg case $host_cpu in 596115fb4814Smrg hppa*64*) 596215fb4814Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 596315fb4814Smrg ;; 596415fb4814Smrg ia64*) 596515fb4814Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 596615fb4814Smrg ;; 596715fb4814Smrg *) 596815fb4814Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 596915fb4814Smrg ;; 597015fb4814Smrg esac 597115fb4814Smrg fi 597215fb4814Smrg if test "$with_gnu_ld" = no; then 597315fb4814Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 597415fb4814Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 597515fb4814Smrg 597615fb4814Smrg case $host_cpu in 597715fb4814Smrg hppa*64*|ia64*) 597815fb4814Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' 597915fb4814Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 598015fb4814Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 598115fb4814Smrg ;; 598215fb4814Smrg *) 598315fb4814Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 598415fb4814Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 598515fb4814Smrg 598615fb4814Smrg # hardcode_minus_L: Not really in the search PATH, 598715fb4814Smrg # but as the default location of the library. 598815fb4814Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 598915fb4814Smrg ;; 599015fb4814Smrg esac 599115fb4814Smrg fi 599215fb4814Smrg ;; 599315fb4814Smrg 599415fb4814Smrg irix5* | irix6* | nonstopux*) 599515fb4814Smrg if test "$GCC" = yes; then 599615fb4814Smrg _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' 599715fb4814Smrg else 599815fb4814Smrg _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' 599915fb4814Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' 600015fb4814Smrg fi 600115fb4814Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 600215fb4814Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 600315fb4814Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 600415fb4814Smrg ;; 600515fb4814Smrg 600615fb4814Smrg netbsd*) 600715fb4814Smrg if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then 600815fb4814Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 600915fb4814Smrg else 601015fb4814Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 601115fb4814Smrg fi 601215fb4814Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 601315fb4814Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 601415fb4814Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 601515fb4814Smrg ;; 601615fb4814Smrg 601715fb4814Smrg newsos6) 601815fb4814Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 601915fb4814Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 602015fb4814Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 602115fb4814Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 602215fb4814Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 602315fb4814Smrg ;; 602415fb4814Smrg 602515fb4814Smrg openbsd*) 602615fb4814Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 602715fb4814Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 602815fb4814Smrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 602915fb4814Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 603015fb4814Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' 603115fb4814Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 603215fb4814Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 603315fb4814Smrg else 603415fb4814Smrg case $host_os in 603515fb4814Smrg openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) 603615fb4814Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 603715fb4814Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 603815fb4814Smrg ;; 603915fb4814Smrg *) 604015fb4814Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 604115fb4814Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 604215fb4814Smrg ;; 604315fb4814Smrg esac 604415fb4814Smrg fi 604515fb4814Smrg ;; 604615fb4814Smrg 604715fb4814Smrg os2*) 604815fb4814Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 604915fb4814Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 605015fb4814Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 605115fb4814Smrg _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' 605215fb4814Smrg _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' 605315fb4814Smrg ;; 605415fb4814Smrg 605515fb4814Smrg osf3*) 605615fb4814Smrg if test "$GCC" = yes; then 605715fb4814Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 605815fb4814Smrg _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' 605915fb4814Smrg else 606015fb4814Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 606115fb4814Smrg _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' 606215fb4814Smrg fi 606315fb4814Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 606415fb4814Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 606515fb4814Smrg ;; 606615fb4814Smrg 606715fb4814Smrg osf4* | osf5*) # as osf3* with the addition of -msym flag 606815fb4814Smrg if test "$GCC" = yes; then 606915fb4814Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 607015fb4814Smrg _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' 607115fb4814Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 607215fb4814Smrg else 607315fb4814Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 607415fb4814Smrg _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' 607515fb4814Smrg _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~ 607615fb4814Smrg $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' 607715fb4814Smrg 607815fb4814Smrg # Both c and cxx compiler support -rpath directly 607915fb4814Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 608015fb4814Smrg fi 608115fb4814Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 608215fb4814Smrg ;; 608315fb4814Smrg 608415fb4814Smrg solaris*) 608515fb4814Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text' 608615fb4814Smrg if test "$GCC" = yes; then 608715fb4814Smrg wlarc='${wl}' 608815fb4814Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 608915fb4814Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 609015fb4814Smrg $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' 609115fb4814Smrg else 609215fb4814Smrg wlarc='' 609315fb4814Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' 609415fb4814Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 609515fb4814Smrg $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' 609615fb4814Smrg fi 609715fb4814Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 609815fb4814Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 609915fb4814Smrg case $host_os in 610015fb4814Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 610115fb4814Smrg *) 610215fb4814Smrg # The compiler driver will combine linker options so we 610315fb4814Smrg # cannot just pass the convience library names through 610415fb4814Smrg # without $wl, iff we do not link with $LD. 610515fb4814Smrg # Luckily, gcc supports the same syntax we need for Sun Studio. 610615fb4814Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 610715fb4814Smrg case $wlarc in 610815fb4814Smrg '') 610915fb4814Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; 611015fb4814Smrg *) 611115fb4814Smrg _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' ;; 611215fb4814Smrg esac ;; 611315fb4814Smrg esac 611415fb4814Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 611515fb4814Smrg ;; 611615fb4814Smrg 611715fb4814Smrg sunos4*) 611815fb4814Smrg if test "x$host_vendor" = xsequent; then 611915fb4814Smrg # Use $CC to link under sequent, because it throws in some extra .o 612015fb4814Smrg # files that make .init and .fini sections work. 612115fb4814Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' 612215fb4814Smrg else 612315fb4814Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 612415fb4814Smrg fi 612515fb4814Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 612615fb4814Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 612715fb4814Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 612815fb4814Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 612915fb4814Smrg ;; 613015fb4814Smrg 613115fb4814Smrg sysv4) 613215fb4814Smrg case $host_vendor in 613315fb4814Smrg sni) 613415fb4814Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 613515fb4814Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 613615fb4814Smrg ;; 613715fb4814Smrg siemens) 613815fb4814Smrg ## LD is ld it makes a PLAMLIB 613915fb4814Smrg ## CC just makes a GrossModule. 614015fb4814Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 614115fb4814Smrg _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 614215fb4814Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 614315fb4814Smrg ;; 614415fb4814Smrg motorola) 614515fb4814Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 614615fb4814Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 614715fb4814Smrg ;; 614815fb4814Smrg esac 614915fb4814Smrg runpath_var='LD_RUN_PATH' 615015fb4814Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 615115fb4814Smrg ;; 615215fb4814Smrg 615315fb4814Smrg sysv4.3*) 615415fb4814Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 615515fb4814Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 615615fb4814Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 615715fb4814Smrg ;; 615815fb4814Smrg 615915fb4814Smrg sysv4*MP*) 616015fb4814Smrg if test -d /usr/nec; then 616115fb4814Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 616215fb4814Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 616315fb4814Smrg runpath_var=LD_RUN_PATH 616415fb4814Smrg hardcode_runpath_var=yes 616515fb4814Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=yes 616615fb4814Smrg fi 616715fb4814Smrg ;; 616815fb4814Smrg 616915fb4814Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7*) 617015fb4814Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 617115fb4814Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 617215fb4814Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 617315fb4814Smrg runpath_var='LD_RUN_PATH' 617415fb4814Smrg 617515fb4814Smrg if test "$GCC" = yes; then 617615fb4814Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 617715fb4814Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 617815fb4814Smrg else 617915fb4814Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 618015fb4814Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 618115fb4814Smrg fi 618215fb4814Smrg ;; 618315fb4814Smrg 618415fb4814Smrg sysv5* | sco3.2v5* | sco5v6*) 618515fb4814Smrg # Note: We can NOT use -z defs as we might desire, because we do not 618615fb4814Smrg # link with -lc, and that would cause any symbols used from libc to 618715fb4814Smrg # always be unresolved, which means just about no library would 618815fb4814Smrg # ever link correctly. If we're not using GNU ld we use -z text 618915fb4814Smrg # though, which does catch some bad symbols but isn't as heavy-handed 619015fb4814Smrg # as -z defs. 619115fb4814Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 619215fb4814Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 619315fb4814Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 619415fb4814Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 619515fb4814Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' 619615fb4814Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' 619715fb4814Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 619815fb4814Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 619915fb4814Smrg runpath_var='LD_RUN_PATH' 620015fb4814Smrg 620115fb4814Smrg if test "$GCC" = yes; then 620215fb4814Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' 620315fb4814Smrg _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' 620415fb4814Smrg else 620515fb4814Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' 620615fb4814Smrg _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' 620715fb4814Smrg fi 620815fb4814Smrg ;; 620915fb4814Smrg 621015fb4814Smrg uts4*) 621115fb4814Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 621215fb4814Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 621315fb4814Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 621415fb4814Smrg ;; 621515fb4814Smrg 621615fb4814Smrg *) 621715fb4814Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 621815fb4814Smrg ;; 621915fb4814Smrg esac 622015fb4814Smrg fi 622115fb4814Smrg]) 622215fb4814SmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) 622315fb4814Smrgtest "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 622415fb4814Smrg 622515fb4814Smrg# 622615fb4814Smrg# Do we need to explicitly link libc? 622715fb4814Smrg# 622815fb4814Smrgcase "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in 622915fb4814Smrgx|xyes) 623015fb4814Smrg # Assume -lc should be added 623115fb4814Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes 623215fb4814Smrg 623315fb4814Smrg if test "$enable_shared" = yes && test "$GCC" = yes; then 623415fb4814Smrg case $_LT_AC_TAGVAR(archive_cmds, $1) in 623515fb4814Smrg *'~'*) 623615fb4814Smrg # FIXME: we may have to deal with multi-command sequences. 623715fb4814Smrg ;; 623815fb4814Smrg '$CC '*) 623915fb4814Smrg # Test whether the compiler implicitly links with -lc since on some 624015fb4814Smrg # systems, -lgcc has to come before -lc. If gcc already passes -lc 624115fb4814Smrg # to ld, don't add -lc before -lgcc. 624215fb4814Smrg AC_MSG_CHECKING([whether -lc should be explicitly linked in]) 624315fb4814Smrg $rm conftest* 624415fb4814Smrg printf "$lt_simple_compile_test_code" > conftest.$ac_ext 624515fb4814Smrg 624615fb4814Smrg if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 624715fb4814Smrg soname=conftest 624815fb4814Smrg lib=conftest 624915fb4814Smrg libobjs=conftest.$ac_objext 625015fb4814Smrg deplibs= 625115fb4814Smrg wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) 625215fb4814Smrg pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) 625315fb4814Smrg compiler_flags=-v 625415fb4814Smrg linker_flags=-v 625515fb4814Smrg verstring= 625615fb4814Smrg output_objdir=. 625715fb4814Smrg libname=conftest 625815fb4814Smrg lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1) 625915fb4814Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)= 626015fb4814Smrg if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 626115fb4814Smrg then 626215fb4814Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 626315fb4814Smrg else 626415fb4814Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes 626515fb4814Smrg fi 626615fb4814Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 626715fb4814Smrg else 626815fb4814Smrg cat conftest.err 1>&5 626915fb4814Smrg fi 627015fb4814Smrg $rm conftest* 627115fb4814Smrg AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)]) 627215fb4814Smrg ;; 627315fb4814Smrg esac 627415fb4814Smrg fi 627515fb4814Smrg ;; 627615fb4814Smrgesac 627715fb4814Smrg])# AC_LIBTOOL_PROG_LD_SHLIBS 627815fb4814Smrg 627915fb4814Smrg 628015fb4814Smrg# _LT_AC_FILE_LTDLL_C 628115fb4814Smrg# ------------------- 628215fb4814Smrg# Be careful that the start marker always follows a newline. 628315fb4814SmrgAC_DEFUN([_LT_AC_FILE_LTDLL_C], [ 628415fb4814Smrg# /* ltdll.c starts here */ 628515fb4814Smrg# #define WIN32_LEAN_AND_MEAN 628615fb4814Smrg# #include <windows.h> 628715fb4814Smrg# #undef WIN32_LEAN_AND_MEAN 628815fb4814Smrg# #include <stdio.h> 628915fb4814Smrg# 629015fb4814Smrg# #ifndef __CYGWIN__ 629115fb4814Smrg# # ifdef __CYGWIN32__ 629215fb4814Smrg# # define __CYGWIN__ __CYGWIN32__ 629315fb4814Smrg# # endif 629415fb4814Smrg# #endif 629515fb4814Smrg# 629615fb4814Smrg# #ifdef __cplusplus 629715fb4814Smrg# extern "C" { 629815fb4814Smrg# #endif 629915fb4814Smrg# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved); 630015fb4814Smrg# #ifdef __cplusplus 630115fb4814Smrg# } 630215fb4814Smrg# #endif 630315fb4814Smrg# 630415fb4814Smrg# #ifdef __CYGWIN__ 630515fb4814Smrg# #include <cygwin/cygwin_dll.h> 630615fb4814Smrg# DECLARE_CYGWIN_DLL( DllMain ); 630715fb4814Smrg# #endif 630815fb4814Smrg# HINSTANCE __hDllInstance_base; 630915fb4814Smrg# 631015fb4814Smrg# BOOL APIENTRY 631115fb4814Smrg# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved) 631215fb4814Smrg# { 631315fb4814Smrg# __hDllInstance_base = hInst; 631415fb4814Smrg# return TRUE; 631515fb4814Smrg# } 631615fb4814Smrg# /* ltdll.c ends here */ 631715fb4814Smrg])# _LT_AC_FILE_LTDLL_C 631815fb4814Smrg 631915fb4814Smrg 632015fb4814Smrg# _LT_AC_TAGVAR(VARNAME, [TAGNAME]) 632115fb4814Smrg# --------------------------------- 632215fb4814SmrgAC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])]) 632315fb4814Smrg 632415fb4814Smrg 632515fb4814Smrg# old names 632615fb4814SmrgAC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL]) 632715fb4814SmrgAC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 632815fb4814SmrgAC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 632915fb4814SmrgAC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 633015fb4814SmrgAC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 633115fb4814SmrgAC_DEFUN([AM_PROG_LD], [AC_PROG_LD]) 633215fb4814SmrgAC_DEFUN([AM_PROG_NM], [AC_PROG_NM]) 633315fb4814Smrg 633415fb4814Smrg# This is just to silence aclocal about the macro not being used 633515fb4814Smrgifelse([AC_DISABLE_FAST_INSTALL]) 633615fb4814Smrg 633715fb4814SmrgAC_DEFUN([LT_AC_PROG_GCJ], 633815fb4814Smrg[AC_CHECK_TOOL(GCJ, gcj, no) 633915fb4814Smrg test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" 634015fb4814Smrg AC_SUBST(GCJFLAGS) 634115fb4814Smrg]) 634215fb4814Smrg 634315fb4814SmrgAC_DEFUN([LT_AC_PROG_RC], 634415fb4814Smrg[AC_CHECK_TOOL(RC, windres, no) 634515fb4814Smrg]) 634615fb4814Smrg 634715fb4814Smrg# NOTE: This macro has been submitted for inclusion into # 634815fb4814Smrg# GNU Autoconf as AC_PROG_SED. When it is available in # 634915fb4814Smrg# a released version of Autoconf we should remove this # 635015fb4814Smrg# macro and use it instead. # 635115fb4814Smrg# LT_AC_PROG_SED 635215fb4814Smrg# -------------- 635315fb4814Smrg# Check for a fully-functional sed program, that truncates 635415fb4814Smrg# as few characters as possible. Prefer GNU sed if found. 635515fb4814SmrgAC_DEFUN([LT_AC_PROG_SED], 635615fb4814Smrg[AC_MSG_CHECKING([for a sed that does not truncate output]) 635715fb4814SmrgAC_CACHE_VAL(lt_cv_path_SED, 635815fb4814Smrg[# Loop through the user's path and test for sed and gsed. 635915fb4814Smrg# Then use that list of sed's as ones to test for truncation. 636015fb4814Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 636115fb4814Smrgfor as_dir in $PATH 636215fb4814Smrgdo 636315fb4814Smrg IFS=$as_save_IFS 636415fb4814Smrg test -z "$as_dir" && as_dir=. 636515fb4814Smrg for lt_ac_prog in sed gsed; do 636615fb4814Smrg for ac_exec_ext in '' $ac_executable_extensions; do 636715fb4814Smrg if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 636815fb4814Smrg lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 636915fb4814Smrg fi 637015fb4814Smrg done 637115fb4814Smrg done 637215fb4814Smrgdone 637315fb4814Smrglt_ac_max=0 637415fb4814Smrglt_ac_count=0 637515fb4814Smrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris 637615fb4814Smrg# along with /bin/sed that truncates output. 637715fb4814Smrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 637815fb4814Smrg test ! -f $lt_ac_sed && continue 637915fb4814Smrg cat /dev/null > conftest.in 638015fb4814Smrg lt_ac_count=0 638115fb4814Smrg echo $ECHO_N "0123456789$ECHO_C" >conftest.in 638215fb4814Smrg # Check for GNU sed and select it if it is found. 638315fb4814Smrg if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 638415fb4814Smrg lt_cv_path_SED=$lt_ac_sed 638515fb4814Smrg break 638615fb4814Smrg fi 638715fb4814Smrg while true; do 638815fb4814Smrg cat conftest.in conftest.in >conftest.tmp 638915fb4814Smrg mv conftest.tmp conftest.in 639015fb4814Smrg cp conftest.in conftest.nl 639115fb4814Smrg echo >>conftest.nl 639215fb4814Smrg $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 639315fb4814Smrg cmp -s conftest.out conftest.nl || break 639415fb4814Smrg # 10000 chars as input seems more than enough 639515fb4814Smrg test $lt_ac_count -gt 10 && break 639615fb4814Smrg lt_ac_count=`expr $lt_ac_count + 1` 639715fb4814Smrg if test $lt_ac_count -gt $lt_ac_max; then 639815fb4814Smrg lt_ac_max=$lt_ac_count 639915fb4814Smrg lt_cv_path_SED=$lt_ac_sed 640015fb4814Smrg fi 640115fb4814Smrg done 640215fb4814Smrgdone 640315fb4814Smrg]) 640415fb4814SmrgSED=$lt_cv_path_SED 640515fb4814SmrgAC_MSG_RESULT([$SED]) 640615fb4814Smrg]) 640715fb4814Smrg 640815fb4814Smrg# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 640915fb4814Smrg# 641015fb4814Smrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 641115fb4814Smrg# 641215fb4814Smrg# This program is free software; you can redistribute it and/or modify 641315fb4814Smrg# it under the terms of the GNU General Public License as published by 641415fb4814Smrg# the Free Software Foundation; either version 2 of the License, or 641515fb4814Smrg# (at your option) any later version. 641615fb4814Smrg# 641715fb4814Smrg# This program is distributed in the hope that it will be useful, but 641815fb4814Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 641915fb4814Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 642015fb4814Smrg# General Public License for more details. 642115fb4814Smrg# 642215fb4814Smrg# You should have received a copy of the GNU General Public License 642315fb4814Smrg# along with this program; if not, write to the Free Software 642415fb4814Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 642515fb4814Smrg# 642615fb4814Smrg# As a special exception to the GNU General Public License, if you 642715fb4814Smrg# distribute this file as part of a program that contains a 642815fb4814Smrg# configuration script generated by Autoconf, you may include it under 642915fb4814Smrg# the same distribution terms that you use for the rest of that program. 643015fb4814Smrg 643115fb4814Smrg# PKG_PROG_PKG_CONFIG([MIN-VERSION]) 643215fb4814Smrg# ---------------------------------- 643315fb4814SmrgAC_DEFUN([PKG_PROG_PKG_CONFIG], 643415fb4814Smrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 643515fb4814Smrgm4_pattern_allow([^PKG_CONFIG(_PATH)?$]) 643615fb4814SmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl 643715fb4814Smrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 643815fb4814Smrg AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 643915fb4814Smrgfi 644015fb4814Smrgif test -n "$PKG_CONFIG"; then 644115fb4814Smrg _pkg_min_version=m4_default([$1], [0.9.0]) 644215fb4814Smrg AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 644315fb4814Smrg if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 644415fb4814Smrg AC_MSG_RESULT([yes]) 644515fb4814Smrg else 644615fb4814Smrg AC_MSG_RESULT([no]) 644715fb4814Smrg PKG_CONFIG="" 644815fb4814Smrg fi 644915fb4814Smrg 645015fb4814Smrgfi[]dnl 645115fb4814Smrg])# PKG_PROG_PKG_CONFIG 645215fb4814Smrg 645315fb4814Smrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 645415fb4814Smrg# 645515fb4814Smrg# Check to see whether a particular set of modules exists. Similar 645615fb4814Smrg# to PKG_CHECK_MODULES(), but does not set variables or print errors. 645715fb4814Smrg# 645815fb4814Smrg# 645915fb4814Smrg# Similar to PKG_CHECK_MODULES, make sure that the first instance of 646015fb4814Smrg# this or PKG_CHECK_MODULES is called, or make sure to call 646115fb4814Smrg# PKG_CHECK_EXISTS manually 646215fb4814Smrg# -------------------------------------------------------------- 646315fb4814SmrgAC_DEFUN([PKG_CHECK_EXISTS], 646415fb4814Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 646515fb4814Smrgif test -n "$PKG_CONFIG" && \ 646615fb4814Smrg AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 646715fb4814Smrg m4_ifval([$2], [$2], [:]) 646815fb4814Smrgm4_ifvaln([$3], [else 646915fb4814Smrg $3])dnl 647015fb4814Smrgfi]) 647115fb4814Smrg 647215fb4814Smrg 647315fb4814Smrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 647415fb4814Smrg# --------------------------------------------- 647515fb4814Smrgm4_define([_PKG_CONFIG], 647615fb4814Smrg[if test -n "$PKG_CONFIG"; then 647715fb4814Smrg if test -n "$$1"; then 647815fb4814Smrg pkg_cv_[]$1="$$1" 647915fb4814Smrg else 648015fb4814Smrg PKG_CHECK_EXISTS([$3], 648115fb4814Smrg [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], 648215fb4814Smrg [pkg_failed=yes]) 648315fb4814Smrg fi 648415fb4814Smrgelse 648515fb4814Smrg pkg_failed=untried 648615fb4814Smrgfi[]dnl 648715fb4814Smrg])# _PKG_CONFIG 648815fb4814Smrg 648915fb4814Smrg# _PKG_SHORT_ERRORS_SUPPORTED 649015fb4814Smrg# ----------------------------- 649115fb4814SmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 649215fb4814Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 649315fb4814Smrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 649415fb4814Smrg _pkg_short_errors_supported=yes 649515fb4814Smrgelse 649615fb4814Smrg _pkg_short_errors_supported=no 649715fb4814Smrgfi[]dnl 649815fb4814Smrg])# _PKG_SHORT_ERRORS_SUPPORTED 649915fb4814Smrg 650015fb4814Smrg 650115fb4814Smrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 650215fb4814Smrg# [ACTION-IF-NOT-FOUND]) 650315fb4814Smrg# 650415fb4814Smrg# 650515fb4814Smrg# Note that if there is a possibility the first call to 650615fb4814Smrg# PKG_CHECK_MODULES might not happen, you should be sure to include an 650715fb4814Smrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 650815fb4814Smrg# 650915fb4814Smrg# 651015fb4814Smrg# -------------------------------------------------------------- 651115fb4814SmrgAC_DEFUN([PKG_CHECK_MODULES], 651215fb4814Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 651315fb4814SmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 651415fb4814SmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 651515fb4814Smrg 651615fb4814Smrgpkg_failed=no 651715fb4814SmrgAC_MSG_CHECKING([for $1]) 651815fb4814Smrg 651915fb4814Smrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 652015fb4814Smrg_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 652115fb4814Smrg 652215fb4814Smrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 652315fb4814Smrgand $1[]_LIBS to avoid the need to call pkg-config. 652415fb4814SmrgSee the pkg-config man page for more details.]) 652515fb4814Smrg 652615fb4814Smrgif test $pkg_failed = yes; then 652715fb4814Smrg _PKG_SHORT_ERRORS_SUPPORTED 652815fb4814Smrg if test $_pkg_short_errors_supported = yes; then 652915fb4814Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"` 653015fb4814Smrg else 653115fb4814Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` 653215fb4814Smrg fi 653315fb4814Smrg # Put the nasty error message in config.log where it belongs 653415fb4814Smrg echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 653515fb4814Smrg 653615fb4814Smrg ifelse([$4], , [AC_MSG_ERROR(dnl 653715fb4814Smrg[Package requirements ($2) were not met: 653815fb4814Smrg 653915fb4814Smrg$$1_PKG_ERRORS 654015fb4814Smrg 654115fb4814SmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you 654215fb4814Smrginstalled software in a non-standard prefix. 654315fb4814Smrg 654415fb4814Smrg_PKG_TEXT 654515fb4814Smrg])], 654615fb4814Smrg [$4]) 654715fb4814Smrgelif test $pkg_failed = untried; then 654815fb4814Smrg ifelse([$4], , [AC_MSG_FAILURE(dnl 654915fb4814Smrg[The pkg-config script could not be found or is too old. Make sure it 655015fb4814Smrgis in your PATH or set the PKG_CONFIG environment variable to the full 655115fb4814Smrgpath to pkg-config. 655215fb4814Smrg 655315fb4814Smrg_PKG_TEXT 655415fb4814Smrg 655515fb4814SmrgTo get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.])], 655615fb4814Smrg [$4]) 655715fb4814Smrgelse 655815fb4814Smrg $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 655915fb4814Smrg $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 656015fb4814Smrg AC_MSG_RESULT([yes]) 656115fb4814Smrg ifelse([$3], , :, [$3]) 656215fb4814Smrgfi[]dnl 656315fb4814Smrg])# PKG_CHECK_MODULES 656415fb4814Smrg 656515fb4814Smrgdnl $Id: aclocal.m4,v 1.1.1.1 2008/08/02 05:10:15 mrg Exp $ 656615fb4814Smrgdnl 656715fb4814Smrgdnl Copyright 2005 Sun Microsystems, Inc. All rights reserved. 656815fb4814Smrgdnl 656915fb4814Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its 657015fb4814Smrgdnl documentation for any purpose is hereby granted without fee, provided that 657115fb4814Smrgdnl the above copyright notice appear in all copies and that both that 657215fb4814Smrgdnl copyright notice and this permission notice appear in supporting 657315fb4814Smrgdnl documentation. 657415fb4814Smrgdnl 657515fb4814Smrgdnl The above copyright notice and this permission notice shall be included 657615fb4814Smrgdnl in all copies or substantial portions of the Software. 657715fb4814Smrgdnl 657815fb4814Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 657915fb4814Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 658015fb4814Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 658115fb4814Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 658215fb4814Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 658315fb4814Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 658415fb4814Smrgdnl OTHER DEALINGS IN THE SOFTWARE. 658515fb4814Smrgdnl 658615fb4814Smrgdnl Except as contained in this notice, the name of the copyright holders shall 658715fb4814Smrgdnl not be used in advertising or otherwise to promote the sale, use or 658815fb4814Smrgdnl other dealings in this Software without prior written authorization 658915fb4814Smrgdnl from the copyright holders. 659015fb4814Smrgdnl 659115fb4814Smrg 659215fb4814Smrg# XORG_PROG_RAWCPP() 659315fb4814Smrg# ------------------ 659415fb4814Smrg# Find cpp program and necessary flags for use in pre-processing text files 659515fb4814Smrg# such as man pages and config files 659615fb4814SmrgAC_DEFUN([XORG_PROG_RAWCPP],[ 659715fb4814SmrgAC_REQUIRE([AC_PROG_CPP]) 659815fb4814SmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 659915fb4814Smrg [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 660015fb4814Smrg 660115fb4814Smrg# Check for flag to avoid builtin definitions - assumes unix is predefined, 660215fb4814Smrg# which is not the best choice for supporting other OS'es, but covers most 660315fb4814Smrg# of the ones we need for now. 660415fb4814SmrgAC_MSG_CHECKING([if $RAWCPP requires -undef]) 660515fb4814SmrgAC_LANG_CONFTEST([Does cpp redefine unix ?]) 660615fb4814Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 660715fb4814Smrg AC_MSG_RESULT([no]) 660815fb4814Smrgelse 660915fb4814Smrg if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 661015fb4814Smrg RAWCPPFLAGS=-undef 661115fb4814Smrg AC_MSG_RESULT([yes]) 661215fb4814Smrg else 661315fb4814Smrg AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 661415fb4814Smrg fi 661515fb4814Smrgfi 661615fb4814Smrgrm -f conftest.$ac_ext 661715fb4814Smrg 661815fb4814SmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional]) 661915fb4814SmrgAC_LANG_CONFTEST([Does cpp preserve "whitespace"?]) 662015fb4814Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 662115fb4814Smrg AC_MSG_RESULT([no]) 662215fb4814Smrgelse 662315fb4814Smrg if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 662415fb4814Smrg RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 662515fb4814Smrg AC_MSG_RESULT([yes]) 662615fb4814Smrg else 662715fb4814Smrg AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 662815fb4814Smrg fi 662915fb4814Smrgfi 663015fb4814Smrgrm -f conftest.$ac_ext 663115fb4814SmrgAC_SUBST(RAWCPPFLAGS) 663215fb4814Smrg]) # XORG_PROG_RAWCPP 663315fb4814Smrg 663415fb4814Smrg# XORG_MANPAGE_SECTIONS() 663515fb4814Smrg# ----------------------- 663615fb4814Smrg# Determine which sections man pages go in for the different man page types 663715fb4814Smrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 663815fb4814Smrg# Not sure if there's any better way than just hardcoding by OS name. 663915fb4814Smrg# Override default settings by setting environment variables 664015fb4814Smrg 664115fb4814SmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[ 664215fb4814SmrgAC_REQUIRE([AC_CANONICAL_HOST]) 664315fb4814Smrg 664415fb4814Smrgif test x$APP_MAN_SUFFIX = x ; then 664515fb4814Smrg case $host_os in 664615fb4814Smrg linux*) APP_MAN_SUFFIX=1x ;; 664715fb4814Smrg *) APP_MAN_SUFFIX=1 ;; 664815fb4814Smrg esac 664915fb4814Smrgfi 665015fb4814Smrgif test x$APP_MAN_DIR = x ; then 665115fb4814Smrg case $host_os in 665215fb4814Smrg linux*) APP_MAN_DIR='$(mandir)/man1' ;; 665315fb4814Smrg *) APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' ;; 665415fb4814Smrg esac 665515fb4814Smrgfi 665615fb4814Smrg 665715fb4814Smrgif test x$LIB_MAN_SUFFIX = x ; then 665815fb4814Smrg case $host_os in 665915fb4814Smrg linux*) LIB_MAN_SUFFIX=3x ;; 666015fb4814Smrg *) LIB_MAN_SUFFIX=3 ;; 666115fb4814Smrg esac 666215fb4814Smrgfi 666315fb4814Smrgif test x$LIB_MAN_DIR = x ; then 666415fb4814Smrg case $host_os in 666515fb4814Smrg linux*) LIB_MAN_DIR='$(mandir)/man3' ;; 666615fb4814Smrg *) LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' ;; 666715fb4814Smrg esac 666815fb4814Smrgfi 666915fb4814Smrg 667015fb4814Smrgif test x$FILE_MAN_SUFFIX = x ; then 667115fb4814Smrg case $host_os in 667215fb4814Smrg linux*) FILE_MAN_SUFFIX=5x ;; 667315fb4814Smrg solaris*) FILE_MAN_SUFFIX=4 ;; 667415fb4814Smrg *) FILE_MAN_SUFFIX=5 ;; 667515fb4814Smrg esac 667615fb4814Smrgfi 667715fb4814Smrgif test x$FILE_MAN_DIR = x ; then 667815fb4814Smrg case $host_os in 667915fb4814Smrg linux*) FILE_MAN_DIR='$(mandir)/man5' ;; 668015fb4814Smrg *) FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' ;; 668115fb4814Smrg esac 668215fb4814Smrgfi 668315fb4814Smrg 668415fb4814Smrg# In Imake's linux.cf, the misc man suffix & dir was only changed for 668515fb4814Smrg# LinuxDebian, not other Linuxes, so we leave it unchanged here 668615fb4814Smrgif test x$MISC_MAN_SUFFIX = x ; then 668715fb4814Smrg case $host_os in 668815fb4814Smrg# linux*) MISC_MAN_SUFFIX=7x ;; 668915fb4814Smrg solaris*) MISC_MAN_SUFFIX=5 ;; 669015fb4814Smrg *) MISC_MAN_SUFFIX=7 ;; 669115fb4814Smrg esac 669215fb4814Smrgfi 669315fb4814Smrgif test x$MISC_MAN_DIR = x ; then 669415fb4814Smrg case $host_os in 669515fb4814Smrg# linux*) MISC_MAN_DIR='$(mandir)/man7' ;; 669615fb4814Smrg *) MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' ;; 669715fb4814Smrg esac 669815fb4814Smrgfi 669915fb4814Smrg 670015fb4814Smrg# In Imake's linux.cf, the driver man suffix & dir was only changed for 670115fb4814Smrg# LinuxDebian, not other Linuxes, so we leave it unchanged here 670215fb4814Smrgif test x$DRIVER_MAN_SUFFIX = x ; then 670315fb4814Smrg case $host_os in 670415fb4814Smrg# linux*) DRIVER_MAN_SUFFIX=4x ;; 670515fb4814Smrg solaris*) DRIVER_MAN_SUFFIX=7 ;; 670615fb4814Smrg *) DRIVER_MAN_SUFFIX=4 ;; 670715fb4814Smrg esac 670815fb4814Smrgfi 670915fb4814Smrgif test x$DRIVER_MAN_DIR = x ; then 671015fb4814Smrg case $host_os in 671115fb4814Smrg# linux*) DRIVER_MAN_DIR='$(mandir)/man4' ;; 671215fb4814Smrg *) DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' ;; 671315fb4814Smrg esac 671415fb4814Smrgfi 671515fb4814Smrg 671615fb4814Smrgif test x$ADMIN_MAN_SUFFIX = x ; then 671715fb4814Smrg case $host_os in 671815fb4814Smrg solaris*) ADMIN_MAN_SUFFIX=1m ;; 671915fb4814Smrg *) ADMIN_MAN_SUFFIX=8 ;; 672015fb4814Smrg esac 672115fb4814Smrgfi 672215fb4814Smrgif test x$ADMIN_MAN_DIR = x ; then 672315fb4814Smrg ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 672415fb4814Smrgfi 672515fb4814Smrg 672615fb4814Smrg 672715fb4814SmrgAC_SUBST([APP_MAN_SUFFIX]) 672815fb4814SmrgAC_SUBST([LIB_MAN_SUFFIX]) 672915fb4814SmrgAC_SUBST([FILE_MAN_SUFFIX]) 673015fb4814SmrgAC_SUBST([MISC_MAN_SUFFIX]) 673115fb4814SmrgAC_SUBST([DRIVER_MAN_SUFFIX]) 673215fb4814SmrgAC_SUBST([ADMIN_MAN_SUFFIX]) 673315fb4814SmrgAC_SUBST([APP_MAN_DIR]) 673415fb4814SmrgAC_SUBST([LIB_MAN_DIR]) 673515fb4814SmrgAC_SUBST([FILE_MAN_DIR]) 673615fb4814SmrgAC_SUBST([MISC_MAN_DIR]) 673715fb4814SmrgAC_SUBST([DRIVER_MAN_DIR]) 673815fb4814SmrgAC_SUBST([ADMIN_MAN_DIR]) 673915fb4814Smrg]) # XORG_MANPAGE_SECTIONS 674015fb4814Smrg 674115fb4814Smrg# XORG_CHECK_LINUXDOC 674215fb4814Smrg# ------------------- 674315fb4814Smrg# Defines the variable MAKE_TEXT if the necessary tools and 674415fb4814Smrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 674515fb4814Smrg# Whether or not the necessary tools and files are found can be checked 674615fb4814Smrg# with the AM_CONDITIONAL "BUILD_LINUXDOC" 674715fb4814SmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[ 674815fb4814SmrgAC_CHECK_FILE( 674915fb4814Smrg [$prefix/share/X11/sgml/defs.ent], 675015fb4814Smrg [DEFS_ENT_PATH=$prefix/share/X11/sgml], 675115fb4814Smrg [DEFS_ENT_PATH=] 675215fb4814Smrg) 675315fb4814Smrg 675415fb4814SmrgAC_PATH_PROG(LINUXDOC, linuxdoc) 675515fb4814SmrgAC_PATH_PROG(PS2PDF, ps2pdf) 675615fb4814Smrg 675715fb4814SmrgAC_MSG_CHECKING([Whether to build documentation]) 675815fb4814Smrg 675915fb4814Smrgif test x$DEFS_ENT_PATH != x && test x$LINUXDOC != x ; then 676015fb4814Smrg BUILDDOC=yes 676115fb4814Smrgelse 676215fb4814Smrg BUILDDOC=no 676315fb4814Smrgfi 676415fb4814Smrg 676515fb4814SmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 676615fb4814Smrg 676715fb4814SmrgAC_MSG_RESULT([$BUILDDOC]) 676815fb4814Smrg 676915fb4814SmrgAC_MSG_CHECKING([Whether to build pdf documentation]) 677015fb4814Smrg 677115fb4814Smrgif test x$PS2PDF != x ; then 677215fb4814Smrg BUILDPDFDOC=yes 677315fb4814Smrgelse 677415fb4814Smrg BUILDPDFDOC=no 677515fb4814Smrgfi 677615fb4814Smrg 677715fb4814SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 677815fb4814Smrg 677915fb4814SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 678015fb4814Smrg 678115fb4814SmrgMAKE_TEXT="SGML_SEARCH_PATH=$DEFS_ENT_PATH GROFF_NO_SGR=y $LINUXDOC -B txt" 678215fb4814SmrgMAKE_PS="SGML_SEARCH_PATH=$DEFS_ENT_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 678315fb4814SmrgMAKE_PDF="$PS2PDF" 678415fb4814SmrgMAKE_HTML="SGML_SEARCH_PATH=$DEFS_ENT_PATH $LINUXDOC -B html --split=0" 678515fb4814Smrg 678615fb4814SmrgAC_SUBST(MAKE_TEXT) 678715fb4814SmrgAC_SUBST(MAKE_PS) 678815fb4814SmrgAC_SUBST(MAKE_PDF) 678915fb4814SmrgAC_SUBST(MAKE_HTML) 679015fb4814Smrg]) # XORG_CHECK_LINUXDOC 679115fb4814Smrg 679215fb4814Smrg# XORG_CHECK_MALLOC_ZERO 679315fb4814Smrg# ---------------------- 679415fb4814Smrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 679515fb4814Smrg# malloc(0) returns NULL. Packages should add one of these cflags to 679615fb4814Smrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 679715fb4814SmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 679815fb4814SmrgAC_ARG_ENABLE(malloc0returnsnull, 679915fb4814Smrg AC_HELP_STRING([--enable-malloc0returnsnull], 680015fb4814Smrg [malloc(0) returns NULL (default: auto)]), 680115fb4814Smrg [MALLOC_ZERO_RETURNS_NULL=$enableval], 680215fb4814Smrg [MALLOC_ZERO_RETURNS_NULL=auto]) 680315fb4814Smrg 680415fb4814SmrgAC_MSG_CHECKING([whether malloc(0) returns NULL]) 680515fb4814Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 680615fb4814Smrg AC_RUN_IFELSE([ 680715fb4814Smrgchar *malloc(); 680815fb4814Smrgchar *realloc(); 680915fb4814Smrgchar *calloc(); 681015fb4814Smrgmain() { 681115fb4814Smrg char *m0, *r0, *c0, *p; 681215fb4814Smrg m0 = malloc(0); 681315fb4814Smrg p = malloc(10); 681415fb4814Smrg r0 = realloc(p,0); 681515fb4814Smrg c0 = calloc(0); 681615fb4814Smrg exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1); 681715fb4814Smrg}], 681815fb4814Smrg [MALLOC_ZERO_RETURNS_NULL=yes], 681915fb4814Smrg [MALLOC_ZERO_RETURNS_NULL=no]) 682015fb4814Smrgfi 682115fb4814SmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 682215fb4814Smrg 682315fb4814Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 682415fb4814Smrg MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 682515fb4814Smrg XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 682615fb4814Smrg XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 682715fb4814Smrgelse 682815fb4814Smrg MALLOC_ZERO_CFLAGS="" 682915fb4814Smrg XMALLOC_ZERO_CFLAGS="" 683015fb4814Smrg XTMALLOC_ZERO_CFLAGS="" 683115fb4814Smrgfi 683215fb4814Smrg 683315fb4814SmrgAC_SUBST([MALLOC_ZERO_CFLAGS]) 683415fb4814SmrgAC_SUBST([XMALLOC_ZERO_CFLAGS]) 683515fb4814SmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS]) 683615fb4814Smrg]) # XORG_CHECK_MALLOC_ZERO 683715fb4814Smrg 683815fb4814Smrgdnl Copyright 2005 Red Hat, Inc 683915fb4814Smrgdnl 684015fb4814Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its 684115fb4814Smrgdnl documentation for any purpose is hereby granted without fee, provided that 684215fb4814Smrgdnl the above copyright notice appear in all copies and that both that 684315fb4814Smrgdnl copyright notice and this permission notice appear in supporting 684415fb4814Smrgdnl documentation. 684515fb4814Smrgdnl 684615fb4814Smrgdnl The above copyright notice and this permission notice shall be included 684715fb4814Smrgdnl in all copies or substantial portions of the Software. 684815fb4814Smrgdnl 684915fb4814Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 685015fb4814Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 685115fb4814Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 685215fb4814Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 685315fb4814Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 685415fb4814Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 685515fb4814Smrgdnl OTHER DEALINGS IN THE SOFTWARE. 685615fb4814Smrgdnl 685715fb4814Smrgdnl Except as contained in this notice, the name of the copyright holders shall 685815fb4814Smrgdnl not be used in advertising or otherwise to promote the sale, use or 685915fb4814Smrgdnl other dealings in this Software without prior written authorization 686015fb4814Smrgdnl from the copyright holders. 686115fb4814Smrgdnl 686215fb4814Smrg 686315fb4814Smrg# XORG_DRIVER_CHECK_EXT() 686415fb4814Smrg# -------------------------- 686515fb4814Smrg# Checks for the $1 define in xorg-server.h (from the sdk). If it 686615fb4814Smrg# is defined, then add $1 to $REQUIRED_MODULES. 686715fb4814Smrg 686815fb4814SmrgAC_DEFUN([XORG_DRIVER_CHECK_EXT],[ 686915fb4814Smrg SAVE_CFLAGS="$CFLAGS" 687015fb4814Smrg CFLAGS="$CFLAGS -I`pkg-config --variable=sdkdir xorg-server`" 687115fb4814Smrg AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ 687215fb4814Smrg#include "xorg-server.h" 687315fb4814Smrg#if !defined $1 687415fb4814Smrg#error $1 not defined 687515fb4814Smrg#endif 687615fb4814Smrg ]])], 687715fb4814Smrg [_EXT_CHECK=yes], 687815fb4814Smrg [_EXT_CHECK=no]) 687915fb4814Smrg CFLAGS="$SAVE_CFLAGS" 688015fb4814Smrg AC_MSG_CHECKING([if $1 is defined]) 688115fb4814Smrg AC_MSG_RESULT([$_EXT_CHECK]) 688215fb4814Smrg if test "$_EXT_CHECK" != no; then 688315fb4814Smrg REQUIRED_MODULES="$REQUIRED_MODULES $2" 688415fb4814Smrg fi 688515fb4814Smrg]) 688615fb4814Smrg 688715fb4814Smrgdnl Copyright 2005 Red Hat, Inc 688815fb4814Smrgdnl 688915fb4814Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its 689015fb4814Smrgdnl documentation for any purpose is hereby granted without fee, provided that 689115fb4814Smrgdnl the above copyright notice appear in all copies and that both that 689215fb4814Smrgdnl copyright notice and this permission notice appear in supporting 689315fb4814Smrgdnl documentation. 689415fb4814Smrgdnl 689515fb4814Smrgdnl The above copyright notice and this permission notice shall be included 689615fb4814Smrgdnl in all copies or substantial portions of the Software. 689715fb4814Smrgdnl 689815fb4814Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 689915fb4814Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 690015fb4814Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 690115fb4814Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 690215fb4814Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 690315fb4814Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 690415fb4814Smrgdnl OTHER DEALINGS IN THE SOFTWARE. 690515fb4814Smrgdnl 690615fb4814Smrgdnl Except as contained in this notice, the name of the copyright holders shall 690715fb4814Smrgdnl not be used in advertising or otherwise to promote the sale, use or 690815fb4814Smrgdnl other dealings in this Software without prior written authorization 690915fb4814Smrgdnl from the copyright holders. 691015fb4814Smrgdnl 691115fb4814Smrg 691215fb4814Smrg# XORG_RELEASE_VERSION 691315fb4814Smrg# -------------------- 691415fb4814Smrg# Adds --with/without-release-string and changes the PACKAGE and 691515fb4814Smrg# PACKAGE_TARNAME to use "$PACKAGE{_TARNAME}-$RELEASE_VERSION". If 691615fb4814Smrg# no option is given, PACKAGE and PACKAGE_TARNAME are unchanged. 691715fb4814Smrg 691815fb4814SmrgAC_DEFUN([XORG_RELEASE_VERSION],[ 691915fb4814Smrg AC_ARG_WITH(release-version, 692015fb4814Smrg AC_HELP_STRING([--with-release-version=STRING], 692115fb4814Smrg [Use release version string in package name]), 692215fb4814Smrg [RELEASE_VERSION="$withval"], 692315fb4814Smrg [RELEASE_VERSION=""]) 692415fb4814Smrg if test "x$RELEASE_VERSION" != "x"; then 692515fb4814Smrg PACKAGE="$PACKAGE-$RELEASE_VERSION" 692615fb4814Smrg PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION" 692715fb4814Smrg AC_MSG_NOTICE([Building with package name set to $PACKAGE]) 692815fb4814Smrg fi 692915fb4814Smrg]) 693015fb4814Smrg 693115fb4814Smrg# Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc. 693215fb4814Smrg# 693315fb4814Smrg# This file is free software; the Free Software Foundation 693415fb4814Smrg# gives unlimited permission to copy and/or distribute it, 693515fb4814Smrg# with or without modifications, as long as this notice is preserved. 693615fb4814Smrg 693715fb4814Smrg# AM_AUTOMAKE_VERSION(VERSION) 693815fb4814Smrg# ---------------------------- 693915fb4814Smrg# Automake X.Y traces this macro to ensure aclocal.m4 has been 694015fb4814Smrg# generated from the m4 files accompanying Automake X.Y. 694115fb4814SmrgAC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"]) 694215fb4814Smrg 694315fb4814Smrg# AM_SET_CURRENT_AUTOMAKE_VERSION 694415fb4814Smrg# ------------------------------- 694515fb4814Smrg# Call AM_AUTOMAKE_VERSION so it can be traced. 694615fb4814Smrg# This function is AC_REQUIREd by AC_INIT_AUTOMAKE. 694715fb4814SmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 694815fb4814Smrg [AM_AUTOMAKE_VERSION([1.9.6])]) 694915fb4814Smrg 695015fb4814Smrg# AM_AUX_DIR_EXPAND -*- Autoconf -*- 695115fb4814Smrg 695215fb4814Smrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 695315fb4814Smrg# 695415fb4814Smrg# This file is free software; the Free Software Foundation 695515fb4814Smrg# gives unlimited permission to copy and/or distribute it, 695615fb4814Smrg# with or without modifications, as long as this notice is preserved. 695715fb4814Smrg 695815fb4814Smrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 695915fb4814Smrg# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to 696015fb4814Smrg# `$srcdir', `$srcdir/..', or `$srcdir/../..'. 696115fb4814Smrg# 696215fb4814Smrg# Of course, Automake must honor this variable whenever it calls a 696315fb4814Smrg# tool from the auxiliary directory. The problem is that $srcdir (and 696415fb4814Smrg# therefore $ac_aux_dir as well) can be either absolute or relative, 696515fb4814Smrg# depending on how configure is run. This is pretty annoying, since 696615fb4814Smrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top 696715fb4814Smrg# source directory, any form will work fine, but in subdirectories a 696815fb4814Smrg# relative path needs to be adjusted first. 696915fb4814Smrg# 697015fb4814Smrg# $ac_aux_dir/missing 697115fb4814Smrg# fails when called from a subdirectory if $ac_aux_dir is relative 697215fb4814Smrg# $top_srcdir/$ac_aux_dir/missing 697315fb4814Smrg# fails if $ac_aux_dir is absolute, 697415fb4814Smrg# fails when called from a subdirectory in a VPATH build with 697515fb4814Smrg# a relative $ac_aux_dir 697615fb4814Smrg# 697715fb4814Smrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 697815fb4814Smrg# are both prefixed by $srcdir. In an in-source build this is usually 697915fb4814Smrg# harmless because $srcdir is `.', but things will broke when you 698015fb4814Smrg# start a VPATH build or use an absolute $srcdir. 698115fb4814Smrg# 698215fb4814Smrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 698315fb4814Smrg# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 698415fb4814Smrg# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 698515fb4814Smrg# and then we would define $MISSING as 698615fb4814Smrg# MISSING="\${SHELL} $am_aux_dir/missing" 698715fb4814Smrg# This will work as long as MISSING is not called from configure, because 698815fb4814Smrg# unfortunately $(top_srcdir) has no meaning in configure. 698915fb4814Smrg# However there are other variables, like CC, which are often used in 699015fb4814Smrg# configure, and could therefore not use this "fixed" $ac_aux_dir. 699115fb4814Smrg# 699215fb4814Smrg# Another solution, used here, is to always expand $ac_aux_dir to an 699315fb4814Smrg# absolute PATH. The drawback is that using absolute paths prevent a 699415fb4814Smrg# configured tree to be moved without reconfiguration. 699515fb4814Smrg 699615fb4814SmrgAC_DEFUN([AM_AUX_DIR_EXPAND], 699715fb4814Smrg[dnl Rely on autoconf to set up CDPATH properly. 699815fb4814SmrgAC_PREREQ([2.50])dnl 699915fb4814Smrg# expand $ac_aux_dir to an absolute path 700015fb4814Smrgam_aux_dir=`cd $ac_aux_dir && pwd` 700115fb4814Smrg]) 700215fb4814Smrg 700315fb4814Smrg# AM_CONDITIONAL -*- Autoconf -*- 700415fb4814Smrg 700515fb4814Smrg# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005 700615fb4814Smrg# Free Software Foundation, Inc. 700715fb4814Smrg# 700815fb4814Smrg# This file is free software; the Free Software Foundation 700915fb4814Smrg# gives unlimited permission to copy and/or distribute it, 701015fb4814Smrg# with or without modifications, as long as this notice is preserved. 701115fb4814Smrg 701215fb4814Smrg# serial 7 701315fb4814Smrg 701415fb4814Smrg# AM_CONDITIONAL(NAME, SHELL-CONDITION) 701515fb4814Smrg# ------------------------------------- 701615fb4814Smrg# Define a conditional. 701715fb4814SmrgAC_DEFUN([AM_CONDITIONAL], 701815fb4814Smrg[AC_PREREQ(2.52)dnl 701915fb4814Smrg ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 702015fb4814Smrg [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 702115fb4814SmrgAC_SUBST([$1_TRUE]) 702215fb4814SmrgAC_SUBST([$1_FALSE]) 702315fb4814Smrgif $2; then 702415fb4814Smrg $1_TRUE= 702515fb4814Smrg $1_FALSE='#' 702615fb4814Smrgelse 702715fb4814Smrg $1_TRUE='#' 702815fb4814Smrg $1_FALSE= 702915fb4814Smrgfi 703015fb4814SmrgAC_CONFIG_COMMANDS_PRE( 703115fb4814Smrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 703215fb4814Smrg AC_MSG_ERROR([[conditional "$1" was never defined. 703315fb4814SmrgUsually this means the macro was only invoked conditionally.]]) 703415fb4814Smrgfi])]) 703515fb4814Smrg 703615fb4814Smrg 703715fb4814Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 703815fb4814Smrg# Free Software Foundation, Inc. 703915fb4814Smrg# 704015fb4814Smrg# This file is free software; the Free Software Foundation 704115fb4814Smrg# gives unlimited permission to copy and/or distribute it, 704215fb4814Smrg# with or without modifications, as long as this notice is preserved. 704315fb4814Smrg 704415fb4814Smrg# serial 8 704515fb4814Smrg 704615fb4814Smrg# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be 704715fb4814Smrg# written in clear, in which case automake, when reading aclocal.m4, 704815fb4814Smrg# will think it sees a *use*, and therefore will trigger all it's 704915fb4814Smrg# C support machinery. Also note that it means that autoscan, seeing 705015fb4814Smrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 705115fb4814Smrg 705215fb4814Smrg 705315fb4814Smrg# _AM_DEPENDENCIES(NAME) 705415fb4814Smrg# ---------------------- 705515fb4814Smrg# See how the compiler implements dependency checking. 705615fb4814Smrg# NAME is "CC", "CXX", "GCJ", or "OBJC". 705715fb4814Smrg# We try a few techniques and use that to set a single cache variable. 705815fb4814Smrg# 705915fb4814Smrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 706015fb4814Smrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 706115fb4814Smrg# dependency, and given that the user is not expected to run this macro, 706215fb4814Smrg# just rely on AC_PROG_CC. 706315fb4814SmrgAC_DEFUN([_AM_DEPENDENCIES], 706415fb4814Smrg[AC_REQUIRE([AM_SET_DEPDIR])dnl 706515fb4814SmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 706615fb4814SmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl 706715fb4814SmrgAC_REQUIRE([AM_DEP_TRACK])dnl 706815fb4814Smrg 706915fb4814Smrgifelse([$1], CC, [depcc="$CC" am_compiler_list=], 707015fb4814Smrg [$1], CXX, [depcc="$CXX" am_compiler_list=], 707115fb4814Smrg [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 707215fb4814Smrg [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 707315fb4814Smrg [depcc="$$1" am_compiler_list=]) 707415fb4814Smrg 707515fb4814SmrgAC_CACHE_CHECK([dependency style of $depcc], 707615fb4814Smrg [am_cv_$1_dependencies_compiler_type], 707715fb4814Smrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 707815fb4814Smrg # We make a subdir and do the tests there. Otherwise we can end up 707915fb4814Smrg # making bogus files that we don't know about and never remove. For 708015fb4814Smrg # instance it was reported that on HP-UX the gcc test will end up 708115fb4814Smrg # making a dummy file named `D' -- because `-MD' means `put the output 708215fb4814Smrg # in D'. 708315fb4814Smrg mkdir conftest.dir 708415fb4814Smrg # Copy depcomp to subdir because otherwise we won't find it if we're 708515fb4814Smrg # using a relative directory. 708615fb4814Smrg cp "$am_depcomp" conftest.dir 708715fb4814Smrg cd conftest.dir 708815fb4814Smrg # We will build objects and dependencies in a subdirectory because 708915fb4814Smrg # it helps to detect inapplicable dependency modes. For instance 709015fb4814Smrg # both Tru64's cc and ICC support -MD to output dependencies as a 709115fb4814Smrg # side effect of compilation, but ICC will put the dependencies in 709215fb4814Smrg # the current directory while Tru64 will put them in the object 709315fb4814Smrg # directory. 709415fb4814Smrg mkdir sub 709515fb4814Smrg 709615fb4814Smrg am_cv_$1_dependencies_compiler_type=none 709715fb4814Smrg if test "$am_compiler_list" = ""; then 709815fb4814Smrg am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 709915fb4814Smrg fi 710015fb4814Smrg for depmode in $am_compiler_list; do 710115fb4814Smrg # Setup a source with many dependencies, because some compilers 710215fb4814Smrg # like to wrap large dependency lists on column 80 (with \), and 710315fb4814Smrg # we should not choose a depcomp mode which is confused by this. 710415fb4814Smrg # 710515fb4814Smrg # We need to recreate these files for each test, as the compiler may 710615fb4814Smrg # overwrite some of them when testing with obscure command lines. 710715fb4814Smrg # This happens at least with the AIX C compiler. 710815fb4814Smrg : > sub/conftest.c 710915fb4814Smrg for i in 1 2 3 4 5 6; do 711015fb4814Smrg echo '#include "conftst'$i'.h"' >> sub/conftest.c 711115fb4814Smrg # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with 711215fb4814Smrg # Solaris 8's {/usr,}/bin/sh. 711315fb4814Smrg touch sub/conftst$i.h 711415fb4814Smrg done 711515fb4814Smrg echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 711615fb4814Smrg 711715fb4814Smrg case $depmode in 711815fb4814Smrg nosideeffect) 711915fb4814Smrg # after this tag, mechanisms are not by side-effect, so they'll 712015fb4814Smrg # only be used when explicitly requested 712115fb4814Smrg if test "x$enable_dependency_tracking" = xyes; then 712215fb4814Smrg continue 712315fb4814Smrg else 712415fb4814Smrg break 712515fb4814Smrg fi 712615fb4814Smrg ;; 712715fb4814Smrg none) break ;; 712815fb4814Smrg esac 712915fb4814Smrg # We check with `-c' and `-o' for the sake of the "dashmstdout" 713015fb4814Smrg # mode. It turns out that the SunPro C++ compiler does not properly 713115fb4814Smrg # handle `-M -o', and we need to detect this. 713215fb4814Smrg if depmode=$depmode \ 713315fb4814Smrg source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ 713415fb4814Smrg depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 713515fb4814Smrg $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ 713615fb4814Smrg >/dev/null 2>conftest.err && 713715fb4814Smrg grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 713815fb4814Smrg grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && 713915fb4814Smrg ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 714015fb4814Smrg # icc doesn't choke on unknown options, it will just issue warnings 714115fb4814Smrg # or remarks (even with -Werror). So we grep stderr for any message 714215fb4814Smrg # that says an option was ignored or not supported. 714315fb4814Smrg # When given -MP, icc 7.0 and 7.1 complain thusly: 714415fb4814Smrg # icc: Command line warning: ignoring option '-M'; no argument required 714515fb4814Smrg # The diagnosis changed in icc 8.0: 714615fb4814Smrg # icc: Command line remark: option '-MP' not supported 714715fb4814Smrg if (grep 'ignoring option' conftest.err || 714815fb4814Smrg grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 714915fb4814Smrg am_cv_$1_dependencies_compiler_type=$depmode 715015fb4814Smrg break 715115fb4814Smrg fi 715215fb4814Smrg fi 715315fb4814Smrg done 715415fb4814Smrg 715515fb4814Smrg cd .. 715615fb4814Smrg rm -rf conftest.dir 715715fb4814Smrgelse 715815fb4814Smrg am_cv_$1_dependencies_compiler_type=none 715915fb4814Smrgfi 716015fb4814Smrg]) 716115fb4814SmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 716215fb4814SmrgAM_CONDITIONAL([am__fastdep$1], [ 716315fb4814Smrg test "x$enable_dependency_tracking" != xno \ 716415fb4814Smrg && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 716515fb4814Smrg]) 716615fb4814Smrg 716715fb4814Smrg 716815fb4814Smrg# AM_SET_DEPDIR 716915fb4814Smrg# ------------- 717015fb4814Smrg# Choose a directory name for dependency files. 717115fb4814Smrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES 717215fb4814SmrgAC_DEFUN([AM_SET_DEPDIR], 717315fb4814Smrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 717415fb4814SmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 717515fb4814Smrg]) 717615fb4814Smrg 717715fb4814Smrg 717815fb4814Smrg# AM_DEP_TRACK 717915fb4814Smrg# ------------ 718015fb4814SmrgAC_DEFUN([AM_DEP_TRACK], 718115fb4814Smrg[AC_ARG_ENABLE(dependency-tracking, 718215fb4814Smrg[ --disable-dependency-tracking speeds up one-time build 718315fb4814Smrg --enable-dependency-tracking do not reject slow dependency extractors]) 718415fb4814Smrgif test "x$enable_dependency_tracking" != xno; then 718515fb4814Smrg am_depcomp="$ac_aux_dir/depcomp" 718615fb4814Smrg AMDEPBACKSLASH='\' 718715fb4814Smrgfi 718815fb4814SmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 718915fb4814SmrgAC_SUBST([AMDEPBACKSLASH]) 719015fb4814Smrg]) 719115fb4814Smrg 719215fb4814Smrg# Generate code to set up dependency tracking. -*- Autoconf -*- 719315fb4814Smrg 719415fb4814Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 719515fb4814Smrg# Free Software Foundation, Inc. 719615fb4814Smrg# 719715fb4814Smrg# This file is free software; the Free Software Foundation 719815fb4814Smrg# gives unlimited permission to copy and/or distribute it, 719915fb4814Smrg# with or without modifications, as long as this notice is preserved. 720015fb4814Smrg 720115fb4814Smrg#serial 3 720215fb4814Smrg 720315fb4814Smrg# _AM_OUTPUT_DEPENDENCY_COMMANDS 720415fb4814Smrg# ------------------------------ 720515fb4814SmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 720615fb4814Smrg[for mf in $CONFIG_FILES; do 720715fb4814Smrg # Strip MF so we end up with the name of the file. 720815fb4814Smrg mf=`echo "$mf" | sed -e 's/:.*$//'` 720915fb4814Smrg # Check whether this is an Automake generated Makefile or not. 721015fb4814Smrg # We used to match only the files named `Makefile.in', but 721115fb4814Smrg # some people rename them; so instead we look at the file content. 721215fb4814Smrg # Grep'ing the first line is not enough: some people post-process 721315fb4814Smrg # each Makefile.in and add a new line on top of each file to say so. 721415fb4814Smrg # So let's grep whole file. 721515fb4814Smrg if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then 721615fb4814Smrg dirpart=`AS_DIRNAME("$mf")` 721715fb4814Smrg else 721815fb4814Smrg continue 721915fb4814Smrg fi 722015fb4814Smrg # Extract the definition of DEPDIR, am__include, and am__quote 722115fb4814Smrg # from the Makefile without running `make'. 722215fb4814Smrg DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` 722315fb4814Smrg test -z "$DEPDIR" && continue 722415fb4814Smrg am__include=`sed -n 's/^am__include = //p' < "$mf"` 722515fb4814Smrg test -z "am__include" && continue 722615fb4814Smrg am__quote=`sed -n 's/^am__quote = //p' < "$mf"` 722715fb4814Smrg # When using ansi2knr, U may be empty or an underscore; expand it 722815fb4814Smrg U=`sed -n 's/^U = //p' < "$mf"` 722915fb4814Smrg # Find all dependency output files, they are included files with 723015fb4814Smrg # $(DEPDIR) in their names. We invoke sed twice because it is the 723115fb4814Smrg # simplest approach to changing $(DEPDIR) to its actual value in the 723215fb4814Smrg # expansion. 723315fb4814Smrg for file in `sed -n " 723415fb4814Smrg s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ 723515fb4814Smrg sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do 723615fb4814Smrg # Make sure the directory exists. 723715fb4814Smrg test -f "$dirpart/$file" && continue 723815fb4814Smrg fdir=`AS_DIRNAME(["$file"])` 723915fb4814Smrg AS_MKDIR_P([$dirpart/$fdir]) 724015fb4814Smrg # echo "creating $dirpart/$file" 724115fb4814Smrg echo '# dummy' > "$dirpart/$file" 724215fb4814Smrg done 724315fb4814Smrgdone 724415fb4814Smrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS 724515fb4814Smrg 724615fb4814Smrg 724715fb4814Smrg# AM_OUTPUT_DEPENDENCY_COMMANDS 724815fb4814Smrg# ----------------------------- 724915fb4814Smrg# This macro should only be invoked once -- use via AC_REQUIRE. 725015fb4814Smrg# 725115fb4814Smrg# This code is only required when automatic dependency tracking 725215fb4814Smrg# is enabled. FIXME. This creates each `.P' file that we will 725315fb4814Smrg# need in order to bootstrap the dependency handling code. 725415fb4814SmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 725515fb4814Smrg[AC_CONFIG_COMMANDS([depfiles], 725615fb4814Smrg [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 725715fb4814Smrg [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 725815fb4814Smrg]) 725915fb4814Smrg 726015fb4814Smrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 726115fb4814Smrg# Free Software Foundation, Inc. 726215fb4814Smrg# 726315fb4814Smrg# This file is free software; the Free Software Foundation 726415fb4814Smrg# gives unlimited permission to copy and/or distribute it, 726515fb4814Smrg# with or without modifications, as long as this notice is preserved. 726615fb4814Smrg 726715fb4814Smrg# serial 8 726815fb4814Smrg 726915fb4814Smrg# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. 727015fb4814SmrgAU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) 727115fb4814Smrg 727215fb4814Smrg# Do all the work for Automake. -*- Autoconf -*- 727315fb4814Smrg 727415fb4814Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 727515fb4814Smrg# Free Software Foundation, Inc. 727615fb4814Smrg# 727715fb4814Smrg# This file is free software; the Free Software Foundation 727815fb4814Smrg# gives unlimited permission to copy and/or distribute it, 727915fb4814Smrg# with or without modifications, as long as this notice is preserved. 728015fb4814Smrg 728115fb4814Smrg# serial 12 728215fb4814Smrg 728315fb4814Smrg# This macro actually does too much. Some checks are only needed if 728415fb4814Smrg# your package does certain things. But this isn't really a big deal. 728515fb4814Smrg 728615fb4814Smrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 728715fb4814Smrg# AM_INIT_AUTOMAKE([OPTIONS]) 728815fb4814Smrg# ----------------------------------------------- 728915fb4814Smrg# The call with PACKAGE and VERSION arguments is the old style 729015fb4814Smrg# call (pre autoconf-2.50), which is being phased out. PACKAGE 729115fb4814Smrg# and VERSION should now be passed to AC_INIT and removed from 729215fb4814Smrg# the call to AM_INIT_AUTOMAKE. 729315fb4814Smrg# We support both call styles for the transition. After 729415fb4814Smrg# the next Automake release, Autoconf can make the AC_INIT 729515fb4814Smrg# arguments mandatory, and then we can depend on a new Autoconf 729615fb4814Smrg# release and drop the old call support. 729715fb4814SmrgAC_DEFUN([AM_INIT_AUTOMAKE], 729815fb4814Smrg[AC_PREREQ([2.58])dnl 729915fb4814Smrgdnl Autoconf wants to disallow AM_ names. We explicitly allow 730015fb4814Smrgdnl the ones we care about. 730115fb4814Smrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 730215fb4814SmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 730315fb4814SmrgAC_REQUIRE([AC_PROG_INSTALL])dnl 730415fb4814Smrg# test to see if srcdir already configured 730515fb4814Smrgif test "`cd $srcdir && pwd`" != "`pwd`" && 730615fb4814Smrg test -f $srcdir/config.status; then 730715fb4814Smrg AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 730815fb4814Smrgfi 730915fb4814Smrg 731015fb4814Smrg# test whether we have cygpath 731115fb4814Smrgif test -z "$CYGPATH_W"; then 731215fb4814Smrg if (cygpath --version) >/dev/null 2>/dev/null; then 731315fb4814Smrg CYGPATH_W='cygpath -w' 731415fb4814Smrg else 731515fb4814Smrg CYGPATH_W=echo 731615fb4814Smrg fi 731715fb4814Smrgfi 731815fb4814SmrgAC_SUBST([CYGPATH_W]) 731915fb4814Smrg 732015fb4814Smrg# Define the identity of the package. 732115fb4814Smrgdnl Distinguish between old-style and new-style calls. 732215fb4814Smrgm4_ifval([$2], 732315fb4814Smrg[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 732415fb4814Smrg AC_SUBST([PACKAGE], [$1])dnl 732515fb4814Smrg AC_SUBST([VERSION], [$2])], 732615fb4814Smrg[_AM_SET_OPTIONS([$1])dnl 732715fb4814Smrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 732815fb4814Smrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 732915fb4814Smrg 733015fb4814Smrg_AM_IF_OPTION([no-define],, 733115fb4814Smrg[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) 733215fb4814Smrg AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl 733315fb4814Smrg 733415fb4814Smrg# Some tools Automake needs. 733515fb4814SmrgAC_REQUIRE([AM_SANITY_CHECK])dnl 733615fb4814SmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl 733715fb4814SmrgAM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) 733815fb4814SmrgAM_MISSING_PROG(AUTOCONF, autoconf) 733915fb4814SmrgAM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) 734015fb4814SmrgAM_MISSING_PROG(AUTOHEADER, autoheader) 734115fb4814SmrgAM_MISSING_PROG(MAKEINFO, makeinfo) 734215fb4814SmrgAM_PROG_INSTALL_SH 734315fb4814SmrgAM_PROG_INSTALL_STRIP 734415fb4814SmrgAC_REQUIRE([AM_PROG_MKDIR_P])dnl 734515fb4814Smrg# We need awk for the "check" target. The system "awk" is bad on 734615fb4814Smrg# some platforms. 734715fb4814SmrgAC_REQUIRE([AC_PROG_AWK])dnl 734815fb4814SmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl 734915fb4814SmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl 735015fb4814Smrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 735115fb4814Smrg [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 735215fb4814Smrg [_AM_PROG_TAR([v7])])]) 735315fb4814Smrg_AM_IF_OPTION([no-dependencies],, 735415fb4814Smrg[AC_PROVIDE_IFELSE([AC_PROG_CC], 735515fb4814Smrg [_AM_DEPENDENCIES(CC)], 735615fb4814Smrg [define([AC_PROG_CC], 735715fb4814Smrg defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl 735815fb4814SmrgAC_PROVIDE_IFELSE([AC_PROG_CXX], 735915fb4814Smrg [_AM_DEPENDENCIES(CXX)], 736015fb4814Smrg [define([AC_PROG_CXX], 736115fb4814Smrg defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl 736215fb4814Smrg]) 736315fb4814Smrg]) 736415fb4814Smrg 736515fb4814Smrg 736615fb4814Smrg# When config.status generates a header, we must update the stamp-h file. 736715fb4814Smrg# This file resides in the same directory as the config header 736815fb4814Smrg# that is generated. The stamp files are numbered to have different names. 736915fb4814Smrg 737015fb4814Smrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 737115fb4814Smrg# loop where config.status creates the headers, so we can generate 737215fb4814Smrg# our stamp files there. 737315fb4814SmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 737415fb4814Smrg[# Compute $1's index in $config_headers. 737515fb4814Smrg_am_stamp_count=1 737615fb4814Smrgfor _am_header in $config_headers :; do 737715fb4814Smrg case $_am_header in 737815fb4814Smrg $1 | $1:* ) 737915fb4814Smrg break ;; 738015fb4814Smrg * ) 738115fb4814Smrg _am_stamp_count=`expr $_am_stamp_count + 1` ;; 738215fb4814Smrg esac 738315fb4814Smrgdone 738415fb4814Smrgecho "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) 738515fb4814Smrg 738615fb4814Smrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 738715fb4814Smrg# 738815fb4814Smrg# This file is free software; the Free Software Foundation 738915fb4814Smrg# gives unlimited permission to copy and/or distribute it, 739015fb4814Smrg# with or without modifications, as long as this notice is preserved. 739115fb4814Smrg 739215fb4814Smrg# AM_PROG_INSTALL_SH 739315fb4814Smrg# ------------------ 739415fb4814Smrg# Define $install_sh. 739515fb4814SmrgAC_DEFUN([AM_PROG_INSTALL_SH], 739615fb4814Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 739715fb4814Smrginstall_sh=${install_sh-"$am_aux_dir/install-sh"} 739815fb4814SmrgAC_SUBST(install_sh)]) 739915fb4814Smrg 740015fb4814Smrg# Copyright (C) 2003, 2005 Free Software Foundation, Inc. 740115fb4814Smrg# 740215fb4814Smrg# This file is free software; the Free Software Foundation 740315fb4814Smrg# gives unlimited permission to copy and/or distribute it, 740415fb4814Smrg# with or without modifications, as long as this notice is preserved. 740515fb4814Smrg 740615fb4814Smrg# serial 2 740715fb4814Smrg 740815fb4814Smrg# Check whether the underlying file-system supports filenames 740915fb4814Smrg# with a leading dot. For instance MS-DOS doesn't. 741015fb4814SmrgAC_DEFUN([AM_SET_LEADING_DOT], 741115fb4814Smrg[rm -rf .tst 2>/dev/null 741215fb4814Smrgmkdir .tst 2>/dev/null 741315fb4814Smrgif test -d .tst; then 741415fb4814Smrg am__leading_dot=. 741515fb4814Smrgelse 741615fb4814Smrg am__leading_dot=_ 741715fb4814Smrgfi 741815fb4814Smrgrmdir .tst 2>/dev/null 741915fb4814SmrgAC_SUBST([am__leading_dot])]) 742015fb4814Smrg 742115fb4814Smrg# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- 742215fb4814Smrg# From Jim Meyering 742315fb4814Smrg 742415fb4814Smrg# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005 742515fb4814Smrg# Free Software Foundation, Inc. 742615fb4814Smrg# 742715fb4814Smrg# This file is free software; the Free Software Foundation 742815fb4814Smrg# gives unlimited permission to copy and/or distribute it, 742915fb4814Smrg# with or without modifications, as long as this notice is preserved. 743015fb4814Smrg 743115fb4814Smrg# serial 4 743215fb4814Smrg 743315fb4814SmrgAC_DEFUN([AM_MAINTAINER_MODE], 743415fb4814Smrg[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) 743515fb4814Smrg dnl maintainer-mode is disabled by default 743615fb4814Smrg AC_ARG_ENABLE(maintainer-mode, 743715fb4814Smrg[ --enable-maintainer-mode enable make rules and dependencies not useful 743815fb4814Smrg (and sometimes confusing) to the casual installer], 743915fb4814Smrg USE_MAINTAINER_MODE=$enableval, 744015fb4814Smrg USE_MAINTAINER_MODE=no) 744115fb4814Smrg AC_MSG_RESULT([$USE_MAINTAINER_MODE]) 744215fb4814Smrg AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes]) 744315fb4814Smrg MAINT=$MAINTAINER_MODE_TRUE 744415fb4814Smrg AC_SUBST(MAINT)dnl 744515fb4814Smrg] 744615fb4814Smrg) 744715fb4814Smrg 744815fb4814SmrgAU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) 744915fb4814Smrg 745015fb4814Smrg# Check to see how 'make' treats includes. -*- Autoconf -*- 745115fb4814Smrg 745215fb4814Smrg# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. 745315fb4814Smrg# 745415fb4814Smrg# This file is free software; the Free Software Foundation 745515fb4814Smrg# gives unlimited permission to copy and/or distribute it, 745615fb4814Smrg# with or without modifications, as long as this notice is preserved. 745715fb4814Smrg 745815fb4814Smrg# serial 3 745915fb4814Smrg 746015fb4814Smrg# AM_MAKE_INCLUDE() 746115fb4814Smrg# ----------------- 746215fb4814Smrg# Check to see how make treats includes. 746315fb4814SmrgAC_DEFUN([AM_MAKE_INCLUDE], 746415fb4814Smrg[am_make=${MAKE-make} 746515fb4814Smrgcat > confinc << 'END' 746615fb4814Smrgam__doit: 746715fb4814Smrg @echo done 746815fb4814Smrg.PHONY: am__doit 746915fb4814SmrgEND 747015fb4814Smrg# If we don't find an include directive, just comment out the code. 747115fb4814SmrgAC_MSG_CHECKING([for style of include used by $am_make]) 747215fb4814Smrgam__include="#" 747315fb4814Smrgam__quote= 747415fb4814Smrg_am_result=none 747515fb4814Smrg# First try GNU make style include. 747615fb4814Smrgecho "include confinc" > confmf 747715fb4814Smrg# We grep out `Entering directory' and `Leaving directory' 747815fb4814Smrg# messages which can occur if `w' ends up in MAKEFLAGS. 747915fb4814Smrg# In particular we don't look at `^make:' because GNU make might 748015fb4814Smrg# be invoked under some other name (usually "gmake"), in which 748115fb4814Smrg# case it prints its new name instead of `make'. 748215fb4814Smrgif test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then 748315fb4814Smrg am__include=include 748415fb4814Smrg am__quote= 748515fb4814Smrg _am_result=GNU 748615fb4814Smrgfi 748715fb4814Smrg# Now try BSD make style include. 748815fb4814Smrgif test "$am__include" = "#"; then 748915fb4814Smrg echo '.include "confinc"' > confmf 749015fb4814Smrg if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then 749115fb4814Smrg am__include=.include 749215fb4814Smrg am__quote="\"" 749315fb4814Smrg _am_result=BSD 749415fb4814Smrg fi 749515fb4814Smrgfi 749615fb4814SmrgAC_SUBST([am__include]) 749715fb4814SmrgAC_SUBST([am__quote]) 749815fb4814SmrgAC_MSG_RESULT([$_am_result]) 749915fb4814Smrgrm -f confinc confmf 750015fb4814Smrg]) 750115fb4814Smrg 750215fb4814Smrg# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 750315fb4814Smrg 750415fb4814Smrg# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005 750515fb4814Smrg# Free Software Foundation, Inc. 750615fb4814Smrg# 750715fb4814Smrg# This file is free software; the Free Software Foundation 750815fb4814Smrg# gives unlimited permission to copy and/or distribute it, 750915fb4814Smrg# with or without modifications, as long as this notice is preserved. 751015fb4814Smrg 751115fb4814Smrg# serial 4 751215fb4814Smrg 751315fb4814Smrg# AM_MISSING_PROG(NAME, PROGRAM) 751415fb4814Smrg# ------------------------------ 751515fb4814SmrgAC_DEFUN([AM_MISSING_PROG], 751615fb4814Smrg[AC_REQUIRE([AM_MISSING_HAS_RUN]) 751715fb4814Smrg$1=${$1-"${am_missing_run}$2"} 751815fb4814SmrgAC_SUBST($1)]) 751915fb4814Smrg 752015fb4814Smrg 752115fb4814Smrg# AM_MISSING_HAS_RUN 752215fb4814Smrg# ------------------ 752315fb4814Smrg# Define MISSING if not defined so far and test if it supports --run. 752415fb4814Smrg# If it does, set am_missing_run to use it, otherwise, to nothing. 752515fb4814SmrgAC_DEFUN([AM_MISSING_HAS_RUN], 752615fb4814Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 752715fb4814Smrgtest x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" 752815fb4814Smrg# Use eval to expand $SHELL 752915fb4814Smrgif eval "$MISSING --run true"; then 753015fb4814Smrg am_missing_run="$MISSING --run " 753115fb4814Smrgelse 753215fb4814Smrg am_missing_run= 753315fb4814Smrg AC_MSG_WARN([`missing' script is too old or missing]) 753415fb4814Smrgfi 753515fb4814Smrg]) 753615fb4814Smrg 753715fb4814Smrg# Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc. 753815fb4814Smrg# 753915fb4814Smrg# This file is free software; the Free Software Foundation 754015fb4814Smrg# gives unlimited permission to copy and/or distribute it, 754115fb4814Smrg# with or without modifications, as long as this notice is preserved. 754215fb4814Smrg 754315fb4814Smrg# AM_PROG_MKDIR_P 754415fb4814Smrg# --------------- 754515fb4814Smrg# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise. 754615fb4814Smrg# 754715fb4814Smrg# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories 754815fb4814Smrg# created by `make install' are always world readable, even if the 754915fb4814Smrg# installer happens to have an overly restrictive umask (e.g. 077). 755015fb4814Smrg# This was a mistake. There are at least two reasons why we must not 755115fb4814Smrg# use `-m 0755': 755215fb4814Smrg# - it causes special bits like SGID to be ignored, 755315fb4814Smrg# - it may be too restrictive (some setups expect 775 directories). 755415fb4814Smrg# 755515fb4814Smrg# Do not use -m 0755 and let people choose whatever they expect by 755615fb4814Smrg# setting umask. 755715fb4814Smrg# 755815fb4814Smrg# We cannot accept any implementation of `mkdir' that recognizes `-p'. 755915fb4814Smrg# Some implementations (such as Solaris 8's) are not thread-safe: if a 756015fb4814Smrg# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c' 756115fb4814Smrg# concurrently, both version can detect that a/ is missing, but only 756215fb4814Smrg# one can create it and the other will error out. Consequently we 756315fb4814Smrg# restrict ourselves to GNU make (using the --version option ensures 756415fb4814Smrg# this.) 756515fb4814SmrgAC_DEFUN([AM_PROG_MKDIR_P], 756615fb4814Smrg[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then 756715fb4814Smrg # We used to keeping the `.' as first argument, in order to 756815fb4814Smrg # allow $(mkdir_p) to be used without argument. As in 756915fb4814Smrg # $(mkdir_p) $(somedir) 757015fb4814Smrg # where $(somedir) is conditionally defined. However this is wrong 757115fb4814Smrg # for two reasons: 757215fb4814Smrg # 1. if the package is installed by a user who cannot write `.' 757315fb4814Smrg # make install will fail, 757415fb4814Smrg # 2. the above comment should most certainly read 757515fb4814Smrg # $(mkdir_p) $(DESTDIR)$(somedir) 757615fb4814Smrg # so it does not work when $(somedir) is undefined and 757715fb4814Smrg # $(DESTDIR) is not. 757815fb4814Smrg # To support the latter case, we have to write 757915fb4814Smrg # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir), 758015fb4814Smrg # so the `.' trick is pointless. 758115fb4814Smrg mkdir_p='mkdir -p --' 758215fb4814Smrgelse 758315fb4814Smrg # On NextStep and OpenStep, the `mkdir' command does not 758415fb4814Smrg # recognize any option. It will interpret all options as 758515fb4814Smrg # directories to create, and then abort because `.' already 758615fb4814Smrg # exists. 758715fb4814Smrg for d in ./-p ./--version; 758815fb4814Smrg do 758915fb4814Smrg test -d $d && rmdir $d 759015fb4814Smrg done 759115fb4814Smrg # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists. 759215fb4814Smrg if test -f "$ac_aux_dir/mkinstalldirs"; then 759315fb4814Smrg mkdir_p='$(mkinstalldirs)' 759415fb4814Smrg else 759515fb4814Smrg mkdir_p='$(install_sh) -d' 759615fb4814Smrg fi 759715fb4814Smrgfi 759815fb4814SmrgAC_SUBST([mkdir_p])]) 759915fb4814Smrg 760015fb4814Smrg# Helper functions for option handling. -*- Autoconf -*- 760115fb4814Smrg 760215fb4814Smrg# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. 760315fb4814Smrg# 760415fb4814Smrg# This file is free software; the Free Software Foundation 760515fb4814Smrg# gives unlimited permission to copy and/or distribute it, 760615fb4814Smrg# with or without modifications, as long as this notice is preserved. 760715fb4814Smrg 760815fb4814Smrg# serial 3 760915fb4814Smrg 761015fb4814Smrg# _AM_MANGLE_OPTION(NAME) 761115fb4814Smrg# ----------------------- 761215fb4814SmrgAC_DEFUN([_AM_MANGLE_OPTION], 761315fb4814Smrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 761415fb4814Smrg 761515fb4814Smrg# _AM_SET_OPTION(NAME) 761615fb4814Smrg# ------------------------------ 761715fb4814Smrg# Set option NAME. Presently that only means defining a flag for this option. 761815fb4814SmrgAC_DEFUN([_AM_SET_OPTION], 761915fb4814Smrg[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) 762015fb4814Smrg 762115fb4814Smrg# _AM_SET_OPTIONS(OPTIONS) 762215fb4814Smrg# ---------------------------------- 762315fb4814Smrg# OPTIONS is a space-separated list of Automake options. 762415fb4814SmrgAC_DEFUN([_AM_SET_OPTIONS], 762515fb4814Smrg[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 762615fb4814Smrg 762715fb4814Smrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 762815fb4814Smrg# ------------------------------------------- 762915fb4814Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 763015fb4814SmrgAC_DEFUN([_AM_IF_OPTION], 763115fb4814Smrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 763215fb4814Smrg 763315fb4814Smrg# Check to make sure that the build environment is sane. -*- Autoconf -*- 763415fb4814Smrg 763515fb4814Smrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 763615fb4814Smrg# Free Software Foundation, Inc. 763715fb4814Smrg# 763815fb4814Smrg# This file is free software; the Free Software Foundation 763915fb4814Smrg# gives unlimited permission to copy and/or distribute it, 764015fb4814Smrg# with or without modifications, as long as this notice is preserved. 764115fb4814Smrg 764215fb4814Smrg# serial 4 764315fb4814Smrg 764415fb4814Smrg# AM_SANITY_CHECK 764515fb4814Smrg# --------------- 764615fb4814SmrgAC_DEFUN([AM_SANITY_CHECK], 764715fb4814Smrg[AC_MSG_CHECKING([whether build environment is sane]) 764815fb4814Smrg# Just in case 764915fb4814Smrgsleep 1 765015fb4814Smrgecho timestamp > conftest.file 765115fb4814Smrg# Do `set' in a subshell so we don't clobber the current shell's 765215fb4814Smrg# arguments. Must try -L first in case configure is actually a 765315fb4814Smrg# symlink; some systems play weird games with the mod time of symlinks 765415fb4814Smrg# (eg FreeBSD returns the mod time of the symlink's containing 765515fb4814Smrg# directory). 765615fb4814Smrgif ( 765715fb4814Smrg set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` 765815fb4814Smrg if test "$[*]" = "X"; then 765915fb4814Smrg # -L didn't work. 766015fb4814Smrg set X `ls -t $srcdir/configure conftest.file` 766115fb4814Smrg fi 766215fb4814Smrg rm -f conftest.file 766315fb4814Smrg if test "$[*]" != "X $srcdir/configure conftest.file" \ 766415fb4814Smrg && test "$[*]" != "X conftest.file $srcdir/configure"; then 766515fb4814Smrg 766615fb4814Smrg # If neither matched, then we have a broken ls. This can happen 766715fb4814Smrg # if, for instance, CONFIG_SHELL is bash and it inherits a 766815fb4814Smrg # broken ls alias from the environment. This has actually 766915fb4814Smrg # happened. Such a system could not be considered "sane". 767015fb4814Smrg AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 767115fb4814Smrgalias in your environment]) 767215fb4814Smrg fi 767315fb4814Smrg 767415fb4814Smrg test "$[2]" = conftest.file 767515fb4814Smrg ) 767615fb4814Smrgthen 767715fb4814Smrg # Ok. 767815fb4814Smrg : 767915fb4814Smrgelse 768015fb4814Smrg AC_MSG_ERROR([newly created file is older than distributed files! 768115fb4814SmrgCheck your system clock]) 768215fb4814Smrgfi 768315fb4814SmrgAC_MSG_RESULT(yes)]) 768415fb4814Smrg 768515fb4814Smrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 768615fb4814Smrg# 768715fb4814Smrg# This file is free software; the Free Software Foundation 768815fb4814Smrg# gives unlimited permission to copy and/or distribute it, 768915fb4814Smrg# with or without modifications, as long as this notice is preserved. 769015fb4814Smrg 769115fb4814Smrg# AM_PROG_INSTALL_STRIP 769215fb4814Smrg# --------------------- 769315fb4814Smrg# One issue with vendor `install' (even GNU) is that you can't 769415fb4814Smrg# specify the program used to strip binaries. This is especially 769515fb4814Smrg# annoying in cross-compiling environments, where the build's strip 769615fb4814Smrg# is unlikely to handle the host's binaries. 769715fb4814Smrg# Fortunately install-sh will honor a STRIPPROG variable, so we 769815fb4814Smrg# always use install-sh in `make install-strip', and initialize 769915fb4814Smrg# STRIPPROG with the value of the STRIP variable (set by the user). 770015fb4814SmrgAC_DEFUN([AM_PROG_INSTALL_STRIP], 770115fb4814Smrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 770215fb4814Smrg# Installed binaries are usually stripped using `strip' when the user 770315fb4814Smrg# run `make install-strip'. However `strip' might not be the right 770415fb4814Smrg# tool to use in cross-compilation environments, therefore Automake 770515fb4814Smrg# will honor the `STRIP' environment variable to overrule this program. 770615fb4814Smrgdnl Don't test for $cross_compiling = yes, because it might be `maybe'. 770715fb4814Smrgif test "$cross_compiling" != no; then 770815fb4814Smrg AC_CHECK_TOOL([STRIP], [strip], :) 770915fb4814Smrgfi 771015fb4814SmrgINSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" 771115fb4814SmrgAC_SUBST([INSTALL_STRIP_PROGRAM])]) 771215fb4814Smrg 771315fb4814Smrg# Check how to create a tarball. -*- Autoconf -*- 771415fb4814Smrg 771515fb4814Smrg# Copyright (C) 2004, 2005 Free Software Foundation, Inc. 771615fb4814Smrg# 771715fb4814Smrg# This file is free software; the Free Software Foundation 771815fb4814Smrg# gives unlimited permission to copy and/or distribute it, 771915fb4814Smrg# with or without modifications, as long as this notice is preserved. 772015fb4814Smrg 772115fb4814Smrg# serial 2 772215fb4814Smrg 772315fb4814Smrg# _AM_PROG_TAR(FORMAT) 772415fb4814Smrg# -------------------- 772515fb4814Smrg# Check how to create a tarball in format FORMAT. 772615fb4814Smrg# FORMAT should be one of `v7', `ustar', or `pax'. 772715fb4814Smrg# 772815fb4814Smrg# Substitute a variable $(am__tar) that is a command 772915fb4814Smrg# writing to stdout a FORMAT-tarball containing the directory 773015fb4814Smrg# $tardir. 773115fb4814Smrg# tardir=directory && $(am__tar) > result.tar 773215fb4814Smrg# 773315fb4814Smrg# Substitute a variable $(am__untar) that extract such 773415fb4814Smrg# a tarball read from stdin. 773515fb4814Smrg# $(am__untar) < result.tar 773615fb4814SmrgAC_DEFUN([_AM_PROG_TAR], 773715fb4814Smrg[# Always define AMTAR for backward compatibility. 773815fb4814SmrgAM_MISSING_PROG([AMTAR], [tar]) 773915fb4814Smrgm4_if([$1], [v7], 774015fb4814Smrg [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], 774115fb4814Smrg [m4_case([$1], [ustar],, [pax],, 774215fb4814Smrg [m4_fatal([Unknown tar format])]) 774315fb4814SmrgAC_MSG_CHECKING([how to create a $1 tar archive]) 774415fb4814Smrg# Loop over all known methods to create a tar archive until one works. 774515fb4814Smrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 774615fb4814Smrg_am_tools=${am_cv_prog_tar_$1-$_am_tools} 774715fb4814Smrg# Do not fold the above two line into one, because Tru64 sh and 774815fb4814Smrg# Solaris sh will not grok spaces in the rhs of `-'. 774915fb4814Smrgfor _am_tool in $_am_tools 775015fb4814Smrgdo 775115fb4814Smrg case $_am_tool in 775215fb4814Smrg gnutar) 775315fb4814Smrg for _am_tar in tar gnutar gtar; 775415fb4814Smrg do 775515fb4814Smrg AM_RUN_LOG([$_am_tar --version]) && break 775615fb4814Smrg done 775715fb4814Smrg am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 775815fb4814Smrg am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 775915fb4814Smrg am__untar="$_am_tar -xf -" 776015fb4814Smrg ;; 776115fb4814Smrg plaintar) 776215fb4814Smrg # Must skip GNU tar: if it does not support --format= it doesn't create 776315fb4814Smrg # ustar tarball either. 776415fb4814Smrg (tar --version) >/dev/null 2>&1 && continue 776515fb4814Smrg am__tar='tar chf - "$$tardir"' 776615fb4814Smrg am__tar_='tar chf - "$tardir"' 776715fb4814Smrg am__untar='tar xf -' 776815fb4814Smrg ;; 776915fb4814Smrg pax) 777015fb4814Smrg am__tar='pax -L -x $1 -w "$$tardir"' 777115fb4814Smrg am__tar_='pax -L -x $1 -w "$tardir"' 777215fb4814Smrg am__untar='pax -r' 777315fb4814Smrg ;; 777415fb4814Smrg cpio) 777515fb4814Smrg am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 777615fb4814Smrg am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 777715fb4814Smrg am__untar='cpio -i -H $1 -d' 777815fb4814Smrg ;; 777915fb4814Smrg none) 778015fb4814Smrg am__tar=false 778115fb4814Smrg am__tar_=false 778215fb4814Smrg am__untar=false 778315fb4814Smrg ;; 778415fb4814Smrg esac 778515fb4814Smrg 778615fb4814Smrg # If the value was cached, stop now. We just wanted to have am__tar 778715fb4814Smrg # and am__untar set. 778815fb4814Smrg test -n "${am_cv_prog_tar_$1}" && break 778915fb4814Smrg 779015fb4814Smrg # tar/untar a dummy directory, and stop if the command works 779115fb4814Smrg rm -rf conftest.dir 779215fb4814Smrg mkdir conftest.dir 779315fb4814Smrg echo GrepMe > conftest.dir/file 779415fb4814Smrg AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 779515fb4814Smrg rm -rf conftest.dir 779615fb4814Smrg if test -s conftest.tar; then 779715fb4814Smrg AM_RUN_LOG([$am__untar <conftest.tar]) 779815fb4814Smrg grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 779915fb4814Smrg fi 780015fb4814Smrgdone 780115fb4814Smrgrm -rf conftest.dir 780215fb4814Smrg 780315fb4814SmrgAC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 780415fb4814SmrgAC_MSG_RESULT([$am_cv_prog_tar_$1])]) 780515fb4814SmrgAC_SUBST([am__tar]) 780615fb4814SmrgAC_SUBST([am__untar]) 780715fb4814Smrg]) # _AM_PROG_TAR 780815fb4814Smrg 7809