aclocal.m4 revision 76888252
176888252Smrg# generated automatically by aclocal 1.9.6 -*- Autoconf -*- 276888252Smrg 376888252Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 476888252Smrg# 2005 Free Software Foundation, Inc. 576888252Smrg# This file is free software; the Free Software Foundation 676888252Smrg# gives unlimited permission to copy and/or distribute it, 776888252Smrg# with or without modifications, as long as this notice is preserved. 876888252Smrg 976888252Smrg# This program is distributed in the hope that it will be useful, 1076888252Smrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 1176888252Smrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 1276888252Smrg# PARTICULAR PURPOSE. 1376888252Smrg 1476888252Smrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 1576888252Smrg 1676888252Smrg# serial 48 AC_PROG_LIBTOOL 1776888252Smrg 1876888252Smrg 1976888252Smrg# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED) 2076888252Smrg# ----------------------------------------------------------- 2176888252Smrg# If this macro is not defined by Autoconf, define it here. 2276888252Smrgm4_ifdef([AC_PROVIDE_IFELSE], 2376888252Smrg [], 2476888252Smrg [m4_define([AC_PROVIDE_IFELSE], 2576888252Smrg [m4_ifdef([AC_PROVIDE_$1], 2676888252Smrg [$2], [$3])])]) 2776888252Smrg 2876888252Smrg 2976888252Smrg# AC_PROG_LIBTOOL 3076888252Smrg# --------------- 3176888252SmrgAC_DEFUN([AC_PROG_LIBTOOL], 3276888252Smrg[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl 3376888252Smrgdnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX 3476888252Smrgdnl immediately, otherwise, hook it in at the end of AC_PROG_CXX. 3576888252Smrg AC_PROVIDE_IFELSE([AC_PROG_CXX], 3676888252Smrg [AC_LIBTOOL_CXX], 3776888252Smrg [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX 3876888252Smrg ])]) 3976888252Smrgdnl And a similar setup for Fortran 77 support 4076888252Smrg AC_PROVIDE_IFELSE([AC_PROG_F77], 4176888252Smrg [AC_LIBTOOL_F77], 4276888252Smrg [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77 4376888252Smrg])]) 4476888252Smrg 4576888252Smrgdnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly. 4676888252Smrgdnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run 4776888252Smrgdnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both. 4876888252Smrg AC_PROVIDE_IFELSE([AC_PROG_GCJ], 4976888252Smrg [AC_LIBTOOL_GCJ], 5076888252Smrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 5176888252Smrg [AC_LIBTOOL_GCJ], 5276888252Smrg [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ], 5376888252Smrg [AC_LIBTOOL_GCJ], 5476888252Smrg [ifdef([AC_PROG_GCJ], 5576888252Smrg [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])]) 5676888252Smrg ifdef([A][M_PROG_GCJ], 5776888252Smrg [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])]) 5876888252Smrg ifdef([LT_AC_PROG_GCJ], 5976888252Smrg [define([LT_AC_PROG_GCJ], 6076888252Smrg defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])]) 6176888252Smrg])])# AC_PROG_LIBTOOL 6276888252Smrg 6376888252Smrg 6476888252Smrg# _AC_PROG_LIBTOOL 6576888252Smrg# ---------------- 6676888252SmrgAC_DEFUN([_AC_PROG_LIBTOOL], 6776888252Smrg[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl 6876888252SmrgAC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl 6976888252SmrgAC_BEFORE([$0],[AC_LIBTOOL_F77])dnl 7076888252SmrgAC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl 7176888252Smrg 7276888252Smrg# This can be used to rebuild libtool when needed 7376888252SmrgLIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" 7476888252Smrg 7576888252Smrg# Always use our own libtool. 7676888252SmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool' 7776888252SmrgAC_SUBST(LIBTOOL)dnl 7876888252Smrg 7976888252Smrg# Prevent multiple expansion 8076888252Smrgdefine([AC_PROG_LIBTOOL], []) 8176888252Smrg])# _AC_PROG_LIBTOOL 8276888252Smrg 8376888252Smrg 8476888252Smrg# AC_LIBTOOL_SETUP 8576888252Smrg# ---------------- 8676888252SmrgAC_DEFUN([AC_LIBTOOL_SETUP], 8776888252Smrg[AC_PREREQ(2.50)dnl 8876888252SmrgAC_REQUIRE([AC_ENABLE_SHARED])dnl 8976888252SmrgAC_REQUIRE([AC_ENABLE_STATIC])dnl 9076888252SmrgAC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl 9176888252SmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 9276888252SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 9376888252SmrgAC_REQUIRE([AC_PROG_CC])dnl 9476888252SmrgAC_REQUIRE([AC_PROG_LD])dnl 9576888252SmrgAC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl 9676888252SmrgAC_REQUIRE([AC_PROG_NM])dnl 9776888252Smrg 9876888252SmrgAC_REQUIRE([AC_PROG_LN_S])dnl 9976888252SmrgAC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl 10076888252Smrg# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! 10176888252SmrgAC_REQUIRE([AC_OBJEXT])dnl 10276888252SmrgAC_REQUIRE([AC_EXEEXT])dnl 10376888252Smrgdnl 10476888252Smrg 10576888252SmrgAC_LIBTOOL_SYS_MAX_CMD_LEN 10676888252SmrgAC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE 10776888252SmrgAC_LIBTOOL_OBJDIR 10876888252Smrg 10976888252SmrgAC_REQUIRE([_LT_AC_SYS_COMPILER])dnl 11076888252Smrg_LT_AC_PROG_ECHO_BACKSLASH 11176888252Smrg 11276888252Smrgcase $host_os in 11376888252Smrgaix3*) 11476888252Smrg # AIX sometimes has problems with the GCC collect2 program. For some 11576888252Smrg # reason, if we set the COLLECT_NAMES environment variable, the problems 11676888252Smrg # vanish in a puff of smoke. 11776888252Smrg if test "X${COLLECT_NAMES+set}" != Xset; then 11876888252Smrg COLLECT_NAMES= 11976888252Smrg export COLLECT_NAMES 12076888252Smrg fi 12176888252Smrg ;; 12276888252Smrgesac 12376888252Smrg 12476888252Smrg# Sed substitution that helps us do robust quoting. It backslashifies 12576888252Smrg# metacharacters that are still active within double-quoted strings. 12676888252SmrgXsed='sed -e 1s/^X//' 12776888252Smrg[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'] 12876888252Smrg 12976888252Smrg# Same as above, but do not quote variable references. 13076888252Smrg[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'] 13176888252Smrg 13276888252Smrg# Sed substitution to delay expansion of an escaped shell variable in a 13376888252Smrg# double_quote_subst'ed string. 13476888252Smrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 13576888252Smrg 13676888252Smrg# Sed substitution to avoid accidental globbing in evaled expressions 13776888252Smrgno_glob_subst='s/\*/\\\*/g' 13876888252Smrg 13976888252Smrg# Constants: 14076888252Smrgrm="rm -f" 14176888252Smrg 14276888252Smrg# Global variables: 14376888252Smrgdefault_ofile=libtool 14476888252Smrgcan_build_shared=yes 14576888252Smrg 14676888252Smrg# All known linkers require a `.a' archive for static linking (except MSVC, 14776888252Smrg# which needs '.lib'). 14876888252Smrglibext=a 14976888252Smrgltmain="$ac_aux_dir/ltmain.sh" 15076888252Smrgofile="$default_ofile" 15176888252Smrgwith_gnu_ld="$lt_cv_prog_gnu_ld" 15276888252Smrg 15376888252SmrgAC_CHECK_TOOL(AR, ar, false) 15476888252SmrgAC_CHECK_TOOL(RANLIB, ranlib, :) 15576888252SmrgAC_CHECK_TOOL(STRIP, strip, :) 15676888252Smrg 15776888252Smrgold_CC="$CC" 15876888252Smrgold_CFLAGS="$CFLAGS" 15976888252Smrg 16076888252Smrg# Set sane defaults for various variables 16176888252Smrgtest -z "$AR" && AR=ar 16276888252Smrgtest -z "$AR_FLAGS" && AR_FLAGS=cru 16376888252Smrgtest -z "$AS" && AS=as 16476888252Smrgtest -z "$CC" && CC=cc 16576888252Smrgtest -z "$LTCC" && LTCC=$CC 16676888252Smrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 16776888252Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 16876888252Smrgtest -z "$LD" && LD=ld 16976888252Smrgtest -z "$LN_S" && LN_S="ln -s" 17076888252Smrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file 17176888252Smrgtest -z "$NM" && NM=nm 17276888252Smrgtest -z "$SED" && SED=sed 17376888252Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump 17476888252Smrgtest -z "$RANLIB" && RANLIB=: 17576888252Smrgtest -z "$STRIP" && STRIP=: 17676888252Smrgtest -z "$ac_objext" && ac_objext=o 17776888252Smrg 17876888252Smrg# Determine commands to create old-style static archives. 17976888252Smrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs' 18076888252Smrgold_postinstall_cmds='chmod 644 $oldlib' 18176888252Smrgold_postuninstall_cmds= 18276888252Smrg 18376888252Smrgif test -n "$RANLIB"; then 18476888252Smrg case $host_os in 18576888252Smrg openbsd*) 18676888252Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" 18776888252Smrg ;; 18876888252Smrg *) 18976888252Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" 19076888252Smrg ;; 19176888252Smrg esac 19276888252Smrg old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" 19376888252Smrgfi 19476888252Smrg 19576888252Smrg_LT_CC_BASENAME([$compiler]) 19676888252Smrg 19776888252Smrg# Only perform the check for file, if the check method requires it 19876888252Smrgcase $deplibs_check_method in 19976888252Smrgfile_magic*) 20076888252Smrg if test "$file_magic_cmd" = '$MAGIC_CMD'; then 20176888252Smrg AC_PATH_MAGIC 20276888252Smrg fi 20376888252Smrg ;; 20476888252Smrgesac 20576888252Smrg 20676888252SmrgAC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no) 20776888252SmrgAC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], 20876888252Smrgenable_win32_dll=yes, enable_win32_dll=no) 20976888252Smrg 21076888252SmrgAC_ARG_ENABLE([libtool-lock], 21176888252Smrg [AC_HELP_STRING([--disable-libtool-lock], 21276888252Smrg [avoid locking (might break parallel builds)])]) 21376888252Smrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes 21476888252Smrg 21576888252SmrgAC_ARG_WITH([pic], 21676888252Smrg [AC_HELP_STRING([--with-pic], 21776888252Smrg [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 21876888252Smrg [pic_mode="$withval"], 21976888252Smrg [pic_mode=default]) 22076888252Smrgtest -z "$pic_mode" && pic_mode=default 22176888252Smrg 22276888252Smrg# Use C for the default configuration in the libtool script 22376888252Smrgtagname= 22476888252SmrgAC_LIBTOOL_LANG_C_CONFIG 22576888252Smrg_LT_AC_TAGCONFIG 22676888252Smrg])# AC_LIBTOOL_SETUP 22776888252Smrg 22876888252Smrg 22976888252Smrg# _LT_AC_SYS_COMPILER 23076888252Smrg# ------------------- 23176888252SmrgAC_DEFUN([_LT_AC_SYS_COMPILER], 23276888252Smrg[AC_REQUIRE([AC_PROG_CC])dnl 23376888252Smrg 23476888252Smrg# If no C compiler was specified, use CC. 23576888252SmrgLTCC=${LTCC-"$CC"} 23676888252Smrg 23776888252Smrg# If no C compiler flags were specified, use CFLAGS. 23876888252SmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"} 23976888252Smrg 24076888252Smrg# Allow CC to be a program name with arguments. 24176888252Smrgcompiler=$CC 24276888252Smrg])# _LT_AC_SYS_COMPILER 24376888252Smrg 24476888252Smrg 24576888252Smrg# _LT_CC_BASENAME(CC) 24676888252Smrg# ------------------- 24776888252Smrg# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 24876888252SmrgAC_DEFUN([_LT_CC_BASENAME], 24976888252Smrg[for cc_temp in $1""; do 25076888252Smrg case $cc_temp in 25176888252Smrg compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 25276888252Smrg distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 25376888252Smrg \-*) ;; 25476888252Smrg *) break;; 25576888252Smrg esac 25676888252Smrgdone 25776888252Smrgcc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` 25876888252Smrg]) 25976888252Smrg 26076888252Smrg 26176888252Smrg# _LT_COMPILER_BOILERPLATE 26276888252Smrg# ------------------------ 26376888252Smrg# Check for compiler boilerplate output or warnings with 26476888252Smrg# the simple compiler test code. 26576888252SmrgAC_DEFUN([_LT_COMPILER_BOILERPLATE], 26676888252Smrg[ac_outfile=conftest.$ac_objext 26776888252Smrgprintf "$lt_simple_compile_test_code" >conftest.$ac_ext 26876888252Smrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 26976888252Smrg_lt_compiler_boilerplate=`cat conftest.err` 27076888252Smrg$rm conftest* 27176888252Smrg])# _LT_COMPILER_BOILERPLATE 27276888252Smrg 27376888252Smrg 27476888252Smrg# _LT_LINKER_BOILERPLATE 27576888252Smrg# ---------------------- 27676888252Smrg# Check for linker boilerplate output or warnings with 27776888252Smrg# the simple link test code. 27876888252SmrgAC_DEFUN([_LT_LINKER_BOILERPLATE], 27976888252Smrg[ac_outfile=conftest.$ac_objext 28076888252Smrgprintf "$lt_simple_link_test_code" >conftest.$ac_ext 28176888252Smrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 28276888252Smrg_lt_linker_boilerplate=`cat conftest.err` 28376888252Smrg$rm conftest* 28476888252Smrg])# _LT_LINKER_BOILERPLATE 28576888252Smrg 28676888252Smrg 28776888252Smrg# _LT_AC_SYS_LIBPATH_AIX 28876888252Smrg# ---------------------- 28976888252Smrg# Links a minimal program and checks the executable 29076888252Smrg# for the system default hardcoded library path. In most cases, 29176888252Smrg# this is /usr/lib:/lib, but when the MPI compilers are used 29276888252Smrg# the location of the communication and MPI libs are included too. 29376888252Smrg# If we don't find anything, use the default library path according 29476888252Smrg# to the aix ld manual. 29576888252SmrgAC_DEFUN([_LT_AC_SYS_LIBPATH_AIX], 29676888252Smrg[AC_LINK_IFELSE(AC_LANG_PROGRAM,[ 29776888252Smrgaix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } 29876888252Smrg}'` 29976888252Smrg# Check for a 64-bit object if we didn't find anything. 30076888252Smrgif 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; } 30176888252Smrg}'`; fi],[]) 30276888252Smrgif test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi 30376888252Smrg])# _LT_AC_SYS_LIBPATH_AIX 30476888252Smrg 30576888252Smrg 30676888252Smrg# _LT_AC_SHELL_INIT(ARG) 30776888252Smrg# ---------------------- 30876888252SmrgAC_DEFUN([_LT_AC_SHELL_INIT], 30976888252Smrg[ifdef([AC_DIVERSION_NOTICE], 31076888252Smrg [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], 31176888252Smrg [AC_DIVERT_PUSH(NOTICE)]) 31276888252Smrg$1 31376888252SmrgAC_DIVERT_POP 31476888252Smrg])# _LT_AC_SHELL_INIT 31576888252Smrg 31676888252Smrg 31776888252Smrg# _LT_AC_PROG_ECHO_BACKSLASH 31876888252Smrg# -------------------------- 31976888252Smrg# Add some code to the start of the generated configure script which 32076888252Smrg# will find an echo command which doesn't interpret backslashes. 32176888252SmrgAC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH], 32276888252Smrg[_LT_AC_SHELL_INIT([ 32376888252Smrg# Check that we are running under the correct shell. 32476888252SmrgSHELL=${CONFIG_SHELL-/bin/sh} 32576888252Smrg 32676888252Smrgcase X$ECHO in 32776888252SmrgX*--fallback-echo) 32876888252Smrg # Remove one level of quotation (which was required for Make). 32976888252Smrg ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` 33076888252Smrg ;; 33176888252Smrgesac 33276888252Smrg 33376888252Smrgecho=${ECHO-echo} 33476888252Smrgif test "X[$]1" = X--no-reexec; then 33576888252Smrg # Discard the --no-reexec flag, and continue. 33676888252Smrg shift 33776888252Smrgelif test "X[$]1" = X--fallback-echo; then 33876888252Smrg # Avoid inline document here, it may be left over 33976888252Smrg : 34076888252Smrgelif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then 34176888252Smrg # Yippee, $echo works! 34276888252Smrg : 34376888252Smrgelse 34476888252Smrg # Restart under the correct shell. 34576888252Smrg exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} 34676888252Smrgfi 34776888252Smrg 34876888252Smrgif test "X[$]1" = X--fallback-echo; then 34976888252Smrg # used as fallback echo 35076888252Smrg shift 35176888252Smrg cat <<EOF 35276888252Smrg[$]* 35376888252SmrgEOF 35476888252Smrg exit 0 35576888252Smrgfi 35676888252Smrg 35776888252Smrg# The HP-UX ksh and POSIX shell print the target directory to stdout 35876888252Smrg# if CDPATH is set. 35976888252Smrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 36076888252Smrg 36176888252Smrgif test -z "$ECHO"; then 36276888252Smrgif test "X${echo_test_string+set}" != Xset; then 36376888252Smrg# find a string as large as possible, as long as the shell can cope with it 36476888252Smrg for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do 36576888252Smrg # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... 36676888252Smrg if (echo_test_string=`eval $cmd`) 2>/dev/null && 36776888252Smrg echo_test_string=`eval $cmd` && 36876888252Smrg (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null 36976888252Smrg then 37076888252Smrg break 37176888252Smrg fi 37276888252Smrg done 37376888252Smrgfi 37476888252Smrg 37576888252Smrgif test "X`($echo '\t') 2>/dev/null`" = 'X\t' && 37676888252Smrg echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && 37776888252Smrg test "X$echo_testing_string" = "X$echo_test_string"; then 37876888252Smrg : 37976888252Smrgelse 38076888252Smrg # The Solaris, AIX, and Digital Unix default echo programs unquote 38176888252Smrg # backslashes. This makes it impossible to quote backslashes using 38276888252Smrg # echo "$something" | sed 's/\\/\\\\/g' 38376888252Smrg # 38476888252Smrg # So, first we look for a working echo in the user's PATH. 38576888252Smrg 38676888252Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 38776888252Smrg for dir in $PATH /usr/ucb; do 38876888252Smrg IFS="$lt_save_ifs" 38976888252Smrg if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && 39076888252Smrg test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && 39176888252Smrg echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && 39276888252Smrg test "X$echo_testing_string" = "X$echo_test_string"; then 39376888252Smrg echo="$dir/echo" 39476888252Smrg break 39576888252Smrg fi 39676888252Smrg done 39776888252Smrg IFS="$lt_save_ifs" 39876888252Smrg 39976888252Smrg if test "X$echo" = Xecho; then 40076888252Smrg # We didn't find a better echo, so look for alternatives. 40176888252Smrg if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && 40276888252Smrg echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && 40376888252Smrg test "X$echo_testing_string" = "X$echo_test_string"; then 40476888252Smrg # This shell has a builtin print -r that does the trick. 40576888252Smrg echo='print -r' 40676888252Smrg elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && 40776888252Smrg test "X$CONFIG_SHELL" != X/bin/ksh; then 40876888252Smrg # If we have ksh, try running configure again with it. 40976888252Smrg ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} 41076888252Smrg export ORIGINAL_CONFIG_SHELL 41176888252Smrg CONFIG_SHELL=/bin/ksh 41276888252Smrg export CONFIG_SHELL 41376888252Smrg exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} 41476888252Smrg else 41576888252Smrg # Try using printf. 41676888252Smrg echo='printf %s\n' 41776888252Smrg if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && 41876888252Smrg echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && 41976888252Smrg test "X$echo_testing_string" = "X$echo_test_string"; then 42076888252Smrg # Cool, printf works 42176888252Smrg : 42276888252Smrg elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && 42376888252Smrg test "X$echo_testing_string" = 'X\t' && 42476888252Smrg echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && 42576888252Smrg test "X$echo_testing_string" = "X$echo_test_string"; then 42676888252Smrg CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL 42776888252Smrg export CONFIG_SHELL 42876888252Smrg SHELL="$CONFIG_SHELL" 42976888252Smrg export SHELL 43076888252Smrg echo="$CONFIG_SHELL [$]0 --fallback-echo" 43176888252Smrg elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && 43276888252Smrg test "X$echo_testing_string" = 'X\t' && 43376888252Smrg echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && 43476888252Smrg test "X$echo_testing_string" = "X$echo_test_string"; then 43576888252Smrg echo="$CONFIG_SHELL [$]0 --fallback-echo" 43676888252Smrg else 43776888252Smrg # maybe with a smaller string... 43876888252Smrg prev=: 43976888252Smrg 44076888252Smrg for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do 44176888252Smrg if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null 44276888252Smrg then 44376888252Smrg break 44476888252Smrg fi 44576888252Smrg prev="$cmd" 44676888252Smrg done 44776888252Smrg 44876888252Smrg if test "$prev" != 'sed 50q "[$]0"'; then 44976888252Smrg echo_test_string=`eval $prev` 45076888252Smrg export echo_test_string 45176888252Smrg exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} 45276888252Smrg else 45376888252Smrg # Oops. We lost completely, so just stick with echo. 45476888252Smrg echo=echo 45576888252Smrg fi 45676888252Smrg fi 45776888252Smrg fi 45876888252Smrg fi 45976888252Smrgfi 46076888252Smrgfi 46176888252Smrg 46276888252Smrg# Copy echo and quote the copy suitably for passing to libtool from 46376888252Smrg# the Makefile, instead of quoting the original, which is used later. 46476888252SmrgECHO=$echo 46576888252Smrgif test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then 46676888252Smrg ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" 46776888252Smrgfi 46876888252Smrg 46976888252SmrgAC_SUBST(ECHO) 47076888252Smrg])])# _LT_AC_PROG_ECHO_BACKSLASH 47176888252Smrg 47276888252Smrg 47376888252Smrg# _LT_AC_LOCK 47476888252Smrg# ----------- 47576888252SmrgAC_DEFUN([_LT_AC_LOCK], 47676888252Smrg[AC_ARG_ENABLE([libtool-lock], 47776888252Smrg [AC_HELP_STRING([--disable-libtool-lock], 47876888252Smrg [avoid locking (might break parallel builds)])]) 47976888252Smrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes 48076888252Smrg 48176888252Smrg# Some flags need to be propagated to the compiler or linker for good 48276888252Smrg# libtool support. 48376888252Smrgcase $host in 48476888252Smrgia64-*-hpux*) 48576888252Smrg # Find out which ABI we are using. 48676888252Smrg echo 'int i;' > conftest.$ac_ext 48776888252Smrg if AC_TRY_EVAL(ac_compile); then 48876888252Smrg case `/usr/bin/file conftest.$ac_objext` in 48976888252Smrg *ELF-32*) 49076888252Smrg HPUX_IA64_MODE="32" 49176888252Smrg ;; 49276888252Smrg *ELF-64*) 49376888252Smrg HPUX_IA64_MODE="64" 49476888252Smrg ;; 49576888252Smrg esac 49676888252Smrg fi 49776888252Smrg rm -rf conftest* 49876888252Smrg ;; 49976888252Smrg*-*-irix6*) 50076888252Smrg # Find out which ABI we are using. 50176888252Smrg echo '[#]line __oline__ "configure"' > conftest.$ac_ext 50276888252Smrg if AC_TRY_EVAL(ac_compile); then 50376888252Smrg if test "$lt_cv_prog_gnu_ld" = yes; then 50476888252Smrg case `/usr/bin/file conftest.$ac_objext` in 50576888252Smrg *32-bit*) 50676888252Smrg LD="${LD-ld} -melf32bsmip" 50776888252Smrg ;; 50876888252Smrg *N32*) 50976888252Smrg LD="${LD-ld} -melf32bmipn32" 51076888252Smrg ;; 51176888252Smrg *64-bit*) 51276888252Smrg LD="${LD-ld} -melf64bmip" 51376888252Smrg ;; 51476888252Smrg esac 51576888252Smrg else 51676888252Smrg case `/usr/bin/file conftest.$ac_objext` in 51776888252Smrg *32-bit*) 51876888252Smrg LD="${LD-ld} -32" 51976888252Smrg ;; 52076888252Smrg *N32*) 52176888252Smrg LD="${LD-ld} -n32" 52276888252Smrg ;; 52376888252Smrg *64-bit*) 52476888252Smrg LD="${LD-ld} -64" 52576888252Smrg ;; 52676888252Smrg esac 52776888252Smrg fi 52876888252Smrg fi 52976888252Smrg rm -rf conftest* 53076888252Smrg ;; 53176888252Smrg 53276888252Smrgx86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*) 53376888252Smrg # Find out which ABI we are using. 53476888252Smrg echo 'int i;' > conftest.$ac_ext 53576888252Smrg if AC_TRY_EVAL(ac_compile); then 53676888252Smrg case `/usr/bin/file conftest.o` in 53776888252Smrg *32-bit*) 53876888252Smrg case $host in 53976888252Smrg x86_64-*linux*) 54076888252Smrg LD="${LD-ld} -m elf_i386" 54176888252Smrg ;; 54276888252Smrg ppc64-*linux*|powerpc64-*linux*) 54376888252Smrg LD="${LD-ld} -m elf32ppclinux" 54476888252Smrg ;; 54576888252Smrg s390x-*linux*) 54676888252Smrg LD="${LD-ld} -m elf_s390" 54776888252Smrg ;; 54876888252Smrg sparc64-*linux*) 54976888252Smrg LD="${LD-ld} -m elf32_sparc" 55076888252Smrg ;; 55176888252Smrg esac 55276888252Smrg ;; 55376888252Smrg *64-bit*) 55476888252Smrg case $host in 55576888252Smrg x86_64-*linux*) 55676888252Smrg LD="${LD-ld} -m elf_x86_64" 55776888252Smrg ;; 55876888252Smrg ppc*-*linux*|powerpc*-*linux*) 55976888252Smrg LD="${LD-ld} -m elf64ppc" 56076888252Smrg ;; 56176888252Smrg s390*-*linux*) 56276888252Smrg LD="${LD-ld} -m elf64_s390" 56376888252Smrg ;; 56476888252Smrg sparc*-*linux*) 56576888252Smrg LD="${LD-ld} -m elf64_sparc" 56676888252Smrg ;; 56776888252Smrg esac 56876888252Smrg ;; 56976888252Smrg esac 57076888252Smrg fi 57176888252Smrg rm -rf conftest* 57276888252Smrg ;; 57376888252Smrg 57476888252Smrg*-*-sco3.2v5*) 57576888252Smrg # On SCO OpenServer 5, we need -belf to get full-featured binaries. 57676888252Smrg SAVE_CFLAGS="$CFLAGS" 57776888252Smrg CFLAGS="$CFLAGS -belf" 57876888252Smrg AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 57976888252Smrg [AC_LANG_PUSH(C) 58076888252Smrg AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 58176888252Smrg AC_LANG_POP]) 58276888252Smrg if test x"$lt_cv_cc_needs_belf" != x"yes"; then 58376888252Smrg # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 58476888252Smrg CFLAGS="$SAVE_CFLAGS" 58576888252Smrg fi 58676888252Smrg ;; 58776888252Smrgsparc*-*solaris*) 58876888252Smrg # Find out which ABI we are using. 58976888252Smrg echo 'int i;' > conftest.$ac_ext 59076888252Smrg if AC_TRY_EVAL(ac_compile); then 59176888252Smrg case `/usr/bin/file conftest.o` in 59276888252Smrg *64-bit*) 59376888252Smrg case $lt_cv_prog_gnu_ld in 59476888252Smrg yes*) LD="${LD-ld} -m elf64_sparc" ;; 59576888252Smrg *) LD="${LD-ld} -64" ;; 59676888252Smrg esac 59776888252Smrg ;; 59876888252Smrg esac 59976888252Smrg fi 60076888252Smrg rm -rf conftest* 60176888252Smrg ;; 60276888252Smrg 60376888252SmrgAC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], 60476888252Smrg[*-*-cygwin* | *-*-mingw* | *-*-pw32*) 60576888252Smrg AC_CHECK_TOOL(DLLTOOL, dlltool, false) 60676888252Smrg AC_CHECK_TOOL(AS, as, false) 60776888252Smrg AC_CHECK_TOOL(OBJDUMP, objdump, false) 60876888252Smrg ;; 60976888252Smrg ]) 61076888252Smrgesac 61176888252Smrg 61276888252Smrgneed_locks="$enable_libtool_lock" 61376888252Smrg 61476888252Smrg])# _LT_AC_LOCK 61576888252Smrg 61676888252Smrg 61776888252Smrg# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 61876888252Smrg# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 61976888252Smrg# ---------------------------------------------------------------- 62076888252Smrg# Check whether the given compiler option works 62176888252SmrgAC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], 62276888252Smrg[AC_REQUIRE([LT_AC_PROG_SED]) 62376888252SmrgAC_CACHE_CHECK([$1], [$2], 62476888252Smrg [$2=no 62576888252Smrg ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 62676888252Smrg printf "$lt_simple_compile_test_code" > conftest.$ac_ext 62776888252Smrg lt_compiler_flag="$3" 62876888252Smrg # Insert the option either (1) after the last *FLAGS variable, or 62976888252Smrg # (2) before a word containing "conftest.", or (3) at the end. 63076888252Smrg # Note that $ac_compile itself does not contain backslashes and begins 63176888252Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 63276888252Smrg # The option is referenced via a variable to avoid confusing sed. 63376888252Smrg lt_compile=`echo "$ac_compile" | $SED \ 63476888252Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 63576888252Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 63676888252Smrg -e 's:$: $lt_compiler_flag:'` 63776888252Smrg (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 63876888252Smrg (eval "$lt_compile" 2>conftest.err) 63976888252Smrg ac_status=$? 64076888252Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 64176888252Smrg echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 64276888252Smrg if (exit $ac_status) && test -s "$ac_outfile"; then 64376888252Smrg # The compiler can only warn and ignore the option if not recognized 64476888252Smrg # So say no if there are warnings other than the usual output. 64576888252Smrg $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp 64676888252Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 64776888252Smrg if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 64876888252Smrg $2=yes 64976888252Smrg fi 65076888252Smrg fi 65176888252Smrg $rm conftest* 65276888252Smrg]) 65376888252Smrg 65476888252Smrgif test x"[$]$2" = xyes; then 65576888252Smrg ifelse([$5], , :, [$5]) 65676888252Smrgelse 65776888252Smrg ifelse([$6], , :, [$6]) 65876888252Smrgfi 65976888252Smrg])# AC_LIBTOOL_COMPILER_OPTION 66076888252Smrg 66176888252Smrg 66276888252Smrg# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 66376888252Smrg# [ACTION-SUCCESS], [ACTION-FAILURE]) 66476888252Smrg# ------------------------------------------------------------ 66576888252Smrg# Check whether the given compiler option works 66676888252SmrgAC_DEFUN([AC_LIBTOOL_LINKER_OPTION], 66776888252Smrg[AC_CACHE_CHECK([$1], [$2], 66876888252Smrg [$2=no 66976888252Smrg save_LDFLAGS="$LDFLAGS" 67076888252Smrg LDFLAGS="$LDFLAGS $3" 67176888252Smrg printf "$lt_simple_link_test_code" > conftest.$ac_ext 67276888252Smrg if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 67376888252Smrg # The linker can only warn and ignore the option if not recognized 67476888252Smrg # So say no if there are warnings 67576888252Smrg if test -s conftest.err; then 67676888252Smrg # Append any errors to the config.log. 67776888252Smrg cat conftest.err 1>&AS_MESSAGE_LOG_FD 67876888252Smrg $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp 67976888252Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 68076888252Smrg if diff conftest.exp conftest.er2 >/dev/null; then 68176888252Smrg $2=yes 68276888252Smrg fi 68376888252Smrg else 68476888252Smrg $2=yes 68576888252Smrg fi 68676888252Smrg fi 68776888252Smrg $rm conftest* 68876888252Smrg LDFLAGS="$save_LDFLAGS" 68976888252Smrg]) 69076888252Smrg 69176888252Smrgif test x"[$]$2" = xyes; then 69276888252Smrg ifelse([$4], , :, [$4]) 69376888252Smrgelse 69476888252Smrg ifelse([$5], , :, [$5]) 69576888252Smrgfi 69676888252Smrg])# AC_LIBTOOL_LINKER_OPTION 69776888252Smrg 69876888252Smrg 69976888252Smrg# AC_LIBTOOL_SYS_MAX_CMD_LEN 70076888252Smrg# -------------------------- 70176888252SmrgAC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], 70276888252Smrg[# find the maximum length of command line arguments 70376888252SmrgAC_MSG_CHECKING([the maximum length of command line arguments]) 70476888252SmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 70576888252Smrg i=0 70676888252Smrg teststring="ABCD" 70776888252Smrg 70876888252Smrg case $build_os in 70976888252Smrg msdosdjgpp*) 71076888252Smrg # On DJGPP, this test can blow up pretty badly due to problems in libc 71176888252Smrg # (any single argument exceeding 2000 bytes causes a buffer overrun 71276888252Smrg # during glob expansion). Even if it were fixed, the result of this 71376888252Smrg # check would be larger than it should be. 71476888252Smrg lt_cv_sys_max_cmd_len=12288; # 12K is about right 71576888252Smrg ;; 71676888252Smrg 71776888252Smrg gnu*) 71876888252Smrg # Under GNU Hurd, this test is not required because there is 71976888252Smrg # no limit to the length of command line arguments. 72076888252Smrg # Libtool will interpret -1 as no limit whatsoever 72176888252Smrg lt_cv_sys_max_cmd_len=-1; 72276888252Smrg ;; 72376888252Smrg 72476888252Smrg cygwin* | mingw*) 72576888252Smrg # On Win9x/ME, this test blows up -- it succeeds, but takes 72676888252Smrg # about 5 minutes as the teststring grows exponentially. 72776888252Smrg # Worse, since 9x/ME are not pre-emptively multitasking, 72876888252Smrg # you end up with a "frozen" computer, even though with patience 72976888252Smrg # the test eventually succeeds (with a max line length of 256k). 73076888252Smrg # Instead, let's just punt: use the minimum linelength reported by 73176888252Smrg # all of the supported platforms: 8192 (on NT/2K/XP). 73276888252Smrg lt_cv_sys_max_cmd_len=8192; 73376888252Smrg ;; 73476888252Smrg 73576888252Smrg amigaos*) 73676888252Smrg # On AmigaOS with pdksh, this test takes hours, literally. 73776888252Smrg # So we just punt and use a minimum line length of 8192. 73876888252Smrg lt_cv_sys_max_cmd_len=8192; 73976888252Smrg ;; 74076888252Smrg 74176888252Smrg netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) 74276888252Smrg # This has been around since 386BSD, at least. Likely further. 74376888252Smrg if test -x /sbin/sysctl; then 74476888252Smrg lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 74576888252Smrg elif test -x /usr/sbin/sysctl; then 74676888252Smrg lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 74776888252Smrg else 74876888252Smrg lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 74976888252Smrg fi 75076888252Smrg # And add a safety zone 75176888252Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 75276888252Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 75376888252Smrg ;; 75476888252Smrg 75576888252Smrg interix*) 75676888252Smrg # We know the value 262144 and hardcode it with a safety zone (like BSD) 75776888252Smrg lt_cv_sys_max_cmd_len=196608 75876888252Smrg ;; 75976888252Smrg 76076888252Smrg osf*) 76176888252Smrg # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 76276888252Smrg # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 76376888252Smrg # nice to cause kernel panics so lets avoid the loop below. 76476888252Smrg # First set a reasonable default. 76576888252Smrg lt_cv_sys_max_cmd_len=16384 76676888252Smrg # 76776888252Smrg if test -x /sbin/sysconfig; then 76876888252Smrg case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 76976888252Smrg *1*) lt_cv_sys_max_cmd_len=-1 ;; 77076888252Smrg esac 77176888252Smrg fi 77276888252Smrg ;; 77376888252Smrg sco3.2v5*) 77476888252Smrg lt_cv_sys_max_cmd_len=102400 77576888252Smrg ;; 77676888252Smrg sysv5* | sco5v6* | sysv4.2uw2*) 77776888252Smrg kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 77876888252Smrg if test -n "$kargmax"; then 77976888252Smrg lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` 78076888252Smrg else 78176888252Smrg lt_cv_sys_max_cmd_len=32768 78276888252Smrg fi 78376888252Smrg ;; 78476888252Smrg *) 78576888252Smrg # If test is not a shell built-in, we'll probably end up computing a 78676888252Smrg # maximum length that is only half of the actual maximum length, but 78776888252Smrg # we can't tell. 78876888252Smrg SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 78976888252Smrg while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \ 79076888252Smrg = "XX$teststring") >/dev/null 2>&1 && 79176888252Smrg new_result=`expr "X$teststring" : ".*" 2>&1` && 79276888252Smrg lt_cv_sys_max_cmd_len=$new_result && 79376888252Smrg test $i != 17 # 1/2 MB should be enough 79476888252Smrg do 79576888252Smrg i=`expr $i + 1` 79676888252Smrg teststring=$teststring$teststring 79776888252Smrg done 79876888252Smrg teststring= 79976888252Smrg # Add a significant safety factor because C++ compilers can tack on massive 80076888252Smrg # amounts of additional arguments before passing them to the linker. 80176888252Smrg # It appears as though 1/2 is a usable value. 80276888252Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 80376888252Smrg ;; 80476888252Smrg esac 80576888252Smrg]) 80676888252Smrgif test -n $lt_cv_sys_max_cmd_len ; then 80776888252Smrg AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 80876888252Smrgelse 80976888252Smrg AC_MSG_RESULT(none) 81076888252Smrgfi 81176888252Smrg])# AC_LIBTOOL_SYS_MAX_CMD_LEN 81276888252Smrg 81376888252Smrg 81476888252Smrg# _LT_AC_CHECK_DLFCN 81576888252Smrg# ------------------ 81676888252SmrgAC_DEFUN([_LT_AC_CHECK_DLFCN], 81776888252Smrg[AC_CHECK_HEADERS(dlfcn.h)dnl 81876888252Smrg])# _LT_AC_CHECK_DLFCN 81976888252Smrg 82076888252Smrg 82176888252Smrg# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 82276888252Smrg# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 82376888252Smrg# --------------------------------------------------------------------- 82476888252SmrgAC_DEFUN([_LT_AC_TRY_DLOPEN_SELF], 82576888252Smrg[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl 82676888252Smrgif test "$cross_compiling" = yes; then : 82776888252Smrg [$4] 82876888252Smrgelse 82976888252Smrg lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 83076888252Smrg lt_status=$lt_dlunknown 83176888252Smrg cat > conftest.$ac_ext <<EOF 83276888252Smrg[#line __oline__ "configure" 83376888252Smrg#include "confdefs.h" 83476888252Smrg 83576888252Smrg#if HAVE_DLFCN_H 83676888252Smrg#include <dlfcn.h> 83776888252Smrg#endif 83876888252Smrg 83976888252Smrg#include <stdio.h> 84076888252Smrg 84176888252Smrg#ifdef RTLD_GLOBAL 84276888252Smrg# define LT_DLGLOBAL RTLD_GLOBAL 84376888252Smrg#else 84476888252Smrg# ifdef DL_GLOBAL 84576888252Smrg# define LT_DLGLOBAL DL_GLOBAL 84676888252Smrg# else 84776888252Smrg# define LT_DLGLOBAL 0 84876888252Smrg# endif 84976888252Smrg#endif 85076888252Smrg 85176888252Smrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 85276888252Smrg find out it does not work in some platform. */ 85376888252Smrg#ifndef LT_DLLAZY_OR_NOW 85476888252Smrg# ifdef RTLD_LAZY 85576888252Smrg# define LT_DLLAZY_OR_NOW RTLD_LAZY 85676888252Smrg# else 85776888252Smrg# ifdef DL_LAZY 85876888252Smrg# define LT_DLLAZY_OR_NOW DL_LAZY 85976888252Smrg# else 86076888252Smrg# ifdef RTLD_NOW 86176888252Smrg# define LT_DLLAZY_OR_NOW RTLD_NOW 86276888252Smrg# else 86376888252Smrg# ifdef DL_NOW 86476888252Smrg# define LT_DLLAZY_OR_NOW DL_NOW 86576888252Smrg# else 86676888252Smrg# define LT_DLLAZY_OR_NOW 0 86776888252Smrg# endif 86876888252Smrg# endif 86976888252Smrg# endif 87076888252Smrg# endif 87176888252Smrg#endif 87276888252Smrg 87376888252Smrg#ifdef __cplusplus 87476888252Smrgextern "C" void exit (int); 87576888252Smrg#endif 87676888252Smrg 87776888252Smrgvoid fnord() { int i=42;} 87876888252Smrgint main () 87976888252Smrg{ 88076888252Smrg void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 88176888252Smrg int status = $lt_dlunknown; 88276888252Smrg 88376888252Smrg if (self) 88476888252Smrg { 88576888252Smrg if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 88676888252Smrg else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 88776888252Smrg /* dlclose (self); */ 88876888252Smrg } 88976888252Smrg else 89076888252Smrg puts (dlerror ()); 89176888252Smrg 89276888252Smrg exit (status); 89376888252Smrg}] 89476888252SmrgEOF 89576888252Smrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then 89676888252Smrg (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 89776888252Smrg lt_status=$? 89876888252Smrg case x$lt_status in 89976888252Smrg x$lt_dlno_uscore) $1 ;; 90076888252Smrg x$lt_dlneed_uscore) $2 ;; 90176888252Smrg x$lt_dlunknown|x*) $3 ;; 90276888252Smrg esac 90376888252Smrg else : 90476888252Smrg # compilation failed 90576888252Smrg $3 90676888252Smrg fi 90776888252Smrgfi 90876888252Smrgrm -fr conftest* 90976888252Smrg])# _LT_AC_TRY_DLOPEN_SELF 91076888252Smrg 91176888252Smrg 91276888252Smrg# AC_LIBTOOL_DLOPEN_SELF 91376888252Smrg# ---------------------- 91476888252SmrgAC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], 91576888252Smrg[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl 91676888252Smrgif test "x$enable_dlopen" != xyes; then 91776888252Smrg enable_dlopen=unknown 91876888252Smrg enable_dlopen_self=unknown 91976888252Smrg enable_dlopen_self_static=unknown 92076888252Smrgelse 92176888252Smrg lt_cv_dlopen=no 92276888252Smrg lt_cv_dlopen_libs= 92376888252Smrg 92476888252Smrg case $host_os in 92576888252Smrg beos*) 92676888252Smrg lt_cv_dlopen="load_add_on" 92776888252Smrg lt_cv_dlopen_libs= 92876888252Smrg lt_cv_dlopen_self=yes 92976888252Smrg ;; 93076888252Smrg 93176888252Smrg mingw* | pw32*) 93276888252Smrg lt_cv_dlopen="LoadLibrary" 93376888252Smrg lt_cv_dlopen_libs= 93476888252Smrg ;; 93576888252Smrg 93676888252Smrg cygwin*) 93776888252Smrg lt_cv_dlopen="dlopen" 93876888252Smrg lt_cv_dlopen_libs= 93976888252Smrg ;; 94076888252Smrg 94176888252Smrg darwin*) 94276888252Smrg # if libdl is installed we need to link against it 94376888252Smrg AC_CHECK_LIB([dl], [dlopen], 94476888252Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ 94576888252Smrg lt_cv_dlopen="dyld" 94676888252Smrg lt_cv_dlopen_libs= 94776888252Smrg lt_cv_dlopen_self=yes 94876888252Smrg ]) 94976888252Smrg ;; 95076888252Smrg 95176888252Smrg *) 95276888252Smrg AC_CHECK_FUNC([shl_load], 95376888252Smrg [lt_cv_dlopen="shl_load"], 95476888252Smrg [AC_CHECK_LIB([dld], [shl_load], 95576888252Smrg [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"], 95676888252Smrg [AC_CHECK_FUNC([dlopen], 95776888252Smrg [lt_cv_dlopen="dlopen"], 95876888252Smrg [AC_CHECK_LIB([dl], [dlopen], 95976888252Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], 96076888252Smrg [AC_CHECK_LIB([svld], [dlopen], 96176888252Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], 96276888252Smrg [AC_CHECK_LIB([dld], [dld_link], 96376888252Smrg [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"]) 96476888252Smrg ]) 96576888252Smrg ]) 96676888252Smrg ]) 96776888252Smrg ]) 96876888252Smrg ]) 96976888252Smrg ;; 97076888252Smrg esac 97176888252Smrg 97276888252Smrg if test "x$lt_cv_dlopen" != xno; then 97376888252Smrg enable_dlopen=yes 97476888252Smrg else 97576888252Smrg enable_dlopen=no 97676888252Smrg fi 97776888252Smrg 97876888252Smrg case $lt_cv_dlopen in 97976888252Smrg dlopen) 98076888252Smrg save_CPPFLAGS="$CPPFLAGS" 98176888252Smrg test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 98276888252Smrg 98376888252Smrg save_LDFLAGS="$LDFLAGS" 98476888252Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 98576888252Smrg 98676888252Smrg save_LIBS="$LIBS" 98776888252Smrg LIBS="$lt_cv_dlopen_libs $LIBS" 98876888252Smrg 98976888252Smrg AC_CACHE_CHECK([whether a program can dlopen itself], 99076888252Smrg lt_cv_dlopen_self, [dnl 99176888252Smrg _LT_AC_TRY_DLOPEN_SELF( 99276888252Smrg lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 99376888252Smrg lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 99476888252Smrg ]) 99576888252Smrg 99676888252Smrg if test "x$lt_cv_dlopen_self" = xyes; then 99776888252Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 99876888252Smrg AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 99976888252Smrg lt_cv_dlopen_self_static, [dnl 100076888252Smrg _LT_AC_TRY_DLOPEN_SELF( 100176888252Smrg lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 100276888252Smrg lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 100376888252Smrg ]) 100476888252Smrg fi 100576888252Smrg 100676888252Smrg CPPFLAGS="$save_CPPFLAGS" 100776888252Smrg LDFLAGS="$save_LDFLAGS" 100876888252Smrg LIBS="$save_LIBS" 100976888252Smrg ;; 101076888252Smrg esac 101176888252Smrg 101276888252Smrg case $lt_cv_dlopen_self in 101376888252Smrg yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 101476888252Smrg *) enable_dlopen_self=unknown ;; 101576888252Smrg esac 101676888252Smrg 101776888252Smrg case $lt_cv_dlopen_self_static in 101876888252Smrg yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 101976888252Smrg *) enable_dlopen_self_static=unknown ;; 102076888252Smrg esac 102176888252Smrgfi 102276888252Smrg])# AC_LIBTOOL_DLOPEN_SELF 102376888252Smrg 102476888252Smrg 102576888252Smrg# AC_LIBTOOL_PROG_CC_C_O([TAGNAME]) 102676888252Smrg# --------------------------------- 102776888252Smrg# Check to see if options -c and -o are simultaneously supported by compiler 102876888252SmrgAC_DEFUN([AC_LIBTOOL_PROG_CC_C_O], 102976888252Smrg[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl 103076888252SmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 103176888252Smrg [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 103276888252Smrg [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 103376888252Smrg $rm -r conftest 2>/dev/null 103476888252Smrg mkdir conftest 103576888252Smrg cd conftest 103676888252Smrg mkdir out 103776888252Smrg printf "$lt_simple_compile_test_code" > conftest.$ac_ext 103876888252Smrg 103976888252Smrg lt_compiler_flag="-o out/conftest2.$ac_objext" 104076888252Smrg # Insert the option either (1) after the last *FLAGS variable, or 104176888252Smrg # (2) before a word containing "conftest.", or (3) at the end. 104276888252Smrg # Note that $ac_compile itself does not contain backslashes and begins 104376888252Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 104476888252Smrg lt_compile=`echo "$ac_compile" | $SED \ 104576888252Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 104676888252Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 104776888252Smrg -e 's:$: $lt_compiler_flag:'` 104876888252Smrg (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 104976888252Smrg (eval "$lt_compile" 2>out/conftest.err) 105076888252Smrg ac_status=$? 105176888252Smrg cat out/conftest.err >&AS_MESSAGE_LOG_FD 105276888252Smrg echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 105376888252Smrg if (exit $ac_status) && test -s out/conftest2.$ac_objext 105476888252Smrg then 105576888252Smrg # The compiler can only warn and ignore the option if not recognized 105676888252Smrg # So say no if there are warnings 105776888252Smrg $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp 105876888252Smrg $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 105976888252Smrg if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 106076888252Smrg _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 106176888252Smrg fi 106276888252Smrg fi 106376888252Smrg chmod u+w . 2>&AS_MESSAGE_LOG_FD 106476888252Smrg $rm conftest* 106576888252Smrg # SGI C++ compiler will create directory out/ii_files/ for 106676888252Smrg # template instantiation 106776888252Smrg test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files 106876888252Smrg $rm out/* && rmdir out 106976888252Smrg cd .. 107076888252Smrg rmdir conftest 107176888252Smrg $rm conftest* 107276888252Smrg]) 107376888252Smrg])# AC_LIBTOOL_PROG_CC_C_O 107476888252Smrg 107576888252Smrg 107676888252Smrg# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME]) 107776888252Smrg# ----------------------------------------- 107876888252Smrg# Check to see if we can do hard links to lock some files if needed 107976888252SmrgAC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], 108076888252Smrg[AC_REQUIRE([_LT_AC_LOCK])dnl 108176888252Smrg 108276888252Smrghard_links="nottested" 108376888252Smrgif test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then 108476888252Smrg # do not overwrite the value of need_locks provided by the user 108576888252Smrg AC_MSG_CHECKING([if we can lock with hard links]) 108676888252Smrg hard_links=yes 108776888252Smrg $rm conftest* 108876888252Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 108976888252Smrg touch conftest.a 109076888252Smrg ln conftest.a conftest.b 2>&5 || hard_links=no 109176888252Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 109276888252Smrg AC_MSG_RESULT([$hard_links]) 109376888252Smrg if test "$hard_links" = no; then 109476888252Smrg AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) 109576888252Smrg need_locks=warn 109676888252Smrg fi 109776888252Smrgelse 109876888252Smrg need_locks=no 109976888252Smrgfi 110076888252Smrg])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS 110176888252Smrg 110276888252Smrg 110376888252Smrg# AC_LIBTOOL_OBJDIR 110476888252Smrg# ----------------- 110576888252SmrgAC_DEFUN([AC_LIBTOOL_OBJDIR], 110676888252Smrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 110776888252Smrg[rm -f .libs 2>/dev/null 110876888252Smrgmkdir .libs 2>/dev/null 110976888252Smrgif test -d .libs; then 111076888252Smrg lt_cv_objdir=.libs 111176888252Smrgelse 111276888252Smrg # MS-DOS does not allow filenames that begin with a dot. 111376888252Smrg lt_cv_objdir=_libs 111476888252Smrgfi 111576888252Smrgrmdir .libs 2>/dev/null]) 111676888252Smrgobjdir=$lt_cv_objdir 111776888252Smrg])# AC_LIBTOOL_OBJDIR 111876888252Smrg 111976888252Smrg 112076888252Smrg# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME]) 112176888252Smrg# ---------------------------------------------- 112276888252Smrg# Check hardcoding attributes. 112376888252SmrgAC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], 112476888252Smrg[AC_MSG_CHECKING([how to hardcode library paths into programs]) 112576888252Smrg_LT_AC_TAGVAR(hardcode_action, $1)= 112676888252Smrgif test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \ 112776888252Smrg test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \ 112876888252Smrg test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then 112976888252Smrg 113076888252Smrg # We can hardcode non-existant directories. 113176888252Smrg if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no && 113276888252Smrg # If the only mechanism to avoid hardcoding is shlibpath_var, we 113376888252Smrg # have to relink, otherwise we might link with an installed library 113476888252Smrg # when we should be linking with a yet-to-be-installed one 113576888252Smrg ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no && 113676888252Smrg test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then 113776888252Smrg # Linking always hardcodes the temporary library directory. 113876888252Smrg _LT_AC_TAGVAR(hardcode_action, $1)=relink 113976888252Smrg else 114076888252Smrg # We can link without hardcoding, and we can hardcode nonexisting dirs. 114176888252Smrg _LT_AC_TAGVAR(hardcode_action, $1)=immediate 114276888252Smrg fi 114376888252Smrgelse 114476888252Smrg # We cannot hardcode anything, or else we can only hardcode existing 114576888252Smrg # directories. 114676888252Smrg _LT_AC_TAGVAR(hardcode_action, $1)=unsupported 114776888252Smrgfi 114876888252SmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)]) 114976888252Smrg 115076888252Smrgif test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then 115176888252Smrg # Fast installation is not supported 115276888252Smrg enable_fast_install=no 115376888252Smrgelif test "$shlibpath_overrides_runpath" = yes || 115476888252Smrg test "$enable_shared" = no; then 115576888252Smrg # Fast installation is not necessary 115676888252Smrg enable_fast_install=needless 115776888252Smrgfi 115876888252Smrg])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH 115976888252Smrg 116076888252Smrg 116176888252Smrg# AC_LIBTOOL_SYS_LIB_STRIP 116276888252Smrg# ------------------------ 116376888252SmrgAC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP], 116476888252Smrg[striplib= 116576888252Smrgold_striplib= 116676888252SmrgAC_MSG_CHECKING([whether stripping libraries is possible]) 116776888252Smrgif test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then 116876888252Smrg test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" 116976888252Smrg test -z "$striplib" && striplib="$STRIP --strip-unneeded" 117076888252Smrg AC_MSG_RESULT([yes]) 117176888252Smrgelse 117276888252Smrg# FIXME - insert some real tests, host_os isn't really good enough 117376888252Smrg case $host_os in 117476888252Smrg darwin*) 117576888252Smrg if test -n "$STRIP" ; then 117676888252Smrg striplib="$STRIP -x" 117776888252Smrg AC_MSG_RESULT([yes]) 117876888252Smrg else 117976888252Smrg AC_MSG_RESULT([no]) 118076888252Smrgfi 118176888252Smrg ;; 118276888252Smrg *) 118376888252Smrg AC_MSG_RESULT([no]) 118476888252Smrg ;; 118576888252Smrg esac 118676888252Smrgfi 118776888252Smrg])# AC_LIBTOOL_SYS_LIB_STRIP 118876888252Smrg 118976888252Smrg 119076888252Smrg# AC_LIBTOOL_SYS_DYNAMIC_LINKER 119176888252Smrg# ----------------------------- 119276888252Smrg# PORTME Fill in your ld.so characteristics 119376888252SmrgAC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER], 119476888252Smrg[AC_MSG_CHECKING([dynamic linker characteristics]) 119576888252Smrglibrary_names_spec= 119676888252Smrglibname_spec='lib$name' 119776888252Smrgsoname_spec= 119876888252Smrgshrext_cmds=".so" 119976888252Smrgpostinstall_cmds= 120076888252Smrgpostuninstall_cmds= 120176888252Smrgfinish_cmds= 120276888252Smrgfinish_eval= 120376888252Smrgshlibpath_var= 120476888252Smrgshlibpath_overrides_runpath=unknown 120576888252Smrgversion_type=none 120676888252Smrgdynamic_linker="$host_os ld.so" 120776888252Smrgsys_lib_dlsearch_path_spec="/lib /usr/lib" 120876888252Smrgif test "$GCC" = yes; then 120976888252Smrg sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` 121076888252Smrg if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then 121176888252Smrg # if the path contains ";" then we assume it to be the separator 121276888252Smrg # otherwise default to the standard path separator (i.e. ":") - it is 121376888252Smrg # assumed that no part of a normal pathname contains ";" but that should 121476888252Smrg # okay in the real world where ";" in dirpaths is itself problematic. 121576888252Smrg sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 121676888252Smrg else 121776888252Smrg sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 121876888252Smrg fi 121976888252Smrgelse 122076888252Smrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 122176888252Smrgfi 122276888252Smrgneed_lib_prefix=unknown 122376888252Smrghardcode_into_libs=no 122476888252Smrg 122576888252Smrg# when you set need_version to no, make sure it does not cause -set_version 122676888252Smrg# flags to be left without arguments 122776888252Smrgneed_version=unknown 122876888252Smrg 122976888252Smrgcase $host_os in 123076888252Smrgaix3*) 123176888252Smrg version_type=linux 123276888252Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' 123376888252Smrg shlibpath_var=LIBPATH 123476888252Smrg 123576888252Smrg # AIX 3 has no versioning support, so we append a major version to the name. 123676888252Smrg soname_spec='${libname}${release}${shared_ext}$major' 123776888252Smrg ;; 123876888252Smrg 123976888252Smrgaix4* | aix5*) 124076888252Smrg version_type=linux 124176888252Smrg need_lib_prefix=no 124276888252Smrg need_version=no 124376888252Smrg hardcode_into_libs=yes 124476888252Smrg if test "$host_cpu" = ia64; then 124576888252Smrg # AIX 5 supports IA64 124676888252Smrg library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' 124776888252Smrg shlibpath_var=LD_LIBRARY_PATH 124876888252Smrg else 124976888252Smrg # With GCC up to 2.95.x, collect2 would create an import file 125076888252Smrg # for dependence libraries. The import file would start with 125176888252Smrg # the line `#! .'. This would cause the generated library to 125276888252Smrg # depend on `.', always an invalid library. This was fixed in 125376888252Smrg # development snapshots of GCC prior to 3.0. 125476888252Smrg case $host_os in 125576888252Smrg aix4 | aix4.[[01]] | aix4.[[01]].*) 125676888252Smrg if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 125776888252Smrg echo ' yes ' 125876888252Smrg echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then 125976888252Smrg : 126076888252Smrg else 126176888252Smrg can_build_shared=no 126276888252Smrg fi 126376888252Smrg ;; 126476888252Smrg esac 126576888252Smrg # AIX (on Power*) has no versioning support, so currently we can not hardcode correct 126676888252Smrg # soname into executable. Probably we can add versioning support to 126776888252Smrg # collect2, so additional links can be useful in future. 126876888252Smrg if test "$aix_use_runtimelinking" = yes; then 126976888252Smrg # If using run time linking (on AIX 4.2 or later) use lib<name>.so 127076888252Smrg # instead of lib<name>.a to let people know that these are not 127176888252Smrg # typical AIX shared libraries. 127276888252Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 127376888252Smrg else 127476888252Smrg # We preserve .a as extension for shared libraries through AIX4.2 127576888252Smrg # and later when we are not doing run time linking. 127676888252Smrg library_names_spec='${libname}${release}.a $libname.a' 127776888252Smrg soname_spec='${libname}${release}${shared_ext}$major' 127876888252Smrg fi 127976888252Smrg shlibpath_var=LIBPATH 128076888252Smrg fi 128176888252Smrg ;; 128276888252Smrg 128376888252Smrgamigaos*) 128476888252Smrg library_names_spec='$libname.ixlibrary $libname.a' 128576888252Smrg # Create ${libname}_ixlibrary.a entries in /sys/libs. 128676888252Smrg 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' 128776888252Smrg ;; 128876888252Smrg 128976888252Smrgbeos*) 129076888252Smrg library_names_spec='${libname}${shared_ext}' 129176888252Smrg dynamic_linker="$host_os ld.so" 129276888252Smrg shlibpath_var=LIBRARY_PATH 129376888252Smrg ;; 129476888252Smrg 129576888252Smrgbsdi[[45]]*) 129676888252Smrg version_type=linux 129776888252Smrg need_version=no 129876888252Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 129976888252Smrg soname_spec='${libname}${release}${shared_ext}$major' 130076888252Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 130176888252Smrg shlibpath_var=LD_LIBRARY_PATH 130276888252Smrg sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 130376888252Smrg sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 130476888252Smrg # the default ld.so.conf also contains /usr/contrib/lib and 130576888252Smrg # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 130676888252Smrg # libtool to hard-code these into programs 130776888252Smrg ;; 130876888252Smrg 130976888252Smrgcygwin* | mingw* | pw32*) 131076888252Smrg version_type=windows 131176888252Smrg shrext_cmds=".dll" 131276888252Smrg need_version=no 131376888252Smrg need_lib_prefix=no 131476888252Smrg 131576888252Smrg case $GCC,$host_os in 131676888252Smrg yes,cygwin* | yes,mingw* | yes,pw32*) 131776888252Smrg library_names_spec='$libname.dll.a' 131876888252Smrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 131976888252Smrg postinstall_cmds='base_file=`basename \${file}`~ 132076888252Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ 132176888252Smrg dldir=$destdir/`dirname \$dlpath`~ 132276888252Smrg test -d \$dldir || mkdir -p \$dldir~ 132376888252Smrg $install_prog $dir/$dlname \$dldir/$dlname~ 132476888252Smrg chmod a+x \$dldir/$dlname' 132576888252Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 132676888252Smrg dlpath=$dir/\$dldll~ 132776888252Smrg $rm \$dlpath' 132876888252Smrg shlibpath_overrides_runpath=yes 132976888252Smrg 133076888252Smrg case $host_os in 133176888252Smrg cygwin*) 133276888252Smrg # Cygwin DLLs use 'cyg' prefix rather than 'lib' 133376888252Smrg soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 133476888252Smrg sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" 133576888252Smrg ;; 133676888252Smrg mingw*) 133776888252Smrg # MinGW DLLs use traditional 'lib' prefix 133876888252Smrg soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 133976888252Smrg sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` 134076888252Smrg if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then 134176888252Smrg # It is most probably a Windows format PATH printed by 134276888252Smrg # mingw gcc, but we are running on Cygwin. Gcc prints its search 134376888252Smrg # path with ; separators, and with drive letters. We can handle the 134476888252Smrg # drive letters (cygwin fileutils understands them), so leave them, 134576888252Smrg # especially as we might pass files found there to a mingw objdump, 134676888252Smrg # which wouldn't understand a cygwinified path. Ahh. 134776888252Smrg sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 134876888252Smrg else 134976888252Smrg sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 135076888252Smrg fi 135176888252Smrg ;; 135276888252Smrg pw32*) 135376888252Smrg # pw32 DLLs use 'pw' prefix rather than 'lib' 135476888252Smrg library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 135576888252Smrg ;; 135676888252Smrg esac 135776888252Smrg ;; 135876888252Smrg 135976888252Smrg *) 136076888252Smrg library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' 136176888252Smrg ;; 136276888252Smrg esac 136376888252Smrg dynamic_linker='Win32 ld.exe' 136476888252Smrg # FIXME: first we should search . and the directory the executable is in 136576888252Smrg shlibpath_var=PATH 136676888252Smrg ;; 136776888252Smrg 136876888252Smrgdarwin* | rhapsody*) 136976888252Smrg dynamic_linker="$host_os dyld" 137076888252Smrg version_type=darwin 137176888252Smrg need_lib_prefix=no 137276888252Smrg need_version=no 137376888252Smrg library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' 137476888252Smrg soname_spec='${libname}${release}${major}$shared_ext' 137576888252Smrg shlibpath_overrides_runpath=yes 137676888252Smrg shlibpath_var=DYLD_LIBRARY_PATH 137776888252Smrg shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 137876888252Smrg # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. 137976888252Smrg if test "$GCC" = yes; then 138076888252Smrg 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"` 138176888252Smrg else 138276888252Smrg sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' 138376888252Smrg fi 138476888252Smrg sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 138576888252Smrg ;; 138676888252Smrg 138776888252Smrgdgux*) 138876888252Smrg version_type=linux 138976888252Smrg need_lib_prefix=no 139076888252Smrg need_version=no 139176888252Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' 139276888252Smrg soname_spec='${libname}${release}${shared_ext}$major' 139376888252Smrg shlibpath_var=LD_LIBRARY_PATH 139476888252Smrg ;; 139576888252Smrg 139676888252Smrgfreebsd1*) 139776888252Smrg dynamic_linker=no 139876888252Smrg ;; 139976888252Smrg 140076888252Smrgkfreebsd*-gnu) 140176888252Smrg version_type=linux 140276888252Smrg need_lib_prefix=no 140376888252Smrg need_version=no 140476888252Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 140576888252Smrg soname_spec='${libname}${release}${shared_ext}$major' 140676888252Smrg shlibpath_var=LD_LIBRARY_PATH 140776888252Smrg shlibpath_overrides_runpath=no 140876888252Smrg hardcode_into_libs=yes 140976888252Smrg dynamic_linker='GNU ld.so' 141076888252Smrg ;; 141176888252Smrg 141276888252Smrgfreebsd* | dragonfly*) 141376888252Smrg # DragonFly does not have aout. When/if they implement a new 141476888252Smrg # versioning mechanism, adjust this. 141576888252Smrg if test -x /usr/bin/objformat; then 141676888252Smrg objformat=`/usr/bin/objformat` 141776888252Smrg else 141876888252Smrg case $host_os in 141976888252Smrg freebsd[[123]]*) objformat=aout ;; 142076888252Smrg *) objformat=elf ;; 142176888252Smrg esac 142276888252Smrg fi 142376888252Smrg version_type=freebsd-$objformat 142476888252Smrg case $version_type in 142576888252Smrg freebsd-elf*) 142676888252Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 142776888252Smrg need_version=no 142876888252Smrg need_lib_prefix=no 142976888252Smrg ;; 143076888252Smrg freebsd-*) 143176888252Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' 143276888252Smrg need_version=yes 143376888252Smrg ;; 143476888252Smrg esac 143576888252Smrg shlibpath_var=LD_LIBRARY_PATH 143676888252Smrg case $host_os in 143776888252Smrg freebsd2*) 143876888252Smrg shlibpath_overrides_runpath=yes 143976888252Smrg ;; 144076888252Smrg freebsd3.[[01]]* | freebsdelf3.[[01]]*) 144176888252Smrg shlibpath_overrides_runpath=yes 144276888252Smrg hardcode_into_libs=yes 144376888252Smrg ;; 144476888252Smrg freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 144576888252Smrg freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 144676888252Smrg shlibpath_overrides_runpath=no 144776888252Smrg hardcode_into_libs=yes 144876888252Smrg ;; 144976888252Smrg freebsd*) # from 4.6 on 145076888252Smrg shlibpath_overrides_runpath=yes 145176888252Smrg hardcode_into_libs=yes 145276888252Smrg ;; 145376888252Smrg esac 145476888252Smrg ;; 145576888252Smrg 145676888252Smrggnu*) 145776888252Smrg version_type=linux 145876888252Smrg need_lib_prefix=no 145976888252Smrg need_version=no 146076888252Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 146176888252Smrg soname_spec='${libname}${release}${shared_ext}$major' 146276888252Smrg shlibpath_var=LD_LIBRARY_PATH 146376888252Smrg hardcode_into_libs=yes 146476888252Smrg ;; 146576888252Smrg 146676888252Smrghpux9* | hpux10* | hpux11*) 146776888252Smrg # Give a soname corresponding to the major version so that dld.sl refuses to 146876888252Smrg # link against other versions. 146976888252Smrg version_type=sunos 147076888252Smrg need_lib_prefix=no 147176888252Smrg need_version=no 147276888252Smrg case $host_cpu in 147376888252Smrg ia64*) 147476888252Smrg shrext_cmds='.so' 147576888252Smrg hardcode_into_libs=yes 147676888252Smrg dynamic_linker="$host_os dld.so" 147776888252Smrg shlibpath_var=LD_LIBRARY_PATH 147876888252Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 147976888252Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 148076888252Smrg soname_spec='${libname}${release}${shared_ext}$major' 148176888252Smrg if test "X$HPUX_IA64_MODE" = X32; then 148276888252Smrg sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 148376888252Smrg else 148476888252Smrg sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 148576888252Smrg fi 148676888252Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 148776888252Smrg ;; 148876888252Smrg hppa*64*) 148976888252Smrg shrext_cmds='.sl' 149076888252Smrg hardcode_into_libs=yes 149176888252Smrg dynamic_linker="$host_os dld.sl" 149276888252Smrg shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 149376888252Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 149476888252Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 149576888252Smrg soname_spec='${libname}${release}${shared_ext}$major' 149676888252Smrg sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 149776888252Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 149876888252Smrg ;; 149976888252Smrg *) 150076888252Smrg shrext_cmds='.sl' 150176888252Smrg dynamic_linker="$host_os dld.sl" 150276888252Smrg shlibpath_var=SHLIB_PATH 150376888252Smrg shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 150476888252Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 150576888252Smrg soname_spec='${libname}${release}${shared_ext}$major' 150676888252Smrg ;; 150776888252Smrg esac 150876888252Smrg # HP-UX runs *really* slowly unless shared libraries are mode 555. 150976888252Smrg postinstall_cmds='chmod 555 $lib' 151076888252Smrg ;; 151176888252Smrg 151276888252Smrginterix3*) 151376888252Smrg version_type=linux 151476888252Smrg need_lib_prefix=no 151576888252Smrg need_version=no 151676888252Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 151776888252Smrg soname_spec='${libname}${release}${shared_ext}$major' 151876888252Smrg dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 151976888252Smrg shlibpath_var=LD_LIBRARY_PATH 152076888252Smrg shlibpath_overrides_runpath=no 152176888252Smrg hardcode_into_libs=yes 152276888252Smrg ;; 152376888252Smrg 152476888252Smrgirix5* | irix6* | nonstopux*) 152576888252Smrg case $host_os in 152676888252Smrg nonstopux*) version_type=nonstopux ;; 152776888252Smrg *) 152876888252Smrg if test "$lt_cv_prog_gnu_ld" = yes; then 152976888252Smrg version_type=linux 153076888252Smrg else 153176888252Smrg version_type=irix 153276888252Smrg fi ;; 153376888252Smrg esac 153476888252Smrg need_lib_prefix=no 153576888252Smrg need_version=no 153676888252Smrg soname_spec='${libname}${release}${shared_ext}$major' 153776888252Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' 153876888252Smrg case $host_os in 153976888252Smrg irix5* | nonstopux*) 154076888252Smrg libsuff= shlibsuff= 154176888252Smrg ;; 154276888252Smrg *) 154376888252Smrg case $LD in # libtool.m4 will add one of these switches to LD 154476888252Smrg *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 154576888252Smrg libsuff= shlibsuff= libmagic=32-bit;; 154676888252Smrg *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 154776888252Smrg libsuff=32 shlibsuff=N32 libmagic=N32;; 154876888252Smrg *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 154976888252Smrg libsuff=64 shlibsuff=64 libmagic=64-bit;; 155076888252Smrg *) libsuff= shlibsuff= libmagic=never-match;; 155176888252Smrg esac 155276888252Smrg ;; 155376888252Smrg esac 155476888252Smrg shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 155576888252Smrg shlibpath_overrides_runpath=no 155676888252Smrg sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" 155776888252Smrg sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" 155876888252Smrg hardcode_into_libs=yes 155976888252Smrg ;; 156076888252Smrg 156176888252Smrg# No shared lib support for Linux oldld, aout, or coff. 156276888252Smrglinux*oldld* | linux*aout* | linux*coff*) 156376888252Smrg dynamic_linker=no 156476888252Smrg ;; 156576888252Smrg 156676888252Smrg# This must be Linux ELF. 156776888252Smrglinux*) 156876888252Smrg version_type=linux 156976888252Smrg need_lib_prefix=no 157076888252Smrg need_version=no 157176888252Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 157276888252Smrg soname_spec='${libname}${release}${shared_ext}$major' 157376888252Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 157476888252Smrg shlibpath_var=LD_LIBRARY_PATH 157576888252Smrg shlibpath_overrides_runpath=no 157676888252Smrg # This implies no fast_install, which is unacceptable. 157776888252Smrg # Some rework will be needed to allow for fast_install 157876888252Smrg # before this can be enabled. 157976888252Smrg hardcode_into_libs=yes 158076888252Smrg 158176888252Smrg # find out which ABI we are using 158276888252Smrg libsuff= 158376888252Smrg case "$host_cpu" in 158476888252Smrg x86_64*|s390x*|powerpc64*) 158576888252Smrg echo '[#]line __oline__ "configure"' > conftest.$ac_ext 158676888252Smrg if AC_TRY_EVAL(ac_compile); then 158776888252Smrg case `/usr/bin/file conftest.$ac_objext` in 158876888252Smrg *64-bit*) 158976888252Smrg libsuff=64 159076888252Smrg sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}" 159176888252Smrg ;; 159276888252Smrg esac 159376888252Smrg fi 159476888252Smrg rm -rf conftest* 159576888252Smrg ;; 159676888252Smrg esac 159776888252Smrg 159876888252Smrg # Append ld.so.conf contents to the search path 159976888252Smrg if test -f /etc/ld.so.conf; then 160076888252Smrg 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' ' '` 160176888252Smrg sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra" 160276888252Smrg fi 160376888252Smrg 160476888252Smrg # We used to test for /lib/ld.so.1 and disable shared libraries on 160576888252Smrg # powerpc, because MkLinux only supported shared libraries with the 160676888252Smrg # GNU dynamic linker. Since this was broken with cross compilers, 160776888252Smrg # most powerpc-linux boxes support dynamic linking these days and 160876888252Smrg # people can always --disable-shared, the test was removed, and we 160976888252Smrg # assume the GNU/Linux dynamic linker is in use. 161076888252Smrg dynamic_linker='GNU/Linux ld.so' 161176888252Smrg ;; 161276888252Smrg 161376888252Smrgknetbsd*-gnu) 161476888252Smrg version_type=linux 161576888252Smrg need_lib_prefix=no 161676888252Smrg need_version=no 161776888252Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 161876888252Smrg soname_spec='${libname}${release}${shared_ext}$major' 161976888252Smrg shlibpath_var=LD_LIBRARY_PATH 162076888252Smrg shlibpath_overrides_runpath=no 162176888252Smrg hardcode_into_libs=yes 162276888252Smrg dynamic_linker='GNU ld.so' 162376888252Smrg ;; 162476888252Smrg 162576888252Smrgnetbsd*) 162676888252Smrg version_type=sunos 162776888252Smrg need_lib_prefix=no 162876888252Smrg need_version=no 162976888252Smrg if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then 163076888252Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 163176888252Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 163276888252Smrg dynamic_linker='NetBSD (a.out) ld.so' 163376888252Smrg else 163476888252Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 163576888252Smrg soname_spec='${libname}${release}${shared_ext}$major' 163676888252Smrg dynamic_linker='NetBSD ld.elf_so' 163776888252Smrg fi 163876888252Smrg shlibpath_var=LD_LIBRARY_PATH 163976888252Smrg shlibpath_overrides_runpath=yes 164076888252Smrg hardcode_into_libs=yes 164176888252Smrg ;; 164276888252Smrg 164376888252Smrgnewsos6) 164476888252Smrg version_type=linux 164576888252Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 164676888252Smrg shlibpath_var=LD_LIBRARY_PATH 164776888252Smrg shlibpath_overrides_runpath=yes 164876888252Smrg ;; 164976888252Smrg 165076888252Smrgnto-qnx*) 165176888252Smrg version_type=linux 165276888252Smrg need_lib_prefix=no 165376888252Smrg need_version=no 165476888252Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 165576888252Smrg soname_spec='${libname}${release}${shared_ext}$major' 165676888252Smrg shlibpath_var=LD_LIBRARY_PATH 165776888252Smrg shlibpath_overrides_runpath=yes 165876888252Smrg ;; 165976888252Smrg 166076888252Smrgopenbsd*) 166176888252Smrg version_type=sunos 166276888252Smrg sys_lib_dlsearch_path_spec="/usr/lib" 166376888252Smrg need_lib_prefix=no 166476888252Smrg # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. 166576888252Smrg case $host_os in 166676888252Smrg openbsd3.3 | openbsd3.3.*) need_version=yes ;; 166776888252Smrg *) need_version=no ;; 166876888252Smrg esac 166976888252Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 167076888252Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 167176888252Smrg shlibpath_var=LD_LIBRARY_PATH 167276888252Smrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 167376888252Smrg case $host_os in 167476888252Smrg openbsd2.[[89]] | openbsd2.[[89]].*) 167576888252Smrg shlibpath_overrides_runpath=no 167676888252Smrg ;; 167776888252Smrg *) 167876888252Smrg shlibpath_overrides_runpath=yes 167976888252Smrg ;; 168076888252Smrg esac 168176888252Smrg else 168276888252Smrg shlibpath_overrides_runpath=yes 168376888252Smrg fi 168476888252Smrg ;; 168576888252Smrg 168676888252Smrgos2*) 168776888252Smrg libname_spec='$name' 168876888252Smrg shrext_cmds=".dll" 168976888252Smrg need_lib_prefix=no 169076888252Smrg library_names_spec='$libname${shared_ext} $libname.a' 169176888252Smrg dynamic_linker='OS/2 ld.exe' 169276888252Smrg shlibpath_var=LIBPATH 169376888252Smrg ;; 169476888252Smrg 169576888252Smrgosf3* | osf4* | osf5*) 169676888252Smrg version_type=osf 169776888252Smrg need_lib_prefix=no 169876888252Smrg need_version=no 169976888252Smrg soname_spec='${libname}${release}${shared_ext}$major' 170076888252Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 170176888252Smrg shlibpath_var=LD_LIBRARY_PATH 170276888252Smrg sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 170376888252Smrg sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" 170476888252Smrg ;; 170576888252Smrg 170676888252Smrgsolaris*) 170776888252Smrg version_type=linux 170876888252Smrg need_lib_prefix=no 170976888252Smrg need_version=no 171076888252Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 171176888252Smrg soname_spec='${libname}${release}${shared_ext}$major' 171276888252Smrg shlibpath_var=LD_LIBRARY_PATH 171376888252Smrg shlibpath_overrides_runpath=yes 171476888252Smrg hardcode_into_libs=yes 171576888252Smrg # ldd complains unless libraries are executable 171676888252Smrg postinstall_cmds='chmod +x $lib' 171776888252Smrg ;; 171876888252Smrg 171976888252Smrgsunos4*) 172076888252Smrg version_type=sunos 172176888252Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 172276888252Smrg finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 172376888252Smrg shlibpath_var=LD_LIBRARY_PATH 172476888252Smrg shlibpath_overrides_runpath=yes 172576888252Smrg if test "$with_gnu_ld" = yes; then 172676888252Smrg need_lib_prefix=no 172776888252Smrg fi 172876888252Smrg need_version=yes 172976888252Smrg ;; 173076888252Smrg 173176888252Smrgsysv4 | sysv4.3*) 173276888252Smrg version_type=linux 173376888252Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 173476888252Smrg soname_spec='${libname}${release}${shared_ext}$major' 173576888252Smrg shlibpath_var=LD_LIBRARY_PATH 173676888252Smrg case $host_vendor in 173776888252Smrg sni) 173876888252Smrg shlibpath_overrides_runpath=no 173976888252Smrg need_lib_prefix=no 174076888252Smrg export_dynamic_flag_spec='${wl}-Blargedynsym' 174176888252Smrg runpath_var=LD_RUN_PATH 174276888252Smrg ;; 174376888252Smrg siemens) 174476888252Smrg need_lib_prefix=no 174576888252Smrg ;; 174676888252Smrg motorola) 174776888252Smrg need_lib_prefix=no 174876888252Smrg need_version=no 174976888252Smrg shlibpath_overrides_runpath=no 175076888252Smrg sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 175176888252Smrg ;; 175276888252Smrg esac 175376888252Smrg ;; 175476888252Smrg 175576888252Smrgsysv4*MP*) 175676888252Smrg if test -d /usr/nec ;then 175776888252Smrg version_type=linux 175876888252Smrg library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' 175976888252Smrg soname_spec='$libname${shared_ext}.$major' 176076888252Smrg shlibpath_var=LD_LIBRARY_PATH 176176888252Smrg fi 176276888252Smrg ;; 176376888252Smrg 176476888252Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 176576888252Smrg version_type=freebsd-elf 176676888252Smrg need_lib_prefix=no 176776888252Smrg need_version=no 176876888252Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 176976888252Smrg soname_spec='${libname}${release}${shared_ext}$major' 177076888252Smrg shlibpath_var=LD_LIBRARY_PATH 177176888252Smrg hardcode_into_libs=yes 177276888252Smrg if test "$with_gnu_ld" = yes; then 177376888252Smrg sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 177476888252Smrg shlibpath_overrides_runpath=no 177576888252Smrg else 177676888252Smrg sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 177776888252Smrg shlibpath_overrides_runpath=yes 177876888252Smrg case $host_os in 177976888252Smrg sco3.2v5*) 178076888252Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 178176888252Smrg ;; 178276888252Smrg esac 178376888252Smrg fi 178476888252Smrg sys_lib_dlsearch_path_spec='/usr/lib' 178576888252Smrg ;; 178676888252Smrg 178776888252Smrguts4*) 178876888252Smrg version_type=linux 178976888252Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 179076888252Smrg soname_spec='${libname}${release}${shared_ext}$major' 179176888252Smrg shlibpath_var=LD_LIBRARY_PATH 179276888252Smrg ;; 179376888252Smrg 179476888252Smrg*) 179576888252Smrg dynamic_linker=no 179676888252Smrg ;; 179776888252Smrgesac 179876888252SmrgAC_MSG_RESULT([$dynamic_linker]) 179976888252Smrgtest "$dynamic_linker" = no && can_build_shared=no 180076888252Smrg 180176888252Smrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var" 180276888252Smrgif test "$GCC" = yes; then 180376888252Smrg variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 180476888252Smrgfi 180576888252Smrg])# AC_LIBTOOL_SYS_DYNAMIC_LINKER 180676888252Smrg 180776888252Smrg 180876888252Smrg# _LT_AC_TAGCONFIG 180976888252Smrg# ---------------- 181076888252SmrgAC_DEFUN([_LT_AC_TAGCONFIG], 181176888252Smrg[AC_ARG_WITH([tags], 181276888252Smrg [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@], 181376888252Smrg [include additional configurations @<:@automatic@:>@])], 181476888252Smrg [tagnames="$withval"]) 181576888252Smrg 181676888252Smrgif test -f "$ltmain" && test -n "$tagnames"; then 181776888252Smrg if test ! -f "${ofile}"; then 181876888252Smrg AC_MSG_WARN([output file `$ofile' does not exist]) 181976888252Smrg fi 182076888252Smrg 182176888252Smrg if test -z "$LTCC"; then 182276888252Smrg eval "`$SHELL ${ofile} --config | grep '^LTCC='`" 182376888252Smrg if test -z "$LTCC"; then 182476888252Smrg AC_MSG_WARN([output file `$ofile' does not look like a libtool script]) 182576888252Smrg else 182676888252Smrg AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile']) 182776888252Smrg fi 182876888252Smrg fi 182976888252Smrg if test -z "$LTCFLAGS"; then 183076888252Smrg eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`" 183176888252Smrg fi 183276888252Smrg 183376888252Smrg # Extract list of available tagged configurations in $ofile. 183476888252Smrg # Note that this assumes the entire list is on one line. 183576888252Smrg available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` 183676888252Smrg 183776888252Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 183876888252Smrg for tagname in $tagnames; do 183976888252Smrg IFS="$lt_save_ifs" 184076888252Smrg # Check whether tagname contains only valid characters 184176888252Smrg case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in 184276888252Smrg "") ;; 184376888252Smrg *) AC_MSG_ERROR([invalid tag name: $tagname]) 184476888252Smrg ;; 184576888252Smrg esac 184676888252Smrg 184776888252Smrg if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null 184876888252Smrg then 184976888252Smrg AC_MSG_ERROR([tag name \"$tagname\" already exists]) 185076888252Smrg fi 185176888252Smrg 185276888252Smrg # Update the list of available tags. 185376888252Smrg if test -n "$tagname"; then 185476888252Smrg echo appending configuration tag \"$tagname\" to $ofile 185576888252Smrg 185676888252Smrg case $tagname in 185776888252Smrg CXX) 185876888252Smrg if test -n "$CXX" && ( test "X$CXX" != "Xno" && 185976888252Smrg ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || 186076888252Smrg (test "X$CXX" != "Xg++"))) ; then 186176888252Smrg AC_LIBTOOL_LANG_CXX_CONFIG 186276888252Smrg else 186376888252Smrg tagname="" 186476888252Smrg fi 186576888252Smrg ;; 186676888252Smrg 186776888252Smrg F77) 186876888252Smrg if test -n "$F77" && test "X$F77" != "Xno"; then 186976888252Smrg AC_LIBTOOL_LANG_F77_CONFIG 187076888252Smrg else 187176888252Smrg tagname="" 187276888252Smrg fi 187376888252Smrg ;; 187476888252Smrg 187576888252Smrg GCJ) 187676888252Smrg if test -n "$GCJ" && test "X$GCJ" != "Xno"; then 187776888252Smrg AC_LIBTOOL_LANG_GCJ_CONFIG 187876888252Smrg else 187976888252Smrg tagname="" 188076888252Smrg fi 188176888252Smrg ;; 188276888252Smrg 188376888252Smrg RC) 188476888252Smrg AC_LIBTOOL_LANG_RC_CONFIG 188576888252Smrg ;; 188676888252Smrg 188776888252Smrg *) 188876888252Smrg AC_MSG_ERROR([Unsupported tag name: $tagname]) 188976888252Smrg ;; 189076888252Smrg esac 189176888252Smrg 189276888252Smrg # Append the new tag name to the list of available tags. 189376888252Smrg if test -n "$tagname" ; then 189476888252Smrg available_tags="$available_tags $tagname" 189576888252Smrg fi 189676888252Smrg fi 189776888252Smrg done 189876888252Smrg IFS="$lt_save_ifs" 189976888252Smrg 190076888252Smrg # Now substitute the updated list of available tags. 190176888252Smrg if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then 190276888252Smrg mv "${ofile}T" "$ofile" 190376888252Smrg chmod +x "$ofile" 190476888252Smrg else 190576888252Smrg rm -f "${ofile}T" 190676888252Smrg AC_MSG_ERROR([unable to update list of available tagged configurations.]) 190776888252Smrg fi 190876888252Smrgfi 190976888252Smrg])# _LT_AC_TAGCONFIG 191076888252Smrg 191176888252Smrg 191276888252Smrg# AC_LIBTOOL_DLOPEN 191376888252Smrg# ----------------- 191476888252Smrg# enable checks for dlopen support 191576888252SmrgAC_DEFUN([AC_LIBTOOL_DLOPEN], 191676888252Smrg [AC_BEFORE([$0],[AC_LIBTOOL_SETUP]) 191776888252Smrg])# AC_LIBTOOL_DLOPEN 191876888252Smrg 191976888252Smrg 192076888252Smrg# AC_LIBTOOL_WIN32_DLL 192176888252Smrg# -------------------- 192276888252Smrg# declare package support for building win32 DLLs 192376888252SmrgAC_DEFUN([AC_LIBTOOL_WIN32_DLL], 192476888252Smrg[AC_BEFORE([$0], [AC_LIBTOOL_SETUP]) 192576888252Smrg])# AC_LIBTOOL_WIN32_DLL 192676888252Smrg 192776888252Smrg 192876888252Smrg# AC_ENABLE_SHARED([DEFAULT]) 192976888252Smrg# --------------------------- 193076888252Smrg# implement the --enable-shared flag 193176888252Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 193276888252SmrgAC_DEFUN([AC_ENABLE_SHARED], 193376888252Smrg[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl 193476888252SmrgAC_ARG_ENABLE([shared], 193576888252Smrg [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 193676888252Smrg [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])], 193776888252Smrg [p=${PACKAGE-default} 193876888252Smrg case $enableval in 193976888252Smrg yes) enable_shared=yes ;; 194076888252Smrg no) enable_shared=no ;; 194176888252Smrg *) 194276888252Smrg enable_shared=no 194376888252Smrg # Look at the argument we got. We use all the common list separators. 194476888252Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 194576888252Smrg for pkg in $enableval; do 194676888252Smrg IFS="$lt_save_ifs" 194776888252Smrg if test "X$pkg" = "X$p"; then 194876888252Smrg enable_shared=yes 194976888252Smrg fi 195076888252Smrg done 195176888252Smrg IFS="$lt_save_ifs" 195276888252Smrg ;; 195376888252Smrg esac], 195476888252Smrg [enable_shared=]AC_ENABLE_SHARED_DEFAULT) 195576888252Smrg])# AC_ENABLE_SHARED 195676888252Smrg 195776888252Smrg 195876888252Smrg# AC_DISABLE_SHARED 195976888252Smrg# ----------------- 196076888252Smrg# set the default shared flag to --disable-shared 196176888252SmrgAC_DEFUN([AC_DISABLE_SHARED], 196276888252Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 196376888252SmrgAC_ENABLE_SHARED(no) 196476888252Smrg])# AC_DISABLE_SHARED 196576888252Smrg 196676888252Smrg 196776888252Smrg# AC_ENABLE_STATIC([DEFAULT]) 196876888252Smrg# --------------------------- 196976888252Smrg# implement the --enable-static flag 197076888252Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 197176888252SmrgAC_DEFUN([AC_ENABLE_STATIC], 197276888252Smrg[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl 197376888252SmrgAC_ARG_ENABLE([static], 197476888252Smrg [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@], 197576888252Smrg [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])], 197676888252Smrg [p=${PACKAGE-default} 197776888252Smrg case $enableval in 197876888252Smrg yes) enable_static=yes ;; 197976888252Smrg no) enable_static=no ;; 198076888252Smrg *) 198176888252Smrg enable_static=no 198276888252Smrg # Look at the argument we got. We use all the common list separators. 198376888252Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 198476888252Smrg for pkg in $enableval; do 198576888252Smrg IFS="$lt_save_ifs" 198676888252Smrg if test "X$pkg" = "X$p"; then 198776888252Smrg enable_static=yes 198876888252Smrg fi 198976888252Smrg done 199076888252Smrg IFS="$lt_save_ifs" 199176888252Smrg ;; 199276888252Smrg esac], 199376888252Smrg [enable_static=]AC_ENABLE_STATIC_DEFAULT) 199476888252Smrg])# AC_ENABLE_STATIC 199576888252Smrg 199676888252Smrg 199776888252Smrg# AC_DISABLE_STATIC 199876888252Smrg# ----------------- 199976888252Smrg# set the default static flag to --disable-static 200076888252SmrgAC_DEFUN([AC_DISABLE_STATIC], 200176888252Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 200276888252SmrgAC_ENABLE_STATIC(no) 200376888252Smrg])# AC_DISABLE_STATIC 200476888252Smrg 200576888252Smrg 200676888252Smrg# AC_ENABLE_FAST_INSTALL([DEFAULT]) 200776888252Smrg# --------------------------------- 200876888252Smrg# implement the --enable-fast-install flag 200976888252Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 201076888252SmrgAC_DEFUN([AC_ENABLE_FAST_INSTALL], 201176888252Smrg[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl 201276888252SmrgAC_ARG_ENABLE([fast-install], 201376888252Smrg [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 201476888252Smrg [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 201576888252Smrg [p=${PACKAGE-default} 201676888252Smrg case $enableval in 201776888252Smrg yes) enable_fast_install=yes ;; 201876888252Smrg no) enable_fast_install=no ;; 201976888252Smrg *) 202076888252Smrg enable_fast_install=no 202176888252Smrg # Look at the argument we got. We use all the common list separators. 202276888252Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 202376888252Smrg for pkg in $enableval; do 202476888252Smrg IFS="$lt_save_ifs" 202576888252Smrg if test "X$pkg" = "X$p"; then 202676888252Smrg enable_fast_install=yes 202776888252Smrg fi 202876888252Smrg done 202976888252Smrg IFS="$lt_save_ifs" 203076888252Smrg ;; 203176888252Smrg esac], 203276888252Smrg [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT) 203376888252Smrg])# AC_ENABLE_FAST_INSTALL 203476888252Smrg 203576888252Smrg 203676888252Smrg# AC_DISABLE_FAST_INSTALL 203776888252Smrg# ----------------------- 203876888252Smrg# set the default to --disable-fast-install 203976888252SmrgAC_DEFUN([AC_DISABLE_FAST_INSTALL], 204076888252Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 204176888252SmrgAC_ENABLE_FAST_INSTALL(no) 204276888252Smrg])# AC_DISABLE_FAST_INSTALL 204376888252Smrg 204476888252Smrg 204576888252Smrg# AC_LIBTOOL_PICMODE([MODE]) 204676888252Smrg# -------------------------- 204776888252Smrg# implement the --with-pic flag 204876888252Smrg# MODE is either `yes' or `no'. If omitted, it defaults to `both'. 204976888252SmrgAC_DEFUN([AC_LIBTOOL_PICMODE], 205076888252Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 205176888252Smrgpic_mode=ifelse($#,1,$1,default) 205276888252Smrg])# AC_LIBTOOL_PICMODE 205376888252Smrg 205476888252Smrg 205576888252Smrg# AC_PROG_EGREP 205676888252Smrg# ------------- 205776888252Smrg# This is predefined starting with Autoconf 2.54, so this conditional 205876888252Smrg# definition can be removed once we require Autoconf 2.54 or later. 205976888252Smrgm4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP], 206076888252Smrg[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep], 206176888252Smrg [if echo a | (grep -E '(a|b)') >/dev/null 2>&1 206276888252Smrg then ac_cv_prog_egrep='grep -E' 206376888252Smrg else ac_cv_prog_egrep='egrep' 206476888252Smrg fi]) 206576888252Smrg EGREP=$ac_cv_prog_egrep 206676888252Smrg AC_SUBST([EGREP]) 206776888252Smrg])]) 206876888252Smrg 206976888252Smrg 207076888252Smrg# AC_PATH_TOOL_PREFIX 207176888252Smrg# ------------------- 207276888252Smrg# find a file program which can recognise shared library 207376888252SmrgAC_DEFUN([AC_PATH_TOOL_PREFIX], 207476888252Smrg[AC_REQUIRE([AC_PROG_EGREP])dnl 207576888252SmrgAC_MSG_CHECKING([for $1]) 207676888252SmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 207776888252Smrg[case $MAGIC_CMD in 207876888252Smrg[[\\/*] | ?:[\\/]*]) 207976888252Smrg lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. 208076888252Smrg ;; 208176888252Smrg*) 208276888252Smrg lt_save_MAGIC_CMD="$MAGIC_CMD" 208376888252Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 208476888252Smrgdnl $ac_dummy forces splitting on constant user-supplied paths. 208576888252Smrgdnl POSIX.2 word splitting is done only on the output of word expansions, 208676888252Smrgdnl not every word. This closes a longstanding sh security hole. 208776888252Smrg ac_dummy="ifelse([$2], , $PATH, [$2])" 208876888252Smrg for ac_dir in $ac_dummy; do 208976888252Smrg IFS="$lt_save_ifs" 209076888252Smrg test -z "$ac_dir" && ac_dir=. 209176888252Smrg if test -f $ac_dir/$1; then 209276888252Smrg lt_cv_path_MAGIC_CMD="$ac_dir/$1" 209376888252Smrg if test -n "$file_magic_test_file"; then 209476888252Smrg case $deplibs_check_method in 209576888252Smrg "file_magic "*) 209676888252Smrg file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 209776888252Smrg MAGIC_CMD="$lt_cv_path_MAGIC_CMD" 209876888252Smrg if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 209976888252Smrg $EGREP "$file_magic_regex" > /dev/null; then 210076888252Smrg : 210176888252Smrg else 210276888252Smrg cat <<EOF 1>&2 210376888252Smrg 210476888252Smrg*** Warning: the command libtool uses to detect shared libraries, 210576888252Smrg*** $file_magic_cmd, produces output that libtool cannot recognize. 210676888252Smrg*** The result is that libtool may fail to recognize shared libraries 210776888252Smrg*** as such. This will affect the creation of libtool libraries that 210876888252Smrg*** depend on shared libraries, but programs linked with such libtool 210976888252Smrg*** libraries will work regardless of this problem. Nevertheless, you 211076888252Smrg*** may want to report the problem to your system manager and/or to 211176888252Smrg*** bug-libtool@gnu.org 211276888252Smrg 211376888252SmrgEOF 211476888252Smrg fi ;; 211576888252Smrg esac 211676888252Smrg fi 211776888252Smrg break 211876888252Smrg fi 211976888252Smrg done 212076888252Smrg IFS="$lt_save_ifs" 212176888252Smrg MAGIC_CMD="$lt_save_MAGIC_CMD" 212276888252Smrg ;; 212376888252Smrgesac]) 212476888252SmrgMAGIC_CMD="$lt_cv_path_MAGIC_CMD" 212576888252Smrgif test -n "$MAGIC_CMD"; then 212676888252Smrg AC_MSG_RESULT($MAGIC_CMD) 212776888252Smrgelse 212876888252Smrg AC_MSG_RESULT(no) 212976888252Smrgfi 213076888252Smrg])# AC_PATH_TOOL_PREFIX 213176888252Smrg 213276888252Smrg 213376888252Smrg# AC_PATH_MAGIC 213476888252Smrg# ------------- 213576888252Smrg# find a file program which can recognise a shared library 213676888252SmrgAC_DEFUN([AC_PATH_MAGIC], 213776888252Smrg[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 213876888252Smrgif test -z "$lt_cv_path_MAGIC_CMD"; then 213976888252Smrg if test -n "$ac_tool_prefix"; then 214076888252Smrg AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 214176888252Smrg else 214276888252Smrg MAGIC_CMD=: 214376888252Smrg fi 214476888252Smrgfi 214576888252Smrg])# AC_PATH_MAGIC 214676888252Smrg 214776888252Smrg 214876888252Smrg# AC_PROG_LD 214976888252Smrg# ---------- 215076888252Smrg# find the pathname to the GNU or non-GNU linker 215176888252SmrgAC_DEFUN([AC_PROG_LD], 215276888252Smrg[AC_ARG_WITH([gnu-ld], 215376888252Smrg [AC_HELP_STRING([--with-gnu-ld], 215476888252Smrg [assume the C compiler uses GNU ld @<:@default=no@:>@])], 215576888252Smrg [test "$withval" = no || with_gnu_ld=yes], 215676888252Smrg [with_gnu_ld=no]) 215776888252SmrgAC_REQUIRE([LT_AC_PROG_SED])dnl 215876888252SmrgAC_REQUIRE([AC_PROG_CC])dnl 215976888252SmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 216076888252SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 216176888252Smrgac_prog=ld 216276888252Smrgif test "$GCC" = yes; then 216376888252Smrg # Check if gcc -print-prog-name=ld gives a path. 216476888252Smrg AC_MSG_CHECKING([for ld used by $CC]) 216576888252Smrg case $host in 216676888252Smrg *-*-mingw*) 216776888252Smrg # gcc leaves a trailing carriage return which upsets mingw 216876888252Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 216976888252Smrg *) 217076888252Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 217176888252Smrg esac 217276888252Smrg case $ac_prog in 217376888252Smrg # Accept absolute paths. 217476888252Smrg [[\\/]]* | ?:[[\\/]]*) 217576888252Smrg re_direlt='/[[^/]][[^/]]*/\.\./' 217676888252Smrg # Canonicalize the pathname of ld 217776888252Smrg ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` 217876888252Smrg while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do 217976888252Smrg ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` 218076888252Smrg done 218176888252Smrg test -z "$LD" && LD="$ac_prog" 218276888252Smrg ;; 218376888252Smrg "") 218476888252Smrg # If it fails, then pretend we aren't using GCC. 218576888252Smrg ac_prog=ld 218676888252Smrg ;; 218776888252Smrg *) 218876888252Smrg # If it is relative, then search for the first ld in PATH. 218976888252Smrg with_gnu_ld=unknown 219076888252Smrg ;; 219176888252Smrg esac 219276888252Smrgelif test "$with_gnu_ld" = yes; then 219376888252Smrg AC_MSG_CHECKING([for GNU ld]) 219476888252Smrgelse 219576888252Smrg AC_MSG_CHECKING([for non-GNU ld]) 219676888252Smrgfi 219776888252SmrgAC_CACHE_VAL(lt_cv_path_LD, 219876888252Smrg[if test -z "$LD"; then 219976888252Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 220076888252Smrg for ac_dir in $PATH; do 220176888252Smrg IFS="$lt_save_ifs" 220276888252Smrg test -z "$ac_dir" && ac_dir=. 220376888252Smrg if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 220476888252Smrg lt_cv_path_LD="$ac_dir/$ac_prog" 220576888252Smrg # Check to see if the program is GNU ld. I'd rather use --version, 220676888252Smrg # but apparently some variants of GNU ld only accept -v. 220776888252Smrg # Break only if it was the GNU/non-GNU ld that we prefer. 220876888252Smrg case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 220976888252Smrg *GNU* | *'with BFD'*) 221076888252Smrg test "$with_gnu_ld" != no && break 221176888252Smrg ;; 221276888252Smrg *) 221376888252Smrg test "$with_gnu_ld" != yes && break 221476888252Smrg ;; 221576888252Smrg esac 221676888252Smrg fi 221776888252Smrg done 221876888252Smrg IFS="$lt_save_ifs" 221976888252Smrgelse 222076888252Smrg lt_cv_path_LD="$LD" # Let the user override the test with a path. 222176888252Smrgfi]) 222276888252SmrgLD="$lt_cv_path_LD" 222376888252Smrgif test -n "$LD"; then 222476888252Smrg AC_MSG_RESULT($LD) 222576888252Smrgelse 222676888252Smrg AC_MSG_RESULT(no) 222776888252Smrgfi 222876888252Smrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 222976888252SmrgAC_PROG_LD_GNU 223076888252Smrg])# AC_PROG_LD 223176888252Smrg 223276888252Smrg 223376888252Smrg# AC_PROG_LD_GNU 223476888252Smrg# -------------- 223576888252SmrgAC_DEFUN([AC_PROG_LD_GNU], 223676888252Smrg[AC_REQUIRE([AC_PROG_EGREP])dnl 223776888252SmrgAC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 223876888252Smrg[# I'd rather use --version here, but apparently some GNU lds only accept -v. 223976888252Smrgcase `$LD -v 2>&1 </dev/null` in 224076888252Smrg*GNU* | *'with BFD'*) 224176888252Smrg lt_cv_prog_gnu_ld=yes 224276888252Smrg ;; 224376888252Smrg*) 224476888252Smrg lt_cv_prog_gnu_ld=no 224576888252Smrg ;; 224676888252Smrgesac]) 224776888252Smrgwith_gnu_ld=$lt_cv_prog_gnu_ld 224876888252Smrg])# AC_PROG_LD_GNU 224976888252Smrg 225076888252Smrg 225176888252Smrg# AC_PROG_LD_RELOAD_FLAG 225276888252Smrg# ---------------------- 225376888252Smrg# find reload flag for linker 225476888252Smrg# -- PORTME Some linkers may need a different reload flag. 225576888252SmrgAC_DEFUN([AC_PROG_LD_RELOAD_FLAG], 225676888252Smrg[AC_CACHE_CHECK([for $LD option to reload object files], 225776888252Smrg lt_cv_ld_reload_flag, 225876888252Smrg [lt_cv_ld_reload_flag='-r']) 225976888252Smrgreload_flag=$lt_cv_ld_reload_flag 226076888252Smrgcase $reload_flag in 226176888252Smrg"" | " "*) ;; 226276888252Smrg*) reload_flag=" $reload_flag" ;; 226376888252Smrgesac 226476888252Smrgreload_cmds='$LD$reload_flag -o $output$reload_objs' 226576888252Smrgcase $host_os in 226676888252Smrg darwin*) 226776888252Smrg if test "$GCC" = yes; then 226876888252Smrg reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' 226976888252Smrg else 227076888252Smrg reload_cmds='$LD$reload_flag -o $output$reload_objs' 227176888252Smrg fi 227276888252Smrg ;; 227376888252Smrgesac 227476888252Smrg])# AC_PROG_LD_RELOAD_FLAG 227576888252Smrg 227676888252Smrg 227776888252Smrg# AC_DEPLIBS_CHECK_METHOD 227876888252Smrg# ----------------------- 227976888252Smrg# how to check for library dependencies 228076888252Smrg# -- PORTME fill in with the dynamic library characteristics 228176888252SmrgAC_DEFUN([AC_DEPLIBS_CHECK_METHOD], 228276888252Smrg[AC_CACHE_CHECK([how to recognise dependent libraries], 228376888252Smrglt_cv_deplibs_check_method, 228476888252Smrg[lt_cv_file_magic_cmd='$MAGIC_CMD' 228576888252Smrglt_cv_file_magic_test_file= 228676888252Smrglt_cv_deplibs_check_method='unknown' 228776888252Smrg# Need to set the preceding variable on all platforms that support 228876888252Smrg# interlibrary dependencies. 228976888252Smrg# 'none' -- dependencies not supported. 229076888252Smrg# `unknown' -- same as none, but documents that we really don't know. 229176888252Smrg# 'pass_all' -- all dependencies passed with no checks. 229276888252Smrg# 'test_compile' -- check by making test program. 229376888252Smrg# 'file_magic [[regex]]' -- check by looking for files in library path 229476888252Smrg# which responds to the $file_magic_cmd with a given extended regex. 229576888252Smrg# If you have `file' or equivalent on your system and you're not sure 229676888252Smrg# whether `pass_all' will *always* work, you probably want this one. 229776888252Smrg 229876888252Smrgcase $host_os in 229976888252Smrgaix4* | aix5*) 230076888252Smrg lt_cv_deplibs_check_method=pass_all 230176888252Smrg ;; 230276888252Smrg 230376888252Smrgbeos*) 230476888252Smrg lt_cv_deplibs_check_method=pass_all 230576888252Smrg ;; 230676888252Smrg 230776888252Smrgbsdi[[45]]*) 230876888252Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 230976888252Smrg lt_cv_file_magic_cmd='/usr/bin/file -L' 231076888252Smrg lt_cv_file_magic_test_file=/shlib/libc.so 231176888252Smrg ;; 231276888252Smrg 231376888252Smrgcygwin*) 231476888252Smrg # func_win32_libid is a shell function defined in ltmain.sh 231576888252Smrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 231676888252Smrg lt_cv_file_magic_cmd='func_win32_libid' 231776888252Smrg ;; 231876888252Smrg 231976888252Smrgmingw* | pw32*) 232076888252Smrg # Base MSYS/MinGW do not provide the 'file' command needed by 232176888252Smrg # func_win32_libid shell function, so use a weaker test based on 'objdump'. 232276888252Smrg lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' 232376888252Smrg lt_cv_file_magic_cmd='$OBJDUMP -f' 232476888252Smrg ;; 232576888252Smrg 232676888252Smrgdarwin* | rhapsody*) 232776888252Smrg lt_cv_deplibs_check_method=pass_all 232876888252Smrg ;; 232976888252Smrg 233076888252Smrgfreebsd* | kfreebsd*-gnu | dragonfly*) 233176888252Smrg if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then 233276888252Smrg case $host_cpu in 233376888252Smrg i*86 ) 233476888252Smrg # Not sure whether the presence of OpenBSD here was a mistake. 233576888252Smrg # Let's accept both of them until this is cleared up. 233676888252Smrg lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 233776888252Smrg lt_cv_file_magic_cmd=/usr/bin/file 233876888252Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 233976888252Smrg ;; 234076888252Smrg esac 234176888252Smrg else 234276888252Smrg lt_cv_deplibs_check_method=pass_all 234376888252Smrg fi 234476888252Smrg ;; 234576888252Smrg 234676888252Smrggnu*) 234776888252Smrg lt_cv_deplibs_check_method=pass_all 234876888252Smrg ;; 234976888252Smrg 235076888252Smrghpux10.20* | hpux11*) 235176888252Smrg lt_cv_file_magic_cmd=/usr/bin/file 235276888252Smrg case $host_cpu in 235376888252Smrg ia64*) 235476888252Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 235576888252Smrg lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 235676888252Smrg ;; 235776888252Smrg hppa*64*) 235876888252Smrg [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]'] 235976888252Smrg lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 236076888252Smrg ;; 236176888252Smrg *) 236276888252Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' 236376888252Smrg lt_cv_file_magic_test_file=/usr/lib/libc.sl 236476888252Smrg ;; 236576888252Smrg esac 236676888252Smrg ;; 236776888252Smrg 236876888252Smrginterix3*) 236976888252Smrg # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 237076888252Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 237176888252Smrg ;; 237276888252Smrg 237376888252Smrgirix5* | irix6* | nonstopux*) 237476888252Smrg case $LD in 237576888252Smrg *-32|*"-32 ") libmagic=32-bit;; 237676888252Smrg *-n32|*"-n32 ") libmagic=N32;; 237776888252Smrg *-64|*"-64 ") libmagic=64-bit;; 237876888252Smrg *) libmagic=never-match;; 237976888252Smrg esac 238076888252Smrg lt_cv_deplibs_check_method=pass_all 238176888252Smrg ;; 238276888252Smrg 238376888252Smrg# This must be Linux ELF. 238476888252Smrglinux*) 238576888252Smrg lt_cv_deplibs_check_method=pass_all 238676888252Smrg ;; 238776888252Smrg 238876888252Smrgnetbsd*) 238976888252Smrg if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then 239076888252Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 239176888252Smrg else 239276888252Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 239376888252Smrg fi 239476888252Smrg ;; 239576888252Smrg 239676888252Smrgnewos6*) 239776888252Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 239876888252Smrg lt_cv_file_magic_cmd=/usr/bin/file 239976888252Smrg lt_cv_file_magic_test_file=/usr/lib/libnls.so 240076888252Smrg ;; 240176888252Smrg 240276888252Smrgnto-qnx*) 240376888252Smrg lt_cv_deplibs_check_method=unknown 240476888252Smrg ;; 240576888252Smrg 240676888252Smrgopenbsd*) 240776888252Smrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 240876888252Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 240976888252Smrg else 241076888252Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 241176888252Smrg fi 241276888252Smrg ;; 241376888252Smrg 241476888252Smrgosf3* | osf4* | osf5*) 241576888252Smrg lt_cv_deplibs_check_method=pass_all 241676888252Smrg ;; 241776888252Smrg 241876888252Smrgsolaris*) 241976888252Smrg lt_cv_deplibs_check_method=pass_all 242076888252Smrg ;; 242176888252Smrg 242276888252Smrgsysv4 | sysv4.3*) 242376888252Smrg case $host_vendor in 242476888252Smrg motorola) 242576888252Smrg 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]]' 242676888252Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 242776888252Smrg ;; 242876888252Smrg ncr) 242976888252Smrg lt_cv_deplibs_check_method=pass_all 243076888252Smrg ;; 243176888252Smrg sequent) 243276888252Smrg lt_cv_file_magic_cmd='/bin/file' 243376888252Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 243476888252Smrg ;; 243576888252Smrg sni) 243676888252Smrg lt_cv_file_magic_cmd='/bin/file' 243776888252Smrg lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 243876888252Smrg lt_cv_file_magic_test_file=/lib/libc.so 243976888252Smrg ;; 244076888252Smrg siemens) 244176888252Smrg lt_cv_deplibs_check_method=pass_all 244276888252Smrg ;; 244376888252Smrg pc) 244476888252Smrg lt_cv_deplibs_check_method=pass_all 244576888252Smrg ;; 244676888252Smrg esac 244776888252Smrg ;; 244876888252Smrg 244976888252Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 245076888252Smrg lt_cv_deplibs_check_method=pass_all 245176888252Smrg ;; 245276888252Smrgesac 245376888252Smrg]) 245476888252Smrgfile_magic_cmd=$lt_cv_file_magic_cmd 245576888252Smrgdeplibs_check_method=$lt_cv_deplibs_check_method 245676888252Smrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown 245776888252Smrg])# AC_DEPLIBS_CHECK_METHOD 245876888252Smrg 245976888252Smrg 246076888252Smrg# AC_PROG_NM 246176888252Smrg# ---------- 246276888252Smrg# find the pathname to a BSD-compatible name lister 246376888252SmrgAC_DEFUN([AC_PROG_NM], 246476888252Smrg[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM, 246576888252Smrg[if test -n "$NM"; then 246676888252Smrg # Let the user override the test. 246776888252Smrg lt_cv_path_NM="$NM" 246876888252Smrgelse 246976888252Smrg lt_nm_to_check="${ac_tool_prefix}nm" 247076888252Smrg if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 247176888252Smrg lt_nm_to_check="$lt_nm_to_check nm" 247276888252Smrg fi 247376888252Smrg for lt_tmp_nm in $lt_nm_to_check; do 247476888252Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 247576888252Smrg for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 247676888252Smrg IFS="$lt_save_ifs" 247776888252Smrg test -z "$ac_dir" && ac_dir=. 247876888252Smrg tmp_nm="$ac_dir/$lt_tmp_nm" 247976888252Smrg if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then 248076888252Smrg # Check to see if the nm accepts a BSD-compat flag. 248176888252Smrg # Adding the `sed 1q' prevents false positives on HP-UX, which says: 248276888252Smrg # nm: unknown option "B" ignored 248376888252Smrg # Tru64's nm complains that /dev/null is an invalid object file 248476888252Smrg case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in 248576888252Smrg */dev/null* | *'Invalid file or object type'*) 248676888252Smrg lt_cv_path_NM="$tmp_nm -B" 248776888252Smrg break 248876888252Smrg ;; 248976888252Smrg *) 249076888252Smrg case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in 249176888252Smrg */dev/null*) 249276888252Smrg lt_cv_path_NM="$tmp_nm -p" 249376888252Smrg break 249476888252Smrg ;; 249576888252Smrg *) 249676888252Smrg lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 249776888252Smrg continue # so that we can try to find one that supports BSD flags 249876888252Smrg ;; 249976888252Smrg esac 250076888252Smrg ;; 250176888252Smrg esac 250276888252Smrg fi 250376888252Smrg done 250476888252Smrg IFS="$lt_save_ifs" 250576888252Smrg done 250676888252Smrg test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm 250776888252Smrgfi]) 250876888252SmrgNM="$lt_cv_path_NM" 250976888252Smrg])# AC_PROG_NM 251076888252Smrg 251176888252Smrg 251276888252Smrg# AC_CHECK_LIBM 251376888252Smrg# ------------- 251476888252Smrg# check for math library 251576888252SmrgAC_DEFUN([AC_CHECK_LIBM], 251676888252Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 251776888252SmrgLIBM= 251876888252Smrgcase $host in 251976888252Smrg*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) 252076888252Smrg # These system don't have libm, or don't need it 252176888252Smrg ;; 252276888252Smrg*-ncr-sysv4.3*) 252376888252Smrg AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") 252476888252Smrg AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 252576888252Smrg ;; 252676888252Smrg*) 252776888252Smrg AC_CHECK_LIB(m, cos, LIBM="-lm") 252876888252Smrg ;; 252976888252Smrgesac 253076888252Smrg])# AC_CHECK_LIBM 253176888252Smrg 253276888252Smrg 253376888252Smrg# AC_LIBLTDL_CONVENIENCE([DIRECTORY]) 253476888252Smrg# ----------------------------------- 253576888252Smrg# sets LIBLTDL to the link flags for the libltdl convenience library and 253676888252Smrg# LTDLINCL to the include flags for the libltdl header and adds 253776888252Smrg# --enable-ltdl-convenience to the configure arguments. Note that 253876888252Smrg# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, 253976888252Smrg# it is assumed to be `libltdl'. LIBLTDL will be prefixed with 254076888252Smrg# '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/' 254176888252Smrg# (note the single quotes!). If your package is not flat and you're not 254276888252Smrg# using automake, define top_builddir and top_srcdir appropriately in 254376888252Smrg# the Makefiles. 254476888252SmrgAC_DEFUN([AC_LIBLTDL_CONVENIENCE], 254576888252Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 254676888252Smrg case $enable_ltdl_convenience in 254776888252Smrg no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; 254876888252Smrg "") enable_ltdl_convenience=yes 254976888252Smrg ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; 255076888252Smrg esac 255176888252Smrg LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la 255276888252Smrg LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) 255376888252Smrg # For backwards non-gettext consistent compatibility... 255476888252Smrg INCLTDL="$LTDLINCL" 255576888252Smrg])# AC_LIBLTDL_CONVENIENCE 255676888252Smrg 255776888252Smrg 255876888252Smrg# AC_LIBLTDL_INSTALLABLE([DIRECTORY]) 255976888252Smrg# ----------------------------------- 256076888252Smrg# sets LIBLTDL to the link flags for the libltdl installable library and 256176888252Smrg# LTDLINCL to the include flags for the libltdl header and adds 256276888252Smrg# --enable-ltdl-install to the configure arguments. Note that 256376888252Smrg# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, 256476888252Smrg# and an installed libltdl is not found, it is assumed to be `libltdl'. 256576888252Smrg# LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with 256676888252Smrg# '${top_srcdir}/' (note the single quotes!). If your package is not 256776888252Smrg# flat and you're not using automake, define top_builddir and top_srcdir 256876888252Smrg# appropriately in the Makefiles. 256976888252Smrg# In the future, this macro may have to be called after AC_PROG_LIBTOOL. 257076888252SmrgAC_DEFUN([AC_LIBLTDL_INSTALLABLE], 257176888252Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 257276888252Smrg AC_CHECK_LIB(ltdl, lt_dlinit, 257376888252Smrg [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no], 257476888252Smrg [if test x"$enable_ltdl_install" = xno; then 257576888252Smrg AC_MSG_WARN([libltdl not installed, but installation disabled]) 257676888252Smrg else 257776888252Smrg enable_ltdl_install=yes 257876888252Smrg fi 257976888252Smrg ]) 258076888252Smrg if test x"$enable_ltdl_install" = x"yes"; then 258176888252Smrg ac_configure_args="$ac_configure_args --enable-ltdl-install" 258276888252Smrg LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la 258376888252Smrg LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) 258476888252Smrg else 258576888252Smrg ac_configure_args="$ac_configure_args --enable-ltdl-install=no" 258676888252Smrg LIBLTDL="-lltdl" 258776888252Smrg LTDLINCL= 258876888252Smrg fi 258976888252Smrg # For backwards non-gettext consistent compatibility... 259076888252Smrg INCLTDL="$LTDLINCL" 259176888252Smrg])# AC_LIBLTDL_INSTALLABLE 259276888252Smrg 259376888252Smrg 259476888252Smrg# AC_LIBTOOL_CXX 259576888252Smrg# -------------- 259676888252Smrg# enable support for C++ libraries 259776888252SmrgAC_DEFUN([AC_LIBTOOL_CXX], 259876888252Smrg[AC_REQUIRE([_LT_AC_LANG_CXX]) 259976888252Smrg])# AC_LIBTOOL_CXX 260076888252Smrg 260176888252Smrg 260276888252Smrg# _LT_AC_LANG_CXX 260376888252Smrg# --------------- 260476888252SmrgAC_DEFUN([_LT_AC_LANG_CXX], 260576888252Smrg[AC_REQUIRE([AC_PROG_CXX]) 260676888252SmrgAC_REQUIRE([_LT_AC_PROG_CXXCPP]) 260776888252Smrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX]) 260876888252Smrg])# _LT_AC_LANG_CXX 260976888252Smrg 261076888252Smrg# _LT_AC_PROG_CXXCPP 261176888252Smrg# ------------------ 261276888252SmrgAC_DEFUN([_LT_AC_PROG_CXXCPP], 261376888252Smrg[ 261476888252SmrgAC_REQUIRE([AC_PROG_CXX]) 261576888252Smrgif test -n "$CXX" && ( test "X$CXX" != "Xno" && 261676888252Smrg ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || 261776888252Smrg (test "X$CXX" != "Xg++"))) ; then 261876888252Smrg AC_PROG_CXXCPP 261976888252Smrgfi 262076888252Smrg])# _LT_AC_PROG_CXXCPP 262176888252Smrg 262276888252Smrg# AC_LIBTOOL_F77 262376888252Smrg# -------------- 262476888252Smrg# enable support for Fortran 77 libraries 262576888252SmrgAC_DEFUN([AC_LIBTOOL_F77], 262676888252Smrg[AC_REQUIRE([_LT_AC_LANG_F77]) 262776888252Smrg])# AC_LIBTOOL_F77 262876888252Smrg 262976888252Smrg 263076888252Smrg# _LT_AC_LANG_F77 263176888252Smrg# --------------- 263276888252SmrgAC_DEFUN([_LT_AC_LANG_F77], 263376888252Smrg[AC_REQUIRE([AC_PROG_F77]) 263476888252Smrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77]) 263576888252Smrg])# _LT_AC_LANG_F77 263676888252Smrg 263776888252Smrg 263876888252Smrg# AC_LIBTOOL_GCJ 263976888252Smrg# -------------- 264076888252Smrg# enable support for GCJ libraries 264176888252SmrgAC_DEFUN([AC_LIBTOOL_GCJ], 264276888252Smrg[AC_REQUIRE([_LT_AC_LANG_GCJ]) 264376888252Smrg])# AC_LIBTOOL_GCJ 264476888252Smrg 264576888252Smrg 264676888252Smrg# _LT_AC_LANG_GCJ 264776888252Smrg# --------------- 264876888252SmrgAC_DEFUN([_LT_AC_LANG_GCJ], 264976888252Smrg[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[], 265076888252Smrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[], 265176888252Smrg [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[], 265276888252Smrg [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])], 265376888252Smrg [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])], 265476888252Smrg [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])]) 265576888252Smrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ]) 265676888252Smrg])# _LT_AC_LANG_GCJ 265776888252Smrg 265876888252Smrg 265976888252Smrg# AC_LIBTOOL_RC 266076888252Smrg# ------------- 266176888252Smrg# enable support for Windows resource files 266276888252SmrgAC_DEFUN([AC_LIBTOOL_RC], 266376888252Smrg[AC_REQUIRE([LT_AC_PROG_RC]) 266476888252Smrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC]) 266576888252Smrg])# AC_LIBTOOL_RC 266676888252Smrg 266776888252Smrg 266876888252Smrg# AC_LIBTOOL_LANG_C_CONFIG 266976888252Smrg# ------------------------ 267076888252Smrg# Ensure that the configuration vars for the C compiler are 267176888252Smrg# suitably defined. Those variables are subsequently used by 267276888252Smrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 267376888252SmrgAC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG]) 267476888252SmrgAC_DEFUN([_LT_AC_LANG_C_CONFIG], 267576888252Smrg[lt_save_CC="$CC" 267676888252SmrgAC_LANG_PUSH(C) 267776888252Smrg 267876888252Smrg# Source file extension for C test sources. 267976888252Smrgac_ext=c 268076888252Smrg 268176888252Smrg# Object file extension for compiled C test sources. 268276888252Smrgobjext=o 268376888252Smrg_LT_AC_TAGVAR(objext, $1)=$objext 268476888252Smrg 268576888252Smrg# Code to be used in simple compile tests 268676888252Smrglt_simple_compile_test_code="int some_variable = 0;\n" 268776888252Smrg 268876888252Smrg# Code to be used in simple link tests 268976888252Smrglt_simple_link_test_code='int main(){return(0);}\n' 269076888252Smrg 269176888252Smrg_LT_AC_SYS_COMPILER 269276888252Smrg 269376888252Smrg# save warnings/boilerplate of simple test code 269476888252Smrg_LT_COMPILER_BOILERPLATE 269576888252Smrg_LT_LINKER_BOILERPLATE 269676888252Smrg 269776888252SmrgAC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) 269876888252SmrgAC_LIBTOOL_PROG_COMPILER_PIC($1) 269976888252SmrgAC_LIBTOOL_PROG_CC_C_O($1) 270076888252SmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) 270176888252SmrgAC_LIBTOOL_PROG_LD_SHLIBS($1) 270276888252SmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1) 270376888252SmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) 270476888252SmrgAC_LIBTOOL_SYS_LIB_STRIP 270576888252SmrgAC_LIBTOOL_DLOPEN_SELF 270676888252Smrg 270776888252Smrg# Report which library types will actually be built 270876888252SmrgAC_MSG_CHECKING([if libtool supports shared libraries]) 270976888252SmrgAC_MSG_RESULT([$can_build_shared]) 271076888252Smrg 271176888252SmrgAC_MSG_CHECKING([whether to build shared libraries]) 271276888252Smrgtest "$can_build_shared" = "no" && enable_shared=no 271376888252Smrg 271476888252Smrg# On AIX, shared libraries and static libraries use the same namespace, and 271576888252Smrg# are all built from PIC. 271676888252Smrgcase $host_os in 271776888252Smrgaix3*) 271876888252Smrg test "$enable_shared" = yes && enable_static=no 271976888252Smrg if test -n "$RANLIB"; then 272076888252Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 272176888252Smrg postinstall_cmds='$RANLIB $lib' 272276888252Smrg fi 272376888252Smrg ;; 272476888252Smrg 272576888252Smrgaix4* | aix5*) 272676888252Smrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 272776888252Smrg test "$enable_shared" = yes && enable_static=no 272876888252Smrg fi 272976888252Smrg ;; 273076888252Smrgesac 273176888252SmrgAC_MSG_RESULT([$enable_shared]) 273276888252Smrg 273376888252SmrgAC_MSG_CHECKING([whether to build static libraries]) 273476888252Smrg# Make sure either enable_shared or enable_static is yes. 273576888252Smrgtest "$enable_shared" = yes || enable_static=yes 273676888252SmrgAC_MSG_RESULT([$enable_static]) 273776888252Smrg 273876888252SmrgAC_LIBTOOL_CONFIG($1) 273976888252Smrg 274076888252SmrgAC_LANG_POP 274176888252SmrgCC="$lt_save_CC" 274276888252Smrg])# AC_LIBTOOL_LANG_C_CONFIG 274376888252Smrg 274476888252Smrg 274576888252Smrg# AC_LIBTOOL_LANG_CXX_CONFIG 274676888252Smrg# -------------------------- 274776888252Smrg# Ensure that the configuration vars for the C compiler are 274876888252Smrg# suitably defined. Those variables are subsequently used by 274976888252Smrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 275076888252SmrgAC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)]) 275176888252SmrgAC_DEFUN([_LT_AC_LANG_CXX_CONFIG], 275276888252Smrg[AC_LANG_PUSH(C++) 275376888252SmrgAC_REQUIRE([AC_PROG_CXX]) 275476888252SmrgAC_REQUIRE([_LT_AC_PROG_CXXCPP]) 275576888252Smrg 275676888252Smrg_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 275776888252Smrg_LT_AC_TAGVAR(allow_undefined_flag, $1)= 275876888252Smrg_LT_AC_TAGVAR(always_export_symbols, $1)=no 275976888252Smrg_LT_AC_TAGVAR(archive_expsym_cmds, $1)= 276076888252Smrg_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= 276176888252Smrg_LT_AC_TAGVAR(hardcode_direct, $1)=no 276276888252Smrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= 276376888252Smrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 276476888252Smrg_LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 276576888252Smrg_LT_AC_TAGVAR(hardcode_minus_L, $1)=no 276676888252Smrg_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 276776888252Smrg_LT_AC_TAGVAR(hardcode_automatic, $1)=no 276876888252Smrg_LT_AC_TAGVAR(module_cmds, $1)= 276976888252Smrg_LT_AC_TAGVAR(module_expsym_cmds, $1)= 277076888252Smrg_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown 277176888252Smrg_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 277276888252Smrg_LT_AC_TAGVAR(no_undefined_flag, $1)= 277376888252Smrg_LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 277476888252Smrg_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no 277576888252Smrg 277676888252Smrg# Dependencies to place before and after the object being linked: 277776888252Smrg_LT_AC_TAGVAR(predep_objects, $1)= 277876888252Smrg_LT_AC_TAGVAR(postdep_objects, $1)= 277976888252Smrg_LT_AC_TAGVAR(predeps, $1)= 278076888252Smrg_LT_AC_TAGVAR(postdeps, $1)= 278176888252Smrg_LT_AC_TAGVAR(compiler_lib_search_path, $1)= 278276888252Smrg 278376888252Smrg# Source file extension for C++ test sources. 278476888252Smrgac_ext=cpp 278576888252Smrg 278676888252Smrg# Object file extension for compiled C++ test sources. 278776888252Smrgobjext=o 278876888252Smrg_LT_AC_TAGVAR(objext, $1)=$objext 278976888252Smrg 279076888252Smrg# Code to be used in simple compile tests 279176888252Smrglt_simple_compile_test_code="int some_variable = 0;\n" 279276888252Smrg 279376888252Smrg# Code to be used in simple link tests 279476888252Smrglt_simple_link_test_code='int main(int, char *[[]]) { return(0); }\n' 279576888252Smrg 279676888252Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 279776888252Smrg_LT_AC_SYS_COMPILER 279876888252Smrg 279976888252Smrg# save warnings/boilerplate of simple test code 280076888252Smrg_LT_COMPILER_BOILERPLATE 280176888252Smrg_LT_LINKER_BOILERPLATE 280276888252Smrg 280376888252Smrg# Allow CC to be a program name with arguments. 280476888252Smrglt_save_CC=$CC 280576888252Smrglt_save_LD=$LD 280676888252Smrglt_save_GCC=$GCC 280776888252SmrgGCC=$GXX 280876888252Smrglt_save_with_gnu_ld=$with_gnu_ld 280976888252Smrglt_save_path_LD=$lt_cv_path_LD 281076888252Smrgif test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 281176888252Smrg lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 281276888252Smrgelse 281376888252Smrg $as_unset lt_cv_prog_gnu_ld 281476888252Smrgfi 281576888252Smrgif test -n "${lt_cv_path_LDCXX+set}"; then 281676888252Smrg lt_cv_path_LD=$lt_cv_path_LDCXX 281776888252Smrgelse 281876888252Smrg $as_unset lt_cv_path_LD 281976888252Smrgfi 282076888252Smrgtest -z "${LDCXX+set}" || LD=$LDCXX 282176888252SmrgCC=${CXX-"c++"} 282276888252Smrgcompiler=$CC 282376888252Smrg_LT_AC_TAGVAR(compiler, $1)=$CC 282476888252Smrg_LT_CC_BASENAME([$compiler]) 282576888252Smrg 282676888252Smrg# We don't want -fno-exception wen compiling C++ code, so set the 282776888252Smrg# no_builtin_flag separately 282876888252Smrgif test "$GXX" = yes; then 282976888252Smrg _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 283076888252Smrgelse 283176888252Smrg _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 283276888252Smrgfi 283376888252Smrg 283476888252Smrgif test "$GXX" = yes; then 283576888252Smrg # Set up default GNU C++ configuration 283676888252Smrg 283776888252Smrg AC_PROG_LD 283876888252Smrg 283976888252Smrg # Check if GNU C++ uses GNU ld as the underlying linker, since the 284076888252Smrg # archiving commands below assume that GNU ld is being used. 284176888252Smrg if test "$with_gnu_ld" = yes; then 284276888252Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 284376888252Smrg _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' 284476888252Smrg 284576888252Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 284676888252Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 284776888252Smrg 284876888252Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 284976888252Smrg # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 285076888252Smrg # investigate it a little bit more. (MM) 285176888252Smrg wlarc='${wl}' 285276888252Smrg 285376888252Smrg # ancient GNU ld didn't support --whole-archive et. al. 285476888252Smrg if eval "`$CC -print-prog-name=ld` --help 2>&1" | \ 285576888252Smrg grep 'no-whole-archive' > /dev/null; then 285676888252Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 285776888252Smrg else 285876888252Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 285976888252Smrg fi 286076888252Smrg else 286176888252Smrg with_gnu_ld=no 286276888252Smrg wlarc= 286376888252Smrg 286476888252Smrg # A generic and very simple default shared library creation 286576888252Smrg # command for GNU C++ for the case where it uses the native 286676888252Smrg # linker, instead of GNU ld. If possible, this setting should 286776888252Smrg # overridden to take advantage of the native linker features on 286876888252Smrg # the platform it is being used on. 286976888252Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 287076888252Smrg fi 287176888252Smrg 287276888252Smrg # Commands to make compiler produce verbose output that lists 287376888252Smrg # what "hidden" libraries, object files and flags are used when 287476888252Smrg # linking a shared library. 287576888252Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' 287676888252Smrg 287776888252Smrgelse 287876888252Smrg GXX=no 287976888252Smrg with_gnu_ld=no 288076888252Smrg wlarc= 288176888252Smrgfi 288276888252Smrg 288376888252Smrg# PORTME: fill in a description of your system's C++ link characteristics 288476888252SmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 288576888252Smrg_LT_AC_TAGVAR(ld_shlibs, $1)=yes 288676888252Smrgcase $host_os in 288776888252Smrg aix3*) 288876888252Smrg # FIXME: insert proper C++ library support 288976888252Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 289076888252Smrg ;; 289176888252Smrg aix4* | aix5*) 289276888252Smrg if test "$host_cpu" = ia64; then 289376888252Smrg # On IA64, the linker does run time linking by default, so we don't 289476888252Smrg # have to do anything special. 289576888252Smrg aix_use_runtimelinking=no 289676888252Smrg exp_sym_flag='-Bexport' 289776888252Smrg no_entry_flag="" 289876888252Smrg else 289976888252Smrg aix_use_runtimelinking=no 290076888252Smrg 290176888252Smrg # Test if we are trying to use run time linking or normal 290276888252Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 290376888252Smrg # need to do runtime linking. 290476888252Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*) 290576888252Smrg for ld_flag in $LDFLAGS; do 290676888252Smrg case $ld_flag in 290776888252Smrg *-brtl*) 290876888252Smrg aix_use_runtimelinking=yes 290976888252Smrg break 291076888252Smrg ;; 291176888252Smrg esac 291276888252Smrg done 291376888252Smrg ;; 291476888252Smrg esac 291576888252Smrg 291676888252Smrg exp_sym_flag='-bexport' 291776888252Smrg no_entry_flag='-bnoentry' 291876888252Smrg fi 291976888252Smrg 292076888252Smrg # When large executables or shared objects are built, AIX ld can 292176888252Smrg # have problems creating the table of contents. If linking a library 292276888252Smrg # or program results in "error TOC overflow" add -mminimal-toc to 292376888252Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 292476888252Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 292576888252Smrg 292676888252Smrg _LT_AC_TAGVAR(archive_cmds, $1)='' 292776888252Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 292876888252Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' 292976888252Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 293076888252Smrg 293176888252Smrg if test "$GXX" = yes; then 293276888252Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 293376888252Smrg # We only want to do this on AIX 4.2 and lower, the check 293476888252Smrg # below for broken collect2 doesn't work under 4.3+ 293576888252Smrg collect2name=`${CC} -print-prog-name=collect2` 293676888252Smrg if test -f "$collect2name" && \ 293776888252Smrg strings "$collect2name" | grep resolve_lib_name >/dev/null 293876888252Smrg then 293976888252Smrg # We have reworked collect2 294076888252Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 294176888252Smrg else 294276888252Smrg # We have old collect2 294376888252Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported 294476888252Smrg # It fails to find uninstalled libraries when the uninstalled 294576888252Smrg # path is not listed in the libpath. Setting hardcode_minus_L 294676888252Smrg # to unsupported forces relinking 294776888252Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 294876888252Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 294976888252Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 295076888252Smrg fi 295176888252Smrg ;; 295276888252Smrg esac 295376888252Smrg shared_flag='-shared' 295476888252Smrg if test "$aix_use_runtimelinking" = yes; then 295576888252Smrg shared_flag="$shared_flag "'${wl}-G' 295676888252Smrg fi 295776888252Smrg else 295876888252Smrg # not using gcc 295976888252Smrg if test "$host_cpu" = ia64; then 296076888252Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 296176888252Smrg # chokes on -Wl,-G. The following line is correct: 296276888252Smrg shared_flag='-G' 296376888252Smrg else 296476888252Smrg if test "$aix_use_runtimelinking" = yes; then 296576888252Smrg shared_flag='${wl}-G' 296676888252Smrg else 296776888252Smrg shared_flag='${wl}-bM:SRE' 296876888252Smrg fi 296976888252Smrg fi 297076888252Smrg fi 297176888252Smrg 297276888252Smrg # It seems that -bexpall does not export symbols beginning with 297376888252Smrg # underscore (_), so it is better to generate a list of symbols to export. 297476888252Smrg _LT_AC_TAGVAR(always_export_symbols, $1)=yes 297576888252Smrg if test "$aix_use_runtimelinking" = yes; then 297676888252Smrg # Warning - without using the other runtime loading flags (-brtl), 297776888252Smrg # -berok will link without error, but may produce a broken library. 297876888252Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' 297976888252Smrg # Determine the default libpath from the value encoded in an empty executable. 298076888252Smrg _LT_AC_SYS_LIBPATH_AIX 298176888252Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 298276888252Smrg 298376888252Smrg _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" 298476888252Smrg else 298576888252Smrg if test "$host_cpu" = ia64; then 298676888252Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 298776888252Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 298876888252Smrg _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" 298976888252Smrg else 299076888252Smrg # Determine the default libpath from the value encoded in an empty executable. 299176888252Smrg _LT_AC_SYS_LIBPATH_AIX 299276888252Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 299376888252Smrg # Warning - without using the other run time loading flags, 299476888252Smrg # -berok will link without error, but may produce a broken library. 299576888252Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 299676888252Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 299776888252Smrg # Exported symbols can be pulled into shared objects from archives 299876888252Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 299976888252Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes 300076888252Smrg # This is similar to how AIX traditionally builds its shared libraries. 300176888252Smrg _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' 300276888252Smrg fi 300376888252Smrg fi 300476888252Smrg ;; 300576888252Smrg 300676888252Smrg beos*) 300776888252Smrg if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 300876888252Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 300976888252Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 301076888252Smrg # support --undefined. This deserves some investigation. FIXME 301176888252Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 301276888252Smrg else 301376888252Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 301476888252Smrg fi 301576888252Smrg ;; 301676888252Smrg 301776888252Smrg chorus*) 301876888252Smrg case $cc_basename in 301976888252Smrg *) 302076888252Smrg # FIXME: insert proper C++ library support 302176888252Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 302276888252Smrg ;; 302376888252Smrg esac 302476888252Smrg ;; 302576888252Smrg 302676888252Smrg cygwin* | mingw* | pw32*) 302776888252Smrg # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 302876888252Smrg # as there is no search path for DLLs. 302976888252Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 303076888252Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 303176888252Smrg _LT_AC_TAGVAR(always_export_symbols, $1)=no 303276888252Smrg _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 303376888252Smrg 303476888252Smrg if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then 303576888252Smrg _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' 303676888252Smrg # If the export-symbols file already is a .def file (1st line 303776888252Smrg # is EXPORTS), use it as is; otherwise, prepend... 303876888252Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 303976888252Smrg cp $export_symbols $output_objdir/$soname.def; 304076888252Smrg else 304176888252Smrg echo EXPORTS > $output_objdir/$soname.def; 304276888252Smrg cat $export_symbols >> $output_objdir/$soname.def; 304376888252Smrg fi~ 304476888252Smrg $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' 304576888252Smrg else 304676888252Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 304776888252Smrg fi 304876888252Smrg ;; 304976888252Smrg darwin* | rhapsody*) 305076888252Smrg case $host_os in 305176888252Smrg rhapsody* | darwin1.[[012]]) 305276888252Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' 305376888252Smrg ;; 305476888252Smrg *) # Darwin 1.3 on 305576888252Smrg if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then 305676888252Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' 305776888252Smrg else 305876888252Smrg case ${MACOSX_DEPLOYMENT_TARGET} in 305976888252Smrg 10.[[012]]) 306076888252Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' 306176888252Smrg ;; 306276888252Smrg 10.*) 306376888252Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup' 306476888252Smrg ;; 306576888252Smrg esac 306676888252Smrg fi 306776888252Smrg ;; 306876888252Smrg esac 306976888252Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 307076888252Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 307176888252Smrg _LT_AC_TAGVAR(hardcode_automatic, $1)=yes 307276888252Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 307376888252Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' 307476888252Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 307576888252Smrg 307676888252Smrg if test "$GXX" = yes ; then 307776888252Smrg lt_int_apple_cc_single_mod=no 307876888252Smrg output_verbose_link_cmd='echo' 307976888252Smrg if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then 308076888252Smrg lt_int_apple_cc_single_mod=yes 308176888252Smrg fi 308276888252Smrg if test "X$lt_int_apple_cc_single_mod" = Xyes ; then 308376888252Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' 308476888252Smrg else 308576888252Smrg _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' 308676888252Smrg fi 308776888252Smrg _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' 308876888252Smrg # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds 308976888252Smrg if test "X$lt_int_apple_cc_single_mod" = Xyes ; then 309076888252Smrg _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}' 309176888252Smrg else 309276888252Smrg _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}' 309376888252Smrg fi 309476888252Smrg _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}' 309576888252Smrg else 309676888252Smrg case $cc_basename in 309776888252Smrg xlc*) 309876888252Smrg output_verbose_link_cmd='echo' 309976888252Smrg _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' 310076888252Smrg _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' 310176888252Smrg # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds 310276888252Smrg _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}' 310376888252Smrg _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}' 310476888252Smrg ;; 310576888252Smrg *) 310676888252Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 310776888252Smrg ;; 310876888252Smrg esac 310976888252Smrg fi 311076888252Smrg ;; 311176888252Smrg 311276888252Smrg dgux*) 311376888252Smrg case $cc_basename in 311476888252Smrg ec++*) 311576888252Smrg # FIXME: insert proper C++ library support 311676888252Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 311776888252Smrg ;; 311876888252Smrg ghcx*) 311976888252Smrg # Green Hills C++ Compiler 312076888252Smrg # FIXME: insert proper C++ library support 312176888252Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 312276888252Smrg ;; 312376888252Smrg *) 312476888252Smrg # FIXME: insert proper C++ library support 312576888252Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 312676888252Smrg ;; 312776888252Smrg esac 312876888252Smrg ;; 312976888252Smrg freebsd[[12]]*) 313076888252Smrg # C++ shared libraries reported to be fairly broken before switch to ELF 313176888252Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 313276888252Smrg ;; 313376888252Smrg freebsd-elf*) 313476888252Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 313576888252Smrg ;; 313676888252Smrg freebsd* | kfreebsd*-gnu | dragonfly*) 313776888252Smrg # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 313876888252Smrg # conventions 313976888252Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=yes 314076888252Smrg ;; 314176888252Smrg gnu*) 314276888252Smrg ;; 314376888252Smrg hpux9*) 314476888252Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 314576888252Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 314676888252Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 314776888252Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 314876888252Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 314976888252Smrg # but as the default 315076888252Smrg # location of the library. 315176888252Smrg 315276888252Smrg case $cc_basename in 315376888252Smrg CC*) 315476888252Smrg # FIXME: insert proper C++ library support 315576888252Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 315676888252Smrg ;; 315776888252Smrg aCC*) 315876888252Smrg _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' 315976888252Smrg # Commands to make compiler produce verbose output that lists 316076888252Smrg # what "hidden" libraries, object files and flags are used when 316176888252Smrg # linking a shared library. 316276888252Smrg # 316376888252Smrg # There doesn't appear to be a way to prevent this compiler from 316476888252Smrg # explicitly linking system object files so we need to strip them 316576888252Smrg # from the output so that they don't get included in the library 316676888252Smrg # dependencies. 316776888252Smrg 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' 316876888252Smrg ;; 316976888252Smrg *) 317076888252Smrg if test "$GXX" = yes; then 317176888252Smrg _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' 317276888252Smrg else 317376888252Smrg # FIXME: insert proper C++ library support 317476888252Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 317576888252Smrg fi 317676888252Smrg ;; 317776888252Smrg esac 317876888252Smrg ;; 317976888252Smrg hpux10*|hpux11*) 318076888252Smrg if test $with_gnu_ld = no; then 318176888252Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 318276888252Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 318376888252Smrg 318476888252Smrg case $host_cpu in 318576888252Smrg hppa*64*|ia64*) 318676888252Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' 318776888252Smrg ;; 318876888252Smrg *) 318976888252Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 319076888252Smrg ;; 319176888252Smrg esac 319276888252Smrg fi 319376888252Smrg case $host_cpu in 319476888252Smrg hppa*64*|ia64*) 319576888252Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 319676888252Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 319776888252Smrg ;; 319876888252Smrg *) 319976888252Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 320076888252Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 320176888252Smrg # but as the default 320276888252Smrg # location of the library. 320376888252Smrg ;; 320476888252Smrg esac 320576888252Smrg 320676888252Smrg case $cc_basename in 320776888252Smrg CC*) 320876888252Smrg # FIXME: insert proper C++ library support 320976888252Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 321076888252Smrg ;; 321176888252Smrg aCC*) 321276888252Smrg case $host_cpu in 321376888252Smrg hppa*64*) 321476888252Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 321576888252Smrg ;; 321676888252Smrg ia64*) 321776888252Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 321876888252Smrg ;; 321976888252Smrg *) 322076888252Smrg _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' 322176888252Smrg ;; 322276888252Smrg esac 322376888252Smrg # Commands to make compiler produce verbose output that lists 322476888252Smrg # what "hidden" libraries, object files and flags are used when 322576888252Smrg # linking a shared library. 322676888252Smrg # 322776888252Smrg # There doesn't appear to be a way to prevent this compiler from 322876888252Smrg # explicitly linking system object files so we need to strip them 322976888252Smrg # from the output so that they don't get included in the library 323076888252Smrg # dependencies. 323176888252Smrg 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' 323276888252Smrg ;; 323376888252Smrg *) 323476888252Smrg if test "$GXX" = yes; then 323576888252Smrg if test $with_gnu_ld = no; then 323676888252Smrg case $host_cpu in 323776888252Smrg hppa*64*) 323876888252Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 323976888252Smrg ;; 324076888252Smrg ia64*) 324176888252Smrg _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' 324276888252Smrg ;; 324376888252Smrg *) 324476888252Smrg _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' 324576888252Smrg ;; 324676888252Smrg esac 324776888252Smrg fi 324876888252Smrg else 324976888252Smrg # FIXME: insert proper C++ library support 325076888252Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 325176888252Smrg fi 325276888252Smrg ;; 325376888252Smrg esac 325476888252Smrg ;; 325576888252Smrg interix3*) 325676888252Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 325776888252Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 325876888252Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 325976888252Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 326076888252Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 326176888252Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 326276888252Smrg # default) and relocated if they conflict, which is a slow very memory 326376888252Smrg # consuming and fragmenting process. To avoid this, we pick a random, 326476888252Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 326576888252Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 326676888252Smrg _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' 326776888252Smrg _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' 326876888252Smrg ;; 326976888252Smrg irix5* | irix6*) 327076888252Smrg case $cc_basename in 327176888252Smrg CC*) 327276888252Smrg # SGI C++ 327376888252Smrg _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' 327476888252Smrg 327576888252Smrg # Archives containing C++ object files must be created using 327676888252Smrg # "CC -ar", where "CC" is the IRIX C++ compiler. This is 327776888252Smrg # necessary to make sure instantiated templates are included 327876888252Smrg # in the archive. 327976888252Smrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 328076888252Smrg ;; 328176888252Smrg *) 328276888252Smrg if test "$GXX" = yes; then 328376888252Smrg if test "$with_gnu_ld" = no; then 328476888252Smrg _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' 328576888252Smrg else 328676888252Smrg _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' 328776888252Smrg fi 328876888252Smrg fi 328976888252Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 329076888252Smrg ;; 329176888252Smrg esac 329276888252Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 329376888252Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 329476888252Smrg ;; 329576888252Smrg linux*) 329676888252Smrg case $cc_basename in 329776888252Smrg KCC*) 329876888252Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 329976888252Smrg 330076888252Smrg # KCC will only create a shared library if the output file 330176888252Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 330276888252Smrg # to its proper name (with version) after linking. 330376888252Smrg _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' 330476888252Smrg _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' 330576888252Smrg # Commands to make compiler produce verbose output that lists 330676888252Smrg # what "hidden" libraries, object files and flags are used when 330776888252Smrg # linking a shared library. 330876888252Smrg # 330976888252Smrg # There doesn't appear to be a way to prevent this compiler from 331076888252Smrg # explicitly linking system object files so we need to strip them 331176888252Smrg # from the output so that they don't get included in the library 331276888252Smrg # dependencies. 331376888252Smrg 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' 331476888252Smrg 331576888252Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir' 331676888252Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 331776888252Smrg 331876888252Smrg # Archives containing C++ object files must be created using 331976888252Smrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 332076888252Smrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 332176888252Smrg ;; 332276888252Smrg icpc*) 332376888252Smrg # Intel C++ 332476888252Smrg with_gnu_ld=yes 332576888252Smrg # version 8.0 and above of icpc choke on multiply defined symbols 332676888252Smrg # if we add $predep_objects and $postdep_objects, however 7.1 and 332776888252Smrg # earlier do not add the objects themselves. 332876888252Smrg case `$CC -V 2>&1` in 332976888252Smrg *"Version 7."*) 333076888252Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 333176888252Smrg _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' 333276888252Smrg ;; 333376888252Smrg *) # Version 8.0 or newer 333476888252Smrg tmp_idyn= 333576888252Smrg case $host_cpu in 333676888252Smrg ia64*) tmp_idyn=' -i_dynamic';; 333776888252Smrg esac 333876888252Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 333976888252Smrg _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' 334076888252Smrg ;; 334176888252Smrg esac 334276888252Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 334376888252Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 334476888252Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 334576888252Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 334676888252Smrg ;; 334776888252Smrg pgCC*) 334876888252Smrg # Portland Group C++ compiler 334976888252Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 335076888252Smrg _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' 335176888252Smrg 335276888252Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 335376888252Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 335476888252Smrg _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' 335576888252Smrg ;; 335676888252Smrg cxx*) 335776888252Smrg # Compaq C++ 335876888252Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 335976888252Smrg _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' 336076888252Smrg 336176888252Smrg runpath_var=LD_RUN_PATH 336276888252Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 336376888252Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 336476888252Smrg 336576888252Smrg # Commands to make compiler produce verbose output that lists 336676888252Smrg # what "hidden" libraries, object files and flags are used when 336776888252Smrg # linking a shared library. 336876888252Smrg # 336976888252Smrg # There doesn't appear to be a way to prevent this compiler from 337076888252Smrg # explicitly linking system object files so we need to strip them 337176888252Smrg # from the output so that they don't get included in the library 337276888252Smrg # dependencies. 337376888252Smrg 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' 337476888252Smrg ;; 337576888252Smrg esac 337676888252Smrg ;; 337776888252Smrg lynxos*) 337876888252Smrg # FIXME: insert proper C++ library support 337976888252Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 338076888252Smrg ;; 338176888252Smrg m88k*) 338276888252Smrg # FIXME: insert proper C++ library support 338376888252Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 338476888252Smrg ;; 338576888252Smrg mvs*) 338676888252Smrg case $cc_basename in 338776888252Smrg cxx*) 338876888252Smrg # FIXME: insert proper C++ library support 338976888252Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 339076888252Smrg ;; 339176888252Smrg *) 339276888252Smrg # FIXME: insert proper C++ library support 339376888252Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 339476888252Smrg ;; 339576888252Smrg esac 339676888252Smrg ;; 339776888252Smrg netbsd*) 339876888252Smrg if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then 339976888252Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 340076888252Smrg wlarc= 340176888252Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 340276888252Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 340376888252Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 340476888252Smrg fi 340576888252Smrg # Workaround some broken pre-1.5 toolchains 340676888252Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 340776888252Smrg ;; 340876888252Smrg openbsd2*) 340976888252Smrg # C++ shared libraries are fairly broken 341076888252Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 341176888252Smrg ;; 341276888252Smrg openbsd*) 341376888252Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 341476888252Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 341576888252Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 341676888252Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 341776888252Smrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 341876888252Smrg _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' 341976888252Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 342076888252Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 342176888252Smrg fi 342276888252Smrg output_verbose_link_cmd='echo' 342376888252Smrg ;; 342476888252Smrg osf3*) 342576888252Smrg case $cc_basename in 342676888252Smrg KCC*) 342776888252Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 342876888252Smrg 342976888252Smrg # KCC will only create a shared library if the output file 343076888252Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 343176888252Smrg # to its proper name (with version) after linking. 343276888252Smrg _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' 343376888252Smrg 343476888252Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 343576888252Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 343676888252Smrg 343776888252Smrg # Archives containing C++ object files must be created using 343876888252Smrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 343976888252Smrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 344076888252Smrg 344176888252Smrg ;; 344276888252Smrg RCC*) 344376888252Smrg # Rational C++ 2.4.1 344476888252Smrg # FIXME: insert proper C++ library support 344576888252Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 344676888252Smrg ;; 344776888252Smrg cxx*) 344876888252Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 344976888252Smrg _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' 345076888252Smrg 345176888252Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 345276888252Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 345376888252Smrg 345476888252Smrg # Commands to make compiler produce verbose output that lists 345576888252Smrg # what "hidden" libraries, object files and flags are used when 345676888252Smrg # linking a shared library. 345776888252Smrg # 345876888252Smrg # There doesn't appear to be a way to prevent this compiler from 345976888252Smrg # explicitly linking system object files so we need to strip them 346076888252Smrg # from the output so that they don't get included in the library 346176888252Smrg # dependencies. 346276888252Smrg 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' 346376888252Smrg ;; 346476888252Smrg *) 346576888252Smrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 346676888252Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 346776888252Smrg _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' 346876888252Smrg 346976888252Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 347076888252Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 347176888252Smrg 347276888252Smrg # Commands to make compiler produce verbose output that lists 347376888252Smrg # what "hidden" libraries, object files and flags are used when 347476888252Smrg # linking a shared library. 347576888252Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' 347676888252Smrg 347776888252Smrg else 347876888252Smrg # FIXME: insert proper C++ library support 347976888252Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 348076888252Smrg fi 348176888252Smrg ;; 348276888252Smrg esac 348376888252Smrg ;; 348476888252Smrg osf4* | osf5*) 348576888252Smrg case $cc_basename in 348676888252Smrg KCC*) 348776888252Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 348876888252Smrg 348976888252Smrg # KCC will only create a shared library if the output file 349076888252Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 349176888252Smrg # to its proper name (with version) after linking. 349276888252Smrg _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' 349376888252Smrg 349476888252Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 349576888252Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 349676888252Smrg 349776888252Smrg # Archives containing C++ object files must be created using 349876888252Smrg # the KAI C++ compiler. 349976888252Smrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' 350076888252Smrg ;; 350176888252Smrg RCC*) 350276888252Smrg # Rational C++ 2.4.1 350376888252Smrg # FIXME: insert proper C++ library support 350476888252Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 350576888252Smrg ;; 350676888252Smrg cxx*) 350776888252Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 350876888252Smrg _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' 350976888252Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 351076888252Smrg echo "-hidden">> $lib.exp~ 351176888252Smrg $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~ 351276888252Smrg $rm $lib.exp' 351376888252Smrg 351476888252Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 351576888252Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 351676888252Smrg 351776888252Smrg # Commands to make compiler produce verbose output that lists 351876888252Smrg # what "hidden" libraries, object files and flags are used when 351976888252Smrg # linking a shared library. 352076888252Smrg # 352176888252Smrg # There doesn't appear to be a way to prevent this compiler from 352276888252Smrg # explicitly linking system object files so we need to strip them 352376888252Smrg # from the output so that they don't get included in the library 352476888252Smrg # dependencies. 352576888252Smrg 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' 352676888252Smrg ;; 352776888252Smrg *) 352876888252Smrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 352976888252Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 353076888252Smrg _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' 353176888252Smrg 353276888252Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 353376888252Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 353476888252Smrg 353576888252Smrg # Commands to make compiler produce verbose output that lists 353676888252Smrg # what "hidden" libraries, object files and flags are used when 353776888252Smrg # linking a shared library. 353876888252Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' 353976888252Smrg 354076888252Smrg else 354176888252Smrg # FIXME: insert proper C++ library support 354276888252Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 354376888252Smrg fi 354476888252Smrg ;; 354576888252Smrg esac 354676888252Smrg ;; 354776888252Smrg psos*) 354876888252Smrg # FIXME: insert proper C++ library support 354976888252Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 355076888252Smrg ;; 355176888252Smrg sunos4*) 355276888252Smrg case $cc_basename in 355376888252Smrg CC*) 355476888252Smrg # Sun C++ 4.x 355576888252Smrg # FIXME: insert proper C++ library support 355676888252Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 355776888252Smrg ;; 355876888252Smrg lcc*) 355976888252Smrg # Lucid 356076888252Smrg # FIXME: insert proper C++ library support 356176888252Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 356276888252Smrg ;; 356376888252Smrg *) 356476888252Smrg # FIXME: insert proper C++ library support 356576888252Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 356676888252Smrg ;; 356776888252Smrg esac 356876888252Smrg ;; 356976888252Smrg solaris*) 357076888252Smrg case $cc_basename in 357176888252Smrg CC*) 357276888252Smrg # Sun C++ 4.2, 5.x and Centerline C++ 357376888252Smrg _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes 357476888252Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' 357576888252Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 357676888252Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 357776888252Smrg $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' 357876888252Smrg 357976888252Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 358076888252Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 358176888252Smrg case $host_os in 358276888252Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 358376888252Smrg *) 358476888252Smrg # The C++ compiler is used as linker so we must use $wl 358576888252Smrg # flag to pass the commands to the underlying system 358676888252Smrg # linker. We must also pass each convience library through 358776888252Smrg # to the system linker between allextract/defaultextract. 358876888252Smrg # The C++ compiler will combine linker options so we 358976888252Smrg # cannot just pass the convience library names through 359076888252Smrg # without $wl. 359176888252Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 359276888252Smrg _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' 359376888252Smrg ;; 359476888252Smrg esac 359576888252Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 359676888252Smrg 359776888252Smrg output_verbose_link_cmd='echo' 359876888252Smrg 359976888252Smrg # Archives containing C++ object files must be created using 360076888252Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 360176888252Smrg # necessary to make sure instantiated templates are included 360276888252Smrg # in the archive. 360376888252Smrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 360476888252Smrg ;; 360576888252Smrg gcx*) 360676888252Smrg # Green Hills C++ Compiler 360776888252Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 360876888252Smrg 360976888252Smrg # The C++ compiler must be used to create the archive. 361076888252Smrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 361176888252Smrg ;; 361276888252Smrg *) 361376888252Smrg # GNU C++ compiler with Solaris linker 361476888252Smrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 361576888252Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' 361676888252Smrg if $CC --version | grep -v '^2\.7' > /dev/null; then 361776888252Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 361876888252Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 361976888252Smrg $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' 362076888252Smrg 362176888252Smrg # Commands to make compiler produce verbose output that lists 362276888252Smrg # what "hidden" libraries, object files and flags are used when 362376888252Smrg # linking a shared library. 362476888252Smrg output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" 362576888252Smrg else 362676888252Smrg # g++ 2.7 appears to require `-G' NOT `-shared' on this 362776888252Smrg # platform. 362876888252Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 362976888252Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 363076888252Smrg $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' 363176888252Smrg 363276888252Smrg # Commands to make compiler produce verbose output that lists 363376888252Smrg # what "hidden" libraries, object files and flags are used when 363476888252Smrg # linking a shared library. 363576888252Smrg output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" 363676888252Smrg fi 363776888252Smrg 363876888252Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' 363976888252Smrg fi 364076888252Smrg ;; 364176888252Smrg esac 364276888252Smrg ;; 364376888252Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 364476888252Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 364576888252Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 364676888252Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 364776888252Smrg runpath_var='LD_RUN_PATH' 364876888252Smrg 364976888252Smrg case $cc_basename in 365076888252Smrg CC*) 365176888252Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 365276888252Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 365376888252Smrg ;; 365476888252Smrg *) 365576888252Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 365676888252Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 365776888252Smrg ;; 365876888252Smrg esac 365976888252Smrg ;; 366076888252Smrg sysv5* | sco3.2v5* | sco5v6*) 366176888252Smrg # Note: We can NOT use -z defs as we might desire, because we do not 366276888252Smrg # link with -lc, and that would cause any symbols used from libc to 366376888252Smrg # always be unresolved, which means just about no library would 366476888252Smrg # ever link correctly. If we're not using GNU ld we use -z text 366576888252Smrg # though, which does catch some bad symbols but isn't as heavy-handed 366676888252Smrg # as -z defs. 366776888252Smrg # For security reasons, it is highly recommended that you always 366876888252Smrg # use absolute paths for naming shared libraries, and exclude the 366976888252Smrg # DT_RUNPATH tag from executables and libraries. But doing so 367076888252Smrg # requires that you compile everything twice, which is a pain. 367176888252Smrg # So that behaviour is only enabled if SCOABSPATH is set to a 367276888252Smrg # non-empty value in the environment. Most likely only useful for 367376888252Smrg # creating official distributions of packages. 367476888252Smrg # This is a hack until libtool officially supports absolute path 367576888252Smrg # names for shared libraries. 367676888252Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 367776888252Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 367876888252Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 367976888252Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 368076888252Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' 368176888252Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' 368276888252Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 368376888252Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 368476888252Smrg runpath_var='LD_RUN_PATH' 368576888252Smrg 368676888252Smrg case $cc_basename in 368776888252Smrg CC*) 368876888252Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' 368976888252Smrg _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' 369076888252Smrg ;; 369176888252Smrg *) 369276888252Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' 369376888252Smrg _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' 369476888252Smrg ;; 369576888252Smrg esac 369676888252Smrg ;; 369776888252Smrg tandem*) 369876888252Smrg case $cc_basename in 369976888252Smrg NCC*) 370076888252Smrg # NonStop-UX NCC 3.20 370176888252Smrg # FIXME: insert proper C++ library support 370276888252Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 370376888252Smrg ;; 370476888252Smrg *) 370576888252Smrg # FIXME: insert proper C++ library support 370676888252Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 370776888252Smrg ;; 370876888252Smrg esac 370976888252Smrg ;; 371076888252Smrg vxworks*) 371176888252Smrg # FIXME: insert proper C++ library support 371276888252Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 371376888252Smrg ;; 371476888252Smrg *) 371576888252Smrg # FIXME: insert proper C++ library support 371676888252Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 371776888252Smrg ;; 371876888252Smrgesac 371976888252SmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) 372076888252Smrgtest "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 372176888252Smrg 372276888252Smrg_LT_AC_TAGVAR(GCC, $1)="$GXX" 372376888252Smrg_LT_AC_TAGVAR(LD, $1)="$LD" 372476888252Smrg 372576888252SmrgAC_LIBTOOL_POSTDEP_PREDEP($1) 372676888252SmrgAC_LIBTOOL_PROG_COMPILER_PIC($1) 372776888252SmrgAC_LIBTOOL_PROG_CC_C_O($1) 372876888252SmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) 372976888252SmrgAC_LIBTOOL_PROG_LD_SHLIBS($1) 373076888252SmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1) 373176888252SmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) 373276888252Smrg 373376888252SmrgAC_LIBTOOL_CONFIG($1) 373476888252Smrg 373576888252SmrgAC_LANG_POP 373676888252SmrgCC=$lt_save_CC 373776888252SmrgLDCXX=$LD 373876888252SmrgLD=$lt_save_LD 373976888252SmrgGCC=$lt_save_GCC 374076888252Smrgwith_gnu_ldcxx=$with_gnu_ld 374176888252Smrgwith_gnu_ld=$lt_save_with_gnu_ld 374276888252Smrglt_cv_path_LDCXX=$lt_cv_path_LD 374376888252Smrglt_cv_path_LD=$lt_save_path_LD 374476888252Smrglt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 374576888252Smrglt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 374676888252Smrg])# AC_LIBTOOL_LANG_CXX_CONFIG 374776888252Smrg 374876888252Smrg# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME]) 374976888252Smrg# ------------------------------------ 375076888252Smrg# Figure out "hidden" library dependencies from verbose 375176888252Smrg# compiler output when linking a shared library. 375276888252Smrg# Parse the compiler output and extract the necessary 375376888252Smrg# objects, libraries and library flags. 375476888252SmrgAC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[ 375576888252Smrgdnl we can't use the lt_simple_compile_test_code here, 375676888252Smrgdnl because it contains code intended for an executable, 375776888252Smrgdnl not a library. It's possible we should let each 375876888252Smrgdnl tag define a new lt_????_link_test_code variable, 375976888252Smrgdnl but it's only used here... 376076888252Smrgifelse([$1],[],[cat > conftest.$ac_ext <<EOF 376176888252Smrgint a; 376276888252Smrgvoid foo (void) { a = 0; } 376376888252SmrgEOF 376476888252Smrg],[$1],[CXX],[cat > conftest.$ac_ext <<EOF 376576888252Smrgclass Foo 376676888252Smrg{ 376776888252Smrgpublic: 376876888252Smrg Foo (void) { a = 0; } 376976888252Smrgprivate: 377076888252Smrg int a; 377176888252Smrg}; 377276888252SmrgEOF 377376888252Smrg],[$1],[F77],[cat > conftest.$ac_ext <<EOF 377476888252Smrg subroutine foo 377576888252Smrg implicit none 377676888252Smrg integer*4 a 377776888252Smrg a=0 377876888252Smrg return 377976888252Smrg end 378076888252SmrgEOF 378176888252Smrg],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF 378276888252Smrgpublic class foo { 378376888252Smrg private int a; 378476888252Smrg public void bar (void) { 378576888252Smrg a = 0; 378676888252Smrg } 378776888252Smrg}; 378876888252SmrgEOF 378976888252Smrg]) 379076888252Smrgdnl Parse the compiler output and extract the necessary 379176888252Smrgdnl objects, libraries and library flags. 379276888252Smrgif AC_TRY_EVAL(ac_compile); then 379376888252Smrg # Parse the compiler output and extract the necessary 379476888252Smrg # objects, libraries and library flags. 379576888252Smrg 379676888252Smrg # Sentinel used to keep track of whether or not we are before 379776888252Smrg # the conftest object file. 379876888252Smrg pre_test_object_deps_done=no 379976888252Smrg 380076888252Smrg # The `*' in the case matches for architectures that use `case' in 380176888252Smrg # $output_verbose_cmd can trigger glob expansion during the loop 380276888252Smrg # eval without this substitution. 380376888252Smrg output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"` 380476888252Smrg 380576888252Smrg for p in `eval $output_verbose_link_cmd`; do 380676888252Smrg case $p in 380776888252Smrg 380876888252Smrg -L* | -R* | -l*) 380976888252Smrg # Some compilers place space between "-{L,R}" and the path. 381076888252Smrg # Remove the space. 381176888252Smrg if test $p = "-L" \ 381276888252Smrg || test $p = "-R"; then 381376888252Smrg prev=$p 381476888252Smrg continue 381576888252Smrg else 381676888252Smrg prev= 381776888252Smrg fi 381876888252Smrg 381976888252Smrg if test "$pre_test_object_deps_done" = no; then 382076888252Smrg case $p in 382176888252Smrg -L* | -R*) 382276888252Smrg # Internal compiler library paths should come after those 382376888252Smrg # provided the user. The postdeps already come after the 382476888252Smrg # user supplied libs so there is no need to process them. 382576888252Smrg if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then 382676888252Smrg _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" 382776888252Smrg else 382876888252Smrg _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" 382976888252Smrg fi 383076888252Smrg ;; 383176888252Smrg # The "-l" case would never come before the object being 383276888252Smrg # linked, so don't bother handling this case. 383376888252Smrg esac 383476888252Smrg else 383576888252Smrg if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then 383676888252Smrg _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}" 383776888252Smrg else 383876888252Smrg _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}" 383976888252Smrg fi 384076888252Smrg fi 384176888252Smrg ;; 384276888252Smrg 384376888252Smrg *.$objext) 384476888252Smrg # This assumes that the test object file only shows up 384576888252Smrg # once in the compiler output. 384676888252Smrg if test "$p" = "conftest.$objext"; then 384776888252Smrg pre_test_object_deps_done=yes 384876888252Smrg continue 384976888252Smrg fi 385076888252Smrg 385176888252Smrg if test "$pre_test_object_deps_done" = no; then 385276888252Smrg if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then 385376888252Smrg _LT_AC_TAGVAR(predep_objects, $1)="$p" 385476888252Smrg else 385576888252Smrg _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p" 385676888252Smrg fi 385776888252Smrg else 385876888252Smrg if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then 385976888252Smrg _LT_AC_TAGVAR(postdep_objects, $1)="$p" 386076888252Smrg else 386176888252Smrg _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p" 386276888252Smrg fi 386376888252Smrg fi 386476888252Smrg ;; 386576888252Smrg 386676888252Smrg *) ;; # Ignore the rest. 386776888252Smrg 386876888252Smrg esac 386976888252Smrg done 387076888252Smrg 387176888252Smrg # Clean up. 387276888252Smrg rm -f a.out a.exe 387376888252Smrgelse 387476888252Smrg echo "libtool.m4: error: problem compiling $1 test program" 387576888252Smrgfi 387676888252Smrg 387776888252Smrg$rm -f confest.$objext 387876888252Smrg 387976888252Smrg# PORTME: override above test on systems where it is broken 388076888252Smrgifelse([$1],[CXX], 388176888252Smrg[case $host_os in 388276888252Smrginterix3*) 388376888252Smrg # Interix 3.5 installs completely hosed .la files for C++, so rather than 388476888252Smrg # hack all around it, let's just trust "g++" to DTRT. 388576888252Smrg _LT_AC_TAGVAR(predep_objects,$1)= 388676888252Smrg _LT_AC_TAGVAR(postdep_objects,$1)= 388776888252Smrg _LT_AC_TAGVAR(postdeps,$1)= 388876888252Smrg ;; 388976888252Smrg 389076888252Smrgsolaris*) 389176888252Smrg case $cc_basename in 389276888252Smrg CC*) 389376888252Smrg # Adding this requires a known-good setup of shared libraries for 389476888252Smrg # Sun compiler versions before 5.6, else PIC objects from an old 389576888252Smrg # archive will be linked into the output, leading to subtle bugs. 389676888252Smrg _LT_AC_TAGVAR(postdeps,$1)='-lCstd -lCrun' 389776888252Smrg ;; 389876888252Smrg esac 389976888252Smrg ;; 390076888252Smrgesac 390176888252Smrg]) 390276888252Smrg 390376888252Smrgcase " $_LT_AC_TAGVAR(postdeps, $1) " in 390476888252Smrg*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;; 390576888252Smrgesac 390676888252Smrg])# AC_LIBTOOL_POSTDEP_PREDEP 390776888252Smrg 390876888252Smrg# AC_LIBTOOL_LANG_F77_CONFIG 390976888252Smrg# -------------------------- 391076888252Smrg# Ensure that the configuration vars for the C compiler are 391176888252Smrg# suitably defined. Those variables are subsequently used by 391276888252Smrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 391376888252SmrgAC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)]) 391476888252SmrgAC_DEFUN([_LT_AC_LANG_F77_CONFIG], 391576888252Smrg[AC_REQUIRE([AC_PROG_F77]) 391676888252SmrgAC_LANG_PUSH(Fortran 77) 391776888252Smrg 391876888252Smrg_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 391976888252Smrg_LT_AC_TAGVAR(allow_undefined_flag, $1)= 392076888252Smrg_LT_AC_TAGVAR(always_export_symbols, $1)=no 392176888252Smrg_LT_AC_TAGVAR(archive_expsym_cmds, $1)= 392276888252Smrg_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= 392376888252Smrg_LT_AC_TAGVAR(hardcode_direct, $1)=no 392476888252Smrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= 392576888252Smrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 392676888252Smrg_LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 392776888252Smrg_LT_AC_TAGVAR(hardcode_minus_L, $1)=no 392876888252Smrg_LT_AC_TAGVAR(hardcode_automatic, $1)=no 392976888252Smrg_LT_AC_TAGVAR(module_cmds, $1)= 393076888252Smrg_LT_AC_TAGVAR(module_expsym_cmds, $1)= 393176888252Smrg_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown 393276888252Smrg_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 393376888252Smrg_LT_AC_TAGVAR(no_undefined_flag, $1)= 393476888252Smrg_LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 393576888252Smrg_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no 393676888252Smrg 393776888252Smrg# Source file extension for f77 test sources. 393876888252Smrgac_ext=f 393976888252Smrg 394076888252Smrg# Object file extension for compiled f77 test sources. 394176888252Smrgobjext=o 394276888252Smrg_LT_AC_TAGVAR(objext, $1)=$objext 394376888252Smrg 394476888252Smrg# Code to be used in simple compile tests 394576888252Smrglt_simple_compile_test_code=" subroutine t\n return\n end\n" 394676888252Smrg 394776888252Smrg# Code to be used in simple link tests 394876888252Smrglt_simple_link_test_code=" program t\n end\n" 394976888252Smrg 395076888252Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 395176888252Smrg_LT_AC_SYS_COMPILER 395276888252Smrg 395376888252Smrg# save warnings/boilerplate of simple test code 395476888252Smrg_LT_COMPILER_BOILERPLATE 395576888252Smrg_LT_LINKER_BOILERPLATE 395676888252Smrg 395776888252Smrg# Allow CC to be a program name with arguments. 395876888252Smrglt_save_CC="$CC" 395976888252SmrgCC=${F77-"f77"} 396076888252Smrgcompiler=$CC 396176888252Smrg_LT_AC_TAGVAR(compiler, $1)=$CC 396276888252Smrg_LT_CC_BASENAME([$compiler]) 396376888252Smrg 396476888252SmrgAC_MSG_CHECKING([if libtool supports shared libraries]) 396576888252SmrgAC_MSG_RESULT([$can_build_shared]) 396676888252Smrg 396776888252SmrgAC_MSG_CHECKING([whether to build shared libraries]) 396876888252Smrgtest "$can_build_shared" = "no" && enable_shared=no 396976888252Smrg 397076888252Smrg# On AIX, shared libraries and static libraries use the same namespace, and 397176888252Smrg# are all built from PIC. 397276888252Smrgcase $host_os in 397376888252Smrgaix3*) 397476888252Smrg test "$enable_shared" = yes && enable_static=no 397576888252Smrg if test -n "$RANLIB"; then 397676888252Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 397776888252Smrg postinstall_cmds='$RANLIB $lib' 397876888252Smrg fi 397976888252Smrg ;; 398076888252Smrgaix4* | aix5*) 398176888252Smrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 398276888252Smrg test "$enable_shared" = yes && enable_static=no 398376888252Smrg fi 398476888252Smrg ;; 398576888252Smrgesac 398676888252SmrgAC_MSG_RESULT([$enable_shared]) 398776888252Smrg 398876888252SmrgAC_MSG_CHECKING([whether to build static libraries]) 398976888252Smrg# Make sure either enable_shared or enable_static is yes. 399076888252Smrgtest "$enable_shared" = yes || enable_static=yes 399176888252SmrgAC_MSG_RESULT([$enable_static]) 399276888252Smrg 399376888252Smrg_LT_AC_TAGVAR(GCC, $1)="$G77" 399476888252Smrg_LT_AC_TAGVAR(LD, $1)="$LD" 399576888252Smrg 399676888252SmrgAC_LIBTOOL_PROG_COMPILER_PIC($1) 399776888252SmrgAC_LIBTOOL_PROG_CC_C_O($1) 399876888252SmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) 399976888252SmrgAC_LIBTOOL_PROG_LD_SHLIBS($1) 400076888252SmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1) 400176888252SmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) 400276888252Smrg 400376888252SmrgAC_LIBTOOL_CONFIG($1) 400476888252Smrg 400576888252SmrgAC_LANG_POP 400676888252SmrgCC="$lt_save_CC" 400776888252Smrg])# AC_LIBTOOL_LANG_F77_CONFIG 400876888252Smrg 400976888252Smrg 401076888252Smrg# AC_LIBTOOL_LANG_GCJ_CONFIG 401176888252Smrg# -------------------------- 401276888252Smrg# Ensure that the configuration vars for the C compiler are 401376888252Smrg# suitably defined. Those variables are subsequently used by 401476888252Smrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 401576888252SmrgAC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)]) 401676888252SmrgAC_DEFUN([_LT_AC_LANG_GCJ_CONFIG], 401776888252Smrg[AC_LANG_SAVE 401876888252Smrg 401976888252Smrg# Source file extension for Java test sources. 402076888252Smrgac_ext=java 402176888252Smrg 402276888252Smrg# Object file extension for compiled Java test sources. 402376888252Smrgobjext=o 402476888252Smrg_LT_AC_TAGVAR(objext, $1)=$objext 402576888252Smrg 402676888252Smrg# Code to be used in simple compile tests 402776888252Smrglt_simple_compile_test_code="class foo {}\n" 402876888252Smrg 402976888252Smrg# Code to be used in simple link tests 403076888252Smrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }\n' 403176888252Smrg 403276888252Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 403376888252Smrg_LT_AC_SYS_COMPILER 403476888252Smrg 403576888252Smrg# save warnings/boilerplate of simple test code 403676888252Smrg_LT_COMPILER_BOILERPLATE 403776888252Smrg_LT_LINKER_BOILERPLATE 403876888252Smrg 403976888252Smrg# Allow CC to be a program name with arguments. 404076888252Smrglt_save_CC="$CC" 404176888252SmrgCC=${GCJ-"gcj"} 404276888252Smrgcompiler=$CC 404376888252Smrg_LT_AC_TAGVAR(compiler, $1)=$CC 404476888252Smrg_LT_CC_BASENAME([$compiler]) 404576888252Smrg 404676888252Smrg# GCJ did not exist at the time GCC didn't implicitly link libc in. 404776888252Smrg_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 404876888252Smrg 404976888252Smrg_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 405076888252Smrg 405176888252SmrgAC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) 405276888252SmrgAC_LIBTOOL_PROG_COMPILER_PIC($1) 405376888252SmrgAC_LIBTOOL_PROG_CC_C_O($1) 405476888252SmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) 405576888252SmrgAC_LIBTOOL_PROG_LD_SHLIBS($1) 405676888252SmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1) 405776888252SmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) 405876888252Smrg 405976888252SmrgAC_LIBTOOL_CONFIG($1) 406076888252Smrg 406176888252SmrgAC_LANG_RESTORE 406276888252SmrgCC="$lt_save_CC" 406376888252Smrg])# AC_LIBTOOL_LANG_GCJ_CONFIG 406476888252Smrg 406576888252Smrg 406676888252Smrg# AC_LIBTOOL_LANG_RC_CONFIG 406776888252Smrg# ------------------------- 406876888252Smrg# Ensure that the configuration vars for the Windows resource compiler are 406976888252Smrg# suitably defined. Those variables are subsequently used by 407076888252Smrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 407176888252SmrgAC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)]) 407276888252SmrgAC_DEFUN([_LT_AC_LANG_RC_CONFIG], 407376888252Smrg[AC_LANG_SAVE 407476888252Smrg 407576888252Smrg# Source file extension for RC test sources. 407676888252Smrgac_ext=rc 407776888252Smrg 407876888252Smrg# Object file extension for compiled RC test sources. 407976888252Smrgobjext=o 408076888252Smrg_LT_AC_TAGVAR(objext, $1)=$objext 408176888252Smrg 408276888252Smrg# Code to be used in simple compile tests 408376888252Smrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n' 408476888252Smrg 408576888252Smrg# Code to be used in simple link tests 408676888252Smrglt_simple_link_test_code="$lt_simple_compile_test_code" 408776888252Smrg 408876888252Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 408976888252Smrg_LT_AC_SYS_COMPILER 409076888252Smrg 409176888252Smrg# save warnings/boilerplate of simple test code 409276888252Smrg_LT_COMPILER_BOILERPLATE 409376888252Smrg_LT_LINKER_BOILERPLATE 409476888252Smrg 409576888252Smrg# Allow CC to be a program name with arguments. 409676888252Smrglt_save_CC="$CC" 409776888252SmrgCC=${RC-"windres"} 409876888252Smrgcompiler=$CC 409976888252Smrg_LT_AC_TAGVAR(compiler, $1)=$CC 410076888252Smrg_LT_CC_BASENAME([$compiler]) 410176888252Smrg_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 410276888252Smrg 410376888252SmrgAC_LIBTOOL_CONFIG($1) 410476888252Smrg 410576888252SmrgAC_LANG_RESTORE 410676888252SmrgCC="$lt_save_CC" 410776888252Smrg])# AC_LIBTOOL_LANG_RC_CONFIG 410876888252Smrg 410976888252Smrg 411076888252Smrg# AC_LIBTOOL_CONFIG([TAGNAME]) 411176888252Smrg# ---------------------------- 411276888252Smrg# If TAGNAME is not passed, then create an initial libtool script 411376888252Smrg# with a default configuration from the untagged config vars. Otherwise 411476888252Smrg# add code to config.status for appending the configuration named by 411576888252Smrg# TAGNAME from the matching tagged config vars. 411676888252SmrgAC_DEFUN([AC_LIBTOOL_CONFIG], 411776888252Smrg[# The else clause should only fire when bootstrapping the 411876888252Smrg# libtool distribution, otherwise you forgot to ship ltmain.sh 411976888252Smrg# with your package, and you will get complaints that there are 412076888252Smrg# no rules to generate ltmain.sh. 412176888252Smrgif test -f "$ltmain"; then 412276888252Smrg # See if we are running on zsh, and set the options which allow our commands through 412376888252Smrg # without removal of \ escapes. 412476888252Smrg if test -n "${ZSH_VERSION+set}" ; then 412576888252Smrg setopt NO_GLOB_SUBST 412676888252Smrg fi 412776888252Smrg # Now quote all the things that may contain metacharacters while being 412876888252Smrg # careful not to overquote the AC_SUBSTed values. We take copies of the 412976888252Smrg # variables and quote the copies for generation of the libtool script. 413076888252Smrg for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ 413176888252Smrg SED SHELL STRIP \ 413276888252Smrg libname_spec library_names_spec soname_spec extract_expsyms_cmds \ 413376888252Smrg old_striplib striplib file_magic_cmd finish_cmds finish_eval \ 413476888252Smrg deplibs_check_method reload_flag reload_cmds need_locks \ 413576888252Smrg lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ 413676888252Smrg lt_cv_sys_global_symbol_to_c_name_address \ 413776888252Smrg sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ 413876888252Smrg old_postinstall_cmds old_postuninstall_cmds \ 413976888252Smrg _LT_AC_TAGVAR(compiler, $1) \ 414076888252Smrg _LT_AC_TAGVAR(CC, $1) \ 414176888252Smrg _LT_AC_TAGVAR(LD, $1) \ 414276888252Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \ 414376888252Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \ 414476888252Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \ 414576888252Smrg _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \ 414676888252Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \ 414776888252Smrg _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \ 414876888252Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \ 414976888252Smrg _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \ 415076888252Smrg _LT_AC_TAGVAR(old_archive_cmds, $1) \ 415176888252Smrg _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \ 415276888252Smrg _LT_AC_TAGVAR(predep_objects, $1) \ 415376888252Smrg _LT_AC_TAGVAR(postdep_objects, $1) \ 415476888252Smrg _LT_AC_TAGVAR(predeps, $1) \ 415576888252Smrg _LT_AC_TAGVAR(postdeps, $1) \ 415676888252Smrg _LT_AC_TAGVAR(compiler_lib_search_path, $1) \ 415776888252Smrg _LT_AC_TAGVAR(archive_cmds, $1) \ 415876888252Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1) \ 415976888252Smrg _LT_AC_TAGVAR(postinstall_cmds, $1) \ 416076888252Smrg _LT_AC_TAGVAR(postuninstall_cmds, $1) \ 416176888252Smrg _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \ 416276888252Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1) \ 416376888252Smrg _LT_AC_TAGVAR(no_undefined_flag, $1) \ 416476888252Smrg _LT_AC_TAGVAR(export_symbols_cmds, $1) \ 416576888252Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \ 416676888252Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \ 416776888252Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \ 416876888252Smrg _LT_AC_TAGVAR(hardcode_automatic, $1) \ 416976888252Smrg _LT_AC_TAGVAR(module_cmds, $1) \ 417076888252Smrg _LT_AC_TAGVAR(module_expsym_cmds, $1) \ 417176888252Smrg _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \ 417276888252Smrg _LT_AC_TAGVAR(exclude_expsyms, $1) \ 417376888252Smrg _LT_AC_TAGVAR(include_expsyms, $1); do 417476888252Smrg 417576888252Smrg case $var in 417676888252Smrg _LT_AC_TAGVAR(old_archive_cmds, $1) | \ 417776888252Smrg _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \ 417876888252Smrg _LT_AC_TAGVAR(archive_cmds, $1) | \ 417976888252Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \ 418076888252Smrg _LT_AC_TAGVAR(module_cmds, $1) | \ 418176888252Smrg _LT_AC_TAGVAR(module_expsym_cmds, $1) | \ 418276888252Smrg _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \ 418376888252Smrg _LT_AC_TAGVAR(export_symbols_cmds, $1) | \ 418476888252Smrg extract_expsyms_cmds | reload_cmds | finish_cmds | \ 418576888252Smrg postinstall_cmds | postuninstall_cmds | \ 418676888252Smrg old_postinstall_cmds | old_postuninstall_cmds | \ 418776888252Smrg sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) 418876888252Smrg # Double-quote double-evaled strings. 418976888252Smrg eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" 419076888252Smrg ;; 419176888252Smrg *) 419276888252Smrg eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" 419376888252Smrg ;; 419476888252Smrg esac 419576888252Smrg done 419676888252Smrg 419776888252Smrg case $lt_echo in 419876888252Smrg *'\[$]0 --fallback-echo"') 419976888252Smrg lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'` 420076888252Smrg ;; 420176888252Smrg esac 420276888252Smrg 420376888252Smrgifelse([$1], [], 420476888252Smrg [cfgfile="${ofile}T" 420576888252Smrg trap "$rm \"$cfgfile\"; exit 1" 1 2 15 420676888252Smrg $rm -f "$cfgfile" 420776888252Smrg AC_MSG_NOTICE([creating $ofile])], 420876888252Smrg [cfgfile="$ofile"]) 420976888252Smrg 421076888252Smrg cat <<__EOF__ >> "$cfgfile" 421176888252Smrgifelse([$1], [], 421276888252Smrg[#! $SHELL 421376888252Smrg 421476888252Smrg# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. 421576888252Smrg# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) 421676888252Smrg# NOTE: Changes made to this file will be lost: look at ltmain.sh. 421776888252Smrg# 421876888252Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 421976888252Smrg# Free Software Foundation, Inc. 422076888252Smrg# 422176888252Smrg# This file is part of GNU Libtool: 422276888252Smrg# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 422376888252Smrg# 422476888252Smrg# This program is free software; you can redistribute it and/or modify 422576888252Smrg# it under the terms of the GNU General Public License as published by 422676888252Smrg# the Free Software Foundation; either version 2 of the License, or 422776888252Smrg# (at your option) any later version. 422876888252Smrg# 422976888252Smrg# This program is distributed in the hope that it will be useful, but 423076888252Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 423176888252Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 423276888252Smrg# General Public License for more details. 423376888252Smrg# 423476888252Smrg# You should have received a copy of the GNU General Public License 423576888252Smrg# along with this program; if not, write to the Free Software 423676888252Smrg# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 423776888252Smrg# 423876888252Smrg# As a special exception to the GNU General Public License, if you 423976888252Smrg# distribute this file as part of a program that contains a 424076888252Smrg# configuration script generated by Autoconf, you may include it under 424176888252Smrg# the same distribution terms that you use for the rest of that program. 424276888252Smrg 424376888252Smrg# A sed program that does not truncate output. 424476888252SmrgSED=$lt_SED 424576888252Smrg 424676888252Smrg# Sed that helps us avoid accidentally triggering echo(1) options like -n. 424776888252SmrgXsed="$SED -e 1s/^X//" 424876888252Smrg 424976888252Smrg# The HP-UX ksh and POSIX shell print the target directory to stdout 425076888252Smrg# if CDPATH is set. 425176888252Smrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 425276888252Smrg 425376888252Smrg# The names of the tagged configurations supported by this script. 425476888252Smrgavailable_tags= 425576888252Smrg 425676888252Smrg# ### BEGIN LIBTOOL CONFIG], 425776888252Smrg[# ### BEGIN LIBTOOL TAG CONFIG: $tagname]) 425876888252Smrg 425976888252Smrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 426076888252Smrg 426176888252Smrg# Shell to use when invoking shell scripts. 426276888252SmrgSHELL=$lt_SHELL 426376888252Smrg 426476888252Smrg# Whether or not to build shared libraries. 426576888252Smrgbuild_libtool_libs=$enable_shared 426676888252Smrg 426776888252Smrg# Whether or not to build static libraries. 426876888252Smrgbuild_old_libs=$enable_static 426976888252Smrg 427076888252Smrg# Whether or not to add -lc for building shared libraries. 427176888252Smrgbuild_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1) 427276888252Smrg 427376888252Smrg# Whether or not to disallow shared libs when runtime libs are static 427476888252Smrgallow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) 427576888252Smrg 427676888252Smrg# Whether or not to optimize for fast installation. 427776888252Smrgfast_install=$enable_fast_install 427876888252Smrg 427976888252Smrg# The host system. 428076888252Smrghost_alias=$host_alias 428176888252Smrghost=$host 428276888252Smrghost_os=$host_os 428376888252Smrg 428476888252Smrg# The build system. 428576888252Smrgbuild_alias=$build_alias 428676888252Smrgbuild=$build 428776888252Smrgbuild_os=$build_os 428876888252Smrg 428976888252Smrg# An echo program that does not interpret backslashes. 429076888252Smrgecho=$lt_echo 429176888252Smrg 429276888252Smrg# The archiver. 429376888252SmrgAR=$lt_AR 429476888252SmrgAR_FLAGS=$lt_AR_FLAGS 429576888252Smrg 429676888252Smrg# A C compiler. 429776888252SmrgLTCC=$lt_LTCC 429876888252Smrg 429976888252Smrg# LTCC compiler flags. 430076888252SmrgLTCFLAGS=$lt_LTCFLAGS 430176888252Smrg 430276888252Smrg# A language-specific compiler. 430376888252SmrgCC=$lt_[]_LT_AC_TAGVAR(compiler, $1) 430476888252Smrg 430576888252Smrg# Is the compiler the GNU C compiler? 430676888252Smrgwith_gcc=$_LT_AC_TAGVAR(GCC, $1) 430776888252Smrg 430876888252Smrg# An ERE matcher. 430976888252SmrgEGREP=$lt_EGREP 431076888252Smrg 431176888252Smrg# The linker used to build libraries. 431276888252SmrgLD=$lt_[]_LT_AC_TAGVAR(LD, $1) 431376888252Smrg 431476888252Smrg# Whether we need hard or soft links. 431576888252SmrgLN_S=$lt_LN_S 431676888252Smrg 431776888252Smrg# A BSD-compatible nm program. 431876888252SmrgNM=$lt_NM 431976888252Smrg 432076888252Smrg# A symbol stripping program 432176888252SmrgSTRIP=$lt_STRIP 432276888252Smrg 432376888252Smrg# Used to examine libraries when file_magic_cmd begins "file" 432476888252SmrgMAGIC_CMD=$MAGIC_CMD 432576888252Smrg 432676888252Smrg# Used on cygwin: DLL creation program. 432776888252SmrgDLLTOOL="$DLLTOOL" 432876888252Smrg 432976888252Smrg# Used on cygwin: object dumper. 433076888252SmrgOBJDUMP="$OBJDUMP" 433176888252Smrg 433276888252Smrg# Used on cygwin: assembler. 433376888252SmrgAS="$AS" 433476888252Smrg 433576888252Smrg# The name of the directory that contains temporary libtool files. 433676888252Smrgobjdir=$objdir 433776888252Smrg 433876888252Smrg# How to create reloadable object files. 433976888252Smrgreload_flag=$lt_reload_flag 434076888252Smrgreload_cmds=$lt_reload_cmds 434176888252Smrg 434276888252Smrg# How to pass a linker flag through the compiler. 434376888252Smrgwl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) 434476888252Smrg 434576888252Smrg# Object file suffix (normally "o"). 434676888252Smrgobjext="$ac_objext" 434776888252Smrg 434876888252Smrg# Old archive suffix (normally "a"). 434976888252Smrglibext="$libext" 435076888252Smrg 435176888252Smrg# Shared library suffix (normally ".so"). 435276888252Smrgshrext_cmds='$shrext_cmds' 435376888252Smrg 435476888252Smrg# Executable file suffix (normally ""). 435576888252Smrgexeext="$exeext" 435676888252Smrg 435776888252Smrg# Additional compiler flags for building library objects. 435876888252Smrgpic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) 435976888252Smrgpic_mode=$pic_mode 436076888252Smrg 436176888252Smrg# What is the maximum length of a command? 436276888252Smrgmax_cmd_len=$lt_cv_sys_max_cmd_len 436376888252Smrg 436476888252Smrg# Does compiler simultaneously support -c and -o options? 436576888252Smrgcompiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) 436676888252Smrg 436776888252Smrg# Must we lock files when doing compilation? 436876888252Smrgneed_locks=$lt_need_locks 436976888252Smrg 437076888252Smrg# Do we need the lib prefix for modules? 437176888252Smrgneed_lib_prefix=$need_lib_prefix 437276888252Smrg 437376888252Smrg# Do we need a version for libraries? 437476888252Smrgneed_version=$need_version 437576888252Smrg 437676888252Smrg# Whether dlopen is supported. 437776888252Smrgdlopen_support=$enable_dlopen 437876888252Smrg 437976888252Smrg# Whether dlopen of programs is supported. 438076888252Smrgdlopen_self=$enable_dlopen_self 438176888252Smrg 438276888252Smrg# Whether dlopen of statically linked programs is supported. 438376888252Smrgdlopen_self_static=$enable_dlopen_self_static 438476888252Smrg 438576888252Smrg# Compiler flag to prevent dynamic linking. 438676888252Smrglink_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1) 438776888252Smrg 438876888252Smrg# Compiler flag to turn off builtin functions. 438976888252Smrgno_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) 439076888252Smrg 439176888252Smrg# Compiler flag to allow reflexive dlopens. 439276888252Smrgexport_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1) 439376888252Smrg 439476888252Smrg# Compiler flag to generate shared objects directly from archives. 439576888252Smrgwhole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1) 439676888252Smrg 439776888252Smrg# Compiler flag to generate thread-safe objects. 439876888252Smrgthread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1) 439976888252Smrg 440076888252Smrg# Library versioning type. 440176888252Smrgversion_type=$version_type 440276888252Smrg 440376888252Smrg# Format of library name prefix. 440476888252Smrglibname_spec=$lt_libname_spec 440576888252Smrg 440676888252Smrg# List of archive names. First name is the real one, the rest are links. 440776888252Smrg# The last name is the one that the linker finds with -lNAME. 440876888252Smrglibrary_names_spec=$lt_library_names_spec 440976888252Smrg 441076888252Smrg# The coded name of the library, if different from the real name. 441176888252Smrgsoname_spec=$lt_soname_spec 441276888252Smrg 441376888252Smrg# Commands used to build and install an old-style archive. 441476888252SmrgRANLIB=$lt_RANLIB 441576888252Smrgold_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1) 441676888252Smrgold_postinstall_cmds=$lt_old_postinstall_cmds 441776888252Smrgold_postuninstall_cmds=$lt_old_postuninstall_cmds 441876888252Smrg 441976888252Smrg# Create an old-style archive from a shared archive. 442076888252Smrgold_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1) 442176888252Smrg 442276888252Smrg# Create a temporary old-style archive to link instead of a shared archive. 442376888252Smrgold_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) 442476888252Smrg 442576888252Smrg# Commands used to build and install a shared archive. 442676888252Smrgarchive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1) 442776888252Smrgarchive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1) 442876888252Smrgpostinstall_cmds=$lt_postinstall_cmds 442976888252Smrgpostuninstall_cmds=$lt_postuninstall_cmds 443076888252Smrg 443176888252Smrg# Commands used to build a loadable module (assumed same as above if empty) 443276888252Smrgmodule_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1) 443376888252Smrgmodule_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1) 443476888252Smrg 443576888252Smrg# Commands to strip libraries. 443676888252Smrgold_striplib=$lt_old_striplib 443776888252Smrgstriplib=$lt_striplib 443876888252Smrg 443976888252Smrg# Dependencies to place before the objects being linked to create a 444076888252Smrg# shared library. 444176888252Smrgpredep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1) 444276888252Smrg 444376888252Smrg# Dependencies to place after the objects being linked to create a 444476888252Smrg# shared library. 444576888252Smrgpostdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1) 444676888252Smrg 444776888252Smrg# Dependencies to place before the objects being linked to create a 444876888252Smrg# shared library. 444976888252Smrgpredeps=$lt_[]_LT_AC_TAGVAR(predeps, $1) 445076888252Smrg 445176888252Smrg# Dependencies to place after the objects being linked to create a 445276888252Smrg# shared library. 445376888252Smrgpostdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1) 445476888252Smrg 445576888252Smrg# The library search path used internally by the compiler when linking 445676888252Smrg# a shared library. 445776888252Smrgcompiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1) 445876888252Smrg 445976888252Smrg# Method to check whether dependent libraries are shared objects. 446076888252Smrgdeplibs_check_method=$lt_deplibs_check_method 446176888252Smrg 446276888252Smrg# Command to use when deplibs_check_method == file_magic. 446376888252Smrgfile_magic_cmd=$lt_file_magic_cmd 446476888252Smrg 446576888252Smrg# Flag that allows shared libraries with undefined symbols to be built. 446676888252Smrgallow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1) 446776888252Smrg 446876888252Smrg# Flag that forces no undefined symbols. 446976888252Smrgno_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1) 447076888252Smrg 447176888252Smrg# Commands used to finish a libtool library installation in a directory. 447276888252Smrgfinish_cmds=$lt_finish_cmds 447376888252Smrg 447476888252Smrg# Same as above, but a single script fragment to be evaled but not shown. 447576888252Smrgfinish_eval=$lt_finish_eval 447676888252Smrg 447776888252Smrg# Take the output of nm and produce a listing of raw symbols and C names. 447876888252Smrgglobal_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe 447976888252Smrg 448076888252Smrg# Transform the output of nm in a proper C declaration 448176888252Smrgglobal_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl 448276888252Smrg 448376888252Smrg# Transform the output of nm in a C name address pair 448476888252Smrgglobal_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address 448576888252Smrg 448676888252Smrg# This is the shared library runtime path variable. 448776888252Smrgrunpath_var=$runpath_var 448876888252Smrg 448976888252Smrg# This is the shared library path variable. 449076888252Smrgshlibpath_var=$shlibpath_var 449176888252Smrg 449276888252Smrg# Is shlibpath searched before the hard-coded library search path? 449376888252Smrgshlibpath_overrides_runpath=$shlibpath_overrides_runpath 449476888252Smrg 449576888252Smrg# How to hardcode a shared library path into an executable. 449676888252Smrghardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1) 449776888252Smrg 449876888252Smrg# Whether we should hardcode library paths into libraries. 449976888252Smrghardcode_into_libs=$hardcode_into_libs 450076888252Smrg 450176888252Smrg# Flag to hardcode \$libdir into a binary during linking. 450276888252Smrg# This must work even if \$libdir does not exist. 450376888252Smrghardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) 450476888252Smrg 450576888252Smrg# If ld is used when linking, flag to hardcode \$libdir into 450676888252Smrg# a binary during linking. This must work even if \$libdir does 450776888252Smrg# not exist. 450876888252Smrghardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) 450976888252Smrg 451076888252Smrg# Whether we need a single -rpath flag with a separated argument. 451176888252Smrghardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1) 451276888252Smrg 451376888252Smrg# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the 451476888252Smrg# resulting binary. 451576888252Smrghardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1) 451676888252Smrg 451776888252Smrg# Set to yes if using the -LDIR flag during linking hardcodes DIR into the 451876888252Smrg# resulting binary. 451976888252Smrghardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1) 452076888252Smrg 452176888252Smrg# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into 452276888252Smrg# the resulting binary. 452376888252Smrghardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1) 452476888252Smrg 452576888252Smrg# Set to yes if building a shared library automatically hardcodes DIR into the library 452676888252Smrg# and all subsequent libraries and executables linked against it. 452776888252Smrghardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1) 452876888252Smrg 452976888252Smrg# Variables whose values should be saved in libtool wrapper scripts and 453076888252Smrg# restored at relink time. 453176888252Smrgvariables_saved_for_relink="$variables_saved_for_relink" 453276888252Smrg 453376888252Smrg# Whether libtool must link a program against all its dependency libraries. 453476888252Smrglink_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1) 453576888252Smrg 453676888252Smrg# Compile-time system search path for libraries 453776888252Smrgsys_lib_search_path_spec=$lt_sys_lib_search_path_spec 453876888252Smrg 453976888252Smrg# Run-time system search path for libraries 454076888252Smrgsys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec 454176888252Smrg 454276888252Smrg# Fix the shell variable \$srcfile for the compiler. 454376888252Smrgfix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)" 454476888252Smrg 454576888252Smrg# Set to yes if exported symbols are required. 454676888252Smrgalways_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1) 454776888252Smrg 454876888252Smrg# The commands to list exported symbols. 454976888252Smrgexport_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1) 455076888252Smrg 455176888252Smrg# The commands to extract the exported symbol list from a shared archive. 455276888252Smrgextract_expsyms_cmds=$lt_extract_expsyms_cmds 455376888252Smrg 455476888252Smrg# Symbols that should not be listed in the preloaded symbols. 455576888252Smrgexclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1) 455676888252Smrg 455776888252Smrg# Symbols that must always be exported. 455876888252Smrginclude_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1) 455976888252Smrg 456076888252Smrgifelse([$1],[], 456176888252Smrg[# ### END LIBTOOL CONFIG], 456276888252Smrg[# ### END LIBTOOL TAG CONFIG: $tagname]) 456376888252Smrg 456476888252Smrg__EOF__ 456576888252Smrg 456676888252Smrgifelse([$1],[], [ 456776888252Smrg case $host_os in 456876888252Smrg aix3*) 456976888252Smrg cat <<\EOF >> "$cfgfile" 457076888252Smrg 457176888252Smrg# AIX sometimes has problems with the GCC collect2 program. For some 457276888252Smrg# reason, if we set the COLLECT_NAMES environment variable, the problems 457376888252Smrg# vanish in a puff of smoke. 457476888252Smrgif test "X${COLLECT_NAMES+set}" != Xset; then 457576888252Smrg COLLECT_NAMES= 457676888252Smrg export COLLECT_NAMES 457776888252Smrgfi 457876888252SmrgEOF 457976888252Smrg ;; 458076888252Smrg esac 458176888252Smrg 458276888252Smrg # We use sed instead of cat because bash on DJGPP gets confused if 458376888252Smrg # if finds mixed CR/LF and LF-only lines. Since sed operates in 458476888252Smrg # text mode, it properly converts lines to CR/LF. This bash problem 458576888252Smrg # is reportedly fixed, but why not run on old versions too? 458676888252Smrg sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1) 458776888252Smrg 458876888252Smrg mv -f "$cfgfile" "$ofile" || \ 458976888252Smrg (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 459076888252Smrg chmod +x "$ofile" 459176888252Smrg]) 459276888252Smrgelse 459376888252Smrg # If there is no Makefile yet, we rely on a make rule to execute 459476888252Smrg # `config.status --recheck' to rerun these tests and create the 459576888252Smrg # libtool script then. 459676888252Smrg ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` 459776888252Smrg if test -f "$ltmain_in"; then 459876888252Smrg test -f Makefile && make "$ltmain" 459976888252Smrg fi 460076888252Smrgfi 460176888252Smrg])# AC_LIBTOOL_CONFIG 460276888252Smrg 460376888252Smrg 460476888252Smrg# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME]) 460576888252Smrg# ------------------------------------------- 460676888252SmrgAC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], 460776888252Smrg[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl 460876888252Smrg 460976888252Smrg_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 461076888252Smrg 461176888252Smrgif test "$GCC" = yes; then 461276888252Smrg _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 461376888252Smrg 461476888252Smrg AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 461576888252Smrg lt_cv_prog_compiler_rtti_exceptions, 461676888252Smrg [-fno-rtti -fno-exceptions], [], 461776888252Smrg [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 461876888252Smrgfi 461976888252Smrg])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI 462076888252Smrg 462176888252Smrg 462276888252Smrg# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE 462376888252Smrg# --------------------------------- 462476888252SmrgAC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], 462576888252Smrg[AC_REQUIRE([AC_CANONICAL_HOST]) 462676888252SmrgAC_REQUIRE([AC_PROG_NM]) 462776888252SmrgAC_REQUIRE([AC_OBJEXT]) 462876888252Smrg# Check for command to grab the raw symbol name followed by C symbol from nm. 462976888252SmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object]) 463076888252SmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 463176888252Smrg[ 463276888252Smrg# These are sane defaults that work on at least a few old systems. 463376888252Smrg# [They come from Ultrix. What could be older than Ultrix?!! ;)] 463476888252Smrg 463576888252Smrg# Character class describing NM global symbol codes. 463676888252Smrgsymcode='[[BCDEGRST]]' 463776888252Smrg 463876888252Smrg# Regexp to match symbols that can be accessed directly from C. 463976888252Smrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 464076888252Smrg 464176888252Smrg# Transform an extracted symbol line into a proper C declaration 464276888252Smrglt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'" 464376888252Smrg 464476888252Smrg# Transform an extracted symbol line into symbol name and symbol address 464576888252Smrglt_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'" 464676888252Smrg 464776888252Smrg# Define system-specific variables. 464876888252Smrgcase $host_os in 464976888252Smrgaix*) 465076888252Smrg symcode='[[BCDT]]' 465176888252Smrg ;; 465276888252Smrgcygwin* | mingw* | pw32*) 465376888252Smrg symcode='[[ABCDGISTW]]' 465476888252Smrg ;; 465576888252Smrghpux*) # Its linker distinguishes data from code symbols 465676888252Smrg if test "$host_cpu" = ia64; then 465776888252Smrg symcode='[[ABCDEGRST]]' 465876888252Smrg fi 465976888252Smrg lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 466076888252Smrg 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'" 466176888252Smrg ;; 466276888252Smrglinux*) 466376888252Smrg if test "$host_cpu" = ia64; then 466476888252Smrg symcode='[[ABCDGIRSTW]]' 466576888252Smrg lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 466676888252Smrg 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'" 466776888252Smrg fi 466876888252Smrg ;; 466976888252Smrgirix* | nonstopux*) 467076888252Smrg symcode='[[BCDEGRST]]' 467176888252Smrg ;; 467276888252Smrgosf*) 467376888252Smrg symcode='[[BCDEGQRST]]' 467476888252Smrg ;; 467576888252Smrgsolaris*) 467676888252Smrg symcode='[[BDRT]]' 467776888252Smrg ;; 467876888252Smrgsco3.2v5*) 467976888252Smrg symcode='[[DT]]' 468076888252Smrg ;; 468176888252Smrgsysv4.2uw2*) 468276888252Smrg symcode='[[DT]]' 468376888252Smrg ;; 468476888252Smrgsysv5* | sco5v6* | unixware* | OpenUNIX*) 468576888252Smrg symcode='[[ABDT]]' 468676888252Smrg ;; 468776888252Smrgsysv4) 468876888252Smrg symcode='[[DFNSTU]]' 468976888252Smrg ;; 469076888252Smrgesac 469176888252Smrg 469276888252Smrg# Handle CRLF in mingw tool chain 469376888252Smrgopt_cr= 469476888252Smrgcase $build_os in 469576888252Smrgmingw*) 469676888252Smrg opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp 469776888252Smrg ;; 469876888252Smrgesac 469976888252Smrg 470076888252Smrg# If we're using GNU nm, then use its standard symbol codes. 470176888252Smrgcase `$NM -V 2>&1` in 470276888252Smrg*GNU* | *'with BFD'*) 470376888252Smrg symcode='[[ABCDGIRSTW]]' ;; 470476888252Smrgesac 470576888252Smrg 470676888252Smrg# Try without a prefix undercore, then with it. 470776888252Smrgfor ac_symprfx in "" "_"; do 470876888252Smrg 470976888252Smrg # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 471076888252Smrg symxfrm="\\1 $ac_symprfx\\2 \\2" 471176888252Smrg 471276888252Smrg # Write the raw and C identifiers. 471376888252Smrg lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 471476888252Smrg 471576888252Smrg # Check to see that the pipe works correctly. 471676888252Smrg pipe_works=no 471776888252Smrg 471876888252Smrg rm -f conftest* 471976888252Smrg cat > conftest.$ac_ext <<EOF 472076888252Smrg#ifdef __cplusplus 472176888252Smrgextern "C" { 472276888252Smrg#endif 472376888252Smrgchar nm_test_var; 472476888252Smrgvoid nm_test_func(){} 472576888252Smrg#ifdef __cplusplus 472676888252Smrg} 472776888252Smrg#endif 472876888252Smrgint main(){nm_test_var='a';nm_test_func();return(0);} 472976888252SmrgEOF 473076888252Smrg 473176888252Smrg if AC_TRY_EVAL(ac_compile); then 473276888252Smrg # Now try to grab the symbols. 473376888252Smrg nlist=conftest.nm 473476888252Smrg if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then 473576888252Smrg # Try sorting and uniquifying the output. 473676888252Smrg if sort "$nlist" | uniq > "$nlist"T; then 473776888252Smrg mv -f "$nlist"T "$nlist" 473876888252Smrg else 473976888252Smrg rm -f "$nlist"T 474076888252Smrg fi 474176888252Smrg 474276888252Smrg # Make sure that we snagged all the symbols we need. 474376888252Smrg if grep ' nm_test_var$' "$nlist" >/dev/null; then 474476888252Smrg if grep ' nm_test_func$' "$nlist" >/dev/null; then 474576888252Smrg cat <<EOF > conftest.$ac_ext 474676888252Smrg#ifdef __cplusplus 474776888252Smrgextern "C" { 474876888252Smrg#endif 474976888252Smrg 475076888252SmrgEOF 475176888252Smrg # Now generate the symbol file. 475276888252Smrg eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' 475376888252Smrg 475476888252Smrg cat <<EOF >> conftest.$ac_ext 475576888252Smrg#if defined (__STDC__) && __STDC__ 475676888252Smrg# define lt_ptr_t void * 475776888252Smrg#else 475876888252Smrg# define lt_ptr_t char * 475976888252Smrg# define const 476076888252Smrg#endif 476176888252Smrg 476276888252Smrg/* The mapping between symbol names and symbols. */ 476376888252Smrgconst struct { 476476888252Smrg const char *name; 476576888252Smrg lt_ptr_t address; 476676888252Smrg} 476776888252Smrglt_preloaded_symbols[[]] = 476876888252Smrg{ 476976888252SmrgEOF 477076888252Smrg $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext 477176888252Smrg cat <<\EOF >> conftest.$ac_ext 477276888252Smrg {0, (lt_ptr_t) 0} 477376888252Smrg}; 477476888252Smrg 477576888252Smrg#ifdef __cplusplus 477676888252Smrg} 477776888252Smrg#endif 477876888252SmrgEOF 477976888252Smrg # Now try linking the two files. 478076888252Smrg mv conftest.$ac_objext conftstm.$ac_objext 478176888252Smrg lt_save_LIBS="$LIBS" 478276888252Smrg lt_save_CFLAGS="$CFLAGS" 478376888252Smrg LIBS="conftstm.$ac_objext" 478476888252Smrg CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 478576888252Smrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then 478676888252Smrg pipe_works=yes 478776888252Smrg fi 478876888252Smrg LIBS="$lt_save_LIBS" 478976888252Smrg CFLAGS="$lt_save_CFLAGS" 479076888252Smrg else 479176888252Smrg echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 479276888252Smrg fi 479376888252Smrg else 479476888252Smrg echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 479576888252Smrg fi 479676888252Smrg else 479776888252Smrg echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 479876888252Smrg fi 479976888252Smrg else 480076888252Smrg echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 480176888252Smrg cat conftest.$ac_ext >&5 480276888252Smrg fi 480376888252Smrg rm -f conftest* conftst* 480476888252Smrg 480576888252Smrg # Do not use the global_symbol_pipe unless it works. 480676888252Smrg if test "$pipe_works" = yes; then 480776888252Smrg break 480876888252Smrg else 480976888252Smrg lt_cv_sys_global_symbol_pipe= 481076888252Smrg fi 481176888252Smrgdone 481276888252Smrg]) 481376888252Smrgif test -z "$lt_cv_sys_global_symbol_pipe"; then 481476888252Smrg lt_cv_sys_global_symbol_to_cdecl= 481576888252Smrgfi 481676888252Smrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 481776888252Smrg AC_MSG_RESULT(failed) 481876888252Smrgelse 481976888252Smrg AC_MSG_RESULT(ok) 482076888252Smrgfi 482176888252Smrg]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE 482276888252Smrg 482376888252Smrg 482476888252Smrg# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME]) 482576888252Smrg# --------------------------------------- 482676888252SmrgAC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC], 482776888252Smrg[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)= 482876888252Smrg_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 482976888252Smrg_LT_AC_TAGVAR(lt_prog_compiler_static, $1)= 483076888252Smrg 483176888252SmrgAC_MSG_CHECKING([for $compiler option to produce PIC]) 483276888252Smrg ifelse([$1],[CXX],[ 483376888252Smrg # C++ specific cases for pic, static, wl, etc. 483476888252Smrg if test "$GXX" = yes; then 483576888252Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 483676888252Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' 483776888252Smrg 483876888252Smrg case $host_os in 483976888252Smrg aix*) 484076888252Smrg # All AIX code is PIC. 484176888252Smrg if test "$host_cpu" = ia64; then 484276888252Smrg # AIX 5 now supports IA64 processor 484376888252Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 484476888252Smrg fi 484576888252Smrg ;; 484676888252Smrg amigaos*) 484776888252Smrg # FIXME: we need at least 68020 code to build shared libraries, but 484876888252Smrg # adding the `-m68020' flag to GCC prevents building anything better, 484976888252Smrg # like `-m68040'. 485076888252Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 485176888252Smrg ;; 485276888252Smrg beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 485376888252Smrg # PIC is the default for these OSes. 485476888252Smrg ;; 485576888252Smrg mingw* | os2* | pw32*) 485676888252Smrg # This hack is so that the source file can tell whether it is being 485776888252Smrg # built for inclusion in a dll (and should export symbols for example). 485876888252Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' 485976888252Smrg ;; 486076888252Smrg darwin* | rhapsody*) 486176888252Smrg # PIC is the default on this platform 486276888252Smrg # Common symbols not allowed in MH_DYLIB files 486376888252Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 486476888252Smrg ;; 486576888252Smrg *djgpp*) 486676888252Smrg # DJGPP does not support shared libraries at all 486776888252Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 486876888252Smrg ;; 486976888252Smrg interix3*) 487076888252Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 487176888252Smrg # Instead, we relocate shared libraries at runtime. 487276888252Smrg ;; 487376888252Smrg sysv4*MP*) 487476888252Smrg if test -d /usr/nec; then 487576888252Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 487676888252Smrg fi 487776888252Smrg ;; 487876888252Smrg hpux*) 487976888252Smrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 488076888252Smrg # not for PA HP-UX. 488176888252Smrg case $host_cpu in 488276888252Smrg hppa*64*|ia64*) 488376888252Smrg ;; 488476888252Smrg *) 488576888252Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 488676888252Smrg ;; 488776888252Smrg esac 488876888252Smrg ;; 488976888252Smrg *) 489076888252Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 489176888252Smrg ;; 489276888252Smrg esac 489376888252Smrg else 489476888252Smrg case $host_os in 489576888252Smrg aix4* | aix5*) 489676888252Smrg # All AIX code is PIC. 489776888252Smrg if test "$host_cpu" = ia64; then 489876888252Smrg # AIX 5 now supports IA64 processor 489976888252Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 490076888252Smrg else 490176888252Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 490276888252Smrg fi 490376888252Smrg ;; 490476888252Smrg chorus*) 490576888252Smrg case $cc_basename in 490676888252Smrg cxch68*) 490776888252Smrg # Green Hills C++ Compiler 490876888252Smrg # _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" 490976888252Smrg ;; 491076888252Smrg esac 491176888252Smrg ;; 491276888252Smrg darwin*) 491376888252Smrg # PIC is the default on this platform 491476888252Smrg # Common symbols not allowed in MH_DYLIB files 491576888252Smrg case $cc_basename in 491676888252Smrg xlc*) 491776888252Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' 491876888252Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 491976888252Smrg ;; 492076888252Smrg esac 492176888252Smrg ;; 492276888252Smrg dgux*) 492376888252Smrg case $cc_basename in 492476888252Smrg ec++*) 492576888252Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 492676888252Smrg ;; 492776888252Smrg ghcx*) 492876888252Smrg # Green Hills C++ Compiler 492976888252Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 493076888252Smrg ;; 493176888252Smrg *) 493276888252Smrg ;; 493376888252Smrg esac 493476888252Smrg ;; 493576888252Smrg freebsd* | kfreebsd*-gnu | dragonfly*) 493676888252Smrg # FreeBSD uses GNU C++ 493776888252Smrg ;; 493876888252Smrg hpux9* | hpux10* | hpux11*) 493976888252Smrg case $cc_basename in 494076888252Smrg CC*) 494176888252Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 494276888252Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 494376888252Smrg if test "$host_cpu" != ia64; then 494476888252Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 494576888252Smrg fi 494676888252Smrg ;; 494776888252Smrg aCC*) 494876888252Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 494976888252Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 495076888252Smrg case $host_cpu in 495176888252Smrg hppa*64*|ia64*) 495276888252Smrg # +Z the default 495376888252Smrg ;; 495476888252Smrg *) 495576888252Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 495676888252Smrg ;; 495776888252Smrg esac 495876888252Smrg ;; 495976888252Smrg *) 496076888252Smrg ;; 496176888252Smrg esac 496276888252Smrg ;; 496376888252Smrg interix*) 496476888252Smrg # This is c89, which is MS Visual C++ (no shared libs) 496576888252Smrg # Anyone wants to do a port? 496676888252Smrg ;; 496776888252Smrg irix5* | irix6* | nonstopux*) 496876888252Smrg case $cc_basename in 496976888252Smrg CC*) 497076888252Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 497176888252Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 497276888252Smrg # CC pic flag -KPIC is the default. 497376888252Smrg ;; 497476888252Smrg *) 497576888252Smrg ;; 497676888252Smrg esac 497776888252Smrg ;; 497876888252Smrg linux*) 497976888252Smrg case $cc_basename in 498076888252Smrg KCC*) 498176888252Smrg # KAI C++ Compiler 498276888252Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 498376888252Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 498476888252Smrg ;; 498576888252Smrg icpc* | ecpc*) 498676888252Smrg # Intel C++ 498776888252Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 498876888252Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 498976888252Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' 499076888252Smrg ;; 499176888252Smrg pgCC*) 499276888252Smrg # Portland Group C++ compiler. 499376888252Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 499476888252Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 499576888252Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 499676888252Smrg ;; 499776888252Smrg cxx*) 499876888252Smrg # Compaq C++ 499976888252Smrg # Make sure the PIC flag is empty. It appears that all Alpha 500076888252Smrg # Linux and Compaq Tru64 Unix objects are PIC. 500176888252Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 500276888252Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 500376888252Smrg ;; 500476888252Smrg *) 500576888252Smrg ;; 500676888252Smrg esac 500776888252Smrg ;; 500876888252Smrg lynxos*) 500976888252Smrg ;; 501076888252Smrg m88k*) 501176888252Smrg ;; 501276888252Smrg mvs*) 501376888252Smrg case $cc_basename in 501476888252Smrg cxx*) 501576888252Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 501676888252Smrg ;; 501776888252Smrg *) 501876888252Smrg ;; 501976888252Smrg esac 502076888252Smrg ;; 502176888252Smrg netbsd*) 502276888252Smrg ;; 502376888252Smrg osf3* | osf4* | osf5*) 502476888252Smrg case $cc_basename in 502576888252Smrg KCC*) 502676888252Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 502776888252Smrg ;; 502876888252Smrg RCC*) 502976888252Smrg # Rational C++ 2.4.1 503076888252Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 503176888252Smrg ;; 503276888252Smrg cxx*) 503376888252Smrg # Digital/Compaq C++ 503476888252Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 503576888252Smrg # Make sure the PIC flag is empty. It appears that all Alpha 503676888252Smrg # Linux and Compaq Tru64 Unix objects are PIC. 503776888252Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 503876888252Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 503976888252Smrg ;; 504076888252Smrg *) 504176888252Smrg ;; 504276888252Smrg esac 504376888252Smrg ;; 504476888252Smrg psos*) 504576888252Smrg ;; 504676888252Smrg solaris*) 504776888252Smrg case $cc_basename in 504876888252Smrg CC*) 504976888252Smrg # Sun C++ 4.2, 5.x and Centerline C++ 505076888252Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 505176888252Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 505276888252Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 505376888252Smrg ;; 505476888252Smrg gcx*) 505576888252Smrg # Green Hills C++ Compiler 505676888252Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 505776888252Smrg ;; 505876888252Smrg *) 505976888252Smrg ;; 506076888252Smrg esac 506176888252Smrg ;; 506276888252Smrg sunos4*) 506376888252Smrg case $cc_basename in 506476888252Smrg CC*) 506576888252Smrg # Sun C++ 4.x 506676888252Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 506776888252Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 506876888252Smrg ;; 506976888252Smrg lcc*) 507076888252Smrg # Lucid 507176888252Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 507276888252Smrg ;; 507376888252Smrg *) 507476888252Smrg ;; 507576888252Smrg esac 507676888252Smrg ;; 507776888252Smrg tandem*) 507876888252Smrg case $cc_basename in 507976888252Smrg NCC*) 508076888252Smrg # NonStop-UX NCC 3.20 508176888252Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 508276888252Smrg ;; 508376888252Smrg *) 508476888252Smrg ;; 508576888252Smrg esac 508676888252Smrg ;; 508776888252Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 508876888252Smrg case $cc_basename in 508976888252Smrg CC*) 509076888252Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 509176888252Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 509276888252Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 509376888252Smrg ;; 509476888252Smrg esac 509576888252Smrg ;; 509676888252Smrg vxworks*) 509776888252Smrg ;; 509876888252Smrg *) 509976888252Smrg _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 510076888252Smrg ;; 510176888252Smrg esac 510276888252Smrg fi 510376888252Smrg], 510476888252Smrg[ 510576888252Smrg if test "$GCC" = yes; then 510676888252Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 510776888252Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' 510876888252Smrg 510976888252Smrg case $host_os in 511076888252Smrg aix*) 511176888252Smrg # All AIX code is PIC. 511276888252Smrg if test "$host_cpu" = ia64; then 511376888252Smrg # AIX 5 now supports IA64 processor 511476888252Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 511576888252Smrg fi 511676888252Smrg ;; 511776888252Smrg 511876888252Smrg amigaos*) 511976888252Smrg # FIXME: we need at least 68020 code to build shared libraries, but 512076888252Smrg # adding the `-m68020' flag to GCC prevents building anything better, 512176888252Smrg # like `-m68040'. 512276888252Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 512376888252Smrg ;; 512476888252Smrg 512576888252Smrg beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 512676888252Smrg # PIC is the default for these OSes. 512776888252Smrg ;; 512876888252Smrg 512976888252Smrg mingw* | pw32* | os2*) 513076888252Smrg # This hack is so that the source file can tell whether it is being 513176888252Smrg # built for inclusion in a dll (and should export symbols for example). 513276888252Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' 513376888252Smrg ;; 513476888252Smrg 513576888252Smrg darwin* | rhapsody*) 513676888252Smrg # PIC is the default on this platform 513776888252Smrg # Common symbols not allowed in MH_DYLIB files 513876888252Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 513976888252Smrg ;; 514076888252Smrg 514176888252Smrg interix3*) 514276888252Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 514376888252Smrg # Instead, we relocate shared libraries at runtime. 514476888252Smrg ;; 514576888252Smrg 514676888252Smrg msdosdjgpp*) 514776888252Smrg # Just because we use GCC doesn't mean we suddenly get shared libraries 514876888252Smrg # on systems that don't support them. 514976888252Smrg _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 515076888252Smrg enable_shared=no 515176888252Smrg ;; 515276888252Smrg 515376888252Smrg sysv4*MP*) 515476888252Smrg if test -d /usr/nec; then 515576888252Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 515676888252Smrg fi 515776888252Smrg ;; 515876888252Smrg 515976888252Smrg hpux*) 516076888252Smrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 516176888252Smrg # not for PA HP-UX. 516276888252Smrg case $host_cpu in 516376888252Smrg hppa*64*|ia64*) 516476888252Smrg # +Z the default 516576888252Smrg ;; 516676888252Smrg *) 516776888252Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 516876888252Smrg ;; 516976888252Smrg esac 517076888252Smrg ;; 517176888252Smrg 517276888252Smrg *) 517376888252Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 517476888252Smrg ;; 517576888252Smrg esac 517676888252Smrg else 517776888252Smrg # PORTME Check for flag to pass linker flags through the system compiler. 517876888252Smrg case $host_os in 517976888252Smrg aix*) 518076888252Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 518176888252Smrg if test "$host_cpu" = ia64; then 518276888252Smrg # AIX 5 now supports IA64 processor 518376888252Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 518476888252Smrg else 518576888252Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 518676888252Smrg fi 518776888252Smrg ;; 518876888252Smrg darwin*) 518976888252Smrg # PIC is the default on this platform 519076888252Smrg # Common symbols not allowed in MH_DYLIB files 519176888252Smrg case $cc_basename in 519276888252Smrg xlc*) 519376888252Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' 519476888252Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 519576888252Smrg ;; 519676888252Smrg esac 519776888252Smrg ;; 519876888252Smrg 519976888252Smrg mingw* | pw32* | os2*) 520076888252Smrg # This hack is so that the source file can tell whether it is being 520176888252Smrg # built for inclusion in a dll (and should export symbols for example). 520276888252Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' 520376888252Smrg ;; 520476888252Smrg 520576888252Smrg hpux9* | hpux10* | hpux11*) 520676888252Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 520776888252Smrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 520876888252Smrg # not for PA HP-UX. 520976888252Smrg case $host_cpu in 521076888252Smrg hppa*64*|ia64*) 521176888252Smrg # +Z the default 521276888252Smrg ;; 521376888252Smrg *) 521476888252Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 521576888252Smrg ;; 521676888252Smrg esac 521776888252Smrg # Is there a better lt_prog_compiler_static that works with the bundled CC? 521876888252Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 521976888252Smrg ;; 522076888252Smrg 522176888252Smrg irix5* | irix6* | nonstopux*) 522276888252Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 522376888252Smrg # PIC (with -KPIC) is the default. 522476888252Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 522576888252Smrg ;; 522676888252Smrg 522776888252Smrg newsos6) 522876888252Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 522976888252Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 523076888252Smrg ;; 523176888252Smrg 523276888252Smrg linux*) 523376888252Smrg case $cc_basename in 523476888252Smrg icc* | ecc*) 523576888252Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 523676888252Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 523776888252Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' 523876888252Smrg ;; 523976888252Smrg pgcc* | pgf77* | pgf90* | pgf95*) 524076888252Smrg # Portland Group compilers (*not* the Pentium gcc compiler, 524176888252Smrg # which looks to be a dead project) 524276888252Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 524376888252Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 524476888252Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 524576888252Smrg ;; 524676888252Smrg ccc*) 524776888252Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 524876888252Smrg # All Alpha code is PIC. 524976888252Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 525076888252Smrg ;; 525176888252Smrg esac 525276888252Smrg ;; 525376888252Smrg 525476888252Smrg osf3* | osf4* | osf5*) 525576888252Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 525676888252Smrg # All OSF/1 code is PIC. 525776888252Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 525876888252Smrg ;; 525976888252Smrg 526076888252Smrg solaris*) 526176888252Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 526276888252Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 526376888252Smrg case $cc_basename in 526476888252Smrg f77* | f90* | f95*) 526576888252Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 526676888252Smrg *) 526776888252Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 526876888252Smrg esac 526976888252Smrg ;; 527076888252Smrg 527176888252Smrg sunos4*) 527276888252Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 527376888252Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 527476888252Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 527576888252Smrg ;; 527676888252Smrg 527776888252Smrg sysv4 | sysv4.2uw2* | sysv4.3*) 527876888252Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 527976888252Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 528076888252Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 528176888252Smrg ;; 528276888252Smrg 528376888252Smrg sysv4*MP*) 528476888252Smrg if test -d /usr/nec ;then 528576888252Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 528676888252Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 528776888252Smrg fi 528876888252Smrg ;; 528976888252Smrg 529076888252Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 529176888252Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 529276888252Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 529376888252Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 529476888252Smrg ;; 529576888252Smrg 529676888252Smrg unicos*) 529776888252Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 529876888252Smrg _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 529976888252Smrg ;; 530076888252Smrg 530176888252Smrg uts4*) 530276888252Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 530376888252Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 530476888252Smrg ;; 530576888252Smrg 530676888252Smrg *) 530776888252Smrg _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 530876888252Smrg ;; 530976888252Smrg esac 531076888252Smrg fi 531176888252Smrg]) 531276888252SmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)]) 531376888252Smrg 531476888252Smrg# 531576888252Smrg# Check to make sure the PIC flag actually works. 531676888252Smrg# 531776888252Smrgif test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then 531876888252Smrg AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works], 531976888252Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1), 532076888252Smrg [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [], 532176888252Smrg [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in 532276888252Smrg "" | " "*) ;; 532376888252Smrg *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;; 532476888252Smrg esac], 532576888252Smrg [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 532676888252Smrg _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 532776888252Smrgfi 532876888252Smrgcase $host_os in 532976888252Smrg # For platforms which do not support PIC, -DPIC is meaningless: 533076888252Smrg *djgpp*) 533176888252Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 533276888252Smrg ;; 533376888252Smrg *) 533476888252Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])" 533576888252Smrg ;; 533676888252Smrgesac 533776888252Smrg 533876888252Smrg# 533976888252Smrg# Check to make sure the static flag actually works. 534076888252Smrg# 534176888252Smrgwl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\" 534276888252SmrgAC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 534376888252Smrg _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1), 534476888252Smrg $lt_tmp_static_flag, 534576888252Smrg [], 534676888252Smrg [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=]) 534776888252Smrg]) 534876888252Smrg 534976888252Smrg 535076888252Smrg# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME]) 535176888252Smrg# ------------------------------------ 535276888252Smrg# See if the linker supports building shared libraries. 535376888252SmrgAC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS], 535476888252Smrg[AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 535576888252Smrgifelse([$1],[CXX],[ 535676888252Smrg _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 535776888252Smrg case $host_os in 535876888252Smrg aix4* | aix5*) 535976888252Smrg # If we're using GNU nm, then we don't want the "-C" option. 536076888252Smrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 536176888252Smrg if $NM -V 2>&1 | grep 'GNU' > /dev/null; then 536276888252Smrg _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' 536376888252Smrg else 536476888252Smrg _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' 536576888252Smrg fi 536676888252Smrg ;; 536776888252Smrg pw32*) 536876888252Smrg _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" 536976888252Smrg ;; 537076888252Smrg cygwin* | mingw*) 537176888252Smrg _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' 537276888252Smrg ;; 537376888252Smrg *) 537476888252Smrg _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 537576888252Smrg ;; 537676888252Smrg esac 537776888252Smrg],[ 537876888252Smrg runpath_var= 537976888252Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)= 538076888252Smrg _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no 538176888252Smrg _LT_AC_TAGVAR(archive_cmds, $1)= 538276888252Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)= 538376888252Smrg _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)= 538476888252Smrg _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)= 538576888252Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= 538676888252Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 538776888252Smrg _LT_AC_TAGVAR(thread_safe_flag_spec, $1)= 538876888252Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= 538976888252Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 539076888252Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 539176888252Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 539276888252Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=no 539376888252Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 539476888252Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown 539576888252Smrg _LT_AC_TAGVAR(hardcode_automatic, $1)=no 539676888252Smrg _LT_AC_TAGVAR(module_cmds, $1)= 539776888252Smrg _LT_AC_TAGVAR(module_expsym_cmds, $1)= 539876888252Smrg _LT_AC_TAGVAR(always_export_symbols, $1)=no 539976888252Smrg _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 540076888252Smrg # include_expsyms should be a list of space-separated symbols to be *always* 540176888252Smrg # included in the symbol list 540276888252Smrg _LT_AC_TAGVAR(include_expsyms, $1)= 540376888252Smrg # exclude_expsyms can be an extended regexp of symbols to exclude 540476888252Smrg # it will be wrapped by ` (' and `)$', so one must not match beginning or 540576888252Smrg # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', 540676888252Smrg # as well as any symbol that contains `d'. 540776888252Smrg _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_" 540876888252Smrg # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 540976888252Smrg # platforms (ab)use it in PIC code, but their linkers get confused if 541076888252Smrg # the symbol is explicitly referenced. Since portable code cannot 541176888252Smrg # rely on this symbol name, it's probably fine to never include it in 541276888252Smrg # preloaded symbol tables. 541376888252Smrg extract_expsyms_cmds= 541476888252Smrg # Just being paranoid about ensuring that cc_basename is set. 541576888252Smrg _LT_CC_BASENAME([$compiler]) 541676888252Smrg case $host_os in 541776888252Smrg cygwin* | mingw* | pw32*) 541876888252Smrg # FIXME: the MSVC++ port hasn't been tested in a loooong time 541976888252Smrg # When not using gcc, we currently assume that we are using 542076888252Smrg # Microsoft Visual C++. 542176888252Smrg if test "$GCC" != yes; then 542276888252Smrg with_gnu_ld=no 542376888252Smrg fi 542476888252Smrg ;; 542576888252Smrg interix*) 542676888252Smrg # we just hope/assume this is gcc and not c89 (= MSVC++) 542776888252Smrg with_gnu_ld=yes 542876888252Smrg ;; 542976888252Smrg openbsd*) 543076888252Smrg with_gnu_ld=no 543176888252Smrg ;; 543276888252Smrg esac 543376888252Smrg 543476888252Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=yes 543576888252Smrg if test "$with_gnu_ld" = yes; then 543676888252Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 543776888252Smrg wlarc='${wl}' 543876888252Smrg 543976888252Smrg # Set some defaults for GNU ld with shared library support. These 544076888252Smrg # are reset later if shared libraries are not supported. Putting them 544176888252Smrg # here allows them to be overridden if necessary. 544276888252Smrg runpath_var=LD_RUN_PATH 544376888252Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 544476888252Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 544576888252Smrg # ancient GNU ld didn't support --whole-archive et. al. 544676888252Smrg if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then 544776888252Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 544876888252Smrg else 544976888252Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 545076888252Smrg fi 545176888252Smrg supports_anon_versioning=no 545276888252Smrg case `$LD -v 2>/dev/null` in 545376888252Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 545476888252Smrg *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 545576888252Smrg *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 545676888252Smrg *\ 2.11.*) ;; # other 2.11 versions 545776888252Smrg *) supports_anon_versioning=yes ;; 545876888252Smrg esac 545976888252Smrg 546076888252Smrg # See if GNU ld supports shared libraries. 546176888252Smrg case $host_os in 546276888252Smrg aix3* | aix4* | aix5*) 546376888252Smrg # On AIX/PPC, the GNU linker is very broken 546476888252Smrg if test "$host_cpu" != ia64; then 546576888252Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 546676888252Smrg cat <<EOF 1>&2 546776888252Smrg 546876888252Smrg*** Warning: the GNU linker, at least up to release 2.9.1, is reported 546976888252Smrg*** to be unable to reliably create shared libraries on AIX. 547076888252Smrg*** Therefore, libtool is disabling shared libraries support. If you 547176888252Smrg*** really care for shared libraries, you may want to modify your PATH 547276888252Smrg*** so that a non-GNU linker is found, and then restart. 547376888252Smrg 547476888252SmrgEOF 547576888252Smrg fi 547676888252Smrg ;; 547776888252Smrg 547876888252Smrg amigaos*) 547976888252Smrg _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)' 548076888252Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 548176888252Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 548276888252Smrg 548376888252Smrg # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports 548476888252Smrg # that the semantics of dynamic libraries on AmigaOS, at least up 548576888252Smrg # to version 4, is to share data among multiple programs linked 548676888252Smrg # with the same dynamic library. Since this doesn't match the 548776888252Smrg # behavior of shared libraries on other platforms, we can't use 548876888252Smrg # them. 548976888252Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 549076888252Smrg ;; 549176888252Smrg 549276888252Smrg beos*) 549376888252Smrg if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 549476888252Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 549576888252Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 549676888252Smrg # support --undefined. This deserves some investigation. FIXME 549776888252Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 549876888252Smrg else 549976888252Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 550076888252Smrg fi 550176888252Smrg ;; 550276888252Smrg 550376888252Smrg cygwin* | mingw* | pw32*) 550476888252Smrg # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 550576888252Smrg # as there is no search path for DLLs. 550676888252Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 550776888252Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 550876888252Smrg _LT_AC_TAGVAR(always_export_symbols, $1)=no 550976888252Smrg _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 551076888252Smrg _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' 551176888252Smrg 551276888252Smrg if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then 551376888252Smrg _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' 551476888252Smrg # If the export-symbols file already is a .def file (1st line 551576888252Smrg # is EXPORTS), use it as is; otherwise, prepend... 551676888252Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 551776888252Smrg cp $export_symbols $output_objdir/$soname.def; 551876888252Smrg else 551976888252Smrg echo EXPORTS > $output_objdir/$soname.def; 552076888252Smrg cat $export_symbols >> $output_objdir/$soname.def; 552176888252Smrg fi~ 552276888252Smrg $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 552376888252Smrg else 552476888252Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 552576888252Smrg fi 552676888252Smrg ;; 552776888252Smrg 552876888252Smrg interix3*) 552976888252Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 553076888252Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 553176888252Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 553276888252Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 553376888252Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 553476888252Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 553576888252Smrg # default) and relocated if they conflict, which is a slow very memory 553676888252Smrg # consuming and fragmenting process. To avoid this, we pick a random, 553776888252Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 553876888252Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 553976888252Smrg _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' 554076888252Smrg _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' 554176888252Smrg ;; 554276888252Smrg 554376888252Smrg linux*) 554476888252Smrg if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 554576888252Smrg tmp_addflag= 554676888252Smrg case $cc_basename,$host_cpu in 554776888252Smrg pgcc*) # Portland Group C compiler 554876888252Smrg _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' 554976888252Smrg tmp_addflag=' $pic_flag' 555076888252Smrg ;; 555176888252Smrg pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers 555276888252Smrg _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' 555376888252Smrg tmp_addflag=' $pic_flag -Mnomain' ;; 555476888252Smrg ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 555576888252Smrg tmp_addflag=' -i_dynamic' ;; 555676888252Smrg efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 555776888252Smrg tmp_addflag=' -i_dynamic -nofor_main' ;; 555876888252Smrg ifc* | ifort*) # Intel Fortran compiler 555976888252Smrg tmp_addflag=' -nofor_main' ;; 556076888252Smrg esac 556176888252Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 556276888252Smrg 556376888252Smrg if test $supports_anon_versioning = yes; then 556476888252Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~ 556576888252Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 556676888252Smrg $echo "local: *; };" >> $output_objdir/$libname.ver~ 556776888252Smrg $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 556876888252Smrg fi 556976888252Smrg else 557076888252Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 557176888252Smrg fi 557276888252Smrg ;; 557376888252Smrg 557476888252Smrg netbsd*) 557576888252Smrg if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then 557676888252Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 557776888252Smrg wlarc= 557876888252Smrg else 557976888252Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 558076888252Smrg _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' 558176888252Smrg fi 558276888252Smrg ;; 558376888252Smrg 558476888252Smrg solaris*) 558576888252Smrg if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then 558676888252Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 558776888252Smrg cat <<EOF 1>&2 558876888252Smrg 558976888252Smrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably 559076888252Smrg*** create shared libraries on Solaris systems. Therefore, libtool 559176888252Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 559276888252Smrg*** binutils to release 2.9.1 or newer. Another option is to modify 559376888252Smrg*** your PATH or compiler configuration so that the native linker is 559476888252Smrg*** used, and then restart. 559576888252Smrg 559676888252SmrgEOF 559776888252Smrg elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 559876888252Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 559976888252Smrg _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' 560076888252Smrg else 560176888252Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 560276888252Smrg fi 560376888252Smrg ;; 560476888252Smrg 560576888252Smrg sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 560676888252Smrg case `$LD -v 2>&1` in 560776888252Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 560876888252Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 560976888252Smrg cat <<_LT_EOF 1>&2 561076888252Smrg 561176888252Smrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not 561276888252Smrg*** reliably create shared libraries on SCO systems. Therefore, libtool 561376888252Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 561476888252Smrg*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 561576888252Smrg*** your PATH or compiler configuration so that the native linker is 561676888252Smrg*** used, and then restart. 561776888252Smrg 561876888252Smrg_LT_EOF 561976888252Smrg ;; 562076888252Smrg *) 562176888252Smrg if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 562276888252Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' 562376888252Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' 562476888252Smrg _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' 562576888252Smrg else 562676888252Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 562776888252Smrg fi 562876888252Smrg ;; 562976888252Smrg esac 563076888252Smrg ;; 563176888252Smrg 563276888252Smrg sunos4*) 563376888252Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 563476888252Smrg wlarc= 563576888252Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 563676888252Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 563776888252Smrg ;; 563876888252Smrg 563976888252Smrg *) 564076888252Smrg if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 564176888252Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 564276888252Smrg _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' 564376888252Smrg else 564476888252Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 564576888252Smrg fi 564676888252Smrg ;; 564776888252Smrg esac 564876888252Smrg 564976888252Smrg if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then 565076888252Smrg runpath_var= 565176888252Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= 565276888252Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= 565376888252Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 565476888252Smrg fi 565576888252Smrg else 565676888252Smrg # PORTME fill in a description of your system's linker (not GNU ld) 565776888252Smrg case $host_os in 565876888252Smrg aix3*) 565976888252Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 566076888252Smrg _LT_AC_TAGVAR(always_export_symbols, $1)=yes 566176888252Smrg _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' 566276888252Smrg # Note: this linker hardcodes the directories in LIBPATH if there 566376888252Smrg # are no directories specified by -L. 566476888252Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 566576888252Smrg if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then 566676888252Smrg # Neither direct hardcoding nor static linking is supported with a 566776888252Smrg # broken collect2. 566876888252Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported 566976888252Smrg fi 567076888252Smrg ;; 567176888252Smrg 567276888252Smrg aix4* | aix5*) 567376888252Smrg if test "$host_cpu" = ia64; then 567476888252Smrg # On IA64, the linker does run time linking by default, so we don't 567576888252Smrg # have to do anything special. 567676888252Smrg aix_use_runtimelinking=no 567776888252Smrg exp_sym_flag='-Bexport' 567876888252Smrg no_entry_flag="" 567976888252Smrg else 568076888252Smrg # If we're using GNU nm, then we don't want the "-C" option. 568176888252Smrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 568276888252Smrg if $NM -V 2>&1 | grep 'GNU' > /dev/null; then 568376888252Smrg _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' 568476888252Smrg else 568576888252Smrg _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' 568676888252Smrg fi 568776888252Smrg aix_use_runtimelinking=no 568876888252Smrg 568976888252Smrg # Test if we are trying to use run time linking or normal 569076888252Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 569176888252Smrg # need to do runtime linking. 569276888252Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*) 569376888252Smrg for ld_flag in $LDFLAGS; do 569476888252Smrg if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then 569576888252Smrg aix_use_runtimelinking=yes 569676888252Smrg break 569776888252Smrg fi 569876888252Smrg done 569976888252Smrg ;; 570076888252Smrg esac 570176888252Smrg 570276888252Smrg exp_sym_flag='-bexport' 570376888252Smrg no_entry_flag='-bnoentry' 570476888252Smrg fi 570576888252Smrg 570676888252Smrg # When large executables or shared objects are built, AIX ld can 570776888252Smrg # have problems creating the table of contents. If linking a library 570876888252Smrg # or program results in "error TOC overflow" add -mminimal-toc to 570976888252Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 571076888252Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 571176888252Smrg 571276888252Smrg _LT_AC_TAGVAR(archive_cmds, $1)='' 571376888252Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 571476888252Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' 571576888252Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 571676888252Smrg 571776888252Smrg if test "$GCC" = yes; then 571876888252Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 571976888252Smrg # We only want to do this on AIX 4.2 and lower, the check 572076888252Smrg # below for broken collect2 doesn't work under 4.3+ 572176888252Smrg collect2name=`${CC} -print-prog-name=collect2` 572276888252Smrg if test -f "$collect2name" && \ 572376888252Smrg strings "$collect2name" | grep resolve_lib_name >/dev/null 572476888252Smrg then 572576888252Smrg # We have reworked collect2 572676888252Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 572776888252Smrg else 572876888252Smrg # We have old collect2 572976888252Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported 573076888252Smrg # It fails to find uninstalled libraries when the uninstalled 573176888252Smrg # path is not listed in the libpath. Setting hardcode_minus_L 573276888252Smrg # to unsupported forces relinking 573376888252Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 573476888252Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 573576888252Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 573676888252Smrg fi 573776888252Smrg ;; 573876888252Smrg esac 573976888252Smrg shared_flag='-shared' 574076888252Smrg if test "$aix_use_runtimelinking" = yes; then 574176888252Smrg shared_flag="$shared_flag "'${wl}-G' 574276888252Smrg fi 574376888252Smrg else 574476888252Smrg # not using gcc 574576888252Smrg if test "$host_cpu" = ia64; then 574676888252Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 574776888252Smrg # chokes on -Wl,-G. The following line is correct: 574876888252Smrg shared_flag='-G' 574976888252Smrg else 575076888252Smrg if test "$aix_use_runtimelinking" = yes; then 575176888252Smrg shared_flag='${wl}-G' 575276888252Smrg else 575376888252Smrg shared_flag='${wl}-bM:SRE' 575476888252Smrg fi 575576888252Smrg fi 575676888252Smrg fi 575776888252Smrg 575876888252Smrg # It seems that -bexpall does not export symbols beginning with 575976888252Smrg # underscore (_), so it is better to generate a list of symbols to export. 576076888252Smrg _LT_AC_TAGVAR(always_export_symbols, $1)=yes 576176888252Smrg if test "$aix_use_runtimelinking" = yes; then 576276888252Smrg # Warning - without using the other runtime loading flags (-brtl), 576376888252Smrg # -berok will link without error, but may produce a broken library. 576476888252Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' 576576888252Smrg # Determine the default libpath from the value encoded in an empty executable. 576676888252Smrg _LT_AC_SYS_LIBPATH_AIX 576776888252Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 576876888252Smrg _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" 576976888252Smrg else 577076888252Smrg if test "$host_cpu" = ia64; then 577176888252Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 577276888252Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 577376888252Smrg _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" 577476888252Smrg else 577576888252Smrg # Determine the default libpath from the value encoded in an empty executable. 577676888252Smrg _LT_AC_SYS_LIBPATH_AIX 577776888252Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 577876888252Smrg # Warning - without using the other run time loading flags, 577976888252Smrg # -berok will link without error, but may produce a broken library. 578076888252Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 578176888252Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 578276888252Smrg # Exported symbols can be pulled into shared objects from archives 578376888252Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 578476888252Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes 578576888252Smrg # This is similar to how AIX traditionally builds its shared libraries. 578676888252Smrg _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' 578776888252Smrg fi 578876888252Smrg fi 578976888252Smrg ;; 579076888252Smrg 579176888252Smrg amigaos*) 579276888252Smrg _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)' 579376888252Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 579476888252Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 579576888252Smrg # see comment about different semantics on the GNU ld section 579676888252Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 579776888252Smrg ;; 579876888252Smrg 579976888252Smrg bsdi[[45]]*) 580076888252Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 580176888252Smrg ;; 580276888252Smrg 580376888252Smrg cygwin* | mingw* | pw32*) 580476888252Smrg # When not using gcc, we currently assume that we are using 580576888252Smrg # Microsoft Visual C++. 580676888252Smrg # hardcode_libdir_flag_spec is actually meaningless, as there is 580776888252Smrg # no search path for DLLs. 580876888252Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 580976888252Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 581076888252Smrg # Tell ltmain to make .lib files, not .a files. 581176888252Smrg libext=lib 581276888252Smrg # Tell ltmain to make .dll files, not .so files. 581376888252Smrg shrext_cmds=".dll" 581476888252Smrg # FIXME: Setting linknames here is a bad hack. 581576888252Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' 581676888252Smrg # The linker will automatically build a .lib file if we build a DLL. 581776888252Smrg _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true' 581876888252Smrg # FIXME: Should let the user specify the lib program. 581976888252Smrg _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs' 582076888252Smrg _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' 582176888252Smrg _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 582276888252Smrg ;; 582376888252Smrg 582476888252Smrg darwin* | rhapsody*) 582576888252Smrg case $host_os in 582676888252Smrg rhapsody* | darwin1.[[012]]) 582776888252Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' 582876888252Smrg ;; 582976888252Smrg *) # Darwin 1.3 on 583076888252Smrg if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then 583176888252Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' 583276888252Smrg else 583376888252Smrg case ${MACOSX_DEPLOYMENT_TARGET} in 583476888252Smrg 10.[[012]]) 583576888252Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' 583676888252Smrg ;; 583776888252Smrg 10.*) 583876888252Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup' 583976888252Smrg ;; 584076888252Smrg esac 584176888252Smrg fi 584276888252Smrg ;; 584376888252Smrg esac 584476888252Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 584576888252Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 584676888252Smrg _LT_AC_TAGVAR(hardcode_automatic, $1)=yes 584776888252Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 584876888252Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' 584976888252Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 585076888252Smrg if test "$GCC" = yes ; then 585176888252Smrg output_verbose_link_cmd='echo' 585276888252Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' 585376888252Smrg _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' 585476888252Smrg # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds 585576888252Smrg _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}' 585676888252Smrg _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}' 585776888252Smrg else 585876888252Smrg case $cc_basename in 585976888252Smrg xlc*) 586076888252Smrg output_verbose_link_cmd='echo' 586176888252Smrg _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' 586276888252Smrg _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' 586376888252Smrg # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds 586476888252Smrg _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}' 586576888252Smrg _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}' 586676888252Smrg ;; 586776888252Smrg *) 586876888252Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 586976888252Smrg ;; 587076888252Smrg esac 587176888252Smrg fi 587276888252Smrg ;; 587376888252Smrg 587476888252Smrg dgux*) 587576888252Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 587676888252Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 587776888252Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 587876888252Smrg ;; 587976888252Smrg 588076888252Smrg freebsd1*) 588176888252Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 588276888252Smrg ;; 588376888252Smrg 588476888252Smrg # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 588576888252Smrg # support. Future versions do this automatically, but an explicit c++rt0.o 588676888252Smrg # does not break anything, and helps significantly (at the cost of a little 588776888252Smrg # extra space). 588876888252Smrg freebsd2.2*) 588976888252Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 589076888252Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 589176888252Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 589276888252Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 589376888252Smrg ;; 589476888252Smrg 589576888252Smrg # Unfortunately, older versions of FreeBSD 2 do not have this feature. 589676888252Smrg freebsd2*) 589776888252Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 589876888252Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 589976888252Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 590076888252Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 590176888252Smrg ;; 590276888252Smrg 590376888252Smrg # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 590476888252Smrg freebsd* | kfreebsd*-gnu | dragonfly*) 590576888252Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' 590676888252Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 590776888252Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 590876888252Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 590976888252Smrg ;; 591076888252Smrg 591176888252Smrg hpux9*) 591276888252Smrg if test "$GCC" = yes; then 591376888252Smrg _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' 591476888252Smrg else 591576888252Smrg _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' 591676888252Smrg fi 591776888252Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 591876888252Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 591976888252Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 592076888252Smrg 592176888252Smrg # hardcode_minus_L: Not really in the search PATH, 592276888252Smrg # but as the default location of the library. 592376888252Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 592476888252Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 592576888252Smrg ;; 592676888252Smrg 592776888252Smrg hpux10*) 592876888252Smrg if test "$GCC" = yes -a "$with_gnu_ld" = no; then 592976888252Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 593076888252Smrg else 593176888252Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 593276888252Smrg fi 593376888252Smrg if test "$with_gnu_ld" = no; then 593476888252Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 593576888252Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 593676888252Smrg 593776888252Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 593876888252Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 593976888252Smrg 594076888252Smrg # hardcode_minus_L: Not really in the search PATH, 594176888252Smrg # but as the default location of the library. 594276888252Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 594376888252Smrg fi 594476888252Smrg ;; 594576888252Smrg 594676888252Smrg hpux11*) 594776888252Smrg if test "$GCC" = yes -a "$with_gnu_ld" = no; then 594876888252Smrg case $host_cpu in 594976888252Smrg hppa*64*) 595076888252Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 595176888252Smrg ;; 595276888252Smrg ia64*) 595376888252Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 595476888252Smrg ;; 595576888252Smrg *) 595676888252Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 595776888252Smrg ;; 595876888252Smrg esac 595976888252Smrg else 596076888252Smrg case $host_cpu in 596176888252Smrg hppa*64*) 596276888252Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 596376888252Smrg ;; 596476888252Smrg ia64*) 596576888252Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 596676888252Smrg ;; 596776888252Smrg *) 596876888252Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 596976888252Smrg ;; 597076888252Smrg esac 597176888252Smrg fi 597276888252Smrg if test "$with_gnu_ld" = no; then 597376888252Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 597476888252Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 597576888252Smrg 597676888252Smrg case $host_cpu in 597776888252Smrg hppa*64*|ia64*) 597876888252Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' 597976888252Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 598076888252Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 598176888252Smrg ;; 598276888252Smrg *) 598376888252Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 598476888252Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 598576888252Smrg 598676888252Smrg # hardcode_minus_L: Not really in the search PATH, 598776888252Smrg # but as the default location of the library. 598876888252Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 598976888252Smrg ;; 599076888252Smrg esac 599176888252Smrg fi 599276888252Smrg ;; 599376888252Smrg 599476888252Smrg irix5* | irix6* | nonstopux*) 599576888252Smrg if test "$GCC" = yes; then 599676888252Smrg _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' 599776888252Smrg else 599876888252Smrg _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' 599976888252Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' 600076888252Smrg fi 600176888252Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 600276888252Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 600376888252Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 600476888252Smrg ;; 600576888252Smrg 600676888252Smrg netbsd*) 600776888252Smrg if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then 600876888252Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 600976888252Smrg else 601076888252Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 601176888252Smrg fi 601276888252Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 601376888252Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 601476888252Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 601576888252Smrg ;; 601676888252Smrg 601776888252Smrg newsos6) 601876888252Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 601976888252Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 602076888252Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 602176888252Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 602276888252Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 602376888252Smrg ;; 602476888252Smrg 602576888252Smrg openbsd*) 602676888252Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 602776888252Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 602876888252Smrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 602976888252Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 603076888252Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' 603176888252Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 603276888252Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 603376888252Smrg else 603476888252Smrg case $host_os in 603576888252Smrg openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) 603676888252Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 603776888252Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 603876888252Smrg ;; 603976888252Smrg *) 604076888252Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 604176888252Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 604276888252Smrg ;; 604376888252Smrg esac 604476888252Smrg fi 604576888252Smrg ;; 604676888252Smrg 604776888252Smrg os2*) 604876888252Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 604976888252Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 605076888252Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 605176888252Smrg _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' 605276888252Smrg _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' 605376888252Smrg ;; 605476888252Smrg 605576888252Smrg osf3*) 605676888252Smrg if test "$GCC" = yes; then 605776888252Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 605876888252Smrg _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' 605976888252Smrg else 606076888252Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 606176888252Smrg _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' 606276888252Smrg fi 606376888252Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 606476888252Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 606576888252Smrg ;; 606676888252Smrg 606776888252Smrg osf4* | osf5*) # as osf3* with the addition of -msym flag 606876888252Smrg if test "$GCC" = yes; then 606976888252Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 607076888252Smrg _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' 607176888252Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 607276888252Smrg else 607376888252Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 607476888252Smrg _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' 607576888252Smrg _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~ 607676888252Smrg $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' 607776888252Smrg 607876888252Smrg # Both c and cxx compiler support -rpath directly 607976888252Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 608076888252Smrg fi 608176888252Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 608276888252Smrg ;; 608376888252Smrg 608476888252Smrg solaris*) 608576888252Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text' 608676888252Smrg if test "$GCC" = yes; then 608776888252Smrg wlarc='${wl}' 608876888252Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 608976888252Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 609076888252Smrg $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' 609176888252Smrg else 609276888252Smrg wlarc='' 609376888252Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' 609476888252Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 609576888252Smrg $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' 609676888252Smrg fi 609776888252Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 609876888252Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 609976888252Smrg case $host_os in 610076888252Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 610176888252Smrg *) 610276888252Smrg # The compiler driver will combine linker options so we 610376888252Smrg # cannot just pass the convience library names through 610476888252Smrg # without $wl, iff we do not link with $LD. 610576888252Smrg # Luckily, gcc supports the same syntax we need for Sun Studio. 610676888252Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 610776888252Smrg case $wlarc in 610876888252Smrg '') 610976888252Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; 611076888252Smrg *) 611176888252Smrg _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' ;; 611276888252Smrg esac ;; 611376888252Smrg esac 611476888252Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 611576888252Smrg ;; 611676888252Smrg 611776888252Smrg sunos4*) 611876888252Smrg if test "x$host_vendor" = xsequent; then 611976888252Smrg # Use $CC to link under sequent, because it throws in some extra .o 612076888252Smrg # files that make .init and .fini sections work. 612176888252Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' 612276888252Smrg else 612376888252Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 612476888252Smrg fi 612576888252Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 612676888252Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 612776888252Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 612876888252Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 612976888252Smrg ;; 613076888252Smrg 613176888252Smrg sysv4) 613276888252Smrg case $host_vendor in 613376888252Smrg sni) 613476888252Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 613576888252Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 613676888252Smrg ;; 613776888252Smrg siemens) 613876888252Smrg ## LD is ld it makes a PLAMLIB 613976888252Smrg ## CC just makes a GrossModule. 614076888252Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 614176888252Smrg _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 614276888252Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 614376888252Smrg ;; 614476888252Smrg motorola) 614576888252Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 614676888252Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 614776888252Smrg ;; 614876888252Smrg esac 614976888252Smrg runpath_var='LD_RUN_PATH' 615076888252Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 615176888252Smrg ;; 615276888252Smrg 615376888252Smrg sysv4.3*) 615476888252Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 615576888252Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 615676888252Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 615776888252Smrg ;; 615876888252Smrg 615976888252Smrg sysv4*MP*) 616076888252Smrg if test -d /usr/nec; then 616176888252Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 616276888252Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 616376888252Smrg runpath_var=LD_RUN_PATH 616476888252Smrg hardcode_runpath_var=yes 616576888252Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=yes 616676888252Smrg fi 616776888252Smrg ;; 616876888252Smrg 616976888252Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7*) 617076888252Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 617176888252Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 617276888252Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 617376888252Smrg runpath_var='LD_RUN_PATH' 617476888252Smrg 617576888252Smrg if test "$GCC" = yes; then 617676888252Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 617776888252Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 617876888252Smrg else 617976888252Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 618076888252Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 618176888252Smrg fi 618276888252Smrg ;; 618376888252Smrg 618476888252Smrg sysv5* | sco3.2v5* | sco5v6*) 618576888252Smrg # Note: We can NOT use -z defs as we might desire, because we do not 618676888252Smrg # link with -lc, and that would cause any symbols used from libc to 618776888252Smrg # always be unresolved, which means just about no library would 618876888252Smrg # ever link correctly. If we're not using GNU ld we use -z text 618976888252Smrg # though, which does catch some bad symbols but isn't as heavy-handed 619076888252Smrg # as -z defs. 619176888252Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 619276888252Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 619376888252Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 619476888252Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 619576888252Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' 619676888252Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' 619776888252Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 619876888252Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 619976888252Smrg runpath_var='LD_RUN_PATH' 620076888252Smrg 620176888252Smrg if test "$GCC" = yes; then 620276888252Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' 620376888252Smrg _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' 620476888252Smrg else 620576888252Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' 620676888252Smrg _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' 620776888252Smrg fi 620876888252Smrg ;; 620976888252Smrg 621076888252Smrg uts4*) 621176888252Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 621276888252Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 621376888252Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 621476888252Smrg ;; 621576888252Smrg 621676888252Smrg *) 621776888252Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 621876888252Smrg ;; 621976888252Smrg esac 622076888252Smrg fi 622176888252Smrg]) 622276888252SmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) 622376888252Smrgtest "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 622476888252Smrg 622576888252Smrg# 622676888252Smrg# Do we need to explicitly link libc? 622776888252Smrg# 622876888252Smrgcase "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in 622976888252Smrgx|xyes) 623076888252Smrg # Assume -lc should be added 623176888252Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes 623276888252Smrg 623376888252Smrg if test "$enable_shared" = yes && test "$GCC" = yes; then 623476888252Smrg case $_LT_AC_TAGVAR(archive_cmds, $1) in 623576888252Smrg *'~'*) 623676888252Smrg # FIXME: we may have to deal with multi-command sequences. 623776888252Smrg ;; 623876888252Smrg '$CC '*) 623976888252Smrg # Test whether the compiler implicitly links with -lc since on some 624076888252Smrg # systems, -lgcc has to come before -lc. If gcc already passes -lc 624176888252Smrg # to ld, don't add -lc before -lgcc. 624276888252Smrg AC_MSG_CHECKING([whether -lc should be explicitly linked in]) 624376888252Smrg $rm conftest* 624476888252Smrg printf "$lt_simple_compile_test_code" > conftest.$ac_ext 624576888252Smrg 624676888252Smrg if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 624776888252Smrg soname=conftest 624876888252Smrg lib=conftest 624976888252Smrg libobjs=conftest.$ac_objext 625076888252Smrg deplibs= 625176888252Smrg wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) 625276888252Smrg pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) 625376888252Smrg compiler_flags=-v 625476888252Smrg linker_flags=-v 625576888252Smrg verstring= 625676888252Smrg output_objdir=. 625776888252Smrg libname=conftest 625876888252Smrg lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1) 625976888252Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)= 626076888252Smrg if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 626176888252Smrg then 626276888252Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 626376888252Smrg else 626476888252Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes 626576888252Smrg fi 626676888252Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 626776888252Smrg else 626876888252Smrg cat conftest.err 1>&5 626976888252Smrg fi 627076888252Smrg $rm conftest* 627176888252Smrg AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)]) 627276888252Smrg ;; 627376888252Smrg esac 627476888252Smrg fi 627576888252Smrg ;; 627676888252Smrgesac 627776888252Smrg])# AC_LIBTOOL_PROG_LD_SHLIBS 627876888252Smrg 627976888252Smrg 628076888252Smrg# _LT_AC_FILE_LTDLL_C 628176888252Smrg# ------------------- 628276888252Smrg# Be careful that the start marker always follows a newline. 628376888252SmrgAC_DEFUN([_LT_AC_FILE_LTDLL_C], [ 628476888252Smrg# /* ltdll.c starts here */ 628576888252Smrg# #define WIN32_LEAN_AND_MEAN 628676888252Smrg# #include <windows.h> 628776888252Smrg# #undef WIN32_LEAN_AND_MEAN 628876888252Smrg# #include <stdio.h> 628976888252Smrg# 629076888252Smrg# #ifndef __CYGWIN__ 629176888252Smrg# # ifdef __CYGWIN32__ 629276888252Smrg# # define __CYGWIN__ __CYGWIN32__ 629376888252Smrg# # endif 629476888252Smrg# #endif 629576888252Smrg# 629676888252Smrg# #ifdef __cplusplus 629776888252Smrg# extern "C" { 629876888252Smrg# #endif 629976888252Smrg# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved); 630076888252Smrg# #ifdef __cplusplus 630176888252Smrg# } 630276888252Smrg# #endif 630376888252Smrg# 630476888252Smrg# #ifdef __CYGWIN__ 630576888252Smrg# #include <cygwin/cygwin_dll.h> 630676888252Smrg# DECLARE_CYGWIN_DLL( DllMain ); 630776888252Smrg# #endif 630876888252Smrg# HINSTANCE __hDllInstance_base; 630976888252Smrg# 631076888252Smrg# BOOL APIENTRY 631176888252Smrg# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved) 631276888252Smrg# { 631376888252Smrg# __hDllInstance_base = hInst; 631476888252Smrg# return TRUE; 631576888252Smrg# } 631676888252Smrg# /* ltdll.c ends here */ 631776888252Smrg])# _LT_AC_FILE_LTDLL_C 631876888252Smrg 631976888252Smrg 632076888252Smrg# _LT_AC_TAGVAR(VARNAME, [TAGNAME]) 632176888252Smrg# --------------------------------- 632276888252SmrgAC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])]) 632376888252Smrg 632476888252Smrg 632576888252Smrg# old names 632676888252SmrgAC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL]) 632776888252SmrgAC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 632876888252SmrgAC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 632976888252SmrgAC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 633076888252SmrgAC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 633176888252SmrgAC_DEFUN([AM_PROG_LD], [AC_PROG_LD]) 633276888252SmrgAC_DEFUN([AM_PROG_NM], [AC_PROG_NM]) 633376888252Smrg 633476888252Smrg# This is just to silence aclocal about the macro not being used 633576888252Smrgifelse([AC_DISABLE_FAST_INSTALL]) 633676888252Smrg 633776888252SmrgAC_DEFUN([LT_AC_PROG_GCJ], 633876888252Smrg[AC_CHECK_TOOL(GCJ, gcj, no) 633976888252Smrg test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" 634076888252Smrg AC_SUBST(GCJFLAGS) 634176888252Smrg]) 634276888252Smrg 634376888252SmrgAC_DEFUN([LT_AC_PROG_RC], 634476888252Smrg[AC_CHECK_TOOL(RC, windres, no) 634576888252Smrg]) 634676888252Smrg 634776888252Smrg# NOTE: This macro has been submitted for inclusion into # 634876888252Smrg# GNU Autoconf as AC_PROG_SED. When it is available in # 634976888252Smrg# a released version of Autoconf we should remove this # 635076888252Smrg# macro and use it instead. # 635176888252Smrg# LT_AC_PROG_SED 635276888252Smrg# -------------- 635376888252Smrg# Check for a fully-functional sed program, that truncates 635476888252Smrg# as few characters as possible. Prefer GNU sed if found. 635576888252SmrgAC_DEFUN([LT_AC_PROG_SED], 635676888252Smrg[AC_MSG_CHECKING([for a sed that does not truncate output]) 635776888252SmrgAC_CACHE_VAL(lt_cv_path_SED, 635876888252Smrg[# Loop through the user's path and test for sed and gsed. 635976888252Smrg# Then use that list of sed's as ones to test for truncation. 636076888252Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 636176888252Smrgfor as_dir in $PATH 636276888252Smrgdo 636376888252Smrg IFS=$as_save_IFS 636476888252Smrg test -z "$as_dir" && as_dir=. 636576888252Smrg for lt_ac_prog in sed gsed; do 636676888252Smrg for ac_exec_ext in '' $ac_executable_extensions; do 636776888252Smrg if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 636876888252Smrg lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 636976888252Smrg fi 637076888252Smrg done 637176888252Smrg done 637276888252Smrgdone 637376888252Smrglt_ac_max=0 637476888252Smrglt_ac_count=0 637576888252Smrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris 637676888252Smrg# along with /bin/sed that truncates output. 637776888252Smrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 637876888252Smrg test ! -f $lt_ac_sed && continue 637976888252Smrg cat /dev/null > conftest.in 638076888252Smrg lt_ac_count=0 638176888252Smrg echo $ECHO_N "0123456789$ECHO_C" >conftest.in 638276888252Smrg # Check for GNU sed and select it if it is found. 638376888252Smrg if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 638476888252Smrg lt_cv_path_SED=$lt_ac_sed 638576888252Smrg break 638676888252Smrg fi 638776888252Smrg while true; do 638876888252Smrg cat conftest.in conftest.in >conftest.tmp 638976888252Smrg mv conftest.tmp conftest.in 639076888252Smrg cp conftest.in conftest.nl 639176888252Smrg echo >>conftest.nl 639276888252Smrg $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 639376888252Smrg cmp -s conftest.out conftest.nl || break 639476888252Smrg # 10000 chars as input seems more than enough 639576888252Smrg test $lt_ac_count -gt 10 && break 639676888252Smrg lt_ac_count=`expr $lt_ac_count + 1` 639776888252Smrg if test $lt_ac_count -gt $lt_ac_max; then 639876888252Smrg lt_ac_max=$lt_ac_count 639976888252Smrg lt_cv_path_SED=$lt_ac_sed 640076888252Smrg fi 640176888252Smrg done 640276888252Smrgdone 640376888252Smrg]) 640476888252SmrgSED=$lt_cv_path_SED 640576888252SmrgAC_MSG_RESULT([$SED]) 640676888252Smrg]) 640776888252Smrg 640876888252Smrg# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 640976888252Smrg# 641076888252Smrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 641176888252Smrg# 641276888252Smrg# This program is free software; you can redistribute it and/or modify 641376888252Smrg# it under the terms of the GNU General Public License as published by 641476888252Smrg# the Free Software Foundation; either version 2 of the License, or 641576888252Smrg# (at your option) any later version. 641676888252Smrg# 641776888252Smrg# This program is distributed in the hope that it will be useful, but 641876888252Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 641976888252Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 642076888252Smrg# General Public License for more details. 642176888252Smrg# 642276888252Smrg# You should have received a copy of the GNU General Public License 642376888252Smrg# along with this program; if not, write to the Free Software 642476888252Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 642576888252Smrg# 642676888252Smrg# As a special exception to the GNU General Public License, if you 642776888252Smrg# distribute this file as part of a program that contains a 642876888252Smrg# configuration script generated by Autoconf, you may include it under 642976888252Smrg# the same distribution terms that you use for the rest of that program. 643076888252Smrg 643176888252Smrg# PKG_PROG_PKG_CONFIG([MIN-VERSION]) 643276888252Smrg# ---------------------------------- 643376888252SmrgAC_DEFUN([PKG_PROG_PKG_CONFIG], 643476888252Smrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 643576888252Smrgm4_pattern_allow([^PKG_CONFIG(_PATH)?$]) 643676888252SmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl 643776888252Smrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 643876888252Smrg AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 643976888252Smrgfi 644076888252Smrgif test -n "$PKG_CONFIG"; then 644176888252Smrg _pkg_min_version=m4_default([$1], [0.9.0]) 644276888252Smrg AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 644376888252Smrg if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 644476888252Smrg AC_MSG_RESULT([yes]) 644576888252Smrg else 644676888252Smrg AC_MSG_RESULT([no]) 644776888252Smrg PKG_CONFIG="" 644876888252Smrg fi 644976888252Smrg 645076888252Smrgfi[]dnl 645176888252Smrg])# PKG_PROG_PKG_CONFIG 645276888252Smrg 645376888252Smrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 645476888252Smrg# 645576888252Smrg# Check to see whether a particular set of modules exists. Similar 645676888252Smrg# to PKG_CHECK_MODULES(), but does not set variables or print errors. 645776888252Smrg# 645876888252Smrg# 645976888252Smrg# Similar to PKG_CHECK_MODULES, make sure that the first instance of 646076888252Smrg# this or PKG_CHECK_MODULES is called, or make sure to call 646176888252Smrg# PKG_CHECK_EXISTS manually 646276888252Smrg# -------------------------------------------------------------- 646376888252SmrgAC_DEFUN([PKG_CHECK_EXISTS], 646476888252Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 646576888252Smrgif test -n "$PKG_CONFIG" && \ 646676888252Smrg AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 646776888252Smrg m4_ifval([$2], [$2], [:]) 646876888252Smrgm4_ifvaln([$3], [else 646976888252Smrg $3])dnl 647076888252Smrgfi]) 647176888252Smrg 647276888252Smrg 647376888252Smrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 647476888252Smrg# --------------------------------------------- 647576888252Smrgm4_define([_PKG_CONFIG], 647676888252Smrg[if test -n "$PKG_CONFIG"; then 647776888252Smrg if test -n "$$1"; then 647876888252Smrg pkg_cv_[]$1="$$1" 647976888252Smrg else 648076888252Smrg PKG_CHECK_EXISTS([$3], 648176888252Smrg [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], 648276888252Smrg [pkg_failed=yes]) 648376888252Smrg fi 648476888252Smrgelse 648576888252Smrg pkg_failed=untried 648676888252Smrgfi[]dnl 648776888252Smrg])# _PKG_CONFIG 648876888252Smrg 648976888252Smrg# _PKG_SHORT_ERRORS_SUPPORTED 649076888252Smrg# ----------------------------- 649176888252SmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 649276888252Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 649376888252Smrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 649476888252Smrg _pkg_short_errors_supported=yes 649576888252Smrgelse 649676888252Smrg _pkg_short_errors_supported=no 649776888252Smrgfi[]dnl 649876888252Smrg])# _PKG_SHORT_ERRORS_SUPPORTED 649976888252Smrg 650076888252Smrg 650176888252Smrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 650276888252Smrg# [ACTION-IF-NOT-FOUND]) 650376888252Smrg# 650476888252Smrg# 650576888252Smrg# Note that if there is a possibility the first call to 650676888252Smrg# PKG_CHECK_MODULES might not happen, you should be sure to include an 650776888252Smrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 650876888252Smrg# 650976888252Smrg# 651076888252Smrg# -------------------------------------------------------------- 651176888252SmrgAC_DEFUN([PKG_CHECK_MODULES], 651276888252Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 651376888252SmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 651476888252SmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 651576888252Smrg 651676888252Smrgpkg_failed=no 651776888252SmrgAC_MSG_CHECKING([for $1]) 651876888252Smrg 651976888252Smrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 652076888252Smrg_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 652176888252Smrg 652276888252Smrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 652376888252Smrgand $1[]_LIBS to avoid the need to call pkg-config. 652476888252SmrgSee the pkg-config man page for more details.]) 652576888252Smrg 652676888252Smrgif test $pkg_failed = yes; then 652776888252Smrg _PKG_SHORT_ERRORS_SUPPORTED 652876888252Smrg if test $_pkg_short_errors_supported = yes; then 652976888252Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"` 653076888252Smrg else 653176888252Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` 653276888252Smrg fi 653376888252Smrg # Put the nasty error message in config.log where it belongs 653476888252Smrg echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 653576888252Smrg 653676888252Smrg ifelse([$4], , [AC_MSG_ERROR(dnl 653776888252Smrg[Package requirements ($2) were not met: 653876888252Smrg 653976888252Smrg$$1_PKG_ERRORS 654076888252Smrg 654176888252SmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you 654276888252Smrginstalled software in a non-standard prefix. 654376888252Smrg 654476888252Smrg_PKG_TEXT 654576888252Smrg])], 654676888252Smrg [$4]) 654776888252Smrgelif test $pkg_failed = untried; then 654876888252Smrg ifelse([$4], , [AC_MSG_FAILURE(dnl 654976888252Smrg[The pkg-config script could not be found or is too old. Make sure it 655076888252Smrgis in your PATH or set the PKG_CONFIG environment variable to the full 655176888252Smrgpath to pkg-config. 655276888252Smrg 655376888252Smrg_PKG_TEXT 655476888252Smrg 655576888252SmrgTo get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.])], 655676888252Smrg [$4]) 655776888252Smrgelse 655876888252Smrg $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 655976888252Smrg $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 656076888252Smrg AC_MSG_RESULT([yes]) 656176888252Smrg ifelse([$3], , :, [$3]) 656276888252Smrgfi[]dnl 656376888252Smrg])# PKG_CHECK_MODULES 656476888252Smrg 656576888252Smrgdnl $Id: aclocal.m4,v 1.1.1.1 2008/08/02 05:11:15 mrg Exp $ 656676888252Smrgdnl 656776888252Smrgdnl Copyright 2005 Sun Microsystems, Inc. All rights reserved. 656876888252Smrgdnl 656976888252Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its 657076888252Smrgdnl documentation for any purpose is hereby granted without fee, provided that 657176888252Smrgdnl the above copyright notice appear in all copies and that both that 657276888252Smrgdnl copyright notice and this permission notice appear in supporting 657376888252Smrgdnl documentation. 657476888252Smrgdnl 657576888252Smrgdnl The above copyright notice and this permission notice shall be included 657676888252Smrgdnl in all copies or substantial portions of the Software. 657776888252Smrgdnl 657876888252Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 657976888252Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 658076888252Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 658176888252Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 658276888252Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 658376888252Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 658476888252Smrgdnl OTHER DEALINGS IN THE SOFTWARE. 658576888252Smrgdnl 658676888252Smrgdnl Except as contained in this notice, the name of the copyright holders shall 658776888252Smrgdnl not be used in advertising or otherwise to promote the sale, use or 658876888252Smrgdnl other dealings in this Software without prior written authorization 658976888252Smrgdnl from the copyright holders. 659076888252Smrgdnl 659176888252Smrg 659276888252Smrg# XORG_PROG_RAWCPP() 659376888252Smrg# ------------------ 659476888252Smrg# Find cpp program and necessary flags for use in pre-processing text files 659576888252Smrg# such as man pages and config files 659676888252SmrgAC_DEFUN([XORG_PROG_RAWCPP],[ 659776888252SmrgAC_REQUIRE([AC_PROG_CPP]) 659876888252SmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 659976888252Smrg [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 660076888252Smrg 660176888252Smrg# Check for flag to avoid builtin definitions - assumes unix is predefined, 660276888252Smrg# which is not the best choice for supporting other OS'es, but covers most 660376888252Smrg# of the ones we need for now. 660476888252SmrgAC_MSG_CHECKING([if $RAWCPP requires -undef]) 660576888252SmrgAC_LANG_CONFTEST([Does cpp redefine unix ?]) 660676888252Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 660776888252Smrg AC_MSG_RESULT([no]) 660876888252Smrgelse 660976888252Smrg if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 661076888252Smrg RAWCPPFLAGS=-undef 661176888252Smrg AC_MSG_RESULT([yes]) 661276888252Smrg else 661376888252Smrg AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 661476888252Smrg fi 661576888252Smrgfi 661676888252Smrgrm -f conftest.$ac_ext 661776888252Smrg 661876888252SmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional]) 661976888252SmrgAC_LANG_CONFTEST([Does cpp preserve "whitespace"?]) 662076888252Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 662176888252Smrg AC_MSG_RESULT([no]) 662276888252Smrgelse 662376888252Smrg if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 662476888252Smrg RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 662576888252Smrg AC_MSG_RESULT([yes]) 662676888252Smrg else 662776888252Smrg AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 662876888252Smrg fi 662976888252Smrgfi 663076888252Smrgrm -f conftest.$ac_ext 663176888252SmrgAC_SUBST(RAWCPPFLAGS) 663276888252Smrg]) # XORG_PROG_RAWCPP 663376888252Smrg 663476888252Smrg# XORG_MANPAGE_SECTIONS() 663576888252Smrg# ----------------------- 663676888252Smrg# Determine which sections man pages go in for the different man page types 663776888252Smrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 663876888252Smrg# Not sure if there's any better way than just hardcoding by OS name. 663976888252Smrg# Override default settings by setting environment variables 664076888252Smrg 664176888252SmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[ 664276888252SmrgAC_REQUIRE([AC_CANONICAL_HOST]) 664376888252Smrg 664476888252Smrgif test x$APP_MAN_SUFFIX = x ; then 664576888252Smrg case $host_os in 664676888252Smrg linux*) APP_MAN_SUFFIX=1x ;; 664776888252Smrg *) APP_MAN_SUFFIX=1 ;; 664876888252Smrg esac 664976888252Smrgfi 665076888252Smrgif test x$APP_MAN_DIR = x ; then 665176888252Smrg case $host_os in 665276888252Smrg linux*) APP_MAN_DIR='$(mandir)/man1' ;; 665376888252Smrg *) APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' ;; 665476888252Smrg esac 665576888252Smrgfi 665676888252Smrg 665776888252Smrgif test x$LIB_MAN_SUFFIX = x ; then 665876888252Smrg case $host_os in 665976888252Smrg linux*) LIB_MAN_SUFFIX=3x ;; 666076888252Smrg *) LIB_MAN_SUFFIX=3 ;; 666176888252Smrg esac 666276888252Smrgfi 666376888252Smrgif test x$LIB_MAN_DIR = x ; then 666476888252Smrg case $host_os in 666576888252Smrg linux*) LIB_MAN_DIR='$(mandir)/man3' ;; 666676888252Smrg *) LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' ;; 666776888252Smrg esac 666876888252Smrgfi 666976888252Smrg 667076888252Smrgif test x$FILE_MAN_SUFFIX = x ; then 667176888252Smrg case $host_os in 667276888252Smrg linux*) FILE_MAN_SUFFIX=5x ;; 667376888252Smrg solaris*) FILE_MAN_SUFFIX=4 ;; 667476888252Smrg *) FILE_MAN_SUFFIX=5 ;; 667576888252Smrg esac 667676888252Smrgfi 667776888252Smrgif test x$FILE_MAN_DIR = x ; then 667876888252Smrg case $host_os in 667976888252Smrg linux*) FILE_MAN_DIR='$(mandir)/man5' ;; 668076888252Smrg *) FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' ;; 668176888252Smrg esac 668276888252Smrgfi 668376888252Smrg 668476888252Smrg# In Imake's linux.cf, the misc man suffix & dir was only changed for 668576888252Smrg# LinuxDebian, not other Linuxes, so we leave it unchanged here 668676888252Smrgif test x$MISC_MAN_SUFFIX = x ; then 668776888252Smrg case $host_os in 668876888252Smrg# linux*) MISC_MAN_SUFFIX=7x ;; 668976888252Smrg solaris*) MISC_MAN_SUFFIX=5 ;; 669076888252Smrg *) MISC_MAN_SUFFIX=7 ;; 669176888252Smrg esac 669276888252Smrgfi 669376888252Smrgif test x$MISC_MAN_DIR = x ; then 669476888252Smrg case $host_os in 669576888252Smrg# linux*) MISC_MAN_DIR='$(mandir)/man7' ;; 669676888252Smrg *) MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' ;; 669776888252Smrg esac 669876888252Smrgfi 669976888252Smrg 670076888252Smrg# In Imake's linux.cf, the driver man suffix & dir was only changed for 670176888252Smrg# LinuxDebian, not other Linuxes, so we leave it unchanged here 670276888252Smrgif test x$DRIVER_MAN_SUFFIX = x ; then 670376888252Smrg case $host_os in 670476888252Smrg# linux*) DRIVER_MAN_SUFFIX=4x ;; 670576888252Smrg solaris*) DRIVER_MAN_SUFFIX=7 ;; 670676888252Smrg *) DRIVER_MAN_SUFFIX=4 ;; 670776888252Smrg esac 670876888252Smrgfi 670976888252Smrgif test x$DRIVER_MAN_DIR = x ; then 671076888252Smrg case $host_os in 671176888252Smrg# linux*) DRIVER_MAN_DIR='$(mandir)/man4' ;; 671276888252Smrg *) DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' ;; 671376888252Smrg esac 671476888252Smrgfi 671576888252Smrg 671676888252Smrgif test x$ADMIN_MAN_SUFFIX = x ; then 671776888252Smrg case $host_os in 671876888252Smrg solaris*) ADMIN_MAN_SUFFIX=1m ;; 671976888252Smrg *) ADMIN_MAN_SUFFIX=8 ;; 672076888252Smrg esac 672176888252Smrgfi 672276888252Smrgif test x$ADMIN_MAN_DIR = x ; then 672376888252Smrg ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 672476888252Smrgfi 672576888252Smrg 672676888252Smrg 672776888252SmrgAC_SUBST([APP_MAN_SUFFIX]) 672876888252SmrgAC_SUBST([LIB_MAN_SUFFIX]) 672976888252SmrgAC_SUBST([FILE_MAN_SUFFIX]) 673076888252SmrgAC_SUBST([MISC_MAN_SUFFIX]) 673176888252SmrgAC_SUBST([DRIVER_MAN_SUFFIX]) 673276888252SmrgAC_SUBST([ADMIN_MAN_SUFFIX]) 673376888252SmrgAC_SUBST([APP_MAN_DIR]) 673476888252SmrgAC_SUBST([LIB_MAN_DIR]) 673576888252SmrgAC_SUBST([FILE_MAN_DIR]) 673676888252SmrgAC_SUBST([MISC_MAN_DIR]) 673776888252SmrgAC_SUBST([DRIVER_MAN_DIR]) 673876888252SmrgAC_SUBST([ADMIN_MAN_DIR]) 673976888252Smrg]) # XORG_MANPAGE_SECTIONS 674076888252Smrg 674176888252Smrg# XORG_CHECK_LINUXDOC 674276888252Smrg# ------------------- 674376888252Smrg# Defines the variable MAKE_TEXT if the necessary tools and 674476888252Smrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 674576888252Smrg# Whether or not the necessary tools and files are found can be checked 674676888252Smrg# with the AM_CONDITIONAL "BUILD_LINUXDOC" 674776888252SmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[ 674876888252SmrgAC_CHECK_FILE( 674976888252Smrg [$prefix/share/X11/sgml/defs.ent], 675076888252Smrg [DEFS_ENT_PATH=$prefix/share/X11/sgml], 675176888252Smrg [DEFS_ENT_PATH=] 675276888252Smrg) 675376888252Smrg 675476888252SmrgAC_PATH_PROG(LINUXDOC, linuxdoc) 675576888252SmrgAC_PATH_PROG(PS2PDF, ps2pdf) 675676888252Smrg 675776888252SmrgAC_MSG_CHECKING([Whether to build documentation]) 675876888252Smrg 675976888252Smrgif test x$DEFS_ENT_PATH != x && test x$LINUXDOC != x ; then 676076888252Smrg BUILDDOC=yes 676176888252Smrgelse 676276888252Smrg BUILDDOC=no 676376888252Smrgfi 676476888252Smrg 676576888252SmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 676676888252Smrg 676776888252SmrgAC_MSG_RESULT([$BUILDDOC]) 676876888252Smrg 676976888252SmrgAC_MSG_CHECKING([Whether to build pdf documentation]) 677076888252Smrg 677176888252Smrgif test x$PS2PDF != x ; then 677276888252Smrg BUILDPDFDOC=yes 677376888252Smrgelse 677476888252Smrg BUILDPDFDOC=no 677576888252Smrgfi 677676888252Smrg 677776888252SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 677876888252Smrg 677976888252SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 678076888252Smrg 678176888252SmrgMAKE_TEXT="SGML_SEARCH_PATH=$DEFS_ENT_PATH GROFF_NO_SGR=y $LINUXDOC -B txt" 678276888252SmrgMAKE_PS="SGML_SEARCH_PATH=$DEFS_ENT_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 678376888252SmrgMAKE_PDF="$PS2PDF" 678476888252SmrgMAKE_HTML="SGML_SEARCH_PATH=$DEFS_ENT_PATH $LINUXDOC -B html --split=0" 678576888252Smrg 678676888252SmrgAC_SUBST(MAKE_TEXT) 678776888252SmrgAC_SUBST(MAKE_PS) 678876888252SmrgAC_SUBST(MAKE_PDF) 678976888252SmrgAC_SUBST(MAKE_HTML) 679076888252Smrg]) # XORG_CHECK_LINUXDOC 679176888252Smrg 679276888252Smrg# XORG_CHECK_MALLOC_ZERO 679376888252Smrg# ---------------------- 679476888252Smrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 679576888252Smrg# malloc(0) returns NULL. Packages should add one of these cflags to 679676888252Smrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 679776888252SmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 679876888252SmrgAC_ARG_ENABLE(malloc0returnsnull, 679976888252Smrg AC_HELP_STRING([--enable-malloc0returnsnull], 680076888252Smrg [malloc(0) returns NULL (default: auto)]), 680176888252Smrg [MALLOC_ZERO_RETURNS_NULL=$enableval], 680276888252Smrg [MALLOC_ZERO_RETURNS_NULL=auto]) 680376888252Smrg 680476888252SmrgAC_MSG_CHECKING([whether malloc(0) returns NULL]) 680576888252Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 680676888252Smrg AC_RUN_IFELSE([ 680776888252Smrgchar *malloc(); 680876888252Smrgchar *realloc(); 680976888252Smrgchar *calloc(); 681076888252Smrgmain() { 681176888252Smrg char *m0, *r0, *c0, *p; 681276888252Smrg m0 = malloc(0); 681376888252Smrg p = malloc(10); 681476888252Smrg r0 = realloc(p,0); 681576888252Smrg c0 = calloc(0); 681676888252Smrg exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1); 681776888252Smrg}], 681876888252Smrg [MALLOC_ZERO_RETURNS_NULL=yes], 681976888252Smrg [MALLOC_ZERO_RETURNS_NULL=no]) 682076888252Smrgfi 682176888252SmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 682276888252Smrg 682376888252Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 682476888252Smrg MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 682576888252Smrg XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 682676888252Smrg XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 682776888252Smrgelse 682876888252Smrg MALLOC_ZERO_CFLAGS="" 682976888252Smrg XMALLOC_ZERO_CFLAGS="" 683076888252Smrg XTMALLOC_ZERO_CFLAGS="" 683176888252Smrgfi 683276888252Smrg 683376888252SmrgAC_SUBST([MALLOC_ZERO_CFLAGS]) 683476888252SmrgAC_SUBST([XMALLOC_ZERO_CFLAGS]) 683576888252SmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS]) 683676888252Smrg]) # XORG_CHECK_MALLOC_ZERO 683776888252Smrg 683876888252Smrgdnl Copyright 2005 Red Hat, Inc 683976888252Smrgdnl 684076888252Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its 684176888252Smrgdnl documentation for any purpose is hereby granted without fee, provided that 684276888252Smrgdnl the above copyright notice appear in all copies and that both that 684376888252Smrgdnl copyright notice and this permission notice appear in supporting 684476888252Smrgdnl documentation. 684576888252Smrgdnl 684676888252Smrgdnl The above copyright notice and this permission notice shall be included 684776888252Smrgdnl in all copies or substantial portions of the Software. 684876888252Smrgdnl 684976888252Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 685076888252Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 685176888252Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 685276888252Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 685376888252Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 685476888252Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 685576888252Smrgdnl OTHER DEALINGS IN THE SOFTWARE. 685676888252Smrgdnl 685776888252Smrgdnl Except as contained in this notice, the name of the copyright holders shall 685876888252Smrgdnl not be used in advertising or otherwise to promote the sale, use or 685976888252Smrgdnl other dealings in this Software without prior written authorization 686076888252Smrgdnl from the copyright holders. 686176888252Smrgdnl 686276888252Smrg 686376888252Smrg# XORG_DRIVER_CHECK_EXT() 686476888252Smrg# -------------------------- 686576888252Smrg# Checks for the $1 define in xorg-server.h (from the sdk). If it 686676888252Smrg# is defined, then add $1 to $REQUIRED_MODULES. 686776888252Smrg 686876888252SmrgAC_DEFUN([XORG_DRIVER_CHECK_EXT],[ 686976888252Smrg SAVE_CFLAGS="$CFLAGS" 687076888252Smrg CFLAGS="$CFLAGS -I`pkg-config --variable=sdkdir xorg-server`" 687176888252Smrg AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ 687276888252Smrg#include "xorg-server.h" 687376888252Smrg#if !defined $1 687476888252Smrg#error $1 not defined 687576888252Smrg#endif 687676888252Smrg ]])], 687776888252Smrg [_EXT_CHECK=yes], 687876888252Smrg [_EXT_CHECK=no]) 687976888252Smrg CFLAGS="$SAVE_CFLAGS" 688076888252Smrg AC_MSG_CHECKING([if $1 is defined]) 688176888252Smrg AC_MSG_RESULT([$_EXT_CHECK]) 688276888252Smrg if test "$_EXT_CHECK" != no; then 688376888252Smrg REQUIRED_MODULES="$REQUIRED_MODULES $2" 688476888252Smrg fi 688576888252Smrg]) 688676888252Smrg 688776888252Smrgdnl Copyright 2005 Red Hat, Inc 688876888252Smrgdnl 688976888252Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its 689076888252Smrgdnl documentation for any purpose is hereby granted without fee, provided that 689176888252Smrgdnl the above copyright notice appear in all copies and that both that 689276888252Smrgdnl copyright notice and this permission notice appear in supporting 689376888252Smrgdnl documentation. 689476888252Smrgdnl 689576888252Smrgdnl The above copyright notice and this permission notice shall be included 689676888252Smrgdnl in all copies or substantial portions of the Software. 689776888252Smrgdnl 689876888252Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 689976888252Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 690076888252Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 690176888252Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 690276888252Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 690376888252Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 690476888252Smrgdnl OTHER DEALINGS IN THE SOFTWARE. 690576888252Smrgdnl 690676888252Smrgdnl Except as contained in this notice, the name of the copyright holders shall 690776888252Smrgdnl not be used in advertising or otherwise to promote the sale, use or 690876888252Smrgdnl other dealings in this Software without prior written authorization 690976888252Smrgdnl from the copyright holders. 691076888252Smrgdnl 691176888252Smrg 691276888252Smrg# XORG_RELEASE_VERSION 691376888252Smrg# -------------------- 691476888252Smrg# Adds --with/without-release-string and changes the PACKAGE and 691576888252Smrg# PACKAGE_TARNAME to use "$PACKAGE{_TARNAME}-$RELEASE_VERSION". If 691676888252Smrg# no option is given, PACKAGE and PACKAGE_TARNAME are unchanged. 691776888252Smrg 691876888252SmrgAC_DEFUN([XORG_RELEASE_VERSION],[ 691976888252Smrg AC_ARG_WITH(release-version, 692076888252Smrg AC_HELP_STRING([--with-release-version=STRING], 692176888252Smrg [Use release version string in package name]), 692276888252Smrg [RELEASE_VERSION="$withval"], 692376888252Smrg [RELEASE_VERSION=""]) 692476888252Smrg if test "x$RELEASE_VERSION" != "x"; then 692576888252Smrg PACKAGE="$PACKAGE-$RELEASE_VERSION" 692676888252Smrg PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION" 692776888252Smrg AC_MSG_NOTICE([Building with package name set to $PACKAGE]) 692876888252Smrg fi 692976888252Smrg]) 693076888252Smrg 693176888252Smrg# Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc. 693276888252Smrg# 693376888252Smrg# This file is free software; the Free Software Foundation 693476888252Smrg# gives unlimited permission to copy and/or distribute it, 693576888252Smrg# with or without modifications, as long as this notice is preserved. 693676888252Smrg 693776888252Smrg# AM_AUTOMAKE_VERSION(VERSION) 693876888252Smrg# ---------------------------- 693976888252Smrg# Automake X.Y traces this macro to ensure aclocal.m4 has been 694076888252Smrg# generated from the m4 files accompanying Automake X.Y. 694176888252SmrgAC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"]) 694276888252Smrg 694376888252Smrg# AM_SET_CURRENT_AUTOMAKE_VERSION 694476888252Smrg# ------------------------------- 694576888252Smrg# Call AM_AUTOMAKE_VERSION so it can be traced. 694676888252Smrg# This function is AC_REQUIREd by AC_INIT_AUTOMAKE. 694776888252SmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 694876888252Smrg [AM_AUTOMAKE_VERSION([1.9.6])]) 694976888252Smrg 695076888252Smrg# AM_AUX_DIR_EXPAND -*- Autoconf -*- 695176888252Smrg 695276888252Smrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 695376888252Smrg# 695476888252Smrg# This file is free software; the Free Software Foundation 695576888252Smrg# gives unlimited permission to copy and/or distribute it, 695676888252Smrg# with or without modifications, as long as this notice is preserved. 695776888252Smrg 695876888252Smrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 695976888252Smrg# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to 696076888252Smrg# `$srcdir', `$srcdir/..', or `$srcdir/../..'. 696176888252Smrg# 696276888252Smrg# Of course, Automake must honor this variable whenever it calls a 696376888252Smrg# tool from the auxiliary directory. The problem is that $srcdir (and 696476888252Smrg# therefore $ac_aux_dir as well) can be either absolute or relative, 696576888252Smrg# depending on how configure is run. This is pretty annoying, since 696676888252Smrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top 696776888252Smrg# source directory, any form will work fine, but in subdirectories a 696876888252Smrg# relative path needs to be adjusted first. 696976888252Smrg# 697076888252Smrg# $ac_aux_dir/missing 697176888252Smrg# fails when called from a subdirectory if $ac_aux_dir is relative 697276888252Smrg# $top_srcdir/$ac_aux_dir/missing 697376888252Smrg# fails if $ac_aux_dir is absolute, 697476888252Smrg# fails when called from a subdirectory in a VPATH build with 697576888252Smrg# a relative $ac_aux_dir 697676888252Smrg# 697776888252Smrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 697876888252Smrg# are both prefixed by $srcdir. In an in-source build this is usually 697976888252Smrg# harmless because $srcdir is `.', but things will broke when you 698076888252Smrg# start a VPATH build or use an absolute $srcdir. 698176888252Smrg# 698276888252Smrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 698376888252Smrg# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 698476888252Smrg# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 698576888252Smrg# and then we would define $MISSING as 698676888252Smrg# MISSING="\${SHELL} $am_aux_dir/missing" 698776888252Smrg# This will work as long as MISSING is not called from configure, because 698876888252Smrg# unfortunately $(top_srcdir) has no meaning in configure. 698976888252Smrg# However there are other variables, like CC, which are often used in 699076888252Smrg# configure, and could therefore not use this "fixed" $ac_aux_dir. 699176888252Smrg# 699276888252Smrg# Another solution, used here, is to always expand $ac_aux_dir to an 699376888252Smrg# absolute PATH. The drawback is that using absolute paths prevent a 699476888252Smrg# configured tree to be moved without reconfiguration. 699576888252Smrg 699676888252SmrgAC_DEFUN([AM_AUX_DIR_EXPAND], 699776888252Smrg[dnl Rely on autoconf to set up CDPATH properly. 699876888252SmrgAC_PREREQ([2.50])dnl 699976888252Smrg# expand $ac_aux_dir to an absolute path 700076888252Smrgam_aux_dir=`cd $ac_aux_dir && pwd` 700176888252Smrg]) 700276888252Smrg 700376888252Smrg# AM_CONDITIONAL -*- Autoconf -*- 700476888252Smrg 700576888252Smrg# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005 700676888252Smrg# Free Software Foundation, Inc. 700776888252Smrg# 700876888252Smrg# This file is free software; the Free Software Foundation 700976888252Smrg# gives unlimited permission to copy and/or distribute it, 701076888252Smrg# with or without modifications, as long as this notice is preserved. 701176888252Smrg 701276888252Smrg# serial 7 701376888252Smrg 701476888252Smrg# AM_CONDITIONAL(NAME, SHELL-CONDITION) 701576888252Smrg# ------------------------------------- 701676888252Smrg# Define a conditional. 701776888252SmrgAC_DEFUN([AM_CONDITIONAL], 701876888252Smrg[AC_PREREQ(2.52)dnl 701976888252Smrg ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 702076888252Smrg [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 702176888252SmrgAC_SUBST([$1_TRUE]) 702276888252SmrgAC_SUBST([$1_FALSE]) 702376888252Smrgif $2; then 702476888252Smrg $1_TRUE= 702576888252Smrg $1_FALSE='#' 702676888252Smrgelse 702776888252Smrg $1_TRUE='#' 702876888252Smrg $1_FALSE= 702976888252Smrgfi 703076888252SmrgAC_CONFIG_COMMANDS_PRE( 703176888252Smrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 703276888252Smrg AC_MSG_ERROR([[conditional "$1" was never defined. 703376888252SmrgUsually this means the macro was only invoked conditionally.]]) 703476888252Smrgfi])]) 703576888252Smrg 703676888252Smrg 703776888252Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 703876888252Smrg# Free Software Foundation, Inc. 703976888252Smrg# 704076888252Smrg# This file is free software; the Free Software Foundation 704176888252Smrg# gives unlimited permission to copy and/or distribute it, 704276888252Smrg# with or without modifications, as long as this notice is preserved. 704376888252Smrg 704476888252Smrg# serial 8 704576888252Smrg 704676888252Smrg# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be 704776888252Smrg# written in clear, in which case automake, when reading aclocal.m4, 704876888252Smrg# will think it sees a *use*, and therefore will trigger all it's 704976888252Smrg# C support machinery. Also note that it means that autoscan, seeing 705076888252Smrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 705176888252Smrg 705276888252Smrg 705376888252Smrg# _AM_DEPENDENCIES(NAME) 705476888252Smrg# ---------------------- 705576888252Smrg# See how the compiler implements dependency checking. 705676888252Smrg# NAME is "CC", "CXX", "GCJ", or "OBJC". 705776888252Smrg# We try a few techniques and use that to set a single cache variable. 705876888252Smrg# 705976888252Smrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 706076888252Smrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 706176888252Smrg# dependency, and given that the user is not expected to run this macro, 706276888252Smrg# just rely on AC_PROG_CC. 706376888252SmrgAC_DEFUN([_AM_DEPENDENCIES], 706476888252Smrg[AC_REQUIRE([AM_SET_DEPDIR])dnl 706576888252SmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 706676888252SmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl 706776888252SmrgAC_REQUIRE([AM_DEP_TRACK])dnl 706876888252Smrg 706976888252Smrgifelse([$1], CC, [depcc="$CC" am_compiler_list=], 707076888252Smrg [$1], CXX, [depcc="$CXX" am_compiler_list=], 707176888252Smrg [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 707276888252Smrg [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 707376888252Smrg [depcc="$$1" am_compiler_list=]) 707476888252Smrg 707576888252SmrgAC_CACHE_CHECK([dependency style of $depcc], 707676888252Smrg [am_cv_$1_dependencies_compiler_type], 707776888252Smrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 707876888252Smrg # We make a subdir and do the tests there. Otherwise we can end up 707976888252Smrg # making bogus files that we don't know about and never remove. For 708076888252Smrg # instance it was reported that on HP-UX the gcc test will end up 708176888252Smrg # making a dummy file named `D' -- because `-MD' means `put the output 708276888252Smrg # in D'. 708376888252Smrg mkdir conftest.dir 708476888252Smrg # Copy depcomp to subdir because otherwise we won't find it if we're 708576888252Smrg # using a relative directory. 708676888252Smrg cp "$am_depcomp" conftest.dir 708776888252Smrg cd conftest.dir 708876888252Smrg # We will build objects and dependencies in a subdirectory because 708976888252Smrg # it helps to detect inapplicable dependency modes. For instance 709076888252Smrg # both Tru64's cc and ICC support -MD to output dependencies as a 709176888252Smrg # side effect of compilation, but ICC will put the dependencies in 709276888252Smrg # the current directory while Tru64 will put them in the object 709376888252Smrg # directory. 709476888252Smrg mkdir sub 709576888252Smrg 709676888252Smrg am_cv_$1_dependencies_compiler_type=none 709776888252Smrg if test "$am_compiler_list" = ""; then 709876888252Smrg am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 709976888252Smrg fi 710076888252Smrg for depmode in $am_compiler_list; do 710176888252Smrg # Setup a source with many dependencies, because some compilers 710276888252Smrg # like to wrap large dependency lists on column 80 (with \), and 710376888252Smrg # we should not choose a depcomp mode which is confused by this. 710476888252Smrg # 710576888252Smrg # We need to recreate these files for each test, as the compiler may 710676888252Smrg # overwrite some of them when testing with obscure command lines. 710776888252Smrg # This happens at least with the AIX C compiler. 710876888252Smrg : > sub/conftest.c 710976888252Smrg for i in 1 2 3 4 5 6; do 711076888252Smrg echo '#include "conftst'$i'.h"' >> sub/conftest.c 711176888252Smrg # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with 711276888252Smrg # Solaris 8's {/usr,}/bin/sh. 711376888252Smrg touch sub/conftst$i.h 711476888252Smrg done 711576888252Smrg echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 711676888252Smrg 711776888252Smrg case $depmode in 711876888252Smrg nosideeffect) 711976888252Smrg # after this tag, mechanisms are not by side-effect, so they'll 712076888252Smrg # only be used when explicitly requested 712176888252Smrg if test "x$enable_dependency_tracking" = xyes; then 712276888252Smrg continue 712376888252Smrg else 712476888252Smrg break 712576888252Smrg fi 712676888252Smrg ;; 712776888252Smrg none) break ;; 712876888252Smrg esac 712976888252Smrg # We check with `-c' and `-o' for the sake of the "dashmstdout" 713076888252Smrg # mode. It turns out that the SunPro C++ compiler does not properly 713176888252Smrg # handle `-M -o', and we need to detect this. 713276888252Smrg if depmode=$depmode \ 713376888252Smrg source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ 713476888252Smrg depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 713576888252Smrg $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ 713676888252Smrg >/dev/null 2>conftest.err && 713776888252Smrg grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 713876888252Smrg grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && 713976888252Smrg ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 714076888252Smrg # icc doesn't choke on unknown options, it will just issue warnings 714176888252Smrg # or remarks (even with -Werror). So we grep stderr for any message 714276888252Smrg # that says an option was ignored or not supported. 714376888252Smrg # When given -MP, icc 7.0 and 7.1 complain thusly: 714476888252Smrg # icc: Command line warning: ignoring option '-M'; no argument required 714576888252Smrg # The diagnosis changed in icc 8.0: 714676888252Smrg # icc: Command line remark: option '-MP' not supported 714776888252Smrg if (grep 'ignoring option' conftest.err || 714876888252Smrg grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 714976888252Smrg am_cv_$1_dependencies_compiler_type=$depmode 715076888252Smrg break 715176888252Smrg fi 715276888252Smrg fi 715376888252Smrg done 715476888252Smrg 715576888252Smrg cd .. 715676888252Smrg rm -rf conftest.dir 715776888252Smrgelse 715876888252Smrg am_cv_$1_dependencies_compiler_type=none 715976888252Smrgfi 716076888252Smrg]) 716176888252SmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 716276888252SmrgAM_CONDITIONAL([am__fastdep$1], [ 716376888252Smrg test "x$enable_dependency_tracking" != xno \ 716476888252Smrg && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 716576888252Smrg]) 716676888252Smrg 716776888252Smrg 716876888252Smrg# AM_SET_DEPDIR 716976888252Smrg# ------------- 717076888252Smrg# Choose a directory name for dependency files. 717176888252Smrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES 717276888252SmrgAC_DEFUN([AM_SET_DEPDIR], 717376888252Smrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 717476888252SmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 717576888252Smrg]) 717676888252Smrg 717776888252Smrg 717876888252Smrg# AM_DEP_TRACK 717976888252Smrg# ------------ 718076888252SmrgAC_DEFUN([AM_DEP_TRACK], 718176888252Smrg[AC_ARG_ENABLE(dependency-tracking, 718276888252Smrg[ --disable-dependency-tracking speeds up one-time build 718376888252Smrg --enable-dependency-tracking do not reject slow dependency extractors]) 718476888252Smrgif test "x$enable_dependency_tracking" != xno; then 718576888252Smrg am_depcomp="$ac_aux_dir/depcomp" 718676888252Smrg AMDEPBACKSLASH='\' 718776888252Smrgfi 718876888252SmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 718976888252SmrgAC_SUBST([AMDEPBACKSLASH]) 719076888252Smrg]) 719176888252Smrg 719276888252Smrg# Generate code to set up dependency tracking. -*- Autoconf -*- 719376888252Smrg 719476888252Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 719576888252Smrg# Free Software Foundation, Inc. 719676888252Smrg# 719776888252Smrg# This file is free software; the Free Software Foundation 719876888252Smrg# gives unlimited permission to copy and/or distribute it, 719976888252Smrg# with or without modifications, as long as this notice is preserved. 720076888252Smrg 720176888252Smrg#serial 3 720276888252Smrg 720376888252Smrg# _AM_OUTPUT_DEPENDENCY_COMMANDS 720476888252Smrg# ------------------------------ 720576888252SmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 720676888252Smrg[for mf in $CONFIG_FILES; do 720776888252Smrg # Strip MF so we end up with the name of the file. 720876888252Smrg mf=`echo "$mf" | sed -e 's/:.*$//'` 720976888252Smrg # Check whether this is an Automake generated Makefile or not. 721076888252Smrg # We used to match only the files named `Makefile.in', but 721176888252Smrg # some people rename them; so instead we look at the file content. 721276888252Smrg # Grep'ing the first line is not enough: some people post-process 721376888252Smrg # each Makefile.in and add a new line on top of each file to say so. 721476888252Smrg # So let's grep whole file. 721576888252Smrg if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then 721676888252Smrg dirpart=`AS_DIRNAME("$mf")` 721776888252Smrg else 721876888252Smrg continue 721976888252Smrg fi 722076888252Smrg # Extract the definition of DEPDIR, am__include, and am__quote 722176888252Smrg # from the Makefile without running `make'. 722276888252Smrg DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` 722376888252Smrg test -z "$DEPDIR" && continue 722476888252Smrg am__include=`sed -n 's/^am__include = //p' < "$mf"` 722576888252Smrg test -z "am__include" && continue 722676888252Smrg am__quote=`sed -n 's/^am__quote = //p' < "$mf"` 722776888252Smrg # When using ansi2knr, U may be empty or an underscore; expand it 722876888252Smrg U=`sed -n 's/^U = //p' < "$mf"` 722976888252Smrg # Find all dependency output files, they are included files with 723076888252Smrg # $(DEPDIR) in their names. We invoke sed twice because it is the 723176888252Smrg # simplest approach to changing $(DEPDIR) to its actual value in the 723276888252Smrg # expansion. 723376888252Smrg for file in `sed -n " 723476888252Smrg s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ 723576888252Smrg sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do 723676888252Smrg # Make sure the directory exists. 723776888252Smrg test -f "$dirpart/$file" && continue 723876888252Smrg fdir=`AS_DIRNAME(["$file"])` 723976888252Smrg AS_MKDIR_P([$dirpart/$fdir]) 724076888252Smrg # echo "creating $dirpart/$file" 724176888252Smrg echo '# dummy' > "$dirpart/$file" 724276888252Smrg done 724376888252Smrgdone 724476888252Smrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS 724576888252Smrg 724676888252Smrg 724776888252Smrg# AM_OUTPUT_DEPENDENCY_COMMANDS 724876888252Smrg# ----------------------------- 724976888252Smrg# This macro should only be invoked once -- use via AC_REQUIRE. 725076888252Smrg# 725176888252Smrg# This code is only required when automatic dependency tracking 725276888252Smrg# is enabled. FIXME. This creates each `.P' file that we will 725376888252Smrg# need in order to bootstrap the dependency handling code. 725476888252SmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 725576888252Smrg[AC_CONFIG_COMMANDS([depfiles], 725676888252Smrg [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 725776888252Smrg [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 725876888252Smrg]) 725976888252Smrg 726076888252Smrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 726176888252Smrg# Free Software Foundation, Inc. 726276888252Smrg# 726376888252Smrg# This file is free software; the Free Software Foundation 726476888252Smrg# gives unlimited permission to copy and/or distribute it, 726576888252Smrg# with or without modifications, as long as this notice is preserved. 726676888252Smrg 726776888252Smrg# serial 8 726876888252Smrg 726976888252Smrg# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. 727076888252SmrgAU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) 727176888252Smrg 727276888252Smrg# Do all the work for Automake. -*- Autoconf -*- 727376888252Smrg 727476888252Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 727576888252Smrg# Free Software Foundation, Inc. 727676888252Smrg# 727776888252Smrg# This file is free software; the Free Software Foundation 727876888252Smrg# gives unlimited permission to copy and/or distribute it, 727976888252Smrg# with or without modifications, as long as this notice is preserved. 728076888252Smrg 728176888252Smrg# serial 12 728276888252Smrg 728376888252Smrg# This macro actually does too much. Some checks are only needed if 728476888252Smrg# your package does certain things. But this isn't really a big deal. 728576888252Smrg 728676888252Smrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 728776888252Smrg# AM_INIT_AUTOMAKE([OPTIONS]) 728876888252Smrg# ----------------------------------------------- 728976888252Smrg# The call with PACKAGE and VERSION arguments is the old style 729076888252Smrg# call (pre autoconf-2.50), which is being phased out. PACKAGE 729176888252Smrg# and VERSION should now be passed to AC_INIT and removed from 729276888252Smrg# the call to AM_INIT_AUTOMAKE. 729376888252Smrg# We support both call styles for the transition. After 729476888252Smrg# the next Automake release, Autoconf can make the AC_INIT 729576888252Smrg# arguments mandatory, and then we can depend on a new Autoconf 729676888252Smrg# release and drop the old call support. 729776888252SmrgAC_DEFUN([AM_INIT_AUTOMAKE], 729876888252Smrg[AC_PREREQ([2.58])dnl 729976888252Smrgdnl Autoconf wants to disallow AM_ names. We explicitly allow 730076888252Smrgdnl the ones we care about. 730176888252Smrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 730276888252SmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 730376888252SmrgAC_REQUIRE([AC_PROG_INSTALL])dnl 730476888252Smrg# test to see if srcdir already configured 730576888252Smrgif test "`cd $srcdir && pwd`" != "`pwd`" && 730676888252Smrg test -f $srcdir/config.status; then 730776888252Smrg AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 730876888252Smrgfi 730976888252Smrg 731076888252Smrg# test whether we have cygpath 731176888252Smrgif test -z "$CYGPATH_W"; then 731276888252Smrg if (cygpath --version) >/dev/null 2>/dev/null; then 731376888252Smrg CYGPATH_W='cygpath -w' 731476888252Smrg else 731576888252Smrg CYGPATH_W=echo 731676888252Smrg fi 731776888252Smrgfi 731876888252SmrgAC_SUBST([CYGPATH_W]) 731976888252Smrg 732076888252Smrg# Define the identity of the package. 732176888252Smrgdnl Distinguish between old-style and new-style calls. 732276888252Smrgm4_ifval([$2], 732376888252Smrg[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 732476888252Smrg AC_SUBST([PACKAGE], [$1])dnl 732576888252Smrg AC_SUBST([VERSION], [$2])], 732676888252Smrg[_AM_SET_OPTIONS([$1])dnl 732776888252Smrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 732876888252Smrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 732976888252Smrg 733076888252Smrg_AM_IF_OPTION([no-define],, 733176888252Smrg[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) 733276888252Smrg AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl 733376888252Smrg 733476888252Smrg# Some tools Automake needs. 733576888252SmrgAC_REQUIRE([AM_SANITY_CHECK])dnl 733676888252SmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl 733776888252SmrgAM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) 733876888252SmrgAM_MISSING_PROG(AUTOCONF, autoconf) 733976888252SmrgAM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) 734076888252SmrgAM_MISSING_PROG(AUTOHEADER, autoheader) 734176888252SmrgAM_MISSING_PROG(MAKEINFO, makeinfo) 734276888252SmrgAM_PROG_INSTALL_SH 734376888252SmrgAM_PROG_INSTALL_STRIP 734476888252SmrgAC_REQUIRE([AM_PROG_MKDIR_P])dnl 734576888252Smrg# We need awk for the "check" target. The system "awk" is bad on 734676888252Smrg# some platforms. 734776888252SmrgAC_REQUIRE([AC_PROG_AWK])dnl 734876888252SmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl 734976888252SmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl 735076888252Smrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 735176888252Smrg [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 735276888252Smrg [_AM_PROG_TAR([v7])])]) 735376888252Smrg_AM_IF_OPTION([no-dependencies],, 735476888252Smrg[AC_PROVIDE_IFELSE([AC_PROG_CC], 735576888252Smrg [_AM_DEPENDENCIES(CC)], 735676888252Smrg [define([AC_PROG_CC], 735776888252Smrg defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl 735876888252SmrgAC_PROVIDE_IFELSE([AC_PROG_CXX], 735976888252Smrg [_AM_DEPENDENCIES(CXX)], 736076888252Smrg [define([AC_PROG_CXX], 736176888252Smrg defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl 736276888252Smrg]) 736376888252Smrg]) 736476888252Smrg 736576888252Smrg 736676888252Smrg# When config.status generates a header, we must update the stamp-h file. 736776888252Smrg# This file resides in the same directory as the config header 736876888252Smrg# that is generated. The stamp files are numbered to have different names. 736976888252Smrg 737076888252Smrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 737176888252Smrg# loop where config.status creates the headers, so we can generate 737276888252Smrg# our stamp files there. 737376888252SmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 737476888252Smrg[# Compute $1's index in $config_headers. 737576888252Smrg_am_stamp_count=1 737676888252Smrgfor _am_header in $config_headers :; do 737776888252Smrg case $_am_header in 737876888252Smrg $1 | $1:* ) 737976888252Smrg break ;; 738076888252Smrg * ) 738176888252Smrg _am_stamp_count=`expr $_am_stamp_count + 1` ;; 738276888252Smrg esac 738376888252Smrgdone 738476888252Smrgecho "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) 738576888252Smrg 738676888252Smrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 738776888252Smrg# 738876888252Smrg# This file is free software; the Free Software Foundation 738976888252Smrg# gives unlimited permission to copy and/or distribute it, 739076888252Smrg# with or without modifications, as long as this notice is preserved. 739176888252Smrg 739276888252Smrg# AM_PROG_INSTALL_SH 739376888252Smrg# ------------------ 739476888252Smrg# Define $install_sh. 739576888252SmrgAC_DEFUN([AM_PROG_INSTALL_SH], 739676888252Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 739776888252Smrginstall_sh=${install_sh-"$am_aux_dir/install-sh"} 739876888252SmrgAC_SUBST(install_sh)]) 739976888252Smrg 740076888252Smrg# Copyright (C) 2003, 2005 Free Software Foundation, Inc. 740176888252Smrg# 740276888252Smrg# This file is free software; the Free Software Foundation 740376888252Smrg# gives unlimited permission to copy and/or distribute it, 740476888252Smrg# with or without modifications, as long as this notice is preserved. 740576888252Smrg 740676888252Smrg# serial 2 740776888252Smrg 740876888252Smrg# Check whether the underlying file-system supports filenames 740976888252Smrg# with a leading dot. For instance MS-DOS doesn't. 741076888252SmrgAC_DEFUN([AM_SET_LEADING_DOT], 741176888252Smrg[rm -rf .tst 2>/dev/null 741276888252Smrgmkdir .tst 2>/dev/null 741376888252Smrgif test -d .tst; then 741476888252Smrg am__leading_dot=. 741576888252Smrgelse 741676888252Smrg am__leading_dot=_ 741776888252Smrgfi 741876888252Smrgrmdir .tst 2>/dev/null 741976888252SmrgAC_SUBST([am__leading_dot])]) 742076888252Smrg 742176888252Smrg# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- 742276888252Smrg# From Jim Meyering 742376888252Smrg 742476888252Smrg# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005 742576888252Smrg# Free Software Foundation, Inc. 742676888252Smrg# 742776888252Smrg# This file is free software; the Free Software Foundation 742876888252Smrg# gives unlimited permission to copy and/or distribute it, 742976888252Smrg# with or without modifications, as long as this notice is preserved. 743076888252Smrg 743176888252Smrg# serial 4 743276888252Smrg 743376888252SmrgAC_DEFUN([AM_MAINTAINER_MODE], 743476888252Smrg[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) 743576888252Smrg dnl maintainer-mode is disabled by default 743676888252Smrg AC_ARG_ENABLE(maintainer-mode, 743776888252Smrg[ --enable-maintainer-mode enable make rules and dependencies not useful 743876888252Smrg (and sometimes confusing) to the casual installer], 743976888252Smrg USE_MAINTAINER_MODE=$enableval, 744076888252Smrg USE_MAINTAINER_MODE=no) 744176888252Smrg AC_MSG_RESULT([$USE_MAINTAINER_MODE]) 744276888252Smrg AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes]) 744376888252Smrg MAINT=$MAINTAINER_MODE_TRUE 744476888252Smrg AC_SUBST(MAINT)dnl 744576888252Smrg] 744676888252Smrg) 744776888252Smrg 744876888252SmrgAU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) 744976888252Smrg 745076888252Smrg# Check to see how 'make' treats includes. -*- Autoconf -*- 745176888252Smrg 745276888252Smrg# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. 745376888252Smrg# 745476888252Smrg# This file is free software; the Free Software Foundation 745576888252Smrg# gives unlimited permission to copy and/or distribute it, 745676888252Smrg# with or without modifications, as long as this notice is preserved. 745776888252Smrg 745876888252Smrg# serial 3 745976888252Smrg 746076888252Smrg# AM_MAKE_INCLUDE() 746176888252Smrg# ----------------- 746276888252Smrg# Check to see how make treats includes. 746376888252SmrgAC_DEFUN([AM_MAKE_INCLUDE], 746476888252Smrg[am_make=${MAKE-make} 746576888252Smrgcat > confinc << 'END' 746676888252Smrgam__doit: 746776888252Smrg @echo done 746876888252Smrg.PHONY: am__doit 746976888252SmrgEND 747076888252Smrg# If we don't find an include directive, just comment out the code. 747176888252SmrgAC_MSG_CHECKING([for style of include used by $am_make]) 747276888252Smrgam__include="#" 747376888252Smrgam__quote= 747476888252Smrg_am_result=none 747576888252Smrg# First try GNU make style include. 747676888252Smrgecho "include confinc" > confmf 747776888252Smrg# We grep out `Entering directory' and `Leaving directory' 747876888252Smrg# messages which can occur if `w' ends up in MAKEFLAGS. 747976888252Smrg# In particular we don't look at `^make:' because GNU make might 748076888252Smrg# be invoked under some other name (usually "gmake"), in which 748176888252Smrg# case it prints its new name instead of `make'. 748276888252Smrgif test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then 748376888252Smrg am__include=include 748476888252Smrg am__quote= 748576888252Smrg _am_result=GNU 748676888252Smrgfi 748776888252Smrg# Now try BSD make style include. 748876888252Smrgif test "$am__include" = "#"; then 748976888252Smrg echo '.include "confinc"' > confmf 749076888252Smrg if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then 749176888252Smrg am__include=.include 749276888252Smrg am__quote="\"" 749376888252Smrg _am_result=BSD 749476888252Smrg fi 749576888252Smrgfi 749676888252SmrgAC_SUBST([am__include]) 749776888252SmrgAC_SUBST([am__quote]) 749876888252SmrgAC_MSG_RESULT([$_am_result]) 749976888252Smrgrm -f confinc confmf 750076888252Smrg]) 750176888252Smrg 750276888252Smrg# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 750376888252Smrg 750476888252Smrg# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005 750576888252Smrg# Free Software Foundation, Inc. 750676888252Smrg# 750776888252Smrg# This file is free software; the Free Software Foundation 750876888252Smrg# gives unlimited permission to copy and/or distribute it, 750976888252Smrg# with or without modifications, as long as this notice is preserved. 751076888252Smrg 751176888252Smrg# serial 4 751276888252Smrg 751376888252Smrg# AM_MISSING_PROG(NAME, PROGRAM) 751476888252Smrg# ------------------------------ 751576888252SmrgAC_DEFUN([AM_MISSING_PROG], 751676888252Smrg[AC_REQUIRE([AM_MISSING_HAS_RUN]) 751776888252Smrg$1=${$1-"${am_missing_run}$2"} 751876888252SmrgAC_SUBST($1)]) 751976888252Smrg 752076888252Smrg 752176888252Smrg# AM_MISSING_HAS_RUN 752276888252Smrg# ------------------ 752376888252Smrg# Define MISSING if not defined so far and test if it supports --run. 752476888252Smrg# If it does, set am_missing_run to use it, otherwise, to nothing. 752576888252SmrgAC_DEFUN([AM_MISSING_HAS_RUN], 752676888252Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 752776888252Smrgtest x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" 752876888252Smrg# Use eval to expand $SHELL 752976888252Smrgif eval "$MISSING --run true"; then 753076888252Smrg am_missing_run="$MISSING --run " 753176888252Smrgelse 753276888252Smrg am_missing_run= 753376888252Smrg AC_MSG_WARN([`missing' script is too old or missing]) 753476888252Smrgfi 753576888252Smrg]) 753676888252Smrg 753776888252Smrg# Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc. 753876888252Smrg# 753976888252Smrg# This file is free software; the Free Software Foundation 754076888252Smrg# gives unlimited permission to copy and/or distribute it, 754176888252Smrg# with or without modifications, as long as this notice is preserved. 754276888252Smrg 754376888252Smrg# AM_PROG_MKDIR_P 754476888252Smrg# --------------- 754576888252Smrg# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise. 754676888252Smrg# 754776888252Smrg# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories 754876888252Smrg# created by `make install' are always world readable, even if the 754976888252Smrg# installer happens to have an overly restrictive umask (e.g. 077). 755076888252Smrg# This was a mistake. There are at least two reasons why we must not 755176888252Smrg# use `-m 0755': 755276888252Smrg# - it causes special bits like SGID to be ignored, 755376888252Smrg# - it may be too restrictive (some setups expect 775 directories). 755476888252Smrg# 755576888252Smrg# Do not use -m 0755 and let people choose whatever they expect by 755676888252Smrg# setting umask. 755776888252Smrg# 755876888252Smrg# We cannot accept any implementation of `mkdir' that recognizes `-p'. 755976888252Smrg# Some implementations (such as Solaris 8's) are not thread-safe: if a 756076888252Smrg# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c' 756176888252Smrg# concurrently, both version can detect that a/ is missing, but only 756276888252Smrg# one can create it and the other will error out. Consequently we 756376888252Smrg# restrict ourselves to GNU make (using the --version option ensures 756476888252Smrg# this.) 756576888252SmrgAC_DEFUN([AM_PROG_MKDIR_P], 756676888252Smrg[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then 756776888252Smrg # We used to keeping the `.' as first argument, in order to 756876888252Smrg # allow $(mkdir_p) to be used without argument. As in 756976888252Smrg # $(mkdir_p) $(somedir) 757076888252Smrg # where $(somedir) is conditionally defined. However this is wrong 757176888252Smrg # for two reasons: 757276888252Smrg # 1. if the package is installed by a user who cannot write `.' 757376888252Smrg # make install will fail, 757476888252Smrg # 2. the above comment should most certainly read 757576888252Smrg # $(mkdir_p) $(DESTDIR)$(somedir) 757676888252Smrg # so it does not work when $(somedir) is undefined and 757776888252Smrg # $(DESTDIR) is not. 757876888252Smrg # To support the latter case, we have to write 757976888252Smrg # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir), 758076888252Smrg # so the `.' trick is pointless. 758176888252Smrg mkdir_p='mkdir -p --' 758276888252Smrgelse 758376888252Smrg # On NextStep and OpenStep, the `mkdir' command does not 758476888252Smrg # recognize any option. It will interpret all options as 758576888252Smrg # directories to create, and then abort because `.' already 758676888252Smrg # exists. 758776888252Smrg for d in ./-p ./--version; 758876888252Smrg do 758976888252Smrg test -d $d && rmdir $d 759076888252Smrg done 759176888252Smrg # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists. 759276888252Smrg if test -f "$ac_aux_dir/mkinstalldirs"; then 759376888252Smrg mkdir_p='$(mkinstalldirs)' 759476888252Smrg else 759576888252Smrg mkdir_p='$(install_sh) -d' 759676888252Smrg fi 759776888252Smrgfi 759876888252SmrgAC_SUBST([mkdir_p])]) 759976888252Smrg 760076888252Smrg# Helper functions for option handling. -*- Autoconf -*- 760176888252Smrg 760276888252Smrg# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. 760376888252Smrg# 760476888252Smrg# This file is free software; the Free Software Foundation 760576888252Smrg# gives unlimited permission to copy and/or distribute it, 760676888252Smrg# with or without modifications, as long as this notice is preserved. 760776888252Smrg 760876888252Smrg# serial 3 760976888252Smrg 761076888252Smrg# _AM_MANGLE_OPTION(NAME) 761176888252Smrg# ----------------------- 761276888252SmrgAC_DEFUN([_AM_MANGLE_OPTION], 761376888252Smrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 761476888252Smrg 761576888252Smrg# _AM_SET_OPTION(NAME) 761676888252Smrg# ------------------------------ 761776888252Smrg# Set option NAME. Presently that only means defining a flag for this option. 761876888252SmrgAC_DEFUN([_AM_SET_OPTION], 761976888252Smrg[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) 762076888252Smrg 762176888252Smrg# _AM_SET_OPTIONS(OPTIONS) 762276888252Smrg# ---------------------------------- 762376888252Smrg# OPTIONS is a space-separated list of Automake options. 762476888252SmrgAC_DEFUN([_AM_SET_OPTIONS], 762576888252Smrg[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 762676888252Smrg 762776888252Smrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 762876888252Smrg# ------------------------------------------- 762976888252Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 763076888252SmrgAC_DEFUN([_AM_IF_OPTION], 763176888252Smrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 763276888252Smrg 763376888252Smrg# Check to make sure that the build environment is sane. -*- Autoconf -*- 763476888252Smrg 763576888252Smrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 763676888252Smrg# Free Software Foundation, Inc. 763776888252Smrg# 763876888252Smrg# This file is free software; the Free Software Foundation 763976888252Smrg# gives unlimited permission to copy and/or distribute it, 764076888252Smrg# with or without modifications, as long as this notice is preserved. 764176888252Smrg 764276888252Smrg# serial 4 764376888252Smrg 764476888252Smrg# AM_SANITY_CHECK 764576888252Smrg# --------------- 764676888252SmrgAC_DEFUN([AM_SANITY_CHECK], 764776888252Smrg[AC_MSG_CHECKING([whether build environment is sane]) 764876888252Smrg# Just in case 764976888252Smrgsleep 1 765076888252Smrgecho timestamp > conftest.file 765176888252Smrg# Do `set' in a subshell so we don't clobber the current shell's 765276888252Smrg# arguments. Must try -L first in case configure is actually a 765376888252Smrg# symlink; some systems play weird games with the mod time of symlinks 765476888252Smrg# (eg FreeBSD returns the mod time of the symlink's containing 765576888252Smrg# directory). 765676888252Smrgif ( 765776888252Smrg set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` 765876888252Smrg if test "$[*]" = "X"; then 765976888252Smrg # -L didn't work. 766076888252Smrg set X `ls -t $srcdir/configure conftest.file` 766176888252Smrg fi 766276888252Smrg rm -f conftest.file 766376888252Smrg if test "$[*]" != "X $srcdir/configure conftest.file" \ 766476888252Smrg && test "$[*]" != "X conftest.file $srcdir/configure"; then 766576888252Smrg 766676888252Smrg # If neither matched, then we have a broken ls. This can happen 766776888252Smrg # if, for instance, CONFIG_SHELL is bash and it inherits a 766876888252Smrg # broken ls alias from the environment. This has actually 766976888252Smrg # happened. Such a system could not be considered "sane". 767076888252Smrg AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 767176888252Smrgalias in your environment]) 767276888252Smrg fi 767376888252Smrg 767476888252Smrg test "$[2]" = conftest.file 767576888252Smrg ) 767676888252Smrgthen 767776888252Smrg # Ok. 767876888252Smrg : 767976888252Smrgelse 768076888252Smrg AC_MSG_ERROR([newly created file is older than distributed files! 768176888252SmrgCheck your system clock]) 768276888252Smrgfi 768376888252SmrgAC_MSG_RESULT(yes)]) 768476888252Smrg 768576888252Smrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 768676888252Smrg# 768776888252Smrg# This file is free software; the Free Software Foundation 768876888252Smrg# gives unlimited permission to copy and/or distribute it, 768976888252Smrg# with or without modifications, as long as this notice is preserved. 769076888252Smrg 769176888252Smrg# AM_PROG_INSTALL_STRIP 769276888252Smrg# --------------------- 769376888252Smrg# One issue with vendor `install' (even GNU) is that you can't 769476888252Smrg# specify the program used to strip binaries. This is especially 769576888252Smrg# annoying in cross-compiling environments, where the build's strip 769676888252Smrg# is unlikely to handle the host's binaries. 769776888252Smrg# Fortunately install-sh will honor a STRIPPROG variable, so we 769876888252Smrg# always use install-sh in `make install-strip', and initialize 769976888252Smrg# STRIPPROG with the value of the STRIP variable (set by the user). 770076888252SmrgAC_DEFUN([AM_PROG_INSTALL_STRIP], 770176888252Smrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 770276888252Smrg# Installed binaries are usually stripped using `strip' when the user 770376888252Smrg# run `make install-strip'. However `strip' might not be the right 770476888252Smrg# tool to use in cross-compilation environments, therefore Automake 770576888252Smrg# will honor the `STRIP' environment variable to overrule this program. 770676888252Smrgdnl Don't test for $cross_compiling = yes, because it might be `maybe'. 770776888252Smrgif test "$cross_compiling" != no; then 770876888252Smrg AC_CHECK_TOOL([STRIP], [strip], :) 770976888252Smrgfi 771076888252SmrgINSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" 771176888252SmrgAC_SUBST([INSTALL_STRIP_PROGRAM])]) 771276888252Smrg 771376888252Smrg# Check how to create a tarball. -*- Autoconf -*- 771476888252Smrg 771576888252Smrg# Copyright (C) 2004, 2005 Free Software Foundation, Inc. 771676888252Smrg# 771776888252Smrg# This file is free software; the Free Software Foundation 771876888252Smrg# gives unlimited permission to copy and/or distribute it, 771976888252Smrg# with or without modifications, as long as this notice is preserved. 772076888252Smrg 772176888252Smrg# serial 2 772276888252Smrg 772376888252Smrg# _AM_PROG_TAR(FORMAT) 772476888252Smrg# -------------------- 772576888252Smrg# Check how to create a tarball in format FORMAT. 772676888252Smrg# FORMAT should be one of `v7', `ustar', or `pax'. 772776888252Smrg# 772876888252Smrg# Substitute a variable $(am__tar) that is a command 772976888252Smrg# writing to stdout a FORMAT-tarball containing the directory 773076888252Smrg# $tardir. 773176888252Smrg# tardir=directory && $(am__tar) > result.tar 773276888252Smrg# 773376888252Smrg# Substitute a variable $(am__untar) that extract such 773476888252Smrg# a tarball read from stdin. 773576888252Smrg# $(am__untar) < result.tar 773676888252SmrgAC_DEFUN([_AM_PROG_TAR], 773776888252Smrg[# Always define AMTAR for backward compatibility. 773876888252SmrgAM_MISSING_PROG([AMTAR], [tar]) 773976888252Smrgm4_if([$1], [v7], 774076888252Smrg [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], 774176888252Smrg [m4_case([$1], [ustar],, [pax],, 774276888252Smrg [m4_fatal([Unknown tar format])]) 774376888252SmrgAC_MSG_CHECKING([how to create a $1 tar archive]) 774476888252Smrg# Loop over all known methods to create a tar archive until one works. 774576888252Smrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 774676888252Smrg_am_tools=${am_cv_prog_tar_$1-$_am_tools} 774776888252Smrg# Do not fold the above two line into one, because Tru64 sh and 774876888252Smrg# Solaris sh will not grok spaces in the rhs of `-'. 774976888252Smrgfor _am_tool in $_am_tools 775076888252Smrgdo 775176888252Smrg case $_am_tool in 775276888252Smrg gnutar) 775376888252Smrg for _am_tar in tar gnutar gtar; 775476888252Smrg do 775576888252Smrg AM_RUN_LOG([$_am_tar --version]) && break 775676888252Smrg done 775776888252Smrg am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 775876888252Smrg am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 775976888252Smrg am__untar="$_am_tar -xf -" 776076888252Smrg ;; 776176888252Smrg plaintar) 776276888252Smrg # Must skip GNU tar: if it does not support --format= it doesn't create 776376888252Smrg # ustar tarball either. 776476888252Smrg (tar --version) >/dev/null 2>&1 && continue 776576888252Smrg am__tar='tar chf - "$$tardir"' 776676888252Smrg am__tar_='tar chf - "$tardir"' 776776888252Smrg am__untar='tar xf -' 776876888252Smrg ;; 776976888252Smrg pax) 777076888252Smrg am__tar='pax -L -x $1 -w "$$tardir"' 777176888252Smrg am__tar_='pax -L -x $1 -w "$tardir"' 777276888252Smrg am__untar='pax -r' 777376888252Smrg ;; 777476888252Smrg cpio) 777576888252Smrg am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 777676888252Smrg am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 777776888252Smrg am__untar='cpio -i -H $1 -d' 777876888252Smrg ;; 777976888252Smrg none) 778076888252Smrg am__tar=false 778176888252Smrg am__tar_=false 778276888252Smrg am__untar=false 778376888252Smrg ;; 778476888252Smrg esac 778576888252Smrg 778676888252Smrg # If the value was cached, stop now. We just wanted to have am__tar 778776888252Smrg # and am__untar set. 778876888252Smrg test -n "${am_cv_prog_tar_$1}" && break 778976888252Smrg 779076888252Smrg # tar/untar a dummy directory, and stop if the command works 779176888252Smrg rm -rf conftest.dir 779276888252Smrg mkdir conftest.dir 779376888252Smrg echo GrepMe > conftest.dir/file 779476888252Smrg AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 779576888252Smrg rm -rf conftest.dir 779676888252Smrg if test -s conftest.tar; then 779776888252Smrg AM_RUN_LOG([$am__untar <conftest.tar]) 779876888252Smrg grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 779976888252Smrg fi 780076888252Smrgdone 780176888252Smrgrm -rf conftest.dir 780276888252Smrg 780376888252SmrgAC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 780476888252SmrgAC_MSG_RESULT([$am_cv_prog_tar_$1])]) 780576888252SmrgAC_SUBST([am__tar]) 780676888252SmrgAC_SUBST([am__untar]) 780776888252Smrg]) # _AM_PROG_TAR 780876888252Smrg 7809