153e90a53Smrg# generated automatically by aclocal 1.9.6 -*- Autoconf -*- 253e90a53Smrg 353e90a53Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 453e90a53Smrg# 2005 Free Software Foundation, Inc. 553e90a53Smrg# This file is free software; the Free Software Foundation 653e90a53Smrg# gives unlimited permission to copy and/or distribute it, 753e90a53Smrg# with or without modifications, as long as this notice is preserved. 853e90a53Smrg 953e90a53Smrg# This program is distributed in the hope that it will be useful, 1053e90a53Smrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 1153e90a53Smrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 1253e90a53Smrg# PARTICULAR PURPOSE. 1353e90a53Smrg 1453e90a53Smrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 1553e90a53Smrg 1653e90a53Smrg# serial 48 AC_PROG_LIBTOOL 1753e90a53Smrg 1853e90a53Smrg 1953e90a53Smrg# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED) 2053e90a53Smrg# ----------------------------------------------------------- 2153e90a53Smrg# If this macro is not defined by Autoconf, define it here. 2253e90a53Smrgm4_ifdef([AC_PROVIDE_IFELSE], 2353e90a53Smrg [], 2453e90a53Smrg [m4_define([AC_PROVIDE_IFELSE], 2553e90a53Smrg [m4_ifdef([AC_PROVIDE_$1], 2653e90a53Smrg [$2], [$3])])]) 2753e90a53Smrg 2853e90a53Smrg 2953e90a53Smrg# AC_PROG_LIBTOOL 3053e90a53Smrg# --------------- 3153e90a53SmrgAC_DEFUN([AC_PROG_LIBTOOL], 3253e90a53Smrg[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl 3353e90a53Smrgdnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX 3453e90a53Smrgdnl immediately, otherwise, hook it in at the end of AC_PROG_CXX. 3553e90a53Smrg AC_PROVIDE_IFELSE([AC_PROG_CXX], 3653e90a53Smrg [AC_LIBTOOL_CXX], 3753e90a53Smrg [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX 3853e90a53Smrg ])]) 3953e90a53Smrgdnl And a similar setup for Fortran 77 support 4053e90a53Smrg AC_PROVIDE_IFELSE([AC_PROG_F77], 4153e90a53Smrg [AC_LIBTOOL_F77], 4253e90a53Smrg [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77 4353e90a53Smrg])]) 4453e90a53Smrg 4553e90a53Smrgdnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly. 4653e90a53Smrgdnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run 4753e90a53Smrgdnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both. 4853e90a53Smrg AC_PROVIDE_IFELSE([AC_PROG_GCJ], 4953e90a53Smrg [AC_LIBTOOL_GCJ], 5053e90a53Smrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 5153e90a53Smrg [AC_LIBTOOL_GCJ], 5253e90a53Smrg [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ], 5353e90a53Smrg [AC_LIBTOOL_GCJ], 5453e90a53Smrg [ifdef([AC_PROG_GCJ], 5553e90a53Smrg [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])]) 5653e90a53Smrg ifdef([A][M_PROG_GCJ], 5753e90a53Smrg [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])]) 5853e90a53Smrg ifdef([LT_AC_PROG_GCJ], 5953e90a53Smrg [define([LT_AC_PROG_GCJ], 6053e90a53Smrg defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])]) 6153e90a53Smrg])])# AC_PROG_LIBTOOL 6253e90a53Smrg 6353e90a53Smrg 6453e90a53Smrg# _AC_PROG_LIBTOOL 6553e90a53Smrg# ---------------- 6653e90a53SmrgAC_DEFUN([_AC_PROG_LIBTOOL], 6753e90a53Smrg[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl 6853e90a53SmrgAC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl 6953e90a53SmrgAC_BEFORE([$0],[AC_LIBTOOL_F77])dnl 7053e90a53SmrgAC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl 7153e90a53Smrg 7253e90a53Smrg# This can be used to rebuild libtool when needed 7353e90a53SmrgLIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" 7453e90a53Smrg 7553e90a53Smrg# Always use our own libtool. 7653e90a53SmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool' 7753e90a53SmrgAC_SUBST(LIBTOOL)dnl 7853e90a53Smrg 7953e90a53Smrg# Prevent multiple expansion 8053e90a53Smrgdefine([AC_PROG_LIBTOOL], []) 8153e90a53Smrg])# _AC_PROG_LIBTOOL 8253e90a53Smrg 8353e90a53Smrg 8453e90a53Smrg# AC_LIBTOOL_SETUP 8553e90a53Smrg# ---------------- 8653e90a53SmrgAC_DEFUN([AC_LIBTOOL_SETUP], 8753e90a53Smrg[AC_PREREQ(2.50)dnl 8853e90a53SmrgAC_REQUIRE([AC_ENABLE_SHARED])dnl 8953e90a53SmrgAC_REQUIRE([AC_ENABLE_STATIC])dnl 9053e90a53SmrgAC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl 9153e90a53SmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 9253e90a53SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 9353e90a53SmrgAC_REQUIRE([AC_PROG_CC])dnl 9453e90a53SmrgAC_REQUIRE([AC_PROG_LD])dnl 9553e90a53SmrgAC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl 9653e90a53SmrgAC_REQUIRE([AC_PROG_NM])dnl 9753e90a53Smrg 9853e90a53SmrgAC_REQUIRE([AC_PROG_LN_S])dnl 9953e90a53SmrgAC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl 10053e90a53Smrg# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! 10153e90a53SmrgAC_REQUIRE([AC_OBJEXT])dnl 10253e90a53SmrgAC_REQUIRE([AC_EXEEXT])dnl 10353e90a53Smrgdnl 10453e90a53Smrg 10553e90a53SmrgAC_LIBTOOL_SYS_MAX_CMD_LEN 10653e90a53SmrgAC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE 10753e90a53SmrgAC_LIBTOOL_OBJDIR 10853e90a53Smrg 10953e90a53SmrgAC_REQUIRE([_LT_AC_SYS_COMPILER])dnl 11053e90a53Smrg_LT_AC_PROG_ECHO_BACKSLASH 11153e90a53Smrg 11253e90a53Smrgcase $host_os in 11353e90a53Smrgaix3*) 11453e90a53Smrg # AIX sometimes has problems with the GCC collect2 program. For some 11553e90a53Smrg # reason, if we set the COLLECT_NAMES environment variable, the problems 11653e90a53Smrg # vanish in a puff of smoke. 11753e90a53Smrg if test "X${COLLECT_NAMES+set}" != Xset; then 11853e90a53Smrg COLLECT_NAMES= 11953e90a53Smrg export COLLECT_NAMES 12053e90a53Smrg fi 12153e90a53Smrg ;; 12253e90a53Smrgesac 12353e90a53Smrg 12453e90a53Smrg# Sed substitution that helps us do robust quoting. It backslashifies 12553e90a53Smrg# metacharacters that are still active within double-quoted strings. 12653e90a53SmrgXsed='sed -e 1s/^X//' 12753e90a53Smrg[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'] 12853e90a53Smrg 12953e90a53Smrg# Same as above, but do not quote variable references. 13053e90a53Smrg[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'] 13153e90a53Smrg 13253e90a53Smrg# Sed substitution to delay expansion of an escaped shell variable in a 13353e90a53Smrg# double_quote_subst'ed string. 13453e90a53Smrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 13553e90a53Smrg 13653e90a53Smrg# Sed substitution to avoid accidental globbing in evaled expressions 13753e90a53Smrgno_glob_subst='s/\*/\\\*/g' 13853e90a53Smrg 13953e90a53Smrg# Constants: 14053e90a53Smrgrm="rm -f" 14153e90a53Smrg 14253e90a53Smrg# Global variables: 14353e90a53Smrgdefault_ofile=libtool 14453e90a53Smrgcan_build_shared=yes 14553e90a53Smrg 14653e90a53Smrg# All known linkers require a `.a' archive for static linking (except MSVC, 14753e90a53Smrg# which needs '.lib'). 14853e90a53Smrglibext=a 14953e90a53Smrgltmain="$ac_aux_dir/ltmain.sh" 15053e90a53Smrgofile="$default_ofile" 15153e90a53Smrgwith_gnu_ld="$lt_cv_prog_gnu_ld" 15253e90a53Smrg 15353e90a53SmrgAC_CHECK_TOOL(AR, ar, false) 15453e90a53SmrgAC_CHECK_TOOL(RANLIB, ranlib, :) 15553e90a53SmrgAC_CHECK_TOOL(STRIP, strip, :) 15653e90a53Smrg 15753e90a53Smrgold_CC="$CC" 15853e90a53Smrgold_CFLAGS="$CFLAGS" 15953e90a53Smrg 16053e90a53Smrg# Set sane defaults for various variables 16153e90a53Smrgtest -z "$AR" && AR=ar 16253e90a53Smrgtest -z "$AR_FLAGS" && AR_FLAGS=cru 16353e90a53Smrgtest -z "$AS" && AS=as 16453e90a53Smrgtest -z "$CC" && CC=cc 16553e90a53Smrgtest -z "$LTCC" && LTCC=$CC 16653e90a53Smrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 16753e90a53Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 16853e90a53Smrgtest -z "$LD" && LD=ld 16953e90a53Smrgtest -z "$LN_S" && LN_S="ln -s" 17053e90a53Smrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file 17153e90a53Smrgtest -z "$NM" && NM=nm 17253e90a53Smrgtest -z "$SED" && SED=sed 17353e90a53Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump 17453e90a53Smrgtest -z "$RANLIB" && RANLIB=: 17553e90a53Smrgtest -z "$STRIP" && STRIP=: 17653e90a53Smrgtest -z "$ac_objext" && ac_objext=o 17753e90a53Smrg 17853e90a53Smrg# Determine commands to create old-style static archives. 17953e90a53Smrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs' 18053e90a53Smrgold_postinstall_cmds='chmod 644 $oldlib' 18153e90a53Smrgold_postuninstall_cmds= 18253e90a53Smrg 18353e90a53Smrgif test -n "$RANLIB"; then 18453e90a53Smrg case $host_os in 18553e90a53Smrg openbsd*) 18653e90a53Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" 18753e90a53Smrg ;; 18853e90a53Smrg *) 18953e90a53Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" 19053e90a53Smrg ;; 19153e90a53Smrg esac 19253e90a53Smrg old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" 19353e90a53Smrgfi 19453e90a53Smrg 19553e90a53Smrg_LT_CC_BASENAME([$compiler]) 19653e90a53Smrg 19753e90a53Smrg# Only perform the check for file, if the check method requires it 19853e90a53Smrgcase $deplibs_check_method in 19953e90a53Smrgfile_magic*) 20053e90a53Smrg if test "$file_magic_cmd" = '$MAGIC_CMD'; then 20153e90a53Smrg AC_PATH_MAGIC 20253e90a53Smrg fi 20353e90a53Smrg ;; 20453e90a53Smrgesac 20553e90a53Smrg 20653e90a53SmrgAC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no) 20753e90a53SmrgAC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], 20853e90a53Smrgenable_win32_dll=yes, enable_win32_dll=no) 20953e90a53Smrg 21053e90a53SmrgAC_ARG_ENABLE([libtool-lock], 21153e90a53Smrg [AC_HELP_STRING([--disable-libtool-lock], 21253e90a53Smrg [avoid locking (might break parallel builds)])]) 21353e90a53Smrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes 21453e90a53Smrg 21553e90a53SmrgAC_ARG_WITH([pic], 21653e90a53Smrg [AC_HELP_STRING([--with-pic], 21753e90a53Smrg [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 21853e90a53Smrg [pic_mode="$withval"], 21953e90a53Smrg [pic_mode=default]) 22053e90a53Smrgtest -z "$pic_mode" && pic_mode=default 22153e90a53Smrg 22253e90a53Smrg# Use C for the default configuration in the libtool script 22353e90a53Smrgtagname= 22453e90a53SmrgAC_LIBTOOL_LANG_C_CONFIG 22553e90a53Smrg_LT_AC_TAGCONFIG 22653e90a53Smrg])# AC_LIBTOOL_SETUP 22753e90a53Smrg 22853e90a53Smrg 22953e90a53Smrg# _LT_AC_SYS_COMPILER 23053e90a53Smrg# ------------------- 23153e90a53SmrgAC_DEFUN([_LT_AC_SYS_COMPILER], 23253e90a53Smrg[AC_REQUIRE([AC_PROG_CC])dnl 23353e90a53Smrg 23453e90a53Smrg# If no C compiler was specified, use CC. 23553e90a53SmrgLTCC=${LTCC-"$CC"} 23653e90a53Smrg 23753e90a53Smrg# If no C compiler flags were specified, use CFLAGS. 23853e90a53SmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"} 23953e90a53Smrg 24053e90a53Smrg# Allow CC to be a program name with arguments. 24153e90a53Smrgcompiler=$CC 24253e90a53Smrg])# _LT_AC_SYS_COMPILER 24353e90a53Smrg 24453e90a53Smrg 24553e90a53Smrg# _LT_CC_BASENAME(CC) 24653e90a53Smrg# ------------------- 24753e90a53Smrg# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 24853e90a53SmrgAC_DEFUN([_LT_CC_BASENAME], 24953e90a53Smrg[for cc_temp in $1""; do 25053e90a53Smrg case $cc_temp in 25153e90a53Smrg compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 25253e90a53Smrg distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 25353e90a53Smrg \-*) ;; 25453e90a53Smrg *) break;; 25553e90a53Smrg esac 25653e90a53Smrgdone 25753e90a53Smrgcc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` 25853e90a53Smrg]) 25953e90a53Smrg 26053e90a53Smrg 26153e90a53Smrg# _LT_COMPILER_BOILERPLATE 26253e90a53Smrg# ------------------------ 26353e90a53Smrg# Check for compiler boilerplate output or warnings with 26453e90a53Smrg# the simple compiler test code. 26553e90a53SmrgAC_DEFUN([_LT_COMPILER_BOILERPLATE], 26653e90a53Smrg[ac_outfile=conftest.$ac_objext 26753e90a53Smrgprintf "$lt_simple_compile_test_code" >conftest.$ac_ext 26853e90a53Smrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 26953e90a53Smrg_lt_compiler_boilerplate=`cat conftest.err` 27053e90a53Smrg$rm conftest* 27153e90a53Smrg])# _LT_COMPILER_BOILERPLATE 27253e90a53Smrg 27353e90a53Smrg 27453e90a53Smrg# _LT_LINKER_BOILERPLATE 27553e90a53Smrg# ---------------------- 27653e90a53Smrg# Check for linker boilerplate output or warnings with 27753e90a53Smrg# the simple link test code. 27853e90a53SmrgAC_DEFUN([_LT_LINKER_BOILERPLATE], 27953e90a53Smrg[ac_outfile=conftest.$ac_objext 28053e90a53Smrgprintf "$lt_simple_link_test_code" >conftest.$ac_ext 28153e90a53Smrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 28253e90a53Smrg_lt_linker_boilerplate=`cat conftest.err` 28353e90a53Smrg$rm conftest* 28453e90a53Smrg])# _LT_LINKER_BOILERPLATE 28553e90a53Smrg 28653e90a53Smrg 28753e90a53Smrg# _LT_AC_SYS_LIBPATH_AIX 28853e90a53Smrg# ---------------------- 28953e90a53Smrg# Links a minimal program and checks the executable 29053e90a53Smrg# for the system default hardcoded library path. In most cases, 29153e90a53Smrg# this is /usr/lib:/lib, but when the MPI compilers are used 29253e90a53Smrg# the location of the communication and MPI libs are included too. 29353e90a53Smrg# If we don't find anything, use the default library path according 29453e90a53Smrg# to the aix ld manual. 29553e90a53SmrgAC_DEFUN([_LT_AC_SYS_LIBPATH_AIX], 29653e90a53Smrg[AC_LINK_IFELSE(AC_LANG_PROGRAM,[ 29753e90a53Smrgaix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } 29853e90a53Smrg}'` 29953e90a53Smrg# Check for a 64-bit object if we didn't find anything. 30053e90a53Smrgif 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; } 30153e90a53Smrg}'`; fi],[]) 30253e90a53Smrgif test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi 30353e90a53Smrg])# _LT_AC_SYS_LIBPATH_AIX 30453e90a53Smrg 30553e90a53Smrg 30653e90a53Smrg# _LT_AC_SHELL_INIT(ARG) 30753e90a53Smrg# ---------------------- 30853e90a53SmrgAC_DEFUN([_LT_AC_SHELL_INIT], 30953e90a53Smrg[ifdef([AC_DIVERSION_NOTICE], 31053e90a53Smrg [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], 31153e90a53Smrg [AC_DIVERT_PUSH(NOTICE)]) 31253e90a53Smrg$1 31353e90a53SmrgAC_DIVERT_POP 31453e90a53Smrg])# _LT_AC_SHELL_INIT 31553e90a53Smrg 31653e90a53Smrg 31753e90a53Smrg# _LT_AC_PROG_ECHO_BACKSLASH 31853e90a53Smrg# -------------------------- 31953e90a53Smrg# Add some code to the start of the generated configure script which 32053e90a53Smrg# will find an echo command which doesn't interpret backslashes. 32153e90a53SmrgAC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH], 32253e90a53Smrg[_LT_AC_SHELL_INIT([ 32353e90a53Smrg# Check that we are running under the correct shell. 32453e90a53SmrgSHELL=${CONFIG_SHELL-/bin/sh} 32553e90a53Smrg 32653e90a53Smrgcase X$ECHO in 32753e90a53SmrgX*--fallback-echo) 32853e90a53Smrg # Remove one level of quotation (which was required for Make). 32953e90a53Smrg ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` 33053e90a53Smrg ;; 33153e90a53Smrgesac 33253e90a53Smrg 33353e90a53Smrgecho=${ECHO-echo} 33453e90a53Smrgif test "X[$]1" = X--no-reexec; then 33553e90a53Smrg # Discard the --no-reexec flag, and continue. 33653e90a53Smrg shift 33753e90a53Smrgelif test "X[$]1" = X--fallback-echo; then 33853e90a53Smrg # Avoid inline document here, it may be left over 33953e90a53Smrg : 34053e90a53Smrgelif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then 34153e90a53Smrg # Yippee, $echo works! 34253e90a53Smrg : 34353e90a53Smrgelse 34453e90a53Smrg # Restart under the correct shell. 34553e90a53Smrg exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} 34653e90a53Smrgfi 34753e90a53Smrg 34853e90a53Smrgif test "X[$]1" = X--fallback-echo; then 34953e90a53Smrg # used as fallback echo 35053e90a53Smrg shift 35153e90a53Smrg cat <<EOF 35253e90a53Smrg[$]* 35353e90a53SmrgEOF 35453e90a53Smrg exit 0 35553e90a53Smrgfi 35653e90a53Smrg 35753e90a53Smrg# The HP-UX ksh and POSIX shell print the target directory to stdout 35853e90a53Smrg# if CDPATH is set. 35953e90a53Smrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 36053e90a53Smrg 36153e90a53Smrgif test -z "$ECHO"; then 36253e90a53Smrgif test "X${echo_test_string+set}" != Xset; then 36353e90a53Smrg# find a string as large as possible, as long as the shell can cope with it 36453e90a53Smrg for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do 36553e90a53Smrg # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... 36653e90a53Smrg if (echo_test_string=`eval $cmd`) 2>/dev/null && 36753e90a53Smrg echo_test_string=`eval $cmd` && 36853e90a53Smrg (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null 36953e90a53Smrg then 37053e90a53Smrg break 37153e90a53Smrg fi 37253e90a53Smrg done 37353e90a53Smrgfi 37453e90a53Smrg 37553e90a53Smrgif test "X`($echo '\t') 2>/dev/null`" = 'X\t' && 37653e90a53Smrg echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && 37753e90a53Smrg test "X$echo_testing_string" = "X$echo_test_string"; then 37853e90a53Smrg : 37953e90a53Smrgelse 38053e90a53Smrg # The Solaris, AIX, and Digital Unix default echo programs unquote 38153e90a53Smrg # backslashes. This makes it impossible to quote backslashes using 38253e90a53Smrg # echo "$something" | sed 's/\\/\\\\/g' 38353e90a53Smrg # 38453e90a53Smrg # So, first we look for a working echo in the user's PATH. 38553e90a53Smrg 38653e90a53Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 38753e90a53Smrg for dir in $PATH /usr/ucb; do 38853e90a53Smrg IFS="$lt_save_ifs" 38953e90a53Smrg if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && 39053e90a53Smrg test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && 39153e90a53Smrg echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && 39253e90a53Smrg test "X$echo_testing_string" = "X$echo_test_string"; then 39353e90a53Smrg echo="$dir/echo" 39453e90a53Smrg break 39553e90a53Smrg fi 39653e90a53Smrg done 39753e90a53Smrg IFS="$lt_save_ifs" 39853e90a53Smrg 39953e90a53Smrg if test "X$echo" = Xecho; then 40053e90a53Smrg # We didn't find a better echo, so look for alternatives. 40153e90a53Smrg if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && 40253e90a53Smrg echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && 40353e90a53Smrg test "X$echo_testing_string" = "X$echo_test_string"; then 40453e90a53Smrg # This shell has a builtin print -r that does the trick. 40553e90a53Smrg echo='print -r' 40653e90a53Smrg elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && 40753e90a53Smrg test "X$CONFIG_SHELL" != X/bin/ksh; then 40853e90a53Smrg # If we have ksh, try running configure again with it. 40953e90a53Smrg ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} 41053e90a53Smrg export ORIGINAL_CONFIG_SHELL 41153e90a53Smrg CONFIG_SHELL=/bin/ksh 41253e90a53Smrg export CONFIG_SHELL 41353e90a53Smrg exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} 41453e90a53Smrg else 41553e90a53Smrg # Try using printf. 41653e90a53Smrg echo='printf %s\n' 41753e90a53Smrg if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && 41853e90a53Smrg echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && 41953e90a53Smrg test "X$echo_testing_string" = "X$echo_test_string"; then 42053e90a53Smrg # Cool, printf works 42153e90a53Smrg : 42253e90a53Smrg elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && 42353e90a53Smrg test "X$echo_testing_string" = 'X\t' && 42453e90a53Smrg echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && 42553e90a53Smrg test "X$echo_testing_string" = "X$echo_test_string"; then 42653e90a53Smrg CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL 42753e90a53Smrg export CONFIG_SHELL 42853e90a53Smrg SHELL="$CONFIG_SHELL" 42953e90a53Smrg export SHELL 43053e90a53Smrg echo="$CONFIG_SHELL [$]0 --fallback-echo" 43153e90a53Smrg elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && 43253e90a53Smrg test "X$echo_testing_string" = 'X\t' && 43353e90a53Smrg echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && 43453e90a53Smrg test "X$echo_testing_string" = "X$echo_test_string"; then 43553e90a53Smrg echo="$CONFIG_SHELL [$]0 --fallback-echo" 43653e90a53Smrg else 43753e90a53Smrg # maybe with a smaller string... 43853e90a53Smrg prev=: 43953e90a53Smrg 44053e90a53Smrg for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do 44153e90a53Smrg if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null 44253e90a53Smrg then 44353e90a53Smrg break 44453e90a53Smrg fi 44553e90a53Smrg prev="$cmd" 44653e90a53Smrg done 44753e90a53Smrg 44853e90a53Smrg if test "$prev" != 'sed 50q "[$]0"'; then 44953e90a53Smrg echo_test_string=`eval $prev` 45053e90a53Smrg export echo_test_string 45153e90a53Smrg exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} 45253e90a53Smrg else 45353e90a53Smrg # Oops. We lost completely, so just stick with echo. 45453e90a53Smrg echo=echo 45553e90a53Smrg fi 45653e90a53Smrg fi 45753e90a53Smrg fi 45853e90a53Smrg fi 45953e90a53Smrgfi 46053e90a53Smrgfi 46153e90a53Smrg 46253e90a53Smrg# Copy echo and quote the copy suitably for passing to libtool from 46353e90a53Smrg# the Makefile, instead of quoting the original, which is used later. 46453e90a53SmrgECHO=$echo 46553e90a53Smrgif test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then 46653e90a53Smrg ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" 46753e90a53Smrgfi 46853e90a53Smrg 46953e90a53SmrgAC_SUBST(ECHO) 47053e90a53Smrg])])# _LT_AC_PROG_ECHO_BACKSLASH 47153e90a53Smrg 47253e90a53Smrg 47353e90a53Smrg# _LT_AC_LOCK 47453e90a53Smrg# ----------- 47553e90a53SmrgAC_DEFUN([_LT_AC_LOCK], 47653e90a53Smrg[AC_ARG_ENABLE([libtool-lock], 47753e90a53Smrg [AC_HELP_STRING([--disable-libtool-lock], 47853e90a53Smrg [avoid locking (might break parallel builds)])]) 47953e90a53Smrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes 48053e90a53Smrg 48153e90a53Smrg# Some flags need to be propagated to the compiler or linker for good 48253e90a53Smrg# libtool support. 48353e90a53Smrgcase $host in 48453e90a53Smrgia64-*-hpux*) 48553e90a53Smrg # Find out which ABI we are using. 48653e90a53Smrg echo 'int i;' > conftest.$ac_ext 48753e90a53Smrg if AC_TRY_EVAL(ac_compile); then 48853e90a53Smrg case `/usr/bin/file conftest.$ac_objext` in 48953e90a53Smrg *ELF-32*) 49053e90a53Smrg HPUX_IA64_MODE="32" 49153e90a53Smrg ;; 49253e90a53Smrg *ELF-64*) 49353e90a53Smrg HPUX_IA64_MODE="64" 49453e90a53Smrg ;; 49553e90a53Smrg esac 49653e90a53Smrg fi 49753e90a53Smrg rm -rf conftest* 49853e90a53Smrg ;; 49953e90a53Smrg*-*-irix6*) 50053e90a53Smrg # Find out which ABI we are using. 50153e90a53Smrg echo '[#]line __oline__ "configure"' > conftest.$ac_ext 50253e90a53Smrg if AC_TRY_EVAL(ac_compile); then 50353e90a53Smrg if test "$lt_cv_prog_gnu_ld" = yes; then 50453e90a53Smrg case `/usr/bin/file conftest.$ac_objext` in 50553e90a53Smrg *32-bit*) 50653e90a53Smrg LD="${LD-ld} -melf32bsmip" 50753e90a53Smrg ;; 50853e90a53Smrg *N32*) 50953e90a53Smrg LD="${LD-ld} -melf32bmipn32" 51053e90a53Smrg ;; 51153e90a53Smrg *64-bit*) 51253e90a53Smrg LD="${LD-ld} -melf64bmip" 51353e90a53Smrg ;; 51453e90a53Smrg esac 51553e90a53Smrg else 51653e90a53Smrg case `/usr/bin/file conftest.$ac_objext` in 51753e90a53Smrg *32-bit*) 51853e90a53Smrg LD="${LD-ld} -32" 51953e90a53Smrg ;; 52053e90a53Smrg *N32*) 52153e90a53Smrg LD="${LD-ld} -n32" 52253e90a53Smrg ;; 52353e90a53Smrg *64-bit*) 52453e90a53Smrg LD="${LD-ld} -64" 52553e90a53Smrg ;; 52653e90a53Smrg esac 52753e90a53Smrg fi 52853e90a53Smrg fi 52953e90a53Smrg rm -rf conftest* 53053e90a53Smrg ;; 53153e90a53Smrg 53253e90a53Smrgx86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*) 53353e90a53Smrg # Find out which ABI we are using. 53453e90a53Smrg echo 'int i;' > conftest.$ac_ext 53553e90a53Smrg if AC_TRY_EVAL(ac_compile); then 53653e90a53Smrg case `/usr/bin/file conftest.o` in 53753e90a53Smrg *32-bit*) 53853e90a53Smrg case $host in 53953e90a53Smrg x86_64-*linux*) 54053e90a53Smrg LD="${LD-ld} -m elf_i386" 54153e90a53Smrg ;; 54253e90a53Smrg ppc64-*linux*|powerpc64-*linux*) 54353e90a53Smrg LD="${LD-ld} -m elf32ppclinux" 54453e90a53Smrg ;; 54553e90a53Smrg s390x-*linux*) 54653e90a53Smrg LD="${LD-ld} -m elf_s390" 54753e90a53Smrg ;; 54853e90a53Smrg sparc64-*linux*) 54953e90a53Smrg LD="${LD-ld} -m elf32_sparc" 55053e90a53Smrg ;; 55153e90a53Smrg esac 55253e90a53Smrg ;; 55353e90a53Smrg *64-bit*) 55453e90a53Smrg case $host in 55553e90a53Smrg x86_64-*linux*) 55653e90a53Smrg LD="${LD-ld} -m elf_x86_64" 55753e90a53Smrg ;; 55853e90a53Smrg ppc*-*linux*|powerpc*-*linux*) 55953e90a53Smrg LD="${LD-ld} -m elf64ppc" 56053e90a53Smrg ;; 56153e90a53Smrg s390*-*linux*) 56253e90a53Smrg LD="${LD-ld} -m elf64_s390" 56353e90a53Smrg ;; 56453e90a53Smrg sparc*-*linux*) 56553e90a53Smrg LD="${LD-ld} -m elf64_sparc" 56653e90a53Smrg ;; 56753e90a53Smrg esac 56853e90a53Smrg ;; 56953e90a53Smrg esac 57053e90a53Smrg fi 57153e90a53Smrg rm -rf conftest* 57253e90a53Smrg ;; 57353e90a53Smrg 57453e90a53Smrg*-*-sco3.2v5*) 57553e90a53Smrg # On SCO OpenServer 5, we need -belf to get full-featured binaries. 57653e90a53Smrg SAVE_CFLAGS="$CFLAGS" 57753e90a53Smrg CFLAGS="$CFLAGS -belf" 57853e90a53Smrg AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 57953e90a53Smrg [AC_LANG_PUSH(C) 58053e90a53Smrg AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 58153e90a53Smrg AC_LANG_POP]) 58253e90a53Smrg if test x"$lt_cv_cc_needs_belf" != x"yes"; then 58353e90a53Smrg # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 58453e90a53Smrg CFLAGS="$SAVE_CFLAGS" 58553e90a53Smrg fi 58653e90a53Smrg ;; 58753e90a53Smrgsparc*-*solaris*) 58853e90a53Smrg # Find out which ABI we are using. 58953e90a53Smrg echo 'int i;' > conftest.$ac_ext 59053e90a53Smrg if AC_TRY_EVAL(ac_compile); then 59153e90a53Smrg case `/usr/bin/file conftest.o` in 59253e90a53Smrg *64-bit*) 59353e90a53Smrg case $lt_cv_prog_gnu_ld in 59453e90a53Smrg yes*) LD="${LD-ld} -m elf64_sparc" ;; 59553e90a53Smrg *) LD="${LD-ld} -64" ;; 59653e90a53Smrg esac 59753e90a53Smrg ;; 59853e90a53Smrg esac 59953e90a53Smrg fi 60053e90a53Smrg rm -rf conftest* 60153e90a53Smrg ;; 60253e90a53Smrg 60353e90a53SmrgAC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], 60453e90a53Smrg[*-*-cygwin* | *-*-mingw* | *-*-pw32*) 60553e90a53Smrg AC_CHECK_TOOL(DLLTOOL, dlltool, false) 60653e90a53Smrg AC_CHECK_TOOL(AS, as, false) 60753e90a53Smrg AC_CHECK_TOOL(OBJDUMP, objdump, false) 60853e90a53Smrg ;; 60953e90a53Smrg ]) 61053e90a53Smrgesac 61153e90a53Smrg 61253e90a53Smrgneed_locks="$enable_libtool_lock" 61353e90a53Smrg 61453e90a53Smrg])# _LT_AC_LOCK 61553e90a53Smrg 61653e90a53Smrg 61753e90a53Smrg# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 61853e90a53Smrg# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 61953e90a53Smrg# ---------------------------------------------------------------- 62053e90a53Smrg# Check whether the given compiler option works 62153e90a53SmrgAC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], 62253e90a53Smrg[AC_REQUIRE([LT_AC_PROG_SED]) 62353e90a53SmrgAC_CACHE_CHECK([$1], [$2], 62453e90a53Smrg [$2=no 62553e90a53Smrg ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 62653e90a53Smrg printf "$lt_simple_compile_test_code" > conftest.$ac_ext 62753e90a53Smrg lt_compiler_flag="$3" 62853e90a53Smrg # Insert the option either (1) after the last *FLAGS variable, or 62953e90a53Smrg # (2) before a word containing "conftest.", or (3) at the end. 63053e90a53Smrg # Note that $ac_compile itself does not contain backslashes and begins 63153e90a53Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 63253e90a53Smrg # The option is referenced via a variable to avoid confusing sed. 63353e90a53Smrg lt_compile=`echo "$ac_compile" | $SED \ 63453e90a53Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 63553e90a53Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 63653e90a53Smrg -e 's:$: $lt_compiler_flag:'` 63753e90a53Smrg (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 63853e90a53Smrg (eval "$lt_compile" 2>conftest.err) 63953e90a53Smrg ac_status=$? 64053e90a53Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 64153e90a53Smrg echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 64253e90a53Smrg if (exit $ac_status) && test -s "$ac_outfile"; then 64353e90a53Smrg # The compiler can only warn and ignore the option if not recognized 64453e90a53Smrg # So say no if there are warnings other than the usual output. 64553e90a53Smrg $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp 64653e90a53Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 64753e90a53Smrg if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 64853e90a53Smrg $2=yes 64953e90a53Smrg fi 65053e90a53Smrg fi 65153e90a53Smrg $rm conftest* 65253e90a53Smrg]) 65353e90a53Smrg 65453e90a53Smrgif test x"[$]$2" = xyes; then 65553e90a53Smrg ifelse([$5], , :, [$5]) 65653e90a53Smrgelse 65753e90a53Smrg ifelse([$6], , :, [$6]) 65853e90a53Smrgfi 65953e90a53Smrg])# AC_LIBTOOL_COMPILER_OPTION 66053e90a53Smrg 66153e90a53Smrg 66253e90a53Smrg# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 66353e90a53Smrg# [ACTION-SUCCESS], [ACTION-FAILURE]) 66453e90a53Smrg# ------------------------------------------------------------ 66553e90a53Smrg# Check whether the given compiler option works 66653e90a53SmrgAC_DEFUN([AC_LIBTOOL_LINKER_OPTION], 66753e90a53Smrg[AC_CACHE_CHECK([$1], [$2], 66853e90a53Smrg [$2=no 66953e90a53Smrg save_LDFLAGS="$LDFLAGS" 67053e90a53Smrg LDFLAGS="$LDFLAGS $3" 67153e90a53Smrg printf "$lt_simple_link_test_code" > conftest.$ac_ext 67253e90a53Smrg if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 67353e90a53Smrg # The linker can only warn and ignore the option if not recognized 67453e90a53Smrg # So say no if there are warnings 67553e90a53Smrg if test -s conftest.err; then 67653e90a53Smrg # Append any errors to the config.log. 67753e90a53Smrg cat conftest.err 1>&AS_MESSAGE_LOG_FD 67853e90a53Smrg $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp 67953e90a53Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 68053e90a53Smrg if diff conftest.exp conftest.er2 >/dev/null; then 68153e90a53Smrg $2=yes 68253e90a53Smrg fi 68353e90a53Smrg else 68453e90a53Smrg $2=yes 68553e90a53Smrg fi 68653e90a53Smrg fi 68753e90a53Smrg $rm conftest* 68853e90a53Smrg LDFLAGS="$save_LDFLAGS" 68953e90a53Smrg]) 69053e90a53Smrg 69153e90a53Smrgif test x"[$]$2" = xyes; then 69253e90a53Smrg ifelse([$4], , :, [$4]) 69353e90a53Smrgelse 69453e90a53Smrg ifelse([$5], , :, [$5]) 69553e90a53Smrgfi 69653e90a53Smrg])# AC_LIBTOOL_LINKER_OPTION 69753e90a53Smrg 69853e90a53Smrg 69953e90a53Smrg# AC_LIBTOOL_SYS_MAX_CMD_LEN 70053e90a53Smrg# -------------------------- 70153e90a53SmrgAC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], 70253e90a53Smrg[# find the maximum length of command line arguments 70353e90a53SmrgAC_MSG_CHECKING([the maximum length of command line arguments]) 70453e90a53SmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 70553e90a53Smrg i=0 70653e90a53Smrg teststring="ABCD" 70753e90a53Smrg 70853e90a53Smrg case $build_os in 70953e90a53Smrg msdosdjgpp*) 71053e90a53Smrg # On DJGPP, this test can blow up pretty badly due to problems in libc 71153e90a53Smrg # (any single argument exceeding 2000 bytes causes a buffer overrun 71253e90a53Smrg # during glob expansion). Even if it were fixed, the result of this 71353e90a53Smrg # check would be larger than it should be. 71453e90a53Smrg lt_cv_sys_max_cmd_len=12288; # 12K is about right 71553e90a53Smrg ;; 71653e90a53Smrg 71753e90a53Smrg gnu*) 71853e90a53Smrg # Under GNU Hurd, this test is not required because there is 71953e90a53Smrg # no limit to the length of command line arguments. 72053e90a53Smrg # Libtool will interpret -1 as no limit whatsoever 72153e90a53Smrg lt_cv_sys_max_cmd_len=-1; 72253e90a53Smrg ;; 72353e90a53Smrg 72453e90a53Smrg cygwin* | mingw*) 72553e90a53Smrg # On Win9x/ME, this test blows up -- it succeeds, but takes 72653e90a53Smrg # about 5 minutes as the teststring grows exponentially. 72753e90a53Smrg # Worse, since 9x/ME are not pre-emptively multitasking, 72853e90a53Smrg # you end up with a "frozen" computer, even though with patience 72953e90a53Smrg # the test eventually succeeds (with a max line length of 256k). 73053e90a53Smrg # Instead, let's just punt: use the minimum linelength reported by 73153e90a53Smrg # all of the supported platforms: 8192 (on NT/2K/XP). 73253e90a53Smrg lt_cv_sys_max_cmd_len=8192; 73353e90a53Smrg ;; 73453e90a53Smrg 73553e90a53Smrg amigaos*) 73653e90a53Smrg # On AmigaOS with pdksh, this test takes hours, literally. 73753e90a53Smrg # So we just punt and use a minimum line length of 8192. 73853e90a53Smrg lt_cv_sys_max_cmd_len=8192; 73953e90a53Smrg ;; 74053e90a53Smrg 74153e90a53Smrg netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) 74253e90a53Smrg # This has been around since 386BSD, at least. Likely further. 74353e90a53Smrg if test -x /sbin/sysctl; then 74453e90a53Smrg lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 74553e90a53Smrg elif test -x /usr/sbin/sysctl; then 74653e90a53Smrg lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 74753e90a53Smrg else 74853e90a53Smrg lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 74953e90a53Smrg fi 75053e90a53Smrg # And add a safety zone 75153e90a53Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 75253e90a53Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 75353e90a53Smrg ;; 75453e90a53Smrg 75553e90a53Smrg interix*) 75653e90a53Smrg # We know the value 262144 and hardcode it with a safety zone (like BSD) 75753e90a53Smrg lt_cv_sys_max_cmd_len=196608 75853e90a53Smrg ;; 75953e90a53Smrg 76053e90a53Smrg osf*) 76153e90a53Smrg # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 76253e90a53Smrg # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 76353e90a53Smrg # nice to cause kernel panics so lets avoid the loop below. 76453e90a53Smrg # First set a reasonable default. 76553e90a53Smrg lt_cv_sys_max_cmd_len=16384 76653e90a53Smrg # 76753e90a53Smrg if test -x /sbin/sysconfig; then 76853e90a53Smrg case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 76953e90a53Smrg *1*) lt_cv_sys_max_cmd_len=-1 ;; 77053e90a53Smrg esac 77153e90a53Smrg fi 77253e90a53Smrg ;; 77353e90a53Smrg sco3.2v5*) 77453e90a53Smrg lt_cv_sys_max_cmd_len=102400 77553e90a53Smrg ;; 77653e90a53Smrg sysv5* | sco5v6* | sysv4.2uw2*) 77753e90a53Smrg kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 77853e90a53Smrg if test -n "$kargmax"; then 77953e90a53Smrg lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` 78053e90a53Smrg else 78153e90a53Smrg lt_cv_sys_max_cmd_len=32768 78253e90a53Smrg fi 78353e90a53Smrg ;; 78453e90a53Smrg *) 78553e90a53Smrg # If test is not a shell built-in, we'll probably end up computing a 78653e90a53Smrg # maximum length that is only half of the actual maximum length, but 78753e90a53Smrg # we can't tell. 78853e90a53Smrg SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 78953e90a53Smrg while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \ 79053e90a53Smrg = "XX$teststring") >/dev/null 2>&1 && 79153e90a53Smrg new_result=`expr "X$teststring" : ".*" 2>&1` && 79253e90a53Smrg lt_cv_sys_max_cmd_len=$new_result && 79353e90a53Smrg test $i != 17 # 1/2 MB should be enough 79453e90a53Smrg do 79553e90a53Smrg i=`expr $i + 1` 79653e90a53Smrg teststring=$teststring$teststring 79753e90a53Smrg done 79853e90a53Smrg teststring= 79953e90a53Smrg # Add a significant safety factor because C++ compilers can tack on massive 80053e90a53Smrg # amounts of additional arguments before passing them to the linker. 80153e90a53Smrg # It appears as though 1/2 is a usable value. 80253e90a53Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 80353e90a53Smrg ;; 80453e90a53Smrg esac 80553e90a53Smrg]) 80653e90a53Smrgif test -n $lt_cv_sys_max_cmd_len ; then 80753e90a53Smrg AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 80853e90a53Smrgelse 80953e90a53Smrg AC_MSG_RESULT(none) 81053e90a53Smrgfi 81153e90a53Smrg])# AC_LIBTOOL_SYS_MAX_CMD_LEN 81253e90a53Smrg 81353e90a53Smrg 81453e90a53Smrg# _LT_AC_CHECK_DLFCN 81553e90a53Smrg# ------------------ 81653e90a53SmrgAC_DEFUN([_LT_AC_CHECK_DLFCN], 81753e90a53Smrg[AC_CHECK_HEADERS(dlfcn.h)dnl 81853e90a53Smrg])# _LT_AC_CHECK_DLFCN 81953e90a53Smrg 82053e90a53Smrg 82153e90a53Smrg# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 82253e90a53Smrg# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 82353e90a53Smrg# --------------------------------------------------------------------- 82453e90a53SmrgAC_DEFUN([_LT_AC_TRY_DLOPEN_SELF], 82553e90a53Smrg[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl 82653e90a53Smrgif test "$cross_compiling" = yes; then : 82753e90a53Smrg [$4] 82853e90a53Smrgelse 82953e90a53Smrg lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 83053e90a53Smrg lt_status=$lt_dlunknown 83153e90a53Smrg cat > conftest.$ac_ext <<EOF 83253e90a53Smrg[#line __oline__ "configure" 83353e90a53Smrg#include "confdefs.h" 83453e90a53Smrg 83553e90a53Smrg#if HAVE_DLFCN_H 83653e90a53Smrg#include <dlfcn.h> 83753e90a53Smrg#endif 83853e90a53Smrg 83953e90a53Smrg#include <stdio.h> 84053e90a53Smrg 84153e90a53Smrg#ifdef RTLD_GLOBAL 84253e90a53Smrg# define LT_DLGLOBAL RTLD_GLOBAL 84353e90a53Smrg#else 84453e90a53Smrg# ifdef DL_GLOBAL 84553e90a53Smrg# define LT_DLGLOBAL DL_GLOBAL 84653e90a53Smrg# else 84753e90a53Smrg# define LT_DLGLOBAL 0 84853e90a53Smrg# endif 84953e90a53Smrg#endif 85053e90a53Smrg 85153e90a53Smrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 85253e90a53Smrg find out it does not work in some platform. */ 85353e90a53Smrg#ifndef LT_DLLAZY_OR_NOW 85453e90a53Smrg# ifdef RTLD_LAZY 85553e90a53Smrg# define LT_DLLAZY_OR_NOW RTLD_LAZY 85653e90a53Smrg# else 85753e90a53Smrg# ifdef DL_LAZY 85853e90a53Smrg# define LT_DLLAZY_OR_NOW DL_LAZY 85953e90a53Smrg# else 86053e90a53Smrg# ifdef RTLD_NOW 86153e90a53Smrg# define LT_DLLAZY_OR_NOW RTLD_NOW 86253e90a53Smrg# else 86353e90a53Smrg# ifdef DL_NOW 86453e90a53Smrg# define LT_DLLAZY_OR_NOW DL_NOW 86553e90a53Smrg# else 86653e90a53Smrg# define LT_DLLAZY_OR_NOW 0 86753e90a53Smrg# endif 86853e90a53Smrg# endif 86953e90a53Smrg# endif 87053e90a53Smrg# endif 87153e90a53Smrg#endif 87253e90a53Smrg 87353e90a53Smrg#ifdef __cplusplus 87453e90a53Smrgextern "C" void exit (int); 87553e90a53Smrg#endif 87653e90a53Smrg 87753e90a53Smrgvoid fnord() { int i=42;} 87853e90a53Smrgint main () 87953e90a53Smrg{ 88053e90a53Smrg void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 88153e90a53Smrg int status = $lt_dlunknown; 88253e90a53Smrg 88353e90a53Smrg if (self) 88453e90a53Smrg { 88553e90a53Smrg if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 88653e90a53Smrg else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 88753e90a53Smrg /* dlclose (self); */ 88853e90a53Smrg } 88953e90a53Smrg else 89053e90a53Smrg puts (dlerror ()); 89153e90a53Smrg 89253e90a53Smrg exit (status); 89353e90a53Smrg}] 89453e90a53SmrgEOF 89553e90a53Smrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then 89653e90a53Smrg (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 89753e90a53Smrg lt_status=$? 89853e90a53Smrg case x$lt_status in 89953e90a53Smrg x$lt_dlno_uscore) $1 ;; 90053e90a53Smrg x$lt_dlneed_uscore) $2 ;; 90153e90a53Smrg x$lt_dlunknown|x*) $3 ;; 90253e90a53Smrg esac 90353e90a53Smrg else : 90453e90a53Smrg # compilation failed 90553e90a53Smrg $3 90653e90a53Smrg fi 90753e90a53Smrgfi 90853e90a53Smrgrm -fr conftest* 90953e90a53Smrg])# _LT_AC_TRY_DLOPEN_SELF 91053e90a53Smrg 91153e90a53Smrg 91253e90a53Smrg# AC_LIBTOOL_DLOPEN_SELF 91353e90a53Smrg# ---------------------- 91453e90a53SmrgAC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], 91553e90a53Smrg[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl 91653e90a53Smrgif test "x$enable_dlopen" != xyes; then 91753e90a53Smrg enable_dlopen=unknown 91853e90a53Smrg enable_dlopen_self=unknown 91953e90a53Smrg enable_dlopen_self_static=unknown 92053e90a53Smrgelse 92153e90a53Smrg lt_cv_dlopen=no 92253e90a53Smrg lt_cv_dlopen_libs= 92353e90a53Smrg 92453e90a53Smrg case $host_os in 92553e90a53Smrg beos*) 92653e90a53Smrg lt_cv_dlopen="load_add_on" 92753e90a53Smrg lt_cv_dlopen_libs= 92853e90a53Smrg lt_cv_dlopen_self=yes 92953e90a53Smrg ;; 93053e90a53Smrg 93153e90a53Smrg mingw* | pw32*) 93253e90a53Smrg lt_cv_dlopen="LoadLibrary" 93353e90a53Smrg lt_cv_dlopen_libs= 93453e90a53Smrg ;; 93553e90a53Smrg 93653e90a53Smrg cygwin*) 93753e90a53Smrg lt_cv_dlopen="dlopen" 93853e90a53Smrg lt_cv_dlopen_libs= 93953e90a53Smrg ;; 94053e90a53Smrg 94153e90a53Smrg darwin*) 94253e90a53Smrg # if libdl is installed we need to link against it 94353e90a53Smrg AC_CHECK_LIB([dl], [dlopen], 94453e90a53Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ 94553e90a53Smrg lt_cv_dlopen="dyld" 94653e90a53Smrg lt_cv_dlopen_libs= 94753e90a53Smrg lt_cv_dlopen_self=yes 94853e90a53Smrg ]) 94953e90a53Smrg ;; 95053e90a53Smrg 95153e90a53Smrg *) 95253e90a53Smrg AC_CHECK_FUNC([shl_load], 95353e90a53Smrg [lt_cv_dlopen="shl_load"], 95453e90a53Smrg [AC_CHECK_LIB([dld], [shl_load], 95553e90a53Smrg [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"], 95653e90a53Smrg [AC_CHECK_FUNC([dlopen], 95753e90a53Smrg [lt_cv_dlopen="dlopen"], 95853e90a53Smrg [AC_CHECK_LIB([dl], [dlopen], 95953e90a53Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], 96053e90a53Smrg [AC_CHECK_LIB([svld], [dlopen], 96153e90a53Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], 96253e90a53Smrg [AC_CHECK_LIB([dld], [dld_link], 96353e90a53Smrg [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"]) 96453e90a53Smrg ]) 96553e90a53Smrg ]) 96653e90a53Smrg ]) 96753e90a53Smrg ]) 96853e90a53Smrg ]) 96953e90a53Smrg ;; 97053e90a53Smrg esac 97153e90a53Smrg 97253e90a53Smrg if test "x$lt_cv_dlopen" != xno; then 97353e90a53Smrg enable_dlopen=yes 97453e90a53Smrg else 97553e90a53Smrg enable_dlopen=no 97653e90a53Smrg fi 97753e90a53Smrg 97853e90a53Smrg case $lt_cv_dlopen in 97953e90a53Smrg dlopen) 98053e90a53Smrg save_CPPFLAGS="$CPPFLAGS" 98153e90a53Smrg test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 98253e90a53Smrg 98353e90a53Smrg save_LDFLAGS="$LDFLAGS" 98453e90a53Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 98553e90a53Smrg 98653e90a53Smrg save_LIBS="$LIBS" 98753e90a53Smrg LIBS="$lt_cv_dlopen_libs $LIBS" 98853e90a53Smrg 98953e90a53Smrg AC_CACHE_CHECK([whether a program can dlopen itself], 99053e90a53Smrg lt_cv_dlopen_self, [dnl 99153e90a53Smrg _LT_AC_TRY_DLOPEN_SELF( 99253e90a53Smrg lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 99353e90a53Smrg lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 99453e90a53Smrg ]) 99553e90a53Smrg 99653e90a53Smrg if test "x$lt_cv_dlopen_self" = xyes; then 99753e90a53Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 99853e90a53Smrg AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 99953e90a53Smrg lt_cv_dlopen_self_static, [dnl 100053e90a53Smrg _LT_AC_TRY_DLOPEN_SELF( 100153e90a53Smrg lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 100253e90a53Smrg lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 100353e90a53Smrg ]) 100453e90a53Smrg fi 100553e90a53Smrg 100653e90a53Smrg CPPFLAGS="$save_CPPFLAGS" 100753e90a53Smrg LDFLAGS="$save_LDFLAGS" 100853e90a53Smrg LIBS="$save_LIBS" 100953e90a53Smrg ;; 101053e90a53Smrg esac 101153e90a53Smrg 101253e90a53Smrg case $lt_cv_dlopen_self in 101353e90a53Smrg yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 101453e90a53Smrg *) enable_dlopen_self=unknown ;; 101553e90a53Smrg esac 101653e90a53Smrg 101753e90a53Smrg case $lt_cv_dlopen_self_static in 101853e90a53Smrg yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 101953e90a53Smrg *) enable_dlopen_self_static=unknown ;; 102053e90a53Smrg esac 102153e90a53Smrgfi 102253e90a53Smrg])# AC_LIBTOOL_DLOPEN_SELF 102353e90a53Smrg 102453e90a53Smrg 102553e90a53Smrg# AC_LIBTOOL_PROG_CC_C_O([TAGNAME]) 102653e90a53Smrg# --------------------------------- 102753e90a53Smrg# Check to see if options -c and -o are simultaneously supported by compiler 102853e90a53SmrgAC_DEFUN([AC_LIBTOOL_PROG_CC_C_O], 102953e90a53Smrg[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl 103053e90a53SmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 103153e90a53Smrg [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 103253e90a53Smrg [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 103353e90a53Smrg $rm -r conftest 2>/dev/null 103453e90a53Smrg mkdir conftest 103553e90a53Smrg cd conftest 103653e90a53Smrg mkdir out 103753e90a53Smrg printf "$lt_simple_compile_test_code" > conftest.$ac_ext 103853e90a53Smrg 103953e90a53Smrg lt_compiler_flag="-o out/conftest2.$ac_objext" 104053e90a53Smrg # Insert the option either (1) after the last *FLAGS variable, or 104153e90a53Smrg # (2) before a word containing "conftest.", or (3) at the end. 104253e90a53Smrg # Note that $ac_compile itself does not contain backslashes and begins 104353e90a53Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 104453e90a53Smrg lt_compile=`echo "$ac_compile" | $SED \ 104553e90a53Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 104653e90a53Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 104753e90a53Smrg -e 's:$: $lt_compiler_flag:'` 104853e90a53Smrg (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 104953e90a53Smrg (eval "$lt_compile" 2>out/conftest.err) 105053e90a53Smrg ac_status=$? 105153e90a53Smrg cat out/conftest.err >&AS_MESSAGE_LOG_FD 105253e90a53Smrg echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 105353e90a53Smrg if (exit $ac_status) && test -s out/conftest2.$ac_objext 105453e90a53Smrg then 105553e90a53Smrg # The compiler can only warn and ignore the option if not recognized 105653e90a53Smrg # So say no if there are warnings 105753e90a53Smrg $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp 105853e90a53Smrg $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 105953e90a53Smrg if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 106053e90a53Smrg _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 106153e90a53Smrg fi 106253e90a53Smrg fi 106353e90a53Smrg chmod u+w . 2>&AS_MESSAGE_LOG_FD 106453e90a53Smrg $rm conftest* 106553e90a53Smrg # SGI C++ compiler will create directory out/ii_files/ for 106653e90a53Smrg # template instantiation 106753e90a53Smrg test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files 106853e90a53Smrg $rm out/* && rmdir out 106953e90a53Smrg cd .. 107053e90a53Smrg rmdir conftest 107153e90a53Smrg $rm conftest* 107253e90a53Smrg]) 107353e90a53Smrg])# AC_LIBTOOL_PROG_CC_C_O 107453e90a53Smrg 107553e90a53Smrg 107653e90a53Smrg# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME]) 107753e90a53Smrg# ----------------------------------------- 107853e90a53Smrg# Check to see if we can do hard links to lock some files if needed 107953e90a53SmrgAC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], 108053e90a53Smrg[AC_REQUIRE([_LT_AC_LOCK])dnl 108153e90a53Smrg 108253e90a53Smrghard_links="nottested" 108353e90a53Smrgif test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then 108453e90a53Smrg # do not overwrite the value of need_locks provided by the user 108553e90a53Smrg AC_MSG_CHECKING([if we can lock with hard links]) 108653e90a53Smrg hard_links=yes 108753e90a53Smrg $rm conftest* 108853e90a53Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 108953e90a53Smrg touch conftest.a 109053e90a53Smrg ln conftest.a conftest.b 2>&5 || hard_links=no 109153e90a53Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 109253e90a53Smrg AC_MSG_RESULT([$hard_links]) 109353e90a53Smrg if test "$hard_links" = no; then 109453e90a53Smrg AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) 109553e90a53Smrg need_locks=warn 109653e90a53Smrg fi 109753e90a53Smrgelse 109853e90a53Smrg need_locks=no 109953e90a53Smrgfi 110053e90a53Smrg])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS 110153e90a53Smrg 110253e90a53Smrg 110353e90a53Smrg# AC_LIBTOOL_OBJDIR 110453e90a53Smrg# ----------------- 110553e90a53SmrgAC_DEFUN([AC_LIBTOOL_OBJDIR], 110653e90a53Smrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 110753e90a53Smrg[rm -f .libs 2>/dev/null 110853e90a53Smrgmkdir .libs 2>/dev/null 110953e90a53Smrgif test -d .libs; then 111053e90a53Smrg lt_cv_objdir=.libs 111153e90a53Smrgelse 111253e90a53Smrg # MS-DOS does not allow filenames that begin with a dot. 111353e90a53Smrg lt_cv_objdir=_libs 111453e90a53Smrgfi 111553e90a53Smrgrmdir .libs 2>/dev/null]) 111653e90a53Smrgobjdir=$lt_cv_objdir 111753e90a53Smrg])# AC_LIBTOOL_OBJDIR 111853e90a53Smrg 111953e90a53Smrg 112053e90a53Smrg# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME]) 112153e90a53Smrg# ---------------------------------------------- 112253e90a53Smrg# Check hardcoding attributes. 112353e90a53SmrgAC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], 112453e90a53Smrg[AC_MSG_CHECKING([how to hardcode library paths into programs]) 112553e90a53Smrg_LT_AC_TAGVAR(hardcode_action, $1)= 112653e90a53Smrgif test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \ 112753e90a53Smrg test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \ 112853e90a53Smrg test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then 112953e90a53Smrg 113053e90a53Smrg # We can hardcode non-existant directories. 113153e90a53Smrg if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no && 113253e90a53Smrg # If the only mechanism to avoid hardcoding is shlibpath_var, we 113353e90a53Smrg # have to relink, otherwise we might link with an installed library 113453e90a53Smrg # when we should be linking with a yet-to-be-installed one 113553e90a53Smrg ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no && 113653e90a53Smrg test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then 113753e90a53Smrg # Linking always hardcodes the temporary library directory. 113853e90a53Smrg _LT_AC_TAGVAR(hardcode_action, $1)=relink 113953e90a53Smrg else 114053e90a53Smrg # We can link without hardcoding, and we can hardcode nonexisting dirs. 114153e90a53Smrg _LT_AC_TAGVAR(hardcode_action, $1)=immediate 114253e90a53Smrg fi 114353e90a53Smrgelse 114453e90a53Smrg # We cannot hardcode anything, or else we can only hardcode existing 114553e90a53Smrg # directories. 114653e90a53Smrg _LT_AC_TAGVAR(hardcode_action, $1)=unsupported 114753e90a53Smrgfi 114853e90a53SmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)]) 114953e90a53Smrg 115053e90a53Smrgif test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then 115153e90a53Smrg # Fast installation is not supported 115253e90a53Smrg enable_fast_install=no 115353e90a53Smrgelif test "$shlibpath_overrides_runpath" = yes || 115453e90a53Smrg test "$enable_shared" = no; then 115553e90a53Smrg # Fast installation is not necessary 115653e90a53Smrg enable_fast_install=needless 115753e90a53Smrgfi 115853e90a53Smrg])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH 115953e90a53Smrg 116053e90a53Smrg 116153e90a53Smrg# AC_LIBTOOL_SYS_LIB_STRIP 116253e90a53Smrg# ------------------------ 116353e90a53SmrgAC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP], 116453e90a53Smrg[striplib= 116553e90a53Smrgold_striplib= 116653e90a53SmrgAC_MSG_CHECKING([whether stripping libraries is possible]) 116753e90a53Smrgif test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then 116853e90a53Smrg test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" 116953e90a53Smrg test -z "$striplib" && striplib="$STRIP --strip-unneeded" 117053e90a53Smrg AC_MSG_RESULT([yes]) 117153e90a53Smrgelse 117253e90a53Smrg# FIXME - insert some real tests, host_os isn't really good enough 117353e90a53Smrg case $host_os in 117453e90a53Smrg darwin*) 117553e90a53Smrg if test -n "$STRIP" ; then 117653e90a53Smrg striplib="$STRIP -x" 117753e90a53Smrg AC_MSG_RESULT([yes]) 117853e90a53Smrg else 117953e90a53Smrg AC_MSG_RESULT([no]) 118053e90a53Smrgfi 118153e90a53Smrg ;; 118253e90a53Smrg *) 118353e90a53Smrg AC_MSG_RESULT([no]) 118453e90a53Smrg ;; 118553e90a53Smrg esac 118653e90a53Smrgfi 118753e90a53Smrg])# AC_LIBTOOL_SYS_LIB_STRIP 118853e90a53Smrg 118953e90a53Smrg 119053e90a53Smrg# AC_LIBTOOL_SYS_DYNAMIC_LINKER 119153e90a53Smrg# ----------------------------- 119253e90a53Smrg# PORTME Fill in your ld.so characteristics 119353e90a53SmrgAC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER], 119453e90a53Smrg[AC_MSG_CHECKING([dynamic linker characteristics]) 119553e90a53Smrglibrary_names_spec= 119653e90a53Smrglibname_spec='lib$name' 119753e90a53Smrgsoname_spec= 119853e90a53Smrgshrext_cmds=".so" 119953e90a53Smrgpostinstall_cmds= 120053e90a53Smrgpostuninstall_cmds= 120153e90a53Smrgfinish_cmds= 120253e90a53Smrgfinish_eval= 120353e90a53Smrgshlibpath_var= 120453e90a53Smrgshlibpath_overrides_runpath=unknown 120553e90a53Smrgversion_type=none 120653e90a53Smrgdynamic_linker="$host_os ld.so" 120753e90a53Smrgsys_lib_dlsearch_path_spec="/lib /usr/lib" 120853e90a53Smrgif test "$GCC" = yes; then 120953e90a53Smrg sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` 121053e90a53Smrg if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then 121153e90a53Smrg # if the path contains ";" then we assume it to be the separator 121253e90a53Smrg # otherwise default to the standard path separator (i.e. ":") - it is 121353e90a53Smrg # assumed that no part of a normal pathname contains ";" but that should 121453e90a53Smrg # okay in the real world where ";" in dirpaths is itself problematic. 121553e90a53Smrg sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 121653e90a53Smrg else 121753e90a53Smrg sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 121853e90a53Smrg fi 121953e90a53Smrgelse 122053e90a53Smrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 122153e90a53Smrgfi 122253e90a53Smrgneed_lib_prefix=unknown 122353e90a53Smrghardcode_into_libs=no 122453e90a53Smrg 122553e90a53Smrg# when you set need_version to no, make sure it does not cause -set_version 122653e90a53Smrg# flags to be left without arguments 122753e90a53Smrgneed_version=unknown 122853e90a53Smrg 122953e90a53Smrgcase $host_os in 123053e90a53Smrgaix3*) 123153e90a53Smrg version_type=linux 123253e90a53Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' 123353e90a53Smrg shlibpath_var=LIBPATH 123453e90a53Smrg 123553e90a53Smrg # AIX 3 has no versioning support, so we append a major version to the name. 123653e90a53Smrg soname_spec='${libname}${release}${shared_ext}$major' 123753e90a53Smrg ;; 123853e90a53Smrg 123953e90a53Smrgaix4* | aix5*) 124053e90a53Smrg version_type=linux 124153e90a53Smrg need_lib_prefix=no 124253e90a53Smrg need_version=no 124353e90a53Smrg hardcode_into_libs=yes 124453e90a53Smrg if test "$host_cpu" = ia64; then 124553e90a53Smrg # AIX 5 supports IA64 124653e90a53Smrg library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' 124753e90a53Smrg shlibpath_var=LD_LIBRARY_PATH 124853e90a53Smrg else 124953e90a53Smrg # With GCC up to 2.95.x, collect2 would create an import file 125053e90a53Smrg # for dependence libraries. The import file would start with 125153e90a53Smrg # the line `#! .'. This would cause the generated library to 125253e90a53Smrg # depend on `.', always an invalid library. This was fixed in 125353e90a53Smrg # development snapshots of GCC prior to 3.0. 125453e90a53Smrg case $host_os in 125553e90a53Smrg aix4 | aix4.[[01]] | aix4.[[01]].*) 125653e90a53Smrg if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 125753e90a53Smrg echo ' yes ' 125853e90a53Smrg echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then 125953e90a53Smrg : 126053e90a53Smrg else 126153e90a53Smrg can_build_shared=no 126253e90a53Smrg fi 126353e90a53Smrg ;; 126453e90a53Smrg esac 126553e90a53Smrg # AIX (on Power*) has no versioning support, so currently we can not hardcode correct 126653e90a53Smrg # soname into executable. Probably we can add versioning support to 126753e90a53Smrg # collect2, so additional links can be useful in future. 126853e90a53Smrg if test "$aix_use_runtimelinking" = yes; then 126953e90a53Smrg # If using run time linking (on AIX 4.2 or later) use lib<name>.so 127053e90a53Smrg # instead of lib<name>.a to let people know that these are not 127153e90a53Smrg # typical AIX shared libraries. 127253e90a53Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 127353e90a53Smrg else 127453e90a53Smrg # We preserve .a as extension for shared libraries through AIX4.2 127553e90a53Smrg # and later when we are not doing run time linking. 127653e90a53Smrg library_names_spec='${libname}${release}.a $libname.a' 127753e90a53Smrg soname_spec='${libname}${release}${shared_ext}$major' 127853e90a53Smrg fi 127953e90a53Smrg shlibpath_var=LIBPATH 128053e90a53Smrg fi 128153e90a53Smrg ;; 128253e90a53Smrg 128353e90a53Smrgamigaos*) 128453e90a53Smrg library_names_spec='$libname.ixlibrary $libname.a' 128553e90a53Smrg # Create ${libname}_ixlibrary.a entries in /sys/libs. 128653e90a53Smrg 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' 128753e90a53Smrg ;; 128853e90a53Smrg 128953e90a53Smrgbeos*) 129053e90a53Smrg library_names_spec='${libname}${shared_ext}' 129153e90a53Smrg dynamic_linker="$host_os ld.so" 129253e90a53Smrg shlibpath_var=LIBRARY_PATH 129353e90a53Smrg ;; 129453e90a53Smrg 129553e90a53Smrgbsdi[[45]]*) 129653e90a53Smrg version_type=linux 129753e90a53Smrg need_version=no 129853e90a53Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 129953e90a53Smrg soname_spec='${libname}${release}${shared_ext}$major' 130053e90a53Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 130153e90a53Smrg shlibpath_var=LD_LIBRARY_PATH 130253e90a53Smrg sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 130353e90a53Smrg sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 130453e90a53Smrg # the default ld.so.conf also contains /usr/contrib/lib and 130553e90a53Smrg # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 130653e90a53Smrg # libtool to hard-code these into programs 130753e90a53Smrg ;; 130853e90a53Smrg 130953e90a53Smrgcygwin* | mingw* | pw32*) 131053e90a53Smrg version_type=windows 131153e90a53Smrg shrext_cmds=".dll" 131253e90a53Smrg need_version=no 131353e90a53Smrg need_lib_prefix=no 131453e90a53Smrg 131553e90a53Smrg case $GCC,$host_os in 131653e90a53Smrg yes,cygwin* | yes,mingw* | yes,pw32*) 131753e90a53Smrg library_names_spec='$libname.dll.a' 131853e90a53Smrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 131953e90a53Smrg postinstall_cmds='base_file=`basename \${file}`~ 132053e90a53Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ 132153e90a53Smrg dldir=$destdir/`dirname \$dlpath`~ 132253e90a53Smrg test -d \$dldir || mkdir -p \$dldir~ 132353e90a53Smrg $install_prog $dir/$dlname \$dldir/$dlname~ 132453e90a53Smrg chmod a+x \$dldir/$dlname' 132553e90a53Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 132653e90a53Smrg dlpath=$dir/\$dldll~ 132753e90a53Smrg $rm \$dlpath' 132853e90a53Smrg shlibpath_overrides_runpath=yes 132953e90a53Smrg 133053e90a53Smrg case $host_os in 133153e90a53Smrg cygwin*) 133253e90a53Smrg # Cygwin DLLs use 'cyg' prefix rather than 'lib' 133353e90a53Smrg soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 133453e90a53Smrg sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" 133553e90a53Smrg ;; 133653e90a53Smrg mingw*) 133753e90a53Smrg # MinGW DLLs use traditional 'lib' prefix 133853e90a53Smrg soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 133953e90a53Smrg sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` 134053e90a53Smrg if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then 134153e90a53Smrg # It is most probably a Windows format PATH printed by 134253e90a53Smrg # mingw gcc, but we are running on Cygwin. Gcc prints its search 134353e90a53Smrg # path with ; separators, and with drive letters. We can handle the 134453e90a53Smrg # drive letters (cygwin fileutils understands them), so leave them, 134553e90a53Smrg # especially as we might pass files found there to a mingw objdump, 134653e90a53Smrg # which wouldn't understand a cygwinified path. Ahh. 134753e90a53Smrg sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 134853e90a53Smrg else 134953e90a53Smrg sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 135053e90a53Smrg fi 135153e90a53Smrg ;; 135253e90a53Smrg pw32*) 135353e90a53Smrg # pw32 DLLs use 'pw' prefix rather than 'lib' 135453e90a53Smrg library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 135553e90a53Smrg ;; 135653e90a53Smrg esac 135753e90a53Smrg ;; 135853e90a53Smrg 135953e90a53Smrg *) 136053e90a53Smrg library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' 136153e90a53Smrg ;; 136253e90a53Smrg esac 136353e90a53Smrg dynamic_linker='Win32 ld.exe' 136453e90a53Smrg # FIXME: first we should search . and the directory the executable is in 136553e90a53Smrg shlibpath_var=PATH 136653e90a53Smrg ;; 136753e90a53Smrg 136853e90a53Smrgdarwin* | rhapsody*) 136953e90a53Smrg dynamic_linker="$host_os dyld" 137053e90a53Smrg version_type=darwin 137153e90a53Smrg need_lib_prefix=no 137253e90a53Smrg need_version=no 137353e90a53Smrg library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' 137453e90a53Smrg soname_spec='${libname}${release}${major}$shared_ext' 137553e90a53Smrg shlibpath_overrides_runpath=yes 137653e90a53Smrg shlibpath_var=DYLD_LIBRARY_PATH 137753e90a53Smrg shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 137853e90a53Smrg # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. 137953e90a53Smrg if test "$GCC" = yes; then 138053e90a53Smrg 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"` 138153e90a53Smrg else 138253e90a53Smrg sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' 138353e90a53Smrg fi 138453e90a53Smrg sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 138553e90a53Smrg ;; 138653e90a53Smrg 138753e90a53Smrgdgux*) 138853e90a53Smrg version_type=linux 138953e90a53Smrg need_lib_prefix=no 139053e90a53Smrg need_version=no 139153e90a53Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' 139253e90a53Smrg soname_spec='${libname}${release}${shared_ext}$major' 139353e90a53Smrg shlibpath_var=LD_LIBRARY_PATH 139453e90a53Smrg ;; 139553e90a53Smrg 139653e90a53Smrgfreebsd1*) 139753e90a53Smrg dynamic_linker=no 139853e90a53Smrg ;; 139953e90a53Smrg 140053e90a53Smrgkfreebsd*-gnu) 140153e90a53Smrg version_type=linux 140253e90a53Smrg need_lib_prefix=no 140353e90a53Smrg need_version=no 140453e90a53Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 140553e90a53Smrg soname_spec='${libname}${release}${shared_ext}$major' 140653e90a53Smrg shlibpath_var=LD_LIBRARY_PATH 140753e90a53Smrg shlibpath_overrides_runpath=no 140853e90a53Smrg hardcode_into_libs=yes 140953e90a53Smrg dynamic_linker='GNU ld.so' 141053e90a53Smrg ;; 141153e90a53Smrg 141253e90a53Smrgfreebsd* | dragonfly*) 141353e90a53Smrg # DragonFly does not have aout. When/if they implement a new 141453e90a53Smrg # versioning mechanism, adjust this. 141553e90a53Smrg if test -x /usr/bin/objformat; then 141653e90a53Smrg objformat=`/usr/bin/objformat` 141753e90a53Smrg else 141853e90a53Smrg case $host_os in 141953e90a53Smrg freebsd[[123]]*) objformat=aout ;; 142053e90a53Smrg *) objformat=elf ;; 142153e90a53Smrg esac 142253e90a53Smrg fi 142353e90a53Smrg version_type=freebsd-$objformat 142453e90a53Smrg case $version_type in 142553e90a53Smrg freebsd-elf*) 142653e90a53Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 142753e90a53Smrg need_version=no 142853e90a53Smrg need_lib_prefix=no 142953e90a53Smrg ;; 143053e90a53Smrg freebsd-*) 143153e90a53Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' 143253e90a53Smrg need_version=yes 143353e90a53Smrg ;; 143453e90a53Smrg esac 143553e90a53Smrg shlibpath_var=LD_LIBRARY_PATH 143653e90a53Smrg case $host_os in 143753e90a53Smrg freebsd2*) 143853e90a53Smrg shlibpath_overrides_runpath=yes 143953e90a53Smrg ;; 144053e90a53Smrg freebsd3.[[01]]* | freebsdelf3.[[01]]*) 144153e90a53Smrg shlibpath_overrides_runpath=yes 144253e90a53Smrg hardcode_into_libs=yes 144353e90a53Smrg ;; 144453e90a53Smrg freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 144553e90a53Smrg freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 144653e90a53Smrg shlibpath_overrides_runpath=no 144753e90a53Smrg hardcode_into_libs=yes 144853e90a53Smrg ;; 144953e90a53Smrg freebsd*) # from 4.6 on 145053e90a53Smrg shlibpath_overrides_runpath=yes 145153e90a53Smrg hardcode_into_libs=yes 145253e90a53Smrg ;; 145353e90a53Smrg esac 145453e90a53Smrg ;; 145553e90a53Smrg 145653e90a53Smrggnu*) 145753e90a53Smrg version_type=linux 145853e90a53Smrg need_lib_prefix=no 145953e90a53Smrg need_version=no 146053e90a53Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 146153e90a53Smrg soname_spec='${libname}${release}${shared_ext}$major' 146253e90a53Smrg shlibpath_var=LD_LIBRARY_PATH 146353e90a53Smrg hardcode_into_libs=yes 146453e90a53Smrg ;; 146553e90a53Smrg 146653e90a53Smrghpux9* | hpux10* | hpux11*) 146753e90a53Smrg # Give a soname corresponding to the major version so that dld.sl refuses to 146853e90a53Smrg # link against other versions. 146953e90a53Smrg version_type=sunos 147053e90a53Smrg need_lib_prefix=no 147153e90a53Smrg need_version=no 147253e90a53Smrg case $host_cpu in 147353e90a53Smrg ia64*) 147453e90a53Smrg shrext_cmds='.so' 147553e90a53Smrg hardcode_into_libs=yes 147653e90a53Smrg dynamic_linker="$host_os dld.so" 147753e90a53Smrg shlibpath_var=LD_LIBRARY_PATH 147853e90a53Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 147953e90a53Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 148053e90a53Smrg soname_spec='${libname}${release}${shared_ext}$major' 148153e90a53Smrg if test "X$HPUX_IA64_MODE" = X32; then 148253e90a53Smrg sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 148353e90a53Smrg else 148453e90a53Smrg sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 148553e90a53Smrg fi 148653e90a53Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 148753e90a53Smrg ;; 148853e90a53Smrg hppa*64*) 148953e90a53Smrg shrext_cmds='.sl' 149053e90a53Smrg hardcode_into_libs=yes 149153e90a53Smrg dynamic_linker="$host_os dld.sl" 149253e90a53Smrg shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 149353e90a53Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 149453e90a53Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 149553e90a53Smrg soname_spec='${libname}${release}${shared_ext}$major' 149653e90a53Smrg sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 149753e90a53Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 149853e90a53Smrg ;; 149953e90a53Smrg *) 150053e90a53Smrg shrext_cmds='.sl' 150153e90a53Smrg dynamic_linker="$host_os dld.sl" 150253e90a53Smrg shlibpath_var=SHLIB_PATH 150353e90a53Smrg shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 150453e90a53Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 150553e90a53Smrg soname_spec='${libname}${release}${shared_ext}$major' 150653e90a53Smrg ;; 150753e90a53Smrg esac 150853e90a53Smrg # HP-UX runs *really* slowly unless shared libraries are mode 555. 150953e90a53Smrg postinstall_cmds='chmod 555 $lib' 151053e90a53Smrg ;; 151153e90a53Smrg 151253e90a53Smrginterix3*) 151353e90a53Smrg version_type=linux 151453e90a53Smrg need_lib_prefix=no 151553e90a53Smrg need_version=no 151653e90a53Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 151753e90a53Smrg soname_spec='${libname}${release}${shared_ext}$major' 151853e90a53Smrg dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 151953e90a53Smrg shlibpath_var=LD_LIBRARY_PATH 152053e90a53Smrg shlibpath_overrides_runpath=no 152153e90a53Smrg hardcode_into_libs=yes 152253e90a53Smrg ;; 152353e90a53Smrg 152453e90a53Smrgirix5* | irix6* | nonstopux*) 152553e90a53Smrg case $host_os in 152653e90a53Smrg nonstopux*) version_type=nonstopux ;; 152753e90a53Smrg *) 152853e90a53Smrg if test "$lt_cv_prog_gnu_ld" = yes; then 152953e90a53Smrg version_type=linux 153053e90a53Smrg else 153153e90a53Smrg version_type=irix 153253e90a53Smrg fi ;; 153353e90a53Smrg esac 153453e90a53Smrg need_lib_prefix=no 153553e90a53Smrg need_version=no 153653e90a53Smrg soname_spec='${libname}${release}${shared_ext}$major' 153753e90a53Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' 153853e90a53Smrg case $host_os in 153953e90a53Smrg irix5* | nonstopux*) 154053e90a53Smrg libsuff= shlibsuff= 154153e90a53Smrg ;; 154253e90a53Smrg *) 154353e90a53Smrg case $LD in # libtool.m4 will add one of these switches to LD 154453e90a53Smrg *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 154553e90a53Smrg libsuff= shlibsuff= libmagic=32-bit;; 154653e90a53Smrg *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 154753e90a53Smrg libsuff=32 shlibsuff=N32 libmagic=N32;; 154853e90a53Smrg *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 154953e90a53Smrg libsuff=64 shlibsuff=64 libmagic=64-bit;; 155053e90a53Smrg *) libsuff= shlibsuff= libmagic=never-match;; 155153e90a53Smrg esac 155253e90a53Smrg ;; 155353e90a53Smrg esac 155453e90a53Smrg shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 155553e90a53Smrg shlibpath_overrides_runpath=no 155653e90a53Smrg sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" 155753e90a53Smrg sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" 155853e90a53Smrg hardcode_into_libs=yes 155953e90a53Smrg ;; 156053e90a53Smrg 156153e90a53Smrg# No shared lib support for Linux oldld, aout, or coff. 156253e90a53Smrglinux*oldld* | linux*aout* | linux*coff*) 156353e90a53Smrg dynamic_linker=no 156453e90a53Smrg ;; 156553e90a53Smrg 156653e90a53Smrg# This must be Linux ELF. 156753e90a53Smrglinux*) 156853e90a53Smrg version_type=linux 156953e90a53Smrg need_lib_prefix=no 157053e90a53Smrg need_version=no 157153e90a53Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 157253e90a53Smrg soname_spec='${libname}${release}${shared_ext}$major' 157353e90a53Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 157453e90a53Smrg shlibpath_var=LD_LIBRARY_PATH 157553e90a53Smrg shlibpath_overrides_runpath=no 157653e90a53Smrg # This implies no fast_install, which is unacceptable. 157753e90a53Smrg # Some rework will be needed to allow for fast_install 157853e90a53Smrg # before this can be enabled. 157953e90a53Smrg hardcode_into_libs=yes 158053e90a53Smrg 158153e90a53Smrg # find out which ABI we are using 158253e90a53Smrg libsuff= 158353e90a53Smrg case "$host_cpu" in 158453e90a53Smrg x86_64*|s390x*|powerpc64*) 158553e90a53Smrg echo '[#]line __oline__ "configure"' > conftest.$ac_ext 158653e90a53Smrg if AC_TRY_EVAL(ac_compile); then 158753e90a53Smrg case `/usr/bin/file conftest.$ac_objext` in 158853e90a53Smrg *64-bit*) 158953e90a53Smrg libsuff=64 159053e90a53Smrg sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}" 159153e90a53Smrg ;; 159253e90a53Smrg esac 159353e90a53Smrg fi 159453e90a53Smrg rm -rf conftest* 159553e90a53Smrg ;; 159653e90a53Smrg esac 159753e90a53Smrg 159853e90a53Smrg # Append ld.so.conf contents to the search path 159953e90a53Smrg if test -f /etc/ld.so.conf; then 160053e90a53Smrg 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' ' '` 160153e90a53Smrg sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra" 160253e90a53Smrg fi 160353e90a53Smrg 160453e90a53Smrg # We used to test for /lib/ld.so.1 and disable shared libraries on 160553e90a53Smrg # powerpc, because MkLinux only supported shared libraries with the 160653e90a53Smrg # GNU dynamic linker. Since this was broken with cross compilers, 160753e90a53Smrg # most powerpc-linux boxes support dynamic linking these days and 160853e90a53Smrg # people can always --disable-shared, the test was removed, and we 160953e90a53Smrg # assume the GNU/Linux dynamic linker is in use. 161053e90a53Smrg dynamic_linker='GNU/Linux ld.so' 161153e90a53Smrg ;; 161253e90a53Smrg 161353e90a53Smrgknetbsd*-gnu) 161453e90a53Smrg version_type=linux 161553e90a53Smrg need_lib_prefix=no 161653e90a53Smrg need_version=no 161753e90a53Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 161853e90a53Smrg soname_spec='${libname}${release}${shared_ext}$major' 161953e90a53Smrg shlibpath_var=LD_LIBRARY_PATH 162053e90a53Smrg shlibpath_overrides_runpath=no 162153e90a53Smrg hardcode_into_libs=yes 162253e90a53Smrg dynamic_linker='GNU ld.so' 162353e90a53Smrg ;; 162453e90a53Smrg 162553e90a53Smrgnetbsd*) 162653e90a53Smrg version_type=sunos 162753e90a53Smrg need_lib_prefix=no 162853e90a53Smrg need_version=no 162953e90a53Smrg if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then 163053e90a53Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 163153e90a53Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 163253e90a53Smrg dynamic_linker='NetBSD (a.out) ld.so' 163353e90a53Smrg else 163453e90a53Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 163553e90a53Smrg soname_spec='${libname}${release}${shared_ext}$major' 163653e90a53Smrg dynamic_linker='NetBSD ld.elf_so' 163753e90a53Smrg fi 163853e90a53Smrg shlibpath_var=LD_LIBRARY_PATH 163953e90a53Smrg shlibpath_overrides_runpath=yes 164053e90a53Smrg hardcode_into_libs=yes 164153e90a53Smrg ;; 164253e90a53Smrg 164353e90a53Smrgnewsos6) 164453e90a53Smrg version_type=linux 164553e90a53Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 164653e90a53Smrg shlibpath_var=LD_LIBRARY_PATH 164753e90a53Smrg shlibpath_overrides_runpath=yes 164853e90a53Smrg ;; 164953e90a53Smrg 165053e90a53Smrgnto-qnx*) 165153e90a53Smrg version_type=linux 165253e90a53Smrg need_lib_prefix=no 165353e90a53Smrg need_version=no 165453e90a53Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 165553e90a53Smrg soname_spec='${libname}${release}${shared_ext}$major' 165653e90a53Smrg shlibpath_var=LD_LIBRARY_PATH 165753e90a53Smrg shlibpath_overrides_runpath=yes 165853e90a53Smrg ;; 165953e90a53Smrg 166053e90a53Smrgopenbsd*) 166153e90a53Smrg version_type=sunos 166253e90a53Smrg sys_lib_dlsearch_path_spec="/usr/lib" 166353e90a53Smrg need_lib_prefix=no 166453e90a53Smrg # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. 166553e90a53Smrg case $host_os in 166653e90a53Smrg openbsd3.3 | openbsd3.3.*) need_version=yes ;; 166753e90a53Smrg *) need_version=no ;; 166853e90a53Smrg esac 166953e90a53Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 167053e90a53Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 167153e90a53Smrg shlibpath_var=LD_LIBRARY_PATH 167253e90a53Smrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 167353e90a53Smrg case $host_os in 167453e90a53Smrg openbsd2.[[89]] | openbsd2.[[89]].*) 167553e90a53Smrg shlibpath_overrides_runpath=no 167653e90a53Smrg ;; 167753e90a53Smrg *) 167853e90a53Smrg shlibpath_overrides_runpath=yes 167953e90a53Smrg ;; 168053e90a53Smrg esac 168153e90a53Smrg else 168253e90a53Smrg shlibpath_overrides_runpath=yes 168353e90a53Smrg fi 168453e90a53Smrg ;; 168553e90a53Smrg 168653e90a53Smrgos2*) 168753e90a53Smrg libname_spec='$name' 168853e90a53Smrg shrext_cmds=".dll" 168953e90a53Smrg need_lib_prefix=no 169053e90a53Smrg library_names_spec='$libname${shared_ext} $libname.a' 169153e90a53Smrg dynamic_linker='OS/2 ld.exe' 169253e90a53Smrg shlibpath_var=LIBPATH 169353e90a53Smrg ;; 169453e90a53Smrg 169553e90a53Smrgosf3* | osf4* | osf5*) 169653e90a53Smrg version_type=osf 169753e90a53Smrg need_lib_prefix=no 169853e90a53Smrg need_version=no 169953e90a53Smrg soname_spec='${libname}${release}${shared_ext}$major' 170053e90a53Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 170153e90a53Smrg shlibpath_var=LD_LIBRARY_PATH 170253e90a53Smrg sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 170353e90a53Smrg sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" 170453e90a53Smrg ;; 170553e90a53Smrg 170653e90a53Smrgsolaris*) 170753e90a53Smrg version_type=linux 170853e90a53Smrg need_lib_prefix=no 170953e90a53Smrg need_version=no 171053e90a53Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 171153e90a53Smrg soname_spec='${libname}${release}${shared_ext}$major' 171253e90a53Smrg shlibpath_var=LD_LIBRARY_PATH 171353e90a53Smrg shlibpath_overrides_runpath=yes 171453e90a53Smrg hardcode_into_libs=yes 171553e90a53Smrg # ldd complains unless libraries are executable 171653e90a53Smrg postinstall_cmds='chmod +x $lib' 171753e90a53Smrg ;; 171853e90a53Smrg 171953e90a53Smrgsunos4*) 172053e90a53Smrg version_type=sunos 172153e90a53Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 172253e90a53Smrg finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 172353e90a53Smrg shlibpath_var=LD_LIBRARY_PATH 172453e90a53Smrg shlibpath_overrides_runpath=yes 172553e90a53Smrg if test "$with_gnu_ld" = yes; then 172653e90a53Smrg need_lib_prefix=no 172753e90a53Smrg fi 172853e90a53Smrg need_version=yes 172953e90a53Smrg ;; 173053e90a53Smrg 173153e90a53Smrgsysv4 | sysv4.3*) 173253e90a53Smrg version_type=linux 173353e90a53Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 173453e90a53Smrg soname_spec='${libname}${release}${shared_ext}$major' 173553e90a53Smrg shlibpath_var=LD_LIBRARY_PATH 173653e90a53Smrg case $host_vendor in 173753e90a53Smrg sni) 173853e90a53Smrg shlibpath_overrides_runpath=no 173953e90a53Smrg need_lib_prefix=no 174053e90a53Smrg export_dynamic_flag_spec='${wl}-Blargedynsym' 174153e90a53Smrg runpath_var=LD_RUN_PATH 174253e90a53Smrg ;; 174353e90a53Smrg siemens) 174453e90a53Smrg need_lib_prefix=no 174553e90a53Smrg ;; 174653e90a53Smrg motorola) 174753e90a53Smrg need_lib_prefix=no 174853e90a53Smrg need_version=no 174953e90a53Smrg shlibpath_overrides_runpath=no 175053e90a53Smrg sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 175153e90a53Smrg ;; 175253e90a53Smrg esac 175353e90a53Smrg ;; 175453e90a53Smrg 175553e90a53Smrgsysv4*MP*) 175653e90a53Smrg if test -d /usr/nec ;then 175753e90a53Smrg version_type=linux 175853e90a53Smrg library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' 175953e90a53Smrg soname_spec='$libname${shared_ext}.$major' 176053e90a53Smrg shlibpath_var=LD_LIBRARY_PATH 176153e90a53Smrg fi 176253e90a53Smrg ;; 176353e90a53Smrg 176453e90a53Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 176553e90a53Smrg version_type=freebsd-elf 176653e90a53Smrg need_lib_prefix=no 176753e90a53Smrg need_version=no 176853e90a53Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 176953e90a53Smrg soname_spec='${libname}${release}${shared_ext}$major' 177053e90a53Smrg shlibpath_var=LD_LIBRARY_PATH 177153e90a53Smrg hardcode_into_libs=yes 177253e90a53Smrg if test "$with_gnu_ld" = yes; then 177353e90a53Smrg sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 177453e90a53Smrg shlibpath_overrides_runpath=no 177553e90a53Smrg else 177653e90a53Smrg sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 177753e90a53Smrg shlibpath_overrides_runpath=yes 177853e90a53Smrg case $host_os in 177953e90a53Smrg sco3.2v5*) 178053e90a53Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 178153e90a53Smrg ;; 178253e90a53Smrg esac 178353e90a53Smrg fi 178453e90a53Smrg sys_lib_dlsearch_path_spec='/usr/lib' 178553e90a53Smrg ;; 178653e90a53Smrg 178753e90a53Smrguts4*) 178853e90a53Smrg version_type=linux 178953e90a53Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 179053e90a53Smrg soname_spec='${libname}${release}${shared_ext}$major' 179153e90a53Smrg shlibpath_var=LD_LIBRARY_PATH 179253e90a53Smrg ;; 179353e90a53Smrg 179453e90a53Smrg*) 179553e90a53Smrg dynamic_linker=no 179653e90a53Smrg ;; 179753e90a53Smrgesac 179853e90a53SmrgAC_MSG_RESULT([$dynamic_linker]) 179953e90a53Smrgtest "$dynamic_linker" = no && can_build_shared=no 180053e90a53Smrg 180153e90a53Smrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var" 180253e90a53Smrgif test "$GCC" = yes; then 180353e90a53Smrg variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 180453e90a53Smrgfi 180553e90a53Smrg])# AC_LIBTOOL_SYS_DYNAMIC_LINKER 180653e90a53Smrg 180753e90a53Smrg 180853e90a53Smrg# _LT_AC_TAGCONFIG 180953e90a53Smrg# ---------------- 181053e90a53SmrgAC_DEFUN([_LT_AC_TAGCONFIG], 181153e90a53Smrg[AC_ARG_WITH([tags], 181253e90a53Smrg [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@], 181353e90a53Smrg [include additional configurations @<:@automatic@:>@])], 181453e90a53Smrg [tagnames="$withval"]) 181553e90a53Smrg 181653e90a53Smrgif test -f "$ltmain" && test -n "$tagnames"; then 181753e90a53Smrg if test ! -f "${ofile}"; then 181853e90a53Smrg AC_MSG_WARN([output file `$ofile' does not exist]) 181953e90a53Smrg fi 182053e90a53Smrg 182153e90a53Smrg if test -z "$LTCC"; then 182253e90a53Smrg eval "`$SHELL ${ofile} --config | grep '^LTCC='`" 182353e90a53Smrg if test -z "$LTCC"; then 182453e90a53Smrg AC_MSG_WARN([output file `$ofile' does not look like a libtool script]) 182553e90a53Smrg else 182653e90a53Smrg AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile']) 182753e90a53Smrg fi 182853e90a53Smrg fi 182953e90a53Smrg if test -z "$LTCFLAGS"; then 183053e90a53Smrg eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`" 183153e90a53Smrg fi 183253e90a53Smrg 183353e90a53Smrg # Extract list of available tagged configurations in $ofile. 183453e90a53Smrg # Note that this assumes the entire list is on one line. 183553e90a53Smrg available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` 183653e90a53Smrg 183753e90a53Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 183853e90a53Smrg for tagname in $tagnames; do 183953e90a53Smrg IFS="$lt_save_ifs" 184053e90a53Smrg # Check whether tagname contains only valid characters 184153e90a53Smrg case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in 184253e90a53Smrg "") ;; 184353e90a53Smrg *) AC_MSG_ERROR([invalid tag name: $tagname]) 184453e90a53Smrg ;; 184553e90a53Smrg esac 184653e90a53Smrg 184753e90a53Smrg if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null 184853e90a53Smrg then 184953e90a53Smrg AC_MSG_ERROR([tag name \"$tagname\" already exists]) 185053e90a53Smrg fi 185153e90a53Smrg 185253e90a53Smrg # Update the list of available tags. 185353e90a53Smrg if test -n "$tagname"; then 185453e90a53Smrg echo appending configuration tag \"$tagname\" to $ofile 185553e90a53Smrg 185653e90a53Smrg case $tagname in 185753e90a53Smrg CXX) 185853e90a53Smrg if test -n "$CXX" && ( test "X$CXX" != "Xno" && 185953e90a53Smrg ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || 186053e90a53Smrg (test "X$CXX" != "Xg++"))) ; then 186153e90a53Smrg AC_LIBTOOL_LANG_CXX_CONFIG 186253e90a53Smrg else 186353e90a53Smrg tagname="" 186453e90a53Smrg fi 186553e90a53Smrg ;; 186653e90a53Smrg 186753e90a53Smrg F77) 186853e90a53Smrg if test -n "$F77" && test "X$F77" != "Xno"; then 186953e90a53Smrg AC_LIBTOOL_LANG_F77_CONFIG 187053e90a53Smrg else 187153e90a53Smrg tagname="" 187253e90a53Smrg fi 187353e90a53Smrg ;; 187453e90a53Smrg 187553e90a53Smrg GCJ) 187653e90a53Smrg if test -n "$GCJ" && test "X$GCJ" != "Xno"; then 187753e90a53Smrg AC_LIBTOOL_LANG_GCJ_CONFIG 187853e90a53Smrg else 187953e90a53Smrg tagname="" 188053e90a53Smrg fi 188153e90a53Smrg ;; 188253e90a53Smrg 188353e90a53Smrg RC) 188453e90a53Smrg AC_LIBTOOL_LANG_RC_CONFIG 188553e90a53Smrg ;; 188653e90a53Smrg 188753e90a53Smrg *) 188853e90a53Smrg AC_MSG_ERROR([Unsupported tag name: $tagname]) 188953e90a53Smrg ;; 189053e90a53Smrg esac 189153e90a53Smrg 189253e90a53Smrg # Append the new tag name to the list of available tags. 189353e90a53Smrg if test -n "$tagname" ; then 189453e90a53Smrg available_tags="$available_tags $tagname" 189553e90a53Smrg fi 189653e90a53Smrg fi 189753e90a53Smrg done 189853e90a53Smrg IFS="$lt_save_ifs" 189953e90a53Smrg 190053e90a53Smrg # Now substitute the updated list of available tags. 190153e90a53Smrg if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then 190253e90a53Smrg mv "${ofile}T" "$ofile" 190353e90a53Smrg chmod +x "$ofile" 190453e90a53Smrg else 190553e90a53Smrg rm -f "${ofile}T" 190653e90a53Smrg AC_MSG_ERROR([unable to update list of available tagged configurations.]) 190753e90a53Smrg fi 190853e90a53Smrgfi 190953e90a53Smrg])# _LT_AC_TAGCONFIG 191053e90a53Smrg 191153e90a53Smrg 191253e90a53Smrg# AC_LIBTOOL_DLOPEN 191353e90a53Smrg# ----------------- 191453e90a53Smrg# enable checks for dlopen support 191553e90a53SmrgAC_DEFUN([AC_LIBTOOL_DLOPEN], 191653e90a53Smrg [AC_BEFORE([$0],[AC_LIBTOOL_SETUP]) 191753e90a53Smrg])# AC_LIBTOOL_DLOPEN 191853e90a53Smrg 191953e90a53Smrg 192053e90a53Smrg# AC_LIBTOOL_WIN32_DLL 192153e90a53Smrg# -------------------- 192253e90a53Smrg# declare package support for building win32 DLLs 192353e90a53SmrgAC_DEFUN([AC_LIBTOOL_WIN32_DLL], 192453e90a53Smrg[AC_BEFORE([$0], [AC_LIBTOOL_SETUP]) 192553e90a53Smrg])# AC_LIBTOOL_WIN32_DLL 192653e90a53Smrg 192753e90a53Smrg 192853e90a53Smrg# AC_ENABLE_SHARED([DEFAULT]) 192953e90a53Smrg# --------------------------- 193053e90a53Smrg# implement the --enable-shared flag 193153e90a53Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 193253e90a53SmrgAC_DEFUN([AC_ENABLE_SHARED], 193353e90a53Smrg[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl 193453e90a53SmrgAC_ARG_ENABLE([shared], 193553e90a53Smrg [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 193653e90a53Smrg [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])], 193753e90a53Smrg [p=${PACKAGE-default} 193853e90a53Smrg case $enableval in 193953e90a53Smrg yes) enable_shared=yes ;; 194053e90a53Smrg no) enable_shared=no ;; 194153e90a53Smrg *) 194253e90a53Smrg enable_shared=no 194353e90a53Smrg # Look at the argument we got. We use all the common list separators. 194453e90a53Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 194553e90a53Smrg for pkg in $enableval; do 194653e90a53Smrg IFS="$lt_save_ifs" 194753e90a53Smrg if test "X$pkg" = "X$p"; then 194853e90a53Smrg enable_shared=yes 194953e90a53Smrg fi 195053e90a53Smrg done 195153e90a53Smrg IFS="$lt_save_ifs" 195253e90a53Smrg ;; 195353e90a53Smrg esac], 195453e90a53Smrg [enable_shared=]AC_ENABLE_SHARED_DEFAULT) 195553e90a53Smrg])# AC_ENABLE_SHARED 195653e90a53Smrg 195753e90a53Smrg 195853e90a53Smrg# AC_DISABLE_SHARED 195953e90a53Smrg# ----------------- 196053e90a53Smrg# set the default shared flag to --disable-shared 196153e90a53SmrgAC_DEFUN([AC_DISABLE_SHARED], 196253e90a53Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 196353e90a53SmrgAC_ENABLE_SHARED(no) 196453e90a53Smrg])# AC_DISABLE_SHARED 196553e90a53Smrg 196653e90a53Smrg 196753e90a53Smrg# AC_ENABLE_STATIC([DEFAULT]) 196853e90a53Smrg# --------------------------- 196953e90a53Smrg# implement the --enable-static flag 197053e90a53Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 197153e90a53SmrgAC_DEFUN([AC_ENABLE_STATIC], 197253e90a53Smrg[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl 197353e90a53SmrgAC_ARG_ENABLE([static], 197453e90a53Smrg [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@], 197553e90a53Smrg [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])], 197653e90a53Smrg [p=${PACKAGE-default} 197753e90a53Smrg case $enableval in 197853e90a53Smrg yes) enable_static=yes ;; 197953e90a53Smrg no) enable_static=no ;; 198053e90a53Smrg *) 198153e90a53Smrg enable_static=no 198253e90a53Smrg # Look at the argument we got. We use all the common list separators. 198353e90a53Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 198453e90a53Smrg for pkg in $enableval; do 198553e90a53Smrg IFS="$lt_save_ifs" 198653e90a53Smrg if test "X$pkg" = "X$p"; then 198753e90a53Smrg enable_static=yes 198853e90a53Smrg fi 198953e90a53Smrg done 199053e90a53Smrg IFS="$lt_save_ifs" 199153e90a53Smrg ;; 199253e90a53Smrg esac], 199353e90a53Smrg [enable_static=]AC_ENABLE_STATIC_DEFAULT) 199453e90a53Smrg])# AC_ENABLE_STATIC 199553e90a53Smrg 199653e90a53Smrg 199753e90a53Smrg# AC_DISABLE_STATIC 199853e90a53Smrg# ----------------- 199953e90a53Smrg# set the default static flag to --disable-static 200053e90a53SmrgAC_DEFUN([AC_DISABLE_STATIC], 200153e90a53Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 200253e90a53SmrgAC_ENABLE_STATIC(no) 200353e90a53Smrg])# AC_DISABLE_STATIC 200453e90a53Smrg 200553e90a53Smrg 200653e90a53Smrg# AC_ENABLE_FAST_INSTALL([DEFAULT]) 200753e90a53Smrg# --------------------------------- 200853e90a53Smrg# implement the --enable-fast-install flag 200953e90a53Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 201053e90a53SmrgAC_DEFUN([AC_ENABLE_FAST_INSTALL], 201153e90a53Smrg[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl 201253e90a53SmrgAC_ARG_ENABLE([fast-install], 201353e90a53Smrg [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 201453e90a53Smrg [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 201553e90a53Smrg [p=${PACKAGE-default} 201653e90a53Smrg case $enableval in 201753e90a53Smrg yes) enable_fast_install=yes ;; 201853e90a53Smrg no) enable_fast_install=no ;; 201953e90a53Smrg *) 202053e90a53Smrg enable_fast_install=no 202153e90a53Smrg # Look at the argument we got. We use all the common list separators. 202253e90a53Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 202353e90a53Smrg for pkg in $enableval; do 202453e90a53Smrg IFS="$lt_save_ifs" 202553e90a53Smrg if test "X$pkg" = "X$p"; then 202653e90a53Smrg enable_fast_install=yes 202753e90a53Smrg fi 202853e90a53Smrg done 202953e90a53Smrg IFS="$lt_save_ifs" 203053e90a53Smrg ;; 203153e90a53Smrg esac], 203253e90a53Smrg [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT) 203353e90a53Smrg])# AC_ENABLE_FAST_INSTALL 203453e90a53Smrg 203553e90a53Smrg 203653e90a53Smrg# AC_DISABLE_FAST_INSTALL 203753e90a53Smrg# ----------------------- 203853e90a53Smrg# set the default to --disable-fast-install 203953e90a53SmrgAC_DEFUN([AC_DISABLE_FAST_INSTALL], 204053e90a53Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 204153e90a53SmrgAC_ENABLE_FAST_INSTALL(no) 204253e90a53Smrg])# AC_DISABLE_FAST_INSTALL 204353e90a53Smrg 204453e90a53Smrg 204553e90a53Smrg# AC_LIBTOOL_PICMODE([MODE]) 204653e90a53Smrg# -------------------------- 204753e90a53Smrg# implement the --with-pic flag 204853e90a53Smrg# MODE is either `yes' or `no'. If omitted, it defaults to `both'. 204953e90a53SmrgAC_DEFUN([AC_LIBTOOL_PICMODE], 205053e90a53Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 205153e90a53Smrgpic_mode=ifelse($#,1,$1,default) 205253e90a53Smrg])# AC_LIBTOOL_PICMODE 205353e90a53Smrg 205453e90a53Smrg 205553e90a53Smrg# AC_PROG_EGREP 205653e90a53Smrg# ------------- 205753e90a53Smrg# This is predefined starting with Autoconf 2.54, so this conditional 205853e90a53Smrg# definition can be removed once we require Autoconf 2.54 or later. 205953e90a53Smrgm4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP], 206053e90a53Smrg[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep], 206153e90a53Smrg [if echo a | (grep -E '(a|b)') >/dev/null 2>&1 206253e90a53Smrg then ac_cv_prog_egrep='grep -E' 206353e90a53Smrg else ac_cv_prog_egrep='egrep' 206453e90a53Smrg fi]) 206553e90a53Smrg EGREP=$ac_cv_prog_egrep 206653e90a53Smrg AC_SUBST([EGREP]) 206753e90a53Smrg])]) 206853e90a53Smrg 206953e90a53Smrg 207053e90a53Smrg# AC_PATH_TOOL_PREFIX 207153e90a53Smrg# ------------------- 207253e90a53Smrg# find a file program which can recognise shared library 207353e90a53SmrgAC_DEFUN([AC_PATH_TOOL_PREFIX], 207453e90a53Smrg[AC_REQUIRE([AC_PROG_EGREP])dnl 207553e90a53SmrgAC_MSG_CHECKING([for $1]) 207653e90a53SmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 207753e90a53Smrg[case $MAGIC_CMD in 207853e90a53Smrg[[\\/*] | ?:[\\/]*]) 207953e90a53Smrg lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. 208053e90a53Smrg ;; 208153e90a53Smrg*) 208253e90a53Smrg lt_save_MAGIC_CMD="$MAGIC_CMD" 208353e90a53Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 208453e90a53Smrgdnl $ac_dummy forces splitting on constant user-supplied paths. 208553e90a53Smrgdnl POSIX.2 word splitting is done only on the output of word expansions, 208653e90a53Smrgdnl not every word. This closes a longstanding sh security hole. 208753e90a53Smrg ac_dummy="ifelse([$2], , $PATH, [$2])" 208853e90a53Smrg for ac_dir in $ac_dummy; do 208953e90a53Smrg IFS="$lt_save_ifs" 209053e90a53Smrg test -z "$ac_dir" && ac_dir=. 209153e90a53Smrg if test -f $ac_dir/$1; then 209253e90a53Smrg lt_cv_path_MAGIC_CMD="$ac_dir/$1" 209353e90a53Smrg if test -n "$file_magic_test_file"; then 209453e90a53Smrg case $deplibs_check_method in 209553e90a53Smrg "file_magic "*) 209653e90a53Smrg file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 209753e90a53Smrg MAGIC_CMD="$lt_cv_path_MAGIC_CMD" 209853e90a53Smrg if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 209953e90a53Smrg $EGREP "$file_magic_regex" > /dev/null; then 210053e90a53Smrg : 210153e90a53Smrg else 210253e90a53Smrg cat <<EOF 1>&2 210353e90a53Smrg 210453e90a53Smrg*** Warning: the command libtool uses to detect shared libraries, 210553e90a53Smrg*** $file_magic_cmd, produces output that libtool cannot recognize. 210653e90a53Smrg*** The result is that libtool may fail to recognize shared libraries 210753e90a53Smrg*** as such. This will affect the creation of libtool libraries that 210853e90a53Smrg*** depend on shared libraries, but programs linked with such libtool 210953e90a53Smrg*** libraries will work regardless of this problem. Nevertheless, you 211053e90a53Smrg*** may want to report the problem to your system manager and/or to 211153e90a53Smrg*** bug-libtool@gnu.org 211253e90a53Smrg 211353e90a53SmrgEOF 211453e90a53Smrg fi ;; 211553e90a53Smrg esac 211653e90a53Smrg fi 211753e90a53Smrg break 211853e90a53Smrg fi 211953e90a53Smrg done 212053e90a53Smrg IFS="$lt_save_ifs" 212153e90a53Smrg MAGIC_CMD="$lt_save_MAGIC_CMD" 212253e90a53Smrg ;; 212353e90a53Smrgesac]) 212453e90a53SmrgMAGIC_CMD="$lt_cv_path_MAGIC_CMD" 212553e90a53Smrgif test -n "$MAGIC_CMD"; then 212653e90a53Smrg AC_MSG_RESULT($MAGIC_CMD) 212753e90a53Smrgelse 212853e90a53Smrg AC_MSG_RESULT(no) 212953e90a53Smrgfi 213053e90a53Smrg])# AC_PATH_TOOL_PREFIX 213153e90a53Smrg 213253e90a53Smrg 213353e90a53Smrg# AC_PATH_MAGIC 213453e90a53Smrg# ------------- 213553e90a53Smrg# find a file program which can recognise a shared library 213653e90a53SmrgAC_DEFUN([AC_PATH_MAGIC], 213753e90a53Smrg[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 213853e90a53Smrgif test -z "$lt_cv_path_MAGIC_CMD"; then 213953e90a53Smrg if test -n "$ac_tool_prefix"; then 214053e90a53Smrg AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 214153e90a53Smrg else 214253e90a53Smrg MAGIC_CMD=: 214353e90a53Smrg fi 214453e90a53Smrgfi 214553e90a53Smrg])# AC_PATH_MAGIC 214653e90a53Smrg 214753e90a53Smrg 214853e90a53Smrg# AC_PROG_LD 214953e90a53Smrg# ---------- 215053e90a53Smrg# find the pathname to the GNU or non-GNU linker 215153e90a53SmrgAC_DEFUN([AC_PROG_LD], 215253e90a53Smrg[AC_ARG_WITH([gnu-ld], 215353e90a53Smrg [AC_HELP_STRING([--with-gnu-ld], 215453e90a53Smrg [assume the C compiler uses GNU ld @<:@default=no@:>@])], 215553e90a53Smrg [test "$withval" = no || with_gnu_ld=yes], 215653e90a53Smrg [with_gnu_ld=no]) 215753e90a53SmrgAC_REQUIRE([LT_AC_PROG_SED])dnl 215853e90a53SmrgAC_REQUIRE([AC_PROG_CC])dnl 215953e90a53SmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 216053e90a53SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 216153e90a53Smrgac_prog=ld 216253e90a53Smrgif test "$GCC" = yes; then 216353e90a53Smrg # Check if gcc -print-prog-name=ld gives a path. 216453e90a53Smrg AC_MSG_CHECKING([for ld used by $CC]) 216553e90a53Smrg case $host in 216653e90a53Smrg *-*-mingw*) 216753e90a53Smrg # gcc leaves a trailing carriage return which upsets mingw 216853e90a53Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 216953e90a53Smrg *) 217053e90a53Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 217153e90a53Smrg esac 217253e90a53Smrg case $ac_prog in 217353e90a53Smrg # Accept absolute paths. 217453e90a53Smrg [[\\/]]* | ?:[[\\/]]*) 217553e90a53Smrg re_direlt='/[[^/]][[^/]]*/\.\./' 217653e90a53Smrg # Canonicalize the pathname of ld 217753e90a53Smrg ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` 217853e90a53Smrg while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do 217953e90a53Smrg ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` 218053e90a53Smrg done 218153e90a53Smrg test -z "$LD" && LD="$ac_prog" 218253e90a53Smrg ;; 218353e90a53Smrg "") 218453e90a53Smrg # If it fails, then pretend we aren't using GCC. 218553e90a53Smrg ac_prog=ld 218653e90a53Smrg ;; 218753e90a53Smrg *) 218853e90a53Smrg # If it is relative, then search for the first ld in PATH. 218953e90a53Smrg with_gnu_ld=unknown 219053e90a53Smrg ;; 219153e90a53Smrg esac 219253e90a53Smrgelif test "$with_gnu_ld" = yes; then 219353e90a53Smrg AC_MSG_CHECKING([for GNU ld]) 219453e90a53Smrgelse 219553e90a53Smrg AC_MSG_CHECKING([for non-GNU ld]) 219653e90a53Smrgfi 219753e90a53SmrgAC_CACHE_VAL(lt_cv_path_LD, 219853e90a53Smrg[if test -z "$LD"; then 219953e90a53Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 220053e90a53Smrg for ac_dir in $PATH; do 220153e90a53Smrg IFS="$lt_save_ifs" 220253e90a53Smrg test -z "$ac_dir" && ac_dir=. 220353e90a53Smrg if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 220453e90a53Smrg lt_cv_path_LD="$ac_dir/$ac_prog" 220553e90a53Smrg # Check to see if the program is GNU ld. I'd rather use --version, 220653e90a53Smrg # but apparently some variants of GNU ld only accept -v. 220753e90a53Smrg # Break only if it was the GNU/non-GNU ld that we prefer. 220853e90a53Smrg case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 220953e90a53Smrg *GNU* | *'with BFD'*) 221053e90a53Smrg test "$with_gnu_ld" != no && break 221153e90a53Smrg ;; 221253e90a53Smrg *) 221353e90a53Smrg test "$with_gnu_ld" != yes && break 221453e90a53Smrg ;; 221553e90a53Smrg esac 221653e90a53Smrg fi 221753e90a53Smrg done 221853e90a53Smrg IFS="$lt_save_ifs" 221953e90a53Smrgelse 222053e90a53Smrg lt_cv_path_LD="$LD" # Let the user override the test with a path. 222153e90a53Smrgfi]) 222253e90a53SmrgLD="$lt_cv_path_LD" 222353e90a53Smrgif test -n "$LD"; then 222453e90a53Smrg AC_MSG_RESULT($LD) 222553e90a53Smrgelse 222653e90a53Smrg AC_MSG_RESULT(no) 222753e90a53Smrgfi 222853e90a53Smrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 222953e90a53SmrgAC_PROG_LD_GNU 223053e90a53Smrg])# AC_PROG_LD 223153e90a53Smrg 223253e90a53Smrg 223353e90a53Smrg# AC_PROG_LD_GNU 223453e90a53Smrg# -------------- 223553e90a53SmrgAC_DEFUN([AC_PROG_LD_GNU], 223653e90a53Smrg[AC_REQUIRE([AC_PROG_EGREP])dnl 223753e90a53SmrgAC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 223853e90a53Smrg[# I'd rather use --version here, but apparently some GNU lds only accept -v. 223953e90a53Smrgcase `$LD -v 2>&1 </dev/null` in 224053e90a53Smrg*GNU* | *'with BFD'*) 224153e90a53Smrg lt_cv_prog_gnu_ld=yes 224253e90a53Smrg ;; 224353e90a53Smrg*) 224453e90a53Smrg lt_cv_prog_gnu_ld=no 224553e90a53Smrg ;; 224653e90a53Smrgesac]) 224753e90a53Smrgwith_gnu_ld=$lt_cv_prog_gnu_ld 224853e90a53Smrg])# AC_PROG_LD_GNU 224953e90a53Smrg 225053e90a53Smrg 225153e90a53Smrg# AC_PROG_LD_RELOAD_FLAG 225253e90a53Smrg# ---------------------- 225353e90a53Smrg# find reload flag for linker 225453e90a53Smrg# -- PORTME Some linkers may need a different reload flag. 225553e90a53SmrgAC_DEFUN([AC_PROG_LD_RELOAD_FLAG], 225653e90a53Smrg[AC_CACHE_CHECK([for $LD option to reload object files], 225753e90a53Smrg lt_cv_ld_reload_flag, 225853e90a53Smrg [lt_cv_ld_reload_flag='-r']) 225953e90a53Smrgreload_flag=$lt_cv_ld_reload_flag 226053e90a53Smrgcase $reload_flag in 226153e90a53Smrg"" | " "*) ;; 226253e90a53Smrg*) reload_flag=" $reload_flag" ;; 226353e90a53Smrgesac 226453e90a53Smrgreload_cmds='$LD$reload_flag -o $output$reload_objs' 226553e90a53Smrgcase $host_os in 226653e90a53Smrg darwin*) 226753e90a53Smrg if test "$GCC" = yes; then 226853e90a53Smrg reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' 226953e90a53Smrg else 227053e90a53Smrg reload_cmds='$LD$reload_flag -o $output$reload_objs' 227153e90a53Smrg fi 227253e90a53Smrg ;; 227353e90a53Smrgesac 227453e90a53Smrg])# AC_PROG_LD_RELOAD_FLAG 227553e90a53Smrg 227653e90a53Smrg 227753e90a53Smrg# AC_DEPLIBS_CHECK_METHOD 227853e90a53Smrg# ----------------------- 227953e90a53Smrg# how to check for library dependencies 228053e90a53Smrg# -- PORTME fill in with the dynamic library characteristics 228153e90a53SmrgAC_DEFUN([AC_DEPLIBS_CHECK_METHOD], 228253e90a53Smrg[AC_CACHE_CHECK([how to recognise dependent libraries], 228353e90a53Smrglt_cv_deplibs_check_method, 228453e90a53Smrg[lt_cv_file_magic_cmd='$MAGIC_CMD' 228553e90a53Smrglt_cv_file_magic_test_file= 228653e90a53Smrglt_cv_deplibs_check_method='unknown' 228753e90a53Smrg# Need to set the preceding variable on all platforms that support 228853e90a53Smrg# interlibrary dependencies. 228953e90a53Smrg# 'none' -- dependencies not supported. 229053e90a53Smrg# `unknown' -- same as none, but documents that we really don't know. 229153e90a53Smrg# 'pass_all' -- all dependencies passed with no checks. 229253e90a53Smrg# 'test_compile' -- check by making test program. 229353e90a53Smrg# 'file_magic [[regex]]' -- check by looking for files in library path 229453e90a53Smrg# which responds to the $file_magic_cmd with a given extended regex. 229553e90a53Smrg# If you have `file' or equivalent on your system and you're not sure 229653e90a53Smrg# whether `pass_all' will *always* work, you probably want this one. 229753e90a53Smrg 229853e90a53Smrgcase $host_os in 229953e90a53Smrgaix4* | aix5*) 230053e90a53Smrg lt_cv_deplibs_check_method=pass_all 230153e90a53Smrg ;; 230253e90a53Smrg 230353e90a53Smrgbeos*) 230453e90a53Smrg lt_cv_deplibs_check_method=pass_all 230553e90a53Smrg ;; 230653e90a53Smrg 230753e90a53Smrgbsdi[[45]]*) 230853e90a53Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 230953e90a53Smrg lt_cv_file_magic_cmd='/usr/bin/file -L' 231053e90a53Smrg lt_cv_file_magic_test_file=/shlib/libc.so 231153e90a53Smrg ;; 231253e90a53Smrg 231353e90a53Smrgcygwin*) 231453e90a53Smrg # func_win32_libid is a shell function defined in ltmain.sh 231553e90a53Smrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 231653e90a53Smrg lt_cv_file_magic_cmd='func_win32_libid' 231753e90a53Smrg ;; 231853e90a53Smrg 231953e90a53Smrgmingw* | pw32*) 232053e90a53Smrg # Base MSYS/MinGW do not provide the 'file' command needed by 232153e90a53Smrg # func_win32_libid shell function, so use a weaker test based on 'objdump'. 232253e90a53Smrg lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' 232353e90a53Smrg lt_cv_file_magic_cmd='$OBJDUMP -f' 232453e90a53Smrg ;; 232553e90a53Smrg 232653e90a53Smrgdarwin* | rhapsody*) 232753e90a53Smrg lt_cv_deplibs_check_method=pass_all 232853e90a53Smrg ;; 232953e90a53Smrg 233053e90a53Smrgfreebsd* | kfreebsd*-gnu | dragonfly*) 233153e90a53Smrg if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then 233253e90a53Smrg case $host_cpu in 233353e90a53Smrg i*86 ) 233453e90a53Smrg # Not sure whether the presence of OpenBSD here was a mistake. 233553e90a53Smrg # Let's accept both of them until this is cleared up. 233653e90a53Smrg lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 233753e90a53Smrg lt_cv_file_magic_cmd=/usr/bin/file 233853e90a53Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 233953e90a53Smrg ;; 234053e90a53Smrg esac 234153e90a53Smrg else 234253e90a53Smrg lt_cv_deplibs_check_method=pass_all 234353e90a53Smrg fi 234453e90a53Smrg ;; 234553e90a53Smrg 234653e90a53Smrggnu*) 234753e90a53Smrg lt_cv_deplibs_check_method=pass_all 234853e90a53Smrg ;; 234953e90a53Smrg 235053e90a53Smrghpux10.20* | hpux11*) 235153e90a53Smrg lt_cv_file_magic_cmd=/usr/bin/file 235253e90a53Smrg case $host_cpu in 235353e90a53Smrg ia64*) 235453e90a53Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 235553e90a53Smrg lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 235653e90a53Smrg ;; 235753e90a53Smrg hppa*64*) 235853e90a53Smrg [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]'] 235953e90a53Smrg lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 236053e90a53Smrg ;; 236153e90a53Smrg *) 236253e90a53Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' 236353e90a53Smrg lt_cv_file_magic_test_file=/usr/lib/libc.sl 236453e90a53Smrg ;; 236553e90a53Smrg esac 236653e90a53Smrg ;; 236753e90a53Smrg 236853e90a53Smrginterix3*) 236953e90a53Smrg # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 237053e90a53Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 237153e90a53Smrg ;; 237253e90a53Smrg 237353e90a53Smrgirix5* | irix6* | nonstopux*) 237453e90a53Smrg case $LD in 237553e90a53Smrg *-32|*"-32 ") libmagic=32-bit;; 237653e90a53Smrg *-n32|*"-n32 ") libmagic=N32;; 237753e90a53Smrg *-64|*"-64 ") libmagic=64-bit;; 237853e90a53Smrg *) libmagic=never-match;; 237953e90a53Smrg esac 238053e90a53Smrg lt_cv_deplibs_check_method=pass_all 238153e90a53Smrg ;; 238253e90a53Smrg 238353e90a53Smrg# This must be Linux ELF. 238453e90a53Smrglinux*) 238553e90a53Smrg lt_cv_deplibs_check_method=pass_all 238653e90a53Smrg ;; 238753e90a53Smrg 238853e90a53Smrgnetbsd*) 238953e90a53Smrg if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then 239053e90a53Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 239153e90a53Smrg else 239253e90a53Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 239353e90a53Smrg fi 239453e90a53Smrg ;; 239553e90a53Smrg 239653e90a53Smrgnewos6*) 239753e90a53Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 239853e90a53Smrg lt_cv_file_magic_cmd=/usr/bin/file 239953e90a53Smrg lt_cv_file_magic_test_file=/usr/lib/libnls.so 240053e90a53Smrg ;; 240153e90a53Smrg 240253e90a53Smrgnto-qnx*) 240353e90a53Smrg lt_cv_deplibs_check_method=unknown 240453e90a53Smrg ;; 240553e90a53Smrg 240653e90a53Smrgopenbsd*) 240753e90a53Smrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 240853e90a53Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 240953e90a53Smrg else 241053e90a53Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 241153e90a53Smrg fi 241253e90a53Smrg ;; 241353e90a53Smrg 241453e90a53Smrgosf3* | osf4* | osf5*) 241553e90a53Smrg lt_cv_deplibs_check_method=pass_all 241653e90a53Smrg ;; 241753e90a53Smrg 241853e90a53Smrgsolaris*) 241953e90a53Smrg lt_cv_deplibs_check_method=pass_all 242053e90a53Smrg ;; 242153e90a53Smrg 242253e90a53Smrgsysv4 | sysv4.3*) 242353e90a53Smrg case $host_vendor in 242453e90a53Smrg motorola) 242553e90a53Smrg 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]]' 242653e90a53Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 242753e90a53Smrg ;; 242853e90a53Smrg ncr) 242953e90a53Smrg lt_cv_deplibs_check_method=pass_all 243053e90a53Smrg ;; 243153e90a53Smrg sequent) 243253e90a53Smrg lt_cv_file_magic_cmd='/bin/file' 243353e90a53Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 243453e90a53Smrg ;; 243553e90a53Smrg sni) 243653e90a53Smrg lt_cv_file_magic_cmd='/bin/file' 243753e90a53Smrg lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 243853e90a53Smrg lt_cv_file_magic_test_file=/lib/libc.so 243953e90a53Smrg ;; 244053e90a53Smrg siemens) 244153e90a53Smrg lt_cv_deplibs_check_method=pass_all 244253e90a53Smrg ;; 244353e90a53Smrg pc) 244453e90a53Smrg lt_cv_deplibs_check_method=pass_all 244553e90a53Smrg ;; 244653e90a53Smrg esac 244753e90a53Smrg ;; 244853e90a53Smrg 244953e90a53Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 245053e90a53Smrg lt_cv_deplibs_check_method=pass_all 245153e90a53Smrg ;; 245253e90a53Smrgesac 245353e90a53Smrg]) 245453e90a53Smrgfile_magic_cmd=$lt_cv_file_magic_cmd 245553e90a53Smrgdeplibs_check_method=$lt_cv_deplibs_check_method 245653e90a53Smrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown 245753e90a53Smrg])# AC_DEPLIBS_CHECK_METHOD 245853e90a53Smrg 245953e90a53Smrg 246053e90a53Smrg# AC_PROG_NM 246153e90a53Smrg# ---------- 246253e90a53Smrg# find the pathname to a BSD-compatible name lister 246353e90a53SmrgAC_DEFUN([AC_PROG_NM], 246453e90a53Smrg[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM, 246553e90a53Smrg[if test -n "$NM"; then 246653e90a53Smrg # Let the user override the test. 246753e90a53Smrg lt_cv_path_NM="$NM" 246853e90a53Smrgelse 246953e90a53Smrg lt_nm_to_check="${ac_tool_prefix}nm" 247053e90a53Smrg if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 247153e90a53Smrg lt_nm_to_check="$lt_nm_to_check nm" 247253e90a53Smrg fi 247353e90a53Smrg for lt_tmp_nm in $lt_nm_to_check; do 247453e90a53Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 247553e90a53Smrg for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 247653e90a53Smrg IFS="$lt_save_ifs" 247753e90a53Smrg test -z "$ac_dir" && ac_dir=. 247853e90a53Smrg tmp_nm="$ac_dir/$lt_tmp_nm" 247953e90a53Smrg if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then 248053e90a53Smrg # Check to see if the nm accepts a BSD-compat flag. 248153e90a53Smrg # Adding the `sed 1q' prevents false positives on HP-UX, which says: 248253e90a53Smrg # nm: unknown option "B" ignored 248353e90a53Smrg # Tru64's nm complains that /dev/null is an invalid object file 248453e90a53Smrg case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in 248553e90a53Smrg */dev/null* | *'Invalid file or object type'*) 248653e90a53Smrg lt_cv_path_NM="$tmp_nm -B" 248753e90a53Smrg break 248853e90a53Smrg ;; 248953e90a53Smrg *) 249053e90a53Smrg case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in 249153e90a53Smrg */dev/null*) 249253e90a53Smrg lt_cv_path_NM="$tmp_nm -p" 249353e90a53Smrg break 249453e90a53Smrg ;; 249553e90a53Smrg *) 249653e90a53Smrg lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 249753e90a53Smrg continue # so that we can try to find one that supports BSD flags 249853e90a53Smrg ;; 249953e90a53Smrg esac 250053e90a53Smrg ;; 250153e90a53Smrg esac 250253e90a53Smrg fi 250353e90a53Smrg done 250453e90a53Smrg IFS="$lt_save_ifs" 250553e90a53Smrg done 250653e90a53Smrg test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm 250753e90a53Smrgfi]) 250853e90a53SmrgNM="$lt_cv_path_NM" 250953e90a53Smrg])# AC_PROG_NM 251053e90a53Smrg 251153e90a53Smrg 251253e90a53Smrg# AC_CHECK_LIBM 251353e90a53Smrg# ------------- 251453e90a53Smrg# check for math library 251553e90a53SmrgAC_DEFUN([AC_CHECK_LIBM], 251653e90a53Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 251753e90a53SmrgLIBM= 251853e90a53Smrgcase $host in 251953e90a53Smrg*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) 252053e90a53Smrg # These system don't have libm, or don't need it 252153e90a53Smrg ;; 252253e90a53Smrg*-ncr-sysv4.3*) 252353e90a53Smrg AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") 252453e90a53Smrg AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 252553e90a53Smrg ;; 252653e90a53Smrg*) 252753e90a53Smrg AC_CHECK_LIB(m, cos, LIBM="-lm") 252853e90a53Smrg ;; 252953e90a53Smrgesac 253053e90a53Smrg])# AC_CHECK_LIBM 253153e90a53Smrg 253253e90a53Smrg 253353e90a53Smrg# AC_LIBLTDL_CONVENIENCE([DIRECTORY]) 253453e90a53Smrg# ----------------------------------- 253553e90a53Smrg# sets LIBLTDL to the link flags for the libltdl convenience library and 253653e90a53Smrg# LTDLINCL to the include flags for the libltdl header and adds 253753e90a53Smrg# --enable-ltdl-convenience to the configure arguments. Note that 253853e90a53Smrg# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, 253953e90a53Smrg# it is assumed to be `libltdl'. LIBLTDL will be prefixed with 254053e90a53Smrg# '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/' 254153e90a53Smrg# (note the single quotes!). If your package is not flat and you're not 254253e90a53Smrg# using automake, define top_builddir and top_srcdir appropriately in 254353e90a53Smrg# the Makefiles. 254453e90a53SmrgAC_DEFUN([AC_LIBLTDL_CONVENIENCE], 254553e90a53Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 254653e90a53Smrg case $enable_ltdl_convenience in 254753e90a53Smrg no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; 254853e90a53Smrg "") enable_ltdl_convenience=yes 254953e90a53Smrg ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; 255053e90a53Smrg esac 255153e90a53Smrg LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la 255253e90a53Smrg LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) 255353e90a53Smrg # For backwards non-gettext consistent compatibility... 255453e90a53Smrg INCLTDL="$LTDLINCL" 255553e90a53Smrg])# AC_LIBLTDL_CONVENIENCE 255653e90a53Smrg 255753e90a53Smrg 255853e90a53Smrg# AC_LIBLTDL_INSTALLABLE([DIRECTORY]) 255953e90a53Smrg# ----------------------------------- 256053e90a53Smrg# sets LIBLTDL to the link flags for the libltdl installable library and 256153e90a53Smrg# LTDLINCL to the include flags for the libltdl header and adds 256253e90a53Smrg# --enable-ltdl-install to the configure arguments. Note that 256353e90a53Smrg# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, 256453e90a53Smrg# and an installed libltdl is not found, it is assumed to be `libltdl'. 256553e90a53Smrg# LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with 256653e90a53Smrg# '${top_srcdir}/' (note the single quotes!). If your package is not 256753e90a53Smrg# flat and you're not using automake, define top_builddir and top_srcdir 256853e90a53Smrg# appropriately in the Makefiles. 256953e90a53Smrg# In the future, this macro may have to be called after AC_PROG_LIBTOOL. 257053e90a53SmrgAC_DEFUN([AC_LIBLTDL_INSTALLABLE], 257153e90a53Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 257253e90a53Smrg AC_CHECK_LIB(ltdl, lt_dlinit, 257353e90a53Smrg [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no], 257453e90a53Smrg [if test x"$enable_ltdl_install" = xno; then 257553e90a53Smrg AC_MSG_WARN([libltdl not installed, but installation disabled]) 257653e90a53Smrg else 257753e90a53Smrg enable_ltdl_install=yes 257853e90a53Smrg fi 257953e90a53Smrg ]) 258053e90a53Smrg if test x"$enable_ltdl_install" = x"yes"; then 258153e90a53Smrg ac_configure_args="$ac_configure_args --enable-ltdl-install" 258253e90a53Smrg LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la 258353e90a53Smrg LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) 258453e90a53Smrg else 258553e90a53Smrg ac_configure_args="$ac_configure_args --enable-ltdl-install=no" 258653e90a53Smrg LIBLTDL="-lltdl" 258753e90a53Smrg LTDLINCL= 258853e90a53Smrg fi 258953e90a53Smrg # For backwards non-gettext consistent compatibility... 259053e90a53Smrg INCLTDL="$LTDLINCL" 259153e90a53Smrg])# AC_LIBLTDL_INSTALLABLE 259253e90a53Smrg 259353e90a53Smrg 259453e90a53Smrg# AC_LIBTOOL_CXX 259553e90a53Smrg# -------------- 259653e90a53Smrg# enable support for C++ libraries 259753e90a53SmrgAC_DEFUN([AC_LIBTOOL_CXX], 259853e90a53Smrg[AC_REQUIRE([_LT_AC_LANG_CXX]) 259953e90a53Smrg])# AC_LIBTOOL_CXX 260053e90a53Smrg 260153e90a53Smrg 260253e90a53Smrg# _LT_AC_LANG_CXX 260353e90a53Smrg# --------------- 260453e90a53SmrgAC_DEFUN([_LT_AC_LANG_CXX], 260553e90a53Smrg[AC_REQUIRE([AC_PROG_CXX]) 260653e90a53SmrgAC_REQUIRE([_LT_AC_PROG_CXXCPP]) 260753e90a53Smrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX]) 260853e90a53Smrg])# _LT_AC_LANG_CXX 260953e90a53Smrg 261053e90a53Smrg# _LT_AC_PROG_CXXCPP 261153e90a53Smrg# ------------------ 261253e90a53SmrgAC_DEFUN([_LT_AC_PROG_CXXCPP], 261353e90a53Smrg[ 261453e90a53SmrgAC_REQUIRE([AC_PROG_CXX]) 261553e90a53Smrgif test -n "$CXX" && ( test "X$CXX" != "Xno" && 261653e90a53Smrg ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || 261753e90a53Smrg (test "X$CXX" != "Xg++"))) ; then 261853e90a53Smrg AC_PROG_CXXCPP 261953e90a53Smrgfi 262053e90a53Smrg])# _LT_AC_PROG_CXXCPP 262153e90a53Smrg 262253e90a53Smrg# AC_LIBTOOL_F77 262353e90a53Smrg# -------------- 262453e90a53Smrg# enable support for Fortran 77 libraries 262553e90a53SmrgAC_DEFUN([AC_LIBTOOL_F77], 262653e90a53Smrg[AC_REQUIRE([_LT_AC_LANG_F77]) 262753e90a53Smrg])# AC_LIBTOOL_F77 262853e90a53Smrg 262953e90a53Smrg 263053e90a53Smrg# _LT_AC_LANG_F77 263153e90a53Smrg# --------------- 263253e90a53SmrgAC_DEFUN([_LT_AC_LANG_F77], 263353e90a53Smrg[AC_REQUIRE([AC_PROG_F77]) 263453e90a53Smrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77]) 263553e90a53Smrg])# _LT_AC_LANG_F77 263653e90a53Smrg 263753e90a53Smrg 263853e90a53Smrg# AC_LIBTOOL_GCJ 263953e90a53Smrg# -------------- 264053e90a53Smrg# enable support for GCJ libraries 264153e90a53SmrgAC_DEFUN([AC_LIBTOOL_GCJ], 264253e90a53Smrg[AC_REQUIRE([_LT_AC_LANG_GCJ]) 264353e90a53Smrg])# AC_LIBTOOL_GCJ 264453e90a53Smrg 264553e90a53Smrg 264653e90a53Smrg# _LT_AC_LANG_GCJ 264753e90a53Smrg# --------------- 264853e90a53SmrgAC_DEFUN([_LT_AC_LANG_GCJ], 264953e90a53Smrg[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[], 265053e90a53Smrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[], 265153e90a53Smrg [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[], 265253e90a53Smrg [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])], 265353e90a53Smrg [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])], 265453e90a53Smrg [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])]) 265553e90a53Smrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ]) 265653e90a53Smrg])# _LT_AC_LANG_GCJ 265753e90a53Smrg 265853e90a53Smrg 265953e90a53Smrg# AC_LIBTOOL_RC 266053e90a53Smrg# ------------- 266153e90a53Smrg# enable support for Windows resource files 266253e90a53SmrgAC_DEFUN([AC_LIBTOOL_RC], 266353e90a53Smrg[AC_REQUIRE([LT_AC_PROG_RC]) 266453e90a53Smrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC]) 266553e90a53Smrg])# AC_LIBTOOL_RC 266653e90a53Smrg 266753e90a53Smrg 266853e90a53Smrg# AC_LIBTOOL_LANG_C_CONFIG 266953e90a53Smrg# ------------------------ 267053e90a53Smrg# Ensure that the configuration vars for the C compiler are 267153e90a53Smrg# suitably defined. Those variables are subsequently used by 267253e90a53Smrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 267353e90a53SmrgAC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG]) 267453e90a53SmrgAC_DEFUN([_LT_AC_LANG_C_CONFIG], 267553e90a53Smrg[lt_save_CC="$CC" 267653e90a53SmrgAC_LANG_PUSH(C) 267753e90a53Smrg 267853e90a53Smrg# Source file extension for C test sources. 267953e90a53Smrgac_ext=c 268053e90a53Smrg 268153e90a53Smrg# Object file extension for compiled C test sources. 268253e90a53Smrgobjext=o 268353e90a53Smrg_LT_AC_TAGVAR(objext, $1)=$objext 268453e90a53Smrg 268553e90a53Smrg# Code to be used in simple compile tests 268653e90a53Smrglt_simple_compile_test_code="int some_variable = 0;\n" 268753e90a53Smrg 268853e90a53Smrg# Code to be used in simple link tests 268953e90a53Smrglt_simple_link_test_code='int main(){return(0);}\n' 269053e90a53Smrg 269153e90a53Smrg_LT_AC_SYS_COMPILER 269253e90a53Smrg 269353e90a53Smrg# save warnings/boilerplate of simple test code 269453e90a53Smrg_LT_COMPILER_BOILERPLATE 269553e90a53Smrg_LT_LINKER_BOILERPLATE 269653e90a53Smrg 269753e90a53SmrgAC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) 269853e90a53SmrgAC_LIBTOOL_PROG_COMPILER_PIC($1) 269953e90a53SmrgAC_LIBTOOL_PROG_CC_C_O($1) 270053e90a53SmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) 270153e90a53SmrgAC_LIBTOOL_PROG_LD_SHLIBS($1) 270253e90a53SmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1) 270353e90a53SmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) 270453e90a53SmrgAC_LIBTOOL_SYS_LIB_STRIP 270553e90a53SmrgAC_LIBTOOL_DLOPEN_SELF 270653e90a53Smrg 270753e90a53Smrg# Report which library types will actually be built 270853e90a53SmrgAC_MSG_CHECKING([if libtool supports shared libraries]) 270953e90a53SmrgAC_MSG_RESULT([$can_build_shared]) 271053e90a53Smrg 271153e90a53SmrgAC_MSG_CHECKING([whether to build shared libraries]) 271253e90a53Smrgtest "$can_build_shared" = "no" && enable_shared=no 271353e90a53Smrg 271453e90a53Smrg# On AIX, shared libraries and static libraries use the same namespace, and 271553e90a53Smrg# are all built from PIC. 271653e90a53Smrgcase $host_os in 271753e90a53Smrgaix3*) 271853e90a53Smrg test "$enable_shared" = yes && enable_static=no 271953e90a53Smrg if test -n "$RANLIB"; then 272053e90a53Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 272153e90a53Smrg postinstall_cmds='$RANLIB $lib' 272253e90a53Smrg fi 272353e90a53Smrg ;; 272453e90a53Smrg 272553e90a53Smrgaix4* | aix5*) 272653e90a53Smrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 272753e90a53Smrg test "$enable_shared" = yes && enable_static=no 272853e90a53Smrg fi 272953e90a53Smrg ;; 273053e90a53Smrgesac 273153e90a53SmrgAC_MSG_RESULT([$enable_shared]) 273253e90a53Smrg 273353e90a53SmrgAC_MSG_CHECKING([whether to build static libraries]) 273453e90a53Smrg# Make sure either enable_shared or enable_static is yes. 273553e90a53Smrgtest "$enable_shared" = yes || enable_static=yes 273653e90a53SmrgAC_MSG_RESULT([$enable_static]) 273753e90a53Smrg 273853e90a53SmrgAC_LIBTOOL_CONFIG($1) 273953e90a53Smrg 274053e90a53SmrgAC_LANG_POP 274153e90a53SmrgCC="$lt_save_CC" 274253e90a53Smrg])# AC_LIBTOOL_LANG_C_CONFIG 274353e90a53Smrg 274453e90a53Smrg 274553e90a53Smrg# AC_LIBTOOL_LANG_CXX_CONFIG 274653e90a53Smrg# -------------------------- 274753e90a53Smrg# Ensure that the configuration vars for the C compiler are 274853e90a53Smrg# suitably defined. Those variables are subsequently used by 274953e90a53Smrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 275053e90a53SmrgAC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)]) 275153e90a53SmrgAC_DEFUN([_LT_AC_LANG_CXX_CONFIG], 275253e90a53Smrg[AC_LANG_PUSH(C++) 275353e90a53SmrgAC_REQUIRE([AC_PROG_CXX]) 275453e90a53SmrgAC_REQUIRE([_LT_AC_PROG_CXXCPP]) 275553e90a53Smrg 275653e90a53Smrg_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 275753e90a53Smrg_LT_AC_TAGVAR(allow_undefined_flag, $1)= 275853e90a53Smrg_LT_AC_TAGVAR(always_export_symbols, $1)=no 275953e90a53Smrg_LT_AC_TAGVAR(archive_expsym_cmds, $1)= 276053e90a53Smrg_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= 276153e90a53Smrg_LT_AC_TAGVAR(hardcode_direct, $1)=no 276253e90a53Smrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= 276353e90a53Smrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 276453e90a53Smrg_LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 276553e90a53Smrg_LT_AC_TAGVAR(hardcode_minus_L, $1)=no 276653e90a53Smrg_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 276753e90a53Smrg_LT_AC_TAGVAR(hardcode_automatic, $1)=no 276853e90a53Smrg_LT_AC_TAGVAR(module_cmds, $1)= 276953e90a53Smrg_LT_AC_TAGVAR(module_expsym_cmds, $1)= 277053e90a53Smrg_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown 277153e90a53Smrg_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 277253e90a53Smrg_LT_AC_TAGVAR(no_undefined_flag, $1)= 277353e90a53Smrg_LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 277453e90a53Smrg_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no 277553e90a53Smrg 277653e90a53Smrg# Dependencies to place before and after the object being linked: 277753e90a53Smrg_LT_AC_TAGVAR(predep_objects, $1)= 277853e90a53Smrg_LT_AC_TAGVAR(postdep_objects, $1)= 277953e90a53Smrg_LT_AC_TAGVAR(predeps, $1)= 278053e90a53Smrg_LT_AC_TAGVAR(postdeps, $1)= 278153e90a53Smrg_LT_AC_TAGVAR(compiler_lib_search_path, $1)= 278253e90a53Smrg 278353e90a53Smrg# Source file extension for C++ test sources. 278453e90a53Smrgac_ext=cpp 278553e90a53Smrg 278653e90a53Smrg# Object file extension for compiled C++ test sources. 278753e90a53Smrgobjext=o 278853e90a53Smrg_LT_AC_TAGVAR(objext, $1)=$objext 278953e90a53Smrg 279053e90a53Smrg# Code to be used in simple compile tests 279153e90a53Smrglt_simple_compile_test_code="int some_variable = 0;\n" 279253e90a53Smrg 279353e90a53Smrg# Code to be used in simple link tests 279453e90a53Smrglt_simple_link_test_code='int main(int, char *[[]]) { return(0); }\n' 279553e90a53Smrg 279653e90a53Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 279753e90a53Smrg_LT_AC_SYS_COMPILER 279853e90a53Smrg 279953e90a53Smrg# save warnings/boilerplate of simple test code 280053e90a53Smrg_LT_COMPILER_BOILERPLATE 280153e90a53Smrg_LT_LINKER_BOILERPLATE 280253e90a53Smrg 280353e90a53Smrg# Allow CC to be a program name with arguments. 280453e90a53Smrglt_save_CC=$CC 280553e90a53Smrglt_save_LD=$LD 280653e90a53Smrglt_save_GCC=$GCC 280753e90a53SmrgGCC=$GXX 280853e90a53Smrglt_save_with_gnu_ld=$with_gnu_ld 280953e90a53Smrglt_save_path_LD=$lt_cv_path_LD 281053e90a53Smrgif test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 281153e90a53Smrg lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 281253e90a53Smrgelse 281353e90a53Smrg $as_unset lt_cv_prog_gnu_ld 281453e90a53Smrgfi 281553e90a53Smrgif test -n "${lt_cv_path_LDCXX+set}"; then 281653e90a53Smrg lt_cv_path_LD=$lt_cv_path_LDCXX 281753e90a53Smrgelse 281853e90a53Smrg $as_unset lt_cv_path_LD 281953e90a53Smrgfi 282053e90a53Smrgtest -z "${LDCXX+set}" || LD=$LDCXX 282153e90a53SmrgCC=${CXX-"c++"} 282253e90a53Smrgcompiler=$CC 282353e90a53Smrg_LT_AC_TAGVAR(compiler, $1)=$CC 282453e90a53Smrg_LT_CC_BASENAME([$compiler]) 282553e90a53Smrg 282653e90a53Smrg# We don't want -fno-exception wen compiling C++ code, so set the 282753e90a53Smrg# no_builtin_flag separately 282853e90a53Smrgif test "$GXX" = yes; then 282953e90a53Smrg _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 283053e90a53Smrgelse 283153e90a53Smrg _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 283253e90a53Smrgfi 283353e90a53Smrg 283453e90a53Smrgif test "$GXX" = yes; then 283553e90a53Smrg # Set up default GNU C++ configuration 283653e90a53Smrg 283753e90a53Smrg AC_PROG_LD 283853e90a53Smrg 283953e90a53Smrg # Check if GNU C++ uses GNU ld as the underlying linker, since the 284053e90a53Smrg # archiving commands below assume that GNU ld is being used. 284153e90a53Smrg if test "$with_gnu_ld" = yes; then 284253e90a53Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 284353e90a53Smrg _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' 284453e90a53Smrg 284553e90a53Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 284653e90a53Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 284753e90a53Smrg 284853e90a53Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 284953e90a53Smrg # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 285053e90a53Smrg # investigate it a little bit more. (MM) 285153e90a53Smrg wlarc='${wl}' 285253e90a53Smrg 285353e90a53Smrg # ancient GNU ld didn't support --whole-archive et. al. 285453e90a53Smrg if eval "`$CC -print-prog-name=ld` --help 2>&1" | \ 285553e90a53Smrg grep 'no-whole-archive' > /dev/null; then 285653e90a53Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 285753e90a53Smrg else 285853e90a53Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 285953e90a53Smrg fi 286053e90a53Smrg else 286153e90a53Smrg with_gnu_ld=no 286253e90a53Smrg wlarc= 286353e90a53Smrg 286453e90a53Smrg # A generic and very simple default shared library creation 286553e90a53Smrg # command for GNU C++ for the case where it uses the native 286653e90a53Smrg # linker, instead of GNU ld. If possible, this setting should 286753e90a53Smrg # overridden to take advantage of the native linker features on 286853e90a53Smrg # the platform it is being used on. 286953e90a53Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 287053e90a53Smrg fi 287153e90a53Smrg 287253e90a53Smrg # Commands to make compiler produce verbose output that lists 287353e90a53Smrg # what "hidden" libraries, object files and flags are used when 287453e90a53Smrg # linking a shared library. 287553e90a53Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' 287653e90a53Smrg 287753e90a53Smrgelse 287853e90a53Smrg GXX=no 287953e90a53Smrg with_gnu_ld=no 288053e90a53Smrg wlarc= 288153e90a53Smrgfi 288253e90a53Smrg 288353e90a53Smrg# PORTME: fill in a description of your system's C++ link characteristics 288453e90a53SmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 288553e90a53Smrg_LT_AC_TAGVAR(ld_shlibs, $1)=yes 288653e90a53Smrgcase $host_os in 288753e90a53Smrg aix3*) 288853e90a53Smrg # FIXME: insert proper C++ library support 288953e90a53Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 289053e90a53Smrg ;; 289153e90a53Smrg aix4* | aix5*) 289253e90a53Smrg if test "$host_cpu" = ia64; then 289353e90a53Smrg # On IA64, the linker does run time linking by default, so we don't 289453e90a53Smrg # have to do anything special. 289553e90a53Smrg aix_use_runtimelinking=no 289653e90a53Smrg exp_sym_flag='-Bexport' 289753e90a53Smrg no_entry_flag="" 289853e90a53Smrg else 289953e90a53Smrg aix_use_runtimelinking=no 290053e90a53Smrg 290153e90a53Smrg # Test if we are trying to use run time linking or normal 290253e90a53Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 290353e90a53Smrg # need to do runtime linking. 290453e90a53Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*) 290553e90a53Smrg for ld_flag in $LDFLAGS; do 290653e90a53Smrg case $ld_flag in 290753e90a53Smrg *-brtl*) 290853e90a53Smrg aix_use_runtimelinking=yes 290953e90a53Smrg break 291053e90a53Smrg ;; 291153e90a53Smrg esac 291253e90a53Smrg done 291353e90a53Smrg ;; 291453e90a53Smrg esac 291553e90a53Smrg 291653e90a53Smrg exp_sym_flag='-bexport' 291753e90a53Smrg no_entry_flag='-bnoentry' 291853e90a53Smrg fi 291953e90a53Smrg 292053e90a53Smrg # When large executables or shared objects are built, AIX ld can 292153e90a53Smrg # have problems creating the table of contents. If linking a library 292253e90a53Smrg # or program results in "error TOC overflow" add -mminimal-toc to 292353e90a53Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 292453e90a53Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 292553e90a53Smrg 292653e90a53Smrg _LT_AC_TAGVAR(archive_cmds, $1)='' 292753e90a53Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 292853e90a53Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' 292953e90a53Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 293053e90a53Smrg 293153e90a53Smrg if test "$GXX" = yes; then 293253e90a53Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 293353e90a53Smrg # We only want to do this on AIX 4.2 and lower, the check 293453e90a53Smrg # below for broken collect2 doesn't work under 4.3+ 293553e90a53Smrg collect2name=`${CC} -print-prog-name=collect2` 293653e90a53Smrg if test -f "$collect2name" && \ 293753e90a53Smrg strings "$collect2name" | grep resolve_lib_name >/dev/null 293853e90a53Smrg then 293953e90a53Smrg # We have reworked collect2 294053e90a53Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 294153e90a53Smrg else 294253e90a53Smrg # We have old collect2 294353e90a53Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported 294453e90a53Smrg # It fails to find uninstalled libraries when the uninstalled 294553e90a53Smrg # path is not listed in the libpath. Setting hardcode_minus_L 294653e90a53Smrg # to unsupported forces relinking 294753e90a53Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 294853e90a53Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 294953e90a53Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 295053e90a53Smrg fi 295153e90a53Smrg ;; 295253e90a53Smrg esac 295353e90a53Smrg shared_flag='-shared' 295453e90a53Smrg if test "$aix_use_runtimelinking" = yes; then 295553e90a53Smrg shared_flag="$shared_flag "'${wl}-G' 295653e90a53Smrg fi 295753e90a53Smrg else 295853e90a53Smrg # not using gcc 295953e90a53Smrg if test "$host_cpu" = ia64; then 296053e90a53Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 296153e90a53Smrg # chokes on -Wl,-G. The following line is correct: 296253e90a53Smrg shared_flag='-G' 296353e90a53Smrg else 296453e90a53Smrg if test "$aix_use_runtimelinking" = yes; then 296553e90a53Smrg shared_flag='${wl}-G' 296653e90a53Smrg else 296753e90a53Smrg shared_flag='${wl}-bM:SRE' 296853e90a53Smrg fi 296953e90a53Smrg fi 297053e90a53Smrg fi 297153e90a53Smrg 297253e90a53Smrg # It seems that -bexpall does not export symbols beginning with 297353e90a53Smrg # underscore (_), so it is better to generate a list of symbols to export. 297453e90a53Smrg _LT_AC_TAGVAR(always_export_symbols, $1)=yes 297553e90a53Smrg if test "$aix_use_runtimelinking" = yes; then 297653e90a53Smrg # Warning - without using the other runtime loading flags (-brtl), 297753e90a53Smrg # -berok will link without error, but may produce a broken library. 297853e90a53Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' 297953e90a53Smrg # Determine the default libpath from the value encoded in an empty executable. 298053e90a53Smrg _LT_AC_SYS_LIBPATH_AIX 298153e90a53Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 298253e90a53Smrg 298353e90a53Smrg _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" 298453e90a53Smrg else 298553e90a53Smrg if test "$host_cpu" = ia64; then 298653e90a53Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 298753e90a53Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 298853e90a53Smrg _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" 298953e90a53Smrg else 299053e90a53Smrg # Determine the default libpath from the value encoded in an empty executable. 299153e90a53Smrg _LT_AC_SYS_LIBPATH_AIX 299253e90a53Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 299353e90a53Smrg # Warning - without using the other run time loading flags, 299453e90a53Smrg # -berok will link without error, but may produce a broken library. 299553e90a53Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 299653e90a53Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 299753e90a53Smrg # Exported symbols can be pulled into shared objects from archives 299853e90a53Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 299953e90a53Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes 300053e90a53Smrg # This is similar to how AIX traditionally builds its shared libraries. 300153e90a53Smrg _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' 300253e90a53Smrg fi 300353e90a53Smrg fi 300453e90a53Smrg ;; 300553e90a53Smrg 300653e90a53Smrg beos*) 300753e90a53Smrg if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 300853e90a53Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 300953e90a53Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 301053e90a53Smrg # support --undefined. This deserves some investigation. FIXME 301153e90a53Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 301253e90a53Smrg else 301353e90a53Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 301453e90a53Smrg fi 301553e90a53Smrg ;; 301653e90a53Smrg 301753e90a53Smrg chorus*) 301853e90a53Smrg case $cc_basename in 301953e90a53Smrg *) 302053e90a53Smrg # FIXME: insert proper C++ library support 302153e90a53Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 302253e90a53Smrg ;; 302353e90a53Smrg esac 302453e90a53Smrg ;; 302553e90a53Smrg 302653e90a53Smrg cygwin* | mingw* | pw32*) 302753e90a53Smrg # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 302853e90a53Smrg # as there is no search path for DLLs. 302953e90a53Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 303053e90a53Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 303153e90a53Smrg _LT_AC_TAGVAR(always_export_symbols, $1)=no 303253e90a53Smrg _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 303353e90a53Smrg 303453e90a53Smrg if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then 303553e90a53Smrg _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' 303653e90a53Smrg # If the export-symbols file already is a .def file (1st line 303753e90a53Smrg # is EXPORTS), use it as is; otherwise, prepend... 303853e90a53Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 303953e90a53Smrg cp $export_symbols $output_objdir/$soname.def; 304053e90a53Smrg else 304153e90a53Smrg echo EXPORTS > $output_objdir/$soname.def; 304253e90a53Smrg cat $export_symbols >> $output_objdir/$soname.def; 304353e90a53Smrg fi~ 304453e90a53Smrg $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' 304553e90a53Smrg else 304653e90a53Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 304753e90a53Smrg fi 304853e90a53Smrg ;; 304953e90a53Smrg darwin* | rhapsody*) 305053e90a53Smrg case $host_os in 305153e90a53Smrg rhapsody* | darwin1.[[012]]) 305253e90a53Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' 305353e90a53Smrg ;; 305453e90a53Smrg *) # Darwin 1.3 on 305553e90a53Smrg if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then 305653e90a53Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' 305753e90a53Smrg else 305853e90a53Smrg case ${MACOSX_DEPLOYMENT_TARGET} in 305953e90a53Smrg 10.[[012]]) 306053e90a53Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' 306153e90a53Smrg ;; 306253e90a53Smrg 10.*) 306353e90a53Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup' 306453e90a53Smrg ;; 306553e90a53Smrg esac 306653e90a53Smrg fi 306753e90a53Smrg ;; 306853e90a53Smrg esac 306953e90a53Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 307053e90a53Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 307153e90a53Smrg _LT_AC_TAGVAR(hardcode_automatic, $1)=yes 307253e90a53Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 307353e90a53Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' 307453e90a53Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 307553e90a53Smrg 307653e90a53Smrg if test "$GXX" = yes ; then 307753e90a53Smrg lt_int_apple_cc_single_mod=no 307853e90a53Smrg output_verbose_link_cmd='echo' 307953e90a53Smrg if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then 308053e90a53Smrg lt_int_apple_cc_single_mod=yes 308153e90a53Smrg fi 308253e90a53Smrg if test "X$lt_int_apple_cc_single_mod" = Xyes ; then 308353e90a53Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' 308453e90a53Smrg else 308553e90a53Smrg _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' 308653e90a53Smrg fi 308753e90a53Smrg _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' 308853e90a53Smrg # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds 308953e90a53Smrg if test "X$lt_int_apple_cc_single_mod" = Xyes ; then 309053e90a53Smrg _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}' 309153e90a53Smrg else 309253e90a53Smrg _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}' 309353e90a53Smrg fi 309453e90a53Smrg _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}' 309553e90a53Smrg else 309653e90a53Smrg case $cc_basename in 309753e90a53Smrg xlc*) 309853e90a53Smrg output_verbose_link_cmd='echo' 309953e90a53Smrg _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' 310053e90a53Smrg _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' 310153e90a53Smrg # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds 310253e90a53Smrg _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}' 310353e90a53Smrg _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}' 310453e90a53Smrg ;; 310553e90a53Smrg *) 310653e90a53Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 310753e90a53Smrg ;; 310853e90a53Smrg esac 310953e90a53Smrg fi 311053e90a53Smrg ;; 311153e90a53Smrg 311253e90a53Smrg dgux*) 311353e90a53Smrg case $cc_basename in 311453e90a53Smrg ec++*) 311553e90a53Smrg # FIXME: insert proper C++ library support 311653e90a53Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 311753e90a53Smrg ;; 311853e90a53Smrg ghcx*) 311953e90a53Smrg # Green Hills C++ Compiler 312053e90a53Smrg # FIXME: insert proper C++ library support 312153e90a53Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 312253e90a53Smrg ;; 312353e90a53Smrg *) 312453e90a53Smrg # FIXME: insert proper C++ library support 312553e90a53Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 312653e90a53Smrg ;; 312753e90a53Smrg esac 312853e90a53Smrg ;; 312953e90a53Smrg freebsd[[12]]*) 313053e90a53Smrg # C++ shared libraries reported to be fairly broken before switch to ELF 313153e90a53Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 313253e90a53Smrg ;; 313353e90a53Smrg freebsd-elf*) 313453e90a53Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 313553e90a53Smrg ;; 313653e90a53Smrg freebsd* | kfreebsd*-gnu | dragonfly*) 313753e90a53Smrg # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 313853e90a53Smrg # conventions 313953e90a53Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=yes 314053e90a53Smrg ;; 314153e90a53Smrg gnu*) 314253e90a53Smrg ;; 314353e90a53Smrg hpux9*) 314453e90a53Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 314553e90a53Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 314653e90a53Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 314753e90a53Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 314853e90a53Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 314953e90a53Smrg # but as the default 315053e90a53Smrg # location of the library. 315153e90a53Smrg 315253e90a53Smrg case $cc_basename in 315353e90a53Smrg CC*) 315453e90a53Smrg # FIXME: insert proper C++ library support 315553e90a53Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 315653e90a53Smrg ;; 315753e90a53Smrg aCC*) 315853e90a53Smrg _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' 315953e90a53Smrg # Commands to make compiler produce verbose output that lists 316053e90a53Smrg # what "hidden" libraries, object files and flags are used when 316153e90a53Smrg # linking a shared library. 316253e90a53Smrg # 316353e90a53Smrg # There doesn't appear to be a way to prevent this compiler from 316453e90a53Smrg # explicitly linking system object files so we need to strip them 316553e90a53Smrg # from the output so that they don't get included in the library 316653e90a53Smrg # dependencies. 316753e90a53Smrg 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' 316853e90a53Smrg ;; 316953e90a53Smrg *) 317053e90a53Smrg if test "$GXX" = yes; then 317153e90a53Smrg _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' 317253e90a53Smrg else 317353e90a53Smrg # FIXME: insert proper C++ library support 317453e90a53Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 317553e90a53Smrg fi 317653e90a53Smrg ;; 317753e90a53Smrg esac 317853e90a53Smrg ;; 317953e90a53Smrg hpux10*|hpux11*) 318053e90a53Smrg if test $with_gnu_ld = no; then 318153e90a53Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 318253e90a53Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 318353e90a53Smrg 318453e90a53Smrg case $host_cpu in 318553e90a53Smrg hppa*64*|ia64*) 318653e90a53Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' 318753e90a53Smrg ;; 318853e90a53Smrg *) 318953e90a53Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 319053e90a53Smrg ;; 319153e90a53Smrg esac 319253e90a53Smrg fi 319353e90a53Smrg case $host_cpu in 319453e90a53Smrg hppa*64*|ia64*) 319553e90a53Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 319653e90a53Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 319753e90a53Smrg ;; 319853e90a53Smrg *) 319953e90a53Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 320053e90a53Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 320153e90a53Smrg # but as the default 320253e90a53Smrg # location of the library. 320353e90a53Smrg ;; 320453e90a53Smrg esac 320553e90a53Smrg 320653e90a53Smrg case $cc_basename in 320753e90a53Smrg CC*) 320853e90a53Smrg # FIXME: insert proper C++ library support 320953e90a53Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 321053e90a53Smrg ;; 321153e90a53Smrg aCC*) 321253e90a53Smrg case $host_cpu in 321353e90a53Smrg hppa*64*) 321453e90a53Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 321553e90a53Smrg ;; 321653e90a53Smrg ia64*) 321753e90a53Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 321853e90a53Smrg ;; 321953e90a53Smrg *) 322053e90a53Smrg _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' 322153e90a53Smrg ;; 322253e90a53Smrg esac 322353e90a53Smrg # Commands to make compiler produce verbose output that lists 322453e90a53Smrg # what "hidden" libraries, object files and flags are used when 322553e90a53Smrg # linking a shared library. 322653e90a53Smrg # 322753e90a53Smrg # There doesn't appear to be a way to prevent this compiler from 322853e90a53Smrg # explicitly linking system object files so we need to strip them 322953e90a53Smrg # from the output so that they don't get included in the library 323053e90a53Smrg # dependencies. 323153e90a53Smrg 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' 323253e90a53Smrg ;; 323353e90a53Smrg *) 323453e90a53Smrg if test "$GXX" = yes; then 323553e90a53Smrg if test $with_gnu_ld = no; then 323653e90a53Smrg case $host_cpu in 323753e90a53Smrg hppa*64*) 323853e90a53Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 323953e90a53Smrg ;; 324053e90a53Smrg ia64*) 324153e90a53Smrg _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' 324253e90a53Smrg ;; 324353e90a53Smrg *) 324453e90a53Smrg _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' 324553e90a53Smrg ;; 324653e90a53Smrg esac 324753e90a53Smrg fi 324853e90a53Smrg else 324953e90a53Smrg # FIXME: insert proper C++ library support 325053e90a53Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 325153e90a53Smrg fi 325253e90a53Smrg ;; 325353e90a53Smrg esac 325453e90a53Smrg ;; 325553e90a53Smrg interix3*) 325653e90a53Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 325753e90a53Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 325853e90a53Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 325953e90a53Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 326053e90a53Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 326153e90a53Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 326253e90a53Smrg # default) and relocated if they conflict, which is a slow very memory 326353e90a53Smrg # consuming and fragmenting process. To avoid this, we pick a random, 326453e90a53Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 326553e90a53Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 326653e90a53Smrg _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' 326753e90a53Smrg _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' 326853e90a53Smrg ;; 326953e90a53Smrg irix5* | irix6*) 327053e90a53Smrg case $cc_basename in 327153e90a53Smrg CC*) 327253e90a53Smrg # SGI C++ 327353e90a53Smrg _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' 327453e90a53Smrg 327553e90a53Smrg # Archives containing C++ object files must be created using 327653e90a53Smrg # "CC -ar", where "CC" is the IRIX C++ compiler. This is 327753e90a53Smrg # necessary to make sure instantiated templates are included 327853e90a53Smrg # in the archive. 327953e90a53Smrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 328053e90a53Smrg ;; 328153e90a53Smrg *) 328253e90a53Smrg if test "$GXX" = yes; then 328353e90a53Smrg if test "$with_gnu_ld" = no; then 328453e90a53Smrg _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' 328553e90a53Smrg else 328653e90a53Smrg _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' 328753e90a53Smrg fi 328853e90a53Smrg fi 328953e90a53Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 329053e90a53Smrg ;; 329153e90a53Smrg esac 329253e90a53Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 329353e90a53Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 329453e90a53Smrg ;; 329553e90a53Smrg linux*) 329653e90a53Smrg case $cc_basename in 329753e90a53Smrg KCC*) 329853e90a53Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 329953e90a53Smrg 330053e90a53Smrg # KCC will only create a shared library if the output file 330153e90a53Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 330253e90a53Smrg # to its proper name (with version) after linking. 330353e90a53Smrg _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' 330453e90a53Smrg _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' 330553e90a53Smrg # Commands to make compiler produce verbose output that lists 330653e90a53Smrg # what "hidden" libraries, object files and flags are used when 330753e90a53Smrg # linking a shared library. 330853e90a53Smrg # 330953e90a53Smrg # There doesn't appear to be a way to prevent this compiler from 331053e90a53Smrg # explicitly linking system object files so we need to strip them 331153e90a53Smrg # from the output so that they don't get included in the library 331253e90a53Smrg # dependencies. 331353e90a53Smrg 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' 331453e90a53Smrg 331553e90a53Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir' 331653e90a53Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 331753e90a53Smrg 331853e90a53Smrg # Archives containing C++ object files must be created using 331953e90a53Smrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 332053e90a53Smrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 332153e90a53Smrg ;; 332253e90a53Smrg icpc*) 332353e90a53Smrg # Intel C++ 332453e90a53Smrg with_gnu_ld=yes 332553e90a53Smrg # version 8.0 and above of icpc choke on multiply defined symbols 332653e90a53Smrg # if we add $predep_objects and $postdep_objects, however 7.1 and 332753e90a53Smrg # earlier do not add the objects themselves. 332853e90a53Smrg case `$CC -V 2>&1` in 332953e90a53Smrg *"Version 7."*) 333053e90a53Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 333153e90a53Smrg _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' 333253e90a53Smrg ;; 333353e90a53Smrg *) # Version 8.0 or newer 333453e90a53Smrg tmp_idyn= 333553e90a53Smrg case $host_cpu in 333653e90a53Smrg ia64*) tmp_idyn=' -i_dynamic';; 333753e90a53Smrg esac 333853e90a53Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 333953e90a53Smrg _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' 334053e90a53Smrg ;; 334153e90a53Smrg esac 334253e90a53Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 334353e90a53Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 334453e90a53Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 334553e90a53Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 334653e90a53Smrg ;; 334753e90a53Smrg pgCC*) 334853e90a53Smrg # Portland Group C++ compiler 334953e90a53Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 335053e90a53Smrg _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' 335153e90a53Smrg 335253e90a53Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 335353e90a53Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 335453e90a53Smrg _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' 335553e90a53Smrg ;; 335653e90a53Smrg cxx*) 335753e90a53Smrg # Compaq C++ 335853e90a53Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 335953e90a53Smrg _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' 336053e90a53Smrg 336153e90a53Smrg runpath_var=LD_RUN_PATH 336253e90a53Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 336353e90a53Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 336453e90a53Smrg 336553e90a53Smrg # Commands to make compiler produce verbose output that lists 336653e90a53Smrg # what "hidden" libraries, object files and flags are used when 336753e90a53Smrg # linking a shared library. 336853e90a53Smrg # 336953e90a53Smrg # There doesn't appear to be a way to prevent this compiler from 337053e90a53Smrg # explicitly linking system object files so we need to strip them 337153e90a53Smrg # from the output so that they don't get included in the library 337253e90a53Smrg # dependencies. 337353e90a53Smrg 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' 337453e90a53Smrg ;; 337553e90a53Smrg esac 337653e90a53Smrg ;; 337753e90a53Smrg lynxos*) 337853e90a53Smrg # FIXME: insert proper C++ library support 337953e90a53Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 338053e90a53Smrg ;; 338153e90a53Smrg m88k*) 338253e90a53Smrg # FIXME: insert proper C++ library support 338353e90a53Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 338453e90a53Smrg ;; 338553e90a53Smrg mvs*) 338653e90a53Smrg case $cc_basename in 338753e90a53Smrg cxx*) 338853e90a53Smrg # FIXME: insert proper C++ library support 338953e90a53Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 339053e90a53Smrg ;; 339153e90a53Smrg *) 339253e90a53Smrg # FIXME: insert proper C++ library support 339353e90a53Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 339453e90a53Smrg ;; 339553e90a53Smrg esac 339653e90a53Smrg ;; 339753e90a53Smrg netbsd*) 339853e90a53Smrg if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then 339953e90a53Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 340053e90a53Smrg wlarc= 340153e90a53Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 340253e90a53Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 340353e90a53Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 340453e90a53Smrg fi 340553e90a53Smrg # Workaround some broken pre-1.5 toolchains 340653e90a53Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 340753e90a53Smrg ;; 340853e90a53Smrg openbsd2*) 340953e90a53Smrg # C++ shared libraries are fairly broken 341053e90a53Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 341153e90a53Smrg ;; 341253e90a53Smrg openbsd*) 341353e90a53Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 341453e90a53Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 341553e90a53Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 341653e90a53Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 341753e90a53Smrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 341853e90a53Smrg _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' 341953e90a53Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 342053e90a53Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 342153e90a53Smrg fi 342253e90a53Smrg output_verbose_link_cmd='echo' 342353e90a53Smrg ;; 342453e90a53Smrg osf3*) 342553e90a53Smrg case $cc_basename in 342653e90a53Smrg KCC*) 342753e90a53Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 342853e90a53Smrg 342953e90a53Smrg # KCC will only create a shared library if the output file 343053e90a53Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 343153e90a53Smrg # to its proper name (with version) after linking. 343253e90a53Smrg _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' 343353e90a53Smrg 343453e90a53Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 343553e90a53Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 343653e90a53Smrg 343753e90a53Smrg # Archives containing C++ object files must be created using 343853e90a53Smrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 343953e90a53Smrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 344053e90a53Smrg 344153e90a53Smrg ;; 344253e90a53Smrg RCC*) 344353e90a53Smrg # Rational C++ 2.4.1 344453e90a53Smrg # FIXME: insert proper C++ library support 344553e90a53Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 344653e90a53Smrg ;; 344753e90a53Smrg cxx*) 344853e90a53Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 344953e90a53Smrg _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' 345053e90a53Smrg 345153e90a53Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 345253e90a53Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 345353e90a53Smrg 345453e90a53Smrg # Commands to make compiler produce verbose output that lists 345553e90a53Smrg # what "hidden" libraries, object files and flags are used when 345653e90a53Smrg # linking a shared library. 345753e90a53Smrg # 345853e90a53Smrg # There doesn't appear to be a way to prevent this compiler from 345953e90a53Smrg # explicitly linking system object files so we need to strip them 346053e90a53Smrg # from the output so that they don't get included in the library 346153e90a53Smrg # dependencies. 346253e90a53Smrg 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' 346353e90a53Smrg ;; 346453e90a53Smrg *) 346553e90a53Smrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 346653e90a53Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 346753e90a53Smrg _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' 346853e90a53Smrg 346953e90a53Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 347053e90a53Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 347153e90a53Smrg 347253e90a53Smrg # Commands to make compiler produce verbose output that lists 347353e90a53Smrg # what "hidden" libraries, object files and flags are used when 347453e90a53Smrg # linking a shared library. 347553e90a53Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' 347653e90a53Smrg 347753e90a53Smrg else 347853e90a53Smrg # FIXME: insert proper C++ library support 347953e90a53Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 348053e90a53Smrg fi 348153e90a53Smrg ;; 348253e90a53Smrg esac 348353e90a53Smrg ;; 348453e90a53Smrg osf4* | osf5*) 348553e90a53Smrg case $cc_basename in 348653e90a53Smrg KCC*) 348753e90a53Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 348853e90a53Smrg 348953e90a53Smrg # KCC will only create a shared library if the output file 349053e90a53Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 349153e90a53Smrg # to its proper name (with version) after linking. 349253e90a53Smrg _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' 349353e90a53Smrg 349453e90a53Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 349553e90a53Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 349653e90a53Smrg 349753e90a53Smrg # Archives containing C++ object files must be created using 349853e90a53Smrg # the KAI C++ compiler. 349953e90a53Smrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' 350053e90a53Smrg ;; 350153e90a53Smrg RCC*) 350253e90a53Smrg # Rational C++ 2.4.1 350353e90a53Smrg # FIXME: insert proper C++ library support 350453e90a53Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 350553e90a53Smrg ;; 350653e90a53Smrg cxx*) 350753e90a53Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 350853e90a53Smrg _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' 350953e90a53Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 351053e90a53Smrg echo "-hidden">> $lib.exp~ 351153e90a53Smrg $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~ 351253e90a53Smrg $rm $lib.exp' 351353e90a53Smrg 351453e90a53Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 351553e90a53Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 351653e90a53Smrg 351753e90a53Smrg # Commands to make compiler produce verbose output that lists 351853e90a53Smrg # what "hidden" libraries, object files and flags are used when 351953e90a53Smrg # linking a shared library. 352053e90a53Smrg # 352153e90a53Smrg # There doesn't appear to be a way to prevent this compiler from 352253e90a53Smrg # explicitly linking system object files so we need to strip them 352353e90a53Smrg # from the output so that they don't get included in the library 352453e90a53Smrg # dependencies. 352553e90a53Smrg 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' 352653e90a53Smrg ;; 352753e90a53Smrg *) 352853e90a53Smrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 352953e90a53Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 353053e90a53Smrg _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' 353153e90a53Smrg 353253e90a53Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 353353e90a53Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 353453e90a53Smrg 353553e90a53Smrg # Commands to make compiler produce verbose output that lists 353653e90a53Smrg # what "hidden" libraries, object files and flags are used when 353753e90a53Smrg # linking a shared library. 353853e90a53Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' 353953e90a53Smrg 354053e90a53Smrg else 354153e90a53Smrg # FIXME: insert proper C++ library support 354253e90a53Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 354353e90a53Smrg fi 354453e90a53Smrg ;; 354553e90a53Smrg esac 354653e90a53Smrg ;; 354753e90a53Smrg psos*) 354853e90a53Smrg # FIXME: insert proper C++ library support 354953e90a53Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 355053e90a53Smrg ;; 355153e90a53Smrg sunos4*) 355253e90a53Smrg case $cc_basename in 355353e90a53Smrg CC*) 355453e90a53Smrg # Sun C++ 4.x 355553e90a53Smrg # FIXME: insert proper C++ library support 355653e90a53Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 355753e90a53Smrg ;; 355853e90a53Smrg lcc*) 355953e90a53Smrg # Lucid 356053e90a53Smrg # FIXME: insert proper C++ library support 356153e90a53Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 356253e90a53Smrg ;; 356353e90a53Smrg *) 356453e90a53Smrg # FIXME: insert proper C++ library support 356553e90a53Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 356653e90a53Smrg ;; 356753e90a53Smrg esac 356853e90a53Smrg ;; 356953e90a53Smrg solaris*) 357053e90a53Smrg case $cc_basename in 357153e90a53Smrg CC*) 357253e90a53Smrg # Sun C++ 4.2, 5.x and Centerline C++ 357353e90a53Smrg _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes 357453e90a53Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' 357553e90a53Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 357653e90a53Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 357753e90a53Smrg $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' 357853e90a53Smrg 357953e90a53Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 358053e90a53Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 358153e90a53Smrg case $host_os in 358253e90a53Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 358353e90a53Smrg *) 358453e90a53Smrg # The C++ compiler is used as linker so we must use $wl 358553e90a53Smrg # flag to pass the commands to the underlying system 358653e90a53Smrg # linker. We must also pass each convience library through 358753e90a53Smrg # to the system linker between allextract/defaultextract. 358853e90a53Smrg # The C++ compiler will combine linker options so we 358953e90a53Smrg # cannot just pass the convience library names through 359053e90a53Smrg # without $wl. 359153e90a53Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 359253e90a53Smrg _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' 359353e90a53Smrg ;; 359453e90a53Smrg esac 359553e90a53Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 359653e90a53Smrg 359753e90a53Smrg output_verbose_link_cmd='echo' 359853e90a53Smrg 359953e90a53Smrg # Archives containing C++ object files must be created using 360053e90a53Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 360153e90a53Smrg # necessary to make sure instantiated templates are included 360253e90a53Smrg # in the archive. 360353e90a53Smrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 360453e90a53Smrg ;; 360553e90a53Smrg gcx*) 360653e90a53Smrg # Green Hills C++ Compiler 360753e90a53Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 360853e90a53Smrg 360953e90a53Smrg # The C++ compiler must be used to create the archive. 361053e90a53Smrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 361153e90a53Smrg ;; 361253e90a53Smrg *) 361353e90a53Smrg # GNU C++ compiler with Solaris linker 361453e90a53Smrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 361553e90a53Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' 361653e90a53Smrg if $CC --version | grep -v '^2\.7' > /dev/null; then 361753e90a53Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 361853e90a53Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 361953e90a53Smrg $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' 362053e90a53Smrg 362153e90a53Smrg # Commands to make compiler produce verbose output that lists 362253e90a53Smrg # what "hidden" libraries, object files and flags are used when 362353e90a53Smrg # linking a shared library. 362453e90a53Smrg output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" 362553e90a53Smrg else 362653e90a53Smrg # g++ 2.7 appears to require `-G' NOT `-shared' on this 362753e90a53Smrg # platform. 362853e90a53Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 362953e90a53Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 363053e90a53Smrg $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' 363153e90a53Smrg 363253e90a53Smrg # Commands to make compiler produce verbose output that lists 363353e90a53Smrg # what "hidden" libraries, object files and flags are used when 363453e90a53Smrg # linking a shared library. 363553e90a53Smrg output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" 363653e90a53Smrg fi 363753e90a53Smrg 363853e90a53Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' 363953e90a53Smrg fi 364053e90a53Smrg ;; 364153e90a53Smrg esac 364253e90a53Smrg ;; 364353e90a53Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 364453e90a53Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 364553e90a53Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 364653e90a53Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 364753e90a53Smrg runpath_var='LD_RUN_PATH' 364853e90a53Smrg 364953e90a53Smrg case $cc_basename in 365053e90a53Smrg CC*) 365153e90a53Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 365253e90a53Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 365353e90a53Smrg ;; 365453e90a53Smrg *) 365553e90a53Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 365653e90a53Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 365753e90a53Smrg ;; 365853e90a53Smrg esac 365953e90a53Smrg ;; 366053e90a53Smrg sysv5* | sco3.2v5* | sco5v6*) 366153e90a53Smrg # Note: We can NOT use -z defs as we might desire, because we do not 366253e90a53Smrg # link with -lc, and that would cause any symbols used from libc to 366353e90a53Smrg # always be unresolved, which means just about no library would 366453e90a53Smrg # ever link correctly. If we're not using GNU ld we use -z text 366553e90a53Smrg # though, which does catch some bad symbols but isn't as heavy-handed 366653e90a53Smrg # as -z defs. 366753e90a53Smrg # For security reasons, it is highly recommended that you always 366853e90a53Smrg # use absolute paths for naming shared libraries, and exclude the 366953e90a53Smrg # DT_RUNPATH tag from executables and libraries. But doing so 367053e90a53Smrg # requires that you compile everything twice, which is a pain. 367153e90a53Smrg # So that behaviour is only enabled if SCOABSPATH is set to a 367253e90a53Smrg # non-empty value in the environment. Most likely only useful for 367353e90a53Smrg # creating official distributions of packages. 367453e90a53Smrg # This is a hack until libtool officially supports absolute path 367553e90a53Smrg # names for shared libraries. 367653e90a53Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 367753e90a53Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 367853e90a53Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 367953e90a53Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 368053e90a53Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' 368153e90a53Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' 368253e90a53Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 368353e90a53Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 368453e90a53Smrg runpath_var='LD_RUN_PATH' 368553e90a53Smrg 368653e90a53Smrg case $cc_basename in 368753e90a53Smrg CC*) 368853e90a53Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' 368953e90a53Smrg _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' 369053e90a53Smrg ;; 369153e90a53Smrg *) 369253e90a53Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' 369353e90a53Smrg _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' 369453e90a53Smrg ;; 369553e90a53Smrg esac 369653e90a53Smrg ;; 369753e90a53Smrg tandem*) 369853e90a53Smrg case $cc_basename in 369953e90a53Smrg NCC*) 370053e90a53Smrg # NonStop-UX NCC 3.20 370153e90a53Smrg # FIXME: insert proper C++ library support 370253e90a53Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 370353e90a53Smrg ;; 370453e90a53Smrg *) 370553e90a53Smrg # FIXME: insert proper C++ library support 370653e90a53Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 370753e90a53Smrg ;; 370853e90a53Smrg esac 370953e90a53Smrg ;; 371053e90a53Smrg vxworks*) 371153e90a53Smrg # FIXME: insert proper C++ library support 371253e90a53Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 371353e90a53Smrg ;; 371453e90a53Smrg *) 371553e90a53Smrg # FIXME: insert proper C++ library support 371653e90a53Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 371753e90a53Smrg ;; 371853e90a53Smrgesac 371953e90a53SmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) 372053e90a53Smrgtest "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 372153e90a53Smrg 372253e90a53Smrg_LT_AC_TAGVAR(GCC, $1)="$GXX" 372353e90a53Smrg_LT_AC_TAGVAR(LD, $1)="$LD" 372453e90a53Smrg 372553e90a53SmrgAC_LIBTOOL_POSTDEP_PREDEP($1) 372653e90a53SmrgAC_LIBTOOL_PROG_COMPILER_PIC($1) 372753e90a53SmrgAC_LIBTOOL_PROG_CC_C_O($1) 372853e90a53SmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) 372953e90a53SmrgAC_LIBTOOL_PROG_LD_SHLIBS($1) 373053e90a53SmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1) 373153e90a53SmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) 373253e90a53Smrg 373353e90a53SmrgAC_LIBTOOL_CONFIG($1) 373453e90a53Smrg 373553e90a53SmrgAC_LANG_POP 373653e90a53SmrgCC=$lt_save_CC 373753e90a53SmrgLDCXX=$LD 373853e90a53SmrgLD=$lt_save_LD 373953e90a53SmrgGCC=$lt_save_GCC 374053e90a53Smrgwith_gnu_ldcxx=$with_gnu_ld 374153e90a53Smrgwith_gnu_ld=$lt_save_with_gnu_ld 374253e90a53Smrglt_cv_path_LDCXX=$lt_cv_path_LD 374353e90a53Smrglt_cv_path_LD=$lt_save_path_LD 374453e90a53Smrglt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 374553e90a53Smrglt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 374653e90a53Smrg])# AC_LIBTOOL_LANG_CXX_CONFIG 374753e90a53Smrg 374853e90a53Smrg# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME]) 374953e90a53Smrg# ------------------------------------ 375053e90a53Smrg# Figure out "hidden" library dependencies from verbose 375153e90a53Smrg# compiler output when linking a shared library. 375253e90a53Smrg# Parse the compiler output and extract the necessary 375353e90a53Smrg# objects, libraries and library flags. 375453e90a53SmrgAC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[ 375553e90a53Smrgdnl we can't use the lt_simple_compile_test_code here, 375653e90a53Smrgdnl because it contains code intended for an executable, 375753e90a53Smrgdnl not a library. It's possible we should let each 375853e90a53Smrgdnl tag define a new lt_????_link_test_code variable, 375953e90a53Smrgdnl but it's only used here... 376053e90a53Smrgifelse([$1],[],[cat > conftest.$ac_ext <<EOF 376153e90a53Smrgint a; 376253e90a53Smrgvoid foo (void) { a = 0; } 376353e90a53SmrgEOF 376453e90a53Smrg],[$1],[CXX],[cat > conftest.$ac_ext <<EOF 376553e90a53Smrgclass Foo 376653e90a53Smrg{ 376753e90a53Smrgpublic: 376853e90a53Smrg Foo (void) { a = 0; } 376953e90a53Smrgprivate: 377053e90a53Smrg int a; 377153e90a53Smrg}; 377253e90a53SmrgEOF 377353e90a53Smrg],[$1],[F77],[cat > conftest.$ac_ext <<EOF 377453e90a53Smrg subroutine foo 377553e90a53Smrg implicit none 377653e90a53Smrg integer*4 a 377753e90a53Smrg a=0 377853e90a53Smrg return 377953e90a53Smrg end 378053e90a53SmrgEOF 378153e90a53Smrg],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF 378253e90a53Smrgpublic class foo { 378353e90a53Smrg private int a; 378453e90a53Smrg public void bar (void) { 378553e90a53Smrg a = 0; 378653e90a53Smrg } 378753e90a53Smrg}; 378853e90a53SmrgEOF 378953e90a53Smrg]) 379053e90a53Smrgdnl Parse the compiler output and extract the necessary 379153e90a53Smrgdnl objects, libraries and library flags. 379253e90a53Smrgif AC_TRY_EVAL(ac_compile); then 379353e90a53Smrg # Parse the compiler output and extract the necessary 379453e90a53Smrg # objects, libraries and library flags. 379553e90a53Smrg 379653e90a53Smrg # Sentinel used to keep track of whether or not we are before 379753e90a53Smrg # the conftest object file. 379853e90a53Smrg pre_test_object_deps_done=no 379953e90a53Smrg 380053e90a53Smrg # The `*' in the case matches for architectures that use `case' in 380153e90a53Smrg # $output_verbose_cmd can trigger glob expansion during the loop 380253e90a53Smrg # eval without this substitution. 380353e90a53Smrg output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"` 380453e90a53Smrg 380553e90a53Smrg for p in `eval $output_verbose_link_cmd`; do 380653e90a53Smrg case $p in 380753e90a53Smrg 380853e90a53Smrg -L* | -R* | -l*) 380953e90a53Smrg # Some compilers place space between "-{L,R}" and the path. 381053e90a53Smrg # Remove the space. 381153e90a53Smrg if test $p = "-L" \ 381253e90a53Smrg || test $p = "-R"; then 381353e90a53Smrg prev=$p 381453e90a53Smrg continue 381553e90a53Smrg else 381653e90a53Smrg prev= 381753e90a53Smrg fi 381853e90a53Smrg 381953e90a53Smrg if test "$pre_test_object_deps_done" = no; then 382053e90a53Smrg case $p in 382153e90a53Smrg -L* | -R*) 382253e90a53Smrg # Internal compiler library paths should come after those 382353e90a53Smrg # provided the user. The postdeps already come after the 382453e90a53Smrg # user supplied libs so there is no need to process them. 382553e90a53Smrg if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then 382653e90a53Smrg _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" 382753e90a53Smrg else 382853e90a53Smrg _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" 382953e90a53Smrg fi 383053e90a53Smrg ;; 383153e90a53Smrg # The "-l" case would never come before the object being 383253e90a53Smrg # linked, so don't bother handling this case. 383353e90a53Smrg esac 383453e90a53Smrg else 383553e90a53Smrg if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then 383653e90a53Smrg _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}" 383753e90a53Smrg else 383853e90a53Smrg _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}" 383953e90a53Smrg fi 384053e90a53Smrg fi 384153e90a53Smrg ;; 384253e90a53Smrg 384353e90a53Smrg *.$objext) 384453e90a53Smrg # This assumes that the test object file only shows up 384553e90a53Smrg # once in the compiler output. 384653e90a53Smrg if test "$p" = "conftest.$objext"; then 384753e90a53Smrg pre_test_object_deps_done=yes 384853e90a53Smrg continue 384953e90a53Smrg fi 385053e90a53Smrg 385153e90a53Smrg if test "$pre_test_object_deps_done" = no; then 385253e90a53Smrg if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then 385353e90a53Smrg _LT_AC_TAGVAR(predep_objects, $1)="$p" 385453e90a53Smrg else 385553e90a53Smrg _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p" 385653e90a53Smrg fi 385753e90a53Smrg else 385853e90a53Smrg if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then 385953e90a53Smrg _LT_AC_TAGVAR(postdep_objects, $1)="$p" 386053e90a53Smrg else 386153e90a53Smrg _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p" 386253e90a53Smrg fi 386353e90a53Smrg fi 386453e90a53Smrg ;; 386553e90a53Smrg 386653e90a53Smrg *) ;; # Ignore the rest. 386753e90a53Smrg 386853e90a53Smrg esac 386953e90a53Smrg done 387053e90a53Smrg 387153e90a53Smrg # Clean up. 387253e90a53Smrg rm -f a.out a.exe 387353e90a53Smrgelse 387453e90a53Smrg echo "libtool.m4: error: problem compiling $1 test program" 387553e90a53Smrgfi 387653e90a53Smrg 387753e90a53Smrg$rm -f confest.$objext 387853e90a53Smrg 387953e90a53Smrg# PORTME: override above test on systems where it is broken 388053e90a53Smrgifelse([$1],[CXX], 388153e90a53Smrg[case $host_os in 388253e90a53Smrginterix3*) 388353e90a53Smrg # Interix 3.5 installs completely hosed .la files for C++, so rather than 388453e90a53Smrg # hack all around it, let's just trust "g++" to DTRT. 388553e90a53Smrg _LT_AC_TAGVAR(predep_objects,$1)= 388653e90a53Smrg _LT_AC_TAGVAR(postdep_objects,$1)= 388753e90a53Smrg _LT_AC_TAGVAR(postdeps,$1)= 388853e90a53Smrg ;; 388953e90a53Smrg 389053e90a53Smrgsolaris*) 389153e90a53Smrg case $cc_basename in 389253e90a53Smrg CC*) 389353e90a53Smrg # Adding this requires a known-good setup of shared libraries for 389453e90a53Smrg # Sun compiler versions before 5.6, else PIC objects from an old 389553e90a53Smrg # archive will be linked into the output, leading to subtle bugs. 389653e90a53Smrg _LT_AC_TAGVAR(postdeps,$1)='-lCstd -lCrun' 389753e90a53Smrg ;; 389853e90a53Smrg esac 389953e90a53Smrg ;; 390053e90a53Smrgesac 390153e90a53Smrg]) 390253e90a53Smrg 390353e90a53Smrgcase " $_LT_AC_TAGVAR(postdeps, $1) " in 390453e90a53Smrg*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;; 390553e90a53Smrgesac 390653e90a53Smrg])# AC_LIBTOOL_POSTDEP_PREDEP 390753e90a53Smrg 390853e90a53Smrg# AC_LIBTOOL_LANG_F77_CONFIG 390953e90a53Smrg# -------------------------- 391053e90a53Smrg# Ensure that the configuration vars for the C compiler are 391153e90a53Smrg# suitably defined. Those variables are subsequently used by 391253e90a53Smrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 391353e90a53SmrgAC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)]) 391453e90a53SmrgAC_DEFUN([_LT_AC_LANG_F77_CONFIG], 391553e90a53Smrg[AC_REQUIRE([AC_PROG_F77]) 391653e90a53SmrgAC_LANG_PUSH(Fortran 77) 391753e90a53Smrg 391853e90a53Smrg_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 391953e90a53Smrg_LT_AC_TAGVAR(allow_undefined_flag, $1)= 392053e90a53Smrg_LT_AC_TAGVAR(always_export_symbols, $1)=no 392153e90a53Smrg_LT_AC_TAGVAR(archive_expsym_cmds, $1)= 392253e90a53Smrg_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= 392353e90a53Smrg_LT_AC_TAGVAR(hardcode_direct, $1)=no 392453e90a53Smrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= 392553e90a53Smrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 392653e90a53Smrg_LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 392753e90a53Smrg_LT_AC_TAGVAR(hardcode_minus_L, $1)=no 392853e90a53Smrg_LT_AC_TAGVAR(hardcode_automatic, $1)=no 392953e90a53Smrg_LT_AC_TAGVAR(module_cmds, $1)= 393053e90a53Smrg_LT_AC_TAGVAR(module_expsym_cmds, $1)= 393153e90a53Smrg_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown 393253e90a53Smrg_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 393353e90a53Smrg_LT_AC_TAGVAR(no_undefined_flag, $1)= 393453e90a53Smrg_LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 393553e90a53Smrg_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no 393653e90a53Smrg 393753e90a53Smrg# Source file extension for f77 test sources. 393853e90a53Smrgac_ext=f 393953e90a53Smrg 394053e90a53Smrg# Object file extension for compiled f77 test sources. 394153e90a53Smrgobjext=o 394253e90a53Smrg_LT_AC_TAGVAR(objext, $1)=$objext 394353e90a53Smrg 394453e90a53Smrg# Code to be used in simple compile tests 394553e90a53Smrglt_simple_compile_test_code=" subroutine t\n return\n end\n" 394653e90a53Smrg 394753e90a53Smrg# Code to be used in simple link tests 394853e90a53Smrglt_simple_link_test_code=" program t\n end\n" 394953e90a53Smrg 395053e90a53Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 395153e90a53Smrg_LT_AC_SYS_COMPILER 395253e90a53Smrg 395353e90a53Smrg# save warnings/boilerplate of simple test code 395453e90a53Smrg_LT_COMPILER_BOILERPLATE 395553e90a53Smrg_LT_LINKER_BOILERPLATE 395653e90a53Smrg 395753e90a53Smrg# Allow CC to be a program name with arguments. 395853e90a53Smrglt_save_CC="$CC" 395953e90a53SmrgCC=${F77-"f77"} 396053e90a53Smrgcompiler=$CC 396153e90a53Smrg_LT_AC_TAGVAR(compiler, $1)=$CC 396253e90a53Smrg_LT_CC_BASENAME([$compiler]) 396353e90a53Smrg 396453e90a53SmrgAC_MSG_CHECKING([if libtool supports shared libraries]) 396553e90a53SmrgAC_MSG_RESULT([$can_build_shared]) 396653e90a53Smrg 396753e90a53SmrgAC_MSG_CHECKING([whether to build shared libraries]) 396853e90a53Smrgtest "$can_build_shared" = "no" && enable_shared=no 396953e90a53Smrg 397053e90a53Smrg# On AIX, shared libraries and static libraries use the same namespace, and 397153e90a53Smrg# are all built from PIC. 397253e90a53Smrgcase $host_os in 397353e90a53Smrgaix3*) 397453e90a53Smrg test "$enable_shared" = yes && enable_static=no 397553e90a53Smrg if test -n "$RANLIB"; then 397653e90a53Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 397753e90a53Smrg postinstall_cmds='$RANLIB $lib' 397853e90a53Smrg fi 397953e90a53Smrg ;; 398053e90a53Smrgaix4* | aix5*) 398153e90a53Smrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 398253e90a53Smrg test "$enable_shared" = yes && enable_static=no 398353e90a53Smrg fi 398453e90a53Smrg ;; 398553e90a53Smrgesac 398653e90a53SmrgAC_MSG_RESULT([$enable_shared]) 398753e90a53Smrg 398853e90a53SmrgAC_MSG_CHECKING([whether to build static libraries]) 398953e90a53Smrg# Make sure either enable_shared or enable_static is yes. 399053e90a53Smrgtest "$enable_shared" = yes || enable_static=yes 399153e90a53SmrgAC_MSG_RESULT([$enable_static]) 399253e90a53Smrg 399353e90a53Smrg_LT_AC_TAGVAR(GCC, $1)="$G77" 399453e90a53Smrg_LT_AC_TAGVAR(LD, $1)="$LD" 399553e90a53Smrg 399653e90a53SmrgAC_LIBTOOL_PROG_COMPILER_PIC($1) 399753e90a53SmrgAC_LIBTOOL_PROG_CC_C_O($1) 399853e90a53SmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) 399953e90a53SmrgAC_LIBTOOL_PROG_LD_SHLIBS($1) 400053e90a53SmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1) 400153e90a53SmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) 400253e90a53Smrg 400353e90a53SmrgAC_LIBTOOL_CONFIG($1) 400453e90a53Smrg 400553e90a53SmrgAC_LANG_POP 400653e90a53SmrgCC="$lt_save_CC" 400753e90a53Smrg])# AC_LIBTOOL_LANG_F77_CONFIG 400853e90a53Smrg 400953e90a53Smrg 401053e90a53Smrg# AC_LIBTOOL_LANG_GCJ_CONFIG 401153e90a53Smrg# -------------------------- 401253e90a53Smrg# Ensure that the configuration vars for the C compiler are 401353e90a53Smrg# suitably defined. Those variables are subsequently used by 401453e90a53Smrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 401553e90a53SmrgAC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)]) 401653e90a53SmrgAC_DEFUN([_LT_AC_LANG_GCJ_CONFIG], 401753e90a53Smrg[AC_LANG_SAVE 401853e90a53Smrg 401953e90a53Smrg# Source file extension for Java test sources. 402053e90a53Smrgac_ext=java 402153e90a53Smrg 402253e90a53Smrg# Object file extension for compiled Java test sources. 402353e90a53Smrgobjext=o 402453e90a53Smrg_LT_AC_TAGVAR(objext, $1)=$objext 402553e90a53Smrg 402653e90a53Smrg# Code to be used in simple compile tests 402753e90a53Smrglt_simple_compile_test_code="class foo {}\n" 402853e90a53Smrg 402953e90a53Smrg# Code to be used in simple link tests 403053e90a53Smrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }\n' 403153e90a53Smrg 403253e90a53Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 403353e90a53Smrg_LT_AC_SYS_COMPILER 403453e90a53Smrg 403553e90a53Smrg# save warnings/boilerplate of simple test code 403653e90a53Smrg_LT_COMPILER_BOILERPLATE 403753e90a53Smrg_LT_LINKER_BOILERPLATE 403853e90a53Smrg 403953e90a53Smrg# Allow CC to be a program name with arguments. 404053e90a53Smrglt_save_CC="$CC" 404153e90a53SmrgCC=${GCJ-"gcj"} 404253e90a53Smrgcompiler=$CC 404353e90a53Smrg_LT_AC_TAGVAR(compiler, $1)=$CC 404453e90a53Smrg_LT_CC_BASENAME([$compiler]) 404553e90a53Smrg 404653e90a53Smrg# GCJ did not exist at the time GCC didn't implicitly link libc in. 404753e90a53Smrg_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 404853e90a53Smrg 404953e90a53Smrg_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 405053e90a53Smrg 405153e90a53SmrgAC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) 405253e90a53SmrgAC_LIBTOOL_PROG_COMPILER_PIC($1) 405353e90a53SmrgAC_LIBTOOL_PROG_CC_C_O($1) 405453e90a53SmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) 405553e90a53SmrgAC_LIBTOOL_PROG_LD_SHLIBS($1) 405653e90a53SmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1) 405753e90a53SmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) 405853e90a53Smrg 405953e90a53SmrgAC_LIBTOOL_CONFIG($1) 406053e90a53Smrg 406153e90a53SmrgAC_LANG_RESTORE 406253e90a53SmrgCC="$lt_save_CC" 406353e90a53Smrg])# AC_LIBTOOL_LANG_GCJ_CONFIG 406453e90a53Smrg 406553e90a53Smrg 406653e90a53Smrg# AC_LIBTOOL_LANG_RC_CONFIG 406753e90a53Smrg# ------------------------- 406853e90a53Smrg# Ensure that the configuration vars for the Windows resource compiler are 406953e90a53Smrg# suitably defined. Those variables are subsequently used by 407053e90a53Smrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 407153e90a53SmrgAC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)]) 407253e90a53SmrgAC_DEFUN([_LT_AC_LANG_RC_CONFIG], 407353e90a53Smrg[AC_LANG_SAVE 407453e90a53Smrg 407553e90a53Smrg# Source file extension for RC test sources. 407653e90a53Smrgac_ext=rc 407753e90a53Smrg 407853e90a53Smrg# Object file extension for compiled RC test sources. 407953e90a53Smrgobjext=o 408053e90a53Smrg_LT_AC_TAGVAR(objext, $1)=$objext 408153e90a53Smrg 408253e90a53Smrg# Code to be used in simple compile tests 408353e90a53Smrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n' 408453e90a53Smrg 408553e90a53Smrg# Code to be used in simple link tests 408653e90a53Smrglt_simple_link_test_code="$lt_simple_compile_test_code" 408753e90a53Smrg 408853e90a53Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 408953e90a53Smrg_LT_AC_SYS_COMPILER 409053e90a53Smrg 409153e90a53Smrg# save warnings/boilerplate of simple test code 409253e90a53Smrg_LT_COMPILER_BOILERPLATE 409353e90a53Smrg_LT_LINKER_BOILERPLATE 409453e90a53Smrg 409553e90a53Smrg# Allow CC to be a program name with arguments. 409653e90a53Smrglt_save_CC="$CC" 409753e90a53SmrgCC=${RC-"windres"} 409853e90a53Smrgcompiler=$CC 409953e90a53Smrg_LT_AC_TAGVAR(compiler, $1)=$CC 410053e90a53Smrg_LT_CC_BASENAME([$compiler]) 410153e90a53Smrg_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 410253e90a53Smrg 410353e90a53SmrgAC_LIBTOOL_CONFIG($1) 410453e90a53Smrg 410553e90a53SmrgAC_LANG_RESTORE 410653e90a53SmrgCC="$lt_save_CC" 410753e90a53Smrg])# AC_LIBTOOL_LANG_RC_CONFIG 410853e90a53Smrg 410953e90a53Smrg 411053e90a53Smrg# AC_LIBTOOL_CONFIG([TAGNAME]) 411153e90a53Smrg# ---------------------------- 411253e90a53Smrg# If TAGNAME is not passed, then create an initial libtool script 411353e90a53Smrg# with a default configuration from the untagged config vars. Otherwise 411453e90a53Smrg# add code to config.status for appending the configuration named by 411553e90a53Smrg# TAGNAME from the matching tagged config vars. 411653e90a53SmrgAC_DEFUN([AC_LIBTOOL_CONFIG], 411753e90a53Smrg[# The else clause should only fire when bootstrapping the 411853e90a53Smrg# libtool distribution, otherwise you forgot to ship ltmain.sh 411953e90a53Smrg# with your package, and you will get complaints that there are 412053e90a53Smrg# no rules to generate ltmain.sh. 412153e90a53Smrgif test -f "$ltmain"; then 412253e90a53Smrg # See if we are running on zsh, and set the options which allow our commands through 412353e90a53Smrg # without removal of \ escapes. 412453e90a53Smrg if test -n "${ZSH_VERSION+set}" ; then 412553e90a53Smrg setopt NO_GLOB_SUBST 412653e90a53Smrg fi 412753e90a53Smrg # Now quote all the things that may contain metacharacters while being 412853e90a53Smrg # careful not to overquote the AC_SUBSTed values. We take copies of the 412953e90a53Smrg # variables and quote the copies for generation of the libtool script. 413053e90a53Smrg for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ 413153e90a53Smrg SED SHELL STRIP \ 413253e90a53Smrg libname_spec library_names_spec soname_spec extract_expsyms_cmds \ 413353e90a53Smrg old_striplib striplib file_magic_cmd finish_cmds finish_eval \ 413453e90a53Smrg deplibs_check_method reload_flag reload_cmds need_locks \ 413553e90a53Smrg lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ 413653e90a53Smrg lt_cv_sys_global_symbol_to_c_name_address \ 413753e90a53Smrg sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ 413853e90a53Smrg old_postinstall_cmds old_postuninstall_cmds \ 413953e90a53Smrg _LT_AC_TAGVAR(compiler, $1) \ 414053e90a53Smrg _LT_AC_TAGVAR(CC, $1) \ 414153e90a53Smrg _LT_AC_TAGVAR(LD, $1) \ 414253e90a53Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \ 414353e90a53Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \ 414453e90a53Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \ 414553e90a53Smrg _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \ 414653e90a53Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \ 414753e90a53Smrg _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \ 414853e90a53Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \ 414953e90a53Smrg _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \ 415053e90a53Smrg _LT_AC_TAGVAR(old_archive_cmds, $1) \ 415153e90a53Smrg _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \ 415253e90a53Smrg _LT_AC_TAGVAR(predep_objects, $1) \ 415353e90a53Smrg _LT_AC_TAGVAR(postdep_objects, $1) \ 415453e90a53Smrg _LT_AC_TAGVAR(predeps, $1) \ 415553e90a53Smrg _LT_AC_TAGVAR(postdeps, $1) \ 415653e90a53Smrg _LT_AC_TAGVAR(compiler_lib_search_path, $1) \ 415753e90a53Smrg _LT_AC_TAGVAR(archive_cmds, $1) \ 415853e90a53Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1) \ 415953e90a53Smrg _LT_AC_TAGVAR(postinstall_cmds, $1) \ 416053e90a53Smrg _LT_AC_TAGVAR(postuninstall_cmds, $1) \ 416153e90a53Smrg _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \ 416253e90a53Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1) \ 416353e90a53Smrg _LT_AC_TAGVAR(no_undefined_flag, $1) \ 416453e90a53Smrg _LT_AC_TAGVAR(export_symbols_cmds, $1) \ 416553e90a53Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \ 416653e90a53Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \ 416753e90a53Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \ 416853e90a53Smrg _LT_AC_TAGVAR(hardcode_automatic, $1) \ 416953e90a53Smrg _LT_AC_TAGVAR(module_cmds, $1) \ 417053e90a53Smrg _LT_AC_TAGVAR(module_expsym_cmds, $1) \ 417153e90a53Smrg _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \ 417253e90a53Smrg _LT_AC_TAGVAR(exclude_expsyms, $1) \ 417353e90a53Smrg _LT_AC_TAGVAR(include_expsyms, $1); do 417453e90a53Smrg 417553e90a53Smrg case $var in 417653e90a53Smrg _LT_AC_TAGVAR(old_archive_cmds, $1) | \ 417753e90a53Smrg _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \ 417853e90a53Smrg _LT_AC_TAGVAR(archive_cmds, $1) | \ 417953e90a53Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \ 418053e90a53Smrg _LT_AC_TAGVAR(module_cmds, $1) | \ 418153e90a53Smrg _LT_AC_TAGVAR(module_expsym_cmds, $1) | \ 418253e90a53Smrg _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \ 418353e90a53Smrg _LT_AC_TAGVAR(export_symbols_cmds, $1) | \ 418453e90a53Smrg extract_expsyms_cmds | reload_cmds | finish_cmds | \ 418553e90a53Smrg postinstall_cmds | postuninstall_cmds | \ 418653e90a53Smrg old_postinstall_cmds | old_postuninstall_cmds | \ 418753e90a53Smrg sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) 418853e90a53Smrg # Double-quote double-evaled strings. 418953e90a53Smrg eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" 419053e90a53Smrg ;; 419153e90a53Smrg *) 419253e90a53Smrg eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" 419353e90a53Smrg ;; 419453e90a53Smrg esac 419553e90a53Smrg done 419653e90a53Smrg 419753e90a53Smrg case $lt_echo in 419853e90a53Smrg *'\[$]0 --fallback-echo"') 419953e90a53Smrg lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'` 420053e90a53Smrg ;; 420153e90a53Smrg esac 420253e90a53Smrg 420353e90a53Smrgifelse([$1], [], 420453e90a53Smrg [cfgfile="${ofile}T" 420553e90a53Smrg trap "$rm \"$cfgfile\"; exit 1" 1 2 15 420653e90a53Smrg $rm -f "$cfgfile" 420753e90a53Smrg AC_MSG_NOTICE([creating $ofile])], 420853e90a53Smrg [cfgfile="$ofile"]) 420953e90a53Smrg 421053e90a53Smrg cat <<__EOF__ >> "$cfgfile" 421153e90a53Smrgifelse([$1], [], 421253e90a53Smrg[#! $SHELL 421353e90a53Smrg 421453e90a53Smrg# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. 421553e90a53Smrg# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) 421653e90a53Smrg# NOTE: Changes made to this file will be lost: look at ltmain.sh. 421753e90a53Smrg# 421853e90a53Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 421953e90a53Smrg# Free Software Foundation, Inc. 422053e90a53Smrg# 422153e90a53Smrg# This file is part of GNU Libtool: 422253e90a53Smrg# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 422353e90a53Smrg# 422453e90a53Smrg# This program is free software; you can redistribute it and/or modify 422553e90a53Smrg# it under the terms of the GNU General Public License as published by 422653e90a53Smrg# the Free Software Foundation; either version 2 of the License, or 422753e90a53Smrg# (at your option) any later version. 422853e90a53Smrg# 422953e90a53Smrg# This program is distributed in the hope that it will be useful, but 423053e90a53Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 423153e90a53Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 423253e90a53Smrg# General Public License for more details. 423353e90a53Smrg# 423453e90a53Smrg# You should have received a copy of the GNU General Public License 423553e90a53Smrg# along with this program; if not, write to the Free Software 423653e90a53Smrg# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 423753e90a53Smrg# 423853e90a53Smrg# As a special exception to the GNU General Public License, if you 423953e90a53Smrg# distribute this file as part of a program that contains a 424053e90a53Smrg# configuration script generated by Autoconf, you may include it under 424153e90a53Smrg# the same distribution terms that you use for the rest of that program. 424253e90a53Smrg 424353e90a53Smrg# A sed program that does not truncate output. 424453e90a53SmrgSED=$lt_SED 424553e90a53Smrg 424653e90a53Smrg# Sed that helps us avoid accidentally triggering echo(1) options like -n. 424753e90a53SmrgXsed="$SED -e 1s/^X//" 424853e90a53Smrg 424953e90a53Smrg# The HP-UX ksh and POSIX shell print the target directory to stdout 425053e90a53Smrg# if CDPATH is set. 425153e90a53Smrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 425253e90a53Smrg 425353e90a53Smrg# The names of the tagged configurations supported by this script. 425453e90a53Smrgavailable_tags= 425553e90a53Smrg 425653e90a53Smrg# ### BEGIN LIBTOOL CONFIG], 425753e90a53Smrg[# ### BEGIN LIBTOOL TAG CONFIG: $tagname]) 425853e90a53Smrg 425953e90a53Smrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 426053e90a53Smrg 426153e90a53Smrg# Shell to use when invoking shell scripts. 426253e90a53SmrgSHELL=$lt_SHELL 426353e90a53Smrg 426453e90a53Smrg# Whether or not to build shared libraries. 426553e90a53Smrgbuild_libtool_libs=$enable_shared 426653e90a53Smrg 426753e90a53Smrg# Whether or not to build static libraries. 426853e90a53Smrgbuild_old_libs=$enable_static 426953e90a53Smrg 427053e90a53Smrg# Whether or not to add -lc for building shared libraries. 427153e90a53Smrgbuild_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1) 427253e90a53Smrg 427353e90a53Smrg# Whether or not to disallow shared libs when runtime libs are static 427453e90a53Smrgallow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) 427553e90a53Smrg 427653e90a53Smrg# Whether or not to optimize for fast installation. 427753e90a53Smrgfast_install=$enable_fast_install 427853e90a53Smrg 427953e90a53Smrg# The host system. 428053e90a53Smrghost_alias=$host_alias 428153e90a53Smrghost=$host 428253e90a53Smrghost_os=$host_os 428353e90a53Smrg 428453e90a53Smrg# The build system. 428553e90a53Smrgbuild_alias=$build_alias 428653e90a53Smrgbuild=$build 428753e90a53Smrgbuild_os=$build_os 428853e90a53Smrg 428953e90a53Smrg# An echo program that does not interpret backslashes. 429053e90a53Smrgecho=$lt_echo 429153e90a53Smrg 429253e90a53Smrg# The archiver. 429353e90a53SmrgAR=$lt_AR 429453e90a53SmrgAR_FLAGS=$lt_AR_FLAGS 429553e90a53Smrg 429653e90a53Smrg# A C compiler. 429753e90a53SmrgLTCC=$lt_LTCC 429853e90a53Smrg 429953e90a53Smrg# LTCC compiler flags. 430053e90a53SmrgLTCFLAGS=$lt_LTCFLAGS 430153e90a53Smrg 430253e90a53Smrg# A language-specific compiler. 430353e90a53SmrgCC=$lt_[]_LT_AC_TAGVAR(compiler, $1) 430453e90a53Smrg 430553e90a53Smrg# Is the compiler the GNU C compiler? 430653e90a53Smrgwith_gcc=$_LT_AC_TAGVAR(GCC, $1) 430753e90a53Smrg 430853e90a53Smrg# An ERE matcher. 430953e90a53SmrgEGREP=$lt_EGREP 431053e90a53Smrg 431153e90a53Smrg# The linker used to build libraries. 431253e90a53SmrgLD=$lt_[]_LT_AC_TAGVAR(LD, $1) 431353e90a53Smrg 431453e90a53Smrg# Whether we need hard or soft links. 431553e90a53SmrgLN_S=$lt_LN_S 431653e90a53Smrg 431753e90a53Smrg# A BSD-compatible nm program. 431853e90a53SmrgNM=$lt_NM 431953e90a53Smrg 432053e90a53Smrg# A symbol stripping program 432153e90a53SmrgSTRIP=$lt_STRIP 432253e90a53Smrg 432353e90a53Smrg# Used to examine libraries when file_magic_cmd begins "file" 432453e90a53SmrgMAGIC_CMD=$MAGIC_CMD 432553e90a53Smrg 432653e90a53Smrg# Used on cygwin: DLL creation program. 432753e90a53SmrgDLLTOOL="$DLLTOOL" 432853e90a53Smrg 432953e90a53Smrg# Used on cygwin: object dumper. 433053e90a53SmrgOBJDUMP="$OBJDUMP" 433153e90a53Smrg 433253e90a53Smrg# Used on cygwin: assembler. 433353e90a53SmrgAS="$AS" 433453e90a53Smrg 433553e90a53Smrg# The name of the directory that contains temporary libtool files. 433653e90a53Smrgobjdir=$objdir 433753e90a53Smrg 433853e90a53Smrg# How to create reloadable object files. 433953e90a53Smrgreload_flag=$lt_reload_flag 434053e90a53Smrgreload_cmds=$lt_reload_cmds 434153e90a53Smrg 434253e90a53Smrg# How to pass a linker flag through the compiler. 434353e90a53Smrgwl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) 434453e90a53Smrg 434553e90a53Smrg# Object file suffix (normally "o"). 434653e90a53Smrgobjext="$ac_objext" 434753e90a53Smrg 434853e90a53Smrg# Old archive suffix (normally "a"). 434953e90a53Smrglibext="$libext" 435053e90a53Smrg 435153e90a53Smrg# Shared library suffix (normally ".so"). 435253e90a53Smrgshrext_cmds='$shrext_cmds' 435353e90a53Smrg 435453e90a53Smrg# Executable file suffix (normally ""). 435553e90a53Smrgexeext="$exeext" 435653e90a53Smrg 435753e90a53Smrg# Additional compiler flags for building library objects. 435853e90a53Smrgpic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) 435953e90a53Smrgpic_mode=$pic_mode 436053e90a53Smrg 436153e90a53Smrg# What is the maximum length of a command? 436253e90a53Smrgmax_cmd_len=$lt_cv_sys_max_cmd_len 436353e90a53Smrg 436453e90a53Smrg# Does compiler simultaneously support -c and -o options? 436553e90a53Smrgcompiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) 436653e90a53Smrg 436753e90a53Smrg# Must we lock files when doing compilation? 436853e90a53Smrgneed_locks=$lt_need_locks 436953e90a53Smrg 437053e90a53Smrg# Do we need the lib prefix for modules? 437153e90a53Smrgneed_lib_prefix=$need_lib_prefix 437253e90a53Smrg 437353e90a53Smrg# Do we need a version for libraries? 437453e90a53Smrgneed_version=$need_version 437553e90a53Smrg 437653e90a53Smrg# Whether dlopen is supported. 437753e90a53Smrgdlopen_support=$enable_dlopen 437853e90a53Smrg 437953e90a53Smrg# Whether dlopen of programs is supported. 438053e90a53Smrgdlopen_self=$enable_dlopen_self 438153e90a53Smrg 438253e90a53Smrg# Whether dlopen of statically linked programs is supported. 438353e90a53Smrgdlopen_self_static=$enable_dlopen_self_static 438453e90a53Smrg 438553e90a53Smrg# Compiler flag to prevent dynamic linking. 438653e90a53Smrglink_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1) 438753e90a53Smrg 438853e90a53Smrg# Compiler flag to turn off builtin functions. 438953e90a53Smrgno_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) 439053e90a53Smrg 439153e90a53Smrg# Compiler flag to allow reflexive dlopens. 439253e90a53Smrgexport_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1) 439353e90a53Smrg 439453e90a53Smrg# Compiler flag to generate shared objects directly from archives. 439553e90a53Smrgwhole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1) 439653e90a53Smrg 439753e90a53Smrg# Compiler flag to generate thread-safe objects. 439853e90a53Smrgthread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1) 439953e90a53Smrg 440053e90a53Smrg# Library versioning type. 440153e90a53Smrgversion_type=$version_type 440253e90a53Smrg 440353e90a53Smrg# Format of library name prefix. 440453e90a53Smrglibname_spec=$lt_libname_spec 440553e90a53Smrg 440653e90a53Smrg# List of archive names. First name is the real one, the rest are links. 440753e90a53Smrg# The last name is the one that the linker finds with -lNAME. 440853e90a53Smrglibrary_names_spec=$lt_library_names_spec 440953e90a53Smrg 441053e90a53Smrg# The coded name of the library, if different from the real name. 441153e90a53Smrgsoname_spec=$lt_soname_spec 441253e90a53Smrg 441353e90a53Smrg# Commands used to build and install an old-style archive. 441453e90a53SmrgRANLIB=$lt_RANLIB 441553e90a53Smrgold_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1) 441653e90a53Smrgold_postinstall_cmds=$lt_old_postinstall_cmds 441753e90a53Smrgold_postuninstall_cmds=$lt_old_postuninstall_cmds 441853e90a53Smrg 441953e90a53Smrg# Create an old-style archive from a shared archive. 442053e90a53Smrgold_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1) 442153e90a53Smrg 442253e90a53Smrg# Create a temporary old-style archive to link instead of a shared archive. 442353e90a53Smrgold_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) 442453e90a53Smrg 442553e90a53Smrg# Commands used to build and install a shared archive. 442653e90a53Smrgarchive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1) 442753e90a53Smrgarchive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1) 442853e90a53Smrgpostinstall_cmds=$lt_postinstall_cmds 442953e90a53Smrgpostuninstall_cmds=$lt_postuninstall_cmds 443053e90a53Smrg 443153e90a53Smrg# Commands used to build a loadable module (assumed same as above if empty) 443253e90a53Smrgmodule_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1) 443353e90a53Smrgmodule_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1) 443453e90a53Smrg 443553e90a53Smrg# Commands to strip libraries. 443653e90a53Smrgold_striplib=$lt_old_striplib 443753e90a53Smrgstriplib=$lt_striplib 443853e90a53Smrg 443953e90a53Smrg# Dependencies to place before the objects being linked to create a 444053e90a53Smrg# shared library. 444153e90a53Smrgpredep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1) 444253e90a53Smrg 444353e90a53Smrg# Dependencies to place after the objects being linked to create a 444453e90a53Smrg# shared library. 444553e90a53Smrgpostdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1) 444653e90a53Smrg 444753e90a53Smrg# Dependencies to place before the objects being linked to create a 444853e90a53Smrg# shared library. 444953e90a53Smrgpredeps=$lt_[]_LT_AC_TAGVAR(predeps, $1) 445053e90a53Smrg 445153e90a53Smrg# Dependencies to place after the objects being linked to create a 445253e90a53Smrg# shared library. 445353e90a53Smrgpostdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1) 445453e90a53Smrg 445553e90a53Smrg# The library search path used internally by the compiler when linking 445653e90a53Smrg# a shared library. 445753e90a53Smrgcompiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1) 445853e90a53Smrg 445953e90a53Smrg# Method to check whether dependent libraries are shared objects. 446053e90a53Smrgdeplibs_check_method=$lt_deplibs_check_method 446153e90a53Smrg 446253e90a53Smrg# Command to use when deplibs_check_method == file_magic. 446353e90a53Smrgfile_magic_cmd=$lt_file_magic_cmd 446453e90a53Smrg 446553e90a53Smrg# Flag that allows shared libraries with undefined symbols to be built. 446653e90a53Smrgallow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1) 446753e90a53Smrg 446853e90a53Smrg# Flag that forces no undefined symbols. 446953e90a53Smrgno_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1) 447053e90a53Smrg 447153e90a53Smrg# Commands used to finish a libtool library installation in a directory. 447253e90a53Smrgfinish_cmds=$lt_finish_cmds 447353e90a53Smrg 447453e90a53Smrg# Same as above, but a single script fragment to be evaled but not shown. 447553e90a53Smrgfinish_eval=$lt_finish_eval 447653e90a53Smrg 447753e90a53Smrg# Take the output of nm and produce a listing of raw symbols and C names. 447853e90a53Smrgglobal_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe 447953e90a53Smrg 448053e90a53Smrg# Transform the output of nm in a proper C declaration 448153e90a53Smrgglobal_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl 448253e90a53Smrg 448353e90a53Smrg# Transform the output of nm in a C name address pair 448453e90a53Smrgglobal_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address 448553e90a53Smrg 448653e90a53Smrg# This is the shared library runtime path variable. 448753e90a53Smrgrunpath_var=$runpath_var 448853e90a53Smrg 448953e90a53Smrg# This is the shared library path variable. 449053e90a53Smrgshlibpath_var=$shlibpath_var 449153e90a53Smrg 449253e90a53Smrg# Is shlibpath searched before the hard-coded library search path? 449353e90a53Smrgshlibpath_overrides_runpath=$shlibpath_overrides_runpath 449453e90a53Smrg 449553e90a53Smrg# How to hardcode a shared library path into an executable. 449653e90a53Smrghardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1) 449753e90a53Smrg 449853e90a53Smrg# Whether we should hardcode library paths into libraries. 449953e90a53Smrghardcode_into_libs=$hardcode_into_libs 450053e90a53Smrg 450153e90a53Smrg# Flag to hardcode \$libdir into a binary during linking. 450253e90a53Smrg# This must work even if \$libdir does not exist. 450353e90a53Smrghardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) 450453e90a53Smrg 450553e90a53Smrg# If ld is used when linking, flag to hardcode \$libdir into 450653e90a53Smrg# a binary during linking. This must work even if \$libdir does 450753e90a53Smrg# not exist. 450853e90a53Smrghardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) 450953e90a53Smrg 451053e90a53Smrg# Whether we need a single -rpath flag with a separated argument. 451153e90a53Smrghardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1) 451253e90a53Smrg 451353e90a53Smrg# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the 451453e90a53Smrg# resulting binary. 451553e90a53Smrghardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1) 451653e90a53Smrg 451753e90a53Smrg# Set to yes if using the -LDIR flag during linking hardcodes DIR into the 451853e90a53Smrg# resulting binary. 451953e90a53Smrghardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1) 452053e90a53Smrg 452153e90a53Smrg# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into 452253e90a53Smrg# the resulting binary. 452353e90a53Smrghardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1) 452453e90a53Smrg 452553e90a53Smrg# Set to yes if building a shared library automatically hardcodes DIR into the library 452653e90a53Smrg# and all subsequent libraries and executables linked against it. 452753e90a53Smrghardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1) 452853e90a53Smrg 452953e90a53Smrg# Variables whose values should be saved in libtool wrapper scripts and 453053e90a53Smrg# restored at relink time. 453153e90a53Smrgvariables_saved_for_relink="$variables_saved_for_relink" 453253e90a53Smrg 453353e90a53Smrg# Whether libtool must link a program against all its dependency libraries. 453453e90a53Smrglink_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1) 453553e90a53Smrg 453653e90a53Smrg# Compile-time system search path for libraries 453753e90a53Smrgsys_lib_search_path_spec=$lt_sys_lib_search_path_spec 453853e90a53Smrg 453953e90a53Smrg# Run-time system search path for libraries 454053e90a53Smrgsys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec 454153e90a53Smrg 454253e90a53Smrg# Fix the shell variable \$srcfile for the compiler. 454353e90a53Smrgfix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)" 454453e90a53Smrg 454553e90a53Smrg# Set to yes if exported symbols are required. 454653e90a53Smrgalways_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1) 454753e90a53Smrg 454853e90a53Smrg# The commands to list exported symbols. 454953e90a53Smrgexport_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1) 455053e90a53Smrg 455153e90a53Smrg# The commands to extract the exported symbol list from a shared archive. 455253e90a53Smrgextract_expsyms_cmds=$lt_extract_expsyms_cmds 455353e90a53Smrg 455453e90a53Smrg# Symbols that should not be listed in the preloaded symbols. 455553e90a53Smrgexclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1) 455653e90a53Smrg 455753e90a53Smrg# Symbols that must always be exported. 455853e90a53Smrginclude_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1) 455953e90a53Smrg 456053e90a53Smrgifelse([$1],[], 456153e90a53Smrg[# ### END LIBTOOL CONFIG], 456253e90a53Smrg[# ### END LIBTOOL TAG CONFIG: $tagname]) 456353e90a53Smrg 456453e90a53Smrg__EOF__ 456553e90a53Smrg 456653e90a53Smrgifelse([$1],[], [ 456753e90a53Smrg case $host_os in 456853e90a53Smrg aix3*) 456953e90a53Smrg cat <<\EOF >> "$cfgfile" 457053e90a53Smrg 457153e90a53Smrg# AIX sometimes has problems with the GCC collect2 program. For some 457253e90a53Smrg# reason, if we set the COLLECT_NAMES environment variable, the problems 457353e90a53Smrg# vanish in a puff of smoke. 457453e90a53Smrgif test "X${COLLECT_NAMES+set}" != Xset; then 457553e90a53Smrg COLLECT_NAMES= 457653e90a53Smrg export COLLECT_NAMES 457753e90a53Smrgfi 457853e90a53SmrgEOF 457953e90a53Smrg ;; 458053e90a53Smrg esac 458153e90a53Smrg 458253e90a53Smrg # We use sed instead of cat because bash on DJGPP gets confused if 458353e90a53Smrg # if finds mixed CR/LF and LF-only lines. Since sed operates in 458453e90a53Smrg # text mode, it properly converts lines to CR/LF. This bash problem 458553e90a53Smrg # is reportedly fixed, but why not run on old versions too? 458653e90a53Smrg sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1) 458753e90a53Smrg 458853e90a53Smrg mv -f "$cfgfile" "$ofile" || \ 458953e90a53Smrg (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 459053e90a53Smrg chmod +x "$ofile" 459153e90a53Smrg]) 459253e90a53Smrgelse 459353e90a53Smrg # If there is no Makefile yet, we rely on a make rule to execute 459453e90a53Smrg # `config.status --recheck' to rerun these tests and create the 459553e90a53Smrg # libtool script then. 459653e90a53Smrg ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` 459753e90a53Smrg if test -f "$ltmain_in"; then 459853e90a53Smrg test -f Makefile && make "$ltmain" 459953e90a53Smrg fi 460053e90a53Smrgfi 460153e90a53Smrg])# AC_LIBTOOL_CONFIG 460253e90a53Smrg 460353e90a53Smrg 460453e90a53Smrg# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME]) 460553e90a53Smrg# ------------------------------------------- 460653e90a53SmrgAC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], 460753e90a53Smrg[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl 460853e90a53Smrg 460953e90a53Smrg_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 461053e90a53Smrg 461153e90a53Smrgif test "$GCC" = yes; then 461253e90a53Smrg _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 461353e90a53Smrg 461453e90a53Smrg AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 461553e90a53Smrg lt_cv_prog_compiler_rtti_exceptions, 461653e90a53Smrg [-fno-rtti -fno-exceptions], [], 461753e90a53Smrg [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 461853e90a53Smrgfi 461953e90a53Smrg])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI 462053e90a53Smrg 462153e90a53Smrg 462253e90a53Smrg# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE 462353e90a53Smrg# --------------------------------- 462453e90a53SmrgAC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], 462553e90a53Smrg[AC_REQUIRE([AC_CANONICAL_HOST]) 462653e90a53SmrgAC_REQUIRE([AC_PROG_NM]) 462753e90a53SmrgAC_REQUIRE([AC_OBJEXT]) 462853e90a53Smrg# Check for command to grab the raw symbol name followed by C symbol from nm. 462953e90a53SmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object]) 463053e90a53SmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 463153e90a53Smrg[ 463253e90a53Smrg# These are sane defaults that work on at least a few old systems. 463353e90a53Smrg# [They come from Ultrix. What could be older than Ultrix?!! ;)] 463453e90a53Smrg 463553e90a53Smrg# Character class describing NM global symbol codes. 463653e90a53Smrgsymcode='[[BCDEGRST]]' 463753e90a53Smrg 463853e90a53Smrg# Regexp to match symbols that can be accessed directly from C. 463953e90a53Smrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 464053e90a53Smrg 464153e90a53Smrg# Transform an extracted symbol line into a proper C declaration 464253e90a53Smrglt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'" 464353e90a53Smrg 464453e90a53Smrg# Transform an extracted symbol line into symbol name and symbol address 464553e90a53Smrglt_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'" 464653e90a53Smrg 464753e90a53Smrg# Define system-specific variables. 464853e90a53Smrgcase $host_os in 464953e90a53Smrgaix*) 465053e90a53Smrg symcode='[[BCDT]]' 465153e90a53Smrg ;; 465253e90a53Smrgcygwin* | mingw* | pw32*) 465353e90a53Smrg symcode='[[ABCDGISTW]]' 465453e90a53Smrg ;; 465553e90a53Smrghpux*) # Its linker distinguishes data from code symbols 465653e90a53Smrg if test "$host_cpu" = ia64; then 465753e90a53Smrg symcode='[[ABCDEGRST]]' 465853e90a53Smrg fi 465953e90a53Smrg lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 466053e90a53Smrg 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'" 466153e90a53Smrg ;; 466253e90a53Smrglinux*) 466353e90a53Smrg if test "$host_cpu" = ia64; then 466453e90a53Smrg symcode='[[ABCDGIRSTW]]' 466553e90a53Smrg lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 466653e90a53Smrg 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'" 466753e90a53Smrg fi 466853e90a53Smrg ;; 466953e90a53Smrgirix* | nonstopux*) 467053e90a53Smrg symcode='[[BCDEGRST]]' 467153e90a53Smrg ;; 467253e90a53Smrgosf*) 467353e90a53Smrg symcode='[[BCDEGQRST]]' 467453e90a53Smrg ;; 467553e90a53Smrgsolaris*) 467653e90a53Smrg symcode='[[BDRT]]' 467753e90a53Smrg ;; 467853e90a53Smrgsco3.2v5*) 467953e90a53Smrg symcode='[[DT]]' 468053e90a53Smrg ;; 468153e90a53Smrgsysv4.2uw2*) 468253e90a53Smrg symcode='[[DT]]' 468353e90a53Smrg ;; 468453e90a53Smrgsysv5* | sco5v6* | unixware* | OpenUNIX*) 468553e90a53Smrg symcode='[[ABDT]]' 468653e90a53Smrg ;; 468753e90a53Smrgsysv4) 468853e90a53Smrg symcode='[[DFNSTU]]' 468953e90a53Smrg ;; 469053e90a53Smrgesac 469153e90a53Smrg 469253e90a53Smrg# Handle CRLF in mingw tool chain 469353e90a53Smrgopt_cr= 469453e90a53Smrgcase $build_os in 469553e90a53Smrgmingw*) 469653e90a53Smrg opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp 469753e90a53Smrg ;; 469853e90a53Smrgesac 469953e90a53Smrg 470053e90a53Smrg# If we're using GNU nm, then use its standard symbol codes. 470153e90a53Smrgcase `$NM -V 2>&1` in 470253e90a53Smrg*GNU* | *'with BFD'*) 470353e90a53Smrg symcode='[[ABCDGIRSTW]]' ;; 470453e90a53Smrgesac 470553e90a53Smrg 470653e90a53Smrg# Try without a prefix undercore, then with it. 470753e90a53Smrgfor ac_symprfx in "" "_"; do 470853e90a53Smrg 470953e90a53Smrg # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 471053e90a53Smrg symxfrm="\\1 $ac_symprfx\\2 \\2" 471153e90a53Smrg 471253e90a53Smrg # Write the raw and C identifiers. 471353e90a53Smrg lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 471453e90a53Smrg 471553e90a53Smrg # Check to see that the pipe works correctly. 471653e90a53Smrg pipe_works=no 471753e90a53Smrg 471853e90a53Smrg rm -f conftest* 471953e90a53Smrg cat > conftest.$ac_ext <<EOF 472053e90a53Smrg#ifdef __cplusplus 472153e90a53Smrgextern "C" { 472253e90a53Smrg#endif 472353e90a53Smrgchar nm_test_var; 472453e90a53Smrgvoid nm_test_func(){} 472553e90a53Smrg#ifdef __cplusplus 472653e90a53Smrg} 472753e90a53Smrg#endif 472853e90a53Smrgint main(){nm_test_var='a';nm_test_func();return(0);} 472953e90a53SmrgEOF 473053e90a53Smrg 473153e90a53Smrg if AC_TRY_EVAL(ac_compile); then 473253e90a53Smrg # Now try to grab the symbols. 473353e90a53Smrg nlist=conftest.nm 473453e90a53Smrg if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then 473553e90a53Smrg # Try sorting and uniquifying the output. 473653e90a53Smrg if sort "$nlist" | uniq > "$nlist"T; then 473753e90a53Smrg mv -f "$nlist"T "$nlist" 473853e90a53Smrg else 473953e90a53Smrg rm -f "$nlist"T 474053e90a53Smrg fi 474153e90a53Smrg 474253e90a53Smrg # Make sure that we snagged all the symbols we need. 474353e90a53Smrg if grep ' nm_test_var$' "$nlist" >/dev/null; then 474453e90a53Smrg if grep ' nm_test_func$' "$nlist" >/dev/null; then 474553e90a53Smrg cat <<EOF > conftest.$ac_ext 474653e90a53Smrg#ifdef __cplusplus 474753e90a53Smrgextern "C" { 474853e90a53Smrg#endif 474953e90a53Smrg 475053e90a53SmrgEOF 475153e90a53Smrg # Now generate the symbol file. 475253e90a53Smrg eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' 475353e90a53Smrg 475453e90a53Smrg cat <<EOF >> conftest.$ac_ext 475553e90a53Smrg#if defined (__STDC__) && __STDC__ 475653e90a53Smrg# define lt_ptr_t void * 475753e90a53Smrg#else 475853e90a53Smrg# define lt_ptr_t char * 475953e90a53Smrg# define const 476053e90a53Smrg#endif 476153e90a53Smrg 476253e90a53Smrg/* The mapping between symbol names and symbols. */ 476353e90a53Smrgconst struct { 476453e90a53Smrg const char *name; 476553e90a53Smrg lt_ptr_t address; 476653e90a53Smrg} 476753e90a53Smrglt_preloaded_symbols[[]] = 476853e90a53Smrg{ 476953e90a53SmrgEOF 477053e90a53Smrg $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext 477153e90a53Smrg cat <<\EOF >> conftest.$ac_ext 477253e90a53Smrg {0, (lt_ptr_t) 0} 477353e90a53Smrg}; 477453e90a53Smrg 477553e90a53Smrg#ifdef __cplusplus 477653e90a53Smrg} 477753e90a53Smrg#endif 477853e90a53SmrgEOF 477953e90a53Smrg # Now try linking the two files. 478053e90a53Smrg mv conftest.$ac_objext conftstm.$ac_objext 478153e90a53Smrg lt_save_LIBS="$LIBS" 478253e90a53Smrg lt_save_CFLAGS="$CFLAGS" 478353e90a53Smrg LIBS="conftstm.$ac_objext" 478453e90a53Smrg CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 478553e90a53Smrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then 478653e90a53Smrg pipe_works=yes 478753e90a53Smrg fi 478853e90a53Smrg LIBS="$lt_save_LIBS" 478953e90a53Smrg CFLAGS="$lt_save_CFLAGS" 479053e90a53Smrg else 479153e90a53Smrg echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 479253e90a53Smrg fi 479353e90a53Smrg else 479453e90a53Smrg echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 479553e90a53Smrg fi 479653e90a53Smrg else 479753e90a53Smrg echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 479853e90a53Smrg fi 479953e90a53Smrg else 480053e90a53Smrg echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 480153e90a53Smrg cat conftest.$ac_ext >&5 480253e90a53Smrg fi 480353e90a53Smrg rm -f conftest* conftst* 480453e90a53Smrg 480553e90a53Smrg # Do not use the global_symbol_pipe unless it works. 480653e90a53Smrg if test "$pipe_works" = yes; then 480753e90a53Smrg break 480853e90a53Smrg else 480953e90a53Smrg lt_cv_sys_global_symbol_pipe= 481053e90a53Smrg fi 481153e90a53Smrgdone 481253e90a53Smrg]) 481353e90a53Smrgif test -z "$lt_cv_sys_global_symbol_pipe"; then 481453e90a53Smrg lt_cv_sys_global_symbol_to_cdecl= 481553e90a53Smrgfi 481653e90a53Smrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 481753e90a53Smrg AC_MSG_RESULT(failed) 481853e90a53Smrgelse 481953e90a53Smrg AC_MSG_RESULT(ok) 482053e90a53Smrgfi 482153e90a53Smrg]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE 482253e90a53Smrg 482353e90a53Smrg 482453e90a53Smrg# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME]) 482553e90a53Smrg# --------------------------------------- 482653e90a53SmrgAC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC], 482753e90a53Smrg[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)= 482853e90a53Smrg_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 482953e90a53Smrg_LT_AC_TAGVAR(lt_prog_compiler_static, $1)= 483053e90a53Smrg 483153e90a53SmrgAC_MSG_CHECKING([for $compiler option to produce PIC]) 483253e90a53Smrg ifelse([$1],[CXX],[ 483353e90a53Smrg # C++ specific cases for pic, static, wl, etc. 483453e90a53Smrg if test "$GXX" = yes; then 483553e90a53Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 483653e90a53Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' 483753e90a53Smrg 483853e90a53Smrg case $host_os in 483953e90a53Smrg aix*) 484053e90a53Smrg # All AIX code is PIC. 484153e90a53Smrg if test "$host_cpu" = ia64; then 484253e90a53Smrg # AIX 5 now supports IA64 processor 484353e90a53Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 484453e90a53Smrg fi 484553e90a53Smrg ;; 484653e90a53Smrg amigaos*) 484753e90a53Smrg # FIXME: we need at least 68020 code to build shared libraries, but 484853e90a53Smrg # adding the `-m68020' flag to GCC prevents building anything better, 484953e90a53Smrg # like `-m68040'. 485053e90a53Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 485153e90a53Smrg ;; 485253e90a53Smrg beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 485353e90a53Smrg # PIC is the default for these OSes. 485453e90a53Smrg ;; 485553e90a53Smrg mingw* | os2* | pw32*) 485653e90a53Smrg # This hack is so that the source file can tell whether it is being 485753e90a53Smrg # built for inclusion in a dll (and should export symbols for example). 485853e90a53Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' 485953e90a53Smrg ;; 486053e90a53Smrg darwin* | rhapsody*) 486153e90a53Smrg # PIC is the default on this platform 486253e90a53Smrg # Common symbols not allowed in MH_DYLIB files 486353e90a53Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 486453e90a53Smrg ;; 486553e90a53Smrg *djgpp*) 486653e90a53Smrg # DJGPP does not support shared libraries at all 486753e90a53Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 486853e90a53Smrg ;; 486953e90a53Smrg interix3*) 487053e90a53Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 487153e90a53Smrg # Instead, we relocate shared libraries at runtime. 487253e90a53Smrg ;; 487353e90a53Smrg sysv4*MP*) 487453e90a53Smrg if test -d /usr/nec; then 487553e90a53Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 487653e90a53Smrg fi 487753e90a53Smrg ;; 487853e90a53Smrg hpux*) 487953e90a53Smrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 488053e90a53Smrg # not for PA HP-UX. 488153e90a53Smrg case $host_cpu in 488253e90a53Smrg hppa*64*|ia64*) 488353e90a53Smrg ;; 488453e90a53Smrg *) 488553e90a53Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 488653e90a53Smrg ;; 488753e90a53Smrg esac 488853e90a53Smrg ;; 488953e90a53Smrg *) 489053e90a53Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 489153e90a53Smrg ;; 489253e90a53Smrg esac 489353e90a53Smrg else 489453e90a53Smrg case $host_os in 489553e90a53Smrg aix4* | aix5*) 489653e90a53Smrg # All AIX code is PIC. 489753e90a53Smrg if test "$host_cpu" = ia64; then 489853e90a53Smrg # AIX 5 now supports IA64 processor 489953e90a53Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 490053e90a53Smrg else 490153e90a53Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 490253e90a53Smrg fi 490353e90a53Smrg ;; 490453e90a53Smrg chorus*) 490553e90a53Smrg case $cc_basename in 490653e90a53Smrg cxch68*) 490753e90a53Smrg # Green Hills C++ Compiler 490853e90a53Smrg # _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" 490953e90a53Smrg ;; 491053e90a53Smrg esac 491153e90a53Smrg ;; 491253e90a53Smrg darwin*) 491353e90a53Smrg # PIC is the default on this platform 491453e90a53Smrg # Common symbols not allowed in MH_DYLIB files 491553e90a53Smrg case $cc_basename in 491653e90a53Smrg xlc*) 491753e90a53Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' 491853e90a53Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 491953e90a53Smrg ;; 492053e90a53Smrg esac 492153e90a53Smrg ;; 492253e90a53Smrg dgux*) 492353e90a53Smrg case $cc_basename in 492453e90a53Smrg ec++*) 492553e90a53Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 492653e90a53Smrg ;; 492753e90a53Smrg ghcx*) 492853e90a53Smrg # Green Hills C++ Compiler 492953e90a53Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 493053e90a53Smrg ;; 493153e90a53Smrg *) 493253e90a53Smrg ;; 493353e90a53Smrg esac 493453e90a53Smrg ;; 493553e90a53Smrg freebsd* | kfreebsd*-gnu | dragonfly*) 493653e90a53Smrg # FreeBSD uses GNU C++ 493753e90a53Smrg ;; 493853e90a53Smrg hpux9* | hpux10* | hpux11*) 493953e90a53Smrg case $cc_basename in 494053e90a53Smrg CC*) 494153e90a53Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 494253e90a53Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 494353e90a53Smrg if test "$host_cpu" != ia64; then 494453e90a53Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 494553e90a53Smrg fi 494653e90a53Smrg ;; 494753e90a53Smrg aCC*) 494853e90a53Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 494953e90a53Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 495053e90a53Smrg case $host_cpu in 495153e90a53Smrg hppa*64*|ia64*) 495253e90a53Smrg # +Z the default 495353e90a53Smrg ;; 495453e90a53Smrg *) 495553e90a53Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 495653e90a53Smrg ;; 495753e90a53Smrg esac 495853e90a53Smrg ;; 495953e90a53Smrg *) 496053e90a53Smrg ;; 496153e90a53Smrg esac 496253e90a53Smrg ;; 496353e90a53Smrg interix*) 496453e90a53Smrg # This is c89, which is MS Visual C++ (no shared libs) 496553e90a53Smrg # Anyone wants to do a port? 496653e90a53Smrg ;; 496753e90a53Smrg irix5* | irix6* | nonstopux*) 496853e90a53Smrg case $cc_basename in 496953e90a53Smrg CC*) 497053e90a53Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 497153e90a53Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 497253e90a53Smrg # CC pic flag -KPIC is the default. 497353e90a53Smrg ;; 497453e90a53Smrg *) 497553e90a53Smrg ;; 497653e90a53Smrg esac 497753e90a53Smrg ;; 497853e90a53Smrg linux*) 497953e90a53Smrg case $cc_basename in 498053e90a53Smrg KCC*) 498153e90a53Smrg # KAI C++ Compiler 498253e90a53Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 498353e90a53Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 498453e90a53Smrg ;; 498553e90a53Smrg icpc* | ecpc*) 498653e90a53Smrg # Intel C++ 498753e90a53Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 498853e90a53Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 498953e90a53Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' 499053e90a53Smrg ;; 499153e90a53Smrg pgCC*) 499253e90a53Smrg # Portland Group C++ compiler. 499353e90a53Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 499453e90a53Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 499553e90a53Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 499653e90a53Smrg ;; 499753e90a53Smrg cxx*) 499853e90a53Smrg # Compaq C++ 499953e90a53Smrg # Make sure the PIC flag is empty. It appears that all Alpha 500053e90a53Smrg # Linux and Compaq Tru64 Unix objects are PIC. 500153e90a53Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 500253e90a53Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 500353e90a53Smrg ;; 500453e90a53Smrg *) 500553e90a53Smrg ;; 500653e90a53Smrg esac 500753e90a53Smrg ;; 500853e90a53Smrg lynxos*) 500953e90a53Smrg ;; 501053e90a53Smrg m88k*) 501153e90a53Smrg ;; 501253e90a53Smrg mvs*) 501353e90a53Smrg case $cc_basename in 501453e90a53Smrg cxx*) 501553e90a53Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 501653e90a53Smrg ;; 501753e90a53Smrg *) 501853e90a53Smrg ;; 501953e90a53Smrg esac 502053e90a53Smrg ;; 502153e90a53Smrg netbsd*) 502253e90a53Smrg ;; 502353e90a53Smrg osf3* | osf4* | osf5*) 502453e90a53Smrg case $cc_basename in 502553e90a53Smrg KCC*) 502653e90a53Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 502753e90a53Smrg ;; 502853e90a53Smrg RCC*) 502953e90a53Smrg # Rational C++ 2.4.1 503053e90a53Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 503153e90a53Smrg ;; 503253e90a53Smrg cxx*) 503353e90a53Smrg # Digital/Compaq C++ 503453e90a53Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 503553e90a53Smrg # Make sure the PIC flag is empty. It appears that all Alpha 503653e90a53Smrg # Linux and Compaq Tru64 Unix objects are PIC. 503753e90a53Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 503853e90a53Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 503953e90a53Smrg ;; 504053e90a53Smrg *) 504153e90a53Smrg ;; 504253e90a53Smrg esac 504353e90a53Smrg ;; 504453e90a53Smrg psos*) 504553e90a53Smrg ;; 504653e90a53Smrg solaris*) 504753e90a53Smrg case $cc_basename in 504853e90a53Smrg CC*) 504953e90a53Smrg # Sun C++ 4.2, 5.x and Centerline C++ 505053e90a53Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 505153e90a53Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 505253e90a53Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 505353e90a53Smrg ;; 505453e90a53Smrg gcx*) 505553e90a53Smrg # Green Hills C++ Compiler 505653e90a53Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 505753e90a53Smrg ;; 505853e90a53Smrg *) 505953e90a53Smrg ;; 506053e90a53Smrg esac 506153e90a53Smrg ;; 506253e90a53Smrg sunos4*) 506353e90a53Smrg case $cc_basename in 506453e90a53Smrg CC*) 506553e90a53Smrg # Sun C++ 4.x 506653e90a53Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 506753e90a53Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 506853e90a53Smrg ;; 506953e90a53Smrg lcc*) 507053e90a53Smrg # Lucid 507153e90a53Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 507253e90a53Smrg ;; 507353e90a53Smrg *) 507453e90a53Smrg ;; 507553e90a53Smrg esac 507653e90a53Smrg ;; 507753e90a53Smrg tandem*) 507853e90a53Smrg case $cc_basename in 507953e90a53Smrg NCC*) 508053e90a53Smrg # NonStop-UX NCC 3.20 508153e90a53Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 508253e90a53Smrg ;; 508353e90a53Smrg *) 508453e90a53Smrg ;; 508553e90a53Smrg esac 508653e90a53Smrg ;; 508753e90a53Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 508853e90a53Smrg case $cc_basename in 508953e90a53Smrg CC*) 509053e90a53Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 509153e90a53Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 509253e90a53Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 509353e90a53Smrg ;; 509453e90a53Smrg esac 509553e90a53Smrg ;; 509653e90a53Smrg vxworks*) 509753e90a53Smrg ;; 509853e90a53Smrg *) 509953e90a53Smrg _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 510053e90a53Smrg ;; 510153e90a53Smrg esac 510253e90a53Smrg fi 510353e90a53Smrg], 510453e90a53Smrg[ 510553e90a53Smrg if test "$GCC" = yes; then 510653e90a53Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 510753e90a53Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' 510853e90a53Smrg 510953e90a53Smrg case $host_os in 511053e90a53Smrg aix*) 511153e90a53Smrg # All AIX code is PIC. 511253e90a53Smrg if test "$host_cpu" = ia64; then 511353e90a53Smrg # AIX 5 now supports IA64 processor 511453e90a53Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 511553e90a53Smrg fi 511653e90a53Smrg ;; 511753e90a53Smrg 511853e90a53Smrg amigaos*) 511953e90a53Smrg # FIXME: we need at least 68020 code to build shared libraries, but 512053e90a53Smrg # adding the `-m68020' flag to GCC prevents building anything better, 512153e90a53Smrg # like `-m68040'. 512253e90a53Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 512353e90a53Smrg ;; 512453e90a53Smrg 512553e90a53Smrg beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 512653e90a53Smrg # PIC is the default for these OSes. 512753e90a53Smrg ;; 512853e90a53Smrg 512953e90a53Smrg mingw* | pw32* | os2*) 513053e90a53Smrg # This hack is so that the source file can tell whether it is being 513153e90a53Smrg # built for inclusion in a dll (and should export symbols for example). 513253e90a53Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' 513353e90a53Smrg ;; 513453e90a53Smrg 513553e90a53Smrg darwin* | rhapsody*) 513653e90a53Smrg # PIC is the default on this platform 513753e90a53Smrg # Common symbols not allowed in MH_DYLIB files 513853e90a53Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 513953e90a53Smrg ;; 514053e90a53Smrg 514153e90a53Smrg interix3*) 514253e90a53Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 514353e90a53Smrg # Instead, we relocate shared libraries at runtime. 514453e90a53Smrg ;; 514553e90a53Smrg 514653e90a53Smrg msdosdjgpp*) 514753e90a53Smrg # Just because we use GCC doesn't mean we suddenly get shared libraries 514853e90a53Smrg # on systems that don't support them. 514953e90a53Smrg _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 515053e90a53Smrg enable_shared=no 515153e90a53Smrg ;; 515253e90a53Smrg 515353e90a53Smrg sysv4*MP*) 515453e90a53Smrg if test -d /usr/nec; then 515553e90a53Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 515653e90a53Smrg fi 515753e90a53Smrg ;; 515853e90a53Smrg 515953e90a53Smrg hpux*) 516053e90a53Smrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 516153e90a53Smrg # not for PA HP-UX. 516253e90a53Smrg case $host_cpu in 516353e90a53Smrg hppa*64*|ia64*) 516453e90a53Smrg # +Z the default 516553e90a53Smrg ;; 516653e90a53Smrg *) 516753e90a53Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 516853e90a53Smrg ;; 516953e90a53Smrg esac 517053e90a53Smrg ;; 517153e90a53Smrg 517253e90a53Smrg *) 517353e90a53Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 517453e90a53Smrg ;; 517553e90a53Smrg esac 517653e90a53Smrg else 517753e90a53Smrg # PORTME Check for flag to pass linker flags through the system compiler. 517853e90a53Smrg case $host_os in 517953e90a53Smrg aix*) 518053e90a53Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 518153e90a53Smrg if test "$host_cpu" = ia64; then 518253e90a53Smrg # AIX 5 now supports IA64 processor 518353e90a53Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 518453e90a53Smrg else 518553e90a53Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 518653e90a53Smrg fi 518753e90a53Smrg ;; 518853e90a53Smrg darwin*) 518953e90a53Smrg # PIC is the default on this platform 519053e90a53Smrg # Common symbols not allowed in MH_DYLIB files 519153e90a53Smrg case $cc_basename in 519253e90a53Smrg xlc*) 519353e90a53Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' 519453e90a53Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 519553e90a53Smrg ;; 519653e90a53Smrg esac 519753e90a53Smrg ;; 519853e90a53Smrg 519953e90a53Smrg mingw* | pw32* | os2*) 520053e90a53Smrg # This hack is so that the source file can tell whether it is being 520153e90a53Smrg # built for inclusion in a dll (and should export symbols for example). 520253e90a53Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' 520353e90a53Smrg ;; 520453e90a53Smrg 520553e90a53Smrg hpux9* | hpux10* | hpux11*) 520653e90a53Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 520753e90a53Smrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 520853e90a53Smrg # not for PA HP-UX. 520953e90a53Smrg case $host_cpu in 521053e90a53Smrg hppa*64*|ia64*) 521153e90a53Smrg # +Z the default 521253e90a53Smrg ;; 521353e90a53Smrg *) 521453e90a53Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 521553e90a53Smrg ;; 521653e90a53Smrg esac 521753e90a53Smrg # Is there a better lt_prog_compiler_static that works with the bundled CC? 521853e90a53Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 521953e90a53Smrg ;; 522053e90a53Smrg 522153e90a53Smrg irix5* | irix6* | nonstopux*) 522253e90a53Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 522353e90a53Smrg # PIC (with -KPIC) is the default. 522453e90a53Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 522553e90a53Smrg ;; 522653e90a53Smrg 522753e90a53Smrg newsos6) 522853e90a53Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 522953e90a53Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 523053e90a53Smrg ;; 523153e90a53Smrg 523253e90a53Smrg linux*) 523353e90a53Smrg case $cc_basename in 523453e90a53Smrg icc* | ecc*) 523553e90a53Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 523653e90a53Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 523753e90a53Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' 523853e90a53Smrg ;; 523953e90a53Smrg pgcc* | pgf77* | pgf90* | pgf95*) 524053e90a53Smrg # Portland Group compilers (*not* the Pentium gcc compiler, 524153e90a53Smrg # which looks to be a dead project) 524253e90a53Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 524353e90a53Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 524453e90a53Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 524553e90a53Smrg ;; 524653e90a53Smrg ccc*) 524753e90a53Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 524853e90a53Smrg # All Alpha code is PIC. 524953e90a53Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 525053e90a53Smrg ;; 525153e90a53Smrg esac 525253e90a53Smrg ;; 525353e90a53Smrg 525453e90a53Smrg osf3* | osf4* | osf5*) 525553e90a53Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 525653e90a53Smrg # All OSF/1 code is PIC. 525753e90a53Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 525853e90a53Smrg ;; 525953e90a53Smrg 526053e90a53Smrg solaris*) 526153e90a53Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 526253e90a53Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 526353e90a53Smrg case $cc_basename in 526453e90a53Smrg f77* | f90* | f95*) 526553e90a53Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 526653e90a53Smrg *) 526753e90a53Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 526853e90a53Smrg esac 526953e90a53Smrg ;; 527053e90a53Smrg 527153e90a53Smrg sunos4*) 527253e90a53Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 527353e90a53Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 527453e90a53Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 527553e90a53Smrg ;; 527653e90a53Smrg 527753e90a53Smrg sysv4 | sysv4.2uw2* | sysv4.3*) 527853e90a53Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 527953e90a53Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 528053e90a53Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 528153e90a53Smrg ;; 528253e90a53Smrg 528353e90a53Smrg sysv4*MP*) 528453e90a53Smrg if test -d /usr/nec ;then 528553e90a53Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 528653e90a53Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 528753e90a53Smrg fi 528853e90a53Smrg ;; 528953e90a53Smrg 529053e90a53Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 529153e90a53Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 529253e90a53Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 529353e90a53Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 529453e90a53Smrg ;; 529553e90a53Smrg 529653e90a53Smrg unicos*) 529753e90a53Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 529853e90a53Smrg _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 529953e90a53Smrg ;; 530053e90a53Smrg 530153e90a53Smrg uts4*) 530253e90a53Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 530353e90a53Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 530453e90a53Smrg ;; 530553e90a53Smrg 530653e90a53Smrg *) 530753e90a53Smrg _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 530853e90a53Smrg ;; 530953e90a53Smrg esac 531053e90a53Smrg fi 531153e90a53Smrg]) 531253e90a53SmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)]) 531353e90a53Smrg 531453e90a53Smrg# 531553e90a53Smrg# Check to make sure the PIC flag actually works. 531653e90a53Smrg# 531753e90a53Smrgif test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then 531853e90a53Smrg AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works], 531953e90a53Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1), 532053e90a53Smrg [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [], 532153e90a53Smrg [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in 532253e90a53Smrg "" | " "*) ;; 532353e90a53Smrg *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;; 532453e90a53Smrg esac], 532553e90a53Smrg [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 532653e90a53Smrg _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 532753e90a53Smrgfi 532853e90a53Smrgcase $host_os in 532953e90a53Smrg # For platforms which do not support PIC, -DPIC is meaningless: 533053e90a53Smrg *djgpp*) 533153e90a53Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 533253e90a53Smrg ;; 533353e90a53Smrg *) 533453e90a53Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])" 533553e90a53Smrg ;; 533653e90a53Smrgesac 533753e90a53Smrg 533853e90a53Smrg# 533953e90a53Smrg# Check to make sure the static flag actually works. 534053e90a53Smrg# 534153e90a53Smrgwl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\" 534253e90a53SmrgAC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 534353e90a53Smrg _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1), 534453e90a53Smrg $lt_tmp_static_flag, 534553e90a53Smrg [], 534653e90a53Smrg [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=]) 534753e90a53Smrg]) 534853e90a53Smrg 534953e90a53Smrg 535053e90a53Smrg# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME]) 535153e90a53Smrg# ------------------------------------ 535253e90a53Smrg# See if the linker supports building shared libraries. 535353e90a53SmrgAC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS], 535453e90a53Smrg[AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 535553e90a53Smrgifelse([$1],[CXX],[ 535653e90a53Smrg _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 535753e90a53Smrg case $host_os in 535853e90a53Smrg aix4* | aix5*) 535953e90a53Smrg # If we're using GNU nm, then we don't want the "-C" option. 536053e90a53Smrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 536153e90a53Smrg if $NM -V 2>&1 | grep 'GNU' > /dev/null; then 536253e90a53Smrg _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' 536353e90a53Smrg else 536453e90a53Smrg _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' 536553e90a53Smrg fi 536653e90a53Smrg ;; 536753e90a53Smrg pw32*) 536853e90a53Smrg _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" 536953e90a53Smrg ;; 537053e90a53Smrg cygwin* | mingw*) 537153e90a53Smrg _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' 537253e90a53Smrg ;; 537353e90a53Smrg *) 537453e90a53Smrg _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 537553e90a53Smrg ;; 537653e90a53Smrg esac 537753e90a53Smrg],[ 537853e90a53Smrg runpath_var= 537953e90a53Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)= 538053e90a53Smrg _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no 538153e90a53Smrg _LT_AC_TAGVAR(archive_cmds, $1)= 538253e90a53Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)= 538353e90a53Smrg _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)= 538453e90a53Smrg _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)= 538553e90a53Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= 538653e90a53Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 538753e90a53Smrg _LT_AC_TAGVAR(thread_safe_flag_spec, $1)= 538853e90a53Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= 538953e90a53Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 539053e90a53Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 539153e90a53Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 539253e90a53Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=no 539353e90a53Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 539453e90a53Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown 539553e90a53Smrg _LT_AC_TAGVAR(hardcode_automatic, $1)=no 539653e90a53Smrg _LT_AC_TAGVAR(module_cmds, $1)= 539753e90a53Smrg _LT_AC_TAGVAR(module_expsym_cmds, $1)= 539853e90a53Smrg _LT_AC_TAGVAR(always_export_symbols, $1)=no 539953e90a53Smrg _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 540053e90a53Smrg # include_expsyms should be a list of space-separated symbols to be *always* 540153e90a53Smrg # included in the symbol list 540253e90a53Smrg _LT_AC_TAGVAR(include_expsyms, $1)= 540353e90a53Smrg # exclude_expsyms can be an extended regexp of symbols to exclude 540453e90a53Smrg # it will be wrapped by ` (' and `)$', so one must not match beginning or 540553e90a53Smrg # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', 540653e90a53Smrg # as well as any symbol that contains `d'. 540753e90a53Smrg _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_" 540853e90a53Smrg # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 540953e90a53Smrg # platforms (ab)use it in PIC code, but their linkers get confused if 541053e90a53Smrg # the symbol is explicitly referenced. Since portable code cannot 541153e90a53Smrg # rely on this symbol name, it's probably fine to never include it in 541253e90a53Smrg # preloaded symbol tables. 541353e90a53Smrg extract_expsyms_cmds= 541453e90a53Smrg # Just being paranoid about ensuring that cc_basename is set. 541553e90a53Smrg _LT_CC_BASENAME([$compiler]) 541653e90a53Smrg case $host_os in 541753e90a53Smrg cygwin* | mingw* | pw32*) 541853e90a53Smrg # FIXME: the MSVC++ port hasn't been tested in a loooong time 541953e90a53Smrg # When not using gcc, we currently assume that we are using 542053e90a53Smrg # Microsoft Visual C++. 542153e90a53Smrg if test "$GCC" != yes; then 542253e90a53Smrg with_gnu_ld=no 542353e90a53Smrg fi 542453e90a53Smrg ;; 542553e90a53Smrg interix*) 542653e90a53Smrg # we just hope/assume this is gcc and not c89 (= MSVC++) 542753e90a53Smrg with_gnu_ld=yes 542853e90a53Smrg ;; 542953e90a53Smrg openbsd*) 543053e90a53Smrg with_gnu_ld=no 543153e90a53Smrg ;; 543253e90a53Smrg esac 543353e90a53Smrg 543453e90a53Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=yes 543553e90a53Smrg if test "$with_gnu_ld" = yes; then 543653e90a53Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 543753e90a53Smrg wlarc='${wl}' 543853e90a53Smrg 543953e90a53Smrg # Set some defaults for GNU ld with shared library support. These 544053e90a53Smrg # are reset later if shared libraries are not supported. Putting them 544153e90a53Smrg # here allows them to be overridden if necessary. 544253e90a53Smrg runpath_var=LD_RUN_PATH 544353e90a53Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 544453e90a53Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 544553e90a53Smrg # ancient GNU ld didn't support --whole-archive et. al. 544653e90a53Smrg if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then 544753e90a53Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 544853e90a53Smrg else 544953e90a53Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 545053e90a53Smrg fi 545153e90a53Smrg supports_anon_versioning=no 545253e90a53Smrg case `$LD -v 2>/dev/null` in 545353e90a53Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 545453e90a53Smrg *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 545553e90a53Smrg *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 545653e90a53Smrg *\ 2.11.*) ;; # other 2.11 versions 545753e90a53Smrg *) supports_anon_versioning=yes ;; 545853e90a53Smrg esac 545953e90a53Smrg 546053e90a53Smrg # See if GNU ld supports shared libraries. 546153e90a53Smrg case $host_os in 546253e90a53Smrg aix3* | aix4* | aix5*) 546353e90a53Smrg # On AIX/PPC, the GNU linker is very broken 546453e90a53Smrg if test "$host_cpu" != ia64; then 546553e90a53Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 546653e90a53Smrg cat <<EOF 1>&2 546753e90a53Smrg 546853e90a53Smrg*** Warning: the GNU linker, at least up to release 2.9.1, is reported 546953e90a53Smrg*** to be unable to reliably create shared libraries on AIX. 547053e90a53Smrg*** Therefore, libtool is disabling shared libraries support. If you 547153e90a53Smrg*** really care for shared libraries, you may want to modify your PATH 547253e90a53Smrg*** so that a non-GNU linker is found, and then restart. 547353e90a53Smrg 547453e90a53SmrgEOF 547553e90a53Smrg fi 547653e90a53Smrg ;; 547753e90a53Smrg 547853e90a53Smrg amigaos*) 547953e90a53Smrg _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)' 548053e90a53Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 548153e90a53Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 548253e90a53Smrg 548353e90a53Smrg # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports 548453e90a53Smrg # that the semantics of dynamic libraries on AmigaOS, at least up 548553e90a53Smrg # to version 4, is to share data among multiple programs linked 548653e90a53Smrg # with the same dynamic library. Since this doesn't match the 548753e90a53Smrg # behavior of shared libraries on other platforms, we can't use 548853e90a53Smrg # them. 548953e90a53Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 549053e90a53Smrg ;; 549153e90a53Smrg 549253e90a53Smrg beos*) 549353e90a53Smrg if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 549453e90a53Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 549553e90a53Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 549653e90a53Smrg # support --undefined. This deserves some investigation. FIXME 549753e90a53Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 549853e90a53Smrg else 549953e90a53Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 550053e90a53Smrg fi 550153e90a53Smrg ;; 550253e90a53Smrg 550353e90a53Smrg cygwin* | mingw* | pw32*) 550453e90a53Smrg # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 550553e90a53Smrg # as there is no search path for DLLs. 550653e90a53Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 550753e90a53Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 550853e90a53Smrg _LT_AC_TAGVAR(always_export_symbols, $1)=no 550953e90a53Smrg _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 551053e90a53Smrg _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' 551153e90a53Smrg 551253e90a53Smrg if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then 551353e90a53Smrg _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' 551453e90a53Smrg # If the export-symbols file already is a .def file (1st line 551553e90a53Smrg # is EXPORTS), use it as is; otherwise, prepend... 551653e90a53Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 551753e90a53Smrg cp $export_symbols $output_objdir/$soname.def; 551853e90a53Smrg else 551953e90a53Smrg echo EXPORTS > $output_objdir/$soname.def; 552053e90a53Smrg cat $export_symbols >> $output_objdir/$soname.def; 552153e90a53Smrg fi~ 552253e90a53Smrg $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 552353e90a53Smrg else 552453e90a53Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 552553e90a53Smrg fi 552653e90a53Smrg ;; 552753e90a53Smrg 552853e90a53Smrg interix3*) 552953e90a53Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 553053e90a53Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 553153e90a53Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 553253e90a53Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 553353e90a53Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 553453e90a53Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 553553e90a53Smrg # default) and relocated if they conflict, which is a slow very memory 553653e90a53Smrg # consuming and fragmenting process. To avoid this, we pick a random, 553753e90a53Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 553853e90a53Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 553953e90a53Smrg _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' 554053e90a53Smrg _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' 554153e90a53Smrg ;; 554253e90a53Smrg 554353e90a53Smrg linux*) 554453e90a53Smrg if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 554553e90a53Smrg tmp_addflag= 554653e90a53Smrg case $cc_basename,$host_cpu in 554753e90a53Smrg pgcc*) # Portland Group C compiler 554853e90a53Smrg _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' 554953e90a53Smrg tmp_addflag=' $pic_flag' 555053e90a53Smrg ;; 555153e90a53Smrg pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers 555253e90a53Smrg _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' 555353e90a53Smrg tmp_addflag=' $pic_flag -Mnomain' ;; 555453e90a53Smrg ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 555553e90a53Smrg tmp_addflag=' -i_dynamic' ;; 555653e90a53Smrg efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 555753e90a53Smrg tmp_addflag=' -i_dynamic -nofor_main' ;; 555853e90a53Smrg ifc* | ifort*) # Intel Fortran compiler 555953e90a53Smrg tmp_addflag=' -nofor_main' ;; 556053e90a53Smrg esac 556153e90a53Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 556253e90a53Smrg 556353e90a53Smrg if test $supports_anon_versioning = yes; then 556453e90a53Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~ 556553e90a53Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 556653e90a53Smrg $echo "local: *; };" >> $output_objdir/$libname.ver~ 556753e90a53Smrg $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 556853e90a53Smrg fi 556953e90a53Smrg else 557053e90a53Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 557153e90a53Smrg fi 557253e90a53Smrg ;; 557353e90a53Smrg 557453e90a53Smrg netbsd*) 557553e90a53Smrg if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then 557653e90a53Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 557753e90a53Smrg wlarc= 557853e90a53Smrg else 557953e90a53Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 558053e90a53Smrg _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' 558153e90a53Smrg fi 558253e90a53Smrg ;; 558353e90a53Smrg 558453e90a53Smrg solaris*) 558553e90a53Smrg if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then 558653e90a53Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 558753e90a53Smrg cat <<EOF 1>&2 558853e90a53Smrg 558953e90a53Smrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably 559053e90a53Smrg*** create shared libraries on Solaris systems. Therefore, libtool 559153e90a53Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 559253e90a53Smrg*** binutils to release 2.9.1 or newer. Another option is to modify 559353e90a53Smrg*** your PATH or compiler configuration so that the native linker is 559453e90a53Smrg*** used, and then restart. 559553e90a53Smrg 559653e90a53SmrgEOF 559753e90a53Smrg elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 559853e90a53Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 559953e90a53Smrg _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' 560053e90a53Smrg else 560153e90a53Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 560253e90a53Smrg fi 560353e90a53Smrg ;; 560453e90a53Smrg 560553e90a53Smrg sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 560653e90a53Smrg case `$LD -v 2>&1` in 560753e90a53Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 560853e90a53Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 560953e90a53Smrg cat <<_LT_EOF 1>&2 561053e90a53Smrg 561153e90a53Smrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not 561253e90a53Smrg*** reliably create shared libraries on SCO systems. Therefore, libtool 561353e90a53Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 561453e90a53Smrg*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 561553e90a53Smrg*** your PATH or compiler configuration so that the native linker is 561653e90a53Smrg*** used, and then restart. 561753e90a53Smrg 561853e90a53Smrg_LT_EOF 561953e90a53Smrg ;; 562053e90a53Smrg *) 562153e90a53Smrg if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 562253e90a53Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' 562353e90a53Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' 562453e90a53Smrg _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' 562553e90a53Smrg else 562653e90a53Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 562753e90a53Smrg fi 562853e90a53Smrg ;; 562953e90a53Smrg esac 563053e90a53Smrg ;; 563153e90a53Smrg 563253e90a53Smrg sunos4*) 563353e90a53Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 563453e90a53Smrg wlarc= 563553e90a53Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 563653e90a53Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 563753e90a53Smrg ;; 563853e90a53Smrg 563953e90a53Smrg *) 564053e90a53Smrg if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 564153e90a53Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 564253e90a53Smrg _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' 564353e90a53Smrg else 564453e90a53Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 564553e90a53Smrg fi 564653e90a53Smrg ;; 564753e90a53Smrg esac 564853e90a53Smrg 564953e90a53Smrg if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then 565053e90a53Smrg runpath_var= 565153e90a53Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= 565253e90a53Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= 565353e90a53Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 565453e90a53Smrg fi 565553e90a53Smrg else 565653e90a53Smrg # PORTME fill in a description of your system's linker (not GNU ld) 565753e90a53Smrg case $host_os in 565853e90a53Smrg aix3*) 565953e90a53Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 566053e90a53Smrg _LT_AC_TAGVAR(always_export_symbols, $1)=yes 566153e90a53Smrg _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' 566253e90a53Smrg # Note: this linker hardcodes the directories in LIBPATH if there 566353e90a53Smrg # are no directories specified by -L. 566453e90a53Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 566553e90a53Smrg if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then 566653e90a53Smrg # Neither direct hardcoding nor static linking is supported with a 566753e90a53Smrg # broken collect2. 566853e90a53Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported 566953e90a53Smrg fi 567053e90a53Smrg ;; 567153e90a53Smrg 567253e90a53Smrg aix4* | aix5*) 567353e90a53Smrg if test "$host_cpu" = ia64; then 567453e90a53Smrg # On IA64, the linker does run time linking by default, so we don't 567553e90a53Smrg # have to do anything special. 567653e90a53Smrg aix_use_runtimelinking=no 567753e90a53Smrg exp_sym_flag='-Bexport' 567853e90a53Smrg no_entry_flag="" 567953e90a53Smrg else 568053e90a53Smrg # If we're using GNU nm, then we don't want the "-C" option. 568153e90a53Smrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 568253e90a53Smrg if $NM -V 2>&1 | grep 'GNU' > /dev/null; then 568353e90a53Smrg _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' 568453e90a53Smrg else 568553e90a53Smrg _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' 568653e90a53Smrg fi 568753e90a53Smrg aix_use_runtimelinking=no 568853e90a53Smrg 568953e90a53Smrg # Test if we are trying to use run time linking or normal 569053e90a53Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 569153e90a53Smrg # need to do runtime linking. 569253e90a53Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*) 569353e90a53Smrg for ld_flag in $LDFLAGS; do 569453e90a53Smrg if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then 569553e90a53Smrg aix_use_runtimelinking=yes 569653e90a53Smrg break 569753e90a53Smrg fi 569853e90a53Smrg done 569953e90a53Smrg ;; 570053e90a53Smrg esac 570153e90a53Smrg 570253e90a53Smrg exp_sym_flag='-bexport' 570353e90a53Smrg no_entry_flag='-bnoentry' 570453e90a53Smrg fi 570553e90a53Smrg 570653e90a53Smrg # When large executables or shared objects are built, AIX ld can 570753e90a53Smrg # have problems creating the table of contents. If linking a library 570853e90a53Smrg # or program results in "error TOC overflow" add -mminimal-toc to 570953e90a53Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 571053e90a53Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 571153e90a53Smrg 571253e90a53Smrg _LT_AC_TAGVAR(archive_cmds, $1)='' 571353e90a53Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 571453e90a53Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' 571553e90a53Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 571653e90a53Smrg 571753e90a53Smrg if test "$GCC" = yes; then 571853e90a53Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 571953e90a53Smrg # We only want to do this on AIX 4.2 and lower, the check 572053e90a53Smrg # below for broken collect2 doesn't work under 4.3+ 572153e90a53Smrg collect2name=`${CC} -print-prog-name=collect2` 572253e90a53Smrg if test -f "$collect2name" && \ 572353e90a53Smrg strings "$collect2name" | grep resolve_lib_name >/dev/null 572453e90a53Smrg then 572553e90a53Smrg # We have reworked collect2 572653e90a53Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 572753e90a53Smrg else 572853e90a53Smrg # We have old collect2 572953e90a53Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported 573053e90a53Smrg # It fails to find uninstalled libraries when the uninstalled 573153e90a53Smrg # path is not listed in the libpath. Setting hardcode_minus_L 573253e90a53Smrg # to unsupported forces relinking 573353e90a53Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 573453e90a53Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 573553e90a53Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 573653e90a53Smrg fi 573753e90a53Smrg ;; 573853e90a53Smrg esac 573953e90a53Smrg shared_flag='-shared' 574053e90a53Smrg if test "$aix_use_runtimelinking" = yes; then 574153e90a53Smrg shared_flag="$shared_flag "'${wl}-G' 574253e90a53Smrg fi 574353e90a53Smrg else 574453e90a53Smrg # not using gcc 574553e90a53Smrg if test "$host_cpu" = ia64; then 574653e90a53Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 574753e90a53Smrg # chokes on -Wl,-G. The following line is correct: 574853e90a53Smrg shared_flag='-G' 574953e90a53Smrg else 575053e90a53Smrg if test "$aix_use_runtimelinking" = yes; then 575153e90a53Smrg shared_flag='${wl}-G' 575253e90a53Smrg else 575353e90a53Smrg shared_flag='${wl}-bM:SRE' 575453e90a53Smrg fi 575553e90a53Smrg fi 575653e90a53Smrg fi 575753e90a53Smrg 575853e90a53Smrg # It seems that -bexpall does not export symbols beginning with 575953e90a53Smrg # underscore (_), so it is better to generate a list of symbols to export. 576053e90a53Smrg _LT_AC_TAGVAR(always_export_symbols, $1)=yes 576153e90a53Smrg if test "$aix_use_runtimelinking" = yes; then 576253e90a53Smrg # Warning - without using the other runtime loading flags (-brtl), 576353e90a53Smrg # -berok will link without error, but may produce a broken library. 576453e90a53Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' 576553e90a53Smrg # Determine the default libpath from the value encoded in an empty executable. 576653e90a53Smrg _LT_AC_SYS_LIBPATH_AIX 576753e90a53Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 576853e90a53Smrg _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" 576953e90a53Smrg else 577053e90a53Smrg if test "$host_cpu" = ia64; then 577153e90a53Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 577253e90a53Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 577353e90a53Smrg _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" 577453e90a53Smrg else 577553e90a53Smrg # Determine the default libpath from the value encoded in an empty executable. 577653e90a53Smrg _LT_AC_SYS_LIBPATH_AIX 577753e90a53Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 577853e90a53Smrg # Warning - without using the other run time loading flags, 577953e90a53Smrg # -berok will link without error, but may produce a broken library. 578053e90a53Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 578153e90a53Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 578253e90a53Smrg # Exported symbols can be pulled into shared objects from archives 578353e90a53Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 578453e90a53Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes 578553e90a53Smrg # This is similar to how AIX traditionally builds its shared libraries. 578653e90a53Smrg _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' 578753e90a53Smrg fi 578853e90a53Smrg fi 578953e90a53Smrg ;; 579053e90a53Smrg 579153e90a53Smrg amigaos*) 579253e90a53Smrg _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)' 579353e90a53Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 579453e90a53Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 579553e90a53Smrg # see comment about different semantics on the GNU ld section 579653e90a53Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 579753e90a53Smrg ;; 579853e90a53Smrg 579953e90a53Smrg bsdi[[45]]*) 580053e90a53Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 580153e90a53Smrg ;; 580253e90a53Smrg 580353e90a53Smrg cygwin* | mingw* | pw32*) 580453e90a53Smrg # When not using gcc, we currently assume that we are using 580553e90a53Smrg # Microsoft Visual C++. 580653e90a53Smrg # hardcode_libdir_flag_spec is actually meaningless, as there is 580753e90a53Smrg # no search path for DLLs. 580853e90a53Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 580953e90a53Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 581053e90a53Smrg # Tell ltmain to make .lib files, not .a files. 581153e90a53Smrg libext=lib 581253e90a53Smrg # Tell ltmain to make .dll files, not .so files. 581353e90a53Smrg shrext_cmds=".dll" 581453e90a53Smrg # FIXME: Setting linknames here is a bad hack. 581553e90a53Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' 581653e90a53Smrg # The linker will automatically build a .lib file if we build a DLL. 581753e90a53Smrg _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true' 581853e90a53Smrg # FIXME: Should let the user specify the lib program. 581953e90a53Smrg _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs' 582053e90a53Smrg _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' 582153e90a53Smrg _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 582253e90a53Smrg ;; 582353e90a53Smrg 582453e90a53Smrg darwin* | rhapsody*) 582553e90a53Smrg case $host_os in 582653e90a53Smrg rhapsody* | darwin1.[[012]]) 582753e90a53Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' 582853e90a53Smrg ;; 582953e90a53Smrg *) # Darwin 1.3 on 583053e90a53Smrg if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then 583153e90a53Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' 583253e90a53Smrg else 583353e90a53Smrg case ${MACOSX_DEPLOYMENT_TARGET} in 583453e90a53Smrg 10.[[012]]) 583553e90a53Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' 583653e90a53Smrg ;; 583753e90a53Smrg 10.*) 583853e90a53Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup' 583953e90a53Smrg ;; 584053e90a53Smrg esac 584153e90a53Smrg fi 584253e90a53Smrg ;; 584353e90a53Smrg esac 584453e90a53Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 584553e90a53Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 584653e90a53Smrg _LT_AC_TAGVAR(hardcode_automatic, $1)=yes 584753e90a53Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 584853e90a53Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' 584953e90a53Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 585053e90a53Smrg if test "$GCC" = yes ; then 585153e90a53Smrg output_verbose_link_cmd='echo' 585253e90a53Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' 585353e90a53Smrg _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' 585453e90a53Smrg # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds 585553e90a53Smrg _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}' 585653e90a53Smrg _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}' 585753e90a53Smrg else 585853e90a53Smrg case $cc_basename in 585953e90a53Smrg xlc*) 586053e90a53Smrg output_verbose_link_cmd='echo' 586153e90a53Smrg _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' 586253e90a53Smrg _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' 586353e90a53Smrg # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds 586453e90a53Smrg _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}' 586553e90a53Smrg _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}' 586653e90a53Smrg ;; 586753e90a53Smrg *) 586853e90a53Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 586953e90a53Smrg ;; 587053e90a53Smrg esac 587153e90a53Smrg fi 587253e90a53Smrg ;; 587353e90a53Smrg 587453e90a53Smrg dgux*) 587553e90a53Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 587653e90a53Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 587753e90a53Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 587853e90a53Smrg ;; 587953e90a53Smrg 588053e90a53Smrg freebsd1*) 588153e90a53Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 588253e90a53Smrg ;; 588353e90a53Smrg 588453e90a53Smrg # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 588553e90a53Smrg # support. Future versions do this automatically, but an explicit c++rt0.o 588653e90a53Smrg # does not break anything, and helps significantly (at the cost of a little 588753e90a53Smrg # extra space). 588853e90a53Smrg freebsd2.2*) 588953e90a53Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 589053e90a53Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 589153e90a53Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 589253e90a53Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 589353e90a53Smrg ;; 589453e90a53Smrg 589553e90a53Smrg # Unfortunately, older versions of FreeBSD 2 do not have this feature. 589653e90a53Smrg freebsd2*) 589753e90a53Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 589853e90a53Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 589953e90a53Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 590053e90a53Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 590153e90a53Smrg ;; 590253e90a53Smrg 590353e90a53Smrg # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 590453e90a53Smrg freebsd* | kfreebsd*-gnu | dragonfly*) 590553e90a53Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' 590653e90a53Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 590753e90a53Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 590853e90a53Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 590953e90a53Smrg ;; 591053e90a53Smrg 591153e90a53Smrg hpux9*) 591253e90a53Smrg if test "$GCC" = yes; then 591353e90a53Smrg _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' 591453e90a53Smrg else 591553e90a53Smrg _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' 591653e90a53Smrg fi 591753e90a53Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 591853e90a53Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 591953e90a53Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 592053e90a53Smrg 592153e90a53Smrg # hardcode_minus_L: Not really in the search PATH, 592253e90a53Smrg # but as the default location of the library. 592353e90a53Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 592453e90a53Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 592553e90a53Smrg ;; 592653e90a53Smrg 592753e90a53Smrg hpux10*) 592853e90a53Smrg if test "$GCC" = yes -a "$with_gnu_ld" = no; then 592953e90a53Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 593053e90a53Smrg else 593153e90a53Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 593253e90a53Smrg fi 593353e90a53Smrg if test "$with_gnu_ld" = no; then 593453e90a53Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 593553e90a53Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 593653e90a53Smrg 593753e90a53Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 593853e90a53Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 593953e90a53Smrg 594053e90a53Smrg # hardcode_minus_L: Not really in the search PATH, 594153e90a53Smrg # but as the default location of the library. 594253e90a53Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 594353e90a53Smrg fi 594453e90a53Smrg ;; 594553e90a53Smrg 594653e90a53Smrg hpux11*) 594753e90a53Smrg if test "$GCC" = yes -a "$with_gnu_ld" = no; then 594853e90a53Smrg case $host_cpu in 594953e90a53Smrg hppa*64*) 595053e90a53Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 595153e90a53Smrg ;; 595253e90a53Smrg ia64*) 595353e90a53Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 595453e90a53Smrg ;; 595553e90a53Smrg *) 595653e90a53Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 595753e90a53Smrg ;; 595853e90a53Smrg esac 595953e90a53Smrg else 596053e90a53Smrg case $host_cpu in 596153e90a53Smrg hppa*64*) 596253e90a53Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 596353e90a53Smrg ;; 596453e90a53Smrg ia64*) 596553e90a53Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 596653e90a53Smrg ;; 596753e90a53Smrg *) 596853e90a53Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 596953e90a53Smrg ;; 597053e90a53Smrg esac 597153e90a53Smrg fi 597253e90a53Smrg if test "$with_gnu_ld" = no; then 597353e90a53Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 597453e90a53Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 597553e90a53Smrg 597653e90a53Smrg case $host_cpu in 597753e90a53Smrg hppa*64*|ia64*) 597853e90a53Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' 597953e90a53Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 598053e90a53Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 598153e90a53Smrg ;; 598253e90a53Smrg *) 598353e90a53Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 598453e90a53Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 598553e90a53Smrg 598653e90a53Smrg # hardcode_minus_L: Not really in the search PATH, 598753e90a53Smrg # but as the default location of the library. 598853e90a53Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 598953e90a53Smrg ;; 599053e90a53Smrg esac 599153e90a53Smrg fi 599253e90a53Smrg ;; 599353e90a53Smrg 599453e90a53Smrg irix5* | irix6* | nonstopux*) 599553e90a53Smrg if test "$GCC" = yes; then 599653e90a53Smrg _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' 599753e90a53Smrg else 599853e90a53Smrg _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' 599953e90a53Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' 600053e90a53Smrg fi 600153e90a53Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 600253e90a53Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 600353e90a53Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 600453e90a53Smrg ;; 600553e90a53Smrg 600653e90a53Smrg netbsd*) 600753e90a53Smrg if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then 600853e90a53Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 600953e90a53Smrg else 601053e90a53Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 601153e90a53Smrg fi 601253e90a53Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 601353e90a53Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 601453e90a53Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 601553e90a53Smrg ;; 601653e90a53Smrg 601753e90a53Smrg newsos6) 601853e90a53Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 601953e90a53Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 602053e90a53Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 602153e90a53Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 602253e90a53Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 602353e90a53Smrg ;; 602453e90a53Smrg 602553e90a53Smrg openbsd*) 602653e90a53Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 602753e90a53Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 602853e90a53Smrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 602953e90a53Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 603053e90a53Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' 603153e90a53Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 603253e90a53Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 603353e90a53Smrg else 603453e90a53Smrg case $host_os in 603553e90a53Smrg openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) 603653e90a53Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 603753e90a53Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 603853e90a53Smrg ;; 603953e90a53Smrg *) 604053e90a53Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 604153e90a53Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 604253e90a53Smrg ;; 604353e90a53Smrg esac 604453e90a53Smrg fi 604553e90a53Smrg ;; 604653e90a53Smrg 604753e90a53Smrg os2*) 604853e90a53Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 604953e90a53Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 605053e90a53Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 605153e90a53Smrg _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' 605253e90a53Smrg _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' 605353e90a53Smrg ;; 605453e90a53Smrg 605553e90a53Smrg osf3*) 605653e90a53Smrg if test "$GCC" = yes; then 605753e90a53Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 605853e90a53Smrg _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' 605953e90a53Smrg else 606053e90a53Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 606153e90a53Smrg _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' 606253e90a53Smrg fi 606353e90a53Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 606453e90a53Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 606553e90a53Smrg ;; 606653e90a53Smrg 606753e90a53Smrg osf4* | osf5*) # as osf3* with the addition of -msym flag 606853e90a53Smrg if test "$GCC" = yes; then 606953e90a53Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 607053e90a53Smrg _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' 607153e90a53Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 607253e90a53Smrg else 607353e90a53Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 607453e90a53Smrg _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' 607553e90a53Smrg _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~ 607653e90a53Smrg $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' 607753e90a53Smrg 607853e90a53Smrg # Both c and cxx compiler support -rpath directly 607953e90a53Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 608053e90a53Smrg fi 608153e90a53Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 608253e90a53Smrg ;; 608353e90a53Smrg 608453e90a53Smrg solaris*) 608553e90a53Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text' 608653e90a53Smrg if test "$GCC" = yes; then 608753e90a53Smrg wlarc='${wl}' 608853e90a53Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 608953e90a53Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 609053e90a53Smrg $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' 609153e90a53Smrg else 609253e90a53Smrg wlarc='' 609353e90a53Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' 609453e90a53Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 609553e90a53Smrg $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' 609653e90a53Smrg fi 609753e90a53Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 609853e90a53Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 609953e90a53Smrg case $host_os in 610053e90a53Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 610153e90a53Smrg *) 610253e90a53Smrg # The compiler driver will combine linker options so we 610353e90a53Smrg # cannot just pass the convience library names through 610453e90a53Smrg # without $wl, iff we do not link with $LD. 610553e90a53Smrg # Luckily, gcc supports the same syntax we need for Sun Studio. 610653e90a53Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 610753e90a53Smrg case $wlarc in 610853e90a53Smrg '') 610953e90a53Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; 611053e90a53Smrg *) 611153e90a53Smrg _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' ;; 611253e90a53Smrg esac ;; 611353e90a53Smrg esac 611453e90a53Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 611553e90a53Smrg ;; 611653e90a53Smrg 611753e90a53Smrg sunos4*) 611853e90a53Smrg if test "x$host_vendor" = xsequent; then 611953e90a53Smrg # Use $CC to link under sequent, because it throws in some extra .o 612053e90a53Smrg # files that make .init and .fini sections work. 612153e90a53Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' 612253e90a53Smrg else 612353e90a53Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 612453e90a53Smrg fi 612553e90a53Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 612653e90a53Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 612753e90a53Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 612853e90a53Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 612953e90a53Smrg ;; 613053e90a53Smrg 613153e90a53Smrg sysv4) 613253e90a53Smrg case $host_vendor in 613353e90a53Smrg sni) 613453e90a53Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 613553e90a53Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 613653e90a53Smrg ;; 613753e90a53Smrg siemens) 613853e90a53Smrg ## LD is ld it makes a PLAMLIB 613953e90a53Smrg ## CC just makes a GrossModule. 614053e90a53Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 614153e90a53Smrg _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 614253e90a53Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 614353e90a53Smrg ;; 614453e90a53Smrg motorola) 614553e90a53Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 614653e90a53Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 614753e90a53Smrg ;; 614853e90a53Smrg esac 614953e90a53Smrg runpath_var='LD_RUN_PATH' 615053e90a53Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 615153e90a53Smrg ;; 615253e90a53Smrg 615353e90a53Smrg sysv4.3*) 615453e90a53Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 615553e90a53Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 615653e90a53Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 615753e90a53Smrg ;; 615853e90a53Smrg 615953e90a53Smrg sysv4*MP*) 616053e90a53Smrg if test -d /usr/nec; then 616153e90a53Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 616253e90a53Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 616353e90a53Smrg runpath_var=LD_RUN_PATH 616453e90a53Smrg hardcode_runpath_var=yes 616553e90a53Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=yes 616653e90a53Smrg fi 616753e90a53Smrg ;; 616853e90a53Smrg 616953e90a53Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7*) 617053e90a53Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 617153e90a53Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 617253e90a53Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 617353e90a53Smrg runpath_var='LD_RUN_PATH' 617453e90a53Smrg 617553e90a53Smrg if test "$GCC" = yes; then 617653e90a53Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 617753e90a53Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 617853e90a53Smrg else 617953e90a53Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 618053e90a53Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 618153e90a53Smrg fi 618253e90a53Smrg ;; 618353e90a53Smrg 618453e90a53Smrg sysv5* | sco3.2v5* | sco5v6*) 618553e90a53Smrg # Note: We can NOT use -z defs as we might desire, because we do not 618653e90a53Smrg # link with -lc, and that would cause any symbols used from libc to 618753e90a53Smrg # always be unresolved, which means just about no library would 618853e90a53Smrg # ever link correctly. If we're not using GNU ld we use -z text 618953e90a53Smrg # though, which does catch some bad symbols but isn't as heavy-handed 619053e90a53Smrg # as -z defs. 619153e90a53Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 619253e90a53Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 619353e90a53Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 619453e90a53Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 619553e90a53Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' 619653e90a53Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' 619753e90a53Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 619853e90a53Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 619953e90a53Smrg runpath_var='LD_RUN_PATH' 620053e90a53Smrg 620153e90a53Smrg if test "$GCC" = yes; then 620253e90a53Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' 620353e90a53Smrg _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' 620453e90a53Smrg else 620553e90a53Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' 620653e90a53Smrg _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' 620753e90a53Smrg fi 620853e90a53Smrg ;; 620953e90a53Smrg 621053e90a53Smrg uts4*) 621153e90a53Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 621253e90a53Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 621353e90a53Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 621453e90a53Smrg ;; 621553e90a53Smrg 621653e90a53Smrg *) 621753e90a53Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 621853e90a53Smrg ;; 621953e90a53Smrg esac 622053e90a53Smrg fi 622153e90a53Smrg]) 622253e90a53SmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) 622353e90a53Smrgtest "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 622453e90a53Smrg 622553e90a53Smrg# 622653e90a53Smrg# Do we need to explicitly link libc? 622753e90a53Smrg# 622853e90a53Smrgcase "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in 622953e90a53Smrgx|xyes) 623053e90a53Smrg # Assume -lc should be added 623153e90a53Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes 623253e90a53Smrg 623353e90a53Smrg if test "$enable_shared" = yes && test "$GCC" = yes; then 623453e90a53Smrg case $_LT_AC_TAGVAR(archive_cmds, $1) in 623553e90a53Smrg *'~'*) 623653e90a53Smrg # FIXME: we may have to deal with multi-command sequences. 623753e90a53Smrg ;; 623853e90a53Smrg '$CC '*) 623953e90a53Smrg # Test whether the compiler implicitly links with -lc since on some 624053e90a53Smrg # systems, -lgcc has to come before -lc. If gcc already passes -lc 624153e90a53Smrg # to ld, don't add -lc before -lgcc. 624253e90a53Smrg AC_MSG_CHECKING([whether -lc should be explicitly linked in]) 624353e90a53Smrg $rm conftest* 624453e90a53Smrg printf "$lt_simple_compile_test_code" > conftest.$ac_ext 624553e90a53Smrg 624653e90a53Smrg if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 624753e90a53Smrg soname=conftest 624853e90a53Smrg lib=conftest 624953e90a53Smrg libobjs=conftest.$ac_objext 625053e90a53Smrg deplibs= 625153e90a53Smrg wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) 625253e90a53Smrg pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) 625353e90a53Smrg compiler_flags=-v 625453e90a53Smrg linker_flags=-v 625553e90a53Smrg verstring= 625653e90a53Smrg output_objdir=. 625753e90a53Smrg libname=conftest 625853e90a53Smrg lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1) 625953e90a53Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)= 626053e90a53Smrg if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 626153e90a53Smrg then 626253e90a53Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 626353e90a53Smrg else 626453e90a53Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes 626553e90a53Smrg fi 626653e90a53Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 626753e90a53Smrg else 626853e90a53Smrg cat conftest.err 1>&5 626953e90a53Smrg fi 627053e90a53Smrg $rm conftest* 627153e90a53Smrg AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)]) 627253e90a53Smrg ;; 627353e90a53Smrg esac 627453e90a53Smrg fi 627553e90a53Smrg ;; 627653e90a53Smrgesac 627753e90a53Smrg])# AC_LIBTOOL_PROG_LD_SHLIBS 627853e90a53Smrg 627953e90a53Smrg 628053e90a53Smrg# _LT_AC_FILE_LTDLL_C 628153e90a53Smrg# ------------------- 628253e90a53Smrg# Be careful that the start marker always follows a newline. 628353e90a53SmrgAC_DEFUN([_LT_AC_FILE_LTDLL_C], [ 628453e90a53Smrg# /* ltdll.c starts here */ 628553e90a53Smrg# #define WIN32_LEAN_AND_MEAN 628653e90a53Smrg# #include <windows.h> 628753e90a53Smrg# #undef WIN32_LEAN_AND_MEAN 628853e90a53Smrg# #include <stdio.h> 628953e90a53Smrg# 629053e90a53Smrg# #ifndef __CYGWIN__ 629153e90a53Smrg# # ifdef __CYGWIN32__ 629253e90a53Smrg# # define __CYGWIN__ __CYGWIN32__ 629353e90a53Smrg# # endif 629453e90a53Smrg# #endif 629553e90a53Smrg# 629653e90a53Smrg# #ifdef __cplusplus 629753e90a53Smrg# extern "C" { 629853e90a53Smrg# #endif 629953e90a53Smrg# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved); 630053e90a53Smrg# #ifdef __cplusplus 630153e90a53Smrg# } 630253e90a53Smrg# #endif 630353e90a53Smrg# 630453e90a53Smrg# #ifdef __CYGWIN__ 630553e90a53Smrg# #include <cygwin/cygwin_dll.h> 630653e90a53Smrg# DECLARE_CYGWIN_DLL( DllMain ); 630753e90a53Smrg# #endif 630853e90a53Smrg# HINSTANCE __hDllInstance_base; 630953e90a53Smrg# 631053e90a53Smrg# BOOL APIENTRY 631153e90a53Smrg# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved) 631253e90a53Smrg# { 631353e90a53Smrg# __hDllInstance_base = hInst; 631453e90a53Smrg# return TRUE; 631553e90a53Smrg# } 631653e90a53Smrg# /* ltdll.c ends here */ 631753e90a53Smrg])# _LT_AC_FILE_LTDLL_C 631853e90a53Smrg 631953e90a53Smrg 632053e90a53Smrg# _LT_AC_TAGVAR(VARNAME, [TAGNAME]) 632153e90a53Smrg# --------------------------------- 632253e90a53SmrgAC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])]) 632353e90a53Smrg 632453e90a53Smrg 632553e90a53Smrg# old names 632653e90a53SmrgAC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL]) 632753e90a53SmrgAC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 632853e90a53SmrgAC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 632953e90a53SmrgAC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 633053e90a53SmrgAC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 633153e90a53SmrgAC_DEFUN([AM_PROG_LD], [AC_PROG_LD]) 633253e90a53SmrgAC_DEFUN([AM_PROG_NM], [AC_PROG_NM]) 633353e90a53Smrg 633453e90a53Smrg# This is just to silence aclocal about the macro not being used 633553e90a53Smrgifelse([AC_DISABLE_FAST_INSTALL]) 633653e90a53Smrg 633753e90a53SmrgAC_DEFUN([LT_AC_PROG_GCJ], 633853e90a53Smrg[AC_CHECK_TOOL(GCJ, gcj, no) 633953e90a53Smrg test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" 634053e90a53Smrg AC_SUBST(GCJFLAGS) 634153e90a53Smrg]) 634253e90a53Smrg 634353e90a53SmrgAC_DEFUN([LT_AC_PROG_RC], 634453e90a53Smrg[AC_CHECK_TOOL(RC, windres, no) 634553e90a53Smrg]) 634653e90a53Smrg 634753e90a53Smrg# NOTE: This macro has been submitted for inclusion into # 634853e90a53Smrg# GNU Autoconf as AC_PROG_SED. When it is available in # 634953e90a53Smrg# a released version of Autoconf we should remove this # 635053e90a53Smrg# macro and use it instead. # 635153e90a53Smrg# LT_AC_PROG_SED 635253e90a53Smrg# -------------- 635353e90a53Smrg# Check for a fully-functional sed program, that truncates 635453e90a53Smrg# as few characters as possible. Prefer GNU sed if found. 635553e90a53SmrgAC_DEFUN([LT_AC_PROG_SED], 635653e90a53Smrg[AC_MSG_CHECKING([for a sed that does not truncate output]) 635753e90a53SmrgAC_CACHE_VAL(lt_cv_path_SED, 635853e90a53Smrg[# Loop through the user's path and test for sed and gsed. 635953e90a53Smrg# Then use that list of sed's as ones to test for truncation. 636053e90a53Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 636153e90a53Smrgfor as_dir in $PATH 636253e90a53Smrgdo 636353e90a53Smrg IFS=$as_save_IFS 636453e90a53Smrg test -z "$as_dir" && as_dir=. 636553e90a53Smrg for lt_ac_prog in sed gsed; do 636653e90a53Smrg for ac_exec_ext in '' $ac_executable_extensions; do 636753e90a53Smrg if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 636853e90a53Smrg lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 636953e90a53Smrg fi 637053e90a53Smrg done 637153e90a53Smrg done 637253e90a53Smrgdone 637353e90a53Smrglt_ac_max=0 637453e90a53Smrglt_ac_count=0 637553e90a53Smrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris 637653e90a53Smrg# along with /bin/sed that truncates output. 637753e90a53Smrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 637853e90a53Smrg test ! -f $lt_ac_sed && continue 637953e90a53Smrg cat /dev/null > conftest.in 638053e90a53Smrg lt_ac_count=0 638153e90a53Smrg echo $ECHO_N "0123456789$ECHO_C" >conftest.in 638253e90a53Smrg # Check for GNU sed and select it if it is found. 638353e90a53Smrg if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 638453e90a53Smrg lt_cv_path_SED=$lt_ac_sed 638553e90a53Smrg break 638653e90a53Smrg fi 638753e90a53Smrg while true; do 638853e90a53Smrg cat conftest.in conftest.in >conftest.tmp 638953e90a53Smrg mv conftest.tmp conftest.in 639053e90a53Smrg cp conftest.in conftest.nl 639153e90a53Smrg echo >>conftest.nl 639253e90a53Smrg $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 639353e90a53Smrg cmp -s conftest.out conftest.nl || break 639453e90a53Smrg # 10000 chars as input seems more than enough 639553e90a53Smrg test $lt_ac_count -gt 10 && break 639653e90a53Smrg lt_ac_count=`expr $lt_ac_count + 1` 639753e90a53Smrg if test $lt_ac_count -gt $lt_ac_max; then 639853e90a53Smrg lt_ac_max=$lt_ac_count 639953e90a53Smrg lt_cv_path_SED=$lt_ac_sed 640053e90a53Smrg fi 640153e90a53Smrg done 640253e90a53Smrgdone 640353e90a53Smrg]) 640453e90a53SmrgSED=$lt_cv_path_SED 640553e90a53SmrgAC_MSG_RESULT([$SED]) 640653e90a53Smrg]) 640753e90a53Smrg 640853e90a53Smrg# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 640953e90a53Smrg# 641053e90a53Smrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 641153e90a53Smrg# 641253e90a53Smrg# This program is free software; you can redistribute it and/or modify 641353e90a53Smrg# it under the terms of the GNU General Public License as published by 641453e90a53Smrg# the Free Software Foundation; either version 2 of the License, or 641553e90a53Smrg# (at your option) any later version. 641653e90a53Smrg# 641753e90a53Smrg# This program is distributed in the hope that it will be useful, but 641853e90a53Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 641953e90a53Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 642053e90a53Smrg# General Public License for more details. 642153e90a53Smrg# 642253e90a53Smrg# You should have received a copy of the GNU General Public License 642353e90a53Smrg# along with this program; if not, write to the Free Software 642453e90a53Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 642553e90a53Smrg# 642653e90a53Smrg# As a special exception to the GNU General Public License, if you 642753e90a53Smrg# distribute this file as part of a program that contains a 642853e90a53Smrg# configuration script generated by Autoconf, you may include it under 642953e90a53Smrg# the same distribution terms that you use for the rest of that program. 643053e90a53Smrg 643153e90a53Smrg# PKG_PROG_PKG_CONFIG([MIN-VERSION]) 643253e90a53Smrg# ---------------------------------- 643353e90a53SmrgAC_DEFUN([PKG_PROG_PKG_CONFIG], 643453e90a53Smrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 643553e90a53Smrgm4_pattern_allow([^PKG_CONFIG(_PATH)?$]) 643653e90a53SmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl 643753e90a53Smrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 643853e90a53Smrg AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 643953e90a53Smrgfi 644053e90a53Smrgif test -n "$PKG_CONFIG"; then 644153e90a53Smrg _pkg_min_version=m4_default([$1], [0.9.0]) 644253e90a53Smrg AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 644353e90a53Smrg if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 644453e90a53Smrg AC_MSG_RESULT([yes]) 644553e90a53Smrg else 644653e90a53Smrg AC_MSG_RESULT([no]) 644753e90a53Smrg PKG_CONFIG="" 644853e90a53Smrg fi 644953e90a53Smrg 645053e90a53Smrgfi[]dnl 645153e90a53Smrg])# PKG_PROG_PKG_CONFIG 645253e90a53Smrg 645353e90a53Smrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 645453e90a53Smrg# 645553e90a53Smrg# Check to see whether a particular set of modules exists. Similar 645653e90a53Smrg# to PKG_CHECK_MODULES(), but does not set variables or print errors. 645753e90a53Smrg# 645853e90a53Smrg# 645953e90a53Smrg# Similar to PKG_CHECK_MODULES, make sure that the first instance of 646053e90a53Smrg# this or PKG_CHECK_MODULES is called, or make sure to call 646153e90a53Smrg# PKG_CHECK_EXISTS manually 646253e90a53Smrg# -------------------------------------------------------------- 646353e90a53SmrgAC_DEFUN([PKG_CHECK_EXISTS], 646453e90a53Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 646553e90a53Smrgif test -n "$PKG_CONFIG" && \ 646653e90a53Smrg AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 646753e90a53Smrg m4_ifval([$2], [$2], [:]) 646853e90a53Smrgm4_ifvaln([$3], [else 646953e90a53Smrg $3])dnl 647053e90a53Smrgfi]) 647153e90a53Smrg 647253e90a53Smrg 647353e90a53Smrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 647453e90a53Smrg# --------------------------------------------- 647553e90a53Smrgm4_define([_PKG_CONFIG], 647653e90a53Smrg[if test -n "$PKG_CONFIG"; then 647753e90a53Smrg if test -n "$$1"; then 647853e90a53Smrg pkg_cv_[]$1="$$1" 647953e90a53Smrg else 648053e90a53Smrg PKG_CHECK_EXISTS([$3], 648153e90a53Smrg [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], 648253e90a53Smrg [pkg_failed=yes]) 648353e90a53Smrg fi 648453e90a53Smrgelse 648553e90a53Smrg pkg_failed=untried 648653e90a53Smrgfi[]dnl 648753e90a53Smrg])# _PKG_CONFIG 648853e90a53Smrg 648953e90a53Smrg# _PKG_SHORT_ERRORS_SUPPORTED 649053e90a53Smrg# ----------------------------- 649153e90a53SmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 649253e90a53Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 649353e90a53Smrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 649453e90a53Smrg _pkg_short_errors_supported=yes 649553e90a53Smrgelse 649653e90a53Smrg _pkg_short_errors_supported=no 649753e90a53Smrgfi[]dnl 649853e90a53Smrg])# _PKG_SHORT_ERRORS_SUPPORTED 649953e90a53Smrg 650053e90a53Smrg 650153e90a53Smrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 650253e90a53Smrg# [ACTION-IF-NOT-FOUND]) 650353e90a53Smrg# 650453e90a53Smrg# 650553e90a53Smrg# Note that if there is a possibility the first call to 650653e90a53Smrg# PKG_CHECK_MODULES might not happen, you should be sure to include an 650753e90a53Smrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 650853e90a53Smrg# 650953e90a53Smrg# 651053e90a53Smrg# -------------------------------------------------------------- 651153e90a53SmrgAC_DEFUN([PKG_CHECK_MODULES], 651253e90a53Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 651353e90a53SmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 651453e90a53SmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 651553e90a53Smrg 651653e90a53Smrgpkg_failed=no 651753e90a53SmrgAC_MSG_CHECKING([for $1]) 651853e90a53Smrg 651953e90a53Smrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 652053e90a53Smrg_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 652153e90a53Smrg 652253e90a53Smrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 652353e90a53Smrgand $1[]_LIBS to avoid the need to call pkg-config. 652453e90a53SmrgSee the pkg-config man page for more details.]) 652553e90a53Smrg 652653e90a53Smrgif test $pkg_failed = yes; then 652753e90a53Smrg _PKG_SHORT_ERRORS_SUPPORTED 652853e90a53Smrg if test $_pkg_short_errors_supported = yes; then 652953e90a53Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"` 653053e90a53Smrg else 653153e90a53Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` 653253e90a53Smrg fi 653353e90a53Smrg # Put the nasty error message in config.log where it belongs 653453e90a53Smrg echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 653553e90a53Smrg 653653e90a53Smrg ifelse([$4], , [AC_MSG_ERROR(dnl 653753e90a53Smrg[Package requirements ($2) were not met: 653853e90a53Smrg 653953e90a53Smrg$$1_PKG_ERRORS 654053e90a53Smrg 654153e90a53SmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you 654253e90a53Smrginstalled software in a non-standard prefix. 654353e90a53Smrg 654453e90a53Smrg_PKG_TEXT 654553e90a53Smrg])], 654653e90a53Smrg [$4]) 654753e90a53Smrgelif test $pkg_failed = untried; then 654853e90a53Smrg ifelse([$4], , [AC_MSG_FAILURE(dnl 654953e90a53Smrg[The pkg-config script could not be found or is too old. Make sure it 655053e90a53Smrgis in your PATH or set the PKG_CONFIG environment variable to the full 655153e90a53Smrgpath to pkg-config. 655253e90a53Smrg 655353e90a53Smrg_PKG_TEXT 655453e90a53Smrg 655553e90a53SmrgTo get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.])], 655653e90a53Smrg [$4]) 655753e90a53Smrgelse 655853e90a53Smrg $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 655953e90a53Smrg $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 656053e90a53Smrg AC_MSG_RESULT([yes]) 656153e90a53Smrg ifelse([$3], , :, [$3]) 656253e90a53Smrgfi[]dnl 656353e90a53Smrg])# PKG_CHECK_MODULES 656453e90a53Smrg 656553e90a53Smrgdnl $Id: aclocal.m4,v 1.1.1.1 2008/08/02 05:12:22 mrg Exp $ 656653e90a53Smrgdnl 656753e90a53Smrgdnl Copyright 2005 Sun Microsystems, Inc. All rights reserved. 656853e90a53Smrgdnl 656953e90a53Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its 657053e90a53Smrgdnl documentation for any purpose is hereby granted without fee, provided that 657153e90a53Smrgdnl the above copyright notice appear in all copies and that both that 657253e90a53Smrgdnl copyright notice and this permission notice appear in supporting 657353e90a53Smrgdnl documentation. 657453e90a53Smrgdnl 657553e90a53Smrgdnl The above copyright notice and this permission notice shall be included 657653e90a53Smrgdnl in all copies or substantial portions of the Software. 657753e90a53Smrgdnl 657853e90a53Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 657953e90a53Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 658053e90a53Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 658153e90a53Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 658253e90a53Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 658353e90a53Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 658453e90a53Smrgdnl OTHER DEALINGS IN THE SOFTWARE. 658553e90a53Smrgdnl 658653e90a53Smrgdnl Except as contained in this notice, the name of the copyright holders shall 658753e90a53Smrgdnl not be used in advertising or otherwise to promote the sale, use or 658853e90a53Smrgdnl other dealings in this Software without prior written authorization 658953e90a53Smrgdnl from the copyright holders. 659053e90a53Smrgdnl 659153e90a53Smrg 659253e90a53Smrg# XORG_PROG_RAWCPP() 659353e90a53Smrg# ------------------ 659453e90a53Smrg# Find cpp program and necessary flags for use in pre-processing text files 659553e90a53Smrg# such as man pages and config files 659653e90a53SmrgAC_DEFUN([XORG_PROG_RAWCPP],[ 659753e90a53SmrgAC_REQUIRE([AC_PROG_CPP]) 659853e90a53SmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 659953e90a53Smrg [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 660053e90a53Smrg 660153e90a53Smrg# Check for flag to avoid builtin definitions - assumes unix is predefined, 660253e90a53Smrg# which is not the best choice for supporting other OS'es, but covers most 660353e90a53Smrg# of the ones we need for now. 660453e90a53SmrgAC_MSG_CHECKING([if $RAWCPP requires -undef]) 660553e90a53SmrgAC_LANG_CONFTEST([Does cpp redefine unix ?]) 660653e90a53Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 660753e90a53Smrg AC_MSG_RESULT([no]) 660853e90a53Smrgelse 660953e90a53Smrg if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 661053e90a53Smrg RAWCPPFLAGS=-undef 661153e90a53Smrg AC_MSG_RESULT([yes]) 661253e90a53Smrg else 661353e90a53Smrg AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 661453e90a53Smrg fi 661553e90a53Smrgfi 661653e90a53Smrgrm -f conftest.$ac_ext 661753e90a53Smrg 661853e90a53SmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional]) 661953e90a53SmrgAC_LANG_CONFTEST([Does cpp preserve "whitespace"?]) 662053e90a53Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 662153e90a53Smrg AC_MSG_RESULT([no]) 662253e90a53Smrgelse 662353e90a53Smrg if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 662453e90a53Smrg RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 662553e90a53Smrg AC_MSG_RESULT([yes]) 662653e90a53Smrg else 662753e90a53Smrg AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 662853e90a53Smrg fi 662953e90a53Smrgfi 663053e90a53Smrgrm -f conftest.$ac_ext 663153e90a53SmrgAC_SUBST(RAWCPPFLAGS) 663253e90a53Smrg]) # XORG_PROG_RAWCPP 663353e90a53Smrg 663453e90a53Smrg# XORG_MANPAGE_SECTIONS() 663553e90a53Smrg# ----------------------- 663653e90a53Smrg# Determine which sections man pages go in for the different man page types 663753e90a53Smrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 663853e90a53Smrg# Not sure if there's any better way than just hardcoding by OS name. 663953e90a53Smrg# Override default settings by setting environment variables 664053e90a53Smrg 664153e90a53SmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[ 664253e90a53SmrgAC_REQUIRE([AC_CANONICAL_HOST]) 664353e90a53Smrg 664453e90a53Smrgif test x$APP_MAN_SUFFIX = x ; then 664553e90a53Smrg case $host_os in 664653e90a53Smrg linux*) APP_MAN_SUFFIX=1x ;; 664753e90a53Smrg *) APP_MAN_SUFFIX=1 ;; 664853e90a53Smrg esac 664953e90a53Smrgfi 665053e90a53Smrgif test x$APP_MAN_DIR = x ; then 665153e90a53Smrg case $host_os in 665253e90a53Smrg linux*) APP_MAN_DIR='$(mandir)/man1' ;; 665353e90a53Smrg *) APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' ;; 665453e90a53Smrg esac 665553e90a53Smrgfi 665653e90a53Smrg 665753e90a53Smrgif test x$LIB_MAN_SUFFIX = x ; then 665853e90a53Smrg case $host_os in 665953e90a53Smrg linux*) LIB_MAN_SUFFIX=3x ;; 666053e90a53Smrg *) LIB_MAN_SUFFIX=3 ;; 666153e90a53Smrg esac 666253e90a53Smrgfi 666353e90a53Smrgif test x$LIB_MAN_DIR = x ; then 666453e90a53Smrg case $host_os in 666553e90a53Smrg linux*) LIB_MAN_DIR='$(mandir)/man3' ;; 666653e90a53Smrg *) LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' ;; 666753e90a53Smrg esac 666853e90a53Smrgfi 666953e90a53Smrg 667053e90a53Smrgif test x$FILE_MAN_SUFFIX = x ; then 667153e90a53Smrg case $host_os in 667253e90a53Smrg linux*) FILE_MAN_SUFFIX=5x ;; 667353e90a53Smrg solaris*) FILE_MAN_SUFFIX=4 ;; 667453e90a53Smrg *) FILE_MAN_SUFFIX=5 ;; 667553e90a53Smrg esac 667653e90a53Smrgfi 667753e90a53Smrgif test x$FILE_MAN_DIR = x ; then 667853e90a53Smrg case $host_os in 667953e90a53Smrg linux*) FILE_MAN_DIR='$(mandir)/man5' ;; 668053e90a53Smrg *) FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' ;; 668153e90a53Smrg esac 668253e90a53Smrgfi 668353e90a53Smrg 668453e90a53Smrg# In Imake's linux.cf, the misc man suffix & dir was only changed for 668553e90a53Smrg# LinuxDebian, not other Linuxes, so we leave it unchanged here 668653e90a53Smrgif test x$MISC_MAN_SUFFIX = x ; then 668753e90a53Smrg case $host_os in 668853e90a53Smrg# linux*) MISC_MAN_SUFFIX=7x ;; 668953e90a53Smrg solaris*) MISC_MAN_SUFFIX=5 ;; 669053e90a53Smrg *) MISC_MAN_SUFFIX=7 ;; 669153e90a53Smrg esac 669253e90a53Smrgfi 669353e90a53Smrgif test x$MISC_MAN_DIR = x ; then 669453e90a53Smrg case $host_os in 669553e90a53Smrg# linux*) MISC_MAN_DIR='$(mandir)/man7' ;; 669653e90a53Smrg *) MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' ;; 669753e90a53Smrg esac 669853e90a53Smrgfi 669953e90a53Smrg 670053e90a53Smrg# In Imake's linux.cf, the driver man suffix & dir was only changed for 670153e90a53Smrg# LinuxDebian, not other Linuxes, so we leave it unchanged here 670253e90a53Smrgif test x$DRIVER_MAN_SUFFIX = x ; then 670353e90a53Smrg case $host_os in 670453e90a53Smrg# linux*) DRIVER_MAN_SUFFIX=4x ;; 670553e90a53Smrg solaris*) DRIVER_MAN_SUFFIX=7 ;; 670653e90a53Smrg *) DRIVER_MAN_SUFFIX=4 ;; 670753e90a53Smrg esac 670853e90a53Smrgfi 670953e90a53Smrgif test x$DRIVER_MAN_DIR = x ; then 671053e90a53Smrg case $host_os in 671153e90a53Smrg# linux*) DRIVER_MAN_DIR='$(mandir)/man4' ;; 671253e90a53Smrg *) DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' ;; 671353e90a53Smrg esac 671453e90a53Smrgfi 671553e90a53Smrg 671653e90a53Smrgif test x$ADMIN_MAN_SUFFIX = x ; then 671753e90a53Smrg case $host_os in 671853e90a53Smrg solaris*) ADMIN_MAN_SUFFIX=1m ;; 671953e90a53Smrg *) ADMIN_MAN_SUFFIX=8 ;; 672053e90a53Smrg esac 672153e90a53Smrgfi 672253e90a53Smrgif test x$ADMIN_MAN_DIR = x ; then 672353e90a53Smrg ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 672453e90a53Smrgfi 672553e90a53Smrg 672653e90a53Smrg 672753e90a53SmrgAC_SUBST([APP_MAN_SUFFIX]) 672853e90a53SmrgAC_SUBST([LIB_MAN_SUFFIX]) 672953e90a53SmrgAC_SUBST([FILE_MAN_SUFFIX]) 673053e90a53SmrgAC_SUBST([MISC_MAN_SUFFIX]) 673153e90a53SmrgAC_SUBST([DRIVER_MAN_SUFFIX]) 673253e90a53SmrgAC_SUBST([ADMIN_MAN_SUFFIX]) 673353e90a53SmrgAC_SUBST([APP_MAN_DIR]) 673453e90a53SmrgAC_SUBST([LIB_MAN_DIR]) 673553e90a53SmrgAC_SUBST([FILE_MAN_DIR]) 673653e90a53SmrgAC_SUBST([MISC_MAN_DIR]) 673753e90a53SmrgAC_SUBST([DRIVER_MAN_DIR]) 673853e90a53SmrgAC_SUBST([ADMIN_MAN_DIR]) 673953e90a53Smrg]) # XORG_MANPAGE_SECTIONS 674053e90a53Smrg 674153e90a53Smrg# XORG_CHECK_LINUXDOC 674253e90a53Smrg# ------------------- 674353e90a53Smrg# Defines the variable MAKE_TEXT if the necessary tools and 674453e90a53Smrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 674553e90a53Smrg# Whether or not the necessary tools and files are found can be checked 674653e90a53Smrg# with the AM_CONDITIONAL "BUILD_LINUXDOC" 674753e90a53SmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[ 674853e90a53SmrgAC_CHECK_FILE( 674953e90a53Smrg [$prefix/share/X11/sgml/defs.ent], 675053e90a53Smrg [DEFS_ENT_PATH=$prefix/share/X11/sgml], 675153e90a53Smrg [DEFS_ENT_PATH=] 675253e90a53Smrg) 675353e90a53Smrg 675453e90a53SmrgAC_PATH_PROG(LINUXDOC, linuxdoc) 675553e90a53SmrgAC_PATH_PROG(PS2PDF, ps2pdf) 675653e90a53Smrg 675753e90a53SmrgAC_MSG_CHECKING([Whether to build documentation]) 675853e90a53Smrg 675953e90a53Smrgif test x$DEFS_ENT_PATH != x && test x$LINUXDOC != x ; then 676053e90a53Smrg BUILDDOC=yes 676153e90a53Smrgelse 676253e90a53Smrg BUILDDOC=no 676353e90a53Smrgfi 676453e90a53Smrg 676553e90a53SmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 676653e90a53Smrg 676753e90a53SmrgAC_MSG_RESULT([$BUILDDOC]) 676853e90a53Smrg 676953e90a53SmrgAC_MSG_CHECKING([Whether to build pdf documentation]) 677053e90a53Smrg 677153e90a53Smrgif test x$PS2PDF != x ; then 677253e90a53Smrg BUILDPDFDOC=yes 677353e90a53Smrgelse 677453e90a53Smrg BUILDPDFDOC=no 677553e90a53Smrgfi 677653e90a53Smrg 677753e90a53SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 677853e90a53Smrg 677953e90a53SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 678053e90a53Smrg 678153e90a53SmrgMAKE_TEXT="SGML_SEARCH_PATH=$DEFS_ENT_PATH GROFF_NO_SGR=y $LINUXDOC -B txt" 678253e90a53SmrgMAKE_PS="SGML_SEARCH_PATH=$DEFS_ENT_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 678353e90a53SmrgMAKE_PDF="$PS2PDF" 678453e90a53SmrgMAKE_HTML="SGML_SEARCH_PATH=$DEFS_ENT_PATH $LINUXDOC -B html --split=0" 678553e90a53Smrg 678653e90a53SmrgAC_SUBST(MAKE_TEXT) 678753e90a53SmrgAC_SUBST(MAKE_PS) 678853e90a53SmrgAC_SUBST(MAKE_PDF) 678953e90a53SmrgAC_SUBST(MAKE_HTML) 679053e90a53Smrg]) # XORG_CHECK_LINUXDOC 679153e90a53Smrg 679253e90a53Smrg# XORG_CHECK_MALLOC_ZERO 679353e90a53Smrg# ---------------------- 679453e90a53Smrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 679553e90a53Smrg# malloc(0) returns NULL. Packages should add one of these cflags to 679653e90a53Smrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 679753e90a53SmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 679853e90a53SmrgAC_ARG_ENABLE(malloc0returnsnull, 679953e90a53Smrg AC_HELP_STRING([--enable-malloc0returnsnull], 680053e90a53Smrg [malloc(0) returns NULL (default: auto)]), 680153e90a53Smrg [MALLOC_ZERO_RETURNS_NULL=$enableval], 680253e90a53Smrg [MALLOC_ZERO_RETURNS_NULL=auto]) 680353e90a53Smrg 680453e90a53SmrgAC_MSG_CHECKING([whether malloc(0) returns NULL]) 680553e90a53Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 680653e90a53Smrg AC_RUN_IFELSE([ 680753e90a53Smrgchar *malloc(); 680853e90a53Smrgchar *realloc(); 680953e90a53Smrgchar *calloc(); 681053e90a53Smrgmain() { 681153e90a53Smrg char *m0, *r0, *c0, *p; 681253e90a53Smrg m0 = malloc(0); 681353e90a53Smrg p = malloc(10); 681453e90a53Smrg r0 = realloc(p,0); 681553e90a53Smrg c0 = calloc(0); 681653e90a53Smrg exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1); 681753e90a53Smrg}], 681853e90a53Smrg [MALLOC_ZERO_RETURNS_NULL=yes], 681953e90a53Smrg [MALLOC_ZERO_RETURNS_NULL=no]) 682053e90a53Smrgfi 682153e90a53SmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 682253e90a53Smrg 682353e90a53Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 682453e90a53Smrg MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 682553e90a53Smrg XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 682653e90a53Smrg XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 682753e90a53Smrgelse 682853e90a53Smrg MALLOC_ZERO_CFLAGS="" 682953e90a53Smrg XMALLOC_ZERO_CFLAGS="" 683053e90a53Smrg XTMALLOC_ZERO_CFLAGS="" 683153e90a53Smrgfi 683253e90a53Smrg 683353e90a53SmrgAC_SUBST([MALLOC_ZERO_CFLAGS]) 683453e90a53SmrgAC_SUBST([XMALLOC_ZERO_CFLAGS]) 683553e90a53SmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS]) 683653e90a53Smrg]) # XORG_CHECK_MALLOC_ZERO 683753e90a53Smrg 683853e90a53Smrgdnl Copyright 2005 Red Hat, Inc 683953e90a53Smrgdnl 684053e90a53Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its 684153e90a53Smrgdnl documentation for any purpose is hereby granted without fee, provided that 684253e90a53Smrgdnl the above copyright notice appear in all copies and that both that 684353e90a53Smrgdnl copyright notice and this permission notice appear in supporting 684453e90a53Smrgdnl documentation. 684553e90a53Smrgdnl 684653e90a53Smrgdnl The above copyright notice and this permission notice shall be included 684753e90a53Smrgdnl in all copies or substantial portions of the Software. 684853e90a53Smrgdnl 684953e90a53Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 685053e90a53Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 685153e90a53Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 685253e90a53Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 685353e90a53Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 685453e90a53Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 685553e90a53Smrgdnl OTHER DEALINGS IN THE SOFTWARE. 685653e90a53Smrgdnl 685753e90a53Smrgdnl Except as contained in this notice, the name of the copyright holders shall 685853e90a53Smrgdnl not be used in advertising or otherwise to promote the sale, use or 685953e90a53Smrgdnl other dealings in this Software without prior written authorization 686053e90a53Smrgdnl from the copyright holders. 686153e90a53Smrgdnl 686253e90a53Smrg 686353e90a53Smrg# XORG_DRIVER_CHECK_EXT() 686453e90a53Smrg# -------------------------- 686553e90a53Smrg# Checks for the $1 define in xorg-server.h (from the sdk). If it 686653e90a53Smrg# is defined, then add $1 to $REQUIRED_MODULES. 686753e90a53Smrg 686853e90a53SmrgAC_DEFUN([XORG_DRIVER_CHECK_EXT],[ 686953e90a53Smrg SAVE_CFLAGS="$CFLAGS" 687053e90a53Smrg CFLAGS="$CFLAGS -I`pkg-config --variable=sdkdir xorg-server`" 687153e90a53Smrg AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ 687253e90a53Smrg#include "xorg-server.h" 687353e90a53Smrg#if !defined $1 687453e90a53Smrg#error $1 not defined 687553e90a53Smrg#endif 687653e90a53Smrg ]])], 687753e90a53Smrg [_EXT_CHECK=yes], 687853e90a53Smrg [_EXT_CHECK=no]) 687953e90a53Smrg CFLAGS="$SAVE_CFLAGS" 688053e90a53Smrg AC_MSG_CHECKING([if $1 is defined]) 688153e90a53Smrg AC_MSG_RESULT([$_EXT_CHECK]) 688253e90a53Smrg if test "$_EXT_CHECK" != no; then 688353e90a53Smrg REQUIRED_MODULES="$REQUIRED_MODULES $2" 688453e90a53Smrg fi 688553e90a53Smrg]) 688653e90a53Smrg 688753e90a53Smrgdnl Copyright 2005 Red Hat, Inc 688853e90a53Smrgdnl 688953e90a53Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its 689053e90a53Smrgdnl documentation for any purpose is hereby granted without fee, provided that 689153e90a53Smrgdnl the above copyright notice appear in all copies and that both that 689253e90a53Smrgdnl copyright notice and this permission notice appear in supporting 689353e90a53Smrgdnl documentation. 689453e90a53Smrgdnl 689553e90a53Smrgdnl The above copyright notice and this permission notice shall be included 689653e90a53Smrgdnl in all copies or substantial portions of the Software. 689753e90a53Smrgdnl 689853e90a53Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 689953e90a53Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 690053e90a53Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 690153e90a53Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 690253e90a53Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 690353e90a53Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 690453e90a53Smrgdnl OTHER DEALINGS IN THE SOFTWARE. 690553e90a53Smrgdnl 690653e90a53Smrgdnl Except as contained in this notice, the name of the copyright holders shall 690753e90a53Smrgdnl not be used in advertising or otherwise to promote the sale, use or 690853e90a53Smrgdnl other dealings in this Software without prior written authorization 690953e90a53Smrgdnl from the copyright holders. 691053e90a53Smrgdnl 691153e90a53Smrg 691253e90a53Smrg# XORG_RELEASE_VERSION 691353e90a53Smrg# -------------------- 691453e90a53Smrg# Adds --with/without-release-string and changes the PACKAGE and 691553e90a53Smrg# PACKAGE_TARNAME to use "$PACKAGE{_TARNAME}-$RELEASE_VERSION". If 691653e90a53Smrg# no option is given, PACKAGE and PACKAGE_TARNAME are unchanged. 691753e90a53Smrg 691853e90a53SmrgAC_DEFUN([XORG_RELEASE_VERSION],[ 691953e90a53Smrg AC_ARG_WITH(release-version, 692053e90a53Smrg AC_HELP_STRING([--with-release-version=STRING], 692153e90a53Smrg [Use release version string in package name]), 692253e90a53Smrg [RELEASE_VERSION="$withval"], 692353e90a53Smrg [RELEASE_VERSION=""]) 692453e90a53Smrg if test "x$RELEASE_VERSION" != "x"; then 692553e90a53Smrg PACKAGE="$PACKAGE-$RELEASE_VERSION" 692653e90a53Smrg PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION" 692753e90a53Smrg AC_MSG_NOTICE([Building with package name set to $PACKAGE]) 692853e90a53Smrg fi 692953e90a53Smrg]) 693053e90a53Smrg 693153e90a53Smrg# Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc. 693253e90a53Smrg# 693353e90a53Smrg# This file is free software; the Free Software Foundation 693453e90a53Smrg# gives unlimited permission to copy and/or distribute it, 693553e90a53Smrg# with or without modifications, as long as this notice is preserved. 693653e90a53Smrg 693753e90a53Smrg# AM_AUTOMAKE_VERSION(VERSION) 693853e90a53Smrg# ---------------------------- 693953e90a53Smrg# Automake X.Y traces this macro to ensure aclocal.m4 has been 694053e90a53Smrg# generated from the m4 files accompanying Automake X.Y. 694153e90a53SmrgAC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"]) 694253e90a53Smrg 694353e90a53Smrg# AM_SET_CURRENT_AUTOMAKE_VERSION 694453e90a53Smrg# ------------------------------- 694553e90a53Smrg# Call AM_AUTOMAKE_VERSION so it can be traced. 694653e90a53Smrg# This function is AC_REQUIREd by AC_INIT_AUTOMAKE. 694753e90a53SmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 694853e90a53Smrg [AM_AUTOMAKE_VERSION([1.9.6])]) 694953e90a53Smrg 695053e90a53Smrg# AM_AUX_DIR_EXPAND -*- Autoconf -*- 695153e90a53Smrg 695253e90a53Smrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 695353e90a53Smrg# 695453e90a53Smrg# This file is free software; the Free Software Foundation 695553e90a53Smrg# gives unlimited permission to copy and/or distribute it, 695653e90a53Smrg# with or without modifications, as long as this notice is preserved. 695753e90a53Smrg 695853e90a53Smrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 695953e90a53Smrg# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to 696053e90a53Smrg# `$srcdir', `$srcdir/..', or `$srcdir/../..'. 696153e90a53Smrg# 696253e90a53Smrg# Of course, Automake must honor this variable whenever it calls a 696353e90a53Smrg# tool from the auxiliary directory. The problem is that $srcdir (and 696453e90a53Smrg# therefore $ac_aux_dir as well) can be either absolute or relative, 696553e90a53Smrg# depending on how configure is run. This is pretty annoying, since 696653e90a53Smrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top 696753e90a53Smrg# source directory, any form will work fine, but in subdirectories a 696853e90a53Smrg# relative path needs to be adjusted first. 696953e90a53Smrg# 697053e90a53Smrg# $ac_aux_dir/missing 697153e90a53Smrg# fails when called from a subdirectory if $ac_aux_dir is relative 697253e90a53Smrg# $top_srcdir/$ac_aux_dir/missing 697353e90a53Smrg# fails if $ac_aux_dir is absolute, 697453e90a53Smrg# fails when called from a subdirectory in a VPATH build with 697553e90a53Smrg# a relative $ac_aux_dir 697653e90a53Smrg# 697753e90a53Smrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 697853e90a53Smrg# are both prefixed by $srcdir. In an in-source build this is usually 697953e90a53Smrg# harmless because $srcdir is `.', but things will broke when you 698053e90a53Smrg# start a VPATH build or use an absolute $srcdir. 698153e90a53Smrg# 698253e90a53Smrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 698353e90a53Smrg# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 698453e90a53Smrg# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 698553e90a53Smrg# and then we would define $MISSING as 698653e90a53Smrg# MISSING="\${SHELL} $am_aux_dir/missing" 698753e90a53Smrg# This will work as long as MISSING is not called from configure, because 698853e90a53Smrg# unfortunately $(top_srcdir) has no meaning in configure. 698953e90a53Smrg# However there are other variables, like CC, which are often used in 699053e90a53Smrg# configure, and could therefore not use this "fixed" $ac_aux_dir. 699153e90a53Smrg# 699253e90a53Smrg# Another solution, used here, is to always expand $ac_aux_dir to an 699353e90a53Smrg# absolute PATH. The drawback is that using absolute paths prevent a 699453e90a53Smrg# configured tree to be moved without reconfiguration. 699553e90a53Smrg 699653e90a53SmrgAC_DEFUN([AM_AUX_DIR_EXPAND], 699753e90a53Smrg[dnl Rely on autoconf to set up CDPATH properly. 699853e90a53SmrgAC_PREREQ([2.50])dnl 699953e90a53Smrg# expand $ac_aux_dir to an absolute path 700053e90a53Smrgam_aux_dir=`cd $ac_aux_dir && pwd` 700153e90a53Smrg]) 700253e90a53Smrg 700353e90a53Smrg# AM_CONDITIONAL -*- Autoconf -*- 700453e90a53Smrg 700553e90a53Smrg# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005 700653e90a53Smrg# Free Software Foundation, Inc. 700753e90a53Smrg# 700853e90a53Smrg# This file is free software; the Free Software Foundation 700953e90a53Smrg# gives unlimited permission to copy and/or distribute it, 701053e90a53Smrg# with or without modifications, as long as this notice is preserved. 701153e90a53Smrg 701253e90a53Smrg# serial 7 701353e90a53Smrg 701453e90a53Smrg# AM_CONDITIONAL(NAME, SHELL-CONDITION) 701553e90a53Smrg# ------------------------------------- 701653e90a53Smrg# Define a conditional. 701753e90a53SmrgAC_DEFUN([AM_CONDITIONAL], 701853e90a53Smrg[AC_PREREQ(2.52)dnl 701953e90a53Smrg ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 702053e90a53Smrg [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 702153e90a53SmrgAC_SUBST([$1_TRUE]) 702253e90a53SmrgAC_SUBST([$1_FALSE]) 702353e90a53Smrgif $2; then 702453e90a53Smrg $1_TRUE= 702553e90a53Smrg $1_FALSE='#' 702653e90a53Smrgelse 702753e90a53Smrg $1_TRUE='#' 702853e90a53Smrg $1_FALSE= 702953e90a53Smrgfi 703053e90a53SmrgAC_CONFIG_COMMANDS_PRE( 703153e90a53Smrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 703253e90a53Smrg AC_MSG_ERROR([[conditional "$1" was never defined. 703353e90a53SmrgUsually this means the macro was only invoked conditionally.]]) 703453e90a53Smrgfi])]) 703553e90a53Smrg 703653e90a53Smrg 703753e90a53Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 703853e90a53Smrg# Free Software Foundation, Inc. 703953e90a53Smrg# 704053e90a53Smrg# This file is free software; the Free Software Foundation 704153e90a53Smrg# gives unlimited permission to copy and/or distribute it, 704253e90a53Smrg# with or without modifications, as long as this notice is preserved. 704353e90a53Smrg 704453e90a53Smrg# serial 8 704553e90a53Smrg 704653e90a53Smrg# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be 704753e90a53Smrg# written in clear, in which case automake, when reading aclocal.m4, 704853e90a53Smrg# will think it sees a *use*, and therefore will trigger all it's 704953e90a53Smrg# C support machinery. Also note that it means that autoscan, seeing 705053e90a53Smrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 705153e90a53Smrg 705253e90a53Smrg 705353e90a53Smrg# _AM_DEPENDENCIES(NAME) 705453e90a53Smrg# ---------------------- 705553e90a53Smrg# See how the compiler implements dependency checking. 705653e90a53Smrg# NAME is "CC", "CXX", "GCJ", or "OBJC". 705753e90a53Smrg# We try a few techniques and use that to set a single cache variable. 705853e90a53Smrg# 705953e90a53Smrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 706053e90a53Smrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 706153e90a53Smrg# dependency, and given that the user is not expected to run this macro, 706253e90a53Smrg# just rely on AC_PROG_CC. 706353e90a53SmrgAC_DEFUN([_AM_DEPENDENCIES], 706453e90a53Smrg[AC_REQUIRE([AM_SET_DEPDIR])dnl 706553e90a53SmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 706653e90a53SmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl 706753e90a53SmrgAC_REQUIRE([AM_DEP_TRACK])dnl 706853e90a53Smrg 706953e90a53Smrgifelse([$1], CC, [depcc="$CC" am_compiler_list=], 707053e90a53Smrg [$1], CXX, [depcc="$CXX" am_compiler_list=], 707153e90a53Smrg [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 707253e90a53Smrg [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 707353e90a53Smrg [depcc="$$1" am_compiler_list=]) 707453e90a53Smrg 707553e90a53SmrgAC_CACHE_CHECK([dependency style of $depcc], 707653e90a53Smrg [am_cv_$1_dependencies_compiler_type], 707753e90a53Smrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 707853e90a53Smrg # We make a subdir and do the tests there. Otherwise we can end up 707953e90a53Smrg # making bogus files that we don't know about and never remove. For 708053e90a53Smrg # instance it was reported that on HP-UX the gcc test will end up 708153e90a53Smrg # making a dummy file named `D' -- because `-MD' means `put the output 708253e90a53Smrg # in D'. 708353e90a53Smrg mkdir conftest.dir 708453e90a53Smrg # Copy depcomp to subdir because otherwise we won't find it if we're 708553e90a53Smrg # using a relative directory. 708653e90a53Smrg cp "$am_depcomp" conftest.dir 708753e90a53Smrg cd conftest.dir 708853e90a53Smrg # We will build objects and dependencies in a subdirectory because 708953e90a53Smrg # it helps to detect inapplicable dependency modes. For instance 709053e90a53Smrg # both Tru64's cc and ICC support -MD to output dependencies as a 709153e90a53Smrg # side effect of compilation, but ICC will put the dependencies in 709253e90a53Smrg # the current directory while Tru64 will put them in the object 709353e90a53Smrg # directory. 709453e90a53Smrg mkdir sub 709553e90a53Smrg 709653e90a53Smrg am_cv_$1_dependencies_compiler_type=none 709753e90a53Smrg if test "$am_compiler_list" = ""; then 709853e90a53Smrg am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 709953e90a53Smrg fi 710053e90a53Smrg for depmode in $am_compiler_list; do 710153e90a53Smrg # Setup a source with many dependencies, because some compilers 710253e90a53Smrg # like to wrap large dependency lists on column 80 (with \), and 710353e90a53Smrg # we should not choose a depcomp mode which is confused by this. 710453e90a53Smrg # 710553e90a53Smrg # We need to recreate these files for each test, as the compiler may 710653e90a53Smrg # overwrite some of them when testing with obscure command lines. 710753e90a53Smrg # This happens at least with the AIX C compiler. 710853e90a53Smrg : > sub/conftest.c 710953e90a53Smrg for i in 1 2 3 4 5 6; do 711053e90a53Smrg echo '#include "conftst'$i'.h"' >> sub/conftest.c 711153e90a53Smrg # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with 711253e90a53Smrg # Solaris 8's {/usr,}/bin/sh. 711353e90a53Smrg touch sub/conftst$i.h 711453e90a53Smrg done 711553e90a53Smrg echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 711653e90a53Smrg 711753e90a53Smrg case $depmode in 711853e90a53Smrg nosideeffect) 711953e90a53Smrg # after this tag, mechanisms are not by side-effect, so they'll 712053e90a53Smrg # only be used when explicitly requested 712153e90a53Smrg if test "x$enable_dependency_tracking" = xyes; then 712253e90a53Smrg continue 712353e90a53Smrg else 712453e90a53Smrg break 712553e90a53Smrg fi 712653e90a53Smrg ;; 712753e90a53Smrg none) break ;; 712853e90a53Smrg esac 712953e90a53Smrg # We check with `-c' and `-o' for the sake of the "dashmstdout" 713053e90a53Smrg # mode. It turns out that the SunPro C++ compiler does not properly 713153e90a53Smrg # handle `-M -o', and we need to detect this. 713253e90a53Smrg if depmode=$depmode \ 713353e90a53Smrg source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ 713453e90a53Smrg depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 713553e90a53Smrg $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ 713653e90a53Smrg >/dev/null 2>conftest.err && 713753e90a53Smrg grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 713853e90a53Smrg grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && 713953e90a53Smrg ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 714053e90a53Smrg # icc doesn't choke on unknown options, it will just issue warnings 714153e90a53Smrg # or remarks (even with -Werror). So we grep stderr for any message 714253e90a53Smrg # that says an option was ignored or not supported. 714353e90a53Smrg # When given -MP, icc 7.0 and 7.1 complain thusly: 714453e90a53Smrg # icc: Command line warning: ignoring option '-M'; no argument required 714553e90a53Smrg # The diagnosis changed in icc 8.0: 714653e90a53Smrg # icc: Command line remark: option '-MP' not supported 714753e90a53Smrg if (grep 'ignoring option' conftest.err || 714853e90a53Smrg grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 714953e90a53Smrg am_cv_$1_dependencies_compiler_type=$depmode 715053e90a53Smrg break 715153e90a53Smrg fi 715253e90a53Smrg fi 715353e90a53Smrg done 715453e90a53Smrg 715553e90a53Smrg cd .. 715653e90a53Smrg rm -rf conftest.dir 715753e90a53Smrgelse 715853e90a53Smrg am_cv_$1_dependencies_compiler_type=none 715953e90a53Smrgfi 716053e90a53Smrg]) 716153e90a53SmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 716253e90a53SmrgAM_CONDITIONAL([am__fastdep$1], [ 716353e90a53Smrg test "x$enable_dependency_tracking" != xno \ 716453e90a53Smrg && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 716553e90a53Smrg]) 716653e90a53Smrg 716753e90a53Smrg 716853e90a53Smrg# AM_SET_DEPDIR 716953e90a53Smrg# ------------- 717053e90a53Smrg# Choose a directory name for dependency files. 717153e90a53Smrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES 717253e90a53SmrgAC_DEFUN([AM_SET_DEPDIR], 717353e90a53Smrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 717453e90a53SmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 717553e90a53Smrg]) 717653e90a53Smrg 717753e90a53Smrg 717853e90a53Smrg# AM_DEP_TRACK 717953e90a53Smrg# ------------ 718053e90a53SmrgAC_DEFUN([AM_DEP_TRACK], 718153e90a53Smrg[AC_ARG_ENABLE(dependency-tracking, 718253e90a53Smrg[ --disable-dependency-tracking speeds up one-time build 718353e90a53Smrg --enable-dependency-tracking do not reject slow dependency extractors]) 718453e90a53Smrgif test "x$enable_dependency_tracking" != xno; then 718553e90a53Smrg am_depcomp="$ac_aux_dir/depcomp" 718653e90a53Smrg AMDEPBACKSLASH='\' 718753e90a53Smrgfi 718853e90a53SmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 718953e90a53SmrgAC_SUBST([AMDEPBACKSLASH]) 719053e90a53Smrg]) 719153e90a53Smrg 719253e90a53Smrg# Generate code to set up dependency tracking. -*- Autoconf -*- 719353e90a53Smrg 719453e90a53Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 719553e90a53Smrg# Free Software Foundation, Inc. 719653e90a53Smrg# 719753e90a53Smrg# This file is free software; the Free Software Foundation 719853e90a53Smrg# gives unlimited permission to copy and/or distribute it, 719953e90a53Smrg# with or without modifications, as long as this notice is preserved. 720053e90a53Smrg 720153e90a53Smrg#serial 3 720253e90a53Smrg 720353e90a53Smrg# _AM_OUTPUT_DEPENDENCY_COMMANDS 720453e90a53Smrg# ------------------------------ 720553e90a53SmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 720653e90a53Smrg[for mf in $CONFIG_FILES; do 720753e90a53Smrg # Strip MF so we end up with the name of the file. 720853e90a53Smrg mf=`echo "$mf" | sed -e 's/:.*$//'` 720953e90a53Smrg # Check whether this is an Automake generated Makefile or not. 721053e90a53Smrg # We used to match only the files named `Makefile.in', but 721153e90a53Smrg # some people rename them; so instead we look at the file content. 721253e90a53Smrg # Grep'ing the first line is not enough: some people post-process 721353e90a53Smrg # each Makefile.in and add a new line on top of each file to say so. 721453e90a53Smrg # So let's grep whole file. 721553e90a53Smrg if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then 721653e90a53Smrg dirpart=`AS_DIRNAME("$mf")` 721753e90a53Smrg else 721853e90a53Smrg continue 721953e90a53Smrg fi 722053e90a53Smrg # Extract the definition of DEPDIR, am__include, and am__quote 722153e90a53Smrg # from the Makefile without running `make'. 722253e90a53Smrg DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` 722353e90a53Smrg test -z "$DEPDIR" && continue 722453e90a53Smrg am__include=`sed -n 's/^am__include = //p' < "$mf"` 722553e90a53Smrg test -z "am__include" && continue 722653e90a53Smrg am__quote=`sed -n 's/^am__quote = //p' < "$mf"` 722753e90a53Smrg # When using ansi2knr, U may be empty or an underscore; expand it 722853e90a53Smrg U=`sed -n 's/^U = //p' < "$mf"` 722953e90a53Smrg # Find all dependency output files, they are included files with 723053e90a53Smrg # $(DEPDIR) in their names. We invoke sed twice because it is the 723153e90a53Smrg # simplest approach to changing $(DEPDIR) to its actual value in the 723253e90a53Smrg # expansion. 723353e90a53Smrg for file in `sed -n " 723453e90a53Smrg s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ 723553e90a53Smrg sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do 723653e90a53Smrg # Make sure the directory exists. 723753e90a53Smrg test -f "$dirpart/$file" && continue 723853e90a53Smrg fdir=`AS_DIRNAME(["$file"])` 723953e90a53Smrg AS_MKDIR_P([$dirpart/$fdir]) 724053e90a53Smrg # echo "creating $dirpart/$file" 724153e90a53Smrg echo '# dummy' > "$dirpart/$file" 724253e90a53Smrg done 724353e90a53Smrgdone 724453e90a53Smrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS 724553e90a53Smrg 724653e90a53Smrg 724753e90a53Smrg# AM_OUTPUT_DEPENDENCY_COMMANDS 724853e90a53Smrg# ----------------------------- 724953e90a53Smrg# This macro should only be invoked once -- use via AC_REQUIRE. 725053e90a53Smrg# 725153e90a53Smrg# This code is only required when automatic dependency tracking 725253e90a53Smrg# is enabled. FIXME. This creates each `.P' file that we will 725353e90a53Smrg# need in order to bootstrap the dependency handling code. 725453e90a53SmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 725553e90a53Smrg[AC_CONFIG_COMMANDS([depfiles], 725653e90a53Smrg [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 725753e90a53Smrg [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 725853e90a53Smrg]) 725953e90a53Smrg 726053e90a53Smrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 726153e90a53Smrg# Free Software Foundation, Inc. 726253e90a53Smrg# 726353e90a53Smrg# This file is free software; the Free Software Foundation 726453e90a53Smrg# gives unlimited permission to copy and/or distribute it, 726553e90a53Smrg# with or without modifications, as long as this notice is preserved. 726653e90a53Smrg 726753e90a53Smrg# serial 8 726853e90a53Smrg 726953e90a53Smrg# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. 727053e90a53SmrgAU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) 727153e90a53Smrg 727253e90a53Smrg# Do all the work for Automake. -*- Autoconf -*- 727353e90a53Smrg 727453e90a53Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 727553e90a53Smrg# Free Software Foundation, Inc. 727653e90a53Smrg# 727753e90a53Smrg# This file is free software; the Free Software Foundation 727853e90a53Smrg# gives unlimited permission to copy and/or distribute it, 727953e90a53Smrg# with or without modifications, as long as this notice is preserved. 728053e90a53Smrg 728153e90a53Smrg# serial 12 728253e90a53Smrg 728353e90a53Smrg# This macro actually does too much. Some checks are only needed if 728453e90a53Smrg# your package does certain things. But this isn't really a big deal. 728553e90a53Smrg 728653e90a53Smrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 728753e90a53Smrg# AM_INIT_AUTOMAKE([OPTIONS]) 728853e90a53Smrg# ----------------------------------------------- 728953e90a53Smrg# The call with PACKAGE and VERSION arguments is the old style 729053e90a53Smrg# call (pre autoconf-2.50), which is being phased out. PACKAGE 729153e90a53Smrg# and VERSION should now be passed to AC_INIT and removed from 729253e90a53Smrg# the call to AM_INIT_AUTOMAKE. 729353e90a53Smrg# We support both call styles for the transition. After 729453e90a53Smrg# the next Automake release, Autoconf can make the AC_INIT 729553e90a53Smrg# arguments mandatory, and then we can depend on a new Autoconf 729653e90a53Smrg# release and drop the old call support. 729753e90a53SmrgAC_DEFUN([AM_INIT_AUTOMAKE], 729853e90a53Smrg[AC_PREREQ([2.58])dnl 729953e90a53Smrgdnl Autoconf wants to disallow AM_ names. We explicitly allow 730053e90a53Smrgdnl the ones we care about. 730153e90a53Smrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 730253e90a53SmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 730353e90a53SmrgAC_REQUIRE([AC_PROG_INSTALL])dnl 730453e90a53Smrg# test to see if srcdir already configured 730553e90a53Smrgif test "`cd $srcdir && pwd`" != "`pwd`" && 730653e90a53Smrg test -f $srcdir/config.status; then 730753e90a53Smrg AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 730853e90a53Smrgfi 730953e90a53Smrg 731053e90a53Smrg# test whether we have cygpath 731153e90a53Smrgif test -z "$CYGPATH_W"; then 731253e90a53Smrg if (cygpath --version) >/dev/null 2>/dev/null; then 731353e90a53Smrg CYGPATH_W='cygpath -w' 731453e90a53Smrg else 731553e90a53Smrg CYGPATH_W=echo 731653e90a53Smrg fi 731753e90a53Smrgfi 731853e90a53SmrgAC_SUBST([CYGPATH_W]) 731953e90a53Smrg 732053e90a53Smrg# Define the identity of the package. 732153e90a53Smrgdnl Distinguish between old-style and new-style calls. 732253e90a53Smrgm4_ifval([$2], 732353e90a53Smrg[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 732453e90a53Smrg AC_SUBST([PACKAGE], [$1])dnl 732553e90a53Smrg AC_SUBST([VERSION], [$2])], 732653e90a53Smrg[_AM_SET_OPTIONS([$1])dnl 732753e90a53Smrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 732853e90a53Smrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 732953e90a53Smrg 733053e90a53Smrg_AM_IF_OPTION([no-define],, 733153e90a53Smrg[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) 733253e90a53Smrg AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl 733353e90a53Smrg 733453e90a53Smrg# Some tools Automake needs. 733553e90a53SmrgAC_REQUIRE([AM_SANITY_CHECK])dnl 733653e90a53SmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl 733753e90a53SmrgAM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) 733853e90a53SmrgAM_MISSING_PROG(AUTOCONF, autoconf) 733953e90a53SmrgAM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) 734053e90a53SmrgAM_MISSING_PROG(AUTOHEADER, autoheader) 734153e90a53SmrgAM_MISSING_PROG(MAKEINFO, makeinfo) 734253e90a53SmrgAM_PROG_INSTALL_SH 734353e90a53SmrgAM_PROG_INSTALL_STRIP 734453e90a53SmrgAC_REQUIRE([AM_PROG_MKDIR_P])dnl 734553e90a53Smrg# We need awk for the "check" target. The system "awk" is bad on 734653e90a53Smrg# some platforms. 734753e90a53SmrgAC_REQUIRE([AC_PROG_AWK])dnl 734853e90a53SmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl 734953e90a53SmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl 735053e90a53Smrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 735153e90a53Smrg [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 735253e90a53Smrg [_AM_PROG_TAR([v7])])]) 735353e90a53Smrg_AM_IF_OPTION([no-dependencies],, 735453e90a53Smrg[AC_PROVIDE_IFELSE([AC_PROG_CC], 735553e90a53Smrg [_AM_DEPENDENCIES(CC)], 735653e90a53Smrg [define([AC_PROG_CC], 735753e90a53Smrg defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl 735853e90a53SmrgAC_PROVIDE_IFELSE([AC_PROG_CXX], 735953e90a53Smrg [_AM_DEPENDENCIES(CXX)], 736053e90a53Smrg [define([AC_PROG_CXX], 736153e90a53Smrg defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl 736253e90a53Smrg]) 736353e90a53Smrg]) 736453e90a53Smrg 736553e90a53Smrg 736653e90a53Smrg# When config.status generates a header, we must update the stamp-h file. 736753e90a53Smrg# This file resides in the same directory as the config header 736853e90a53Smrg# that is generated. The stamp files are numbered to have different names. 736953e90a53Smrg 737053e90a53Smrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 737153e90a53Smrg# loop where config.status creates the headers, so we can generate 737253e90a53Smrg# our stamp files there. 737353e90a53SmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 737453e90a53Smrg[# Compute $1's index in $config_headers. 737553e90a53Smrg_am_stamp_count=1 737653e90a53Smrgfor _am_header in $config_headers :; do 737753e90a53Smrg case $_am_header in 737853e90a53Smrg $1 | $1:* ) 737953e90a53Smrg break ;; 738053e90a53Smrg * ) 738153e90a53Smrg _am_stamp_count=`expr $_am_stamp_count + 1` ;; 738253e90a53Smrg esac 738353e90a53Smrgdone 738453e90a53Smrgecho "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) 738553e90a53Smrg 738653e90a53Smrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 738753e90a53Smrg# 738853e90a53Smrg# This file is free software; the Free Software Foundation 738953e90a53Smrg# gives unlimited permission to copy and/or distribute it, 739053e90a53Smrg# with or without modifications, as long as this notice is preserved. 739153e90a53Smrg 739253e90a53Smrg# AM_PROG_INSTALL_SH 739353e90a53Smrg# ------------------ 739453e90a53Smrg# Define $install_sh. 739553e90a53SmrgAC_DEFUN([AM_PROG_INSTALL_SH], 739653e90a53Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 739753e90a53Smrginstall_sh=${install_sh-"$am_aux_dir/install-sh"} 739853e90a53SmrgAC_SUBST(install_sh)]) 739953e90a53Smrg 740053e90a53Smrg# Copyright (C) 2003, 2005 Free Software Foundation, Inc. 740153e90a53Smrg# 740253e90a53Smrg# This file is free software; the Free Software Foundation 740353e90a53Smrg# gives unlimited permission to copy and/or distribute it, 740453e90a53Smrg# with or without modifications, as long as this notice is preserved. 740553e90a53Smrg 740653e90a53Smrg# serial 2 740753e90a53Smrg 740853e90a53Smrg# Check whether the underlying file-system supports filenames 740953e90a53Smrg# with a leading dot. For instance MS-DOS doesn't. 741053e90a53SmrgAC_DEFUN([AM_SET_LEADING_DOT], 741153e90a53Smrg[rm -rf .tst 2>/dev/null 741253e90a53Smrgmkdir .tst 2>/dev/null 741353e90a53Smrgif test -d .tst; then 741453e90a53Smrg am__leading_dot=. 741553e90a53Smrgelse 741653e90a53Smrg am__leading_dot=_ 741753e90a53Smrgfi 741853e90a53Smrgrmdir .tst 2>/dev/null 741953e90a53SmrgAC_SUBST([am__leading_dot])]) 742053e90a53Smrg 742153e90a53Smrg# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- 742253e90a53Smrg# From Jim Meyering 742353e90a53Smrg 742453e90a53Smrg# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005 742553e90a53Smrg# Free Software Foundation, Inc. 742653e90a53Smrg# 742753e90a53Smrg# This file is free software; the Free Software Foundation 742853e90a53Smrg# gives unlimited permission to copy and/or distribute it, 742953e90a53Smrg# with or without modifications, as long as this notice is preserved. 743053e90a53Smrg 743153e90a53Smrg# serial 4 743253e90a53Smrg 743353e90a53SmrgAC_DEFUN([AM_MAINTAINER_MODE], 743453e90a53Smrg[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) 743553e90a53Smrg dnl maintainer-mode is disabled by default 743653e90a53Smrg AC_ARG_ENABLE(maintainer-mode, 743753e90a53Smrg[ --enable-maintainer-mode enable make rules and dependencies not useful 743853e90a53Smrg (and sometimes confusing) to the casual installer], 743953e90a53Smrg USE_MAINTAINER_MODE=$enableval, 744053e90a53Smrg USE_MAINTAINER_MODE=no) 744153e90a53Smrg AC_MSG_RESULT([$USE_MAINTAINER_MODE]) 744253e90a53Smrg AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes]) 744353e90a53Smrg MAINT=$MAINTAINER_MODE_TRUE 744453e90a53Smrg AC_SUBST(MAINT)dnl 744553e90a53Smrg] 744653e90a53Smrg) 744753e90a53Smrg 744853e90a53SmrgAU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) 744953e90a53Smrg 745053e90a53Smrg# Check to see how 'make' treats includes. -*- Autoconf -*- 745153e90a53Smrg 745253e90a53Smrg# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. 745353e90a53Smrg# 745453e90a53Smrg# This file is free software; the Free Software Foundation 745553e90a53Smrg# gives unlimited permission to copy and/or distribute it, 745653e90a53Smrg# with or without modifications, as long as this notice is preserved. 745753e90a53Smrg 745853e90a53Smrg# serial 3 745953e90a53Smrg 746053e90a53Smrg# AM_MAKE_INCLUDE() 746153e90a53Smrg# ----------------- 746253e90a53Smrg# Check to see how make treats includes. 746353e90a53SmrgAC_DEFUN([AM_MAKE_INCLUDE], 746453e90a53Smrg[am_make=${MAKE-make} 746553e90a53Smrgcat > confinc << 'END' 746653e90a53Smrgam__doit: 746753e90a53Smrg @echo done 746853e90a53Smrg.PHONY: am__doit 746953e90a53SmrgEND 747053e90a53Smrg# If we don't find an include directive, just comment out the code. 747153e90a53SmrgAC_MSG_CHECKING([for style of include used by $am_make]) 747253e90a53Smrgam__include="#" 747353e90a53Smrgam__quote= 747453e90a53Smrg_am_result=none 747553e90a53Smrg# First try GNU make style include. 747653e90a53Smrgecho "include confinc" > confmf 747753e90a53Smrg# We grep out `Entering directory' and `Leaving directory' 747853e90a53Smrg# messages which can occur if `w' ends up in MAKEFLAGS. 747953e90a53Smrg# In particular we don't look at `^make:' because GNU make might 748053e90a53Smrg# be invoked under some other name (usually "gmake"), in which 748153e90a53Smrg# case it prints its new name instead of `make'. 748253e90a53Smrgif test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then 748353e90a53Smrg am__include=include 748453e90a53Smrg am__quote= 748553e90a53Smrg _am_result=GNU 748653e90a53Smrgfi 748753e90a53Smrg# Now try BSD make style include. 748853e90a53Smrgif test "$am__include" = "#"; then 748953e90a53Smrg echo '.include "confinc"' > confmf 749053e90a53Smrg if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then 749153e90a53Smrg am__include=.include 749253e90a53Smrg am__quote="\"" 749353e90a53Smrg _am_result=BSD 749453e90a53Smrg fi 749553e90a53Smrgfi 749653e90a53SmrgAC_SUBST([am__include]) 749753e90a53SmrgAC_SUBST([am__quote]) 749853e90a53SmrgAC_MSG_RESULT([$_am_result]) 749953e90a53Smrgrm -f confinc confmf 750053e90a53Smrg]) 750153e90a53Smrg 750253e90a53Smrg# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 750353e90a53Smrg 750453e90a53Smrg# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005 750553e90a53Smrg# Free Software Foundation, Inc. 750653e90a53Smrg# 750753e90a53Smrg# This file is free software; the Free Software Foundation 750853e90a53Smrg# gives unlimited permission to copy and/or distribute it, 750953e90a53Smrg# with or without modifications, as long as this notice is preserved. 751053e90a53Smrg 751153e90a53Smrg# serial 4 751253e90a53Smrg 751353e90a53Smrg# AM_MISSING_PROG(NAME, PROGRAM) 751453e90a53Smrg# ------------------------------ 751553e90a53SmrgAC_DEFUN([AM_MISSING_PROG], 751653e90a53Smrg[AC_REQUIRE([AM_MISSING_HAS_RUN]) 751753e90a53Smrg$1=${$1-"${am_missing_run}$2"} 751853e90a53SmrgAC_SUBST($1)]) 751953e90a53Smrg 752053e90a53Smrg 752153e90a53Smrg# AM_MISSING_HAS_RUN 752253e90a53Smrg# ------------------ 752353e90a53Smrg# Define MISSING if not defined so far and test if it supports --run. 752453e90a53Smrg# If it does, set am_missing_run to use it, otherwise, to nothing. 752553e90a53SmrgAC_DEFUN([AM_MISSING_HAS_RUN], 752653e90a53Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 752753e90a53Smrgtest x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" 752853e90a53Smrg# Use eval to expand $SHELL 752953e90a53Smrgif eval "$MISSING --run true"; then 753053e90a53Smrg am_missing_run="$MISSING --run " 753153e90a53Smrgelse 753253e90a53Smrg am_missing_run= 753353e90a53Smrg AC_MSG_WARN([`missing' script is too old or missing]) 753453e90a53Smrgfi 753553e90a53Smrg]) 753653e90a53Smrg 753753e90a53Smrg# Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc. 753853e90a53Smrg# 753953e90a53Smrg# This file is free software; the Free Software Foundation 754053e90a53Smrg# gives unlimited permission to copy and/or distribute it, 754153e90a53Smrg# with or without modifications, as long as this notice is preserved. 754253e90a53Smrg 754353e90a53Smrg# AM_PROG_MKDIR_P 754453e90a53Smrg# --------------- 754553e90a53Smrg# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise. 754653e90a53Smrg# 754753e90a53Smrg# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories 754853e90a53Smrg# created by `make install' are always world readable, even if the 754953e90a53Smrg# installer happens to have an overly restrictive umask (e.g. 077). 755053e90a53Smrg# This was a mistake. There are at least two reasons why we must not 755153e90a53Smrg# use `-m 0755': 755253e90a53Smrg# - it causes special bits like SGID to be ignored, 755353e90a53Smrg# - it may be too restrictive (some setups expect 775 directories). 755453e90a53Smrg# 755553e90a53Smrg# Do not use -m 0755 and let people choose whatever they expect by 755653e90a53Smrg# setting umask. 755753e90a53Smrg# 755853e90a53Smrg# We cannot accept any implementation of `mkdir' that recognizes `-p'. 755953e90a53Smrg# Some implementations (such as Solaris 8's) are not thread-safe: if a 756053e90a53Smrg# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c' 756153e90a53Smrg# concurrently, both version can detect that a/ is missing, but only 756253e90a53Smrg# one can create it and the other will error out. Consequently we 756353e90a53Smrg# restrict ourselves to GNU make (using the --version option ensures 756453e90a53Smrg# this.) 756553e90a53SmrgAC_DEFUN([AM_PROG_MKDIR_P], 756653e90a53Smrg[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then 756753e90a53Smrg # We used to keeping the `.' as first argument, in order to 756853e90a53Smrg # allow $(mkdir_p) to be used without argument. As in 756953e90a53Smrg # $(mkdir_p) $(somedir) 757053e90a53Smrg # where $(somedir) is conditionally defined. However this is wrong 757153e90a53Smrg # for two reasons: 757253e90a53Smrg # 1. if the package is installed by a user who cannot write `.' 757353e90a53Smrg # make install will fail, 757453e90a53Smrg # 2. the above comment should most certainly read 757553e90a53Smrg # $(mkdir_p) $(DESTDIR)$(somedir) 757653e90a53Smrg # so it does not work when $(somedir) is undefined and 757753e90a53Smrg # $(DESTDIR) is not. 757853e90a53Smrg # To support the latter case, we have to write 757953e90a53Smrg # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir), 758053e90a53Smrg # so the `.' trick is pointless. 758153e90a53Smrg mkdir_p='mkdir -p --' 758253e90a53Smrgelse 758353e90a53Smrg # On NextStep and OpenStep, the `mkdir' command does not 758453e90a53Smrg # recognize any option. It will interpret all options as 758553e90a53Smrg # directories to create, and then abort because `.' already 758653e90a53Smrg # exists. 758753e90a53Smrg for d in ./-p ./--version; 758853e90a53Smrg do 758953e90a53Smrg test -d $d && rmdir $d 759053e90a53Smrg done 759153e90a53Smrg # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists. 759253e90a53Smrg if test -f "$ac_aux_dir/mkinstalldirs"; then 759353e90a53Smrg mkdir_p='$(mkinstalldirs)' 759453e90a53Smrg else 759553e90a53Smrg mkdir_p='$(install_sh) -d' 759653e90a53Smrg fi 759753e90a53Smrgfi 759853e90a53SmrgAC_SUBST([mkdir_p])]) 759953e90a53Smrg 760053e90a53Smrg# Helper functions for option handling. -*- Autoconf -*- 760153e90a53Smrg 760253e90a53Smrg# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. 760353e90a53Smrg# 760453e90a53Smrg# This file is free software; the Free Software Foundation 760553e90a53Smrg# gives unlimited permission to copy and/or distribute it, 760653e90a53Smrg# with or without modifications, as long as this notice is preserved. 760753e90a53Smrg 760853e90a53Smrg# serial 3 760953e90a53Smrg 761053e90a53Smrg# _AM_MANGLE_OPTION(NAME) 761153e90a53Smrg# ----------------------- 761253e90a53SmrgAC_DEFUN([_AM_MANGLE_OPTION], 761353e90a53Smrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 761453e90a53Smrg 761553e90a53Smrg# _AM_SET_OPTION(NAME) 761653e90a53Smrg# ------------------------------ 761753e90a53Smrg# Set option NAME. Presently that only means defining a flag for this option. 761853e90a53SmrgAC_DEFUN([_AM_SET_OPTION], 761953e90a53Smrg[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) 762053e90a53Smrg 762153e90a53Smrg# _AM_SET_OPTIONS(OPTIONS) 762253e90a53Smrg# ---------------------------------- 762353e90a53Smrg# OPTIONS is a space-separated list of Automake options. 762453e90a53SmrgAC_DEFUN([_AM_SET_OPTIONS], 762553e90a53Smrg[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 762653e90a53Smrg 762753e90a53Smrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 762853e90a53Smrg# ------------------------------------------- 762953e90a53Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 763053e90a53SmrgAC_DEFUN([_AM_IF_OPTION], 763153e90a53Smrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 763253e90a53Smrg 763353e90a53Smrg# Check to make sure that the build environment is sane. -*- Autoconf -*- 763453e90a53Smrg 763553e90a53Smrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 763653e90a53Smrg# Free Software Foundation, Inc. 763753e90a53Smrg# 763853e90a53Smrg# This file is free software; the Free Software Foundation 763953e90a53Smrg# gives unlimited permission to copy and/or distribute it, 764053e90a53Smrg# with or without modifications, as long as this notice is preserved. 764153e90a53Smrg 764253e90a53Smrg# serial 4 764353e90a53Smrg 764453e90a53Smrg# AM_SANITY_CHECK 764553e90a53Smrg# --------------- 764653e90a53SmrgAC_DEFUN([AM_SANITY_CHECK], 764753e90a53Smrg[AC_MSG_CHECKING([whether build environment is sane]) 764853e90a53Smrg# Just in case 764953e90a53Smrgsleep 1 765053e90a53Smrgecho timestamp > conftest.file 765153e90a53Smrg# Do `set' in a subshell so we don't clobber the current shell's 765253e90a53Smrg# arguments. Must try -L first in case configure is actually a 765353e90a53Smrg# symlink; some systems play weird games with the mod time of symlinks 765453e90a53Smrg# (eg FreeBSD returns the mod time of the symlink's containing 765553e90a53Smrg# directory). 765653e90a53Smrgif ( 765753e90a53Smrg set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` 765853e90a53Smrg if test "$[*]" = "X"; then 765953e90a53Smrg # -L didn't work. 766053e90a53Smrg set X `ls -t $srcdir/configure conftest.file` 766153e90a53Smrg fi 766253e90a53Smrg rm -f conftest.file 766353e90a53Smrg if test "$[*]" != "X $srcdir/configure conftest.file" \ 766453e90a53Smrg && test "$[*]" != "X conftest.file $srcdir/configure"; then 766553e90a53Smrg 766653e90a53Smrg # If neither matched, then we have a broken ls. This can happen 766753e90a53Smrg # if, for instance, CONFIG_SHELL is bash and it inherits a 766853e90a53Smrg # broken ls alias from the environment. This has actually 766953e90a53Smrg # happened. Such a system could not be considered "sane". 767053e90a53Smrg AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 767153e90a53Smrgalias in your environment]) 767253e90a53Smrg fi 767353e90a53Smrg 767453e90a53Smrg test "$[2]" = conftest.file 767553e90a53Smrg ) 767653e90a53Smrgthen 767753e90a53Smrg # Ok. 767853e90a53Smrg : 767953e90a53Smrgelse 768053e90a53Smrg AC_MSG_ERROR([newly created file is older than distributed files! 768153e90a53SmrgCheck your system clock]) 768253e90a53Smrgfi 768353e90a53SmrgAC_MSG_RESULT(yes)]) 768453e90a53Smrg 768553e90a53Smrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 768653e90a53Smrg# 768753e90a53Smrg# This file is free software; the Free Software Foundation 768853e90a53Smrg# gives unlimited permission to copy and/or distribute it, 768953e90a53Smrg# with or without modifications, as long as this notice is preserved. 769053e90a53Smrg 769153e90a53Smrg# AM_PROG_INSTALL_STRIP 769253e90a53Smrg# --------------------- 769353e90a53Smrg# One issue with vendor `install' (even GNU) is that you can't 769453e90a53Smrg# specify the program used to strip binaries. This is especially 769553e90a53Smrg# annoying in cross-compiling environments, where the build's strip 769653e90a53Smrg# is unlikely to handle the host's binaries. 769753e90a53Smrg# Fortunately install-sh will honor a STRIPPROG variable, so we 769853e90a53Smrg# always use install-sh in `make install-strip', and initialize 769953e90a53Smrg# STRIPPROG with the value of the STRIP variable (set by the user). 770053e90a53SmrgAC_DEFUN([AM_PROG_INSTALL_STRIP], 770153e90a53Smrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 770253e90a53Smrg# Installed binaries are usually stripped using `strip' when the user 770353e90a53Smrg# run `make install-strip'. However `strip' might not be the right 770453e90a53Smrg# tool to use in cross-compilation environments, therefore Automake 770553e90a53Smrg# will honor the `STRIP' environment variable to overrule this program. 770653e90a53Smrgdnl Don't test for $cross_compiling = yes, because it might be `maybe'. 770753e90a53Smrgif test "$cross_compiling" != no; then 770853e90a53Smrg AC_CHECK_TOOL([STRIP], [strip], :) 770953e90a53Smrgfi 771053e90a53SmrgINSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" 771153e90a53SmrgAC_SUBST([INSTALL_STRIP_PROGRAM])]) 771253e90a53Smrg 771353e90a53Smrg# Check how to create a tarball. -*- Autoconf -*- 771453e90a53Smrg 771553e90a53Smrg# Copyright (C) 2004, 2005 Free Software Foundation, Inc. 771653e90a53Smrg# 771753e90a53Smrg# This file is free software; the Free Software Foundation 771853e90a53Smrg# gives unlimited permission to copy and/or distribute it, 771953e90a53Smrg# with or without modifications, as long as this notice is preserved. 772053e90a53Smrg 772153e90a53Smrg# serial 2 772253e90a53Smrg 772353e90a53Smrg# _AM_PROG_TAR(FORMAT) 772453e90a53Smrg# -------------------- 772553e90a53Smrg# Check how to create a tarball in format FORMAT. 772653e90a53Smrg# FORMAT should be one of `v7', `ustar', or `pax'. 772753e90a53Smrg# 772853e90a53Smrg# Substitute a variable $(am__tar) that is a command 772953e90a53Smrg# writing to stdout a FORMAT-tarball containing the directory 773053e90a53Smrg# $tardir. 773153e90a53Smrg# tardir=directory && $(am__tar) > result.tar 773253e90a53Smrg# 773353e90a53Smrg# Substitute a variable $(am__untar) that extract such 773453e90a53Smrg# a tarball read from stdin. 773553e90a53Smrg# $(am__untar) < result.tar 773653e90a53SmrgAC_DEFUN([_AM_PROG_TAR], 773753e90a53Smrg[# Always define AMTAR for backward compatibility. 773853e90a53SmrgAM_MISSING_PROG([AMTAR], [tar]) 773953e90a53Smrgm4_if([$1], [v7], 774053e90a53Smrg [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], 774153e90a53Smrg [m4_case([$1], [ustar],, [pax],, 774253e90a53Smrg [m4_fatal([Unknown tar format])]) 774353e90a53SmrgAC_MSG_CHECKING([how to create a $1 tar archive]) 774453e90a53Smrg# Loop over all known methods to create a tar archive until one works. 774553e90a53Smrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 774653e90a53Smrg_am_tools=${am_cv_prog_tar_$1-$_am_tools} 774753e90a53Smrg# Do not fold the above two line into one, because Tru64 sh and 774853e90a53Smrg# Solaris sh will not grok spaces in the rhs of `-'. 774953e90a53Smrgfor _am_tool in $_am_tools 775053e90a53Smrgdo 775153e90a53Smrg case $_am_tool in 775253e90a53Smrg gnutar) 775353e90a53Smrg for _am_tar in tar gnutar gtar; 775453e90a53Smrg do 775553e90a53Smrg AM_RUN_LOG([$_am_tar --version]) && break 775653e90a53Smrg done 775753e90a53Smrg am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 775853e90a53Smrg am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 775953e90a53Smrg am__untar="$_am_tar -xf -" 776053e90a53Smrg ;; 776153e90a53Smrg plaintar) 776253e90a53Smrg # Must skip GNU tar: if it does not support --format= it doesn't create 776353e90a53Smrg # ustar tarball either. 776453e90a53Smrg (tar --version) >/dev/null 2>&1 && continue 776553e90a53Smrg am__tar='tar chf - "$$tardir"' 776653e90a53Smrg am__tar_='tar chf - "$tardir"' 776753e90a53Smrg am__untar='tar xf -' 776853e90a53Smrg ;; 776953e90a53Smrg pax) 777053e90a53Smrg am__tar='pax -L -x $1 -w "$$tardir"' 777153e90a53Smrg am__tar_='pax -L -x $1 -w "$tardir"' 777253e90a53Smrg am__untar='pax -r' 777353e90a53Smrg ;; 777453e90a53Smrg cpio) 777553e90a53Smrg am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 777653e90a53Smrg am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 777753e90a53Smrg am__untar='cpio -i -H $1 -d' 777853e90a53Smrg ;; 777953e90a53Smrg none) 778053e90a53Smrg am__tar=false 778153e90a53Smrg am__tar_=false 778253e90a53Smrg am__untar=false 778353e90a53Smrg ;; 778453e90a53Smrg esac 778553e90a53Smrg 778653e90a53Smrg # If the value was cached, stop now. We just wanted to have am__tar 778753e90a53Smrg # and am__untar set. 778853e90a53Smrg test -n "${am_cv_prog_tar_$1}" && break 778953e90a53Smrg 779053e90a53Smrg # tar/untar a dummy directory, and stop if the command works 779153e90a53Smrg rm -rf conftest.dir 779253e90a53Smrg mkdir conftest.dir 779353e90a53Smrg echo GrepMe > conftest.dir/file 779453e90a53Smrg AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 779553e90a53Smrg rm -rf conftest.dir 779653e90a53Smrg if test -s conftest.tar; then 779753e90a53Smrg AM_RUN_LOG([$am__untar <conftest.tar]) 779853e90a53Smrg grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 779953e90a53Smrg fi 780053e90a53Smrgdone 780153e90a53Smrgrm -rf conftest.dir 780253e90a53Smrg 780353e90a53SmrgAC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 780453e90a53SmrgAC_MSG_RESULT([$am_cv_prog_tar_$1])]) 780553e90a53SmrgAC_SUBST([am__tar]) 780653e90a53SmrgAC_SUBST([am__untar]) 780753e90a53Smrg]) # _AM_PROG_TAR 780853e90a53Smrg 7809