aclocal.m4 revision 09885543
109885543Smrg# generated automatically by aclocal 1.9.6 -*- Autoconf -*- 209885543Smrg 309885543Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 409885543Smrg# 2005 Free Software Foundation, Inc. 509885543Smrg# This file is free software; the Free Software Foundation 609885543Smrg# gives unlimited permission to copy and/or distribute it, 709885543Smrg# with or without modifications, as long as this notice is preserved. 809885543Smrg 909885543Smrg# This program is distributed in the hope that it will be useful, 1009885543Smrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 1109885543Smrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 1209885543Smrg# PARTICULAR PURPOSE. 1309885543Smrg 1409885543Smrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 1509885543Smrg 1609885543Smrg# serial 48 Debian 1.5.22-4 AC_PROG_LIBTOOL 1709885543Smrg 1809885543Smrg 1909885543Smrg# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED) 2009885543Smrg# ----------------------------------------------------------- 2109885543Smrg# If this macro is not defined by Autoconf, define it here. 2209885543Smrgm4_ifdef([AC_PROVIDE_IFELSE], 2309885543Smrg [], 2409885543Smrg [m4_define([AC_PROVIDE_IFELSE], 2509885543Smrg [m4_ifdef([AC_PROVIDE_$1], 2609885543Smrg [$2], [$3])])]) 2709885543Smrg 2809885543Smrg 2909885543Smrg# AC_PROG_LIBTOOL 3009885543Smrg# --------------- 3109885543SmrgAC_DEFUN([AC_PROG_LIBTOOL], 3209885543Smrg[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl 3309885543Smrgdnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX 3409885543Smrgdnl immediately, otherwise, hook it in at the end of AC_PROG_CXX. 3509885543Smrg AC_PROVIDE_IFELSE([AC_PROG_CXX], 3609885543Smrg [AC_LIBTOOL_CXX], 3709885543Smrg [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX 3809885543Smrg ])]) 3909885543Smrgdnl And a similar setup for Fortran 77 support 4009885543Smrg AC_PROVIDE_IFELSE([AC_PROG_F77], 4109885543Smrg [AC_LIBTOOL_F77], 4209885543Smrg [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77 4309885543Smrg])]) 4409885543Smrg 4509885543Smrgdnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly. 4609885543Smrgdnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run 4709885543Smrgdnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both. 4809885543Smrg AC_PROVIDE_IFELSE([AC_PROG_GCJ], 4909885543Smrg [AC_LIBTOOL_GCJ], 5009885543Smrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 5109885543Smrg [AC_LIBTOOL_GCJ], 5209885543Smrg [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ], 5309885543Smrg [AC_LIBTOOL_GCJ], 5409885543Smrg [ifdef([AC_PROG_GCJ], 5509885543Smrg [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])]) 5609885543Smrg ifdef([A][M_PROG_GCJ], 5709885543Smrg [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])]) 5809885543Smrg ifdef([LT_AC_PROG_GCJ], 5909885543Smrg [define([LT_AC_PROG_GCJ], 6009885543Smrg defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])]) 6109885543Smrg])])# AC_PROG_LIBTOOL 6209885543Smrg 6309885543Smrg 6409885543Smrg# _AC_PROG_LIBTOOL 6509885543Smrg# ---------------- 6609885543SmrgAC_DEFUN([_AC_PROG_LIBTOOL], 6709885543Smrg[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl 6809885543SmrgAC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl 6909885543SmrgAC_BEFORE([$0],[AC_LIBTOOL_F77])dnl 7009885543SmrgAC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl 7109885543Smrg 7209885543Smrg# This can be used to rebuild libtool when needed 7309885543SmrgLIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" 7409885543Smrg 7509885543Smrg# Always use our own libtool. 7609885543SmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool' 7709885543SmrgAC_SUBST(LIBTOOL)dnl 7809885543Smrg 7909885543Smrg# Prevent multiple expansion 8009885543Smrgdefine([AC_PROG_LIBTOOL], []) 8109885543Smrg])# _AC_PROG_LIBTOOL 8209885543Smrg 8309885543Smrg 8409885543Smrg# AC_LIBTOOL_SETUP 8509885543Smrg# ---------------- 8609885543SmrgAC_DEFUN([AC_LIBTOOL_SETUP], 8709885543Smrg[AC_PREREQ(2.50)dnl 8809885543SmrgAC_REQUIRE([AC_ENABLE_SHARED])dnl 8909885543SmrgAC_REQUIRE([AC_ENABLE_STATIC])dnl 9009885543SmrgAC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl 9109885543SmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 9209885543SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 9309885543SmrgAC_REQUIRE([AC_PROG_CC])dnl 9409885543SmrgAC_REQUIRE([AC_PROG_LD])dnl 9509885543SmrgAC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl 9609885543SmrgAC_REQUIRE([AC_PROG_NM])dnl 9709885543Smrg 9809885543SmrgAC_REQUIRE([AC_PROG_LN_S])dnl 9909885543SmrgAC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl 10009885543Smrg# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! 10109885543SmrgAC_REQUIRE([AC_OBJEXT])dnl 10209885543SmrgAC_REQUIRE([AC_EXEEXT])dnl 10309885543Smrgdnl 10409885543Smrg 10509885543SmrgAC_LIBTOOL_SYS_MAX_CMD_LEN 10609885543SmrgAC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE 10709885543SmrgAC_LIBTOOL_OBJDIR 10809885543Smrg 10909885543SmrgAC_REQUIRE([_LT_AC_SYS_COMPILER])dnl 11009885543Smrg_LT_AC_PROG_ECHO_BACKSLASH 11109885543Smrg 11209885543Smrgcase $host_os in 11309885543Smrgaix3*) 11409885543Smrg # AIX sometimes has problems with the GCC collect2 program. For some 11509885543Smrg # reason, if we set the COLLECT_NAMES environment variable, the problems 11609885543Smrg # vanish in a puff of smoke. 11709885543Smrg if test "X${COLLECT_NAMES+set}" != Xset; then 11809885543Smrg COLLECT_NAMES= 11909885543Smrg export COLLECT_NAMES 12009885543Smrg fi 12109885543Smrg ;; 12209885543Smrgesac 12309885543Smrg 12409885543Smrg# Sed substitution that helps us do robust quoting. It backslashifies 12509885543Smrg# metacharacters that are still active within double-quoted strings. 12609885543SmrgXsed='sed -e 1s/^X//' 12709885543Smrg[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'] 12809885543Smrg 12909885543Smrg# Same as above, but do not quote variable references. 13009885543Smrg[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'] 13109885543Smrg 13209885543Smrg# Sed substitution to delay expansion of an escaped shell variable in a 13309885543Smrg# double_quote_subst'ed string. 13409885543Smrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 13509885543Smrg 13609885543Smrg# Sed substitution to avoid accidental globbing in evaled expressions 13709885543Smrgno_glob_subst='s/\*/\\\*/g' 13809885543Smrg 13909885543Smrg# Constants: 14009885543Smrgrm="rm -f" 14109885543Smrg 14209885543Smrg# Global variables: 14309885543Smrgdefault_ofile=libtool 14409885543Smrgcan_build_shared=yes 14509885543Smrg 14609885543Smrg# All known linkers require a `.a' archive for static linking (except MSVC, 14709885543Smrg# which needs '.lib'). 14809885543Smrglibext=a 14909885543Smrgltmain="$ac_aux_dir/ltmain.sh" 15009885543Smrgofile="$default_ofile" 15109885543Smrgwith_gnu_ld="$lt_cv_prog_gnu_ld" 15209885543Smrg 15309885543SmrgAC_CHECK_TOOL(AR, ar, false) 15409885543SmrgAC_CHECK_TOOL(RANLIB, ranlib, :) 15509885543SmrgAC_CHECK_TOOL(STRIP, strip, :) 15609885543Smrg 15709885543Smrgold_CC="$CC" 15809885543Smrgold_CFLAGS="$CFLAGS" 15909885543Smrg 16009885543Smrg# Set sane defaults for various variables 16109885543Smrgtest -z "$AR" && AR=ar 16209885543Smrgtest -z "$AR_FLAGS" && AR_FLAGS=cru 16309885543Smrgtest -z "$AS" && AS=as 16409885543Smrgtest -z "$CC" && CC=cc 16509885543Smrgtest -z "$LTCC" && LTCC=$CC 16609885543Smrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 16709885543Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 16809885543Smrgtest -z "$LD" && LD=ld 16909885543Smrgtest -z "$LN_S" && LN_S="ln -s" 17009885543Smrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file 17109885543Smrgtest -z "$NM" && NM=nm 17209885543Smrgtest -z "$SED" && SED=sed 17309885543Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump 17409885543Smrgtest -z "$RANLIB" && RANLIB=: 17509885543Smrgtest -z "$STRIP" && STRIP=: 17609885543Smrgtest -z "$ac_objext" && ac_objext=o 17709885543Smrg 17809885543Smrg# Determine commands to create old-style static archives. 17909885543Smrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs' 18009885543Smrgold_postinstall_cmds='chmod 644 $oldlib' 18109885543Smrgold_postuninstall_cmds= 18209885543Smrg 18309885543Smrgif test -n "$RANLIB"; then 18409885543Smrg case $host_os in 18509885543Smrg openbsd*) 18609885543Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" 18709885543Smrg ;; 18809885543Smrg *) 18909885543Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" 19009885543Smrg ;; 19109885543Smrg esac 19209885543Smrg old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" 19309885543Smrgfi 19409885543Smrg 19509885543Smrg_LT_CC_BASENAME([$compiler]) 19609885543Smrg 19709885543Smrg# Only perform the check for file, if the check method requires it 19809885543Smrgcase $deplibs_check_method in 19909885543Smrgfile_magic*) 20009885543Smrg if test "$file_magic_cmd" = '$MAGIC_CMD'; then 20109885543Smrg AC_PATH_MAGIC 20209885543Smrg fi 20309885543Smrg ;; 20409885543Smrgesac 20509885543Smrg 20609885543SmrgAC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no) 20709885543SmrgAC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], 20809885543Smrgenable_win32_dll=yes, enable_win32_dll=no) 20909885543Smrg 21009885543SmrgAC_ARG_ENABLE([libtool-lock], 21109885543Smrg [AC_HELP_STRING([--disable-libtool-lock], 21209885543Smrg [avoid locking (might break parallel builds)])]) 21309885543Smrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes 21409885543Smrg 21509885543SmrgAC_ARG_WITH([pic], 21609885543Smrg [AC_HELP_STRING([--with-pic], 21709885543Smrg [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 21809885543Smrg [pic_mode="$withval"], 21909885543Smrg [pic_mode=default]) 22009885543Smrgtest -z "$pic_mode" && pic_mode=default 22109885543Smrg 22209885543Smrg# Use C for the default configuration in the libtool script 22309885543Smrgtagname= 22409885543SmrgAC_LIBTOOL_LANG_C_CONFIG 22509885543Smrg_LT_AC_TAGCONFIG 22609885543Smrg])# AC_LIBTOOL_SETUP 22709885543Smrg 22809885543Smrg 22909885543Smrg# _LT_AC_SYS_COMPILER 23009885543Smrg# ------------------- 23109885543SmrgAC_DEFUN([_LT_AC_SYS_COMPILER], 23209885543Smrg[AC_REQUIRE([AC_PROG_CC])dnl 23309885543Smrg 23409885543Smrg# If no C compiler was specified, use CC. 23509885543SmrgLTCC=${LTCC-"$CC"} 23609885543Smrg 23709885543Smrg# If no C compiler flags were specified, use CFLAGS. 23809885543SmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"} 23909885543Smrg 24009885543Smrg# Allow CC to be a program name with arguments. 24109885543Smrgcompiler=$CC 24209885543Smrg])# _LT_AC_SYS_COMPILER 24309885543Smrg 24409885543Smrg 24509885543Smrg# _LT_CC_BASENAME(CC) 24609885543Smrg# ------------------- 24709885543Smrg# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 24809885543SmrgAC_DEFUN([_LT_CC_BASENAME], 24909885543Smrg[for cc_temp in $1""; do 25009885543Smrg case $cc_temp in 25109885543Smrg compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 25209885543Smrg distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 25309885543Smrg \-*) ;; 25409885543Smrg *) break;; 25509885543Smrg esac 25609885543Smrgdone 25709885543Smrgcc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` 25809885543Smrg]) 25909885543Smrg 26009885543Smrg 26109885543Smrg# _LT_COMPILER_BOILERPLATE 26209885543Smrg# ------------------------ 26309885543Smrg# Check for compiler boilerplate output or warnings with 26409885543Smrg# the simple compiler test code. 26509885543SmrgAC_DEFUN([_LT_COMPILER_BOILERPLATE], 26609885543Smrg[ac_outfile=conftest.$ac_objext 26709885543Smrgprintf "$lt_simple_compile_test_code" >conftest.$ac_ext 26809885543Smrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 26909885543Smrg_lt_compiler_boilerplate=`cat conftest.err` 27009885543Smrg$rm conftest* 27109885543Smrg])# _LT_COMPILER_BOILERPLATE 27209885543Smrg 27309885543Smrg 27409885543Smrg# _LT_LINKER_BOILERPLATE 27509885543Smrg# ---------------------- 27609885543Smrg# Check for linker boilerplate output or warnings with 27709885543Smrg# the simple link test code. 27809885543SmrgAC_DEFUN([_LT_LINKER_BOILERPLATE], 27909885543Smrg[ac_outfile=conftest.$ac_objext 28009885543Smrgprintf "$lt_simple_link_test_code" >conftest.$ac_ext 28109885543Smrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 28209885543Smrg_lt_linker_boilerplate=`cat conftest.err` 28309885543Smrg$rm conftest* 28409885543Smrg])# _LT_LINKER_BOILERPLATE 28509885543Smrg 28609885543Smrg 28709885543Smrg# _LT_AC_SYS_LIBPATH_AIX 28809885543Smrg# ---------------------- 28909885543Smrg# Links a minimal program and checks the executable 29009885543Smrg# for the system default hardcoded library path. In most cases, 29109885543Smrg# this is /usr/lib:/lib, but when the MPI compilers are used 29209885543Smrg# the location of the communication and MPI libs are included too. 29309885543Smrg# If we don't find anything, use the default library path according 29409885543Smrg# to the aix ld manual. 29509885543SmrgAC_DEFUN([_LT_AC_SYS_LIBPATH_AIX], 29609885543Smrg[AC_LINK_IFELSE(AC_LANG_PROGRAM,[ 29709885543Smrgaix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } 29809885543Smrg}'` 29909885543Smrg# Check for a 64-bit object if we didn't find anything. 30009885543Smrgif 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; } 30109885543Smrg}'`; fi],[]) 30209885543Smrgif test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi 30309885543Smrg])# _LT_AC_SYS_LIBPATH_AIX 30409885543Smrg 30509885543Smrg 30609885543Smrg# _LT_AC_SHELL_INIT(ARG) 30709885543Smrg# ---------------------- 30809885543SmrgAC_DEFUN([_LT_AC_SHELL_INIT], 30909885543Smrg[ifdef([AC_DIVERSION_NOTICE], 31009885543Smrg [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], 31109885543Smrg [AC_DIVERT_PUSH(NOTICE)]) 31209885543Smrg$1 31309885543SmrgAC_DIVERT_POP 31409885543Smrg])# _LT_AC_SHELL_INIT 31509885543Smrg 31609885543Smrg 31709885543Smrg# _LT_AC_PROG_ECHO_BACKSLASH 31809885543Smrg# -------------------------- 31909885543Smrg# Add some code to the start of the generated configure script which 32009885543Smrg# will find an echo command which doesn't interpret backslashes. 32109885543SmrgAC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH], 32209885543Smrg[_LT_AC_SHELL_INIT([ 32309885543Smrg# Check that we are running under the correct shell. 32409885543SmrgSHELL=${CONFIG_SHELL-/bin/sh} 32509885543Smrg 32609885543Smrgcase X$ECHO in 32709885543SmrgX*--fallback-echo) 32809885543Smrg # Remove one level of quotation (which was required for Make). 32909885543Smrg ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` 33009885543Smrg ;; 33109885543Smrgesac 33209885543Smrg 33309885543Smrgecho=${ECHO-echo} 33409885543Smrgif test "X[$]1" = X--no-reexec; then 33509885543Smrg # Discard the --no-reexec flag, and continue. 33609885543Smrg shift 33709885543Smrgelif test "X[$]1" = X--fallback-echo; then 33809885543Smrg # Avoid inline document here, it may be left over 33909885543Smrg : 34009885543Smrgelif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then 34109885543Smrg # Yippee, $echo works! 34209885543Smrg : 34309885543Smrgelse 34409885543Smrg # Restart under the correct shell. 34509885543Smrg exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} 34609885543Smrgfi 34709885543Smrg 34809885543Smrgif test "X[$]1" = X--fallback-echo; then 34909885543Smrg # used as fallback echo 35009885543Smrg shift 35109885543Smrg cat <<EOF 35209885543Smrg[$]* 35309885543SmrgEOF 35409885543Smrg exit 0 35509885543Smrgfi 35609885543Smrg 35709885543Smrg# The HP-UX ksh and POSIX shell print the target directory to stdout 35809885543Smrg# if CDPATH is set. 35909885543Smrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 36009885543Smrg 36109885543Smrgif test -z "$ECHO"; then 36209885543Smrgif test "X${echo_test_string+set}" != Xset; then 36309885543Smrg# find a string as large as possible, as long as the shell can cope with it 36409885543Smrg for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do 36509885543Smrg # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... 36609885543Smrg if (echo_test_string=`eval $cmd`) 2>/dev/null && 36709885543Smrg echo_test_string=`eval $cmd` && 36809885543Smrg (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null 36909885543Smrg then 37009885543Smrg break 37109885543Smrg fi 37209885543Smrg done 37309885543Smrgfi 37409885543Smrg 37509885543Smrgif test "X`($echo '\t') 2>/dev/null`" = 'X\t' && 37609885543Smrg echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && 37709885543Smrg test "X$echo_testing_string" = "X$echo_test_string"; then 37809885543Smrg : 37909885543Smrgelse 38009885543Smrg # The Solaris, AIX, and Digital Unix default echo programs unquote 38109885543Smrg # backslashes. This makes it impossible to quote backslashes using 38209885543Smrg # echo "$something" | sed 's/\\/\\\\/g' 38309885543Smrg # 38409885543Smrg # So, first we look for a working echo in the user's PATH. 38509885543Smrg 38609885543Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 38709885543Smrg for dir in $PATH /usr/ucb; do 38809885543Smrg IFS="$lt_save_ifs" 38909885543Smrg if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && 39009885543Smrg test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && 39109885543Smrg echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && 39209885543Smrg test "X$echo_testing_string" = "X$echo_test_string"; then 39309885543Smrg echo="$dir/echo" 39409885543Smrg break 39509885543Smrg fi 39609885543Smrg done 39709885543Smrg IFS="$lt_save_ifs" 39809885543Smrg 39909885543Smrg if test "X$echo" = Xecho; then 40009885543Smrg # We didn't find a better echo, so look for alternatives. 40109885543Smrg if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && 40209885543Smrg echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && 40309885543Smrg test "X$echo_testing_string" = "X$echo_test_string"; then 40409885543Smrg # This shell has a builtin print -r that does the trick. 40509885543Smrg echo='print -r' 40609885543Smrg elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && 40709885543Smrg test "X$CONFIG_SHELL" != X/bin/ksh; then 40809885543Smrg # If we have ksh, try running configure again with it. 40909885543Smrg ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} 41009885543Smrg export ORIGINAL_CONFIG_SHELL 41109885543Smrg CONFIG_SHELL=/bin/ksh 41209885543Smrg export CONFIG_SHELL 41309885543Smrg exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} 41409885543Smrg else 41509885543Smrg # Try using printf. 41609885543Smrg echo='printf %s\n' 41709885543Smrg if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && 41809885543Smrg echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && 41909885543Smrg test "X$echo_testing_string" = "X$echo_test_string"; then 42009885543Smrg # Cool, printf works 42109885543Smrg : 42209885543Smrg elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && 42309885543Smrg test "X$echo_testing_string" = 'X\t' && 42409885543Smrg echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && 42509885543Smrg test "X$echo_testing_string" = "X$echo_test_string"; then 42609885543Smrg CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL 42709885543Smrg export CONFIG_SHELL 42809885543Smrg SHELL="$CONFIG_SHELL" 42909885543Smrg export SHELL 43009885543Smrg echo="$CONFIG_SHELL [$]0 --fallback-echo" 43109885543Smrg elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && 43209885543Smrg test "X$echo_testing_string" = 'X\t' && 43309885543Smrg echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && 43409885543Smrg test "X$echo_testing_string" = "X$echo_test_string"; then 43509885543Smrg echo="$CONFIG_SHELL [$]0 --fallback-echo" 43609885543Smrg else 43709885543Smrg # maybe with a smaller string... 43809885543Smrg prev=: 43909885543Smrg 44009885543Smrg for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do 44109885543Smrg if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null 44209885543Smrg then 44309885543Smrg break 44409885543Smrg fi 44509885543Smrg prev="$cmd" 44609885543Smrg done 44709885543Smrg 44809885543Smrg if test "$prev" != 'sed 50q "[$]0"'; then 44909885543Smrg echo_test_string=`eval $prev` 45009885543Smrg export echo_test_string 45109885543Smrg exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} 45209885543Smrg else 45309885543Smrg # Oops. We lost completely, so just stick with echo. 45409885543Smrg echo=echo 45509885543Smrg fi 45609885543Smrg fi 45709885543Smrg fi 45809885543Smrg fi 45909885543Smrgfi 46009885543Smrgfi 46109885543Smrg 46209885543Smrg# Copy echo and quote the copy suitably for passing to libtool from 46309885543Smrg# the Makefile, instead of quoting the original, which is used later. 46409885543SmrgECHO=$echo 46509885543Smrgif test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then 46609885543Smrg ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" 46709885543Smrgfi 46809885543Smrg 46909885543SmrgAC_SUBST(ECHO) 47009885543Smrg])])# _LT_AC_PROG_ECHO_BACKSLASH 47109885543Smrg 47209885543Smrg 47309885543Smrg# _LT_AC_LOCK 47409885543Smrg# ----------- 47509885543SmrgAC_DEFUN([_LT_AC_LOCK], 47609885543Smrg[AC_ARG_ENABLE([libtool-lock], 47709885543Smrg [AC_HELP_STRING([--disable-libtool-lock], 47809885543Smrg [avoid locking (might break parallel builds)])]) 47909885543Smrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes 48009885543Smrg 48109885543Smrg# Some flags need to be propagated to the compiler or linker for good 48209885543Smrg# libtool support. 48309885543Smrgcase $host in 48409885543Smrgia64-*-hpux*) 48509885543Smrg # Find out which ABI we are using. 48609885543Smrg echo 'int i;' > conftest.$ac_ext 48709885543Smrg if AC_TRY_EVAL(ac_compile); then 48809885543Smrg case `/usr/bin/file conftest.$ac_objext` in 48909885543Smrg *ELF-32*) 49009885543Smrg HPUX_IA64_MODE="32" 49109885543Smrg ;; 49209885543Smrg *ELF-64*) 49309885543Smrg HPUX_IA64_MODE="64" 49409885543Smrg ;; 49509885543Smrg esac 49609885543Smrg fi 49709885543Smrg rm -rf conftest* 49809885543Smrg ;; 49909885543Smrg*-*-irix6*) 50009885543Smrg # Find out which ABI we are using. 50109885543Smrg echo '[#]line __oline__ "configure"' > conftest.$ac_ext 50209885543Smrg if AC_TRY_EVAL(ac_compile); then 50309885543Smrg if test "$lt_cv_prog_gnu_ld" = yes; then 50409885543Smrg case `/usr/bin/file conftest.$ac_objext` in 50509885543Smrg *32-bit*) 50609885543Smrg LD="${LD-ld} -melf32bsmip" 50709885543Smrg ;; 50809885543Smrg *N32*) 50909885543Smrg LD="${LD-ld} -melf32bmipn32" 51009885543Smrg ;; 51109885543Smrg *64-bit*) 51209885543Smrg LD="${LD-ld} -melf64bmip" 51309885543Smrg ;; 51409885543Smrg esac 51509885543Smrg else 51609885543Smrg case `/usr/bin/file conftest.$ac_objext` in 51709885543Smrg *32-bit*) 51809885543Smrg LD="${LD-ld} -32" 51909885543Smrg ;; 52009885543Smrg *N32*) 52109885543Smrg LD="${LD-ld} -n32" 52209885543Smrg ;; 52309885543Smrg *64-bit*) 52409885543Smrg LD="${LD-ld} -64" 52509885543Smrg ;; 52609885543Smrg esac 52709885543Smrg fi 52809885543Smrg fi 52909885543Smrg rm -rf conftest* 53009885543Smrg ;; 53109885543Smrg 53209885543Smrgx86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*) 53309885543Smrg # Find out which ABI we are using. 53409885543Smrg echo 'int i;' > conftest.$ac_ext 53509885543Smrg if AC_TRY_EVAL(ac_compile); then 53609885543Smrg case `/usr/bin/file conftest.o` in 53709885543Smrg *32-bit*) 53809885543Smrg case $host in 53909885543Smrg x86_64-*linux*) 54009885543Smrg LD="${LD-ld} -m elf_i386" 54109885543Smrg ;; 54209885543Smrg ppc64-*linux*|powerpc64-*linux*) 54309885543Smrg LD="${LD-ld} -m elf32ppclinux" 54409885543Smrg ;; 54509885543Smrg s390x-*linux*) 54609885543Smrg LD="${LD-ld} -m elf_s390" 54709885543Smrg ;; 54809885543Smrg sparc64-*linux*) 54909885543Smrg LD="${LD-ld} -m elf32_sparc" 55009885543Smrg ;; 55109885543Smrg esac 55209885543Smrg ;; 55309885543Smrg *64-bit*) 55409885543Smrg case $host in 55509885543Smrg x86_64-*linux*) 55609885543Smrg LD="${LD-ld} -m elf_x86_64" 55709885543Smrg ;; 55809885543Smrg ppc*-*linux*|powerpc*-*linux*) 55909885543Smrg LD="${LD-ld} -m elf64ppc" 56009885543Smrg ;; 56109885543Smrg s390*-*linux*) 56209885543Smrg LD="${LD-ld} -m elf64_s390" 56309885543Smrg ;; 56409885543Smrg sparc*-*linux*) 56509885543Smrg LD="${LD-ld} -m elf64_sparc" 56609885543Smrg ;; 56709885543Smrg esac 56809885543Smrg ;; 56909885543Smrg esac 57009885543Smrg fi 57109885543Smrg rm -rf conftest* 57209885543Smrg ;; 57309885543Smrg 57409885543Smrg*-*-sco3.2v5*) 57509885543Smrg # On SCO OpenServer 5, we need -belf to get full-featured binaries. 57609885543Smrg SAVE_CFLAGS="$CFLAGS" 57709885543Smrg CFLAGS="$CFLAGS -belf" 57809885543Smrg AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 57909885543Smrg [AC_LANG_PUSH(C) 58009885543Smrg AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 58109885543Smrg AC_LANG_POP]) 58209885543Smrg if test x"$lt_cv_cc_needs_belf" != x"yes"; then 58309885543Smrg # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 58409885543Smrg CFLAGS="$SAVE_CFLAGS" 58509885543Smrg fi 58609885543Smrg ;; 58709885543Smrgsparc*-*solaris*) 58809885543Smrg # Find out which ABI we are using. 58909885543Smrg echo 'int i;' > conftest.$ac_ext 59009885543Smrg if AC_TRY_EVAL(ac_compile); then 59109885543Smrg case `/usr/bin/file conftest.o` in 59209885543Smrg *64-bit*) 59309885543Smrg case $lt_cv_prog_gnu_ld in 59409885543Smrg yes*) LD="${LD-ld} -m elf64_sparc" ;; 59509885543Smrg *) LD="${LD-ld} -64" ;; 59609885543Smrg esac 59709885543Smrg ;; 59809885543Smrg esac 59909885543Smrg fi 60009885543Smrg rm -rf conftest* 60109885543Smrg ;; 60209885543Smrg 60309885543SmrgAC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], 60409885543Smrg[*-*-cygwin* | *-*-mingw* | *-*-pw32*) 60509885543Smrg AC_CHECK_TOOL(DLLTOOL, dlltool, false) 60609885543Smrg AC_CHECK_TOOL(AS, as, false) 60709885543Smrg AC_CHECK_TOOL(OBJDUMP, objdump, false) 60809885543Smrg ;; 60909885543Smrg ]) 61009885543Smrgesac 61109885543Smrg 61209885543Smrgneed_locks="$enable_libtool_lock" 61309885543Smrg 61409885543Smrg])# _LT_AC_LOCK 61509885543Smrg 61609885543Smrg 61709885543Smrg# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 61809885543Smrg# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 61909885543Smrg# ---------------------------------------------------------------- 62009885543Smrg# Check whether the given compiler option works 62109885543SmrgAC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], 62209885543Smrg[AC_REQUIRE([LT_AC_PROG_SED]) 62309885543SmrgAC_CACHE_CHECK([$1], [$2], 62409885543Smrg [$2=no 62509885543Smrg ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 62609885543Smrg printf "$lt_simple_compile_test_code" > conftest.$ac_ext 62709885543Smrg lt_compiler_flag="$3" 62809885543Smrg # Insert the option either (1) after the last *FLAGS variable, or 62909885543Smrg # (2) before a word containing "conftest.", or (3) at the end. 63009885543Smrg # Note that $ac_compile itself does not contain backslashes and begins 63109885543Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 63209885543Smrg # The option is referenced via a variable to avoid confusing sed. 63309885543Smrg lt_compile=`echo "$ac_compile" | $SED \ 63409885543Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 63509885543Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 63609885543Smrg -e 's:$: $lt_compiler_flag:'` 63709885543Smrg (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 63809885543Smrg (eval "$lt_compile" 2>conftest.err) 63909885543Smrg ac_status=$? 64009885543Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 64109885543Smrg echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 64209885543Smrg if (exit $ac_status) && test -s "$ac_outfile"; then 64309885543Smrg # The compiler can only warn and ignore the option if not recognized 64409885543Smrg # So say no if there are warnings other than the usual output. 64509885543Smrg $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp 64609885543Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 64709885543Smrg if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 64809885543Smrg $2=yes 64909885543Smrg fi 65009885543Smrg fi 65109885543Smrg $rm conftest* 65209885543Smrg]) 65309885543Smrg 65409885543Smrgif test x"[$]$2" = xyes; then 65509885543Smrg ifelse([$5], , :, [$5]) 65609885543Smrgelse 65709885543Smrg ifelse([$6], , :, [$6]) 65809885543Smrgfi 65909885543Smrg])# AC_LIBTOOL_COMPILER_OPTION 66009885543Smrg 66109885543Smrg 66209885543Smrg# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 66309885543Smrg# [ACTION-SUCCESS], [ACTION-FAILURE]) 66409885543Smrg# ------------------------------------------------------------ 66509885543Smrg# Check whether the given compiler option works 66609885543SmrgAC_DEFUN([AC_LIBTOOL_LINKER_OPTION], 66709885543Smrg[AC_CACHE_CHECK([$1], [$2], 66809885543Smrg [$2=no 66909885543Smrg save_LDFLAGS="$LDFLAGS" 67009885543Smrg LDFLAGS="$LDFLAGS $3" 67109885543Smrg printf "$lt_simple_link_test_code" > conftest.$ac_ext 67209885543Smrg if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 67309885543Smrg # The linker can only warn and ignore the option if not recognized 67409885543Smrg # So say no if there are warnings 67509885543Smrg if test -s conftest.err; then 67609885543Smrg # Append any errors to the config.log. 67709885543Smrg cat conftest.err 1>&AS_MESSAGE_LOG_FD 67809885543Smrg $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp 67909885543Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 68009885543Smrg if diff conftest.exp conftest.er2 >/dev/null; then 68109885543Smrg $2=yes 68209885543Smrg fi 68309885543Smrg else 68409885543Smrg $2=yes 68509885543Smrg fi 68609885543Smrg fi 68709885543Smrg $rm conftest* 68809885543Smrg LDFLAGS="$save_LDFLAGS" 68909885543Smrg]) 69009885543Smrg 69109885543Smrgif test x"[$]$2" = xyes; then 69209885543Smrg ifelse([$4], , :, [$4]) 69309885543Smrgelse 69409885543Smrg ifelse([$5], , :, [$5]) 69509885543Smrgfi 69609885543Smrg])# AC_LIBTOOL_LINKER_OPTION 69709885543Smrg 69809885543Smrg 69909885543Smrg# AC_LIBTOOL_SYS_MAX_CMD_LEN 70009885543Smrg# -------------------------- 70109885543SmrgAC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], 70209885543Smrg[# find the maximum length of command line arguments 70309885543SmrgAC_MSG_CHECKING([the maximum length of command line arguments]) 70409885543SmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 70509885543Smrg i=0 70609885543Smrg teststring="ABCD" 70709885543Smrg 70809885543Smrg case $build_os in 70909885543Smrg msdosdjgpp*) 71009885543Smrg # On DJGPP, this test can blow up pretty badly due to problems in libc 71109885543Smrg # (any single argument exceeding 2000 bytes causes a buffer overrun 71209885543Smrg # during glob expansion). Even if it were fixed, the result of this 71309885543Smrg # check would be larger than it should be. 71409885543Smrg lt_cv_sys_max_cmd_len=12288; # 12K is about right 71509885543Smrg ;; 71609885543Smrg 71709885543Smrg gnu*) 71809885543Smrg # Under GNU Hurd, this test is not required because there is 71909885543Smrg # no limit to the length of command line arguments. 72009885543Smrg # Libtool will interpret -1 as no limit whatsoever 72109885543Smrg lt_cv_sys_max_cmd_len=-1; 72209885543Smrg ;; 72309885543Smrg 72409885543Smrg cygwin* | mingw*) 72509885543Smrg # On Win9x/ME, this test blows up -- it succeeds, but takes 72609885543Smrg # about 5 minutes as the teststring grows exponentially. 72709885543Smrg # Worse, since 9x/ME are not pre-emptively multitasking, 72809885543Smrg # you end up with a "frozen" computer, even though with patience 72909885543Smrg # the test eventually succeeds (with a max line length of 256k). 73009885543Smrg # Instead, let's just punt: use the minimum linelength reported by 73109885543Smrg # all of the supported platforms: 8192 (on NT/2K/XP). 73209885543Smrg lt_cv_sys_max_cmd_len=8192; 73309885543Smrg ;; 73409885543Smrg 73509885543Smrg amigaos*) 73609885543Smrg # On AmigaOS with pdksh, this test takes hours, literally. 73709885543Smrg # So we just punt and use a minimum line length of 8192. 73809885543Smrg lt_cv_sys_max_cmd_len=8192; 73909885543Smrg ;; 74009885543Smrg 74109885543Smrg netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) 74209885543Smrg # This has been around since 386BSD, at least. Likely further. 74309885543Smrg if test -x /sbin/sysctl; then 74409885543Smrg lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 74509885543Smrg elif test -x /usr/sbin/sysctl; then 74609885543Smrg lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 74709885543Smrg else 74809885543Smrg lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 74909885543Smrg fi 75009885543Smrg # And add a safety zone 75109885543Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 75209885543Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 75309885543Smrg ;; 75409885543Smrg 75509885543Smrg interix*) 75609885543Smrg # We know the value 262144 and hardcode it with a safety zone (like BSD) 75709885543Smrg lt_cv_sys_max_cmd_len=196608 75809885543Smrg ;; 75909885543Smrg 76009885543Smrg osf*) 76109885543Smrg # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 76209885543Smrg # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 76309885543Smrg # nice to cause kernel panics so lets avoid the loop below. 76409885543Smrg # First set a reasonable default. 76509885543Smrg lt_cv_sys_max_cmd_len=16384 76609885543Smrg # 76709885543Smrg if test -x /sbin/sysconfig; then 76809885543Smrg case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 76909885543Smrg *1*) lt_cv_sys_max_cmd_len=-1 ;; 77009885543Smrg esac 77109885543Smrg fi 77209885543Smrg ;; 77309885543Smrg sco3.2v5*) 77409885543Smrg lt_cv_sys_max_cmd_len=102400 77509885543Smrg ;; 77609885543Smrg sysv5* | sco5v6* | sysv4.2uw2*) 77709885543Smrg kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 77809885543Smrg if test -n "$kargmax"; then 77909885543Smrg lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` 78009885543Smrg else 78109885543Smrg lt_cv_sys_max_cmd_len=32768 78209885543Smrg fi 78309885543Smrg ;; 78409885543Smrg *) 78509885543Smrg # If test is not a shell built-in, we'll probably end up computing a 78609885543Smrg # maximum length that is only half of the actual maximum length, but 78709885543Smrg # we can't tell. 78809885543Smrg SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 78909885543Smrg while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \ 79009885543Smrg = "XX$teststring") >/dev/null 2>&1 && 79109885543Smrg new_result=`expr "X$teststring" : ".*" 2>&1` && 79209885543Smrg lt_cv_sys_max_cmd_len=$new_result && 79309885543Smrg test $i != 17 # 1/2 MB should be enough 79409885543Smrg do 79509885543Smrg i=`expr $i + 1` 79609885543Smrg teststring=$teststring$teststring 79709885543Smrg done 79809885543Smrg teststring= 79909885543Smrg # Add a significant safety factor because C++ compilers can tack on massive 80009885543Smrg # amounts of additional arguments before passing them to the linker. 80109885543Smrg # It appears as though 1/2 is a usable value. 80209885543Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 80309885543Smrg ;; 80409885543Smrg esac 80509885543Smrg]) 80609885543Smrgif test -n $lt_cv_sys_max_cmd_len ; then 80709885543Smrg AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 80809885543Smrgelse 80909885543Smrg AC_MSG_RESULT(none) 81009885543Smrgfi 81109885543Smrg])# AC_LIBTOOL_SYS_MAX_CMD_LEN 81209885543Smrg 81309885543Smrg 81409885543Smrg# _LT_AC_CHECK_DLFCN 81509885543Smrg# ------------------ 81609885543SmrgAC_DEFUN([_LT_AC_CHECK_DLFCN], 81709885543Smrg[AC_CHECK_HEADERS(dlfcn.h)dnl 81809885543Smrg])# _LT_AC_CHECK_DLFCN 81909885543Smrg 82009885543Smrg 82109885543Smrg# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 82209885543Smrg# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 82309885543Smrg# --------------------------------------------------------------------- 82409885543SmrgAC_DEFUN([_LT_AC_TRY_DLOPEN_SELF], 82509885543Smrg[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl 82609885543Smrgif test "$cross_compiling" = yes; then : 82709885543Smrg [$4] 82809885543Smrgelse 82909885543Smrg lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 83009885543Smrg lt_status=$lt_dlunknown 83109885543Smrg cat > conftest.$ac_ext <<EOF 83209885543Smrg[#line __oline__ "configure" 83309885543Smrg#include "confdefs.h" 83409885543Smrg 83509885543Smrg#if HAVE_DLFCN_H 83609885543Smrg#include <dlfcn.h> 83709885543Smrg#endif 83809885543Smrg 83909885543Smrg#include <stdio.h> 84009885543Smrg 84109885543Smrg#ifdef RTLD_GLOBAL 84209885543Smrg# define LT_DLGLOBAL RTLD_GLOBAL 84309885543Smrg#else 84409885543Smrg# ifdef DL_GLOBAL 84509885543Smrg# define LT_DLGLOBAL DL_GLOBAL 84609885543Smrg# else 84709885543Smrg# define LT_DLGLOBAL 0 84809885543Smrg# endif 84909885543Smrg#endif 85009885543Smrg 85109885543Smrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 85209885543Smrg find out it does not work in some platform. */ 85309885543Smrg#ifndef LT_DLLAZY_OR_NOW 85409885543Smrg# ifdef RTLD_LAZY 85509885543Smrg# define LT_DLLAZY_OR_NOW RTLD_LAZY 85609885543Smrg# else 85709885543Smrg# ifdef DL_LAZY 85809885543Smrg# define LT_DLLAZY_OR_NOW DL_LAZY 85909885543Smrg# else 86009885543Smrg# ifdef RTLD_NOW 86109885543Smrg# define LT_DLLAZY_OR_NOW RTLD_NOW 86209885543Smrg# else 86309885543Smrg# ifdef DL_NOW 86409885543Smrg# define LT_DLLAZY_OR_NOW DL_NOW 86509885543Smrg# else 86609885543Smrg# define LT_DLLAZY_OR_NOW 0 86709885543Smrg# endif 86809885543Smrg# endif 86909885543Smrg# endif 87009885543Smrg# endif 87109885543Smrg#endif 87209885543Smrg 87309885543Smrg#ifdef __cplusplus 87409885543Smrgextern "C" void exit (int); 87509885543Smrg#endif 87609885543Smrg 87709885543Smrgvoid fnord() { int i=42;} 87809885543Smrgint main () 87909885543Smrg{ 88009885543Smrg void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 88109885543Smrg int status = $lt_dlunknown; 88209885543Smrg 88309885543Smrg if (self) 88409885543Smrg { 88509885543Smrg if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 88609885543Smrg else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 88709885543Smrg /* dlclose (self); */ 88809885543Smrg } 88909885543Smrg else 89009885543Smrg puts (dlerror ()); 89109885543Smrg 89209885543Smrg exit (status); 89309885543Smrg}] 89409885543SmrgEOF 89509885543Smrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then 89609885543Smrg (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 89709885543Smrg lt_status=$? 89809885543Smrg case x$lt_status in 89909885543Smrg x$lt_dlno_uscore) $1 ;; 90009885543Smrg x$lt_dlneed_uscore) $2 ;; 90109885543Smrg x$lt_dlunknown|x*) $3 ;; 90209885543Smrg esac 90309885543Smrg else : 90409885543Smrg # compilation failed 90509885543Smrg $3 90609885543Smrg fi 90709885543Smrgfi 90809885543Smrgrm -fr conftest* 90909885543Smrg])# _LT_AC_TRY_DLOPEN_SELF 91009885543Smrg 91109885543Smrg 91209885543Smrg# AC_LIBTOOL_DLOPEN_SELF 91309885543Smrg# ---------------------- 91409885543SmrgAC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], 91509885543Smrg[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl 91609885543Smrgif test "x$enable_dlopen" != xyes; then 91709885543Smrg enable_dlopen=unknown 91809885543Smrg enable_dlopen_self=unknown 91909885543Smrg enable_dlopen_self_static=unknown 92009885543Smrgelse 92109885543Smrg lt_cv_dlopen=no 92209885543Smrg lt_cv_dlopen_libs= 92309885543Smrg 92409885543Smrg case $host_os in 92509885543Smrg beos*) 92609885543Smrg lt_cv_dlopen="load_add_on" 92709885543Smrg lt_cv_dlopen_libs= 92809885543Smrg lt_cv_dlopen_self=yes 92909885543Smrg ;; 93009885543Smrg 93109885543Smrg mingw* | pw32*) 93209885543Smrg lt_cv_dlopen="LoadLibrary" 93309885543Smrg lt_cv_dlopen_libs= 93409885543Smrg ;; 93509885543Smrg 93609885543Smrg cygwin*) 93709885543Smrg lt_cv_dlopen="dlopen" 93809885543Smrg lt_cv_dlopen_libs= 93909885543Smrg ;; 94009885543Smrg 94109885543Smrg darwin*) 94209885543Smrg # if libdl is installed we need to link against it 94309885543Smrg AC_CHECK_LIB([dl], [dlopen], 94409885543Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ 94509885543Smrg lt_cv_dlopen="dyld" 94609885543Smrg lt_cv_dlopen_libs= 94709885543Smrg lt_cv_dlopen_self=yes 94809885543Smrg ]) 94909885543Smrg ;; 95009885543Smrg 95109885543Smrg *) 95209885543Smrg AC_CHECK_FUNC([shl_load], 95309885543Smrg [lt_cv_dlopen="shl_load"], 95409885543Smrg [AC_CHECK_LIB([dld], [shl_load], 95509885543Smrg [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"], 95609885543Smrg [AC_CHECK_FUNC([dlopen], 95709885543Smrg [lt_cv_dlopen="dlopen"], 95809885543Smrg [AC_CHECK_LIB([dl], [dlopen], 95909885543Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], 96009885543Smrg [AC_CHECK_LIB([svld], [dlopen], 96109885543Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], 96209885543Smrg [AC_CHECK_LIB([dld], [dld_link], 96309885543Smrg [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"]) 96409885543Smrg ]) 96509885543Smrg ]) 96609885543Smrg ]) 96709885543Smrg ]) 96809885543Smrg ]) 96909885543Smrg ;; 97009885543Smrg esac 97109885543Smrg 97209885543Smrg if test "x$lt_cv_dlopen" != xno; then 97309885543Smrg enable_dlopen=yes 97409885543Smrg else 97509885543Smrg enable_dlopen=no 97609885543Smrg fi 97709885543Smrg 97809885543Smrg case $lt_cv_dlopen in 97909885543Smrg dlopen) 98009885543Smrg save_CPPFLAGS="$CPPFLAGS" 98109885543Smrg test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 98209885543Smrg 98309885543Smrg save_LDFLAGS="$LDFLAGS" 98409885543Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 98509885543Smrg 98609885543Smrg save_LIBS="$LIBS" 98709885543Smrg LIBS="$lt_cv_dlopen_libs $LIBS" 98809885543Smrg 98909885543Smrg AC_CACHE_CHECK([whether a program can dlopen itself], 99009885543Smrg lt_cv_dlopen_self, [dnl 99109885543Smrg _LT_AC_TRY_DLOPEN_SELF( 99209885543Smrg lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 99309885543Smrg lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 99409885543Smrg ]) 99509885543Smrg 99609885543Smrg if test "x$lt_cv_dlopen_self" = xyes; then 99709885543Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 99809885543Smrg AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 99909885543Smrg lt_cv_dlopen_self_static, [dnl 100009885543Smrg _LT_AC_TRY_DLOPEN_SELF( 100109885543Smrg lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 100209885543Smrg lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 100309885543Smrg ]) 100409885543Smrg fi 100509885543Smrg 100609885543Smrg CPPFLAGS="$save_CPPFLAGS" 100709885543Smrg LDFLAGS="$save_LDFLAGS" 100809885543Smrg LIBS="$save_LIBS" 100909885543Smrg ;; 101009885543Smrg esac 101109885543Smrg 101209885543Smrg case $lt_cv_dlopen_self in 101309885543Smrg yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 101409885543Smrg *) enable_dlopen_self=unknown ;; 101509885543Smrg esac 101609885543Smrg 101709885543Smrg case $lt_cv_dlopen_self_static in 101809885543Smrg yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 101909885543Smrg *) enable_dlopen_self_static=unknown ;; 102009885543Smrg esac 102109885543Smrgfi 102209885543Smrg])# AC_LIBTOOL_DLOPEN_SELF 102309885543Smrg 102409885543Smrg 102509885543Smrg# AC_LIBTOOL_PROG_CC_C_O([TAGNAME]) 102609885543Smrg# --------------------------------- 102709885543Smrg# Check to see if options -c and -o are simultaneously supported by compiler 102809885543SmrgAC_DEFUN([AC_LIBTOOL_PROG_CC_C_O], 102909885543Smrg[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl 103009885543SmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 103109885543Smrg [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 103209885543Smrg [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 103309885543Smrg $rm -r conftest 2>/dev/null 103409885543Smrg mkdir conftest 103509885543Smrg cd conftest 103609885543Smrg mkdir out 103709885543Smrg printf "$lt_simple_compile_test_code" > conftest.$ac_ext 103809885543Smrg 103909885543Smrg lt_compiler_flag="-o out/conftest2.$ac_objext" 104009885543Smrg # Insert the option either (1) after the last *FLAGS variable, or 104109885543Smrg # (2) before a word containing "conftest.", or (3) at the end. 104209885543Smrg # Note that $ac_compile itself does not contain backslashes and begins 104309885543Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 104409885543Smrg lt_compile=`echo "$ac_compile" | $SED \ 104509885543Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 104609885543Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 104709885543Smrg -e 's:$: $lt_compiler_flag:'` 104809885543Smrg (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 104909885543Smrg (eval "$lt_compile" 2>out/conftest.err) 105009885543Smrg ac_status=$? 105109885543Smrg cat out/conftest.err >&AS_MESSAGE_LOG_FD 105209885543Smrg echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 105309885543Smrg if (exit $ac_status) && test -s out/conftest2.$ac_objext 105409885543Smrg then 105509885543Smrg # The compiler can only warn and ignore the option if not recognized 105609885543Smrg # So say no if there are warnings 105709885543Smrg $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp 105809885543Smrg $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 105909885543Smrg if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 106009885543Smrg _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 106109885543Smrg fi 106209885543Smrg fi 106309885543Smrg chmod u+w . 2>&AS_MESSAGE_LOG_FD 106409885543Smrg $rm conftest* 106509885543Smrg # SGI C++ compiler will create directory out/ii_files/ for 106609885543Smrg # template instantiation 106709885543Smrg test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files 106809885543Smrg $rm out/* && rmdir out 106909885543Smrg cd .. 107009885543Smrg rmdir conftest 107109885543Smrg $rm conftest* 107209885543Smrg]) 107309885543Smrg])# AC_LIBTOOL_PROG_CC_C_O 107409885543Smrg 107509885543Smrg 107609885543Smrg# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME]) 107709885543Smrg# ----------------------------------------- 107809885543Smrg# Check to see if we can do hard links to lock some files if needed 107909885543SmrgAC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], 108009885543Smrg[AC_REQUIRE([_LT_AC_LOCK])dnl 108109885543Smrg 108209885543Smrghard_links="nottested" 108309885543Smrgif test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then 108409885543Smrg # do not overwrite the value of need_locks provided by the user 108509885543Smrg AC_MSG_CHECKING([if we can lock with hard links]) 108609885543Smrg hard_links=yes 108709885543Smrg $rm conftest* 108809885543Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 108909885543Smrg touch conftest.a 109009885543Smrg ln conftest.a conftest.b 2>&5 || hard_links=no 109109885543Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 109209885543Smrg AC_MSG_RESULT([$hard_links]) 109309885543Smrg if test "$hard_links" = no; then 109409885543Smrg AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) 109509885543Smrg need_locks=warn 109609885543Smrg fi 109709885543Smrgelse 109809885543Smrg need_locks=no 109909885543Smrgfi 110009885543Smrg])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS 110109885543Smrg 110209885543Smrg 110309885543Smrg# AC_LIBTOOL_OBJDIR 110409885543Smrg# ----------------- 110509885543SmrgAC_DEFUN([AC_LIBTOOL_OBJDIR], 110609885543Smrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 110709885543Smrg[rm -f .libs 2>/dev/null 110809885543Smrgmkdir .libs 2>/dev/null 110909885543Smrgif test -d .libs; then 111009885543Smrg lt_cv_objdir=.libs 111109885543Smrgelse 111209885543Smrg # MS-DOS does not allow filenames that begin with a dot. 111309885543Smrg lt_cv_objdir=_libs 111409885543Smrgfi 111509885543Smrgrmdir .libs 2>/dev/null]) 111609885543Smrgobjdir=$lt_cv_objdir 111709885543Smrg])# AC_LIBTOOL_OBJDIR 111809885543Smrg 111909885543Smrg 112009885543Smrg# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME]) 112109885543Smrg# ---------------------------------------------- 112209885543Smrg# Check hardcoding attributes. 112309885543SmrgAC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], 112409885543Smrg[AC_MSG_CHECKING([how to hardcode library paths into programs]) 112509885543Smrg_LT_AC_TAGVAR(hardcode_action, $1)= 112609885543Smrgif test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \ 112709885543Smrg test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \ 112809885543Smrg test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then 112909885543Smrg 113009885543Smrg # We can hardcode non-existant directories. 113109885543Smrg if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no && 113209885543Smrg # If the only mechanism to avoid hardcoding is shlibpath_var, we 113309885543Smrg # have to relink, otherwise we might link with an installed library 113409885543Smrg # when we should be linking with a yet-to-be-installed one 113509885543Smrg ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no && 113609885543Smrg test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then 113709885543Smrg # Linking always hardcodes the temporary library directory. 113809885543Smrg _LT_AC_TAGVAR(hardcode_action, $1)=relink 113909885543Smrg else 114009885543Smrg # We can link without hardcoding, and we can hardcode nonexisting dirs. 114109885543Smrg _LT_AC_TAGVAR(hardcode_action, $1)=immediate 114209885543Smrg fi 114309885543Smrgelse 114409885543Smrg # We cannot hardcode anything, or else we can only hardcode existing 114509885543Smrg # directories. 114609885543Smrg _LT_AC_TAGVAR(hardcode_action, $1)=unsupported 114709885543Smrgfi 114809885543SmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)]) 114909885543Smrg 115009885543Smrgif test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then 115109885543Smrg # Fast installation is not supported 115209885543Smrg enable_fast_install=no 115309885543Smrgelif test "$shlibpath_overrides_runpath" = yes || 115409885543Smrg test "$enable_shared" = no; then 115509885543Smrg # Fast installation is not necessary 115609885543Smrg enable_fast_install=needless 115709885543Smrgfi 115809885543Smrg])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH 115909885543Smrg 116009885543Smrg 116109885543Smrg# AC_LIBTOOL_SYS_LIB_STRIP 116209885543Smrg# ------------------------ 116309885543SmrgAC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP], 116409885543Smrg[striplib= 116509885543Smrgold_striplib= 116609885543SmrgAC_MSG_CHECKING([whether stripping libraries is possible]) 116709885543Smrgif test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then 116809885543Smrg test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" 116909885543Smrg test -z "$striplib" && striplib="$STRIP --strip-unneeded" 117009885543Smrg AC_MSG_RESULT([yes]) 117109885543Smrgelse 117209885543Smrg# FIXME - insert some real tests, host_os isn't really good enough 117309885543Smrg case $host_os in 117409885543Smrg darwin*) 117509885543Smrg if test -n "$STRIP" ; then 117609885543Smrg striplib="$STRIP -x" 117709885543Smrg AC_MSG_RESULT([yes]) 117809885543Smrg else 117909885543Smrg AC_MSG_RESULT([no]) 118009885543Smrgfi 118109885543Smrg ;; 118209885543Smrg *) 118309885543Smrg AC_MSG_RESULT([no]) 118409885543Smrg ;; 118509885543Smrg esac 118609885543Smrgfi 118709885543Smrg])# AC_LIBTOOL_SYS_LIB_STRIP 118809885543Smrg 118909885543Smrg 119009885543Smrg# AC_LIBTOOL_SYS_DYNAMIC_LINKER 119109885543Smrg# ----------------------------- 119209885543Smrg# PORTME Fill in your ld.so characteristics 119309885543SmrgAC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER], 119409885543Smrg[AC_MSG_CHECKING([dynamic linker characteristics]) 119509885543Smrglibrary_names_spec= 119609885543Smrglibname_spec='lib$name' 119709885543Smrgsoname_spec= 119809885543Smrgshrext_cmds=".so" 119909885543Smrgpostinstall_cmds= 120009885543Smrgpostuninstall_cmds= 120109885543Smrgfinish_cmds= 120209885543Smrgfinish_eval= 120309885543Smrgshlibpath_var= 120409885543Smrgshlibpath_overrides_runpath=unknown 120509885543Smrgversion_type=none 120609885543Smrgdynamic_linker="$host_os ld.so" 120709885543Smrgsys_lib_dlsearch_path_spec="/lib /usr/lib" 120809885543Smrgif test "$GCC" = yes; then 120909885543Smrg sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` 121009885543Smrg if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then 121109885543Smrg # if the path contains ";" then we assume it to be the separator 121209885543Smrg # otherwise default to the standard path separator (i.e. ":") - it is 121309885543Smrg # assumed that no part of a normal pathname contains ";" but that should 121409885543Smrg # okay in the real world where ";" in dirpaths is itself problematic. 121509885543Smrg sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 121609885543Smrg else 121709885543Smrg sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 121809885543Smrg fi 121909885543Smrgelse 122009885543Smrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 122109885543Smrgfi 122209885543Smrgneed_lib_prefix=unknown 122309885543Smrghardcode_into_libs=no 122409885543Smrg 122509885543Smrg# when you set need_version to no, make sure it does not cause -set_version 122609885543Smrg# flags to be left without arguments 122709885543Smrgneed_version=unknown 122809885543Smrg 122909885543Smrgcase $host_os in 123009885543Smrgaix3*) 123109885543Smrg version_type=linux 123209885543Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' 123309885543Smrg shlibpath_var=LIBPATH 123409885543Smrg 123509885543Smrg # AIX 3 has no versioning support, so we append a major version to the name. 123609885543Smrg soname_spec='${libname}${release}${shared_ext}$major' 123709885543Smrg ;; 123809885543Smrg 123909885543Smrgaix4* | aix5*) 124009885543Smrg version_type=linux 124109885543Smrg need_lib_prefix=no 124209885543Smrg need_version=no 124309885543Smrg hardcode_into_libs=yes 124409885543Smrg if test "$host_cpu" = ia64; then 124509885543Smrg # AIX 5 supports IA64 124609885543Smrg library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' 124709885543Smrg shlibpath_var=LD_LIBRARY_PATH 124809885543Smrg else 124909885543Smrg # With GCC up to 2.95.x, collect2 would create an import file 125009885543Smrg # for dependence libraries. The import file would start with 125109885543Smrg # the line `#! .'. This would cause the generated library to 125209885543Smrg # depend on `.', always an invalid library. This was fixed in 125309885543Smrg # development snapshots of GCC prior to 3.0. 125409885543Smrg case $host_os in 125509885543Smrg aix4 | aix4.[[01]] | aix4.[[01]].*) 125609885543Smrg if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 125709885543Smrg echo ' yes ' 125809885543Smrg echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then 125909885543Smrg : 126009885543Smrg else 126109885543Smrg can_build_shared=no 126209885543Smrg fi 126309885543Smrg ;; 126409885543Smrg esac 126509885543Smrg # AIX (on Power*) has no versioning support, so currently we can not hardcode correct 126609885543Smrg # soname into executable. Probably we can add versioning support to 126709885543Smrg # collect2, so additional links can be useful in future. 126809885543Smrg if test "$aix_use_runtimelinking" = yes; then 126909885543Smrg # If using run time linking (on AIX 4.2 or later) use lib<name>.so 127009885543Smrg # instead of lib<name>.a to let people know that these are not 127109885543Smrg # typical AIX shared libraries. 127209885543Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 127309885543Smrg else 127409885543Smrg # We preserve .a as extension for shared libraries through AIX4.2 127509885543Smrg # and later when we are not doing run time linking. 127609885543Smrg library_names_spec='${libname}${release}.a $libname.a' 127709885543Smrg soname_spec='${libname}${release}${shared_ext}$major' 127809885543Smrg fi 127909885543Smrg shlibpath_var=LIBPATH 128009885543Smrg fi 128109885543Smrg ;; 128209885543Smrg 128309885543Smrgamigaos*) 128409885543Smrg library_names_spec='$libname.ixlibrary $libname.a' 128509885543Smrg # Create ${libname}_ixlibrary.a entries in /sys/libs. 128609885543Smrg 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' 128709885543Smrg ;; 128809885543Smrg 128909885543Smrgbeos*) 129009885543Smrg library_names_spec='${libname}${shared_ext}' 129109885543Smrg dynamic_linker="$host_os ld.so" 129209885543Smrg shlibpath_var=LIBRARY_PATH 129309885543Smrg ;; 129409885543Smrg 129509885543Smrgbsdi[[45]]*) 129609885543Smrg version_type=linux 129709885543Smrg need_version=no 129809885543Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 129909885543Smrg soname_spec='${libname}${release}${shared_ext}$major' 130009885543Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 130109885543Smrg shlibpath_var=LD_LIBRARY_PATH 130209885543Smrg sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 130309885543Smrg sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 130409885543Smrg # the default ld.so.conf also contains /usr/contrib/lib and 130509885543Smrg # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 130609885543Smrg # libtool to hard-code these into programs 130709885543Smrg ;; 130809885543Smrg 130909885543Smrgcygwin* | mingw* | pw32*) 131009885543Smrg version_type=windows 131109885543Smrg shrext_cmds=".dll" 131209885543Smrg need_version=no 131309885543Smrg need_lib_prefix=no 131409885543Smrg 131509885543Smrg case $GCC,$host_os in 131609885543Smrg yes,cygwin* | yes,mingw* | yes,pw32*) 131709885543Smrg library_names_spec='$libname.dll.a' 131809885543Smrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 131909885543Smrg postinstall_cmds='base_file=`basename \${file}`~ 132009885543Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ 132109885543Smrg dldir=$destdir/`dirname \$dlpath`~ 132209885543Smrg test -d \$dldir || mkdir -p \$dldir~ 132309885543Smrg $install_prog $dir/$dlname \$dldir/$dlname~ 132409885543Smrg chmod a+x \$dldir/$dlname' 132509885543Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 132609885543Smrg dlpath=$dir/\$dldll~ 132709885543Smrg $rm \$dlpath' 132809885543Smrg shlibpath_overrides_runpath=yes 132909885543Smrg 133009885543Smrg case $host_os in 133109885543Smrg cygwin*) 133209885543Smrg # Cygwin DLLs use 'cyg' prefix rather than 'lib' 133309885543Smrg soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 133409885543Smrg sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" 133509885543Smrg ;; 133609885543Smrg mingw*) 133709885543Smrg # MinGW DLLs use traditional 'lib' prefix 133809885543Smrg soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 133909885543Smrg sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` 134009885543Smrg if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then 134109885543Smrg # It is most probably a Windows format PATH printed by 134209885543Smrg # mingw gcc, but we are running on Cygwin. Gcc prints its search 134309885543Smrg # path with ; separators, and with drive letters. We can handle the 134409885543Smrg # drive letters (cygwin fileutils understands them), so leave them, 134509885543Smrg # especially as we might pass files found there to a mingw objdump, 134609885543Smrg # which wouldn't understand a cygwinified path. Ahh. 134709885543Smrg sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 134809885543Smrg else 134909885543Smrg sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 135009885543Smrg fi 135109885543Smrg ;; 135209885543Smrg pw32*) 135309885543Smrg # pw32 DLLs use 'pw' prefix rather than 'lib' 135409885543Smrg library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 135509885543Smrg ;; 135609885543Smrg esac 135709885543Smrg ;; 135809885543Smrg 135909885543Smrg *) 136009885543Smrg library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' 136109885543Smrg ;; 136209885543Smrg esac 136309885543Smrg dynamic_linker='Win32 ld.exe' 136409885543Smrg # FIXME: first we should search . and the directory the executable is in 136509885543Smrg shlibpath_var=PATH 136609885543Smrg ;; 136709885543Smrg 136809885543Smrgdarwin* | rhapsody*) 136909885543Smrg dynamic_linker="$host_os dyld" 137009885543Smrg version_type=darwin 137109885543Smrg need_lib_prefix=no 137209885543Smrg need_version=no 137309885543Smrg library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' 137409885543Smrg soname_spec='${libname}${release}${major}$shared_ext' 137509885543Smrg shlibpath_overrides_runpath=yes 137609885543Smrg shlibpath_var=DYLD_LIBRARY_PATH 137709885543Smrg shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 137809885543Smrg # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. 137909885543Smrg if test "$GCC" = yes; then 138009885543Smrg 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"` 138109885543Smrg else 138209885543Smrg sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' 138309885543Smrg fi 138409885543Smrg sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 138509885543Smrg ;; 138609885543Smrg 138709885543Smrgdgux*) 138809885543Smrg version_type=linux 138909885543Smrg need_lib_prefix=no 139009885543Smrg need_version=no 139109885543Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' 139209885543Smrg soname_spec='${libname}${release}${shared_ext}$major' 139309885543Smrg shlibpath_var=LD_LIBRARY_PATH 139409885543Smrg ;; 139509885543Smrg 139609885543Smrgfreebsd1*) 139709885543Smrg dynamic_linker=no 139809885543Smrg ;; 139909885543Smrg 140009885543Smrgfreebsd* | dragonfly*) 140109885543Smrg # DragonFly does not have aout. When/if they implement a new 140209885543Smrg # versioning mechanism, adjust this. 140309885543Smrg if test -x /usr/bin/objformat; then 140409885543Smrg objformat=`/usr/bin/objformat` 140509885543Smrg else 140609885543Smrg case $host_os in 140709885543Smrg freebsd[[123]]*) objformat=aout ;; 140809885543Smrg *) objformat=elf ;; 140909885543Smrg esac 141009885543Smrg fi 141109885543Smrg version_type=freebsd-$objformat 141209885543Smrg case $version_type in 141309885543Smrg freebsd-elf*) 141409885543Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 141509885543Smrg need_version=no 141609885543Smrg need_lib_prefix=no 141709885543Smrg ;; 141809885543Smrg freebsd-*) 141909885543Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' 142009885543Smrg need_version=yes 142109885543Smrg ;; 142209885543Smrg esac 142309885543Smrg shlibpath_var=LD_LIBRARY_PATH 142409885543Smrg case $host_os in 142509885543Smrg freebsd2*) 142609885543Smrg shlibpath_overrides_runpath=yes 142709885543Smrg ;; 142809885543Smrg freebsd3.[[01]]* | freebsdelf3.[[01]]*) 142909885543Smrg shlibpath_overrides_runpath=yes 143009885543Smrg hardcode_into_libs=yes 143109885543Smrg ;; 143209885543Smrg freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 143309885543Smrg freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 143409885543Smrg shlibpath_overrides_runpath=no 143509885543Smrg hardcode_into_libs=yes 143609885543Smrg ;; 143709885543Smrg freebsd*) # from 4.6 on 143809885543Smrg shlibpath_overrides_runpath=yes 143909885543Smrg hardcode_into_libs=yes 144009885543Smrg ;; 144109885543Smrg esac 144209885543Smrg ;; 144309885543Smrg 144409885543Smrggnu*) 144509885543Smrg version_type=linux 144609885543Smrg need_lib_prefix=no 144709885543Smrg need_version=no 144809885543Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 144909885543Smrg soname_spec='${libname}${release}${shared_ext}$major' 145009885543Smrg shlibpath_var=LD_LIBRARY_PATH 145109885543Smrg hardcode_into_libs=yes 145209885543Smrg ;; 145309885543Smrg 145409885543Smrghpux9* | hpux10* | hpux11*) 145509885543Smrg # Give a soname corresponding to the major version so that dld.sl refuses to 145609885543Smrg # link against other versions. 145709885543Smrg version_type=sunos 145809885543Smrg need_lib_prefix=no 145909885543Smrg need_version=no 146009885543Smrg case $host_cpu in 146109885543Smrg ia64*) 146209885543Smrg shrext_cmds='.so' 146309885543Smrg hardcode_into_libs=yes 146409885543Smrg dynamic_linker="$host_os dld.so" 146509885543Smrg shlibpath_var=LD_LIBRARY_PATH 146609885543Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 146709885543Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 146809885543Smrg soname_spec='${libname}${release}${shared_ext}$major' 146909885543Smrg if test "X$HPUX_IA64_MODE" = X32; then 147009885543Smrg sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 147109885543Smrg else 147209885543Smrg sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 147309885543Smrg fi 147409885543Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 147509885543Smrg ;; 147609885543Smrg hppa*64*) 147709885543Smrg shrext_cmds='.sl' 147809885543Smrg hardcode_into_libs=yes 147909885543Smrg dynamic_linker="$host_os dld.sl" 148009885543Smrg shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 148109885543Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 148209885543Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 148309885543Smrg soname_spec='${libname}${release}${shared_ext}$major' 148409885543Smrg sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 148509885543Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 148609885543Smrg ;; 148709885543Smrg *) 148809885543Smrg shrext_cmds='.sl' 148909885543Smrg dynamic_linker="$host_os dld.sl" 149009885543Smrg shlibpath_var=SHLIB_PATH 149109885543Smrg shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 149209885543Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 149309885543Smrg soname_spec='${libname}${release}${shared_ext}$major' 149409885543Smrg ;; 149509885543Smrg esac 149609885543Smrg # HP-UX runs *really* slowly unless shared libraries are mode 555. 149709885543Smrg postinstall_cmds='chmod 555 $lib' 149809885543Smrg ;; 149909885543Smrg 150009885543Smrginterix3*) 150109885543Smrg version_type=linux 150209885543Smrg need_lib_prefix=no 150309885543Smrg need_version=no 150409885543Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 150509885543Smrg soname_spec='${libname}${release}${shared_ext}$major' 150609885543Smrg dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 150709885543Smrg shlibpath_var=LD_LIBRARY_PATH 150809885543Smrg shlibpath_overrides_runpath=no 150909885543Smrg hardcode_into_libs=yes 151009885543Smrg ;; 151109885543Smrg 151209885543Smrgirix5* | irix6* | nonstopux*) 151309885543Smrg case $host_os in 151409885543Smrg nonstopux*) version_type=nonstopux ;; 151509885543Smrg *) 151609885543Smrg if test "$lt_cv_prog_gnu_ld" = yes; then 151709885543Smrg version_type=linux 151809885543Smrg else 151909885543Smrg version_type=irix 152009885543Smrg fi ;; 152109885543Smrg esac 152209885543Smrg need_lib_prefix=no 152309885543Smrg need_version=no 152409885543Smrg soname_spec='${libname}${release}${shared_ext}$major' 152509885543Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' 152609885543Smrg case $host_os in 152709885543Smrg irix5* | nonstopux*) 152809885543Smrg libsuff= shlibsuff= 152909885543Smrg ;; 153009885543Smrg *) 153109885543Smrg case $LD in # libtool.m4 will add one of these switches to LD 153209885543Smrg *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 153309885543Smrg libsuff= shlibsuff= libmagic=32-bit;; 153409885543Smrg *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 153509885543Smrg libsuff=32 shlibsuff=N32 libmagic=N32;; 153609885543Smrg *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 153709885543Smrg libsuff=64 shlibsuff=64 libmagic=64-bit;; 153809885543Smrg *) libsuff= shlibsuff= libmagic=never-match;; 153909885543Smrg esac 154009885543Smrg ;; 154109885543Smrg esac 154209885543Smrg shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 154309885543Smrg shlibpath_overrides_runpath=no 154409885543Smrg sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" 154509885543Smrg sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" 154609885543Smrg hardcode_into_libs=yes 154709885543Smrg ;; 154809885543Smrg 154909885543Smrg# No shared lib support for Linux oldld, aout, or coff. 155009885543Smrglinux*oldld* | linux*aout* | linux*coff*) 155109885543Smrg dynamic_linker=no 155209885543Smrg ;; 155309885543Smrg 155409885543Smrg# This must be Linux ELF. 155509885543Smrglinux* | k*bsd*-gnu) 155609885543Smrg version_type=linux 155709885543Smrg need_lib_prefix=no 155809885543Smrg need_version=no 155909885543Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 156009885543Smrg soname_spec='${libname}${release}${shared_ext}$major' 156109885543Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 156209885543Smrg shlibpath_var=LD_LIBRARY_PATH 156309885543Smrg shlibpath_overrides_runpath=no 156409885543Smrg # This implies no fast_install, which is unacceptable. 156509885543Smrg # Some rework will be needed to allow for fast_install 156609885543Smrg # before this can be enabled. 156709885543Smrg hardcode_into_libs=yes 156809885543Smrg 156909885543Smrg # Append ld.so.conf contents to the search path 157009885543Smrg if test -f /etc/ld.so.conf; then 157109885543Smrg 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' ' '` 157209885543Smrg sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" 157309885543Smrg fi 157409885543Smrg 157509885543Smrg # We used to test for /lib/ld.so.1 and disable shared libraries on 157609885543Smrg # powerpc, because MkLinux only supported shared libraries with the 157709885543Smrg # GNU dynamic linker. Since this was broken with cross compilers, 157809885543Smrg # most powerpc-linux boxes support dynamic linking these days and 157909885543Smrg # people can always --disable-shared, the test was removed, and we 158009885543Smrg # assume the GNU/Linux dynamic linker is in use. 158109885543Smrg dynamic_linker='GNU/Linux ld.so' 158209885543Smrg ;; 158309885543Smrg 158409885543Smrgnetbsdelf*-gnu) 158509885543Smrg version_type=linux 158609885543Smrg need_lib_prefix=no 158709885543Smrg need_version=no 158809885543Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 158909885543Smrg soname_spec='${libname}${release}${shared_ext}$major' 159009885543Smrg shlibpath_var=LD_LIBRARY_PATH 159109885543Smrg shlibpath_overrides_runpath=no 159209885543Smrg hardcode_into_libs=yes 159309885543Smrg dynamic_linker='NetBSD ld.elf_so' 159409885543Smrg ;; 159509885543Smrg 159609885543Smrgnetbsd*) 159709885543Smrg version_type=sunos 159809885543Smrg need_lib_prefix=no 159909885543Smrg need_version=no 160009885543Smrg if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then 160109885543Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 160209885543Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 160309885543Smrg dynamic_linker='NetBSD (a.out) ld.so' 160409885543Smrg else 160509885543Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 160609885543Smrg soname_spec='${libname}${release}${shared_ext}$major' 160709885543Smrg dynamic_linker='NetBSD ld.elf_so' 160809885543Smrg fi 160909885543Smrg shlibpath_var=LD_LIBRARY_PATH 161009885543Smrg shlibpath_overrides_runpath=yes 161109885543Smrg hardcode_into_libs=yes 161209885543Smrg ;; 161309885543Smrg 161409885543Smrgnewsos6) 161509885543Smrg version_type=linux 161609885543Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 161709885543Smrg shlibpath_var=LD_LIBRARY_PATH 161809885543Smrg shlibpath_overrides_runpath=yes 161909885543Smrg ;; 162009885543Smrg 162109885543Smrgnto-qnx*) 162209885543Smrg version_type=linux 162309885543Smrg need_lib_prefix=no 162409885543Smrg need_version=no 162509885543Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 162609885543Smrg soname_spec='${libname}${release}${shared_ext}$major' 162709885543Smrg shlibpath_var=LD_LIBRARY_PATH 162809885543Smrg shlibpath_overrides_runpath=yes 162909885543Smrg ;; 163009885543Smrg 163109885543Smrgopenbsd*) 163209885543Smrg version_type=sunos 163309885543Smrg sys_lib_dlsearch_path_spec="/usr/lib" 163409885543Smrg need_lib_prefix=no 163509885543Smrg # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. 163609885543Smrg case $host_os in 163709885543Smrg openbsd3.3 | openbsd3.3.*) need_version=yes ;; 163809885543Smrg *) need_version=no ;; 163909885543Smrg esac 164009885543Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 164109885543Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 164209885543Smrg shlibpath_var=LD_LIBRARY_PATH 164309885543Smrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 164409885543Smrg case $host_os in 164509885543Smrg openbsd2.[[89]] | openbsd2.[[89]].*) 164609885543Smrg shlibpath_overrides_runpath=no 164709885543Smrg ;; 164809885543Smrg *) 164909885543Smrg shlibpath_overrides_runpath=yes 165009885543Smrg ;; 165109885543Smrg esac 165209885543Smrg else 165309885543Smrg shlibpath_overrides_runpath=yes 165409885543Smrg fi 165509885543Smrg ;; 165609885543Smrg 165709885543Smrgos2*) 165809885543Smrg libname_spec='$name' 165909885543Smrg shrext_cmds=".dll" 166009885543Smrg need_lib_prefix=no 166109885543Smrg library_names_spec='$libname${shared_ext} $libname.a' 166209885543Smrg dynamic_linker='OS/2 ld.exe' 166309885543Smrg shlibpath_var=LIBPATH 166409885543Smrg ;; 166509885543Smrg 166609885543Smrgosf3* | osf4* | osf5*) 166709885543Smrg version_type=osf 166809885543Smrg need_lib_prefix=no 166909885543Smrg need_version=no 167009885543Smrg soname_spec='${libname}${release}${shared_ext}$major' 167109885543Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 167209885543Smrg shlibpath_var=LD_LIBRARY_PATH 167309885543Smrg sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 167409885543Smrg sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" 167509885543Smrg ;; 167609885543Smrg 167709885543Smrgsolaris*) 167809885543Smrg version_type=linux 167909885543Smrg need_lib_prefix=no 168009885543Smrg need_version=no 168109885543Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 168209885543Smrg soname_spec='${libname}${release}${shared_ext}$major' 168309885543Smrg shlibpath_var=LD_LIBRARY_PATH 168409885543Smrg shlibpath_overrides_runpath=yes 168509885543Smrg hardcode_into_libs=yes 168609885543Smrg # ldd complains unless libraries are executable 168709885543Smrg postinstall_cmds='chmod +x $lib' 168809885543Smrg ;; 168909885543Smrg 169009885543Smrgsunos4*) 169109885543Smrg version_type=sunos 169209885543Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 169309885543Smrg finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 169409885543Smrg shlibpath_var=LD_LIBRARY_PATH 169509885543Smrg shlibpath_overrides_runpath=yes 169609885543Smrg if test "$with_gnu_ld" = yes; then 169709885543Smrg need_lib_prefix=no 169809885543Smrg fi 169909885543Smrg need_version=yes 170009885543Smrg ;; 170109885543Smrg 170209885543Smrgsysv4 | sysv4.3*) 170309885543Smrg version_type=linux 170409885543Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 170509885543Smrg soname_spec='${libname}${release}${shared_ext}$major' 170609885543Smrg shlibpath_var=LD_LIBRARY_PATH 170709885543Smrg case $host_vendor in 170809885543Smrg sni) 170909885543Smrg shlibpath_overrides_runpath=no 171009885543Smrg need_lib_prefix=no 171109885543Smrg export_dynamic_flag_spec='${wl}-Blargedynsym' 171209885543Smrg runpath_var=LD_RUN_PATH 171309885543Smrg ;; 171409885543Smrg siemens) 171509885543Smrg need_lib_prefix=no 171609885543Smrg ;; 171709885543Smrg motorola) 171809885543Smrg need_lib_prefix=no 171909885543Smrg need_version=no 172009885543Smrg shlibpath_overrides_runpath=no 172109885543Smrg sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 172209885543Smrg ;; 172309885543Smrg esac 172409885543Smrg ;; 172509885543Smrg 172609885543Smrgsysv4*MP*) 172709885543Smrg if test -d /usr/nec ;then 172809885543Smrg version_type=linux 172909885543Smrg library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' 173009885543Smrg soname_spec='$libname${shared_ext}.$major' 173109885543Smrg shlibpath_var=LD_LIBRARY_PATH 173209885543Smrg fi 173309885543Smrg ;; 173409885543Smrg 173509885543Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 173609885543Smrg version_type=freebsd-elf 173709885543Smrg need_lib_prefix=no 173809885543Smrg need_version=no 173909885543Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 174009885543Smrg soname_spec='${libname}${release}${shared_ext}$major' 174109885543Smrg shlibpath_var=LD_LIBRARY_PATH 174209885543Smrg hardcode_into_libs=yes 174309885543Smrg if test "$with_gnu_ld" = yes; then 174409885543Smrg sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 174509885543Smrg shlibpath_overrides_runpath=no 174609885543Smrg else 174709885543Smrg sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 174809885543Smrg shlibpath_overrides_runpath=yes 174909885543Smrg case $host_os in 175009885543Smrg sco3.2v5*) 175109885543Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 175209885543Smrg ;; 175309885543Smrg esac 175409885543Smrg fi 175509885543Smrg sys_lib_dlsearch_path_spec='/usr/lib' 175609885543Smrg ;; 175709885543Smrg 175809885543Smrguts4*) 175909885543Smrg version_type=linux 176009885543Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 176109885543Smrg soname_spec='${libname}${release}${shared_ext}$major' 176209885543Smrg shlibpath_var=LD_LIBRARY_PATH 176309885543Smrg ;; 176409885543Smrg 176509885543Smrg*) 176609885543Smrg dynamic_linker=no 176709885543Smrg ;; 176809885543Smrgesac 176909885543SmrgAC_MSG_RESULT([$dynamic_linker]) 177009885543Smrgtest "$dynamic_linker" = no && can_build_shared=no 177109885543Smrg 177209885543Smrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var" 177309885543Smrgif test "$GCC" = yes; then 177409885543Smrg variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 177509885543Smrgfi 177609885543Smrg])# AC_LIBTOOL_SYS_DYNAMIC_LINKER 177709885543Smrg 177809885543Smrg 177909885543Smrg# _LT_AC_TAGCONFIG 178009885543Smrg# ---------------- 178109885543SmrgAC_DEFUN([_LT_AC_TAGCONFIG], 178209885543Smrg[AC_ARG_WITH([tags], 178309885543Smrg [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@], 178409885543Smrg [include additional configurations @<:@automatic@:>@])], 178509885543Smrg [tagnames="$withval"]) 178609885543Smrg 178709885543Smrgif test -f "$ltmain" && test -n "$tagnames"; then 178809885543Smrg if test ! -f "${ofile}"; then 178909885543Smrg AC_MSG_WARN([output file `$ofile' does not exist]) 179009885543Smrg fi 179109885543Smrg 179209885543Smrg if test -z "$LTCC"; then 179309885543Smrg eval "`$SHELL ${ofile} --config | grep '^LTCC='`" 179409885543Smrg if test -z "$LTCC"; then 179509885543Smrg AC_MSG_WARN([output file `$ofile' does not look like a libtool script]) 179609885543Smrg else 179709885543Smrg AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile']) 179809885543Smrg fi 179909885543Smrg fi 180009885543Smrg if test -z "$LTCFLAGS"; then 180109885543Smrg eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`" 180209885543Smrg fi 180309885543Smrg 180409885543Smrg # Extract list of available tagged configurations in $ofile. 180509885543Smrg # Note that this assumes the entire list is on one line. 180609885543Smrg available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` 180709885543Smrg 180809885543Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 180909885543Smrg for tagname in $tagnames; do 181009885543Smrg IFS="$lt_save_ifs" 181109885543Smrg # Check whether tagname contains only valid characters 181209885543Smrg case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in 181309885543Smrg "") ;; 181409885543Smrg *) AC_MSG_ERROR([invalid tag name: $tagname]) 181509885543Smrg ;; 181609885543Smrg esac 181709885543Smrg 181809885543Smrg if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null 181909885543Smrg then 182009885543Smrg AC_MSG_ERROR([tag name \"$tagname\" already exists]) 182109885543Smrg fi 182209885543Smrg 182309885543Smrg # Update the list of available tags. 182409885543Smrg if test -n "$tagname"; then 182509885543Smrg echo appending configuration tag \"$tagname\" to $ofile 182609885543Smrg 182709885543Smrg case $tagname in 182809885543Smrg CXX) 182909885543Smrg if test -n "$CXX" && ( test "X$CXX" != "Xno" && 183009885543Smrg ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || 183109885543Smrg (test "X$CXX" != "Xg++"))) ; then 183209885543Smrg AC_LIBTOOL_LANG_CXX_CONFIG 183309885543Smrg else 183409885543Smrg tagname="" 183509885543Smrg fi 183609885543Smrg ;; 183709885543Smrg 183809885543Smrg F77) 183909885543Smrg if test -n "$F77" && test "X$F77" != "Xno"; then 184009885543Smrg AC_LIBTOOL_LANG_F77_CONFIG 184109885543Smrg else 184209885543Smrg tagname="" 184309885543Smrg fi 184409885543Smrg ;; 184509885543Smrg 184609885543Smrg GCJ) 184709885543Smrg if test -n "$GCJ" && test "X$GCJ" != "Xno"; then 184809885543Smrg AC_LIBTOOL_LANG_GCJ_CONFIG 184909885543Smrg else 185009885543Smrg tagname="" 185109885543Smrg fi 185209885543Smrg ;; 185309885543Smrg 185409885543Smrg RC) 185509885543Smrg AC_LIBTOOL_LANG_RC_CONFIG 185609885543Smrg ;; 185709885543Smrg 185809885543Smrg *) 185909885543Smrg AC_MSG_ERROR([Unsupported tag name: $tagname]) 186009885543Smrg ;; 186109885543Smrg esac 186209885543Smrg 186309885543Smrg # Append the new tag name to the list of available tags. 186409885543Smrg if test -n "$tagname" ; then 186509885543Smrg available_tags="$available_tags $tagname" 186609885543Smrg fi 186709885543Smrg fi 186809885543Smrg done 186909885543Smrg IFS="$lt_save_ifs" 187009885543Smrg 187109885543Smrg # Now substitute the updated list of available tags. 187209885543Smrg if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then 187309885543Smrg mv "${ofile}T" "$ofile" 187409885543Smrg chmod +x "$ofile" 187509885543Smrg else 187609885543Smrg rm -f "${ofile}T" 187709885543Smrg AC_MSG_ERROR([unable to update list of available tagged configurations.]) 187809885543Smrg fi 187909885543Smrgfi 188009885543Smrg])# _LT_AC_TAGCONFIG 188109885543Smrg 188209885543Smrg 188309885543Smrg# AC_LIBTOOL_DLOPEN 188409885543Smrg# ----------------- 188509885543Smrg# enable checks for dlopen support 188609885543SmrgAC_DEFUN([AC_LIBTOOL_DLOPEN], 188709885543Smrg [AC_BEFORE([$0],[AC_LIBTOOL_SETUP]) 188809885543Smrg])# AC_LIBTOOL_DLOPEN 188909885543Smrg 189009885543Smrg 189109885543Smrg# AC_LIBTOOL_WIN32_DLL 189209885543Smrg# -------------------- 189309885543Smrg# declare package support for building win32 DLLs 189409885543SmrgAC_DEFUN([AC_LIBTOOL_WIN32_DLL], 189509885543Smrg[AC_BEFORE([$0], [AC_LIBTOOL_SETUP]) 189609885543Smrg])# AC_LIBTOOL_WIN32_DLL 189709885543Smrg 189809885543Smrg 189909885543Smrg# AC_ENABLE_SHARED([DEFAULT]) 190009885543Smrg# --------------------------- 190109885543Smrg# implement the --enable-shared flag 190209885543Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 190309885543SmrgAC_DEFUN([AC_ENABLE_SHARED], 190409885543Smrg[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl 190509885543SmrgAC_ARG_ENABLE([shared], 190609885543Smrg [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 190709885543Smrg [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])], 190809885543Smrg [p=${PACKAGE-default} 190909885543Smrg case $enableval in 191009885543Smrg yes) enable_shared=yes ;; 191109885543Smrg no) enable_shared=no ;; 191209885543Smrg *) 191309885543Smrg enable_shared=no 191409885543Smrg # Look at the argument we got. We use all the common list separators. 191509885543Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 191609885543Smrg for pkg in $enableval; do 191709885543Smrg IFS="$lt_save_ifs" 191809885543Smrg if test "X$pkg" = "X$p"; then 191909885543Smrg enable_shared=yes 192009885543Smrg fi 192109885543Smrg done 192209885543Smrg IFS="$lt_save_ifs" 192309885543Smrg ;; 192409885543Smrg esac], 192509885543Smrg [enable_shared=]AC_ENABLE_SHARED_DEFAULT) 192609885543Smrg])# AC_ENABLE_SHARED 192709885543Smrg 192809885543Smrg 192909885543Smrg# AC_DISABLE_SHARED 193009885543Smrg# ----------------- 193109885543Smrg# set the default shared flag to --disable-shared 193209885543SmrgAC_DEFUN([AC_DISABLE_SHARED], 193309885543Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 193409885543SmrgAC_ENABLE_SHARED(no) 193509885543Smrg])# AC_DISABLE_SHARED 193609885543Smrg 193709885543Smrg 193809885543Smrg# AC_ENABLE_STATIC([DEFAULT]) 193909885543Smrg# --------------------------- 194009885543Smrg# implement the --enable-static flag 194109885543Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 194209885543SmrgAC_DEFUN([AC_ENABLE_STATIC], 194309885543Smrg[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl 194409885543SmrgAC_ARG_ENABLE([static], 194509885543Smrg [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@], 194609885543Smrg [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])], 194709885543Smrg [p=${PACKAGE-default} 194809885543Smrg case $enableval in 194909885543Smrg yes) enable_static=yes ;; 195009885543Smrg no) enable_static=no ;; 195109885543Smrg *) 195209885543Smrg enable_static=no 195309885543Smrg # Look at the argument we got. We use all the common list separators. 195409885543Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 195509885543Smrg for pkg in $enableval; do 195609885543Smrg IFS="$lt_save_ifs" 195709885543Smrg if test "X$pkg" = "X$p"; then 195809885543Smrg enable_static=yes 195909885543Smrg fi 196009885543Smrg done 196109885543Smrg IFS="$lt_save_ifs" 196209885543Smrg ;; 196309885543Smrg esac], 196409885543Smrg [enable_static=]AC_ENABLE_STATIC_DEFAULT) 196509885543Smrg])# AC_ENABLE_STATIC 196609885543Smrg 196709885543Smrg 196809885543Smrg# AC_DISABLE_STATIC 196909885543Smrg# ----------------- 197009885543Smrg# set the default static flag to --disable-static 197109885543SmrgAC_DEFUN([AC_DISABLE_STATIC], 197209885543Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 197309885543SmrgAC_ENABLE_STATIC(no) 197409885543Smrg])# AC_DISABLE_STATIC 197509885543Smrg 197609885543Smrg 197709885543Smrg# AC_ENABLE_FAST_INSTALL([DEFAULT]) 197809885543Smrg# --------------------------------- 197909885543Smrg# implement the --enable-fast-install flag 198009885543Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 198109885543SmrgAC_DEFUN([AC_ENABLE_FAST_INSTALL], 198209885543Smrg[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl 198309885543SmrgAC_ARG_ENABLE([fast-install], 198409885543Smrg [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 198509885543Smrg [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 198609885543Smrg [p=${PACKAGE-default} 198709885543Smrg case $enableval in 198809885543Smrg yes) enable_fast_install=yes ;; 198909885543Smrg no) enable_fast_install=no ;; 199009885543Smrg *) 199109885543Smrg enable_fast_install=no 199209885543Smrg # Look at the argument we got. We use all the common list separators. 199309885543Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 199409885543Smrg for pkg in $enableval; do 199509885543Smrg IFS="$lt_save_ifs" 199609885543Smrg if test "X$pkg" = "X$p"; then 199709885543Smrg enable_fast_install=yes 199809885543Smrg fi 199909885543Smrg done 200009885543Smrg IFS="$lt_save_ifs" 200109885543Smrg ;; 200209885543Smrg esac], 200309885543Smrg [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT) 200409885543Smrg])# AC_ENABLE_FAST_INSTALL 200509885543Smrg 200609885543Smrg 200709885543Smrg# AC_DISABLE_FAST_INSTALL 200809885543Smrg# ----------------------- 200909885543Smrg# set the default to --disable-fast-install 201009885543SmrgAC_DEFUN([AC_DISABLE_FAST_INSTALL], 201109885543Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 201209885543SmrgAC_ENABLE_FAST_INSTALL(no) 201309885543Smrg])# AC_DISABLE_FAST_INSTALL 201409885543Smrg 201509885543Smrg 201609885543Smrg# AC_LIBTOOL_PICMODE([MODE]) 201709885543Smrg# -------------------------- 201809885543Smrg# implement the --with-pic flag 201909885543Smrg# MODE is either `yes' or `no'. If omitted, it defaults to `both'. 202009885543SmrgAC_DEFUN([AC_LIBTOOL_PICMODE], 202109885543Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 202209885543Smrgpic_mode=ifelse($#,1,$1,default) 202309885543Smrg])# AC_LIBTOOL_PICMODE 202409885543Smrg 202509885543Smrg 202609885543Smrg# AC_PROG_EGREP 202709885543Smrg# ------------- 202809885543Smrg# This is predefined starting with Autoconf 2.54, so this conditional 202909885543Smrg# definition can be removed once we require Autoconf 2.54 or later. 203009885543Smrgm4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP], 203109885543Smrg[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep], 203209885543Smrg [if echo a | (grep -E '(a|b)') >/dev/null 2>&1 203309885543Smrg then ac_cv_prog_egrep='grep -E' 203409885543Smrg else ac_cv_prog_egrep='egrep' 203509885543Smrg fi]) 203609885543Smrg EGREP=$ac_cv_prog_egrep 203709885543Smrg AC_SUBST([EGREP]) 203809885543Smrg])]) 203909885543Smrg 204009885543Smrg 204109885543Smrg# AC_PATH_TOOL_PREFIX 204209885543Smrg# ------------------- 204309885543Smrg# find a file program which can recognise shared library 204409885543SmrgAC_DEFUN([AC_PATH_TOOL_PREFIX], 204509885543Smrg[AC_REQUIRE([AC_PROG_EGREP])dnl 204609885543SmrgAC_MSG_CHECKING([for $1]) 204709885543SmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 204809885543Smrg[case $MAGIC_CMD in 204909885543Smrg[[\\/*] | ?:[\\/]*]) 205009885543Smrg lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. 205109885543Smrg ;; 205209885543Smrg*) 205309885543Smrg lt_save_MAGIC_CMD="$MAGIC_CMD" 205409885543Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 205509885543Smrgdnl $ac_dummy forces splitting on constant user-supplied paths. 205609885543Smrgdnl POSIX.2 word splitting is done only on the output of word expansions, 205709885543Smrgdnl not every word. This closes a longstanding sh security hole. 205809885543Smrg ac_dummy="ifelse([$2], , $PATH, [$2])" 205909885543Smrg for ac_dir in $ac_dummy; do 206009885543Smrg IFS="$lt_save_ifs" 206109885543Smrg test -z "$ac_dir" && ac_dir=. 206209885543Smrg if test -f $ac_dir/$1; then 206309885543Smrg lt_cv_path_MAGIC_CMD="$ac_dir/$1" 206409885543Smrg if test -n "$file_magic_test_file"; then 206509885543Smrg case $deplibs_check_method in 206609885543Smrg "file_magic "*) 206709885543Smrg file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 206809885543Smrg MAGIC_CMD="$lt_cv_path_MAGIC_CMD" 206909885543Smrg if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 207009885543Smrg $EGREP "$file_magic_regex" > /dev/null; then 207109885543Smrg : 207209885543Smrg else 207309885543Smrg cat <<EOF 1>&2 207409885543Smrg 207509885543Smrg*** Warning: the command libtool uses to detect shared libraries, 207609885543Smrg*** $file_magic_cmd, produces output that libtool cannot recognize. 207709885543Smrg*** The result is that libtool may fail to recognize shared libraries 207809885543Smrg*** as such. This will affect the creation of libtool libraries that 207909885543Smrg*** depend on shared libraries, but programs linked with such libtool 208009885543Smrg*** libraries will work regardless of this problem. Nevertheless, you 208109885543Smrg*** may want to report the problem to your system manager and/or to 208209885543Smrg*** bug-libtool@gnu.org 208309885543Smrg 208409885543SmrgEOF 208509885543Smrg fi ;; 208609885543Smrg esac 208709885543Smrg fi 208809885543Smrg break 208909885543Smrg fi 209009885543Smrg done 209109885543Smrg IFS="$lt_save_ifs" 209209885543Smrg MAGIC_CMD="$lt_save_MAGIC_CMD" 209309885543Smrg ;; 209409885543Smrgesac]) 209509885543SmrgMAGIC_CMD="$lt_cv_path_MAGIC_CMD" 209609885543Smrgif test -n "$MAGIC_CMD"; then 209709885543Smrg AC_MSG_RESULT($MAGIC_CMD) 209809885543Smrgelse 209909885543Smrg AC_MSG_RESULT(no) 210009885543Smrgfi 210109885543Smrg])# AC_PATH_TOOL_PREFIX 210209885543Smrg 210309885543Smrg 210409885543Smrg# AC_PATH_MAGIC 210509885543Smrg# ------------- 210609885543Smrg# find a file program which can recognise a shared library 210709885543SmrgAC_DEFUN([AC_PATH_MAGIC], 210809885543Smrg[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 210909885543Smrgif test -z "$lt_cv_path_MAGIC_CMD"; then 211009885543Smrg if test -n "$ac_tool_prefix"; then 211109885543Smrg AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 211209885543Smrg else 211309885543Smrg MAGIC_CMD=: 211409885543Smrg fi 211509885543Smrgfi 211609885543Smrg])# AC_PATH_MAGIC 211709885543Smrg 211809885543Smrg 211909885543Smrg# AC_PROG_LD 212009885543Smrg# ---------- 212109885543Smrg# find the pathname to the GNU or non-GNU linker 212209885543SmrgAC_DEFUN([AC_PROG_LD], 212309885543Smrg[AC_ARG_WITH([gnu-ld], 212409885543Smrg [AC_HELP_STRING([--with-gnu-ld], 212509885543Smrg [assume the C compiler uses GNU ld @<:@default=no@:>@])], 212609885543Smrg [test "$withval" = no || with_gnu_ld=yes], 212709885543Smrg [with_gnu_ld=no]) 212809885543SmrgAC_REQUIRE([LT_AC_PROG_SED])dnl 212909885543SmrgAC_REQUIRE([AC_PROG_CC])dnl 213009885543SmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 213109885543SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 213209885543Smrgac_prog=ld 213309885543Smrgif test "$GCC" = yes; then 213409885543Smrg # Check if gcc -print-prog-name=ld gives a path. 213509885543Smrg AC_MSG_CHECKING([for ld used by $CC]) 213609885543Smrg case $host in 213709885543Smrg *-*-mingw*) 213809885543Smrg # gcc leaves a trailing carriage return which upsets mingw 213909885543Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 214009885543Smrg *) 214109885543Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 214209885543Smrg esac 214309885543Smrg case $ac_prog in 214409885543Smrg # Accept absolute paths. 214509885543Smrg [[\\/]]* | ?:[[\\/]]*) 214609885543Smrg re_direlt='/[[^/]][[^/]]*/\.\./' 214709885543Smrg # Canonicalize the pathname of ld 214809885543Smrg ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` 214909885543Smrg while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do 215009885543Smrg ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` 215109885543Smrg done 215209885543Smrg test -z "$LD" && LD="$ac_prog" 215309885543Smrg ;; 215409885543Smrg "") 215509885543Smrg # If it fails, then pretend we aren't using GCC. 215609885543Smrg ac_prog=ld 215709885543Smrg ;; 215809885543Smrg *) 215909885543Smrg # If it is relative, then search for the first ld in PATH. 216009885543Smrg with_gnu_ld=unknown 216109885543Smrg ;; 216209885543Smrg esac 216309885543Smrgelif test "$with_gnu_ld" = yes; then 216409885543Smrg AC_MSG_CHECKING([for GNU ld]) 216509885543Smrgelse 216609885543Smrg AC_MSG_CHECKING([for non-GNU ld]) 216709885543Smrgfi 216809885543SmrgAC_CACHE_VAL(lt_cv_path_LD, 216909885543Smrg[if test -z "$LD"; then 217009885543Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 217109885543Smrg for ac_dir in $PATH; do 217209885543Smrg IFS="$lt_save_ifs" 217309885543Smrg test -z "$ac_dir" && ac_dir=. 217409885543Smrg if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 217509885543Smrg lt_cv_path_LD="$ac_dir/$ac_prog" 217609885543Smrg # Check to see if the program is GNU ld. I'd rather use --version, 217709885543Smrg # but apparently some variants of GNU ld only accept -v. 217809885543Smrg # Break only if it was the GNU/non-GNU ld that we prefer. 217909885543Smrg case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 218009885543Smrg *GNU* | *'with BFD'*) 218109885543Smrg test "$with_gnu_ld" != no && break 218209885543Smrg ;; 218309885543Smrg *) 218409885543Smrg test "$with_gnu_ld" != yes && break 218509885543Smrg ;; 218609885543Smrg esac 218709885543Smrg fi 218809885543Smrg done 218909885543Smrg IFS="$lt_save_ifs" 219009885543Smrgelse 219109885543Smrg lt_cv_path_LD="$LD" # Let the user override the test with a path. 219209885543Smrgfi]) 219309885543SmrgLD="$lt_cv_path_LD" 219409885543Smrgif test -n "$LD"; then 219509885543Smrg AC_MSG_RESULT($LD) 219609885543Smrgelse 219709885543Smrg AC_MSG_RESULT(no) 219809885543Smrgfi 219909885543Smrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 220009885543SmrgAC_PROG_LD_GNU 220109885543Smrg])# AC_PROG_LD 220209885543Smrg 220309885543Smrg 220409885543Smrg# AC_PROG_LD_GNU 220509885543Smrg# -------------- 220609885543SmrgAC_DEFUN([AC_PROG_LD_GNU], 220709885543Smrg[AC_REQUIRE([AC_PROG_EGREP])dnl 220809885543SmrgAC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 220909885543Smrg[# I'd rather use --version here, but apparently some GNU lds only accept -v. 221009885543Smrgcase `$LD -v 2>&1 </dev/null` in 221109885543Smrg*GNU* | *'with BFD'*) 221209885543Smrg lt_cv_prog_gnu_ld=yes 221309885543Smrg ;; 221409885543Smrg*) 221509885543Smrg lt_cv_prog_gnu_ld=no 221609885543Smrg ;; 221709885543Smrgesac]) 221809885543Smrgwith_gnu_ld=$lt_cv_prog_gnu_ld 221909885543Smrg])# AC_PROG_LD_GNU 222009885543Smrg 222109885543Smrg 222209885543Smrg# AC_PROG_LD_RELOAD_FLAG 222309885543Smrg# ---------------------- 222409885543Smrg# find reload flag for linker 222509885543Smrg# -- PORTME Some linkers may need a different reload flag. 222609885543SmrgAC_DEFUN([AC_PROG_LD_RELOAD_FLAG], 222709885543Smrg[AC_CACHE_CHECK([for $LD option to reload object files], 222809885543Smrg lt_cv_ld_reload_flag, 222909885543Smrg [lt_cv_ld_reload_flag='-r']) 223009885543Smrgreload_flag=$lt_cv_ld_reload_flag 223109885543Smrgcase $reload_flag in 223209885543Smrg"" | " "*) ;; 223309885543Smrg*) reload_flag=" $reload_flag" ;; 223409885543Smrgesac 223509885543Smrgreload_cmds='$LD$reload_flag -o $output$reload_objs' 223609885543Smrgcase $host_os in 223709885543Smrg darwin*) 223809885543Smrg if test "$GCC" = yes; then 223909885543Smrg reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' 224009885543Smrg else 224109885543Smrg reload_cmds='$LD$reload_flag -o $output$reload_objs' 224209885543Smrg fi 224309885543Smrg ;; 224409885543Smrgesac 224509885543Smrg])# AC_PROG_LD_RELOAD_FLAG 224609885543Smrg 224709885543Smrg 224809885543Smrg# AC_DEPLIBS_CHECK_METHOD 224909885543Smrg# ----------------------- 225009885543Smrg# how to check for library dependencies 225109885543Smrg# -- PORTME fill in with the dynamic library characteristics 225209885543SmrgAC_DEFUN([AC_DEPLIBS_CHECK_METHOD], 225309885543Smrg[AC_CACHE_CHECK([how to recognise dependent libraries], 225409885543Smrglt_cv_deplibs_check_method, 225509885543Smrg[lt_cv_file_magic_cmd='$MAGIC_CMD' 225609885543Smrglt_cv_file_magic_test_file= 225709885543Smrglt_cv_deplibs_check_method='unknown' 225809885543Smrg# Need to set the preceding variable on all platforms that support 225909885543Smrg# interlibrary dependencies. 226009885543Smrg# 'none' -- dependencies not supported. 226109885543Smrg# `unknown' -- same as none, but documents that we really don't know. 226209885543Smrg# 'pass_all' -- all dependencies passed with no checks. 226309885543Smrg# 'test_compile' -- check by making test program. 226409885543Smrg# 'file_magic [[regex]]' -- check by looking for files in library path 226509885543Smrg# which responds to the $file_magic_cmd with a given extended regex. 226609885543Smrg# If you have `file' or equivalent on your system and you're not sure 226709885543Smrg# whether `pass_all' will *always* work, you probably want this one. 226809885543Smrg 226909885543Smrgcase $host_os in 227009885543Smrgaix4* | aix5*) 227109885543Smrg lt_cv_deplibs_check_method=pass_all 227209885543Smrg ;; 227309885543Smrg 227409885543Smrgbeos*) 227509885543Smrg lt_cv_deplibs_check_method=pass_all 227609885543Smrg ;; 227709885543Smrg 227809885543Smrgbsdi[[45]]*) 227909885543Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 228009885543Smrg lt_cv_file_magic_cmd='/usr/bin/file -L' 228109885543Smrg lt_cv_file_magic_test_file=/shlib/libc.so 228209885543Smrg ;; 228309885543Smrg 228409885543Smrgcygwin*) 228509885543Smrg # func_win32_libid is a shell function defined in ltmain.sh 228609885543Smrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 228709885543Smrg lt_cv_file_magic_cmd='func_win32_libid' 228809885543Smrg ;; 228909885543Smrg 229009885543Smrgmingw* | pw32*) 229109885543Smrg # Base MSYS/MinGW do not provide the 'file' command needed by 229209885543Smrg # func_win32_libid shell function, so use a weaker test based on 'objdump'. 229309885543Smrg lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' 229409885543Smrg lt_cv_file_magic_cmd='$OBJDUMP -f' 229509885543Smrg ;; 229609885543Smrg 229709885543Smrgdarwin* | rhapsody*) 229809885543Smrg lt_cv_deplibs_check_method=pass_all 229909885543Smrg ;; 230009885543Smrg 230109885543Smrgfreebsd* | dragonfly*) 230209885543Smrg if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then 230309885543Smrg case $host_cpu in 230409885543Smrg i*86 ) 230509885543Smrg # Not sure whether the presence of OpenBSD here was a mistake. 230609885543Smrg # Let's accept both of them until this is cleared up. 230709885543Smrg lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 230809885543Smrg lt_cv_file_magic_cmd=/usr/bin/file 230909885543Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 231009885543Smrg ;; 231109885543Smrg esac 231209885543Smrg else 231309885543Smrg lt_cv_deplibs_check_method=pass_all 231409885543Smrg fi 231509885543Smrg ;; 231609885543Smrg 231709885543Smrggnu*) 231809885543Smrg lt_cv_deplibs_check_method=pass_all 231909885543Smrg ;; 232009885543Smrg 232109885543Smrghpux10.20* | hpux11*) 232209885543Smrg lt_cv_file_magic_cmd=/usr/bin/file 232309885543Smrg case $host_cpu in 232409885543Smrg ia64*) 232509885543Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 232609885543Smrg lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 232709885543Smrg ;; 232809885543Smrg hppa*64*) 232909885543Smrg [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]'] 233009885543Smrg lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 233109885543Smrg ;; 233209885543Smrg *) 233309885543Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' 233409885543Smrg lt_cv_file_magic_test_file=/usr/lib/libc.sl 233509885543Smrg ;; 233609885543Smrg esac 233709885543Smrg ;; 233809885543Smrg 233909885543Smrginterix3*) 234009885543Smrg # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 234109885543Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 234209885543Smrg ;; 234309885543Smrg 234409885543Smrgirix5* | irix6* | nonstopux*) 234509885543Smrg case $LD in 234609885543Smrg *-32|*"-32 ") libmagic=32-bit;; 234709885543Smrg *-n32|*"-n32 ") libmagic=N32;; 234809885543Smrg *-64|*"-64 ") libmagic=64-bit;; 234909885543Smrg *) libmagic=never-match;; 235009885543Smrg esac 235109885543Smrg lt_cv_deplibs_check_method=pass_all 235209885543Smrg ;; 235309885543Smrg 235409885543Smrg# This must be Linux ELF. 235509885543Smrglinux* | k*bsd*-gnu) 235609885543Smrg lt_cv_deplibs_check_method=pass_all 235709885543Smrg ;; 235809885543Smrg 235909885543Smrgnetbsd* | netbsdelf*-gnu) 236009885543Smrg if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then 236109885543Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 236209885543Smrg else 236309885543Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 236409885543Smrg fi 236509885543Smrg ;; 236609885543Smrg 236709885543Smrgnewos6*) 236809885543Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 236909885543Smrg lt_cv_file_magic_cmd=/usr/bin/file 237009885543Smrg lt_cv_file_magic_test_file=/usr/lib/libnls.so 237109885543Smrg ;; 237209885543Smrg 237309885543Smrgnto-qnx*) 237409885543Smrg lt_cv_deplibs_check_method=unknown 237509885543Smrg ;; 237609885543Smrg 237709885543Smrgopenbsd*) 237809885543Smrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 237909885543Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 238009885543Smrg else 238109885543Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 238209885543Smrg fi 238309885543Smrg ;; 238409885543Smrg 238509885543Smrgosf3* | osf4* | osf5*) 238609885543Smrg lt_cv_deplibs_check_method=pass_all 238709885543Smrg ;; 238809885543Smrg 238909885543Smrgsolaris*) 239009885543Smrg lt_cv_deplibs_check_method=pass_all 239109885543Smrg ;; 239209885543Smrg 239309885543Smrgsysv4 | sysv4.3*) 239409885543Smrg case $host_vendor in 239509885543Smrg motorola) 239609885543Smrg 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]]' 239709885543Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 239809885543Smrg ;; 239909885543Smrg ncr) 240009885543Smrg lt_cv_deplibs_check_method=pass_all 240109885543Smrg ;; 240209885543Smrg sequent) 240309885543Smrg lt_cv_file_magic_cmd='/bin/file' 240409885543Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 240509885543Smrg ;; 240609885543Smrg sni) 240709885543Smrg lt_cv_file_magic_cmd='/bin/file' 240809885543Smrg lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 240909885543Smrg lt_cv_file_magic_test_file=/lib/libc.so 241009885543Smrg ;; 241109885543Smrg siemens) 241209885543Smrg lt_cv_deplibs_check_method=pass_all 241309885543Smrg ;; 241409885543Smrg pc) 241509885543Smrg lt_cv_deplibs_check_method=pass_all 241609885543Smrg ;; 241709885543Smrg esac 241809885543Smrg ;; 241909885543Smrg 242009885543Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 242109885543Smrg lt_cv_deplibs_check_method=pass_all 242209885543Smrg ;; 242309885543Smrgesac 242409885543Smrg]) 242509885543Smrgfile_magic_cmd=$lt_cv_file_magic_cmd 242609885543Smrgdeplibs_check_method=$lt_cv_deplibs_check_method 242709885543Smrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown 242809885543Smrg])# AC_DEPLIBS_CHECK_METHOD 242909885543Smrg 243009885543Smrg 243109885543Smrg# AC_PROG_NM 243209885543Smrg# ---------- 243309885543Smrg# find the pathname to a BSD-compatible name lister 243409885543SmrgAC_DEFUN([AC_PROG_NM], 243509885543Smrg[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM, 243609885543Smrg[if test -n "$NM"; then 243709885543Smrg # Let the user override the test. 243809885543Smrg lt_cv_path_NM="$NM" 243909885543Smrgelse 244009885543Smrg lt_nm_to_check="${ac_tool_prefix}nm" 244109885543Smrg if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 244209885543Smrg lt_nm_to_check="$lt_nm_to_check nm" 244309885543Smrg fi 244409885543Smrg for lt_tmp_nm in $lt_nm_to_check; do 244509885543Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 244609885543Smrg for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 244709885543Smrg IFS="$lt_save_ifs" 244809885543Smrg test -z "$ac_dir" && ac_dir=. 244909885543Smrg tmp_nm="$ac_dir/$lt_tmp_nm" 245009885543Smrg if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then 245109885543Smrg # Check to see if the nm accepts a BSD-compat flag. 245209885543Smrg # Adding the `sed 1q' prevents false positives on HP-UX, which says: 245309885543Smrg # nm: unknown option "B" ignored 245409885543Smrg # Tru64's nm complains that /dev/null is an invalid object file 245509885543Smrg case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in 245609885543Smrg */dev/null* | *'Invalid file or object type'*) 245709885543Smrg lt_cv_path_NM="$tmp_nm -B" 245809885543Smrg break 245909885543Smrg ;; 246009885543Smrg *) 246109885543Smrg case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in 246209885543Smrg */dev/null*) 246309885543Smrg lt_cv_path_NM="$tmp_nm -p" 246409885543Smrg break 246509885543Smrg ;; 246609885543Smrg *) 246709885543Smrg lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 246809885543Smrg continue # so that we can try to find one that supports BSD flags 246909885543Smrg ;; 247009885543Smrg esac 247109885543Smrg ;; 247209885543Smrg esac 247309885543Smrg fi 247409885543Smrg done 247509885543Smrg IFS="$lt_save_ifs" 247609885543Smrg done 247709885543Smrg test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm 247809885543Smrgfi]) 247909885543SmrgNM="$lt_cv_path_NM" 248009885543Smrg])# AC_PROG_NM 248109885543Smrg 248209885543Smrg 248309885543Smrg# AC_CHECK_LIBM 248409885543Smrg# ------------- 248509885543Smrg# check for math library 248609885543SmrgAC_DEFUN([AC_CHECK_LIBM], 248709885543Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 248809885543SmrgLIBM= 248909885543Smrgcase $host in 249009885543Smrg*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) 249109885543Smrg # These system don't have libm, or don't need it 249209885543Smrg ;; 249309885543Smrg*-ncr-sysv4.3*) 249409885543Smrg AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") 249509885543Smrg AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 249609885543Smrg ;; 249709885543Smrg*) 249809885543Smrg AC_CHECK_LIB(m, cos, LIBM="-lm") 249909885543Smrg ;; 250009885543Smrgesac 250109885543Smrg])# AC_CHECK_LIBM 250209885543Smrg 250309885543Smrg 250409885543Smrg# AC_LIBLTDL_CONVENIENCE([DIRECTORY]) 250509885543Smrg# ----------------------------------- 250609885543Smrg# sets LIBLTDL to the link flags for the libltdl convenience library and 250709885543Smrg# LTDLINCL to the include flags for the libltdl header and adds 250809885543Smrg# --enable-ltdl-convenience to the configure arguments. Note that 250909885543Smrg# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, 251009885543Smrg# it is assumed to be `libltdl'. LIBLTDL will be prefixed with 251109885543Smrg# '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/' 251209885543Smrg# (note the single quotes!). If your package is not flat and you're not 251309885543Smrg# using automake, define top_builddir and top_srcdir appropriately in 251409885543Smrg# the Makefiles. 251509885543SmrgAC_DEFUN([AC_LIBLTDL_CONVENIENCE], 251609885543Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 251709885543Smrg case $enable_ltdl_convenience in 251809885543Smrg no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; 251909885543Smrg "") enable_ltdl_convenience=yes 252009885543Smrg ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; 252109885543Smrg esac 252209885543Smrg LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la 252309885543Smrg LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) 252409885543Smrg # For backwards non-gettext consistent compatibility... 252509885543Smrg INCLTDL="$LTDLINCL" 252609885543Smrg])# AC_LIBLTDL_CONVENIENCE 252709885543Smrg 252809885543Smrg 252909885543Smrg# AC_LIBLTDL_INSTALLABLE([DIRECTORY]) 253009885543Smrg# ----------------------------------- 253109885543Smrg# sets LIBLTDL to the link flags for the libltdl installable library and 253209885543Smrg# LTDLINCL to the include flags for the libltdl header and adds 253309885543Smrg# --enable-ltdl-install to the configure arguments. Note that 253409885543Smrg# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, 253509885543Smrg# and an installed libltdl is not found, it is assumed to be `libltdl'. 253609885543Smrg# LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with 253709885543Smrg# '${top_srcdir}/' (note the single quotes!). If your package is not 253809885543Smrg# flat and you're not using automake, define top_builddir and top_srcdir 253909885543Smrg# appropriately in the Makefiles. 254009885543Smrg# In the future, this macro may have to be called after AC_PROG_LIBTOOL. 254109885543SmrgAC_DEFUN([AC_LIBLTDL_INSTALLABLE], 254209885543Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 254309885543Smrg AC_CHECK_LIB(ltdl, lt_dlinit, 254409885543Smrg [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no], 254509885543Smrg [if test x"$enable_ltdl_install" = xno; then 254609885543Smrg AC_MSG_WARN([libltdl not installed, but installation disabled]) 254709885543Smrg else 254809885543Smrg enable_ltdl_install=yes 254909885543Smrg fi 255009885543Smrg ]) 255109885543Smrg if test x"$enable_ltdl_install" = x"yes"; then 255209885543Smrg ac_configure_args="$ac_configure_args --enable-ltdl-install" 255309885543Smrg LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la 255409885543Smrg LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) 255509885543Smrg else 255609885543Smrg ac_configure_args="$ac_configure_args --enable-ltdl-install=no" 255709885543Smrg LIBLTDL="-lltdl" 255809885543Smrg LTDLINCL= 255909885543Smrg fi 256009885543Smrg # For backwards non-gettext consistent compatibility... 256109885543Smrg INCLTDL="$LTDLINCL" 256209885543Smrg])# AC_LIBLTDL_INSTALLABLE 256309885543Smrg 256409885543Smrg 256509885543Smrg# AC_LIBTOOL_CXX 256609885543Smrg# -------------- 256709885543Smrg# enable support for C++ libraries 256809885543SmrgAC_DEFUN([AC_LIBTOOL_CXX], 256909885543Smrg[AC_REQUIRE([_LT_AC_LANG_CXX]) 257009885543Smrg])# AC_LIBTOOL_CXX 257109885543Smrg 257209885543Smrg 257309885543Smrg# _LT_AC_LANG_CXX 257409885543Smrg# --------------- 257509885543SmrgAC_DEFUN([_LT_AC_LANG_CXX], 257609885543Smrg[AC_REQUIRE([AC_PROG_CXX]) 257709885543SmrgAC_REQUIRE([_LT_AC_PROG_CXXCPP]) 257809885543Smrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX]) 257909885543Smrg])# _LT_AC_LANG_CXX 258009885543Smrg 258109885543Smrg# _LT_AC_PROG_CXXCPP 258209885543Smrg# ------------------ 258309885543SmrgAC_DEFUN([_LT_AC_PROG_CXXCPP], 258409885543Smrg[ 258509885543SmrgAC_REQUIRE([AC_PROG_CXX]) 258609885543Smrgif test -n "$CXX" && ( test "X$CXX" != "Xno" && 258709885543Smrg ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || 258809885543Smrg (test "X$CXX" != "Xg++"))) ; then 258909885543Smrg AC_PROG_CXXCPP 259009885543Smrgfi 259109885543Smrg])# _LT_AC_PROG_CXXCPP 259209885543Smrg 259309885543Smrg# AC_LIBTOOL_F77 259409885543Smrg# -------------- 259509885543Smrg# enable support for Fortran 77 libraries 259609885543SmrgAC_DEFUN([AC_LIBTOOL_F77], 259709885543Smrg[AC_REQUIRE([_LT_AC_LANG_F77]) 259809885543Smrg])# AC_LIBTOOL_F77 259909885543Smrg 260009885543Smrg 260109885543Smrg# _LT_AC_LANG_F77 260209885543Smrg# --------------- 260309885543SmrgAC_DEFUN([_LT_AC_LANG_F77], 260409885543Smrg[AC_REQUIRE([AC_PROG_F77]) 260509885543Smrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77]) 260609885543Smrg])# _LT_AC_LANG_F77 260709885543Smrg 260809885543Smrg 260909885543Smrg# AC_LIBTOOL_GCJ 261009885543Smrg# -------------- 261109885543Smrg# enable support for GCJ libraries 261209885543SmrgAC_DEFUN([AC_LIBTOOL_GCJ], 261309885543Smrg[AC_REQUIRE([_LT_AC_LANG_GCJ]) 261409885543Smrg])# AC_LIBTOOL_GCJ 261509885543Smrg 261609885543Smrg 261709885543Smrg# _LT_AC_LANG_GCJ 261809885543Smrg# --------------- 261909885543SmrgAC_DEFUN([_LT_AC_LANG_GCJ], 262009885543Smrg[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[], 262109885543Smrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[], 262209885543Smrg [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[], 262309885543Smrg [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])], 262409885543Smrg [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])], 262509885543Smrg [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])]) 262609885543Smrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ]) 262709885543Smrg])# _LT_AC_LANG_GCJ 262809885543Smrg 262909885543Smrg 263009885543Smrg# AC_LIBTOOL_RC 263109885543Smrg# ------------- 263209885543Smrg# enable support for Windows resource files 263309885543SmrgAC_DEFUN([AC_LIBTOOL_RC], 263409885543Smrg[AC_REQUIRE([LT_AC_PROG_RC]) 263509885543Smrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC]) 263609885543Smrg])# AC_LIBTOOL_RC 263709885543Smrg 263809885543Smrg 263909885543Smrg# AC_LIBTOOL_LANG_C_CONFIG 264009885543Smrg# ------------------------ 264109885543Smrg# Ensure that the configuration vars for the C compiler are 264209885543Smrg# suitably defined. Those variables are subsequently used by 264309885543Smrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 264409885543SmrgAC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG]) 264509885543SmrgAC_DEFUN([_LT_AC_LANG_C_CONFIG], 264609885543Smrg[lt_save_CC="$CC" 264709885543SmrgAC_LANG_PUSH(C) 264809885543Smrg 264909885543Smrg# Source file extension for C test sources. 265009885543Smrgac_ext=c 265109885543Smrg 265209885543Smrg# Object file extension for compiled C test sources. 265309885543Smrgobjext=o 265409885543Smrg_LT_AC_TAGVAR(objext, $1)=$objext 265509885543Smrg 265609885543Smrg# Code to be used in simple compile tests 265709885543Smrglt_simple_compile_test_code="int some_variable = 0;\n" 265809885543Smrg 265909885543Smrg# Code to be used in simple link tests 266009885543Smrglt_simple_link_test_code='int main(){return(0);}\n' 266109885543Smrg 266209885543Smrg_LT_AC_SYS_COMPILER 266309885543Smrg 266409885543Smrg# save warnings/boilerplate of simple test code 266509885543Smrg_LT_COMPILER_BOILERPLATE 266609885543Smrg_LT_LINKER_BOILERPLATE 266709885543Smrg 266809885543SmrgAC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) 266909885543SmrgAC_LIBTOOL_PROG_COMPILER_PIC($1) 267009885543SmrgAC_LIBTOOL_PROG_CC_C_O($1) 267109885543SmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) 267209885543SmrgAC_LIBTOOL_PROG_LD_SHLIBS($1) 267309885543SmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1) 267409885543SmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) 267509885543SmrgAC_LIBTOOL_SYS_LIB_STRIP 267609885543SmrgAC_LIBTOOL_DLOPEN_SELF 267709885543Smrg 267809885543Smrg# Report which library types will actually be built 267909885543SmrgAC_MSG_CHECKING([if libtool supports shared libraries]) 268009885543SmrgAC_MSG_RESULT([$can_build_shared]) 268109885543Smrg 268209885543SmrgAC_MSG_CHECKING([whether to build shared libraries]) 268309885543Smrgtest "$can_build_shared" = "no" && enable_shared=no 268409885543Smrg 268509885543Smrg# On AIX, shared libraries and static libraries use the same namespace, and 268609885543Smrg# are all built from PIC. 268709885543Smrgcase $host_os in 268809885543Smrgaix3*) 268909885543Smrg test "$enable_shared" = yes && enable_static=no 269009885543Smrg if test -n "$RANLIB"; then 269109885543Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 269209885543Smrg postinstall_cmds='$RANLIB $lib' 269309885543Smrg fi 269409885543Smrg ;; 269509885543Smrg 269609885543Smrgaix4* | aix5*) 269709885543Smrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 269809885543Smrg test "$enable_shared" = yes && enable_static=no 269909885543Smrg fi 270009885543Smrg ;; 270109885543Smrgesac 270209885543SmrgAC_MSG_RESULT([$enable_shared]) 270309885543Smrg 270409885543SmrgAC_MSG_CHECKING([whether to build static libraries]) 270509885543Smrg# Make sure either enable_shared or enable_static is yes. 270609885543Smrgtest "$enable_shared" = yes || enable_static=yes 270709885543SmrgAC_MSG_RESULT([$enable_static]) 270809885543Smrg 270909885543SmrgAC_LIBTOOL_CONFIG($1) 271009885543Smrg 271109885543SmrgAC_LANG_POP 271209885543SmrgCC="$lt_save_CC" 271309885543Smrg])# AC_LIBTOOL_LANG_C_CONFIG 271409885543Smrg 271509885543Smrg 271609885543Smrg# AC_LIBTOOL_LANG_CXX_CONFIG 271709885543Smrg# -------------------------- 271809885543Smrg# Ensure that the configuration vars for the C compiler are 271909885543Smrg# suitably defined. Those variables are subsequently used by 272009885543Smrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 272109885543SmrgAC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)]) 272209885543SmrgAC_DEFUN([_LT_AC_LANG_CXX_CONFIG], 272309885543Smrg[AC_LANG_PUSH(C++) 272409885543SmrgAC_REQUIRE([AC_PROG_CXX]) 272509885543SmrgAC_REQUIRE([_LT_AC_PROG_CXXCPP]) 272609885543Smrg 272709885543Smrg_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 272809885543Smrg_LT_AC_TAGVAR(allow_undefined_flag, $1)= 272909885543Smrg_LT_AC_TAGVAR(always_export_symbols, $1)=no 273009885543Smrg_LT_AC_TAGVAR(archive_expsym_cmds, $1)= 273109885543Smrg_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= 273209885543Smrg_LT_AC_TAGVAR(hardcode_direct, $1)=no 273309885543Smrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= 273409885543Smrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 273509885543Smrg_LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 273609885543Smrg_LT_AC_TAGVAR(hardcode_minus_L, $1)=no 273709885543Smrg_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 273809885543Smrg_LT_AC_TAGVAR(hardcode_automatic, $1)=no 273909885543Smrg_LT_AC_TAGVAR(module_cmds, $1)= 274009885543Smrg_LT_AC_TAGVAR(module_expsym_cmds, $1)= 274109885543Smrg_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown 274209885543Smrg_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 274309885543Smrg_LT_AC_TAGVAR(no_undefined_flag, $1)= 274409885543Smrg_LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 274509885543Smrg_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no 274609885543Smrg 274709885543Smrg# Dependencies to place before and after the object being linked: 274809885543Smrg_LT_AC_TAGVAR(predep_objects, $1)= 274909885543Smrg_LT_AC_TAGVAR(postdep_objects, $1)= 275009885543Smrg_LT_AC_TAGVAR(predeps, $1)= 275109885543Smrg_LT_AC_TAGVAR(postdeps, $1)= 275209885543Smrg_LT_AC_TAGVAR(compiler_lib_search_path, $1)= 275309885543Smrg 275409885543Smrg# Source file extension for C++ test sources. 275509885543Smrgac_ext=cpp 275609885543Smrg 275709885543Smrg# Object file extension for compiled C++ test sources. 275809885543Smrgobjext=o 275909885543Smrg_LT_AC_TAGVAR(objext, $1)=$objext 276009885543Smrg 276109885543Smrg# Code to be used in simple compile tests 276209885543Smrglt_simple_compile_test_code="int some_variable = 0;\n" 276309885543Smrg 276409885543Smrg# Code to be used in simple link tests 276509885543Smrglt_simple_link_test_code='int main(int, char *[[]]) { return(0); }\n' 276609885543Smrg 276709885543Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 276809885543Smrg_LT_AC_SYS_COMPILER 276909885543Smrg 277009885543Smrg# save warnings/boilerplate of simple test code 277109885543Smrg_LT_COMPILER_BOILERPLATE 277209885543Smrg_LT_LINKER_BOILERPLATE 277309885543Smrg 277409885543Smrg# Allow CC to be a program name with arguments. 277509885543Smrglt_save_CC=$CC 277609885543Smrglt_save_LD=$LD 277709885543Smrglt_save_GCC=$GCC 277809885543SmrgGCC=$GXX 277909885543Smrglt_save_with_gnu_ld=$with_gnu_ld 278009885543Smrglt_save_path_LD=$lt_cv_path_LD 278109885543Smrgif test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 278209885543Smrg lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 278309885543Smrgelse 278409885543Smrg $as_unset lt_cv_prog_gnu_ld 278509885543Smrgfi 278609885543Smrgif test -n "${lt_cv_path_LDCXX+set}"; then 278709885543Smrg lt_cv_path_LD=$lt_cv_path_LDCXX 278809885543Smrgelse 278909885543Smrg $as_unset lt_cv_path_LD 279009885543Smrgfi 279109885543Smrgtest -z "${LDCXX+set}" || LD=$LDCXX 279209885543SmrgCC=${CXX-"c++"} 279309885543Smrgcompiler=$CC 279409885543Smrg_LT_AC_TAGVAR(compiler, $1)=$CC 279509885543Smrg_LT_CC_BASENAME([$compiler]) 279609885543Smrg 279709885543Smrg# We don't want -fno-exception wen compiling C++ code, so set the 279809885543Smrg# no_builtin_flag separately 279909885543Smrgif test "$GXX" = yes; then 280009885543Smrg _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 280109885543Smrgelse 280209885543Smrg _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 280309885543Smrgfi 280409885543Smrg 280509885543Smrgif test "$GXX" = yes; then 280609885543Smrg # Set up default GNU C++ configuration 280709885543Smrg 280809885543Smrg AC_PROG_LD 280909885543Smrg 281009885543Smrg # Check if GNU C++ uses GNU ld as the underlying linker, since the 281109885543Smrg # archiving commands below assume that GNU ld is being used. 281209885543Smrg if test "$with_gnu_ld" = yes; then 281309885543Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 281409885543Smrg _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' 281509885543Smrg 281609885543Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 281709885543Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 281809885543Smrg 281909885543Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 282009885543Smrg # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 282109885543Smrg # investigate it a little bit more. (MM) 282209885543Smrg wlarc='${wl}' 282309885543Smrg 282409885543Smrg # ancient GNU ld didn't support --whole-archive et. al. 282509885543Smrg if eval "`$CC -print-prog-name=ld` --help 2>&1" | \ 282609885543Smrg grep 'no-whole-archive' > /dev/null; then 282709885543Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 282809885543Smrg else 282909885543Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 283009885543Smrg fi 283109885543Smrg else 283209885543Smrg with_gnu_ld=no 283309885543Smrg wlarc= 283409885543Smrg 283509885543Smrg # A generic and very simple default shared library creation 283609885543Smrg # command for GNU C++ for the case where it uses the native 283709885543Smrg # linker, instead of GNU ld. If possible, this setting should 283809885543Smrg # overridden to take advantage of the native linker features on 283909885543Smrg # the platform it is being used on. 284009885543Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 284109885543Smrg fi 284209885543Smrg 284309885543Smrg # Commands to make compiler produce verbose output that lists 284409885543Smrg # what "hidden" libraries, object files and flags are used when 284509885543Smrg # linking a shared library. 284609885543Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' 284709885543Smrg 284809885543Smrgelse 284909885543Smrg GXX=no 285009885543Smrg with_gnu_ld=no 285109885543Smrg wlarc= 285209885543Smrgfi 285309885543Smrg 285409885543Smrg# PORTME: fill in a description of your system's C++ link characteristics 285509885543SmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 285609885543Smrg_LT_AC_TAGVAR(ld_shlibs, $1)=yes 285709885543Smrgcase $host_os in 285809885543Smrg aix3*) 285909885543Smrg # FIXME: insert proper C++ library support 286009885543Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 286109885543Smrg ;; 286209885543Smrg aix4* | aix5*) 286309885543Smrg if test "$host_cpu" = ia64; then 286409885543Smrg # On IA64, the linker does run time linking by default, so we don't 286509885543Smrg # have to do anything special. 286609885543Smrg aix_use_runtimelinking=no 286709885543Smrg exp_sym_flag='-Bexport' 286809885543Smrg no_entry_flag="" 286909885543Smrg else 287009885543Smrg aix_use_runtimelinking=no 287109885543Smrg 287209885543Smrg # Test if we are trying to use run time linking or normal 287309885543Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 287409885543Smrg # need to do runtime linking. 287509885543Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*) 287609885543Smrg for ld_flag in $LDFLAGS; do 287709885543Smrg case $ld_flag in 287809885543Smrg *-brtl*) 287909885543Smrg aix_use_runtimelinking=yes 288009885543Smrg break 288109885543Smrg ;; 288209885543Smrg esac 288309885543Smrg done 288409885543Smrg ;; 288509885543Smrg esac 288609885543Smrg 288709885543Smrg exp_sym_flag='-bexport' 288809885543Smrg no_entry_flag='-bnoentry' 288909885543Smrg fi 289009885543Smrg 289109885543Smrg # When large executables or shared objects are built, AIX ld can 289209885543Smrg # have problems creating the table of contents. If linking a library 289309885543Smrg # or program results in "error TOC overflow" add -mminimal-toc to 289409885543Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 289509885543Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 289609885543Smrg 289709885543Smrg _LT_AC_TAGVAR(archive_cmds, $1)='' 289809885543Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 289909885543Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' 290009885543Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 290109885543Smrg 290209885543Smrg if test "$GXX" = yes; then 290309885543Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 290409885543Smrg # We only want to do this on AIX 4.2 and lower, the check 290509885543Smrg # below for broken collect2 doesn't work under 4.3+ 290609885543Smrg collect2name=`${CC} -print-prog-name=collect2` 290709885543Smrg if test -f "$collect2name" && \ 290809885543Smrg strings "$collect2name" | grep resolve_lib_name >/dev/null 290909885543Smrg then 291009885543Smrg # We have reworked collect2 291109885543Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 291209885543Smrg else 291309885543Smrg # We have old collect2 291409885543Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported 291509885543Smrg # It fails to find uninstalled libraries when the uninstalled 291609885543Smrg # path is not listed in the libpath. Setting hardcode_minus_L 291709885543Smrg # to unsupported forces relinking 291809885543Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 291909885543Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 292009885543Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 292109885543Smrg fi 292209885543Smrg ;; 292309885543Smrg esac 292409885543Smrg shared_flag='-shared' 292509885543Smrg if test "$aix_use_runtimelinking" = yes; then 292609885543Smrg shared_flag="$shared_flag "'${wl}-G' 292709885543Smrg fi 292809885543Smrg else 292909885543Smrg # not using gcc 293009885543Smrg if test "$host_cpu" = ia64; then 293109885543Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 293209885543Smrg # chokes on -Wl,-G. The following line is correct: 293309885543Smrg shared_flag='-G' 293409885543Smrg else 293509885543Smrg if test "$aix_use_runtimelinking" = yes; then 293609885543Smrg shared_flag='${wl}-G' 293709885543Smrg else 293809885543Smrg shared_flag='${wl}-bM:SRE' 293909885543Smrg fi 294009885543Smrg fi 294109885543Smrg fi 294209885543Smrg 294309885543Smrg # It seems that -bexpall does not export symbols beginning with 294409885543Smrg # underscore (_), so it is better to generate a list of symbols to export. 294509885543Smrg _LT_AC_TAGVAR(always_export_symbols, $1)=yes 294609885543Smrg if test "$aix_use_runtimelinking" = yes; then 294709885543Smrg # Warning - without using the other runtime loading flags (-brtl), 294809885543Smrg # -berok will link without error, but may produce a broken library. 294909885543Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' 295009885543Smrg # Determine the default libpath from the value encoded in an empty executable. 295109885543Smrg _LT_AC_SYS_LIBPATH_AIX 295209885543Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 295309885543Smrg 295409885543Smrg _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" 295509885543Smrg else 295609885543Smrg if test "$host_cpu" = ia64; then 295709885543Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 295809885543Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 295909885543Smrg _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" 296009885543Smrg else 296109885543Smrg # Determine the default libpath from the value encoded in an empty executable. 296209885543Smrg _LT_AC_SYS_LIBPATH_AIX 296309885543Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 296409885543Smrg # Warning - without using the other run time loading flags, 296509885543Smrg # -berok will link without error, but may produce a broken library. 296609885543Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 296709885543Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 296809885543Smrg # Exported symbols can be pulled into shared objects from archives 296909885543Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 297009885543Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes 297109885543Smrg # This is similar to how AIX traditionally builds its shared libraries. 297209885543Smrg _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' 297309885543Smrg fi 297409885543Smrg fi 297509885543Smrg ;; 297609885543Smrg 297709885543Smrg beos*) 297809885543Smrg if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 297909885543Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 298009885543Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 298109885543Smrg # support --undefined. This deserves some investigation. FIXME 298209885543Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 298309885543Smrg else 298409885543Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 298509885543Smrg fi 298609885543Smrg ;; 298709885543Smrg 298809885543Smrg chorus*) 298909885543Smrg case $cc_basename in 299009885543Smrg *) 299109885543Smrg # FIXME: insert proper C++ library support 299209885543Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 299309885543Smrg ;; 299409885543Smrg esac 299509885543Smrg ;; 299609885543Smrg 299709885543Smrg cygwin* | mingw* | pw32*) 299809885543Smrg # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 299909885543Smrg # as there is no search path for DLLs. 300009885543Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 300109885543Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 300209885543Smrg _LT_AC_TAGVAR(always_export_symbols, $1)=no 300309885543Smrg _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 300409885543Smrg 300509885543Smrg if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then 300609885543Smrg _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' 300709885543Smrg # If the export-symbols file already is a .def file (1st line 300809885543Smrg # is EXPORTS), use it as is; otherwise, prepend... 300909885543Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 301009885543Smrg cp $export_symbols $output_objdir/$soname.def; 301109885543Smrg else 301209885543Smrg echo EXPORTS > $output_objdir/$soname.def; 301309885543Smrg cat $export_symbols >> $output_objdir/$soname.def; 301409885543Smrg fi~ 301509885543Smrg $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' 301609885543Smrg else 301709885543Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 301809885543Smrg fi 301909885543Smrg ;; 302009885543Smrg darwin* | rhapsody*) 302109885543Smrg case $host_os in 302209885543Smrg rhapsody* | darwin1.[[012]]) 302309885543Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' 302409885543Smrg ;; 302509885543Smrg *) # Darwin 1.3 on 302609885543Smrg if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then 302709885543Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' 302809885543Smrg else 302909885543Smrg case ${MACOSX_DEPLOYMENT_TARGET} in 303009885543Smrg 10.[[012]]) 303109885543Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' 303209885543Smrg ;; 303309885543Smrg 10.*) 303409885543Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup' 303509885543Smrg ;; 303609885543Smrg esac 303709885543Smrg fi 303809885543Smrg ;; 303909885543Smrg esac 304009885543Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 304109885543Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 304209885543Smrg _LT_AC_TAGVAR(hardcode_automatic, $1)=yes 304309885543Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 304409885543Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' 304509885543Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 304609885543Smrg 304709885543Smrg if test "$GXX" = yes ; then 304809885543Smrg lt_int_apple_cc_single_mod=no 304909885543Smrg output_verbose_link_cmd='echo' 305009885543Smrg if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then 305109885543Smrg lt_int_apple_cc_single_mod=yes 305209885543Smrg fi 305309885543Smrg if test "X$lt_int_apple_cc_single_mod" = Xyes ; then 305409885543Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' 305509885543Smrg else 305609885543Smrg _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' 305709885543Smrg fi 305809885543Smrg _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' 305909885543Smrg # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds 306009885543Smrg if test "X$lt_int_apple_cc_single_mod" = Xyes ; then 306109885543Smrg _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}' 306209885543Smrg else 306309885543Smrg _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}' 306409885543Smrg fi 306509885543Smrg _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}' 306609885543Smrg else 306709885543Smrg case $cc_basename in 306809885543Smrg xlc*) 306909885543Smrg output_verbose_link_cmd='echo' 307009885543Smrg _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' 307109885543Smrg _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' 307209885543Smrg # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds 307309885543Smrg _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}' 307409885543Smrg _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}' 307509885543Smrg ;; 307609885543Smrg *) 307709885543Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 307809885543Smrg ;; 307909885543Smrg esac 308009885543Smrg fi 308109885543Smrg ;; 308209885543Smrg 308309885543Smrg dgux*) 308409885543Smrg case $cc_basename in 308509885543Smrg ec++*) 308609885543Smrg # FIXME: insert proper C++ library support 308709885543Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 308809885543Smrg ;; 308909885543Smrg ghcx*) 309009885543Smrg # Green Hills C++ Compiler 309109885543Smrg # FIXME: insert proper C++ library support 309209885543Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 309309885543Smrg ;; 309409885543Smrg *) 309509885543Smrg # FIXME: insert proper C++ library support 309609885543Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 309709885543Smrg ;; 309809885543Smrg esac 309909885543Smrg ;; 310009885543Smrg freebsd[[12]]*) 310109885543Smrg # C++ shared libraries reported to be fairly broken before switch to ELF 310209885543Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 310309885543Smrg ;; 310409885543Smrg freebsd-elf*) 310509885543Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 310609885543Smrg ;; 310709885543Smrg freebsd* | dragonfly*) 310809885543Smrg # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 310909885543Smrg # conventions 311009885543Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=yes 311109885543Smrg ;; 311209885543Smrg gnu*) 311309885543Smrg ;; 311409885543Smrg hpux9*) 311509885543Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 311609885543Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 311709885543Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 311809885543Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 311909885543Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 312009885543Smrg # but as the default 312109885543Smrg # location of the library. 312209885543Smrg 312309885543Smrg case $cc_basename in 312409885543Smrg CC*) 312509885543Smrg # FIXME: insert proper C++ library support 312609885543Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 312709885543Smrg ;; 312809885543Smrg aCC*) 312909885543Smrg _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' 313009885543Smrg # Commands to make compiler produce verbose output that lists 313109885543Smrg # what "hidden" libraries, object files and flags are used when 313209885543Smrg # linking a shared library. 313309885543Smrg # 313409885543Smrg # There doesn't appear to be a way to prevent this compiler from 313509885543Smrg # explicitly linking system object files so we need to strip them 313609885543Smrg # from the output so that they don't get included in the library 313709885543Smrg # dependencies. 313809885543Smrg 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' 313909885543Smrg ;; 314009885543Smrg *) 314109885543Smrg if test "$GXX" = yes; then 314209885543Smrg _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' 314309885543Smrg else 314409885543Smrg # FIXME: insert proper C++ library support 314509885543Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 314609885543Smrg fi 314709885543Smrg ;; 314809885543Smrg esac 314909885543Smrg ;; 315009885543Smrg hpux10*|hpux11*) 315109885543Smrg if test $with_gnu_ld = no; then 315209885543Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 315309885543Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 315409885543Smrg 315509885543Smrg case $host_cpu in 315609885543Smrg hppa*64*|ia64*) 315709885543Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' 315809885543Smrg ;; 315909885543Smrg *) 316009885543Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 316109885543Smrg ;; 316209885543Smrg esac 316309885543Smrg fi 316409885543Smrg case $host_cpu in 316509885543Smrg hppa*64*|ia64*) 316609885543Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 316709885543Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 316809885543Smrg ;; 316909885543Smrg *) 317009885543Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 317109885543Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 317209885543Smrg # but as the default 317309885543Smrg # location of the library. 317409885543Smrg ;; 317509885543Smrg esac 317609885543Smrg 317709885543Smrg case $cc_basename in 317809885543Smrg CC*) 317909885543Smrg # FIXME: insert proper C++ library support 318009885543Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 318109885543Smrg ;; 318209885543Smrg aCC*) 318309885543Smrg case $host_cpu in 318409885543Smrg hppa*64*) 318509885543Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 318609885543Smrg ;; 318709885543Smrg ia64*) 318809885543Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 318909885543Smrg ;; 319009885543Smrg *) 319109885543Smrg _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' 319209885543Smrg ;; 319309885543Smrg esac 319409885543Smrg # Commands to make compiler produce verbose output that lists 319509885543Smrg # what "hidden" libraries, object files and flags are used when 319609885543Smrg # linking a shared library. 319709885543Smrg # 319809885543Smrg # There doesn't appear to be a way to prevent this compiler from 319909885543Smrg # explicitly linking system object files so we need to strip them 320009885543Smrg # from the output so that they don't get included in the library 320109885543Smrg # dependencies. 320209885543Smrg 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' 320309885543Smrg ;; 320409885543Smrg *) 320509885543Smrg if test "$GXX" = yes; then 320609885543Smrg if test $with_gnu_ld = no; then 320709885543Smrg case $host_cpu in 320809885543Smrg hppa*64*) 320909885543Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 321009885543Smrg ;; 321109885543Smrg ia64*) 321209885543Smrg _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' 321309885543Smrg ;; 321409885543Smrg *) 321509885543Smrg _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' 321609885543Smrg ;; 321709885543Smrg esac 321809885543Smrg fi 321909885543Smrg else 322009885543Smrg # FIXME: insert proper C++ library support 322109885543Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 322209885543Smrg fi 322309885543Smrg ;; 322409885543Smrg esac 322509885543Smrg ;; 322609885543Smrg interix3*) 322709885543Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 322809885543Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 322909885543Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 323009885543Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 323109885543Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 323209885543Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 323309885543Smrg # default) and relocated if they conflict, which is a slow very memory 323409885543Smrg # consuming and fragmenting process. To avoid this, we pick a random, 323509885543Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 323609885543Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 323709885543Smrg _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' 323809885543Smrg _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' 323909885543Smrg ;; 324009885543Smrg irix5* | irix6*) 324109885543Smrg case $cc_basename in 324209885543Smrg CC*) 324309885543Smrg # SGI C++ 324409885543Smrg _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' 324509885543Smrg 324609885543Smrg # Archives containing C++ object files must be created using 324709885543Smrg # "CC -ar", where "CC" is the IRIX C++ compiler. This is 324809885543Smrg # necessary to make sure instantiated templates are included 324909885543Smrg # in the archive. 325009885543Smrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 325109885543Smrg ;; 325209885543Smrg *) 325309885543Smrg if test "$GXX" = yes; then 325409885543Smrg if test "$with_gnu_ld" = no; then 325509885543Smrg _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' 325609885543Smrg else 325709885543Smrg _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' 325809885543Smrg fi 325909885543Smrg fi 326009885543Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 326109885543Smrg ;; 326209885543Smrg esac 326309885543Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 326409885543Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 326509885543Smrg ;; 326609885543Smrg linux* | k*bsd*-gnu) 326709885543Smrg case $cc_basename in 326809885543Smrg KCC*) 326909885543Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 327009885543Smrg 327109885543Smrg # KCC will only create a shared library if the output file 327209885543Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 327309885543Smrg # to its proper name (with version) after linking. 327409885543Smrg _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' 327509885543Smrg _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' 327609885543Smrg # Commands to make compiler produce verbose output that lists 327709885543Smrg # what "hidden" libraries, object files and flags are used when 327809885543Smrg # linking a shared library. 327909885543Smrg # 328009885543Smrg # There doesn't appear to be a way to prevent this compiler from 328109885543Smrg # explicitly linking system object files so we need to strip them 328209885543Smrg # from the output so that they don't get included in the library 328309885543Smrg # dependencies. 328409885543Smrg 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' 328509885543Smrg 328609885543Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir' 328709885543Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 328809885543Smrg 328909885543Smrg # Archives containing C++ object files must be created using 329009885543Smrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 329109885543Smrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 329209885543Smrg ;; 329309885543Smrg icpc*) 329409885543Smrg # Intel C++ 329509885543Smrg with_gnu_ld=yes 329609885543Smrg # version 8.0 and above of icpc choke on multiply defined symbols 329709885543Smrg # if we add $predep_objects and $postdep_objects, however 7.1 and 329809885543Smrg # earlier do not add the objects themselves. 329909885543Smrg case `$CC -V 2>&1` in 330009885543Smrg *"Version 7."*) 330109885543Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 330209885543Smrg _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' 330309885543Smrg ;; 330409885543Smrg *) # Version 8.0 or newer 330509885543Smrg tmp_idyn= 330609885543Smrg case $host_cpu in 330709885543Smrg ia64*) tmp_idyn=' -i_dynamic';; 330809885543Smrg esac 330909885543Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 331009885543Smrg _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' 331109885543Smrg ;; 331209885543Smrg esac 331309885543Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 331409885543Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 331509885543Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 331609885543Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 331709885543Smrg ;; 331809885543Smrg pgCC*) 331909885543Smrg # Portland Group C++ compiler 332009885543Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 332109885543Smrg _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' 332209885543Smrg 332309885543Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 332409885543Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 332509885543Smrg _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' 332609885543Smrg ;; 332709885543Smrg cxx*) 332809885543Smrg # Compaq C++ 332909885543Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 333009885543Smrg _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' 333109885543Smrg 333209885543Smrg runpath_var=LD_RUN_PATH 333309885543Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 333409885543Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 333509885543Smrg 333609885543Smrg # Commands to make compiler produce verbose output that lists 333709885543Smrg # what "hidden" libraries, object files and flags are used when 333809885543Smrg # linking a shared library. 333909885543Smrg # 334009885543Smrg # There doesn't appear to be a way to prevent this compiler from 334109885543Smrg # explicitly linking system object files so we need to strip them 334209885543Smrg # from the output so that they don't get included in the library 334309885543Smrg # dependencies. 334409885543Smrg 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' 334509885543Smrg ;; 334609885543Smrg esac 334709885543Smrg ;; 334809885543Smrg lynxos*) 334909885543Smrg # FIXME: insert proper C++ library support 335009885543Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 335109885543Smrg ;; 335209885543Smrg m88k*) 335309885543Smrg # FIXME: insert proper C++ library support 335409885543Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 335509885543Smrg ;; 335609885543Smrg mvs*) 335709885543Smrg case $cc_basename in 335809885543Smrg cxx*) 335909885543Smrg # FIXME: insert proper C++ library support 336009885543Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 336109885543Smrg ;; 336209885543Smrg *) 336309885543Smrg # FIXME: insert proper C++ library support 336409885543Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 336509885543Smrg ;; 336609885543Smrg esac 336709885543Smrg ;; 336809885543Smrg netbsd* | netbsdelf*-gnu) 336909885543Smrg if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then 337009885543Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 337109885543Smrg wlarc= 337209885543Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 337309885543Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 337409885543Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 337509885543Smrg fi 337609885543Smrg # Workaround some broken pre-1.5 toolchains 337709885543Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 337809885543Smrg ;; 337909885543Smrg openbsd2*) 338009885543Smrg # C++ shared libraries are fairly broken 338109885543Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 338209885543Smrg ;; 338309885543Smrg openbsd*) 338409885543Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 338509885543Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 338609885543Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 338709885543Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 338809885543Smrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 338909885543Smrg _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' 339009885543Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 339109885543Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 339209885543Smrg fi 339309885543Smrg output_verbose_link_cmd='echo' 339409885543Smrg ;; 339509885543Smrg osf3*) 339609885543Smrg case $cc_basename in 339709885543Smrg KCC*) 339809885543Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 339909885543Smrg 340009885543Smrg # KCC will only create a shared library if the output file 340109885543Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 340209885543Smrg # to its proper name (with version) after linking. 340309885543Smrg _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' 340409885543Smrg 340509885543Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 340609885543Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 340709885543Smrg 340809885543Smrg # Archives containing C++ object files must be created using 340909885543Smrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 341009885543Smrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 341109885543Smrg 341209885543Smrg ;; 341309885543Smrg RCC*) 341409885543Smrg # Rational C++ 2.4.1 341509885543Smrg # FIXME: insert proper C++ library support 341609885543Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 341709885543Smrg ;; 341809885543Smrg cxx*) 341909885543Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 342009885543Smrg _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' 342109885543Smrg 342209885543Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 342309885543Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 342409885543Smrg 342509885543Smrg # Commands to make compiler produce verbose output that lists 342609885543Smrg # what "hidden" libraries, object files and flags are used when 342709885543Smrg # linking a shared library. 342809885543Smrg # 342909885543Smrg # There doesn't appear to be a way to prevent this compiler from 343009885543Smrg # explicitly linking system object files so we need to strip them 343109885543Smrg # from the output so that they don't get included in the library 343209885543Smrg # dependencies. 343309885543Smrg 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' 343409885543Smrg ;; 343509885543Smrg *) 343609885543Smrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 343709885543Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 343809885543Smrg _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' 343909885543Smrg 344009885543Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 344109885543Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 344209885543Smrg 344309885543Smrg # Commands to make compiler produce verbose output that lists 344409885543Smrg # what "hidden" libraries, object files and flags are used when 344509885543Smrg # linking a shared library. 344609885543Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' 344709885543Smrg 344809885543Smrg else 344909885543Smrg # FIXME: insert proper C++ library support 345009885543Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 345109885543Smrg fi 345209885543Smrg ;; 345309885543Smrg esac 345409885543Smrg ;; 345509885543Smrg osf4* | osf5*) 345609885543Smrg case $cc_basename in 345709885543Smrg KCC*) 345809885543Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 345909885543Smrg 346009885543Smrg # KCC will only create a shared library if the output file 346109885543Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 346209885543Smrg # to its proper name (with version) after linking. 346309885543Smrg _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' 346409885543Smrg 346509885543Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 346609885543Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 346709885543Smrg 346809885543Smrg # Archives containing C++ object files must be created using 346909885543Smrg # the KAI C++ compiler. 347009885543Smrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' 347109885543Smrg ;; 347209885543Smrg RCC*) 347309885543Smrg # Rational C++ 2.4.1 347409885543Smrg # FIXME: insert proper C++ library support 347509885543Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 347609885543Smrg ;; 347709885543Smrg cxx*) 347809885543Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 347909885543Smrg _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' 348009885543Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 348109885543Smrg echo "-hidden">> $lib.exp~ 348209885543Smrg $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~ 348309885543Smrg $rm $lib.exp' 348409885543Smrg 348509885543Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 348609885543Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 348709885543Smrg 348809885543Smrg # Commands to make compiler produce verbose output that lists 348909885543Smrg # what "hidden" libraries, object files and flags are used when 349009885543Smrg # linking a shared library. 349109885543Smrg # 349209885543Smrg # There doesn't appear to be a way to prevent this compiler from 349309885543Smrg # explicitly linking system object files so we need to strip them 349409885543Smrg # from the output so that they don't get included in the library 349509885543Smrg # dependencies. 349609885543Smrg 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' 349709885543Smrg ;; 349809885543Smrg *) 349909885543Smrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 350009885543Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 350109885543Smrg _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' 350209885543Smrg 350309885543Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 350409885543Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 350509885543Smrg 350609885543Smrg # Commands to make compiler produce verbose output that lists 350709885543Smrg # what "hidden" libraries, object files and flags are used when 350809885543Smrg # linking a shared library. 350909885543Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' 351009885543Smrg 351109885543Smrg else 351209885543Smrg # FIXME: insert proper C++ library support 351309885543Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 351409885543Smrg fi 351509885543Smrg ;; 351609885543Smrg esac 351709885543Smrg ;; 351809885543Smrg psos*) 351909885543Smrg # FIXME: insert proper C++ library support 352009885543Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 352109885543Smrg ;; 352209885543Smrg sunos4*) 352309885543Smrg case $cc_basename in 352409885543Smrg CC*) 352509885543Smrg # Sun C++ 4.x 352609885543Smrg # FIXME: insert proper C++ library support 352709885543Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 352809885543Smrg ;; 352909885543Smrg lcc*) 353009885543Smrg # Lucid 353109885543Smrg # FIXME: insert proper C++ library support 353209885543Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 353309885543Smrg ;; 353409885543Smrg *) 353509885543Smrg # FIXME: insert proper C++ library support 353609885543Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 353709885543Smrg ;; 353809885543Smrg esac 353909885543Smrg ;; 354009885543Smrg solaris*) 354109885543Smrg case $cc_basename in 354209885543Smrg CC*) 354309885543Smrg # Sun C++ 4.2, 5.x and Centerline C++ 354409885543Smrg _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes 354509885543Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' 354609885543Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 354709885543Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 354809885543Smrg $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' 354909885543Smrg 355009885543Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 355109885543Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 355209885543Smrg case $host_os in 355309885543Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 355409885543Smrg *) 355509885543Smrg # The C++ compiler is used as linker so we must use $wl 355609885543Smrg # flag to pass the commands to the underlying system 355709885543Smrg # linker. We must also pass each convience library through 355809885543Smrg # to the system linker between allextract/defaultextract. 355909885543Smrg # The C++ compiler will combine linker options so we 356009885543Smrg # cannot just pass the convience library names through 356109885543Smrg # without $wl. 356209885543Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 356309885543Smrg _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' 356409885543Smrg ;; 356509885543Smrg esac 356609885543Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 356709885543Smrg 356809885543Smrg output_verbose_link_cmd='echo' 356909885543Smrg 357009885543Smrg # Archives containing C++ object files must be created using 357109885543Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 357209885543Smrg # necessary to make sure instantiated templates are included 357309885543Smrg # in the archive. 357409885543Smrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 357509885543Smrg ;; 357609885543Smrg gcx*) 357709885543Smrg # Green Hills C++ Compiler 357809885543Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 357909885543Smrg 358009885543Smrg # The C++ compiler must be used to create the archive. 358109885543Smrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 358209885543Smrg ;; 358309885543Smrg *) 358409885543Smrg # GNU C++ compiler with Solaris linker 358509885543Smrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 358609885543Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' 358709885543Smrg if $CC --version | grep -v '^2\.7' > /dev/null; then 358809885543Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 358909885543Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 359009885543Smrg $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' 359109885543Smrg 359209885543Smrg # Commands to make compiler produce verbose output that lists 359309885543Smrg # what "hidden" libraries, object files and flags are used when 359409885543Smrg # linking a shared library. 359509885543Smrg output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" 359609885543Smrg else 359709885543Smrg # g++ 2.7 appears to require `-G' NOT `-shared' on this 359809885543Smrg # platform. 359909885543Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 360009885543Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 360109885543Smrg $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' 360209885543Smrg 360309885543Smrg # Commands to make compiler produce verbose output that lists 360409885543Smrg # what "hidden" libraries, object files and flags are used when 360509885543Smrg # linking a shared library. 360609885543Smrg output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" 360709885543Smrg fi 360809885543Smrg 360909885543Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' 361009885543Smrg fi 361109885543Smrg ;; 361209885543Smrg esac 361309885543Smrg ;; 361409885543Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 361509885543Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 361609885543Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 361709885543Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 361809885543Smrg runpath_var='LD_RUN_PATH' 361909885543Smrg 362009885543Smrg case $cc_basename in 362109885543Smrg CC*) 362209885543Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 362309885543Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 362409885543Smrg ;; 362509885543Smrg *) 362609885543Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 362709885543Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 362809885543Smrg ;; 362909885543Smrg esac 363009885543Smrg ;; 363109885543Smrg sysv5* | sco3.2v5* | sco5v6*) 363209885543Smrg # Note: We can NOT use -z defs as we might desire, because we do not 363309885543Smrg # link with -lc, and that would cause any symbols used from libc to 363409885543Smrg # always be unresolved, which means just about no library would 363509885543Smrg # ever link correctly. If we're not using GNU ld we use -z text 363609885543Smrg # though, which does catch some bad symbols but isn't as heavy-handed 363709885543Smrg # as -z defs. 363809885543Smrg # For security reasons, it is highly recommended that you always 363909885543Smrg # use absolute paths for naming shared libraries, and exclude the 364009885543Smrg # DT_RUNPATH tag from executables and libraries. But doing so 364109885543Smrg # requires that you compile everything twice, which is a pain. 364209885543Smrg # So that behaviour is only enabled if SCOABSPATH is set to a 364309885543Smrg # non-empty value in the environment. Most likely only useful for 364409885543Smrg # creating official distributions of packages. 364509885543Smrg # This is a hack until libtool officially supports absolute path 364609885543Smrg # names for shared libraries. 364709885543Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 364809885543Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 364909885543Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 365009885543Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 365109885543Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' 365209885543Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' 365309885543Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 365409885543Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 365509885543Smrg runpath_var='LD_RUN_PATH' 365609885543Smrg 365709885543Smrg case $cc_basename in 365809885543Smrg CC*) 365909885543Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' 366009885543Smrg _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' 366109885543Smrg ;; 366209885543Smrg *) 366309885543Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' 366409885543Smrg _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' 366509885543Smrg ;; 366609885543Smrg esac 366709885543Smrg ;; 366809885543Smrg tandem*) 366909885543Smrg case $cc_basename in 367009885543Smrg NCC*) 367109885543Smrg # NonStop-UX NCC 3.20 367209885543Smrg # FIXME: insert proper C++ library support 367309885543Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 367409885543Smrg ;; 367509885543Smrg *) 367609885543Smrg # FIXME: insert proper C++ library support 367709885543Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 367809885543Smrg ;; 367909885543Smrg esac 368009885543Smrg ;; 368109885543Smrg vxworks*) 368209885543Smrg # FIXME: insert proper C++ library support 368309885543Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 368409885543Smrg ;; 368509885543Smrg *) 368609885543Smrg # FIXME: insert proper C++ library support 368709885543Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 368809885543Smrg ;; 368909885543Smrgesac 369009885543SmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) 369109885543Smrgtest "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 369209885543Smrg 369309885543Smrg_LT_AC_TAGVAR(GCC, $1)="$GXX" 369409885543Smrg_LT_AC_TAGVAR(LD, $1)="$LD" 369509885543Smrg 369609885543SmrgAC_LIBTOOL_POSTDEP_PREDEP($1) 369709885543SmrgAC_LIBTOOL_PROG_COMPILER_PIC($1) 369809885543SmrgAC_LIBTOOL_PROG_CC_C_O($1) 369909885543SmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) 370009885543SmrgAC_LIBTOOL_PROG_LD_SHLIBS($1) 370109885543SmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1) 370209885543SmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) 370309885543Smrg 370409885543SmrgAC_LIBTOOL_CONFIG($1) 370509885543Smrg 370609885543SmrgAC_LANG_POP 370709885543SmrgCC=$lt_save_CC 370809885543SmrgLDCXX=$LD 370909885543SmrgLD=$lt_save_LD 371009885543SmrgGCC=$lt_save_GCC 371109885543Smrgwith_gnu_ldcxx=$with_gnu_ld 371209885543Smrgwith_gnu_ld=$lt_save_with_gnu_ld 371309885543Smrglt_cv_path_LDCXX=$lt_cv_path_LD 371409885543Smrglt_cv_path_LD=$lt_save_path_LD 371509885543Smrglt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 371609885543Smrglt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 371709885543Smrg])# AC_LIBTOOL_LANG_CXX_CONFIG 371809885543Smrg 371909885543Smrg# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME]) 372009885543Smrg# ------------------------------------ 372109885543Smrg# Figure out "hidden" library dependencies from verbose 372209885543Smrg# compiler output when linking a shared library. 372309885543Smrg# Parse the compiler output and extract the necessary 372409885543Smrg# objects, libraries and library flags. 372509885543SmrgAC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[ 372609885543Smrgdnl we can't use the lt_simple_compile_test_code here, 372709885543Smrgdnl because it contains code intended for an executable, 372809885543Smrgdnl not a library. It's possible we should let each 372909885543Smrgdnl tag define a new lt_????_link_test_code variable, 373009885543Smrgdnl but it's only used here... 373109885543Smrgifelse([$1],[],[cat > conftest.$ac_ext <<EOF 373209885543Smrgint a; 373309885543Smrgvoid foo (void) { a = 0; } 373409885543SmrgEOF 373509885543Smrg],[$1],[CXX],[cat > conftest.$ac_ext <<EOF 373609885543Smrgclass Foo 373709885543Smrg{ 373809885543Smrgpublic: 373909885543Smrg Foo (void) { a = 0; } 374009885543Smrgprivate: 374109885543Smrg int a; 374209885543Smrg}; 374309885543SmrgEOF 374409885543Smrg],[$1],[F77],[cat > conftest.$ac_ext <<EOF 374509885543Smrg subroutine foo 374609885543Smrg implicit none 374709885543Smrg integer*4 a 374809885543Smrg a=0 374909885543Smrg return 375009885543Smrg end 375109885543SmrgEOF 375209885543Smrg],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF 375309885543Smrgpublic class foo { 375409885543Smrg private int a; 375509885543Smrg public void bar (void) { 375609885543Smrg a = 0; 375709885543Smrg } 375809885543Smrg}; 375909885543SmrgEOF 376009885543Smrg]) 376109885543Smrgdnl Parse the compiler output and extract the necessary 376209885543Smrgdnl objects, libraries and library flags. 376309885543Smrgif AC_TRY_EVAL(ac_compile); then 376409885543Smrg # Parse the compiler output and extract the necessary 376509885543Smrg # objects, libraries and library flags. 376609885543Smrg 376709885543Smrg # Sentinel used to keep track of whether or not we are before 376809885543Smrg # the conftest object file. 376909885543Smrg pre_test_object_deps_done=no 377009885543Smrg 377109885543Smrg # The `*' in the case matches for architectures that use `case' in 377209885543Smrg # $output_verbose_cmd can trigger glob expansion during the loop 377309885543Smrg # eval without this substitution. 377409885543Smrg output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"` 377509885543Smrg 377609885543Smrg for p in `eval $output_verbose_link_cmd`; do 377709885543Smrg case $p in 377809885543Smrg 377909885543Smrg -L* | -R* | -l*) 378009885543Smrg # Some compilers place space between "-{L,R}" and the path. 378109885543Smrg # Remove the space. 378209885543Smrg if test $p = "-L" \ 378309885543Smrg || test $p = "-R"; then 378409885543Smrg prev=$p 378509885543Smrg continue 378609885543Smrg else 378709885543Smrg prev= 378809885543Smrg fi 378909885543Smrg 379009885543Smrg if test "$pre_test_object_deps_done" = no; then 379109885543Smrg case $p in 379209885543Smrg -L* | -R*) 379309885543Smrg # Internal compiler library paths should come after those 379409885543Smrg # provided the user. The postdeps already come after the 379509885543Smrg # user supplied libs so there is no need to process them. 379609885543Smrg if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then 379709885543Smrg _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" 379809885543Smrg else 379909885543Smrg _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" 380009885543Smrg fi 380109885543Smrg ;; 380209885543Smrg # The "-l" case would never come before the object being 380309885543Smrg # linked, so don't bother handling this case. 380409885543Smrg esac 380509885543Smrg else 380609885543Smrg if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then 380709885543Smrg _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}" 380809885543Smrg else 380909885543Smrg _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}" 381009885543Smrg fi 381109885543Smrg fi 381209885543Smrg ;; 381309885543Smrg 381409885543Smrg *.$objext) 381509885543Smrg # This assumes that the test object file only shows up 381609885543Smrg # once in the compiler output. 381709885543Smrg if test "$p" = "conftest.$objext"; then 381809885543Smrg pre_test_object_deps_done=yes 381909885543Smrg continue 382009885543Smrg fi 382109885543Smrg 382209885543Smrg if test "$pre_test_object_deps_done" = no; then 382309885543Smrg if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then 382409885543Smrg _LT_AC_TAGVAR(predep_objects, $1)="$p" 382509885543Smrg else 382609885543Smrg _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p" 382709885543Smrg fi 382809885543Smrg else 382909885543Smrg if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then 383009885543Smrg _LT_AC_TAGVAR(postdep_objects, $1)="$p" 383109885543Smrg else 383209885543Smrg _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p" 383309885543Smrg fi 383409885543Smrg fi 383509885543Smrg ;; 383609885543Smrg 383709885543Smrg *) ;; # Ignore the rest. 383809885543Smrg 383909885543Smrg esac 384009885543Smrg done 384109885543Smrg 384209885543Smrg # Clean up. 384309885543Smrg rm -f a.out a.exe 384409885543Smrgelse 384509885543Smrg echo "libtool.m4: error: problem compiling $1 test program" 384609885543Smrgfi 384709885543Smrg 384809885543Smrg$rm -f confest.$objext 384909885543Smrg 385009885543Smrg# PORTME: override above test on systems where it is broken 385109885543Smrgifelse([$1],[CXX], 385209885543Smrg[case $host_os in 385309885543Smrginterix3*) 385409885543Smrg # Interix 3.5 installs completely hosed .la files for C++, so rather than 385509885543Smrg # hack all around it, let's just trust "g++" to DTRT. 385609885543Smrg _LT_AC_TAGVAR(predep_objects,$1)= 385709885543Smrg _LT_AC_TAGVAR(postdep_objects,$1)= 385809885543Smrg _LT_AC_TAGVAR(postdeps,$1)= 385909885543Smrg ;; 386009885543Smrg 386109885543Smrgsolaris*) 386209885543Smrg case $cc_basename in 386309885543Smrg CC*) 386409885543Smrg # Adding this requires a known-good setup of shared libraries for 386509885543Smrg # Sun compiler versions before 5.6, else PIC objects from an old 386609885543Smrg # archive will be linked into the output, leading to subtle bugs. 386709885543Smrg _LT_AC_TAGVAR(postdeps,$1)='-lCstd -lCrun' 386809885543Smrg ;; 386909885543Smrg esac 387009885543Smrg ;; 387109885543Smrgesac 387209885543Smrg]) 387309885543Smrg 387409885543Smrgcase " $_LT_AC_TAGVAR(postdeps, $1) " in 387509885543Smrg*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;; 387609885543Smrgesac 387709885543Smrg])# AC_LIBTOOL_POSTDEP_PREDEP 387809885543Smrg 387909885543Smrg# AC_LIBTOOL_LANG_F77_CONFIG 388009885543Smrg# -------------------------- 388109885543Smrg# Ensure that the configuration vars for the C compiler are 388209885543Smrg# suitably defined. Those variables are subsequently used by 388309885543Smrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 388409885543SmrgAC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)]) 388509885543SmrgAC_DEFUN([_LT_AC_LANG_F77_CONFIG], 388609885543Smrg[AC_REQUIRE([AC_PROG_F77]) 388709885543SmrgAC_LANG_PUSH(Fortran 77) 388809885543Smrg 388909885543Smrg_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 389009885543Smrg_LT_AC_TAGVAR(allow_undefined_flag, $1)= 389109885543Smrg_LT_AC_TAGVAR(always_export_symbols, $1)=no 389209885543Smrg_LT_AC_TAGVAR(archive_expsym_cmds, $1)= 389309885543Smrg_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= 389409885543Smrg_LT_AC_TAGVAR(hardcode_direct, $1)=no 389509885543Smrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= 389609885543Smrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 389709885543Smrg_LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 389809885543Smrg_LT_AC_TAGVAR(hardcode_minus_L, $1)=no 389909885543Smrg_LT_AC_TAGVAR(hardcode_automatic, $1)=no 390009885543Smrg_LT_AC_TAGVAR(module_cmds, $1)= 390109885543Smrg_LT_AC_TAGVAR(module_expsym_cmds, $1)= 390209885543Smrg_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown 390309885543Smrg_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 390409885543Smrg_LT_AC_TAGVAR(no_undefined_flag, $1)= 390509885543Smrg_LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 390609885543Smrg_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no 390709885543Smrg 390809885543Smrg# Source file extension for f77 test sources. 390909885543Smrgac_ext=f 391009885543Smrg 391109885543Smrg# Object file extension for compiled f77 test sources. 391209885543Smrgobjext=o 391309885543Smrg_LT_AC_TAGVAR(objext, $1)=$objext 391409885543Smrg 391509885543Smrg# Code to be used in simple compile tests 391609885543Smrglt_simple_compile_test_code=" subroutine t\n return\n end\n" 391709885543Smrg 391809885543Smrg# Code to be used in simple link tests 391909885543Smrglt_simple_link_test_code=" program t\n end\n" 392009885543Smrg 392109885543Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 392209885543Smrg_LT_AC_SYS_COMPILER 392309885543Smrg 392409885543Smrg# save warnings/boilerplate of simple test code 392509885543Smrg_LT_COMPILER_BOILERPLATE 392609885543Smrg_LT_LINKER_BOILERPLATE 392709885543Smrg 392809885543Smrg# Allow CC to be a program name with arguments. 392909885543Smrglt_save_CC="$CC" 393009885543SmrgCC=${F77-"f77"} 393109885543Smrgcompiler=$CC 393209885543Smrg_LT_AC_TAGVAR(compiler, $1)=$CC 393309885543Smrg_LT_CC_BASENAME([$compiler]) 393409885543Smrg 393509885543SmrgAC_MSG_CHECKING([if libtool supports shared libraries]) 393609885543SmrgAC_MSG_RESULT([$can_build_shared]) 393709885543Smrg 393809885543SmrgAC_MSG_CHECKING([whether to build shared libraries]) 393909885543Smrgtest "$can_build_shared" = "no" && enable_shared=no 394009885543Smrg 394109885543Smrg# On AIX, shared libraries and static libraries use the same namespace, and 394209885543Smrg# are all built from PIC. 394309885543Smrgcase $host_os in 394409885543Smrgaix3*) 394509885543Smrg test "$enable_shared" = yes && enable_static=no 394609885543Smrg if test -n "$RANLIB"; then 394709885543Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 394809885543Smrg postinstall_cmds='$RANLIB $lib' 394909885543Smrg fi 395009885543Smrg ;; 395109885543Smrgaix4* | aix5*) 395209885543Smrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 395309885543Smrg test "$enable_shared" = yes && enable_static=no 395409885543Smrg fi 395509885543Smrg ;; 395609885543Smrgesac 395709885543SmrgAC_MSG_RESULT([$enable_shared]) 395809885543Smrg 395909885543SmrgAC_MSG_CHECKING([whether to build static libraries]) 396009885543Smrg# Make sure either enable_shared or enable_static is yes. 396109885543Smrgtest "$enable_shared" = yes || enable_static=yes 396209885543SmrgAC_MSG_RESULT([$enable_static]) 396309885543Smrg 396409885543Smrg_LT_AC_TAGVAR(GCC, $1)="$G77" 396509885543Smrg_LT_AC_TAGVAR(LD, $1)="$LD" 396609885543Smrg 396709885543SmrgAC_LIBTOOL_PROG_COMPILER_PIC($1) 396809885543SmrgAC_LIBTOOL_PROG_CC_C_O($1) 396909885543SmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) 397009885543SmrgAC_LIBTOOL_PROG_LD_SHLIBS($1) 397109885543SmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1) 397209885543SmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) 397309885543Smrg 397409885543SmrgAC_LIBTOOL_CONFIG($1) 397509885543Smrg 397609885543SmrgAC_LANG_POP 397709885543SmrgCC="$lt_save_CC" 397809885543Smrg])# AC_LIBTOOL_LANG_F77_CONFIG 397909885543Smrg 398009885543Smrg 398109885543Smrg# AC_LIBTOOL_LANG_GCJ_CONFIG 398209885543Smrg# -------------------------- 398309885543Smrg# Ensure that the configuration vars for the C compiler are 398409885543Smrg# suitably defined. Those variables are subsequently used by 398509885543Smrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 398609885543SmrgAC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)]) 398709885543SmrgAC_DEFUN([_LT_AC_LANG_GCJ_CONFIG], 398809885543Smrg[AC_LANG_SAVE 398909885543Smrg 399009885543Smrg# Source file extension for Java test sources. 399109885543Smrgac_ext=java 399209885543Smrg 399309885543Smrg# Object file extension for compiled Java test sources. 399409885543Smrgobjext=o 399509885543Smrg_LT_AC_TAGVAR(objext, $1)=$objext 399609885543Smrg 399709885543Smrg# Code to be used in simple compile tests 399809885543Smrglt_simple_compile_test_code="class foo {}\n" 399909885543Smrg 400009885543Smrg# Code to be used in simple link tests 400109885543Smrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }\n' 400209885543Smrg 400309885543Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 400409885543Smrg_LT_AC_SYS_COMPILER 400509885543Smrg 400609885543Smrg# save warnings/boilerplate of simple test code 400709885543Smrg_LT_COMPILER_BOILERPLATE 400809885543Smrg_LT_LINKER_BOILERPLATE 400909885543Smrg 401009885543Smrg# Allow CC to be a program name with arguments. 401109885543Smrglt_save_CC="$CC" 401209885543SmrgCC=${GCJ-"gcj"} 401309885543Smrgcompiler=$CC 401409885543Smrg_LT_AC_TAGVAR(compiler, $1)=$CC 401509885543Smrg_LT_CC_BASENAME([$compiler]) 401609885543Smrg 401709885543Smrg# GCJ did not exist at the time GCC didn't implicitly link libc in. 401809885543Smrg_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 401909885543Smrg 402009885543Smrg_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 402109885543Smrg 402209885543SmrgAC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) 402309885543SmrgAC_LIBTOOL_PROG_COMPILER_PIC($1) 402409885543SmrgAC_LIBTOOL_PROG_CC_C_O($1) 402509885543SmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) 402609885543SmrgAC_LIBTOOL_PROG_LD_SHLIBS($1) 402709885543SmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1) 402809885543SmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) 402909885543Smrg 403009885543SmrgAC_LIBTOOL_CONFIG($1) 403109885543Smrg 403209885543SmrgAC_LANG_RESTORE 403309885543SmrgCC="$lt_save_CC" 403409885543Smrg])# AC_LIBTOOL_LANG_GCJ_CONFIG 403509885543Smrg 403609885543Smrg 403709885543Smrg# AC_LIBTOOL_LANG_RC_CONFIG 403809885543Smrg# ------------------------- 403909885543Smrg# Ensure that the configuration vars for the Windows resource compiler are 404009885543Smrg# suitably defined. Those variables are subsequently used by 404109885543Smrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 404209885543SmrgAC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)]) 404309885543SmrgAC_DEFUN([_LT_AC_LANG_RC_CONFIG], 404409885543Smrg[AC_LANG_SAVE 404509885543Smrg 404609885543Smrg# Source file extension for RC test sources. 404709885543Smrgac_ext=rc 404809885543Smrg 404909885543Smrg# Object file extension for compiled RC test sources. 405009885543Smrgobjext=o 405109885543Smrg_LT_AC_TAGVAR(objext, $1)=$objext 405209885543Smrg 405309885543Smrg# Code to be used in simple compile tests 405409885543Smrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n' 405509885543Smrg 405609885543Smrg# Code to be used in simple link tests 405709885543Smrglt_simple_link_test_code="$lt_simple_compile_test_code" 405809885543Smrg 405909885543Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 406009885543Smrg_LT_AC_SYS_COMPILER 406109885543Smrg 406209885543Smrg# save warnings/boilerplate of simple test code 406309885543Smrg_LT_COMPILER_BOILERPLATE 406409885543Smrg_LT_LINKER_BOILERPLATE 406509885543Smrg 406609885543Smrg# Allow CC to be a program name with arguments. 406709885543Smrglt_save_CC="$CC" 406809885543SmrgCC=${RC-"windres"} 406909885543Smrgcompiler=$CC 407009885543Smrg_LT_AC_TAGVAR(compiler, $1)=$CC 407109885543Smrg_LT_CC_BASENAME([$compiler]) 407209885543Smrg_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 407309885543Smrg 407409885543SmrgAC_LIBTOOL_CONFIG($1) 407509885543Smrg 407609885543SmrgAC_LANG_RESTORE 407709885543SmrgCC="$lt_save_CC" 407809885543Smrg])# AC_LIBTOOL_LANG_RC_CONFIG 407909885543Smrg 408009885543Smrg 408109885543Smrg# AC_LIBTOOL_CONFIG([TAGNAME]) 408209885543Smrg# ---------------------------- 408309885543Smrg# If TAGNAME is not passed, then create an initial libtool script 408409885543Smrg# with a default configuration from the untagged config vars. Otherwise 408509885543Smrg# add code to config.status for appending the configuration named by 408609885543Smrg# TAGNAME from the matching tagged config vars. 408709885543SmrgAC_DEFUN([AC_LIBTOOL_CONFIG], 408809885543Smrg[# The else clause should only fire when bootstrapping the 408909885543Smrg# libtool distribution, otherwise you forgot to ship ltmain.sh 409009885543Smrg# with your package, and you will get complaints that there are 409109885543Smrg# no rules to generate ltmain.sh. 409209885543Smrgif test -f "$ltmain"; then 409309885543Smrg # See if we are running on zsh, and set the options which allow our commands through 409409885543Smrg # without removal of \ escapes. 409509885543Smrg if test -n "${ZSH_VERSION+set}" ; then 409609885543Smrg setopt NO_GLOB_SUBST 409709885543Smrg fi 409809885543Smrg # Now quote all the things that may contain metacharacters while being 409909885543Smrg # careful not to overquote the AC_SUBSTed values. We take copies of the 410009885543Smrg # variables and quote the copies for generation of the libtool script. 410109885543Smrg for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ 410209885543Smrg SED SHELL STRIP \ 410309885543Smrg libname_spec library_names_spec soname_spec extract_expsyms_cmds \ 410409885543Smrg old_striplib striplib file_magic_cmd finish_cmds finish_eval \ 410509885543Smrg deplibs_check_method reload_flag reload_cmds need_locks \ 410609885543Smrg lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ 410709885543Smrg lt_cv_sys_global_symbol_to_c_name_address \ 410809885543Smrg sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ 410909885543Smrg old_postinstall_cmds old_postuninstall_cmds \ 411009885543Smrg _LT_AC_TAGVAR(compiler, $1) \ 411109885543Smrg _LT_AC_TAGVAR(CC, $1) \ 411209885543Smrg _LT_AC_TAGVAR(LD, $1) \ 411309885543Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \ 411409885543Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \ 411509885543Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \ 411609885543Smrg _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \ 411709885543Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \ 411809885543Smrg _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \ 411909885543Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \ 412009885543Smrg _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \ 412109885543Smrg _LT_AC_TAGVAR(old_archive_cmds, $1) \ 412209885543Smrg _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \ 412309885543Smrg _LT_AC_TAGVAR(predep_objects, $1) \ 412409885543Smrg _LT_AC_TAGVAR(postdep_objects, $1) \ 412509885543Smrg _LT_AC_TAGVAR(predeps, $1) \ 412609885543Smrg _LT_AC_TAGVAR(postdeps, $1) \ 412709885543Smrg _LT_AC_TAGVAR(compiler_lib_search_path, $1) \ 412809885543Smrg _LT_AC_TAGVAR(archive_cmds, $1) \ 412909885543Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1) \ 413009885543Smrg _LT_AC_TAGVAR(postinstall_cmds, $1) \ 413109885543Smrg _LT_AC_TAGVAR(postuninstall_cmds, $1) \ 413209885543Smrg _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \ 413309885543Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1) \ 413409885543Smrg _LT_AC_TAGVAR(no_undefined_flag, $1) \ 413509885543Smrg _LT_AC_TAGVAR(export_symbols_cmds, $1) \ 413609885543Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \ 413709885543Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \ 413809885543Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \ 413909885543Smrg _LT_AC_TAGVAR(hardcode_automatic, $1) \ 414009885543Smrg _LT_AC_TAGVAR(module_cmds, $1) \ 414109885543Smrg _LT_AC_TAGVAR(module_expsym_cmds, $1) \ 414209885543Smrg _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \ 414309885543Smrg _LT_AC_TAGVAR(exclude_expsyms, $1) \ 414409885543Smrg _LT_AC_TAGVAR(include_expsyms, $1); do 414509885543Smrg 414609885543Smrg case $var in 414709885543Smrg _LT_AC_TAGVAR(old_archive_cmds, $1) | \ 414809885543Smrg _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \ 414909885543Smrg _LT_AC_TAGVAR(archive_cmds, $1) | \ 415009885543Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \ 415109885543Smrg _LT_AC_TAGVAR(module_cmds, $1) | \ 415209885543Smrg _LT_AC_TAGVAR(module_expsym_cmds, $1) | \ 415309885543Smrg _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \ 415409885543Smrg _LT_AC_TAGVAR(export_symbols_cmds, $1) | \ 415509885543Smrg extract_expsyms_cmds | reload_cmds | finish_cmds | \ 415609885543Smrg postinstall_cmds | postuninstall_cmds | \ 415709885543Smrg old_postinstall_cmds | old_postuninstall_cmds | \ 415809885543Smrg sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) 415909885543Smrg # Double-quote double-evaled strings. 416009885543Smrg eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" 416109885543Smrg ;; 416209885543Smrg *) 416309885543Smrg eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" 416409885543Smrg ;; 416509885543Smrg esac 416609885543Smrg done 416709885543Smrg 416809885543Smrg case $lt_echo in 416909885543Smrg *'\[$]0 --fallback-echo"') 417009885543Smrg lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'` 417109885543Smrg ;; 417209885543Smrg esac 417309885543Smrg 417409885543Smrgifelse([$1], [], 417509885543Smrg [cfgfile="${ofile}T" 417609885543Smrg trap "$rm \"$cfgfile\"; exit 1" 1 2 15 417709885543Smrg $rm -f "$cfgfile" 417809885543Smrg AC_MSG_NOTICE([creating $ofile])], 417909885543Smrg [cfgfile="$ofile"]) 418009885543Smrg 418109885543Smrg cat <<__EOF__ >> "$cfgfile" 418209885543Smrgifelse([$1], [], 418309885543Smrg[#! $SHELL 418409885543Smrg 418509885543Smrg# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. 418609885543Smrg# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) 418709885543Smrg# NOTE: Changes made to this file will be lost: look at ltmain.sh. 418809885543Smrg# 418909885543Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 419009885543Smrg# Free Software Foundation, Inc. 419109885543Smrg# 419209885543Smrg# This file is part of GNU Libtool: 419309885543Smrg# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 419409885543Smrg# 419509885543Smrg# This program is free software; you can redistribute it and/or modify 419609885543Smrg# it under the terms of the GNU General Public License as published by 419709885543Smrg# the Free Software Foundation; either version 2 of the License, or 419809885543Smrg# (at your option) any later version. 419909885543Smrg# 420009885543Smrg# This program is distributed in the hope that it will be useful, but 420109885543Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 420209885543Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 420309885543Smrg# General Public License for more details. 420409885543Smrg# 420509885543Smrg# You should have received a copy of the GNU General Public License 420609885543Smrg# along with this program; if not, write to the Free Software 420709885543Smrg# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 420809885543Smrg# 420909885543Smrg# As a special exception to the GNU General Public License, if you 421009885543Smrg# distribute this file as part of a program that contains a 421109885543Smrg# configuration script generated by Autoconf, you may include it under 421209885543Smrg# the same distribution terms that you use for the rest of that program. 421309885543Smrg 421409885543Smrg# A sed program that does not truncate output. 421509885543SmrgSED=$lt_SED 421609885543Smrg 421709885543Smrg# Sed that helps us avoid accidentally triggering echo(1) options like -n. 421809885543SmrgXsed="$SED -e 1s/^X//" 421909885543Smrg 422009885543Smrg# The HP-UX ksh and POSIX shell print the target directory to stdout 422109885543Smrg# if CDPATH is set. 422209885543Smrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 422309885543Smrg 422409885543Smrg# The names of the tagged configurations supported by this script. 422509885543Smrgavailable_tags= 422609885543Smrg 422709885543Smrg# ### BEGIN LIBTOOL CONFIG], 422809885543Smrg[# ### BEGIN LIBTOOL TAG CONFIG: $tagname]) 422909885543Smrg 423009885543Smrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 423109885543Smrg 423209885543Smrg# Shell to use when invoking shell scripts. 423309885543SmrgSHELL=$lt_SHELL 423409885543Smrg 423509885543Smrg# Whether or not to build shared libraries. 423609885543Smrgbuild_libtool_libs=$enable_shared 423709885543Smrg 423809885543Smrg# Whether or not to build static libraries. 423909885543Smrgbuild_old_libs=$enable_static 424009885543Smrg 424109885543Smrg# Whether or not to add -lc for building shared libraries. 424209885543Smrgbuild_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1) 424309885543Smrg 424409885543Smrg# Whether or not to disallow shared libs when runtime libs are static 424509885543Smrgallow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) 424609885543Smrg 424709885543Smrg# Whether or not to optimize for fast installation. 424809885543Smrgfast_install=$enable_fast_install 424909885543Smrg 425009885543Smrg# The host system. 425109885543Smrghost_alias=$host_alias 425209885543Smrghost=$host 425309885543Smrghost_os=$host_os 425409885543Smrg 425509885543Smrg# The build system. 425609885543Smrgbuild_alias=$build_alias 425709885543Smrgbuild=$build 425809885543Smrgbuild_os=$build_os 425909885543Smrg 426009885543Smrg# An echo program that does not interpret backslashes. 426109885543Smrgecho=$lt_echo 426209885543Smrg 426309885543Smrg# The archiver. 426409885543SmrgAR=$lt_AR 426509885543SmrgAR_FLAGS=$lt_AR_FLAGS 426609885543Smrg 426709885543Smrg# A C compiler. 426809885543SmrgLTCC=$lt_LTCC 426909885543Smrg 427009885543Smrg# LTCC compiler flags. 427109885543SmrgLTCFLAGS=$lt_LTCFLAGS 427209885543Smrg 427309885543Smrg# A language-specific compiler. 427409885543SmrgCC=$lt_[]_LT_AC_TAGVAR(compiler, $1) 427509885543Smrg 427609885543Smrg# Is the compiler the GNU C compiler? 427709885543Smrgwith_gcc=$_LT_AC_TAGVAR(GCC, $1) 427809885543Smrg 427909885543Smrg# An ERE matcher. 428009885543SmrgEGREP=$lt_EGREP 428109885543Smrg 428209885543Smrg# The linker used to build libraries. 428309885543SmrgLD=$lt_[]_LT_AC_TAGVAR(LD, $1) 428409885543Smrg 428509885543Smrg# Whether we need hard or soft links. 428609885543SmrgLN_S=$lt_LN_S 428709885543Smrg 428809885543Smrg# A BSD-compatible nm program. 428909885543SmrgNM=$lt_NM 429009885543Smrg 429109885543Smrg# A symbol stripping program 429209885543SmrgSTRIP=$lt_STRIP 429309885543Smrg 429409885543Smrg# Used to examine libraries when file_magic_cmd begins "file" 429509885543SmrgMAGIC_CMD=$MAGIC_CMD 429609885543Smrg 429709885543Smrg# Used on cygwin: DLL creation program. 429809885543SmrgDLLTOOL="$DLLTOOL" 429909885543Smrg 430009885543Smrg# Used on cygwin: object dumper. 430109885543SmrgOBJDUMP="$OBJDUMP" 430209885543Smrg 430309885543Smrg# Used on cygwin: assembler. 430409885543SmrgAS="$AS" 430509885543Smrg 430609885543Smrg# The name of the directory that contains temporary libtool files. 430709885543Smrgobjdir=$objdir 430809885543Smrg 430909885543Smrg# How to create reloadable object files. 431009885543Smrgreload_flag=$lt_reload_flag 431109885543Smrgreload_cmds=$lt_reload_cmds 431209885543Smrg 431309885543Smrg# How to pass a linker flag through the compiler. 431409885543Smrgwl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) 431509885543Smrg 431609885543Smrg# Object file suffix (normally "o"). 431709885543Smrgobjext="$ac_objext" 431809885543Smrg 431909885543Smrg# Old archive suffix (normally "a"). 432009885543Smrglibext="$libext" 432109885543Smrg 432209885543Smrg# Shared library suffix (normally ".so"). 432309885543Smrgshrext_cmds='$shrext_cmds' 432409885543Smrg 432509885543Smrg# Executable file suffix (normally ""). 432609885543Smrgexeext="$exeext" 432709885543Smrg 432809885543Smrg# Additional compiler flags for building library objects. 432909885543Smrgpic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) 433009885543Smrgpic_mode=$pic_mode 433109885543Smrg 433209885543Smrg# What is the maximum length of a command? 433309885543Smrgmax_cmd_len=$lt_cv_sys_max_cmd_len 433409885543Smrg 433509885543Smrg# Does compiler simultaneously support -c and -o options? 433609885543Smrgcompiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) 433709885543Smrg 433809885543Smrg# Must we lock files when doing compilation? 433909885543Smrgneed_locks=$lt_need_locks 434009885543Smrg 434109885543Smrg# Do we need the lib prefix for modules? 434209885543Smrgneed_lib_prefix=$need_lib_prefix 434309885543Smrg 434409885543Smrg# Do we need a version for libraries? 434509885543Smrgneed_version=$need_version 434609885543Smrg 434709885543Smrg# Whether dlopen is supported. 434809885543Smrgdlopen_support=$enable_dlopen 434909885543Smrg 435009885543Smrg# Whether dlopen of programs is supported. 435109885543Smrgdlopen_self=$enable_dlopen_self 435209885543Smrg 435309885543Smrg# Whether dlopen of statically linked programs is supported. 435409885543Smrgdlopen_self_static=$enable_dlopen_self_static 435509885543Smrg 435609885543Smrg# Compiler flag to prevent dynamic linking. 435709885543Smrglink_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1) 435809885543Smrg 435909885543Smrg# Compiler flag to turn off builtin functions. 436009885543Smrgno_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) 436109885543Smrg 436209885543Smrg# Compiler flag to allow reflexive dlopens. 436309885543Smrgexport_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1) 436409885543Smrg 436509885543Smrg# Compiler flag to generate shared objects directly from archives. 436609885543Smrgwhole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1) 436709885543Smrg 436809885543Smrg# Compiler flag to generate thread-safe objects. 436909885543Smrgthread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1) 437009885543Smrg 437109885543Smrg# Library versioning type. 437209885543Smrgversion_type=$version_type 437309885543Smrg 437409885543Smrg# Format of library name prefix. 437509885543Smrglibname_spec=$lt_libname_spec 437609885543Smrg 437709885543Smrg# List of archive names. First name is the real one, the rest are links. 437809885543Smrg# The last name is the one that the linker finds with -lNAME. 437909885543Smrglibrary_names_spec=$lt_library_names_spec 438009885543Smrg 438109885543Smrg# The coded name of the library, if different from the real name. 438209885543Smrgsoname_spec=$lt_soname_spec 438309885543Smrg 438409885543Smrg# Commands used to build and install an old-style archive. 438509885543SmrgRANLIB=$lt_RANLIB 438609885543Smrgold_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1) 438709885543Smrgold_postinstall_cmds=$lt_old_postinstall_cmds 438809885543Smrgold_postuninstall_cmds=$lt_old_postuninstall_cmds 438909885543Smrg 439009885543Smrg# Create an old-style archive from a shared archive. 439109885543Smrgold_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1) 439209885543Smrg 439309885543Smrg# Create a temporary old-style archive to link instead of a shared archive. 439409885543Smrgold_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) 439509885543Smrg 439609885543Smrg# Commands used to build and install a shared archive. 439709885543Smrgarchive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1) 439809885543Smrgarchive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1) 439909885543Smrgpostinstall_cmds=$lt_postinstall_cmds 440009885543Smrgpostuninstall_cmds=$lt_postuninstall_cmds 440109885543Smrg 440209885543Smrg# Commands used to build a loadable module (assumed same as above if empty) 440309885543Smrgmodule_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1) 440409885543Smrgmodule_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1) 440509885543Smrg 440609885543Smrg# Commands to strip libraries. 440709885543Smrgold_striplib=$lt_old_striplib 440809885543Smrgstriplib=$lt_striplib 440909885543Smrg 441009885543Smrg# Dependencies to place before the objects being linked to create a 441109885543Smrg# shared library. 441209885543Smrgpredep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1) 441309885543Smrg 441409885543Smrg# Dependencies to place after the objects being linked to create a 441509885543Smrg# shared library. 441609885543Smrgpostdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1) 441709885543Smrg 441809885543Smrg# Dependencies to place before the objects being linked to create a 441909885543Smrg# shared library. 442009885543Smrgpredeps=$lt_[]_LT_AC_TAGVAR(predeps, $1) 442109885543Smrg 442209885543Smrg# Dependencies to place after the objects being linked to create a 442309885543Smrg# shared library. 442409885543Smrgpostdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1) 442509885543Smrg 442609885543Smrg# The library search path used internally by the compiler when linking 442709885543Smrg# a shared library. 442809885543Smrgcompiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1) 442909885543Smrg 443009885543Smrg# Method to check whether dependent libraries are shared objects. 443109885543Smrgdeplibs_check_method=$lt_deplibs_check_method 443209885543Smrg 443309885543Smrg# Command to use when deplibs_check_method == file_magic. 443409885543Smrgfile_magic_cmd=$lt_file_magic_cmd 443509885543Smrg 443609885543Smrg# Flag that allows shared libraries with undefined symbols to be built. 443709885543Smrgallow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1) 443809885543Smrg 443909885543Smrg# Flag that forces no undefined symbols. 444009885543Smrgno_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1) 444109885543Smrg 444209885543Smrg# Commands used to finish a libtool library installation in a directory. 444309885543Smrgfinish_cmds=$lt_finish_cmds 444409885543Smrg 444509885543Smrg# Same as above, but a single script fragment to be evaled but not shown. 444609885543Smrgfinish_eval=$lt_finish_eval 444709885543Smrg 444809885543Smrg# Take the output of nm and produce a listing of raw symbols and C names. 444909885543Smrgglobal_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe 445009885543Smrg 445109885543Smrg# Transform the output of nm in a proper C declaration 445209885543Smrgglobal_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl 445309885543Smrg 445409885543Smrg# Transform the output of nm in a C name address pair 445509885543Smrgglobal_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address 445609885543Smrg 445709885543Smrg# This is the shared library runtime path variable. 445809885543Smrgrunpath_var=$runpath_var 445909885543Smrg 446009885543Smrg# This is the shared library path variable. 446109885543Smrgshlibpath_var=$shlibpath_var 446209885543Smrg 446309885543Smrg# Is shlibpath searched before the hard-coded library search path? 446409885543Smrgshlibpath_overrides_runpath=$shlibpath_overrides_runpath 446509885543Smrg 446609885543Smrg# How to hardcode a shared library path into an executable. 446709885543Smrghardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1) 446809885543Smrg 446909885543Smrg# Whether we should hardcode library paths into libraries. 447009885543Smrghardcode_into_libs=$hardcode_into_libs 447109885543Smrg 447209885543Smrg# Flag to hardcode \$libdir into a binary during linking. 447309885543Smrg# This must work even if \$libdir does not exist. 447409885543Smrghardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) 447509885543Smrg 447609885543Smrg# If ld is used when linking, flag to hardcode \$libdir into 447709885543Smrg# a binary during linking. This must work even if \$libdir does 447809885543Smrg# not exist. 447909885543Smrghardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) 448009885543Smrg 448109885543Smrg# Whether we need a single -rpath flag with a separated argument. 448209885543Smrghardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1) 448309885543Smrg 448409885543Smrg# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the 448509885543Smrg# resulting binary. 448609885543Smrghardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1) 448709885543Smrg 448809885543Smrg# Set to yes if using the -LDIR flag during linking hardcodes DIR into the 448909885543Smrg# resulting binary. 449009885543Smrghardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1) 449109885543Smrg 449209885543Smrg# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into 449309885543Smrg# the resulting binary. 449409885543Smrghardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1) 449509885543Smrg 449609885543Smrg# Set to yes if building a shared library automatically hardcodes DIR into the library 449709885543Smrg# and all subsequent libraries and executables linked against it. 449809885543Smrghardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1) 449909885543Smrg 450009885543Smrg# Variables whose values should be saved in libtool wrapper scripts and 450109885543Smrg# restored at relink time. 450209885543Smrgvariables_saved_for_relink="$variables_saved_for_relink" 450309885543Smrg 450409885543Smrg# Whether libtool must link a program against all its dependency libraries. 450509885543Smrglink_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1) 450609885543Smrg 450709885543Smrg# Compile-time system search path for libraries 450809885543Smrgsys_lib_search_path_spec=$lt_sys_lib_search_path_spec 450909885543Smrg 451009885543Smrg# Run-time system search path for libraries 451109885543Smrgsys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec 451209885543Smrg 451309885543Smrg# Fix the shell variable \$srcfile for the compiler. 451409885543Smrgfix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)" 451509885543Smrg 451609885543Smrg# Set to yes if exported symbols are required. 451709885543Smrgalways_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1) 451809885543Smrg 451909885543Smrg# The commands to list exported symbols. 452009885543Smrgexport_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1) 452109885543Smrg 452209885543Smrg# The commands to extract the exported symbol list from a shared archive. 452309885543Smrgextract_expsyms_cmds=$lt_extract_expsyms_cmds 452409885543Smrg 452509885543Smrg# Symbols that should not be listed in the preloaded symbols. 452609885543Smrgexclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1) 452709885543Smrg 452809885543Smrg# Symbols that must always be exported. 452909885543Smrginclude_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1) 453009885543Smrg 453109885543Smrgifelse([$1],[], 453209885543Smrg[# ### END LIBTOOL CONFIG], 453309885543Smrg[# ### END LIBTOOL TAG CONFIG: $tagname]) 453409885543Smrg 453509885543Smrg__EOF__ 453609885543Smrg 453709885543Smrgifelse([$1],[], [ 453809885543Smrg case $host_os in 453909885543Smrg aix3*) 454009885543Smrg cat <<\EOF >> "$cfgfile" 454109885543Smrg 454209885543Smrg# AIX sometimes has problems with the GCC collect2 program. For some 454309885543Smrg# reason, if we set the COLLECT_NAMES environment variable, the problems 454409885543Smrg# vanish in a puff of smoke. 454509885543Smrgif test "X${COLLECT_NAMES+set}" != Xset; then 454609885543Smrg COLLECT_NAMES= 454709885543Smrg export COLLECT_NAMES 454809885543Smrgfi 454909885543SmrgEOF 455009885543Smrg ;; 455109885543Smrg esac 455209885543Smrg 455309885543Smrg # We use sed instead of cat because bash on DJGPP gets confused if 455409885543Smrg # if finds mixed CR/LF and LF-only lines. Since sed operates in 455509885543Smrg # text mode, it properly converts lines to CR/LF. This bash problem 455609885543Smrg # is reportedly fixed, but why not run on old versions too? 455709885543Smrg sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1) 455809885543Smrg 455909885543Smrg mv -f "$cfgfile" "$ofile" || \ 456009885543Smrg (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 456109885543Smrg chmod +x "$ofile" 456209885543Smrg]) 456309885543Smrgelse 456409885543Smrg # If there is no Makefile yet, we rely on a make rule to execute 456509885543Smrg # `config.status --recheck' to rerun these tests and create the 456609885543Smrg # libtool script then. 456709885543Smrg ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` 456809885543Smrg if test -f "$ltmain_in"; then 456909885543Smrg test -f Makefile && make "$ltmain" 457009885543Smrg fi 457109885543Smrgfi 457209885543Smrg])# AC_LIBTOOL_CONFIG 457309885543Smrg 457409885543Smrg 457509885543Smrg# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME]) 457609885543Smrg# ------------------------------------------- 457709885543SmrgAC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], 457809885543Smrg[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl 457909885543Smrg 458009885543Smrg_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 458109885543Smrg 458209885543Smrgif test "$GCC" = yes; then 458309885543Smrg _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 458409885543Smrg 458509885543Smrg AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 458609885543Smrg lt_cv_prog_compiler_rtti_exceptions, 458709885543Smrg [-fno-rtti -fno-exceptions], [], 458809885543Smrg [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 458909885543Smrgfi 459009885543Smrg])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI 459109885543Smrg 459209885543Smrg 459309885543Smrg# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE 459409885543Smrg# --------------------------------- 459509885543SmrgAC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], 459609885543Smrg[AC_REQUIRE([AC_CANONICAL_HOST]) 459709885543SmrgAC_REQUIRE([AC_PROG_NM]) 459809885543SmrgAC_REQUIRE([AC_OBJEXT]) 459909885543Smrg# Check for command to grab the raw symbol name followed by C symbol from nm. 460009885543SmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object]) 460109885543SmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 460209885543Smrg[ 460309885543Smrg# These are sane defaults that work on at least a few old systems. 460409885543Smrg# [They come from Ultrix. What could be older than Ultrix?!! ;)] 460509885543Smrg 460609885543Smrg# Character class describing NM global symbol codes. 460709885543Smrgsymcode='[[BCDEGRST]]' 460809885543Smrg 460909885543Smrg# Regexp to match symbols that can be accessed directly from C. 461009885543Smrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 461109885543Smrg 461209885543Smrg# Transform an extracted symbol line into a proper C declaration 461309885543Smrglt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'" 461409885543Smrg 461509885543Smrg# Transform an extracted symbol line into symbol name and symbol address 461609885543Smrglt_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'" 461709885543Smrg 461809885543Smrg# Define system-specific variables. 461909885543Smrgcase $host_os in 462009885543Smrgaix*) 462109885543Smrg symcode='[[BCDT]]' 462209885543Smrg ;; 462309885543Smrgcygwin* | mingw* | pw32*) 462409885543Smrg symcode='[[ABCDGISTW]]' 462509885543Smrg ;; 462609885543Smrghpux*) # Its linker distinguishes data from code symbols 462709885543Smrg if test "$host_cpu" = ia64; then 462809885543Smrg symcode='[[ABCDEGRST]]' 462909885543Smrg fi 463009885543Smrg lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 463109885543Smrg 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'" 463209885543Smrg ;; 463309885543Smrglinux* | k*bsd*-gnu) 463409885543Smrg if test "$host_cpu" = ia64; then 463509885543Smrg symcode='[[ABCDGIRSTW]]' 463609885543Smrg lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 463709885543Smrg 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'" 463809885543Smrg fi 463909885543Smrg ;; 464009885543Smrgirix* | nonstopux*) 464109885543Smrg symcode='[[BCDEGRST]]' 464209885543Smrg ;; 464309885543Smrgosf*) 464409885543Smrg symcode='[[BCDEGQRST]]' 464509885543Smrg ;; 464609885543Smrgsolaris*) 464709885543Smrg symcode='[[BDRT]]' 464809885543Smrg ;; 464909885543Smrgsco3.2v5*) 465009885543Smrg symcode='[[DT]]' 465109885543Smrg ;; 465209885543Smrgsysv4.2uw2*) 465309885543Smrg symcode='[[DT]]' 465409885543Smrg ;; 465509885543Smrgsysv5* | sco5v6* | unixware* | OpenUNIX*) 465609885543Smrg symcode='[[ABDT]]' 465709885543Smrg ;; 465809885543Smrgsysv4) 465909885543Smrg symcode='[[DFNSTU]]' 466009885543Smrg ;; 466109885543Smrgesac 466209885543Smrg 466309885543Smrg# Handle CRLF in mingw tool chain 466409885543Smrgopt_cr= 466509885543Smrgcase $build_os in 466609885543Smrgmingw*) 466709885543Smrg opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp 466809885543Smrg ;; 466909885543Smrgesac 467009885543Smrg 467109885543Smrg# If we're using GNU nm, then use its standard symbol codes. 467209885543Smrgcase `$NM -V 2>&1` in 467309885543Smrg*GNU* | *'with BFD'*) 467409885543Smrg symcode='[[ABCDGIRSTW]]' ;; 467509885543Smrgesac 467609885543Smrg 467709885543Smrg# Try without a prefix undercore, then with it. 467809885543Smrgfor ac_symprfx in "" "_"; do 467909885543Smrg 468009885543Smrg # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 468109885543Smrg symxfrm="\\1 $ac_symprfx\\2 \\2" 468209885543Smrg 468309885543Smrg # Write the raw and C identifiers. 468409885543Smrg lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 468509885543Smrg 468609885543Smrg # Check to see that the pipe works correctly. 468709885543Smrg pipe_works=no 468809885543Smrg 468909885543Smrg rm -f conftest* 469009885543Smrg cat > conftest.$ac_ext <<EOF 469109885543Smrg#ifdef __cplusplus 469209885543Smrgextern "C" { 469309885543Smrg#endif 469409885543Smrgchar nm_test_var; 469509885543Smrgvoid nm_test_func(){} 469609885543Smrg#ifdef __cplusplus 469709885543Smrg} 469809885543Smrg#endif 469909885543Smrgint main(){nm_test_var='a';nm_test_func();return(0);} 470009885543SmrgEOF 470109885543Smrg 470209885543Smrg if AC_TRY_EVAL(ac_compile); then 470309885543Smrg # Now try to grab the symbols. 470409885543Smrg nlist=conftest.nm 470509885543Smrg if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then 470609885543Smrg # Try sorting and uniquifying the output. 470709885543Smrg if sort "$nlist" | uniq > "$nlist"T; then 470809885543Smrg mv -f "$nlist"T "$nlist" 470909885543Smrg else 471009885543Smrg rm -f "$nlist"T 471109885543Smrg fi 471209885543Smrg 471309885543Smrg # Make sure that we snagged all the symbols we need. 471409885543Smrg if grep ' nm_test_var$' "$nlist" >/dev/null; then 471509885543Smrg if grep ' nm_test_func$' "$nlist" >/dev/null; then 471609885543Smrg cat <<EOF > conftest.$ac_ext 471709885543Smrg#ifdef __cplusplus 471809885543Smrgextern "C" { 471909885543Smrg#endif 472009885543Smrg 472109885543SmrgEOF 472209885543Smrg # Now generate the symbol file. 472309885543Smrg eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' 472409885543Smrg 472509885543Smrg cat <<EOF >> conftest.$ac_ext 472609885543Smrg#if defined (__STDC__) && __STDC__ 472709885543Smrg# define lt_ptr_t void * 472809885543Smrg#else 472909885543Smrg# define lt_ptr_t char * 473009885543Smrg# define const 473109885543Smrg#endif 473209885543Smrg 473309885543Smrg/* The mapping between symbol names and symbols. */ 473409885543Smrgconst struct { 473509885543Smrg const char *name; 473609885543Smrg lt_ptr_t address; 473709885543Smrg} 473809885543Smrglt_preloaded_symbols[[]] = 473909885543Smrg{ 474009885543SmrgEOF 474109885543Smrg $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext 474209885543Smrg cat <<\EOF >> conftest.$ac_ext 474309885543Smrg {0, (lt_ptr_t) 0} 474409885543Smrg}; 474509885543Smrg 474609885543Smrg#ifdef __cplusplus 474709885543Smrg} 474809885543Smrg#endif 474909885543SmrgEOF 475009885543Smrg # Now try linking the two files. 475109885543Smrg mv conftest.$ac_objext conftstm.$ac_objext 475209885543Smrg lt_save_LIBS="$LIBS" 475309885543Smrg lt_save_CFLAGS="$CFLAGS" 475409885543Smrg LIBS="conftstm.$ac_objext" 475509885543Smrg CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 475609885543Smrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then 475709885543Smrg pipe_works=yes 475809885543Smrg fi 475909885543Smrg LIBS="$lt_save_LIBS" 476009885543Smrg CFLAGS="$lt_save_CFLAGS" 476109885543Smrg else 476209885543Smrg echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 476309885543Smrg fi 476409885543Smrg else 476509885543Smrg echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 476609885543Smrg fi 476709885543Smrg else 476809885543Smrg echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 476909885543Smrg fi 477009885543Smrg else 477109885543Smrg echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 477209885543Smrg cat conftest.$ac_ext >&5 477309885543Smrg fi 477409885543Smrg rm -f conftest* conftst* 477509885543Smrg 477609885543Smrg # Do not use the global_symbol_pipe unless it works. 477709885543Smrg if test "$pipe_works" = yes; then 477809885543Smrg break 477909885543Smrg else 478009885543Smrg lt_cv_sys_global_symbol_pipe= 478109885543Smrg fi 478209885543Smrgdone 478309885543Smrg]) 478409885543Smrgif test -z "$lt_cv_sys_global_symbol_pipe"; then 478509885543Smrg lt_cv_sys_global_symbol_to_cdecl= 478609885543Smrgfi 478709885543Smrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 478809885543Smrg AC_MSG_RESULT(failed) 478909885543Smrgelse 479009885543Smrg AC_MSG_RESULT(ok) 479109885543Smrgfi 479209885543Smrg]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE 479309885543Smrg 479409885543Smrg 479509885543Smrg# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME]) 479609885543Smrg# --------------------------------------- 479709885543SmrgAC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC], 479809885543Smrg[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)= 479909885543Smrg_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 480009885543Smrg_LT_AC_TAGVAR(lt_prog_compiler_static, $1)= 480109885543Smrg 480209885543SmrgAC_MSG_CHECKING([for $compiler option to produce PIC]) 480309885543Smrg ifelse([$1],[CXX],[ 480409885543Smrg # C++ specific cases for pic, static, wl, etc. 480509885543Smrg if test "$GXX" = yes; then 480609885543Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 480709885543Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' 480809885543Smrg 480909885543Smrg case $host_os in 481009885543Smrg aix*) 481109885543Smrg # All AIX code is PIC. 481209885543Smrg if test "$host_cpu" = ia64; then 481309885543Smrg # AIX 5 now supports IA64 processor 481409885543Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 481509885543Smrg fi 481609885543Smrg ;; 481709885543Smrg amigaos*) 481809885543Smrg # FIXME: we need at least 68020 code to build shared libraries, but 481909885543Smrg # adding the `-m68020' flag to GCC prevents building anything better, 482009885543Smrg # like `-m68040'. 482109885543Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 482209885543Smrg ;; 482309885543Smrg beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 482409885543Smrg # PIC is the default for these OSes. 482509885543Smrg ;; 482609885543Smrg mingw* | os2* | pw32*) 482709885543Smrg # This hack is so that the source file can tell whether it is being 482809885543Smrg # built for inclusion in a dll (and should export symbols for example). 482909885543Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' 483009885543Smrg ;; 483109885543Smrg darwin* | rhapsody*) 483209885543Smrg # PIC is the default on this platform 483309885543Smrg # Common symbols not allowed in MH_DYLIB files 483409885543Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 483509885543Smrg ;; 483609885543Smrg *djgpp*) 483709885543Smrg # DJGPP does not support shared libraries at all 483809885543Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 483909885543Smrg ;; 484009885543Smrg interix3*) 484109885543Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 484209885543Smrg # Instead, we relocate shared libraries at runtime. 484309885543Smrg ;; 484409885543Smrg sysv4*MP*) 484509885543Smrg if test -d /usr/nec; then 484609885543Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 484709885543Smrg fi 484809885543Smrg ;; 484909885543Smrg hpux*) 485009885543Smrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 485109885543Smrg # not for PA HP-UX. 485209885543Smrg case $host_cpu in 485309885543Smrg hppa*64*|ia64*) 485409885543Smrg ;; 485509885543Smrg *) 485609885543Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 485709885543Smrg ;; 485809885543Smrg esac 485909885543Smrg ;; 486009885543Smrg *) 486109885543Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 486209885543Smrg ;; 486309885543Smrg esac 486409885543Smrg else 486509885543Smrg case $host_os in 486609885543Smrg aix4* | aix5*) 486709885543Smrg # All AIX code is PIC. 486809885543Smrg if test "$host_cpu" = ia64; then 486909885543Smrg # AIX 5 now supports IA64 processor 487009885543Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 487109885543Smrg else 487209885543Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 487309885543Smrg fi 487409885543Smrg ;; 487509885543Smrg chorus*) 487609885543Smrg case $cc_basename in 487709885543Smrg cxch68*) 487809885543Smrg # Green Hills C++ Compiler 487909885543Smrg # _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" 488009885543Smrg ;; 488109885543Smrg esac 488209885543Smrg ;; 488309885543Smrg darwin*) 488409885543Smrg # PIC is the default on this platform 488509885543Smrg # Common symbols not allowed in MH_DYLIB files 488609885543Smrg case $cc_basename in 488709885543Smrg xlc*) 488809885543Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' 488909885543Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 489009885543Smrg ;; 489109885543Smrg esac 489209885543Smrg ;; 489309885543Smrg dgux*) 489409885543Smrg case $cc_basename in 489509885543Smrg ec++*) 489609885543Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 489709885543Smrg ;; 489809885543Smrg ghcx*) 489909885543Smrg # Green Hills C++ Compiler 490009885543Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 490109885543Smrg ;; 490209885543Smrg *) 490309885543Smrg ;; 490409885543Smrg esac 490509885543Smrg ;; 490609885543Smrg freebsd* | dragonfly*) 490709885543Smrg # FreeBSD uses GNU C++ 490809885543Smrg ;; 490909885543Smrg hpux9* | hpux10* | hpux11*) 491009885543Smrg case $cc_basename in 491109885543Smrg CC*) 491209885543Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 491309885543Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 491409885543Smrg if test "$host_cpu" != ia64; then 491509885543Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 491609885543Smrg fi 491709885543Smrg ;; 491809885543Smrg aCC*) 491909885543Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 492009885543Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 492109885543Smrg case $host_cpu in 492209885543Smrg hppa*64*|ia64*) 492309885543Smrg # +Z the default 492409885543Smrg ;; 492509885543Smrg *) 492609885543Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 492709885543Smrg ;; 492809885543Smrg esac 492909885543Smrg ;; 493009885543Smrg *) 493109885543Smrg ;; 493209885543Smrg esac 493309885543Smrg ;; 493409885543Smrg interix*) 493509885543Smrg # This is c89, which is MS Visual C++ (no shared libs) 493609885543Smrg # Anyone wants to do a port? 493709885543Smrg ;; 493809885543Smrg irix5* | irix6* | nonstopux*) 493909885543Smrg case $cc_basename in 494009885543Smrg CC*) 494109885543Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 494209885543Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 494309885543Smrg # CC pic flag -KPIC is the default. 494409885543Smrg ;; 494509885543Smrg *) 494609885543Smrg ;; 494709885543Smrg esac 494809885543Smrg ;; 494909885543Smrg linux* | k*bsd*-gnu) 495009885543Smrg case $cc_basename in 495109885543Smrg KCC*) 495209885543Smrg # KAI C++ Compiler 495309885543Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 495409885543Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 495509885543Smrg ;; 495609885543Smrg icpc* | ecpc*) 495709885543Smrg # Intel C++ 495809885543Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 495909885543Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 496009885543Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' 496109885543Smrg ;; 496209885543Smrg pgCC*) 496309885543Smrg # Portland Group C++ compiler. 496409885543Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 496509885543Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 496609885543Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 496709885543Smrg ;; 496809885543Smrg cxx*) 496909885543Smrg # Compaq C++ 497009885543Smrg # Make sure the PIC flag is empty. It appears that all Alpha 497109885543Smrg # Linux and Compaq Tru64 Unix objects are PIC. 497209885543Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 497309885543Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 497409885543Smrg ;; 497509885543Smrg *) 497609885543Smrg ;; 497709885543Smrg esac 497809885543Smrg ;; 497909885543Smrg lynxos*) 498009885543Smrg ;; 498109885543Smrg m88k*) 498209885543Smrg ;; 498309885543Smrg mvs*) 498409885543Smrg case $cc_basename in 498509885543Smrg cxx*) 498609885543Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 498709885543Smrg ;; 498809885543Smrg *) 498909885543Smrg ;; 499009885543Smrg esac 499109885543Smrg ;; 499209885543Smrg netbsd* | netbsdelf*-gnu) 499309885543Smrg ;; 499409885543Smrg osf3* | osf4* | osf5*) 499509885543Smrg case $cc_basename in 499609885543Smrg KCC*) 499709885543Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 499809885543Smrg ;; 499909885543Smrg RCC*) 500009885543Smrg # Rational C++ 2.4.1 500109885543Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 500209885543Smrg ;; 500309885543Smrg cxx*) 500409885543Smrg # Digital/Compaq C++ 500509885543Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 500609885543Smrg # Make sure the PIC flag is empty. It appears that all Alpha 500709885543Smrg # Linux and Compaq Tru64 Unix objects are PIC. 500809885543Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 500909885543Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 501009885543Smrg ;; 501109885543Smrg *) 501209885543Smrg ;; 501309885543Smrg esac 501409885543Smrg ;; 501509885543Smrg psos*) 501609885543Smrg ;; 501709885543Smrg solaris*) 501809885543Smrg case $cc_basename in 501909885543Smrg CC*) 502009885543Smrg # Sun C++ 4.2, 5.x and Centerline C++ 502109885543Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 502209885543Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 502309885543Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 502409885543Smrg ;; 502509885543Smrg gcx*) 502609885543Smrg # Green Hills C++ Compiler 502709885543Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 502809885543Smrg ;; 502909885543Smrg *) 503009885543Smrg ;; 503109885543Smrg esac 503209885543Smrg ;; 503309885543Smrg sunos4*) 503409885543Smrg case $cc_basename in 503509885543Smrg CC*) 503609885543Smrg # Sun C++ 4.x 503709885543Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 503809885543Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 503909885543Smrg ;; 504009885543Smrg lcc*) 504109885543Smrg # Lucid 504209885543Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 504309885543Smrg ;; 504409885543Smrg *) 504509885543Smrg ;; 504609885543Smrg esac 504709885543Smrg ;; 504809885543Smrg tandem*) 504909885543Smrg case $cc_basename in 505009885543Smrg NCC*) 505109885543Smrg # NonStop-UX NCC 3.20 505209885543Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 505309885543Smrg ;; 505409885543Smrg *) 505509885543Smrg ;; 505609885543Smrg esac 505709885543Smrg ;; 505809885543Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 505909885543Smrg case $cc_basename in 506009885543Smrg CC*) 506109885543Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 506209885543Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 506309885543Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 506409885543Smrg ;; 506509885543Smrg esac 506609885543Smrg ;; 506709885543Smrg vxworks*) 506809885543Smrg ;; 506909885543Smrg *) 507009885543Smrg _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 507109885543Smrg ;; 507209885543Smrg esac 507309885543Smrg fi 507409885543Smrg], 507509885543Smrg[ 507609885543Smrg if test "$GCC" = yes; then 507709885543Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 507809885543Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' 507909885543Smrg 508009885543Smrg case $host_os in 508109885543Smrg aix*) 508209885543Smrg # All AIX code is PIC. 508309885543Smrg if test "$host_cpu" = ia64; then 508409885543Smrg # AIX 5 now supports IA64 processor 508509885543Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 508609885543Smrg fi 508709885543Smrg ;; 508809885543Smrg 508909885543Smrg amigaos*) 509009885543Smrg # FIXME: we need at least 68020 code to build shared libraries, but 509109885543Smrg # adding the `-m68020' flag to GCC prevents building anything better, 509209885543Smrg # like `-m68040'. 509309885543Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 509409885543Smrg ;; 509509885543Smrg 509609885543Smrg beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 509709885543Smrg # PIC is the default for these OSes. 509809885543Smrg ;; 509909885543Smrg 510009885543Smrg mingw* | pw32* | os2*) 510109885543Smrg # This hack is so that the source file can tell whether it is being 510209885543Smrg # built for inclusion in a dll (and should export symbols for example). 510309885543Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' 510409885543Smrg ;; 510509885543Smrg 510609885543Smrg darwin* | rhapsody*) 510709885543Smrg # PIC is the default on this platform 510809885543Smrg # Common symbols not allowed in MH_DYLIB files 510909885543Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 511009885543Smrg ;; 511109885543Smrg 511209885543Smrg interix3*) 511309885543Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 511409885543Smrg # Instead, we relocate shared libraries at runtime. 511509885543Smrg ;; 511609885543Smrg 511709885543Smrg msdosdjgpp*) 511809885543Smrg # Just because we use GCC doesn't mean we suddenly get shared libraries 511909885543Smrg # on systems that don't support them. 512009885543Smrg _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 512109885543Smrg enable_shared=no 512209885543Smrg ;; 512309885543Smrg 512409885543Smrg sysv4*MP*) 512509885543Smrg if test -d /usr/nec; then 512609885543Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 512709885543Smrg fi 512809885543Smrg ;; 512909885543Smrg 513009885543Smrg hpux*) 513109885543Smrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 513209885543Smrg # not for PA HP-UX. 513309885543Smrg case $host_cpu in 513409885543Smrg hppa*64*|ia64*) 513509885543Smrg # +Z the default 513609885543Smrg ;; 513709885543Smrg *) 513809885543Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 513909885543Smrg ;; 514009885543Smrg esac 514109885543Smrg ;; 514209885543Smrg 514309885543Smrg *) 514409885543Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 514509885543Smrg ;; 514609885543Smrg esac 514709885543Smrg else 514809885543Smrg # PORTME Check for flag to pass linker flags through the system compiler. 514909885543Smrg case $host_os in 515009885543Smrg aix*) 515109885543Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 515209885543Smrg if test "$host_cpu" = ia64; then 515309885543Smrg # AIX 5 now supports IA64 processor 515409885543Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 515509885543Smrg else 515609885543Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 515709885543Smrg fi 515809885543Smrg ;; 515909885543Smrg darwin*) 516009885543Smrg # PIC is the default on this platform 516109885543Smrg # Common symbols not allowed in MH_DYLIB files 516209885543Smrg case $cc_basename in 516309885543Smrg xlc*) 516409885543Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' 516509885543Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 516609885543Smrg ;; 516709885543Smrg esac 516809885543Smrg ;; 516909885543Smrg 517009885543Smrg mingw* | pw32* | os2*) 517109885543Smrg # This hack is so that the source file can tell whether it is being 517209885543Smrg # built for inclusion in a dll (and should export symbols for example). 517309885543Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' 517409885543Smrg ;; 517509885543Smrg 517609885543Smrg hpux9* | hpux10* | hpux11*) 517709885543Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 517809885543Smrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 517909885543Smrg # not for PA HP-UX. 518009885543Smrg case $host_cpu in 518109885543Smrg hppa*64*|ia64*) 518209885543Smrg # +Z the default 518309885543Smrg ;; 518409885543Smrg *) 518509885543Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 518609885543Smrg ;; 518709885543Smrg esac 518809885543Smrg # Is there a better lt_prog_compiler_static that works with the bundled CC? 518909885543Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 519009885543Smrg ;; 519109885543Smrg 519209885543Smrg irix5* | irix6* | nonstopux*) 519309885543Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 519409885543Smrg # PIC (with -KPIC) is the default. 519509885543Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 519609885543Smrg ;; 519709885543Smrg 519809885543Smrg newsos6) 519909885543Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 520009885543Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 520109885543Smrg ;; 520209885543Smrg 520309885543Smrg linux* | k*bsd*-gnu) 520409885543Smrg case $cc_basename in 520509885543Smrg icc* | ecc*) 520609885543Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 520709885543Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 520809885543Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' 520909885543Smrg ;; 521009885543Smrg pgcc* | pgf77* | pgf90* | pgf95*) 521109885543Smrg # Portland Group compilers (*not* the Pentium gcc compiler, 521209885543Smrg # which looks to be a dead project) 521309885543Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 521409885543Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 521509885543Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 521609885543Smrg ;; 521709885543Smrg ccc*) 521809885543Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 521909885543Smrg # All Alpha code is PIC. 522009885543Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 522109885543Smrg ;; 522209885543Smrg esac 522309885543Smrg ;; 522409885543Smrg 522509885543Smrg osf3* | osf4* | osf5*) 522609885543Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 522709885543Smrg # All OSF/1 code is PIC. 522809885543Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 522909885543Smrg ;; 523009885543Smrg 523109885543Smrg solaris*) 523209885543Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 523309885543Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 523409885543Smrg case $cc_basename in 523509885543Smrg f77* | f90* | f95*) 523609885543Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 523709885543Smrg *) 523809885543Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 523909885543Smrg esac 524009885543Smrg ;; 524109885543Smrg 524209885543Smrg sunos4*) 524309885543Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 524409885543Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 524509885543Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 524609885543Smrg ;; 524709885543Smrg 524809885543Smrg sysv4 | sysv4.2uw2* | sysv4.3*) 524909885543Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 525009885543Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 525109885543Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 525209885543Smrg ;; 525309885543Smrg 525409885543Smrg sysv4*MP*) 525509885543Smrg if test -d /usr/nec ;then 525609885543Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 525709885543Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 525809885543Smrg fi 525909885543Smrg ;; 526009885543Smrg 526109885543Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 526209885543Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 526309885543Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 526409885543Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 526509885543Smrg ;; 526609885543Smrg 526709885543Smrg unicos*) 526809885543Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 526909885543Smrg _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 527009885543Smrg ;; 527109885543Smrg 527209885543Smrg uts4*) 527309885543Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 527409885543Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 527509885543Smrg ;; 527609885543Smrg 527709885543Smrg *) 527809885543Smrg _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 527909885543Smrg ;; 528009885543Smrg esac 528109885543Smrg fi 528209885543Smrg]) 528309885543SmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)]) 528409885543Smrg 528509885543Smrg# 528609885543Smrg# Check to make sure the PIC flag actually works. 528709885543Smrg# 528809885543Smrgif test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then 528909885543Smrg AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works], 529009885543Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1), 529109885543Smrg [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [], 529209885543Smrg [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in 529309885543Smrg "" | " "*) ;; 529409885543Smrg *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;; 529509885543Smrg esac], 529609885543Smrg [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 529709885543Smrg _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 529809885543Smrgfi 529909885543Smrgcase $host_os in 530009885543Smrg # For platforms which do not support PIC, -DPIC is meaningless: 530109885543Smrg *djgpp*) 530209885543Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 530309885543Smrg ;; 530409885543Smrg *) 530509885543Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])" 530609885543Smrg ;; 530709885543Smrgesac 530809885543Smrg 530909885543Smrg# 531009885543Smrg# Check to make sure the static flag actually works. 531109885543Smrg# 531209885543Smrgwl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\" 531309885543SmrgAC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 531409885543Smrg _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1), 531509885543Smrg $lt_tmp_static_flag, 531609885543Smrg [], 531709885543Smrg [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=]) 531809885543Smrg]) 531909885543Smrg 532009885543Smrg 532109885543Smrg# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME]) 532209885543Smrg# ------------------------------------ 532309885543Smrg# See if the linker supports building shared libraries. 532409885543SmrgAC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS], 532509885543Smrg[AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 532609885543Smrgifelse([$1],[CXX],[ 532709885543Smrg _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 532809885543Smrg case $host_os in 532909885543Smrg aix4* | aix5*) 533009885543Smrg # If we're using GNU nm, then we don't want the "-C" option. 533109885543Smrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 533209885543Smrg if $NM -V 2>&1 | grep 'GNU' > /dev/null; then 533309885543Smrg _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' 533409885543Smrg else 533509885543Smrg _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' 533609885543Smrg fi 533709885543Smrg ;; 533809885543Smrg pw32*) 533909885543Smrg _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" 534009885543Smrg ;; 534109885543Smrg cygwin* | mingw*) 534209885543Smrg _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' 534309885543Smrg ;; 534409885543Smrg linux* | k*bsd*-gnu) 534509885543Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=no 534609885543Smrg ;; 534709885543Smrg *) 534809885543Smrg _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 534909885543Smrg ;; 535009885543Smrg esac 535109885543Smrg],[ 535209885543Smrg runpath_var= 535309885543Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)= 535409885543Smrg _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no 535509885543Smrg _LT_AC_TAGVAR(archive_cmds, $1)= 535609885543Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)= 535709885543Smrg _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)= 535809885543Smrg _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)= 535909885543Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= 536009885543Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 536109885543Smrg _LT_AC_TAGVAR(thread_safe_flag_spec, $1)= 536209885543Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= 536309885543Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 536409885543Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 536509885543Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 536609885543Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=no 536709885543Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 536809885543Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown 536909885543Smrg _LT_AC_TAGVAR(hardcode_automatic, $1)=no 537009885543Smrg _LT_AC_TAGVAR(module_cmds, $1)= 537109885543Smrg _LT_AC_TAGVAR(module_expsym_cmds, $1)= 537209885543Smrg _LT_AC_TAGVAR(always_export_symbols, $1)=no 537309885543Smrg _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 537409885543Smrg # include_expsyms should be a list of space-separated symbols to be *always* 537509885543Smrg # included in the symbol list 537609885543Smrg _LT_AC_TAGVAR(include_expsyms, $1)= 537709885543Smrg # exclude_expsyms can be an extended regexp of symbols to exclude 537809885543Smrg # it will be wrapped by ` (' and `)$', so one must not match beginning or 537909885543Smrg # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', 538009885543Smrg # as well as any symbol that contains `d'. 538109885543Smrg _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_" 538209885543Smrg # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 538309885543Smrg # platforms (ab)use it in PIC code, but their linkers get confused if 538409885543Smrg # the symbol is explicitly referenced. Since portable code cannot 538509885543Smrg # rely on this symbol name, it's probably fine to never include it in 538609885543Smrg # preloaded symbol tables. 538709885543Smrg extract_expsyms_cmds= 538809885543Smrg # Just being paranoid about ensuring that cc_basename is set. 538909885543Smrg _LT_CC_BASENAME([$compiler]) 539009885543Smrg case $host_os in 539109885543Smrg cygwin* | mingw* | pw32*) 539209885543Smrg # FIXME: the MSVC++ port hasn't been tested in a loooong time 539309885543Smrg # When not using gcc, we currently assume that we are using 539409885543Smrg # Microsoft Visual C++. 539509885543Smrg if test "$GCC" != yes; then 539609885543Smrg with_gnu_ld=no 539709885543Smrg fi 539809885543Smrg ;; 539909885543Smrg interix*) 540009885543Smrg # we just hope/assume this is gcc and not c89 (= MSVC++) 540109885543Smrg with_gnu_ld=yes 540209885543Smrg ;; 540309885543Smrg openbsd*) 540409885543Smrg with_gnu_ld=no 540509885543Smrg ;; 540609885543Smrg esac 540709885543Smrg 540809885543Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=yes 540909885543Smrg if test "$with_gnu_ld" = yes; then 541009885543Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 541109885543Smrg wlarc='${wl}' 541209885543Smrg 541309885543Smrg # Set some defaults for GNU ld with shared library support. These 541409885543Smrg # are reset later if shared libraries are not supported. Putting them 541509885543Smrg # here allows them to be overridden if necessary. 541609885543Smrg runpath_var=LD_RUN_PATH 541709885543Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 541809885543Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 541909885543Smrg # ancient GNU ld didn't support --whole-archive et. al. 542009885543Smrg if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then 542109885543Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 542209885543Smrg else 542309885543Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 542409885543Smrg fi 542509885543Smrg supports_anon_versioning=no 542609885543Smrg case `$LD -v 2>/dev/null` in 542709885543Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 542809885543Smrg *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 542909885543Smrg *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 543009885543Smrg *\ 2.11.*) ;; # other 2.11 versions 543109885543Smrg *) supports_anon_versioning=yes ;; 543209885543Smrg esac 543309885543Smrg 543409885543Smrg # See if GNU ld supports shared libraries. 543509885543Smrg case $host_os in 543609885543Smrg aix3* | aix4* | aix5*) 543709885543Smrg # On AIX/PPC, the GNU linker is very broken 543809885543Smrg if test "$host_cpu" != ia64; then 543909885543Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 544009885543Smrg cat <<EOF 1>&2 544109885543Smrg 544209885543Smrg*** Warning: the GNU linker, at least up to release 2.9.1, is reported 544309885543Smrg*** to be unable to reliably create shared libraries on AIX. 544409885543Smrg*** Therefore, libtool is disabling shared libraries support. If you 544509885543Smrg*** really care for shared libraries, you may want to modify your PATH 544609885543Smrg*** so that a non-GNU linker is found, and then restart. 544709885543Smrg 544809885543SmrgEOF 544909885543Smrg fi 545009885543Smrg ;; 545109885543Smrg 545209885543Smrg amigaos*) 545309885543Smrg _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)' 545409885543Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 545509885543Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 545609885543Smrg 545709885543Smrg # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports 545809885543Smrg # that the semantics of dynamic libraries on AmigaOS, at least up 545909885543Smrg # to version 4, is to share data among multiple programs linked 546009885543Smrg # with the same dynamic library. Since this doesn't match the 546109885543Smrg # behavior of shared libraries on other platforms, we can't use 546209885543Smrg # them. 546309885543Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 546409885543Smrg ;; 546509885543Smrg 546609885543Smrg beos*) 546709885543Smrg if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 546809885543Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 546909885543Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 547009885543Smrg # support --undefined. This deserves some investigation. FIXME 547109885543Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 547209885543Smrg else 547309885543Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 547409885543Smrg fi 547509885543Smrg ;; 547609885543Smrg 547709885543Smrg cygwin* | mingw* | pw32*) 547809885543Smrg # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 547909885543Smrg # as there is no search path for DLLs. 548009885543Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 548109885543Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 548209885543Smrg _LT_AC_TAGVAR(always_export_symbols, $1)=no 548309885543Smrg _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 548409885543Smrg _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' 548509885543Smrg 548609885543Smrg if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then 548709885543Smrg _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' 548809885543Smrg # If the export-symbols file already is a .def file (1st line 548909885543Smrg # is EXPORTS), use it as is; otherwise, prepend... 549009885543Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 549109885543Smrg cp $export_symbols $output_objdir/$soname.def; 549209885543Smrg else 549309885543Smrg echo EXPORTS > $output_objdir/$soname.def; 549409885543Smrg cat $export_symbols >> $output_objdir/$soname.def; 549509885543Smrg fi~ 549609885543Smrg $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 549709885543Smrg else 549809885543Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 549909885543Smrg fi 550009885543Smrg ;; 550109885543Smrg 550209885543Smrg interix3*) 550309885543Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 550409885543Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 550509885543Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 550609885543Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 550709885543Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 550809885543Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 550909885543Smrg # default) and relocated if they conflict, which is a slow very memory 551009885543Smrg # consuming and fragmenting process. To avoid this, we pick a random, 551109885543Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 551209885543Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 551309885543Smrg _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' 551409885543Smrg _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' 551509885543Smrg ;; 551609885543Smrg 551709885543Smrg linux* | k*bsd*-gnu) 551809885543Smrg if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 551909885543Smrg tmp_addflag= 552009885543Smrg case $cc_basename,$host_cpu in 552109885543Smrg pgcc*) # Portland Group C compiler 552209885543Smrg _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' 552309885543Smrg tmp_addflag=' $pic_flag' 552409885543Smrg ;; 552509885543Smrg pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers 552609885543Smrg _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' 552709885543Smrg tmp_addflag=' $pic_flag -Mnomain' ;; 552809885543Smrg ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 552909885543Smrg tmp_addflag=' -i_dynamic' ;; 553009885543Smrg efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 553109885543Smrg tmp_addflag=' -i_dynamic -nofor_main' ;; 553209885543Smrg ifc* | ifort*) # Intel Fortran compiler 553309885543Smrg tmp_addflag=' -nofor_main' ;; 553409885543Smrg esac 553509885543Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 553609885543Smrg 553709885543Smrg if test $supports_anon_versioning = yes; then 553809885543Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~ 553909885543Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 554009885543Smrg $echo "local: *; };" >> $output_objdir/$libname.ver~ 554109885543Smrg $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 554209885543Smrg fi 554309885543Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=no 554409885543Smrg else 554509885543Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 554609885543Smrg fi 554709885543Smrg ;; 554809885543Smrg 554909885543Smrg netbsd* | netbsdelf*-gnu) 555009885543Smrg if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then 555109885543Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 555209885543Smrg wlarc= 555309885543Smrg else 555409885543Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 555509885543Smrg _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' 555609885543Smrg fi 555709885543Smrg ;; 555809885543Smrg 555909885543Smrg solaris*) 556009885543Smrg if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then 556109885543Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 556209885543Smrg cat <<EOF 1>&2 556309885543Smrg 556409885543Smrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably 556509885543Smrg*** create shared libraries on Solaris systems. Therefore, libtool 556609885543Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 556709885543Smrg*** binutils to release 2.9.1 or newer. Another option is to modify 556809885543Smrg*** your PATH or compiler configuration so that the native linker is 556909885543Smrg*** used, and then restart. 557009885543Smrg 557109885543SmrgEOF 557209885543Smrg elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 557309885543Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 557409885543Smrg _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' 557509885543Smrg else 557609885543Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 557709885543Smrg fi 557809885543Smrg ;; 557909885543Smrg 558009885543Smrg sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 558109885543Smrg case `$LD -v 2>&1` in 558209885543Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 558309885543Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 558409885543Smrg cat <<_LT_EOF 1>&2 558509885543Smrg 558609885543Smrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not 558709885543Smrg*** reliably create shared libraries on SCO systems. Therefore, libtool 558809885543Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 558909885543Smrg*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 559009885543Smrg*** your PATH or compiler configuration so that the native linker is 559109885543Smrg*** used, and then restart. 559209885543Smrg 559309885543Smrg_LT_EOF 559409885543Smrg ;; 559509885543Smrg *) 559609885543Smrg if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 559709885543Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' 559809885543Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' 559909885543Smrg _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' 560009885543Smrg else 560109885543Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 560209885543Smrg fi 560309885543Smrg ;; 560409885543Smrg esac 560509885543Smrg ;; 560609885543Smrg 560709885543Smrg sunos4*) 560809885543Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 560909885543Smrg wlarc= 561009885543Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 561109885543Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 561209885543Smrg ;; 561309885543Smrg 561409885543Smrg *) 561509885543Smrg if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 561609885543Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 561709885543Smrg _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' 561809885543Smrg else 561909885543Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 562009885543Smrg fi 562109885543Smrg ;; 562209885543Smrg esac 562309885543Smrg 562409885543Smrg if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then 562509885543Smrg runpath_var= 562609885543Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= 562709885543Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= 562809885543Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 562909885543Smrg fi 563009885543Smrg else 563109885543Smrg # PORTME fill in a description of your system's linker (not GNU ld) 563209885543Smrg case $host_os in 563309885543Smrg aix3*) 563409885543Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 563509885543Smrg _LT_AC_TAGVAR(always_export_symbols, $1)=yes 563609885543Smrg _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' 563709885543Smrg # Note: this linker hardcodes the directories in LIBPATH if there 563809885543Smrg # are no directories specified by -L. 563909885543Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 564009885543Smrg if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then 564109885543Smrg # Neither direct hardcoding nor static linking is supported with a 564209885543Smrg # broken collect2. 564309885543Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported 564409885543Smrg fi 564509885543Smrg ;; 564609885543Smrg 564709885543Smrg aix4* | aix5*) 564809885543Smrg if test "$host_cpu" = ia64; then 564909885543Smrg # On IA64, the linker does run time linking by default, so we don't 565009885543Smrg # have to do anything special. 565109885543Smrg aix_use_runtimelinking=no 565209885543Smrg exp_sym_flag='-Bexport' 565309885543Smrg no_entry_flag="" 565409885543Smrg else 565509885543Smrg # If we're using GNU nm, then we don't want the "-C" option. 565609885543Smrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 565709885543Smrg if $NM -V 2>&1 | grep 'GNU' > /dev/null; then 565809885543Smrg _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' 565909885543Smrg else 566009885543Smrg _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' 566109885543Smrg fi 566209885543Smrg aix_use_runtimelinking=no 566309885543Smrg 566409885543Smrg # Test if we are trying to use run time linking or normal 566509885543Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 566609885543Smrg # need to do runtime linking. 566709885543Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*) 566809885543Smrg for ld_flag in $LDFLAGS; do 566909885543Smrg if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then 567009885543Smrg aix_use_runtimelinking=yes 567109885543Smrg break 567209885543Smrg fi 567309885543Smrg done 567409885543Smrg ;; 567509885543Smrg esac 567609885543Smrg 567709885543Smrg exp_sym_flag='-bexport' 567809885543Smrg no_entry_flag='-bnoentry' 567909885543Smrg fi 568009885543Smrg 568109885543Smrg # When large executables or shared objects are built, AIX ld can 568209885543Smrg # have problems creating the table of contents. If linking a library 568309885543Smrg # or program results in "error TOC overflow" add -mminimal-toc to 568409885543Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 568509885543Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 568609885543Smrg 568709885543Smrg _LT_AC_TAGVAR(archive_cmds, $1)='' 568809885543Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 568909885543Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' 569009885543Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 569109885543Smrg 569209885543Smrg if test "$GCC" = yes; then 569309885543Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 569409885543Smrg # We only want to do this on AIX 4.2 and lower, the check 569509885543Smrg # below for broken collect2 doesn't work under 4.3+ 569609885543Smrg collect2name=`${CC} -print-prog-name=collect2` 569709885543Smrg if test -f "$collect2name" && \ 569809885543Smrg strings "$collect2name" | grep resolve_lib_name >/dev/null 569909885543Smrg then 570009885543Smrg # We have reworked collect2 570109885543Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 570209885543Smrg else 570309885543Smrg # We have old collect2 570409885543Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported 570509885543Smrg # It fails to find uninstalled libraries when the uninstalled 570609885543Smrg # path is not listed in the libpath. Setting hardcode_minus_L 570709885543Smrg # to unsupported forces relinking 570809885543Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 570909885543Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 571009885543Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 571109885543Smrg fi 571209885543Smrg ;; 571309885543Smrg esac 571409885543Smrg shared_flag='-shared' 571509885543Smrg if test "$aix_use_runtimelinking" = yes; then 571609885543Smrg shared_flag="$shared_flag "'${wl}-G' 571709885543Smrg fi 571809885543Smrg else 571909885543Smrg # not using gcc 572009885543Smrg if test "$host_cpu" = ia64; then 572109885543Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 572209885543Smrg # chokes on -Wl,-G. The following line is correct: 572309885543Smrg shared_flag='-G' 572409885543Smrg else 572509885543Smrg if test "$aix_use_runtimelinking" = yes; then 572609885543Smrg shared_flag='${wl}-G' 572709885543Smrg else 572809885543Smrg shared_flag='${wl}-bM:SRE' 572909885543Smrg fi 573009885543Smrg fi 573109885543Smrg fi 573209885543Smrg 573309885543Smrg # It seems that -bexpall does not export symbols beginning with 573409885543Smrg # underscore (_), so it is better to generate a list of symbols to export. 573509885543Smrg _LT_AC_TAGVAR(always_export_symbols, $1)=yes 573609885543Smrg if test "$aix_use_runtimelinking" = yes; then 573709885543Smrg # Warning - without using the other runtime loading flags (-brtl), 573809885543Smrg # -berok will link without error, but may produce a broken library. 573909885543Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' 574009885543Smrg # Determine the default libpath from the value encoded in an empty executable. 574109885543Smrg _LT_AC_SYS_LIBPATH_AIX 574209885543Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 574309885543Smrg _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" 574409885543Smrg else 574509885543Smrg if test "$host_cpu" = ia64; then 574609885543Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 574709885543Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 574809885543Smrg _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" 574909885543Smrg else 575009885543Smrg # Determine the default libpath from the value encoded in an empty executable. 575109885543Smrg _LT_AC_SYS_LIBPATH_AIX 575209885543Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 575309885543Smrg # Warning - without using the other run time loading flags, 575409885543Smrg # -berok will link without error, but may produce a broken library. 575509885543Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 575609885543Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 575709885543Smrg # Exported symbols can be pulled into shared objects from archives 575809885543Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 575909885543Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes 576009885543Smrg # This is similar to how AIX traditionally builds its shared libraries. 576109885543Smrg _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' 576209885543Smrg fi 576309885543Smrg fi 576409885543Smrg ;; 576509885543Smrg 576609885543Smrg amigaos*) 576709885543Smrg _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)' 576809885543Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 576909885543Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 577009885543Smrg # see comment about different semantics on the GNU ld section 577109885543Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 577209885543Smrg ;; 577309885543Smrg 577409885543Smrg bsdi[[45]]*) 577509885543Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 577609885543Smrg ;; 577709885543Smrg 577809885543Smrg cygwin* | mingw* | pw32*) 577909885543Smrg # When not using gcc, we currently assume that we are using 578009885543Smrg # Microsoft Visual C++. 578109885543Smrg # hardcode_libdir_flag_spec is actually meaningless, as there is 578209885543Smrg # no search path for DLLs. 578309885543Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 578409885543Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 578509885543Smrg # Tell ltmain to make .lib files, not .a files. 578609885543Smrg libext=lib 578709885543Smrg # Tell ltmain to make .dll files, not .so files. 578809885543Smrg shrext_cmds=".dll" 578909885543Smrg # FIXME: Setting linknames here is a bad hack. 579009885543Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' 579109885543Smrg # The linker will automatically build a .lib file if we build a DLL. 579209885543Smrg _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true' 579309885543Smrg # FIXME: Should let the user specify the lib program. 579409885543Smrg _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs' 579509885543Smrg _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' 579609885543Smrg _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 579709885543Smrg ;; 579809885543Smrg 579909885543Smrg darwin* | rhapsody*) 580009885543Smrg case $host_os in 580109885543Smrg rhapsody* | darwin1.[[012]]) 580209885543Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' 580309885543Smrg ;; 580409885543Smrg *) # Darwin 1.3 on 580509885543Smrg if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then 580609885543Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' 580709885543Smrg else 580809885543Smrg case ${MACOSX_DEPLOYMENT_TARGET} in 580909885543Smrg 10.[[012]]) 581009885543Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' 581109885543Smrg ;; 581209885543Smrg 10.*) 581309885543Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup' 581409885543Smrg ;; 581509885543Smrg esac 581609885543Smrg fi 581709885543Smrg ;; 581809885543Smrg esac 581909885543Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 582009885543Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 582109885543Smrg _LT_AC_TAGVAR(hardcode_automatic, $1)=yes 582209885543Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 582309885543Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' 582409885543Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 582509885543Smrg if test "$GCC" = yes ; then 582609885543Smrg output_verbose_link_cmd='echo' 582709885543Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' 582809885543Smrg _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' 582909885543Smrg # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds 583009885543Smrg _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}' 583109885543Smrg _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}' 583209885543Smrg else 583309885543Smrg case $cc_basename in 583409885543Smrg xlc*) 583509885543Smrg output_verbose_link_cmd='echo' 583609885543Smrg _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' 583709885543Smrg _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' 583809885543Smrg # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds 583909885543Smrg _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}' 584009885543Smrg _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}' 584109885543Smrg ;; 584209885543Smrg *) 584309885543Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 584409885543Smrg ;; 584509885543Smrg esac 584609885543Smrg fi 584709885543Smrg ;; 584809885543Smrg 584909885543Smrg dgux*) 585009885543Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 585109885543Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 585209885543Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 585309885543Smrg ;; 585409885543Smrg 585509885543Smrg freebsd1*) 585609885543Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 585709885543Smrg ;; 585809885543Smrg 585909885543Smrg # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 586009885543Smrg # support. Future versions do this automatically, but an explicit c++rt0.o 586109885543Smrg # does not break anything, and helps significantly (at the cost of a little 586209885543Smrg # extra space). 586309885543Smrg freebsd2.2*) 586409885543Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 586509885543Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 586609885543Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 586709885543Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 586809885543Smrg ;; 586909885543Smrg 587009885543Smrg # Unfortunately, older versions of FreeBSD 2 do not have this feature. 587109885543Smrg freebsd2*) 587209885543Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 587309885543Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 587409885543Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 587509885543Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 587609885543Smrg ;; 587709885543Smrg 587809885543Smrg # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 587909885543Smrg freebsd* | dragonfly*) 588009885543Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' 588109885543Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 588209885543Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 588309885543Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 588409885543Smrg ;; 588509885543Smrg 588609885543Smrg hpux9*) 588709885543Smrg if test "$GCC" = yes; then 588809885543Smrg _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' 588909885543Smrg else 589009885543Smrg _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' 589109885543Smrg fi 589209885543Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 589309885543Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 589409885543Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 589509885543Smrg 589609885543Smrg # hardcode_minus_L: Not really in the search PATH, 589709885543Smrg # but as the default location of the library. 589809885543Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 589909885543Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 590009885543Smrg ;; 590109885543Smrg 590209885543Smrg hpux10*) 590309885543Smrg if test "$GCC" = yes -a "$with_gnu_ld" = no; then 590409885543Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 590509885543Smrg else 590609885543Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 590709885543Smrg fi 590809885543Smrg if test "$with_gnu_ld" = no; then 590909885543Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 591009885543Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 591109885543Smrg 591209885543Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 591309885543Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 591409885543Smrg 591509885543Smrg # hardcode_minus_L: Not really in the search PATH, 591609885543Smrg # but as the default location of the library. 591709885543Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 591809885543Smrg fi 591909885543Smrg ;; 592009885543Smrg 592109885543Smrg hpux11*) 592209885543Smrg if test "$GCC" = yes -a "$with_gnu_ld" = no; then 592309885543Smrg case $host_cpu in 592409885543Smrg hppa*64*) 592509885543Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 592609885543Smrg ;; 592709885543Smrg ia64*) 592809885543Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 592909885543Smrg ;; 593009885543Smrg *) 593109885543Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 593209885543Smrg ;; 593309885543Smrg esac 593409885543Smrg else 593509885543Smrg case $host_cpu in 593609885543Smrg hppa*64*) 593709885543Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 593809885543Smrg ;; 593909885543Smrg ia64*) 594009885543Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 594109885543Smrg ;; 594209885543Smrg *) 594309885543Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 594409885543Smrg ;; 594509885543Smrg esac 594609885543Smrg fi 594709885543Smrg if test "$with_gnu_ld" = no; then 594809885543Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 594909885543Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 595009885543Smrg 595109885543Smrg case $host_cpu in 595209885543Smrg hppa*64*|ia64*) 595309885543Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' 595409885543Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 595509885543Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 595609885543Smrg ;; 595709885543Smrg *) 595809885543Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 595909885543Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 596009885543Smrg 596109885543Smrg # hardcode_minus_L: Not really in the search PATH, 596209885543Smrg # but as the default location of the library. 596309885543Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 596409885543Smrg ;; 596509885543Smrg esac 596609885543Smrg fi 596709885543Smrg ;; 596809885543Smrg 596909885543Smrg irix5* | irix6* | nonstopux*) 597009885543Smrg if test "$GCC" = yes; then 597109885543Smrg _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' 597209885543Smrg else 597309885543Smrg _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' 597409885543Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' 597509885543Smrg fi 597609885543Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 597709885543Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 597809885543Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 597909885543Smrg ;; 598009885543Smrg 598109885543Smrg netbsd* | netbsdelf*-gnu) 598209885543Smrg if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then 598309885543Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 598409885543Smrg else 598509885543Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 598609885543Smrg fi 598709885543Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 598809885543Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 598909885543Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 599009885543Smrg ;; 599109885543Smrg 599209885543Smrg newsos6) 599309885543Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 599409885543Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 599509885543Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 599609885543Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 599709885543Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 599809885543Smrg ;; 599909885543Smrg 600009885543Smrg openbsd*) 600109885543Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 600209885543Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 600309885543Smrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 600409885543Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 600509885543Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' 600609885543Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 600709885543Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 600809885543Smrg else 600909885543Smrg case $host_os in 601009885543Smrg openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) 601109885543Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 601209885543Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 601309885543Smrg ;; 601409885543Smrg *) 601509885543Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 601609885543Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 601709885543Smrg ;; 601809885543Smrg esac 601909885543Smrg fi 602009885543Smrg ;; 602109885543Smrg 602209885543Smrg os2*) 602309885543Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 602409885543Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 602509885543Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 602609885543Smrg _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' 602709885543Smrg _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' 602809885543Smrg ;; 602909885543Smrg 603009885543Smrg osf3*) 603109885543Smrg if test "$GCC" = yes; then 603209885543Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 603309885543Smrg _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' 603409885543Smrg else 603509885543Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 603609885543Smrg _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' 603709885543Smrg fi 603809885543Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 603909885543Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 604009885543Smrg ;; 604109885543Smrg 604209885543Smrg osf4* | osf5*) # as osf3* with the addition of -msym flag 604309885543Smrg if test "$GCC" = yes; then 604409885543Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 604509885543Smrg _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' 604609885543Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 604709885543Smrg else 604809885543Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 604909885543Smrg _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' 605009885543Smrg _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~ 605109885543Smrg $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' 605209885543Smrg 605309885543Smrg # Both c and cxx compiler support -rpath directly 605409885543Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 605509885543Smrg fi 605609885543Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 605709885543Smrg ;; 605809885543Smrg 605909885543Smrg solaris*) 606009885543Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text' 606109885543Smrg if test "$GCC" = yes; then 606209885543Smrg wlarc='${wl}' 606309885543Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 606409885543Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 606509885543Smrg $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' 606609885543Smrg else 606709885543Smrg wlarc='' 606809885543Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' 606909885543Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 607009885543Smrg $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' 607109885543Smrg fi 607209885543Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 607309885543Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 607409885543Smrg case $host_os in 607509885543Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 607609885543Smrg *) 607709885543Smrg # The compiler driver will combine linker options so we 607809885543Smrg # cannot just pass the convience library names through 607909885543Smrg # without $wl, iff we do not link with $LD. 608009885543Smrg # Luckily, gcc supports the same syntax we need for Sun Studio. 608109885543Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 608209885543Smrg case $wlarc in 608309885543Smrg '') 608409885543Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; 608509885543Smrg *) 608609885543Smrg _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' ;; 608709885543Smrg esac ;; 608809885543Smrg esac 608909885543Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 609009885543Smrg ;; 609109885543Smrg 609209885543Smrg sunos4*) 609309885543Smrg if test "x$host_vendor" = xsequent; then 609409885543Smrg # Use $CC to link under sequent, because it throws in some extra .o 609509885543Smrg # files that make .init and .fini sections work. 609609885543Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' 609709885543Smrg else 609809885543Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 609909885543Smrg fi 610009885543Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 610109885543Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 610209885543Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 610309885543Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 610409885543Smrg ;; 610509885543Smrg 610609885543Smrg sysv4) 610709885543Smrg case $host_vendor in 610809885543Smrg sni) 610909885543Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 611009885543Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 611109885543Smrg ;; 611209885543Smrg siemens) 611309885543Smrg ## LD is ld it makes a PLAMLIB 611409885543Smrg ## CC just makes a GrossModule. 611509885543Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 611609885543Smrg _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 611709885543Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 611809885543Smrg ;; 611909885543Smrg motorola) 612009885543Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 612109885543Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 612209885543Smrg ;; 612309885543Smrg esac 612409885543Smrg runpath_var='LD_RUN_PATH' 612509885543Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 612609885543Smrg ;; 612709885543Smrg 612809885543Smrg sysv4.3*) 612909885543Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 613009885543Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 613109885543Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 613209885543Smrg ;; 613309885543Smrg 613409885543Smrg sysv4*MP*) 613509885543Smrg if test -d /usr/nec; then 613609885543Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 613709885543Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 613809885543Smrg runpath_var=LD_RUN_PATH 613909885543Smrg hardcode_runpath_var=yes 614009885543Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=yes 614109885543Smrg fi 614209885543Smrg ;; 614309885543Smrg 614409885543Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7*) 614509885543Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 614609885543Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 614709885543Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 614809885543Smrg runpath_var='LD_RUN_PATH' 614909885543Smrg 615009885543Smrg if test "$GCC" = yes; then 615109885543Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 615209885543Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 615309885543Smrg else 615409885543Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 615509885543Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 615609885543Smrg fi 615709885543Smrg ;; 615809885543Smrg 615909885543Smrg sysv5* | sco3.2v5* | sco5v6*) 616009885543Smrg # Note: We can NOT use -z defs as we might desire, because we do not 616109885543Smrg # link with -lc, and that would cause any symbols used from libc to 616209885543Smrg # always be unresolved, which means just about no library would 616309885543Smrg # ever link correctly. If we're not using GNU ld we use -z text 616409885543Smrg # though, which does catch some bad symbols but isn't as heavy-handed 616509885543Smrg # as -z defs. 616609885543Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 616709885543Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 616809885543Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 616909885543Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 617009885543Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' 617109885543Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' 617209885543Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 617309885543Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 617409885543Smrg runpath_var='LD_RUN_PATH' 617509885543Smrg 617609885543Smrg if test "$GCC" = yes; then 617709885543Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' 617809885543Smrg _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' 617909885543Smrg else 618009885543Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' 618109885543Smrg _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' 618209885543Smrg fi 618309885543Smrg ;; 618409885543Smrg 618509885543Smrg uts4*) 618609885543Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 618709885543Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 618809885543Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 618909885543Smrg ;; 619009885543Smrg 619109885543Smrg *) 619209885543Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 619309885543Smrg ;; 619409885543Smrg esac 619509885543Smrg fi 619609885543Smrg]) 619709885543SmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) 619809885543Smrgtest "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 619909885543Smrg 620009885543Smrg# 620109885543Smrg# Do we need to explicitly link libc? 620209885543Smrg# 620309885543Smrgcase "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in 620409885543Smrgx|xyes) 620509885543Smrg # Assume -lc should be added 620609885543Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes 620709885543Smrg 620809885543Smrg if test "$enable_shared" = yes && test "$GCC" = yes; then 620909885543Smrg case $_LT_AC_TAGVAR(archive_cmds, $1) in 621009885543Smrg *'~'*) 621109885543Smrg # FIXME: we may have to deal with multi-command sequences. 621209885543Smrg ;; 621309885543Smrg '$CC '*) 621409885543Smrg # Test whether the compiler implicitly links with -lc since on some 621509885543Smrg # systems, -lgcc has to come before -lc. If gcc already passes -lc 621609885543Smrg # to ld, don't add -lc before -lgcc. 621709885543Smrg AC_MSG_CHECKING([whether -lc should be explicitly linked in]) 621809885543Smrg $rm conftest* 621909885543Smrg printf "$lt_simple_compile_test_code" > conftest.$ac_ext 622009885543Smrg 622109885543Smrg if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 622209885543Smrg soname=conftest 622309885543Smrg lib=conftest 622409885543Smrg libobjs=conftest.$ac_objext 622509885543Smrg deplibs= 622609885543Smrg wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) 622709885543Smrg pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) 622809885543Smrg compiler_flags=-v 622909885543Smrg linker_flags=-v 623009885543Smrg verstring= 623109885543Smrg output_objdir=. 623209885543Smrg libname=conftest 623309885543Smrg lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1) 623409885543Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)= 623509885543Smrg if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 623609885543Smrg then 623709885543Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 623809885543Smrg else 623909885543Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes 624009885543Smrg fi 624109885543Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 624209885543Smrg else 624309885543Smrg cat conftest.err 1>&5 624409885543Smrg fi 624509885543Smrg $rm conftest* 624609885543Smrg AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)]) 624709885543Smrg ;; 624809885543Smrg esac 624909885543Smrg fi 625009885543Smrg ;; 625109885543Smrgesac 625209885543Smrg])# AC_LIBTOOL_PROG_LD_SHLIBS 625309885543Smrg 625409885543Smrg 625509885543Smrg# _LT_AC_FILE_LTDLL_C 625609885543Smrg# ------------------- 625709885543Smrg# Be careful that the start marker always follows a newline. 625809885543SmrgAC_DEFUN([_LT_AC_FILE_LTDLL_C], [ 625909885543Smrg# /* ltdll.c starts here */ 626009885543Smrg# #define WIN32_LEAN_AND_MEAN 626109885543Smrg# #include <windows.h> 626209885543Smrg# #undef WIN32_LEAN_AND_MEAN 626309885543Smrg# #include <stdio.h> 626409885543Smrg# 626509885543Smrg# #ifndef __CYGWIN__ 626609885543Smrg# # ifdef __CYGWIN32__ 626709885543Smrg# # define __CYGWIN__ __CYGWIN32__ 626809885543Smrg# # endif 626909885543Smrg# #endif 627009885543Smrg# 627109885543Smrg# #ifdef __cplusplus 627209885543Smrg# extern "C" { 627309885543Smrg# #endif 627409885543Smrg# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved); 627509885543Smrg# #ifdef __cplusplus 627609885543Smrg# } 627709885543Smrg# #endif 627809885543Smrg# 627909885543Smrg# #ifdef __CYGWIN__ 628009885543Smrg# #include <cygwin/cygwin_dll.h> 628109885543Smrg# DECLARE_CYGWIN_DLL( DllMain ); 628209885543Smrg# #endif 628309885543Smrg# HINSTANCE __hDllInstance_base; 628409885543Smrg# 628509885543Smrg# BOOL APIENTRY 628609885543Smrg# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved) 628709885543Smrg# { 628809885543Smrg# __hDllInstance_base = hInst; 628909885543Smrg# return TRUE; 629009885543Smrg# } 629109885543Smrg# /* ltdll.c ends here */ 629209885543Smrg])# _LT_AC_FILE_LTDLL_C 629309885543Smrg 629409885543Smrg 629509885543Smrg# _LT_AC_TAGVAR(VARNAME, [TAGNAME]) 629609885543Smrg# --------------------------------- 629709885543SmrgAC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])]) 629809885543Smrg 629909885543Smrg 630009885543Smrg# old names 630109885543SmrgAC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL]) 630209885543SmrgAC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 630309885543SmrgAC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 630409885543SmrgAC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 630509885543SmrgAC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 630609885543SmrgAC_DEFUN([AM_PROG_LD], [AC_PROG_LD]) 630709885543SmrgAC_DEFUN([AM_PROG_NM], [AC_PROG_NM]) 630809885543Smrg 630909885543Smrg# This is just to silence aclocal about the macro not being used 631009885543Smrgifelse([AC_DISABLE_FAST_INSTALL]) 631109885543Smrg 631209885543SmrgAC_DEFUN([LT_AC_PROG_GCJ], 631309885543Smrg[AC_CHECK_TOOL(GCJ, gcj, no) 631409885543Smrg test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" 631509885543Smrg AC_SUBST(GCJFLAGS) 631609885543Smrg]) 631709885543Smrg 631809885543SmrgAC_DEFUN([LT_AC_PROG_RC], 631909885543Smrg[AC_CHECK_TOOL(RC, windres, no) 632009885543Smrg]) 632109885543Smrg 632209885543Smrg# NOTE: This macro has been submitted for inclusion into # 632309885543Smrg# GNU Autoconf as AC_PROG_SED. When it is available in # 632409885543Smrg# a released version of Autoconf we should remove this # 632509885543Smrg# macro and use it instead. # 632609885543Smrg# LT_AC_PROG_SED 632709885543Smrg# -------------- 632809885543Smrg# Check for a fully-functional sed program, that truncates 632909885543Smrg# as few characters as possible. Prefer GNU sed if found. 633009885543SmrgAC_DEFUN([LT_AC_PROG_SED], 633109885543Smrg[AC_MSG_CHECKING([for a sed that does not truncate output]) 633209885543SmrgAC_CACHE_VAL(lt_cv_path_SED, 633309885543Smrg[# Loop through the user's path and test for sed and gsed. 633409885543Smrg# Then use that list of sed's as ones to test for truncation. 633509885543Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 633609885543Smrgfor as_dir in $PATH 633709885543Smrgdo 633809885543Smrg IFS=$as_save_IFS 633909885543Smrg test -z "$as_dir" && as_dir=. 634009885543Smrg for lt_ac_prog in sed gsed; do 634109885543Smrg for ac_exec_ext in '' $ac_executable_extensions; do 634209885543Smrg if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 634309885543Smrg lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 634409885543Smrg fi 634509885543Smrg done 634609885543Smrg done 634709885543Smrgdone 634809885543Smrglt_ac_max=0 634909885543Smrglt_ac_count=0 635009885543Smrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris 635109885543Smrg# along with /bin/sed that truncates output. 635209885543Smrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 635309885543Smrg test ! -f $lt_ac_sed && continue 635409885543Smrg cat /dev/null > conftest.in 635509885543Smrg lt_ac_count=0 635609885543Smrg echo $ECHO_N "0123456789$ECHO_C" >conftest.in 635709885543Smrg # Check for GNU sed and select it if it is found. 635809885543Smrg if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 635909885543Smrg lt_cv_path_SED=$lt_ac_sed 636009885543Smrg break 636109885543Smrg fi 636209885543Smrg while true; do 636309885543Smrg cat conftest.in conftest.in >conftest.tmp 636409885543Smrg mv conftest.tmp conftest.in 636509885543Smrg cp conftest.in conftest.nl 636609885543Smrg echo >>conftest.nl 636709885543Smrg $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 636809885543Smrg cmp -s conftest.out conftest.nl || break 636909885543Smrg # 10000 chars as input seems more than enough 637009885543Smrg test $lt_ac_count -gt 10 && break 637109885543Smrg lt_ac_count=`expr $lt_ac_count + 1` 637209885543Smrg if test $lt_ac_count -gt $lt_ac_max; then 637309885543Smrg lt_ac_max=$lt_ac_count 637409885543Smrg lt_cv_path_SED=$lt_ac_sed 637509885543Smrg fi 637609885543Smrg done 637709885543Smrgdone 637809885543Smrg]) 637909885543SmrgSED=$lt_cv_path_SED 638009885543SmrgAC_MSG_RESULT([$SED]) 638109885543Smrg]) 638209885543Smrg 638309885543Smrg# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 638409885543Smrg# 638509885543Smrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 638609885543Smrg# 638709885543Smrg# This program is free software; you can redistribute it and/or modify 638809885543Smrg# it under the terms of the GNU General Public License as published by 638909885543Smrg# the Free Software Foundation; either version 2 of the License, or 639009885543Smrg# (at your option) any later version. 639109885543Smrg# 639209885543Smrg# This program is distributed in the hope that it will be useful, but 639309885543Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 639409885543Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 639509885543Smrg# General Public License for more details. 639609885543Smrg# 639709885543Smrg# You should have received a copy of the GNU General Public License 639809885543Smrg# along with this program; if not, write to the Free Software 639909885543Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 640009885543Smrg# 640109885543Smrg# As a special exception to the GNU General Public License, if you 640209885543Smrg# distribute this file as part of a program that contains a 640309885543Smrg# configuration script generated by Autoconf, you may include it under 640409885543Smrg# the same distribution terms that you use for the rest of that program. 640509885543Smrg 640609885543Smrg# PKG_PROG_PKG_CONFIG([MIN-VERSION]) 640709885543Smrg# ---------------------------------- 640809885543SmrgAC_DEFUN([PKG_PROG_PKG_CONFIG], 640909885543Smrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 641009885543Smrgm4_pattern_allow([^PKG_CONFIG(_PATH)?$]) 641109885543SmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl 641209885543Smrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 641309885543Smrg AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 641409885543Smrgfi 641509885543Smrgif test -n "$PKG_CONFIG"; then 641609885543Smrg _pkg_min_version=m4_default([$1], [0.9.0]) 641709885543Smrg AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 641809885543Smrg if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 641909885543Smrg AC_MSG_RESULT([yes]) 642009885543Smrg else 642109885543Smrg AC_MSG_RESULT([no]) 642209885543Smrg PKG_CONFIG="" 642309885543Smrg fi 642409885543Smrg 642509885543Smrgfi[]dnl 642609885543Smrg])# PKG_PROG_PKG_CONFIG 642709885543Smrg 642809885543Smrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 642909885543Smrg# 643009885543Smrg# Check to see whether a particular set of modules exists. Similar 643109885543Smrg# to PKG_CHECK_MODULES(), but does not set variables or print errors. 643209885543Smrg# 643309885543Smrg# 643409885543Smrg# Similar to PKG_CHECK_MODULES, make sure that the first instance of 643509885543Smrg# this or PKG_CHECK_MODULES is called, or make sure to call 643609885543Smrg# PKG_CHECK_EXISTS manually 643709885543Smrg# -------------------------------------------------------------- 643809885543SmrgAC_DEFUN([PKG_CHECK_EXISTS], 643909885543Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 644009885543Smrgif test -n "$PKG_CONFIG" && \ 644109885543Smrg AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 644209885543Smrg m4_ifval([$2], [$2], [:]) 644309885543Smrgm4_ifvaln([$3], [else 644409885543Smrg $3])dnl 644509885543Smrgfi]) 644609885543Smrg 644709885543Smrg 644809885543Smrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 644909885543Smrg# --------------------------------------------- 645009885543Smrgm4_define([_PKG_CONFIG], 645109885543Smrg[if test -n "$PKG_CONFIG"; then 645209885543Smrg if test -n "$$1"; then 645309885543Smrg pkg_cv_[]$1="$$1" 645409885543Smrg else 645509885543Smrg PKG_CHECK_EXISTS([$3], 645609885543Smrg [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], 645709885543Smrg [pkg_failed=yes]) 645809885543Smrg fi 645909885543Smrgelse 646009885543Smrg pkg_failed=untried 646109885543Smrgfi[]dnl 646209885543Smrg])# _PKG_CONFIG 646309885543Smrg 646409885543Smrg# _PKG_SHORT_ERRORS_SUPPORTED 646509885543Smrg# ----------------------------- 646609885543SmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 646709885543Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 646809885543Smrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 646909885543Smrg _pkg_short_errors_supported=yes 647009885543Smrgelse 647109885543Smrg _pkg_short_errors_supported=no 647209885543Smrgfi[]dnl 647309885543Smrg])# _PKG_SHORT_ERRORS_SUPPORTED 647409885543Smrg 647509885543Smrg 647609885543Smrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 647709885543Smrg# [ACTION-IF-NOT-FOUND]) 647809885543Smrg# 647909885543Smrg# 648009885543Smrg# Note that if there is a possibility the first call to 648109885543Smrg# PKG_CHECK_MODULES might not happen, you should be sure to include an 648209885543Smrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 648309885543Smrg# 648409885543Smrg# 648509885543Smrg# -------------------------------------------------------------- 648609885543SmrgAC_DEFUN([PKG_CHECK_MODULES], 648709885543Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 648809885543SmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 648909885543SmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 649009885543Smrg 649109885543Smrgpkg_failed=no 649209885543SmrgAC_MSG_CHECKING([for $1]) 649309885543Smrg 649409885543Smrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 649509885543Smrg_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 649609885543Smrg 649709885543Smrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 649809885543Smrgand $1[]_LIBS to avoid the need to call pkg-config. 649909885543SmrgSee the pkg-config man page for more details.]) 650009885543Smrg 650109885543Smrgif test $pkg_failed = yes; then 650209885543Smrg _PKG_SHORT_ERRORS_SUPPORTED 650309885543Smrg if test $_pkg_short_errors_supported = yes; then 650409885543Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"` 650509885543Smrg else 650609885543Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` 650709885543Smrg fi 650809885543Smrg # Put the nasty error message in config.log where it belongs 650909885543Smrg echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 651009885543Smrg 651109885543Smrg ifelse([$4], , [AC_MSG_ERROR(dnl 651209885543Smrg[Package requirements ($2) were not met: 651309885543Smrg 651409885543Smrg$$1_PKG_ERRORS 651509885543Smrg 651609885543SmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you 651709885543Smrginstalled software in a non-standard prefix. 651809885543Smrg 651909885543Smrg_PKG_TEXT 652009885543Smrg])], 652109885543Smrg [AC_MSG_RESULT([no]) 652209885543Smrg $4]) 652309885543Smrgelif test $pkg_failed = untried; then 652409885543Smrg ifelse([$4], , [AC_MSG_FAILURE(dnl 652509885543Smrg[The pkg-config script could not be found or is too old. Make sure it 652609885543Smrgis in your PATH or set the PKG_CONFIG environment variable to the full 652709885543Smrgpath to pkg-config. 652809885543Smrg 652909885543Smrg_PKG_TEXT 653009885543Smrg 653109885543SmrgTo get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.])], 653209885543Smrg [$4]) 653309885543Smrgelse 653409885543Smrg $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 653509885543Smrg $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 653609885543Smrg AC_MSG_RESULT([yes]) 653709885543Smrg ifelse([$3], , :, [$3]) 653809885543Smrgfi[]dnl 653909885543Smrg])# PKG_CHECK_MODULES 654009885543Smrg 654109885543Smrgdnl 654209885543Smrgdnl Copyright 2005-2006 Sun Microsystems, Inc. All rights reserved. 654309885543Smrgdnl 654409885543Smrgdnl Permission is hereby granted, free of charge, to any person obtaining a 654509885543Smrgdnl copy of this software and associated documentation files (the 654609885543Smrgdnl "Software"), to deal in the Software without restriction, including 654709885543Smrgdnl without limitation the rights to use, copy, modify, merge, publish, 654809885543Smrgdnl distribute, and/or sell copies of the Software, and to permit persons 654909885543Smrgdnl to whom the Software is furnished to do so, provided that the above 655009885543Smrgdnl copyright notice(s) and this permission notice appear in all copies of 655109885543Smrgdnl the Software and that both the above copyright notice(s) and this 655209885543Smrgdnl permission notice appear in supporting documentation. 655309885543Smrgdnl 655409885543Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 655509885543Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 655609885543Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT 655709885543Smrgdnl OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR 655809885543Smrgdnl HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL 655909885543Smrgdnl INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING 656009885543Smrgdnl FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, 656109885543Smrgdnl NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION 656209885543Smrgdnl WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 656309885543Smrgdnl 656409885543Smrgdnl Except as contained in this notice, the name of a copyright holder 656509885543Smrgdnl shall not be used in advertising or otherwise to promote the sale, use 656609885543Smrgdnl or other dealings in this Software without prior written authorization 656709885543Smrgdnl of the copyright holder. 656809885543Smrg 656909885543Smrg# XORG_MACROS_VERSION(required-version) 657009885543Smrg# ------------------------------------- 657109885543Smrg# Minimum version: 1.1.0 657209885543Smrg# 657309885543Smrg# If you're using a macro added in Version 1.1 or newer, include this in 657409885543Smrg# your configure.ac with the minimum required version, such as: 657509885543Smrg# XORG_MACROS_VERSION(1.1) 657609885543Smrg# 657709885543Smrg# To force at least a version with this macro defined, also add: 657809885543Smrg# m4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 657909885543Smrg# 658009885543Smrg# 658109885543Smrg# See the "minimum version" comment for each macro you use to see what 658209885543Smrg# version you require. 658309885543SmrgAC_DEFUN([XORG_MACROS_VERSION],[ 658409885543Smrg [XORG_MACROS_needed_version=$1 658509885543Smrg XORG_MACROS_needed_major=`echo $XORG_MACROS_needed_version | sed 's/\..*$//'` 658609885543Smrg XORG_MACROS_needed_minor=`echo $XORG_MACROS_needed_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`] 658709885543Smrg AC_MSG_CHECKING([if xorg-macros used to generate configure is at least ${XORG_MACROS_needed_major}.${XORG_MACROS_needed_minor}]) 658809885543Smrg [XORG_MACROS_version=1.1.5 658909885543Smrg XORG_MACROS_major=`echo $XORG_MACROS_version | sed 's/\..*$//'` 659009885543Smrg XORG_MACROS_minor=`echo $XORG_MACROS_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`] 659109885543Smrg if test $XORG_MACROS_major -ne $XORG_MACROS_needed_major ; then 659209885543Smrg AC_MSG_ERROR([configure built with incompatible version of xorg-macros.m4 - requires version ${XORG_MACROS_major}.x]) 659309885543Smrg fi 659409885543Smrg if test $XORG_MACROS_minor -lt $XORG_MACROS_needed_minor ; then 659509885543Smrg AC_MSG_ERROR([configure built with too old of a version of xorg-macros.m4 - requires version ${XORG_MACROS_major}.${XORG_MACROS_minor}.0 or newer]) 659609885543Smrg fi 659709885543Smrg AC_MSG_RESULT([yes, $XORG_MACROS_version]) 659809885543Smrg]) # XORG_MACROS_VERSION 659909885543Smrg 660009885543Smrg# XORG_PROG_RAWCPP() 660109885543Smrg# ------------------ 660209885543Smrg# Minimum version: 1.0.0 660309885543Smrg# 660409885543Smrg# Find cpp program and necessary flags for use in pre-processing text files 660509885543Smrg# such as man pages and config files 660609885543SmrgAC_DEFUN([XORG_PROG_RAWCPP],[ 660709885543SmrgAC_REQUIRE([AC_PROG_CPP]) 660809885543SmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 660909885543Smrg [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 661009885543Smrg 661109885543Smrg# Check for flag to avoid builtin definitions - assumes unix is predefined, 661209885543Smrg# which is not the best choice for supporting other OS'es, but covers most 661309885543Smrg# of the ones we need for now. 661409885543SmrgAC_MSG_CHECKING([if $RAWCPP requires -undef]) 661509885543SmrgAC_LANG_CONFTEST([Does cpp redefine unix ?]) 661609885543Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 661709885543Smrg AC_MSG_RESULT([no]) 661809885543Smrgelse 661909885543Smrg if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 662009885543Smrg RAWCPPFLAGS=-undef 662109885543Smrg AC_MSG_RESULT([yes]) 662209885543Smrg else 662309885543Smrg AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 662409885543Smrg fi 662509885543Smrgfi 662609885543Smrgrm -f conftest.$ac_ext 662709885543Smrg 662809885543SmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional]) 662909885543SmrgAC_LANG_CONFTEST([Does cpp preserve "whitespace"?]) 663009885543Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 663109885543Smrg AC_MSG_RESULT([no]) 663209885543Smrgelse 663309885543Smrg if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 663409885543Smrg RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 663509885543Smrg AC_MSG_RESULT([yes]) 663609885543Smrg else 663709885543Smrg AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 663809885543Smrg fi 663909885543Smrgfi 664009885543Smrgrm -f conftest.$ac_ext 664109885543SmrgAC_SUBST(RAWCPPFLAGS) 664209885543Smrg]) # XORG_PROG_RAWCPP 664309885543Smrg 664409885543Smrg# XORG_MANPAGE_SECTIONS() 664509885543Smrg# ----------------------- 664609885543Smrg# Minimum version: 1.0.0 664709885543Smrg# 664809885543Smrg# Determine which sections man pages go in for the different man page types 664909885543Smrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 665009885543Smrg# Not sure if there's any better way than just hardcoding by OS name. 665109885543Smrg# Override default settings by setting environment variables 665209885543Smrg 665309885543SmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[ 665409885543SmrgAC_REQUIRE([AC_CANONICAL_HOST]) 665509885543Smrg 665609885543Smrgif test x$APP_MAN_SUFFIX = x ; then 665709885543Smrg APP_MAN_SUFFIX=1 665809885543Smrgfi 665909885543Smrgif test x$APP_MAN_DIR = x ; then 666009885543Smrg APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 666109885543Smrgfi 666209885543Smrg 666309885543Smrgif test x$LIB_MAN_SUFFIX = x ; then 666409885543Smrg LIB_MAN_SUFFIX=3 666509885543Smrgfi 666609885543Smrgif test x$LIB_MAN_DIR = x ; then 666709885543Smrg LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 666809885543Smrgfi 666909885543Smrg 667009885543Smrgif test x$FILE_MAN_SUFFIX = x ; then 667109885543Smrg case $host_os in 667209885543Smrg solaris*) FILE_MAN_SUFFIX=4 ;; 667309885543Smrg *) FILE_MAN_SUFFIX=5 ;; 667409885543Smrg esac 667509885543Smrgfi 667609885543Smrgif test x$FILE_MAN_DIR = x ; then 667709885543Smrg FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 667809885543Smrgfi 667909885543Smrg 668009885543Smrgif test x$MISC_MAN_SUFFIX = x ; then 668109885543Smrg case $host_os in 668209885543Smrg solaris*) MISC_MAN_SUFFIX=5 ;; 668309885543Smrg *) MISC_MAN_SUFFIX=7 ;; 668409885543Smrg esac 668509885543Smrgfi 668609885543Smrgif test x$MISC_MAN_DIR = x ; then 668709885543Smrg MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 668809885543Smrgfi 668909885543Smrg 669009885543Smrgif test x$DRIVER_MAN_SUFFIX = x ; then 669109885543Smrg case $host_os in 669209885543Smrg solaris*) DRIVER_MAN_SUFFIX=7 ;; 669309885543Smrg *) DRIVER_MAN_SUFFIX=4 ;; 669409885543Smrg esac 669509885543Smrgfi 669609885543Smrgif test x$DRIVER_MAN_DIR = x ; then 669709885543Smrg DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 669809885543Smrgfi 669909885543Smrg 670009885543Smrgif test x$ADMIN_MAN_SUFFIX = x ; then 670109885543Smrg case $host_os in 670209885543Smrg solaris*) ADMIN_MAN_SUFFIX=1m ;; 670309885543Smrg *) ADMIN_MAN_SUFFIX=8 ;; 670409885543Smrg esac 670509885543Smrgfi 670609885543Smrgif test x$ADMIN_MAN_DIR = x ; then 670709885543Smrg ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 670809885543Smrgfi 670909885543Smrg 671009885543Smrg 671109885543SmrgAC_SUBST([APP_MAN_SUFFIX]) 671209885543SmrgAC_SUBST([LIB_MAN_SUFFIX]) 671309885543SmrgAC_SUBST([FILE_MAN_SUFFIX]) 671409885543SmrgAC_SUBST([MISC_MAN_SUFFIX]) 671509885543SmrgAC_SUBST([DRIVER_MAN_SUFFIX]) 671609885543SmrgAC_SUBST([ADMIN_MAN_SUFFIX]) 671709885543SmrgAC_SUBST([APP_MAN_DIR]) 671809885543SmrgAC_SUBST([LIB_MAN_DIR]) 671909885543SmrgAC_SUBST([FILE_MAN_DIR]) 672009885543SmrgAC_SUBST([MISC_MAN_DIR]) 672109885543SmrgAC_SUBST([DRIVER_MAN_DIR]) 672209885543SmrgAC_SUBST([ADMIN_MAN_DIR]) 672309885543Smrg]) # XORG_MANPAGE_SECTIONS 672409885543Smrg 672509885543Smrg# XORG_CHECK_LINUXDOC 672609885543Smrg# ------------------- 672709885543Smrg# Minimum version: 1.0.0 672809885543Smrg# 672909885543Smrg# Defines the variable MAKE_TEXT if the necessary tools and 673009885543Smrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 673109885543Smrg# Whether or not the necessary tools and files are found can be checked 673209885543Smrg# with the AM_CONDITIONAL "BUILD_LINUXDOC" 673309885543SmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[ 673409885543SmrgXORG_SGML_PATH=$prefix/share/sgml 673509885543SmrgHAVE_DEFS_ENT= 673609885543Smrg 673709885543SmrgAC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes]) 673809885543Smrg 673909885543SmrgAC_PATH_PROG(LINUXDOC, linuxdoc) 674009885543SmrgAC_PATH_PROG(PS2PDF, ps2pdf) 674109885543Smrg 674209885543SmrgAC_MSG_CHECKING([Whether to build documentation]) 674309885543Smrg 674409885543Smrgif test x$HAVE_DEFS_ENT != x && test x$LINUXDOC != x ; then 674509885543Smrg BUILDDOC=yes 674609885543Smrgelse 674709885543Smrg BUILDDOC=no 674809885543Smrgfi 674909885543Smrg 675009885543SmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 675109885543Smrg 675209885543SmrgAC_MSG_RESULT([$BUILDDOC]) 675309885543Smrg 675409885543SmrgAC_MSG_CHECKING([Whether to build pdf documentation]) 675509885543Smrg 675609885543Smrgif test x$PS2PDF != x && test x$BUILD_PDFDOC != xno; then 675709885543Smrg BUILDPDFDOC=yes 675809885543Smrgelse 675909885543Smrg BUILDPDFDOC=no 676009885543Smrgfi 676109885543Smrg 676209885543SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 676309885543Smrg 676409885543SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 676509885543Smrg 676609885543SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt" 676709885543SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 676809885543SmrgMAKE_PDF="$PS2PDF" 676909885543SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 677009885543Smrg 677109885543SmrgAC_SUBST(MAKE_TEXT) 677209885543SmrgAC_SUBST(MAKE_PS) 677309885543SmrgAC_SUBST(MAKE_PDF) 677409885543SmrgAC_SUBST(MAKE_HTML) 677509885543Smrg]) # XORG_CHECK_LINUXDOC 677609885543Smrg 677709885543Smrg# XORG_CHECK_DOCBOOK 677809885543Smrg# ------------------- 677909885543Smrg# Minimum version: 1.0.0 678009885543Smrg# 678109885543Smrg# Checks for the ability to build output formats from SGML DocBook source. 678209885543Smrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 678309885543Smrg# indicates whether the necessary tools and files are found and, if set, 678409885543Smrg# $(MAKE_XXX) blah.sgml will produce blah.xxx. 678509885543SmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[ 678609885543SmrgXORG_SGML_PATH=$prefix/share/sgml 678709885543SmrgHAVE_DEFS_ENT= 678809885543SmrgBUILDTXTDOC=no 678909885543SmrgBUILDPDFDOC=no 679009885543SmrgBUILDPSDOC=no 679109885543SmrgBUILDHTMLDOC=no 679209885543Smrg 679309885543SmrgAC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes]) 679409885543Smrg 679509885543SmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps) 679609885543SmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 679709885543SmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html) 679809885543SmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt) 679909885543Smrg 680009885543SmrgAC_MSG_CHECKING([Whether to build text documentation]) 680109885543Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKTXT != x && 680209885543Smrg test x$BUILD_TXTDOC != xno; then 680309885543Smrg BUILDTXTDOC=yes 680409885543Smrgfi 680509885543SmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 680609885543SmrgAC_MSG_RESULT([$BUILDTXTDOC]) 680709885543Smrg 680809885543SmrgAC_MSG_CHECKING([Whether to build PDF documentation]) 680909885543Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPDF != x && 681009885543Smrg test x$BUILD_PDFDOC != xno; then 681109885543Smrg BUILDPDFDOC=yes 681209885543Smrgfi 681309885543SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 681409885543SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 681509885543Smrg 681609885543SmrgAC_MSG_CHECKING([Whether to build PostScript documentation]) 681709885543Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPS != x && 681809885543Smrg test x$BUILD_PSDOC != xno; then 681909885543Smrg BUILDPSDOC=yes 682009885543Smrgfi 682109885543SmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 682209885543SmrgAC_MSG_RESULT([$BUILDPSDOC]) 682309885543Smrg 682409885543SmrgAC_MSG_CHECKING([Whether to build HTML documentation]) 682509885543Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKHTML != x && 682609885543Smrg test x$BUILD_HTMLDOC != xno; then 682709885543Smrg BUILDHTMLDOC=yes 682809885543Smrgfi 682909885543SmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 683009885543SmrgAC_MSG_RESULT([$BUILDHTMLDOC]) 683109885543Smrg 683209885543SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 683309885543SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 683409885543SmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 683509885543SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 683609885543Smrg 683709885543SmrgAC_SUBST(MAKE_TEXT) 683809885543SmrgAC_SUBST(MAKE_PS) 683909885543SmrgAC_SUBST(MAKE_PDF) 684009885543SmrgAC_SUBST(MAKE_HTML) 684109885543Smrg]) # XORG_CHECK_DOCBOOK 684209885543Smrg 684309885543Smrg# XORG_CHECK_MALLOC_ZERO 684409885543Smrg# ---------------------- 684509885543Smrg# Minimum version: 1.0.0 684609885543Smrg# 684709885543Smrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 684809885543Smrg# malloc(0) returns NULL. Packages should add one of these cflags to 684909885543Smrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 685009885543SmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 685109885543SmrgAC_ARG_ENABLE(malloc0returnsnull, 685209885543Smrg AC_HELP_STRING([--enable-malloc0returnsnull], 685309885543Smrg [malloc(0) returns NULL (default: auto)]), 685409885543Smrg [MALLOC_ZERO_RETURNS_NULL=$enableval], 685509885543Smrg [MALLOC_ZERO_RETURNS_NULL=auto]) 685609885543Smrg 685709885543SmrgAC_MSG_CHECKING([whether malloc(0) returns NULL]) 685809885543Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 685909885543Smrg AC_RUN_IFELSE([ 686009885543Smrgchar *malloc(); 686109885543Smrgchar *realloc(); 686209885543Smrgchar *calloc(); 686309885543Smrgmain() { 686409885543Smrg char *m0, *r0, *c0, *p; 686509885543Smrg m0 = malloc(0); 686609885543Smrg p = malloc(10); 686709885543Smrg r0 = realloc(p,0); 686809885543Smrg c0 = calloc(0); 686909885543Smrg exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1); 687009885543Smrg}], 687109885543Smrg [MALLOC_ZERO_RETURNS_NULL=yes], 687209885543Smrg [MALLOC_ZERO_RETURNS_NULL=no]) 687309885543Smrgfi 687409885543SmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 687509885543Smrg 687609885543Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 687709885543Smrg MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 687809885543Smrg XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 687909885543Smrg XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 688009885543Smrgelse 688109885543Smrg MALLOC_ZERO_CFLAGS="" 688209885543Smrg XMALLOC_ZERO_CFLAGS="" 688309885543Smrg XTMALLOC_ZERO_CFLAGS="" 688409885543Smrgfi 688509885543Smrg 688609885543SmrgAC_SUBST([MALLOC_ZERO_CFLAGS]) 688709885543SmrgAC_SUBST([XMALLOC_ZERO_CFLAGS]) 688809885543SmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS]) 688909885543Smrg]) # XORG_CHECK_MALLOC_ZERO 689009885543Smrg 689109885543Smrg# XORG_WITH_LINT() 689209885543Smrg# ---------------- 689309885543Smrg# Minimum version: 1.1.0 689409885543Smrg# 689509885543Smrg# Sets up flags for source checkers such as lint and sparse if --with-lint 689609885543Smrg# is specified. (Use --with-lint=sparse for sparse.) 689709885543Smrg# Sets $LINT to name of source checker passed with --with-lint (default: lint) 689809885543Smrg# Sets $LINT_FLAGS to flags to pass to source checker 689909885543Smrg# Sets LINT automake conditional if enabled (default: disabled) 690009885543Smrg# 690109885543SmrgAC_DEFUN([XORG_WITH_LINT],[ 690209885543Smrg 690309885543Smrg# Allow checking code with lint, sparse, etc. 690409885543SmrgAC_ARG_WITH(lint, [AC_HELP_STRING([--with-lint], 690509885543Smrg [Use a lint-style source code checker (default: disabled)])], 690609885543Smrg [use_lint=$withval], [use_lint=no]) 690709885543Smrgif test "x$use_lint" = "xyes" ; then 690809885543Smrg LINT="lint" 690909885543Smrgelse 691009885543Smrg LINT="$use_lint" 691109885543Smrgfi 691209885543Smrgif test "x$LINT_FLAGS" = "x" -a "x$LINT" != "xno" ; then 691309885543Smrg case $LINT in 691409885543Smrg lint|*/lint) 691509885543Smrg case $host_os in 691609885543Smrg solaris*) 691709885543Smrg LINT_FLAGS="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 691809885543Smrg ;; 691909885543Smrg esac 692009885543Smrg ;; 692109885543Smrg esac 692209885543Smrgfi 692309885543Smrg 692409885543SmrgAC_SUBST(LINT) 692509885543SmrgAC_SUBST(LINT_FLAGS) 692609885543SmrgAM_CONDITIONAL(LINT, [test x$LINT != xno]) 692709885543Smrg 692809885543Smrg]) # XORG_WITH_LINT 692909885543Smrg 693009885543Smrg# XORG_LINT_LIBRARY(LIBNAME) 693109885543Smrg# -------------------------- 693209885543Smrg# Minimum version: 1.1.0 693309885543Smrg# 693409885543Smrg# Sets up flags for building lint libraries for checking programs that call 693509885543Smrg# functions in the library. 693609885543Smrg# Disabled by default, enable with --enable-lint-library 693709885543Smrg# Sets: 693809885543Smrg# @LINTLIB@ - name of lint library file to make 693909885543Smrg# MAKE_LINT_LIB - automake conditional 694009885543Smrg# 694109885543Smrg 694209885543SmrgAC_DEFUN([XORG_LINT_LIBRARY],[ 694309885543SmrgAC_REQUIRE([XORG_WITH_LINT]) 694409885543Smrg# Build lint "library" for more indepth checks of programs calling this library 694509885543SmrgAC_ARG_ENABLE(lint-library, [AC_HELP_STRING([--enable-lint-library], 694609885543Smrg [Create lint library (default: disabled)])], 694709885543Smrg [make_lint_lib=$enableval], [make_lint_lib=no]) 694809885543Smrgif test "x$make_lint_lib" != "xno" ; then 694909885543Smrg if test "x$LINT" = "xno" ; then 695009885543Smrg AC_MSG_ERROR([Cannot make lint library without --with-lint]) 695109885543Smrg fi 695209885543Smrg if test "x$make_lint_lib" = "xyes" ; then 695309885543Smrg LINTLIB=llib-l$1.ln 695409885543Smrg else 695509885543Smrg LINTLIB=$make_lint_lib 695609885543Smrg fi 695709885543Smrgfi 695809885543SmrgAC_SUBST(LINTLIB) 695909885543SmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 696009885543Smrg 696109885543Smrg]) # XORG_LINT_LIBRARY 696209885543Smrg 696309885543Smrgdnl Copyright 2005 Red Hat, Inc 696409885543Smrgdnl 696509885543Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its 696609885543Smrgdnl documentation for any purpose is hereby granted without fee, provided that 696709885543Smrgdnl the above copyright notice appear in all copies and that both that 696809885543Smrgdnl copyright notice and this permission notice appear in supporting 696909885543Smrgdnl documentation. 697009885543Smrgdnl 697109885543Smrgdnl The above copyright notice and this permission notice shall be included 697209885543Smrgdnl in all copies or substantial portions of the Software. 697309885543Smrgdnl 697409885543Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 697509885543Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 697609885543Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 697709885543Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 697809885543Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 697909885543Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 698009885543Smrgdnl OTHER DEALINGS IN THE SOFTWARE. 698109885543Smrgdnl 698209885543Smrgdnl Except as contained in this notice, the name of the copyright holders shall 698309885543Smrgdnl not be used in advertising or otherwise to promote the sale, use or 698409885543Smrgdnl other dealings in this Software without prior written authorization 698509885543Smrgdnl from the copyright holders. 698609885543Smrgdnl 698709885543Smrg 698809885543Smrg# XORG_DRIVER_CHECK_EXT() 698909885543Smrg# -------------------------- 699009885543Smrg# Checks for the $1 define in xorg-server.h (from the sdk). If it 699109885543Smrg# is defined, then add $1 to $REQUIRED_MODULES. 699209885543Smrg 699309885543SmrgAC_DEFUN([XORG_DRIVER_CHECK_EXT],[ 699409885543Smrg SAVE_CFLAGS="$CFLAGS" 699509885543Smrg CFLAGS="$CFLAGS -I`pkg-config --variable=sdkdir xorg-server`" 699609885543Smrg AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ 699709885543Smrg#include "xorg-server.h" 699809885543Smrg#if !defined $1 699909885543Smrg#error $1 not defined 700009885543Smrg#endif 700109885543Smrg ]])], 700209885543Smrg [_EXT_CHECK=yes], 700309885543Smrg [_EXT_CHECK=no]) 700409885543Smrg CFLAGS="$SAVE_CFLAGS" 700509885543Smrg AC_MSG_CHECKING([if $1 is defined]) 700609885543Smrg AC_MSG_RESULT([$_EXT_CHECK]) 700709885543Smrg if test "$_EXT_CHECK" != no; then 700809885543Smrg REQUIRED_MODULES="$REQUIRED_MODULES $2" 700909885543Smrg fi 701009885543Smrg]) 701109885543Smrg 701209885543Smrgdnl Copyright 2005 Red Hat, Inc 701309885543Smrgdnl 701409885543Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its 701509885543Smrgdnl documentation for any purpose is hereby granted without fee, provided that 701609885543Smrgdnl the above copyright notice appear in all copies and that both that 701709885543Smrgdnl copyright notice and this permission notice appear in supporting 701809885543Smrgdnl documentation. 701909885543Smrgdnl 702009885543Smrgdnl The above copyright notice and this permission notice shall be included 702109885543Smrgdnl in all copies or substantial portions of the Software. 702209885543Smrgdnl 702309885543Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 702409885543Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 702509885543Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 702609885543Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 702709885543Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 702809885543Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 702909885543Smrgdnl OTHER DEALINGS IN THE SOFTWARE. 703009885543Smrgdnl 703109885543Smrgdnl Except as contained in this notice, the name of the copyright holders shall 703209885543Smrgdnl not be used in advertising or otherwise to promote the sale, use or 703309885543Smrgdnl other dealings in this Software without prior written authorization 703409885543Smrgdnl from the copyright holders. 703509885543Smrgdnl 703609885543Smrg 703709885543Smrg# XORG_RELEASE_VERSION 703809885543Smrg# -------------------- 703909885543Smrg# Adds --with/without-release-string and changes the PACKAGE and 704009885543Smrg# PACKAGE_TARNAME to use "$PACKAGE{_TARNAME}-$RELEASE_VERSION". If 704109885543Smrg# no option is given, PACKAGE and PACKAGE_TARNAME are unchanged. Also 704209885543Smrg# defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 704309885543Smrg 704409885543SmrgAC_DEFUN([XORG_RELEASE_VERSION],[ 704509885543Smrg AC_ARG_WITH(release-version, 704609885543Smrg AC_HELP_STRING([--with-release-version=STRING], 704709885543Smrg [Use release version string in package name]), 704809885543Smrg [RELEASE_VERSION="$withval"], 704909885543Smrg [RELEASE_VERSION=""]) 705009885543Smrg if test "x$RELEASE_VERSION" != "x"; then 705109885543Smrg PACKAGE="$PACKAGE-$RELEASE_VERSION" 705209885543Smrg PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION" 705309885543Smrg AC_MSG_NOTICE([Building with package name set to $PACKAGE]) 705409885543Smrg fi 705509885543Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 705609885543Smrg [`echo $PACKAGE_VERSION | cut -d . -f 1`], 705709885543Smrg [Major version of this package]) 705809885543Smrg PVM=`echo $PACKAGE_VERSION | cut -d . -f 2` 705909885543Smrg if test "x$PVM" = "x"; then 706009885543Smrg PVM="0" 706109885543Smrg fi 706209885543Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 706309885543Smrg [$PVM], 706409885543Smrg [Minor version of this package]) 706509885543Smrg PVP=`echo $PACKAGE_VERSION | cut -d . -f 3` 706609885543Smrg if test "x$PVP" = "x"; then 706709885543Smrg PVP="0" 706809885543Smrg fi 706909885543Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 707009885543Smrg [$PVP], 707109885543Smrg [Patch version of this package]) 707209885543Smrg]) 707309885543Smrg 707409885543Smrg# Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc. 707509885543Smrg# 707609885543Smrg# This file is free software; the Free Software Foundation 707709885543Smrg# gives unlimited permission to copy and/or distribute it, 707809885543Smrg# with or without modifications, as long as this notice is preserved. 707909885543Smrg 708009885543Smrg# AM_AUTOMAKE_VERSION(VERSION) 708109885543Smrg# ---------------------------- 708209885543Smrg# Automake X.Y traces this macro to ensure aclocal.m4 has been 708309885543Smrg# generated from the m4 files accompanying Automake X.Y. 708409885543SmrgAC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"]) 708509885543Smrg 708609885543Smrg# AM_SET_CURRENT_AUTOMAKE_VERSION 708709885543Smrg# ------------------------------- 708809885543Smrg# Call AM_AUTOMAKE_VERSION so it can be traced. 708909885543Smrg# This function is AC_REQUIREd by AC_INIT_AUTOMAKE. 709009885543SmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 709109885543Smrg [AM_AUTOMAKE_VERSION([1.9.6])]) 709209885543Smrg 709309885543Smrg# AM_AUX_DIR_EXPAND -*- Autoconf -*- 709409885543Smrg 709509885543Smrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 709609885543Smrg# 709709885543Smrg# This file is free software; the Free Software Foundation 709809885543Smrg# gives unlimited permission to copy and/or distribute it, 709909885543Smrg# with or without modifications, as long as this notice is preserved. 710009885543Smrg 710109885543Smrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 710209885543Smrg# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to 710309885543Smrg# `$srcdir', `$srcdir/..', or `$srcdir/../..'. 710409885543Smrg# 710509885543Smrg# Of course, Automake must honor this variable whenever it calls a 710609885543Smrg# tool from the auxiliary directory. The problem is that $srcdir (and 710709885543Smrg# therefore $ac_aux_dir as well) can be either absolute or relative, 710809885543Smrg# depending on how configure is run. This is pretty annoying, since 710909885543Smrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top 711009885543Smrg# source directory, any form will work fine, but in subdirectories a 711109885543Smrg# relative path needs to be adjusted first. 711209885543Smrg# 711309885543Smrg# $ac_aux_dir/missing 711409885543Smrg# fails when called from a subdirectory if $ac_aux_dir is relative 711509885543Smrg# $top_srcdir/$ac_aux_dir/missing 711609885543Smrg# fails if $ac_aux_dir is absolute, 711709885543Smrg# fails when called from a subdirectory in a VPATH build with 711809885543Smrg# a relative $ac_aux_dir 711909885543Smrg# 712009885543Smrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 712109885543Smrg# are both prefixed by $srcdir. In an in-source build this is usually 712209885543Smrg# harmless because $srcdir is `.', but things will broke when you 712309885543Smrg# start a VPATH build or use an absolute $srcdir. 712409885543Smrg# 712509885543Smrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 712609885543Smrg# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 712709885543Smrg# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 712809885543Smrg# and then we would define $MISSING as 712909885543Smrg# MISSING="\${SHELL} $am_aux_dir/missing" 713009885543Smrg# This will work as long as MISSING is not called from configure, because 713109885543Smrg# unfortunately $(top_srcdir) has no meaning in configure. 713209885543Smrg# However there are other variables, like CC, which are often used in 713309885543Smrg# configure, and could therefore not use this "fixed" $ac_aux_dir. 713409885543Smrg# 713509885543Smrg# Another solution, used here, is to always expand $ac_aux_dir to an 713609885543Smrg# absolute PATH. The drawback is that using absolute paths prevent a 713709885543Smrg# configured tree to be moved without reconfiguration. 713809885543Smrg 713909885543SmrgAC_DEFUN([AM_AUX_DIR_EXPAND], 714009885543Smrg[dnl Rely on autoconf to set up CDPATH properly. 714109885543SmrgAC_PREREQ([2.50])dnl 714209885543Smrg# expand $ac_aux_dir to an absolute path 714309885543Smrgam_aux_dir=`cd $ac_aux_dir && pwd` 714409885543Smrg]) 714509885543Smrg 714609885543Smrg# AM_CONDITIONAL -*- Autoconf -*- 714709885543Smrg 714809885543Smrg# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005 714909885543Smrg# Free Software Foundation, Inc. 715009885543Smrg# 715109885543Smrg# This file is free software; the Free Software Foundation 715209885543Smrg# gives unlimited permission to copy and/or distribute it, 715309885543Smrg# with or without modifications, as long as this notice is preserved. 715409885543Smrg 715509885543Smrg# serial 7 715609885543Smrg 715709885543Smrg# AM_CONDITIONAL(NAME, SHELL-CONDITION) 715809885543Smrg# ------------------------------------- 715909885543Smrg# Define a conditional. 716009885543SmrgAC_DEFUN([AM_CONDITIONAL], 716109885543Smrg[AC_PREREQ(2.52)dnl 716209885543Smrg ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 716309885543Smrg [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 716409885543SmrgAC_SUBST([$1_TRUE]) 716509885543SmrgAC_SUBST([$1_FALSE]) 716609885543Smrgif $2; then 716709885543Smrg $1_TRUE= 716809885543Smrg $1_FALSE='#' 716909885543Smrgelse 717009885543Smrg $1_TRUE='#' 717109885543Smrg $1_FALSE= 717209885543Smrgfi 717309885543SmrgAC_CONFIG_COMMANDS_PRE( 717409885543Smrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 717509885543Smrg AC_MSG_ERROR([[conditional "$1" was never defined. 717609885543SmrgUsually this means the macro was only invoked conditionally.]]) 717709885543Smrgfi])]) 717809885543Smrg 717909885543Smrg 718009885543Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 718109885543Smrg# Free Software Foundation, Inc. 718209885543Smrg# 718309885543Smrg# This file is free software; the Free Software Foundation 718409885543Smrg# gives unlimited permission to copy and/or distribute it, 718509885543Smrg# with or without modifications, as long as this notice is preserved. 718609885543Smrg 718709885543Smrg# serial 8 718809885543Smrg 718909885543Smrg# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be 719009885543Smrg# written in clear, in which case automake, when reading aclocal.m4, 719109885543Smrg# will think it sees a *use*, and therefore will trigger all it's 719209885543Smrg# C support machinery. Also note that it means that autoscan, seeing 719309885543Smrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 719409885543Smrg 719509885543Smrg 719609885543Smrg# _AM_DEPENDENCIES(NAME) 719709885543Smrg# ---------------------- 719809885543Smrg# See how the compiler implements dependency checking. 719909885543Smrg# NAME is "CC", "CXX", "GCJ", or "OBJC". 720009885543Smrg# We try a few techniques and use that to set a single cache variable. 720109885543Smrg# 720209885543Smrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 720309885543Smrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 720409885543Smrg# dependency, and given that the user is not expected to run this macro, 720509885543Smrg# just rely on AC_PROG_CC. 720609885543SmrgAC_DEFUN([_AM_DEPENDENCIES], 720709885543Smrg[AC_REQUIRE([AM_SET_DEPDIR])dnl 720809885543SmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 720909885543SmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl 721009885543SmrgAC_REQUIRE([AM_DEP_TRACK])dnl 721109885543Smrg 721209885543Smrgifelse([$1], CC, [depcc="$CC" am_compiler_list=], 721309885543Smrg [$1], CXX, [depcc="$CXX" am_compiler_list=], 721409885543Smrg [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 721509885543Smrg [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 721609885543Smrg [depcc="$$1" am_compiler_list=]) 721709885543Smrg 721809885543SmrgAC_CACHE_CHECK([dependency style of $depcc], 721909885543Smrg [am_cv_$1_dependencies_compiler_type], 722009885543Smrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 722109885543Smrg # We make a subdir and do the tests there. Otherwise we can end up 722209885543Smrg # making bogus files that we don't know about and never remove. For 722309885543Smrg # instance it was reported that on HP-UX the gcc test will end up 722409885543Smrg # making a dummy file named `D' -- because `-MD' means `put the output 722509885543Smrg # in D'. 722609885543Smrg mkdir conftest.dir 722709885543Smrg # Copy depcomp to subdir because otherwise we won't find it if we're 722809885543Smrg # using a relative directory. 722909885543Smrg cp "$am_depcomp" conftest.dir 723009885543Smrg cd conftest.dir 723109885543Smrg # We will build objects and dependencies in a subdirectory because 723209885543Smrg # it helps to detect inapplicable dependency modes. For instance 723309885543Smrg # both Tru64's cc and ICC support -MD to output dependencies as a 723409885543Smrg # side effect of compilation, but ICC will put the dependencies in 723509885543Smrg # the current directory while Tru64 will put them in the object 723609885543Smrg # directory. 723709885543Smrg mkdir sub 723809885543Smrg 723909885543Smrg am_cv_$1_dependencies_compiler_type=none 724009885543Smrg if test "$am_compiler_list" = ""; then 724109885543Smrg am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 724209885543Smrg fi 724309885543Smrg for depmode in $am_compiler_list; do 724409885543Smrg # Setup a source with many dependencies, because some compilers 724509885543Smrg # like to wrap large dependency lists on column 80 (with \), and 724609885543Smrg # we should not choose a depcomp mode which is confused by this. 724709885543Smrg # 724809885543Smrg # We need to recreate these files for each test, as the compiler may 724909885543Smrg # overwrite some of them when testing with obscure command lines. 725009885543Smrg # This happens at least with the AIX C compiler. 725109885543Smrg : > sub/conftest.c 725209885543Smrg for i in 1 2 3 4 5 6; do 725309885543Smrg echo '#include "conftst'$i'.h"' >> sub/conftest.c 725409885543Smrg # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with 725509885543Smrg # Solaris 8's {/usr,}/bin/sh. 725609885543Smrg touch sub/conftst$i.h 725709885543Smrg done 725809885543Smrg echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 725909885543Smrg 726009885543Smrg case $depmode in 726109885543Smrg nosideeffect) 726209885543Smrg # after this tag, mechanisms are not by side-effect, so they'll 726309885543Smrg # only be used when explicitly requested 726409885543Smrg if test "x$enable_dependency_tracking" = xyes; then 726509885543Smrg continue 726609885543Smrg else 726709885543Smrg break 726809885543Smrg fi 726909885543Smrg ;; 727009885543Smrg none) break ;; 727109885543Smrg esac 727209885543Smrg # We check with `-c' and `-o' for the sake of the "dashmstdout" 727309885543Smrg # mode. It turns out that the SunPro C++ compiler does not properly 727409885543Smrg # handle `-M -o', and we need to detect this. 727509885543Smrg if depmode=$depmode \ 727609885543Smrg source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ 727709885543Smrg depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 727809885543Smrg $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ 727909885543Smrg >/dev/null 2>conftest.err && 728009885543Smrg grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 728109885543Smrg grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && 728209885543Smrg ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 728309885543Smrg # icc doesn't choke on unknown options, it will just issue warnings 728409885543Smrg # or remarks (even with -Werror). So we grep stderr for any message 728509885543Smrg # that says an option was ignored or not supported. 728609885543Smrg # When given -MP, icc 7.0 and 7.1 complain thusly: 728709885543Smrg # icc: Command line warning: ignoring option '-M'; no argument required 728809885543Smrg # The diagnosis changed in icc 8.0: 728909885543Smrg # icc: Command line remark: option '-MP' not supported 729009885543Smrg if (grep 'ignoring option' conftest.err || 729109885543Smrg grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 729209885543Smrg am_cv_$1_dependencies_compiler_type=$depmode 729309885543Smrg break 729409885543Smrg fi 729509885543Smrg fi 729609885543Smrg done 729709885543Smrg 729809885543Smrg cd .. 729909885543Smrg rm -rf conftest.dir 730009885543Smrgelse 730109885543Smrg am_cv_$1_dependencies_compiler_type=none 730209885543Smrgfi 730309885543Smrg]) 730409885543SmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 730509885543SmrgAM_CONDITIONAL([am__fastdep$1], [ 730609885543Smrg test "x$enable_dependency_tracking" != xno \ 730709885543Smrg && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 730809885543Smrg]) 730909885543Smrg 731009885543Smrg 731109885543Smrg# AM_SET_DEPDIR 731209885543Smrg# ------------- 731309885543Smrg# Choose a directory name for dependency files. 731409885543Smrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES 731509885543SmrgAC_DEFUN([AM_SET_DEPDIR], 731609885543Smrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 731709885543SmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 731809885543Smrg]) 731909885543Smrg 732009885543Smrg 732109885543Smrg# AM_DEP_TRACK 732209885543Smrg# ------------ 732309885543SmrgAC_DEFUN([AM_DEP_TRACK], 732409885543Smrg[AC_ARG_ENABLE(dependency-tracking, 732509885543Smrg[ --disable-dependency-tracking speeds up one-time build 732609885543Smrg --enable-dependency-tracking do not reject slow dependency extractors]) 732709885543Smrgif test "x$enable_dependency_tracking" != xno; then 732809885543Smrg am_depcomp="$ac_aux_dir/depcomp" 732909885543Smrg AMDEPBACKSLASH='\' 733009885543Smrgfi 733109885543SmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 733209885543SmrgAC_SUBST([AMDEPBACKSLASH]) 733309885543Smrg]) 733409885543Smrg 733509885543Smrg# Generate code to set up dependency tracking. -*- Autoconf -*- 733609885543Smrg 733709885543Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 733809885543Smrg# Free Software Foundation, Inc. 733909885543Smrg# 734009885543Smrg# This file is free software; the Free Software Foundation 734109885543Smrg# gives unlimited permission to copy and/or distribute it, 734209885543Smrg# with or without modifications, as long as this notice is preserved. 734309885543Smrg 734409885543Smrg#serial 3 734509885543Smrg 734609885543Smrg# _AM_OUTPUT_DEPENDENCY_COMMANDS 734709885543Smrg# ------------------------------ 734809885543SmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 734909885543Smrg[for mf in $CONFIG_FILES; do 735009885543Smrg # Strip MF so we end up with the name of the file. 735109885543Smrg mf=`echo "$mf" | sed -e 's/:.*$//'` 735209885543Smrg # Check whether this is an Automake generated Makefile or not. 735309885543Smrg # We used to match only the files named `Makefile.in', but 735409885543Smrg # some people rename them; so instead we look at the file content. 735509885543Smrg # Grep'ing the first line is not enough: some people post-process 735609885543Smrg # each Makefile.in and add a new line on top of each file to say so. 735709885543Smrg # So let's grep whole file. 735809885543Smrg if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then 735909885543Smrg dirpart=`AS_DIRNAME("$mf")` 736009885543Smrg else 736109885543Smrg continue 736209885543Smrg fi 736309885543Smrg # Extract the definition of DEPDIR, am__include, and am__quote 736409885543Smrg # from the Makefile without running `make'. 736509885543Smrg DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` 736609885543Smrg test -z "$DEPDIR" && continue 736709885543Smrg am__include=`sed -n 's/^am__include = //p' < "$mf"` 736809885543Smrg test -z "am__include" && continue 736909885543Smrg am__quote=`sed -n 's/^am__quote = //p' < "$mf"` 737009885543Smrg # When using ansi2knr, U may be empty or an underscore; expand it 737109885543Smrg U=`sed -n 's/^U = //p' < "$mf"` 737209885543Smrg # Find all dependency output files, they are included files with 737309885543Smrg # $(DEPDIR) in their names. We invoke sed twice because it is the 737409885543Smrg # simplest approach to changing $(DEPDIR) to its actual value in the 737509885543Smrg # expansion. 737609885543Smrg for file in `sed -n " 737709885543Smrg s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ 737809885543Smrg sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do 737909885543Smrg # Make sure the directory exists. 738009885543Smrg test -f "$dirpart/$file" && continue 738109885543Smrg fdir=`AS_DIRNAME(["$file"])` 738209885543Smrg AS_MKDIR_P([$dirpart/$fdir]) 738309885543Smrg # echo "creating $dirpart/$file" 738409885543Smrg echo '# dummy' > "$dirpart/$file" 738509885543Smrg done 738609885543Smrgdone 738709885543Smrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS 738809885543Smrg 738909885543Smrg 739009885543Smrg# AM_OUTPUT_DEPENDENCY_COMMANDS 739109885543Smrg# ----------------------------- 739209885543Smrg# This macro should only be invoked once -- use via AC_REQUIRE. 739309885543Smrg# 739409885543Smrg# This code is only required when automatic dependency tracking 739509885543Smrg# is enabled. FIXME. This creates each `.P' file that we will 739609885543Smrg# need in order to bootstrap the dependency handling code. 739709885543SmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 739809885543Smrg[AC_CONFIG_COMMANDS([depfiles], 739909885543Smrg [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 740009885543Smrg [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 740109885543Smrg]) 740209885543Smrg 740309885543Smrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 740409885543Smrg# Free Software Foundation, Inc. 740509885543Smrg# 740609885543Smrg# This file is free software; the Free Software Foundation 740709885543Smrg# gives unlimited permission to copy and/or distribute it, 740809885543Smrg# with or without modifications, as long as this notice is preserved. 740909885543Smrg 741009885543Smrg# serial 8 741109885543Smrg 741209885543Smrg# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. 741309885543SmrgAU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) 741409885543Smrg 741509885543Smrg# Do all the work for Automake. -*- Autoconf -*- 741609885543Smrg 741709885543Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 741809885543Smrg# Free Software Foundation, Inc. 741909885543Smrg# 742009885543Smrg# This file is free software; the Free Software Foundation 742109885543Smrg# gives unlimited permission to copy and/or distribute it, 742209885543Smrg# with or without modifications, as long as this notice is preserved. 742309885543Smrg 742409885543Smrg# serial 12 742509885543Smrg 742609885543Smrg# This macro actually does too much. Some checks are only needed if 742709885543Smrg# your package does certain things. But this isn't really a big deal. 742809885543Smrg 742909885543Smrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 743009885543Smrg# AM_INIT_AUTOMAKE([OPTIONS]) 743109885543Smrg# ----------------------------------------------- 743209885543Smrg# The call with PACKAGE and VERSION arguments is the old style 743309885543Smrg# call (pre autoconf-2.50), which is being phased out. PACKAGE 743409885543Smrg# and VERSION should now be passed to AC_INIT and removed from 743509885543Smrg# the call to AM_INIT_AUTOMAKE. 743609885543Smrg# We support both call styles for the transition. After 743709885543Smrg# the next Automake release, Autoconf can make the AC_INIT 743809885543Smrg# arguments mandatory, and then we can depend on a new Autoconf 743909885543Smrg# release and drop the old call support. 744009885543SmrgAC_DEFUN([AM_INIT_AUTOMAKE], 744109885543Smrg[AC_PREREQ([2.58])dnl 744209885543Smrgdnl Autoconf wants to disallow AM_ names. We explicitly allow 744309885543Smrgdnl the ones we care about. 744409885543Smrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 744509885543SmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 744609885543SmrgAC_REQUIRE([AC_PROG_INSTALL])dnl 744709885543Smrg# test to see if srcdir already configured 744809885543Smrgif test "`cd $srcdir && pwd`" != "`pwd`" && 744909885543Smrg test -f $srcdir/config.status; then 745009885543Smrg AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 745109885543Smrgfi 745209885543Smrg 745309885543Smrg# test whether we have cygpath 745409885543Smrgif test -z "$CYGPATH_W"; then 745509885543Smrg if (cygpath --version) >/dev/null 2>/dev/null; then 745609885543Smrg CYGPATH_W='cygpath -w' 745709885543Smrg else 745809885543Smrg CYGPATH_W=echo 745909885543Smrg fi 746009885543Smrgfi 746109885543SmrgAC_SUBST([CYGPATH_W]) 746209885543Smrg 746309885543Smrg# Define the identity of the package. 746409885543Smrgdnl Distinguish between old-style and new-style calls. 746509885543Smrgm4_ifval([$2], 746609885543Smrg[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 746709885543Smrg AC_SUBST([PACKAGE], [$1])dnl 746809885543Smrg AC_SUBST([VERSION], [$2])], 746909885543Smrg[_AM_SET_OPTIONS([$1])dnl 747009885543Smrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 747109885543Smrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 747209885543Smrg 747309885543Smrg_AM_IF_OPTION([no-define],, 747409885543Smrg[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) 747509885543Smrg AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl 747609885543Smrg 747709885543Smrg# Some tools Automake needs. 747809885543SmrgAC_REQUIRE([AM_SANITY_CHECK])dnl 747909885543SmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl 748009885543SmrgAM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) 748109885543SmrgAM_MISSING_PROG(AUTOCONF, autoconf) 748209885543SmrgAM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) 748309885543SmrgAM_MISSING_PROG(AUTOHEADER, autoheader) 748409885543SmrgAM_MISSING_PROG(MAKEINFO, makeinfo) 748509885543SmrgAM_PROG_INSTALL_SH 748609885543SmrgAM_PROG_INSTALL_STRIP 748709885543SmrgAC_REQUIRE([AM_PROG_MKDIR_P])dnl 748809885543Smrg# We need awk for the "check" target. The system "awk" is bad on 748909885543Smrg# some platforms. 749009885543SmrgAC_REQUIRE([AC_PROG_AWK])dnl 749109885543SmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl 749209885543SmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl 749309885543Smrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 749409885543Smrg [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 749509885543Smrg [_AM_PROG_TAR([v7])])]) 749609885543Smrg_AM_IF_OPTION([no-dependencies],, 749709885543Smrg[AC_PROVIDE_IFELSE([AC_PROG_CC], 749809885543Smrg [_AM_DEPENDENCIES(CC)], 749909885543Smrg [define([AC_PROG_CC], 750009885543Smrg defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl 750109885543SmrgAC_PROVIDE_IFELSE([AC_PROG_CXX], 750209885543Smrg [_AM_DEPENDENCIES(CXX)], 750309885543Smrg [define([AC_PROG_CXX], 750409885543Smrg defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl 750509885543Smrg]) 750609885543Smrg]) 750709885543Smrg 750809885543Smrg 750909885543Smrg# When config.status generates a header, we must update the stamp-h file. 751009885543Smrg# This file resides in the same directory as the config header 751109885543Smrg# that is generated. The stamp files are numbered to have different names. 751209885543Smrg 751309885543Smrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 751409885543Smrg# loop where config.status creates the headers, so we can generate 751509885543Smrg# our stamp files there. 751609885543SmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 751709885543Smrg[# Compute $1's index in $config_headers. 751809885543Smrg_am_stamp_count=1 751909885543Smrgfor _am_header in $config_headers :; do 752009885543Smrg case $_am_header in 752109885543Smrg $1 | $1:* ) 752209885543Smrg break ;; 752309885543Smrg * ) 752409885543Smrg _am_stamp_count=`expr $_am_stamp_count + 1` ;; 752509885543Smrg esac 752609885543Smrgdone 752709885543Smrgecho "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) 752809885543Smrg 752909885543Smrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 753009885543Smrg# 753109885543Smrg# This file is free software; the Free Software Foundation 753209885543Smrg# gives unlimited permission to copy and/or distribute it, 753309885543Smrg# with or without modifications, as long as this notice is preserved. 753409885543Smrg 753509885543Smrg# AM_PROG_INSTALL_SH 753609885543Smrg# ------------------ 753709885543Smrg# Define $install_sh. 753809885543SmrgAC_DEFUN([AM_PROG_INSTALL_SH], 753909885543Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 754009885543Smrginstall_sh=${install_sh-"$am_aux_dir/install-sh"} 754109885543SmrgAC_SUBST(install_sh)]) 754209885543Smrg 754309885543Smrg# Copyright (C) 2003, 2005 Free Software Foundation, Inc. 754409885543Smrg# 754509885543Smrg# This file is free software; the Free Software Foundation 754609885543Smrg# gives unlimited permission to copy and/or distribute it, 754709885543Smrg# with or without modifications, as long as this notice is preserved. 754809885543Smrg 754909885543Smrg# serial 2 755009885543Smrg 755109885543Smrg# Check whether the underlying file-system supports filenames 755209885543Smrg# with a leading dot. For instance MS-DOS doesn't. 755309885543SmrgAC_DEFUN([AM_SET_LEADING_DOT], 755409885543Smrg[rm -rf .tst 2>/dev/null 755509885543Smrgmkdir .tst 2>/dev/null 755609885543Smrgif test -d .tst; then 755709885543Smrg am__leading_dot=. 755809885543Smrgelse 755909885543Smrg am__leading_dot=_ 756009885543Smrgfi 756109885543Smrgrmdir .tst 2>/dev/null 756209885543SmrgAC_SUBST([am__leading_dot])]) 756309885543Smrg 756409885543Smrg# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- 756509885543Smrg# From Jim Meyering 756609885543Smrg 756709885543Smrg# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005 756809885543Smrg# Free Software Foundation, Inc. 756909885543Smrg# 757009885543Smrg# This file is free software; the Free Software Foundation 757109885543Smrg# gives unlimited permission to copy and/or distribute it, 757209885543Smrg# with or without modifications, as long as this notice is preserved. 757309885543Smrg 757409885543Smrg# serial 4 757509885543Smrg 757609885543SmrgAC_DEFUN([AM_MAINTAINER_MODE], 757709885543Smrg[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) 757809885543Smrg dnl maintainer-mode is disabled by default 757909885543Smrg AC_ARG_ENABLE(maintainer-mode, 758009885543Smrg[ --enable-maintainer-mode enable make rules and dependencies not useful 758109885543Smrg (and sometimes confusing) to the casual installer], 758209885543Smrg USE_MAINTAINER_MODE=$enableval, 758309885543Smrg USE_MAINTAINER_MODE=no) 758409885543Smrg AC_MSG_RESULT([$USE_MAINTAINER_MODE]) 758509885543Smrg AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes]) 758609885543Smrg MAINT=$MAINTAINER_MODE_TRUE 758709885543Smrg AC_SUBST(MAINT)dnl 758809885543Smrg] 758909885543Smrg) 759009885543Smrg 759109885543SmrgAU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) 759209885543Smrg 759309885543Smrg# Check to see how 'make' treats includes. -*- Autoconf -*- 759409885543Smrg 759509885543Smrg# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. 759609885543Smrg# 759709885543Smrg# This file is free software; the Free Software Foundation 759809885543Smrg# gives unlimited permission to copy and/or distribute it, 759909885543Smrg# with or without modifications, as long as this notice is preserved. 760009885543Smrg 760109885543Smrg# serial 3 760209885543Smrg 760309885543Smrg# AM_MAKE_INCLUDE() 760409885543Smrg# ----------------- 760509885543Smrg# Check to see how make treats includes. 760609885543SmrgAC_DEFUN([AM_MAKE_INCLUDE], 760709885543Smrg[am_make=${MAKE-make} 760809885543Smrgcat > confinc << 'END' 760909885543Smrgam__doit: 761009885543Smrg @echo done 761109885543Smrg.PHONY: am__doit 761209885543SmrgEND 761309885543Smrg# If we don't find an include directive, just comment out the code. 761409885543SmrgAC_MSG_CHECKING([for style of include used by $am_make]) 761509885543Smrgam__include="#" 761609885543Smrgam__quote= 761709885543Smrg_am_result=none 761809885543Smrg# First try GNU make style include. 761909885543Smrgecho "include confinc" > confmf 762009885543Smrg# We grep out `Entering directory' and `Leaving directory' 762109885543Smrg# messages which can occur if `w' ends up in MAKEFLAGS. 762209885543Smrg# In particular we don't look at `^make:' because GNU make might 762309885543Smrg# be invoked under some other name (usually "gmake"), in which 762409885543Smrg# case it prints its new name instead of `make'. 762509885543Smrgif test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then 762609885543Smrg am__include=include 762709885543Smrg am__quote= 762809885543Smrg _am_result=GNU 762909885543Smrgfi 763009885543Smrg# Now try BSD make style include. 763109885543Smrgif test "$am__include" = "#"; then 763209885543Smrg echo '.include "confinc"' > confmf 763309885543Smrg if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then 763409885543Smrg am__include=.include 763509885543Smrg am__quote="\"" 763609885543Smrg _am_result=BSD 763709885543Smrg fi 763809885543Smrgfi 763909885543SmrgAC_SUBST([am__include]) 764009885543SmrgAC_SUBST([am__quote]) 764109885543SmrgAC_MSG_RESULT([$_am_result]) 764209885543Smrgrm -f confinc confmf 764309885543Smrg]) 764409885543Smrg 764509885543Smrg# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 764609885543Smrg 764709885543Smrg# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005 764809885543Smrg# Free Software Foundation, Inc. 764909885543Smrg# 765009885543Smrg# This file is free software; the Free Software Foundation 765109885543Smrg# gives unlimited permission to copy and/or distribute it, 765209885543Smrg# with or without modifications, as long as this notice is preserved. 765309885543Smrg 765409885543Smrg# serial 4 765509885543Smrg 765609885543Smrg# AM_MISSING_PROG(NAME, PROGRAM) 765709885543Smrg# ------------------------------ 765809885543SmrgAC_DEFUN([AM_MISSING_PROG], 765909885543Smrg[AC_REQUIRE([AM_MISSING_HAS_RUN]) 766009885543Smrg$1=${$1-"${am_missing_run}$2"} 766109885543SmrgAC_SUBST($1)]) 766209885543Smrg 766309885543Smrg 766409885543Smrg# AM_MISSING_HAS_RUN 766509885543Smrg# ------------------ 766609885543Smrg# Define MISSING if not defined so far and test if it supports --run. 766709885543Smrg# If it does, set am_missing_run to use it, otherwise, to nothing. 766809885543SmrgAC_DEFUN([AM_MISSING_HAS_RUN], 766909885543Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 767009885543Smrgtest x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" 767109885543Smrg# Use eval to expand $SHELL 767209885543Smrgif eval "$MISSING --run true"; then 767309885543Smrg am_missing_run="$MISSING --run " 767409885543Smrgelse 767509885543Smrg am_missing_run= 767609885543Smrg AC_MSG_WARN([`missing' script is too old or missing]) 767709885543Smrgfi 767809885543Smrg]) 767909885543Smrg 768009885543Smrg# Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc. 768109885543Smrg# 768209885543Smrg# This file is free software; the Free Software Foundation 768309885543Smrg# gives unlimited permission to copy and/or distribute it, 768409885543Smrg# with or without modifications, as long as this notice is preserved. 768509885543Smrg 768609885543Smrg# AM_PROG_MKDIR_P 768709885543Smrg# --------------- 768809885543Smrg# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise. 768909885543Smrg# 769009885543Smrg# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories 769109885543Smrg# created by `make install' are always world readable, even if the 769209885543Smrg# installer happens to have an overly restrictive umask (e.g. 077). 769309885543Smrg# This was a mistake. There are at least two reasons why we must not 769409885543Smrg# use `-m 0755': 769509885543Smrg# - it causes special bits like SGID to be ignored, 769609885543Smrg# - it may be too restrictive (some setups expect 775 directories). 769709885543Smrg# 769809885543Smrg# Do not use -m 0755 and let people choose whatever they expect by 769909885543Smrg# setting umask. 770009885543Smrg# 770109885543Smrg# We cannot accept any implementation of `mkdir' that recognizes `-p'. 770209885543Smrg# Some implementations (such as Solaris 8's) are not thread-safe: if a 770309885543Smrg# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c' 770409885543Smrg# concurrently, both version can detect that a/ is missing, but only 770509885543Smrg# one can create it and the other will error out. Consequently we 770609885543Smrg# restrict ourselves to GNU make (using the --version option ensures 770709885543Smrg# this.) 770809885543SmrgAC_DEFUN([AM_PROG_MKDIR_P], 770909885543Smrg[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then 771009885543Smrg # We used to keeping the `.' as first argument, in order to 771109885543Smrg # allow $(mkdir_p) to be used without argument. As in 771209885543Smrg # $(mkdir_p) $(somedir) 771309885543Smrg # where $(somedir) is conditionally defined. However this is wrong 771409885543Smrg # for two reasons: 771509885543Smrg # 1. if the package is installed by a user who cannot write `.' 771609885543Smrg # make install will fail, 771709885543Smrg # 2. the above comment should most certainly read 771809885543Smrg # $(mkdir_p) $(DESTDIR)$(somedir) 771909885543Smrg # so it does not work when $(somedir) is undefined and 772009885543Smrg # $(DESTDIR) is not. 772109885543Smrg # To support the latter case, we have to write 772209885543Smrg # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir), 772309885543Smrg # so the `.' trick is pointless. 772409885543Smrg mkdir_p='mkdir -p --' 772509885543Smrgelse 772609885543Smrg # On NextStep and OpenStep, the `mkdir' command does not 772709885543Smrg # recognize any option. It will interpret all options as 772809885543Smrg # directories to create, and then abort because `.' already 772909885543Smrg # exists. 773009885543Smrg for d in ./-p ./--version; 773109885543Smrg do 773209885543Smrg test -d $d && rmdir $d 773309885543Smrg done 773409885543Smrg # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists. 773509885543Smrg if test -f "$ac_aux_dir/mkinstalldirs"; then 773609885543Smrg mkdir_p='$(mkinstalldirs)' 773709885543Smrg else 773809885543Smrg mkdir_p='$(install_sh) -d' 773909885543Smrg fi 774009885543Smrgfi 774109885543SmrgAC_SUBST([mkdir_p])]) 774209885543Smrg 774309885543Smrg# Helper functions for option handling. -*- Autoconf -*- 774409885543Smrg 774509885543Smrg# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. 774609885543Smrg# 774709885543Smrg# This file is free software; the Free Software Foundation 774809885543Smrg# gives unlimited permission to copy and/or distribute it, 774909885543Smrg# with or without modifications, as long as this notice is preserved. 775009885543Smrg 775109885543Smrg# serial 3 775209885543Smrg 775309885543Smrg# _AM_MANGLE_OPTION(NAME) 775409885543Smrg# ----------------------- 775509885543SmrgAC_DEFUN([_AM_MANGLE_OPTION], 775609885543Smrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 775709885543Smrg 775809885543Smrg# _AM_SET_OPTION(NAME) 775909885543Smrg# ------------------------------ 776009885543Smrg# Set option NAME. Presently that only means defining a flag for this option. 776109885543SmrgAC_DEFUN([_AM_SET_OPTION], 776209885543Smrg[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) 776309885543Smrg 776409885543Smrg# _AM_SET_OPTIONS(OPTIONS) 776509885543Smrg# ---------------------------------- 776609885543Smrg# OPTIONS is a space-separated list of Automake options. 776709885543SmrgAC_DEFUN([_AM_SET_OPTIONS], 776809885543Smrg[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 776909885543Smrg 777009885543Smrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 777109885543Smrg# ------------------------------------------- 777209885543Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 777309885543SmrgAC_DEFUN([_AM_IF_OPTION], 777409885543Smrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 777509885543Smrg 777609885543Smrg# Check to make sure that the build environment is sane. -*- Autoconf -*- 777709885543Smrg 777809885543Smrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 777909885543Smrg# Free Software Foundation, Inc. 778009885543Smrg# 778109885543Smrg# This file is free software; the Free Software Foundation 778209885543Smrg# gives unlimited permission to copy and/or distribute it, 778309885543Smrg# with or without modifications, as long as this notice is preserved. 778409885543Smrg 778509885543Smrg# serial 4 778609885543Smrg 778709885543Smrg# AM_SANITY_CHECK 778809885543Smrg# --------------- 778909885543SmrgAC_DEFUN([AM_SANITY_CHECK], 779009885543Smrg[AC_MSG_CHECKING([whether build environment is sane]) 779109885543Smrg# Just in case 779209885543Smrgsleep 1 779309885543Smrgecho timestamp > conftest.file 779409885543Smrg# Do `set' in a subshell so we don't clobber the current shell's 779509885543Smrg# arguments. Must try -L first in case configure is actually a 779609885543Smrg# symlink; some systems play weird games with the mod time of symlinks 779709885543Smrg# (eg FreeBSD returns the mod time of the symlink's containing 779809885543Smrg# directory). 779909885543Smrgif ( 780009885543Smrg set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` 780109885543Smrg if test "$[*]" = "X"; then 780209885543Smrg # -L didn't work. 780309885543Smrg set X `ls -t $srcdir/configure conftest.file` 780409885543Smrg fi 780509885543Smrg rm -f conftest.file 780609885543Smrg if test "$[*]" != "X $srcdir/configure conftest.file" \ 780709885543Smrg && test "$[*]" != "X conftest.file $srcdir/configure"; then 780809885543Smrg 780909885543Smrg # If neither matched, then we have a broken ls. This can happen 781009885543Smrg # if, for instance, CONFIG_SHELL is bash and it inherits a 781109885543Smrg # broken ls alias from the environment. This has actually 781209885543Smrg # happened. Such a system could not be considered "sane". 781309885543Smrg AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 781409885543Smrgalias in your environment]) 781509885543Smrg fi 781609885543Smrg 781709885543Smrg test "$[2]" = conftest.file 781809885543Smrg ) 781909885543Smrgthen 782009885543Smrg # Ok. 782109885543Smrg : 782209885543Smrgelse 782309885543Smrg AC_MSG_ERROR([newly created file is older than distributed files! 782409885543SmrgCheck your system clock]) 782509885543Smrgfi 782609885543SmrgAC_MSG_RESULT(yes)]) 782709885543Smrg 782809885543Smrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 782909885543Smrg# 783009885543Smrg# This file is free software; the Free Software Foundation 783109885543Smrg# gives unlimited permission to copy and/or distribute it, 783209885543Smrg# with or without modifications, as long as this notice is preserved. 783309885543Smrg 783409885543Smrg# AM_PROG_INSTALL_STRIP 783509885543Smrg# --------------------- 783609885543Smrg# One issue with vendor `install' (even GNU) is that you can't 783709885543Smrg# specify the program used to strip binaries. This is especially 783809885543Smrg# annoying in cross-compiling environments, where the build's strip 783909885543Smrg# is unlikely to handle the host's binaries. 784009885543Smrg# Fortunately install-sh will honor a STRIPPROG variable, so we 784109885543Smrg# always use install-sh in `make install-strip', and initialize 784209885543Smrg# STRIPPROG with the value of the STRIP variable (set by the user). 784309885543SmrgAC_DEFUN([AM_PROG_INSTALL_STRIP], 784409885543Smrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 784509885543Smrg# Installed binaries are usually stripped using `strip' when the user 784609885543Smrg# run `make install-strip'. However `strip' might not be the right 784709885543Smrg# tool to use in cross-compilation environments, therefore Automake 784809885543Smrg# will honor the `STRIP' environment variable to overrule this program. 784909885543Smrgdnl Don't test for $cross_compiling = yes, because it might be `maybe'. 785009885543Smrgif test "$cross_compiling" != no; then 785109885543Smrg AC_CHECK_TOOL([STRIP], [strip], :) 785209885543Smrgfi 785309885543SmrgINSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" 785409885543SmrgAC_SUBST([INSTALL_STRIP_PROGRAM])]) 785509885543Smrg 785609885543Smrg# Check how to create a tarball. -*- Autoconf -*- 785709885543Smrg 785809885543Smrg# Copyright (C) 2004, 2005 Free Software Foundation, Inc. 785909885543Smrg# 786009885543Smrg# This file is free software; the Free Software Foundation 786109885543Smrg# gives unlimited permission to copy and/or distribute it, 786209885543Smrg# with or without modifications, as long as this notice is preserved. 786309885543Smrg 786409885543Smrg# serial 2 786509885543Smrg 786609885543Smrg# _AM_PROG_TAR(FORMAT) 786709885543Smrg# -------------------- 786809885543Smrg# Check how to create a tarball in format FORMAT. 786909885543Smrg# FORMAT should be one of `v7', `ustar', or `pax'. 787009885543Smrg# 787109885543Smrg# Substitute a variable $(am__tar) that is a command 787209885543Smrg# writing to stdout a FORMAT-tarball containing the directory 787309885543Smrg# $tardir. 787409885543Smrg# tardir=directory && $(am__tar) > result.tar 787509885543Smrg# 787609885543Smrg# Substitute a variable $(am__untar) that extract such 787709885543Smrg# a tarball read from stdin. 787809885543Smrg# $(am__untar) < result.tar 787909885543SmrgAC_DEFUN([_AM_PROG_TAR], 788009885543Smrg[# Always define AMTAR for backward compatibility. 788109885543SmrgAM_MISSING_PROG([AMTAR], [tar]) 788209885543Smrgm4_if([$1], [v7], 788309885543Smrg [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], 788409885543Smrg [m4_case([$1], [ustar],, [pax],, 788509885543Smrg [m4_fatal([Unknown tar format])]) 788609885543SmrgAC_MSG_CHECKING([how to create a $1 tar archive]) 788709885543Smrg# Loop over all known methods to create a tar archive until one works. 788809885543Smrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 788909885543Smrg_am_tools=${am_cv_prog_tar_$1-$_am_tools} 789009885543Smrg# Do not fold the above two line into one, because Tru64 sh and 789109885543Smrg# Solaris sh will not grok spaces in the rhs of `-'. 789209885543Smrgfor _am_tool in $_am_tools 789309885543Smrgdo 789409885543Smrg case $_am_tool in 789509885543Smrg gnutar) 789609885543Smrg for _am_tar in tar gnutar gtar; 789709885543Smrg do 789809885543Smrg AM_RUN_LOG([$_am_tar --version]) && break 789909885543Smrg done 790009885543Smrg am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 790109885543Smrg am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 790209885543Smrg am__untar="$_am_tar -xf -" 790309885543Smrg ;; 790409885543Smrg plaintar) 790509885543Smrg # Must skip GNU tar: if it does not support --format= it doesn't create 790609885543Smrg # ustar tarball either. 790709885543Smrg (tar --version) >/dev/null 2>&1 && continue 790809885543Smrg am__tar='tar chf - "$$tardir"' 790909885543Smrg am__tar_='tar chf - "$tardir"' 791009885543Smrg am__untar='tar xf -' 791109885543Smrg ;; 791209885543Smrg pax) 791309885543Smrg am__tar='pax -L -x $1 -w "$$tardir"' 791409885543Smrg am__tar_='pax -L -x $1 -w "$tardir"' 791509885543Smrg am__untar='pax -r' 791609885543Smrg ;; 791709885543Smrg cpio) 791809885543Smrg am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 791909885543Smrg am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 792009885543Smrg am__untar='cpio -i -H $1 -d' 792109885543Smrg ;; 792209885543Smrg none) 792309885543Smrg am__tar=false 792409885543Smrg am__tar_=false 792509885543Smrg am__untar=false 792609885543Smrg ;; 792709885543Smrg esac 792809885543Smrg 792909885543Smrg # If the value was cached, stop now. We just wanted to have am__tar 793009885543Smrg # and am__untar set. 793109885543Smrg test -n "${am_cv_prog_tar_$1}" && break 793209885543Smrg 793309885543Smrg # tar/untar a dummy directory, and stop if the command works 793409885543Smrg rm -rf conftest.dir 793509885543Smrg mkdir conftest.dir 793609885543Smrg echo GrepMe > conftest.dir/file 793709885543Smrg AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 793809885543Smrg rm -rf conftest.dir 793909885543Smrg if test -s conftest.tar; then 794009885543Smrg AM_RUN_LOG([$am__untar <conftest.tar]) 794109885543Smrg grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 794209885543Smrg fi 794309885543Smrgdone 794409885543Smrgrm -rf conftest.dir 794509885543Smrg 794609885543SmrgAC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 794709885543SmrgAC_MSG_RESULT([$am_cv_prog_tar_$1])]) 794809885543SmrgAC_SUBST([am__tar]) 794909885543SmrgAC_SUBST([am__untar]) 795009885543Smrg]) # _AM_PROG_TAR 795109885543Smrg 7952