aclocal.m4 revision 126a8a12
1126a8a12Smrg# generated automatically by aclocal 1.10 -*- Autoconf -*- 2126a8a12Smrg 3126a8a12Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 4126a8a12Smrg# 2005, 2006 Free Software Foundation, Inc. 5126a8a12Smrg# This file is free software; the Free Software Foundation 6126a8a12Smrg# gives unlimited permission to copy and/or distribute it, 7126a8a12Smrg# with or without modifications, as long as this notice is preserved. 8126a8a12Smrg 9126a8a12Smrg# This program is distributed in the hope that it will be useful, 10126a8a12Smrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 11126a8a12Smrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 12126a8a12Smrg# PARTICULAR PURPOSE. 13126a8a12Smrg 14126a8a12Smrgm4_if(m4_PACKAGE_VERSION, [2.61],, 15126a8a12Smrg[m4_fatal([this file was generated for autoconf 2.61. 16126a8a12SmrgYou have another version of autoconf. If you want to use that, 17126a8a12Smrgyou should regenerate the build system entirely.], [63])]) 18126a8a12Smrg 19126a8a12Smrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 20126a8a12Smrg 21126a8a12Smrg# serial 48 AC_PROG_LIBTOOL 22126a8a12Smrg 23126a8a12Smrg 24126a8a12Smrg# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED) 25126a8a12Smrg# ----------------------------------------------------------- 26126a8a12Smrg# If this macro is not defined by Autoconf, define it here. 27126a8a12Smrgm4_ifdef([AC_PROVIDE_IFELSE], 28126a8a12Smrg [], 29126a8a12Smrg [m4_define([AC_PROVIDE_IFELSE], 30126a8a12Smrg [m4_ifdef([AC_PROVIDE_$1], 31126a8a12Smrg [$2], [$3])])]) 32126a8a12Smrg 33126a8a12Smrg 34126a8a12Smrg# AC_PROG_LIBTOOL 35126a8a12Smrg# --------------- 36126a8a12SmrgAC_DEFUN([AC_PROG_LIBTOOL], 37126a8a12Smrg[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl 38126a8a12Smrgdnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX 39126a8a12Smrgdnl immediately, otherwise, hook it in at the end of AC_PROG_CXX. 40126a8a12Smrg AC_PROVIDE_IFELSE([AC_PROG_CXX], 41126a8a12Smrg [AC_LIBTOOL_CXX], 42126a8a12Smrg [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX 43126a8a12Smrg ])]) 44126a8a12Smrgdnl And a similar setup for Fortran 77 support 45126a8a12Smrg AC_PROVIDE_IFELSE([AC_PROG_F77], 46126a8a12Smrg [AC_LIBTOOL_F77], 47126a8a12Smrg [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77 48126a8a12Smrg])]) 49126a8a12Smrg 50126a8a12Smrgdnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly. 51126a8a12Smrgdnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run 52126a8a12Smrgdnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both. 53126a8a12Smrg AC_PROVIDE_IFELSE([AC_PROG_GCJ], 54126a8a12Smrg [AC_LIBTOOL_GCJ], 55126a8a12Smrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 56126a8a12Smrg [AC_LIBTOOL_GCJ], 57126a8a12Smrg [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ], 58126a8a12Smrg [AC_LIBTOOL_GCJ], 59126a8a12Smrg [ifdef([AC_PROG_GCJ], 60126a8a12Smrg [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])]) 61126a8a12Smrg ifdef([A][M_PROG_GCJ], 62126a8a12Smrg [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])]) 63126a8a12Smrg ifdef([LT_AC_PROG_GCJ], 64126a8a12Smrg [define([LT_AC_PROG_GCJ], 65126a8a12Smrg defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])]) 66126a8a12Smrg])])# AC_PROG_LIBTOOL 67126a8a12Smrg 68126a8a12Smrg 69126a8a12Smrg# _AC_PROG_LIBTOOL 70126a8a12Smrg# ---------------- 71126a8a12SmrgAC_DEFUN([_AC_PROG_LIBTOOL], 72126a8a12Smrg[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl 73126a8a12SmrgAC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl 74126a8a12SmrgAC_BEFORE([$0],[AC_LIBTOOL_F77])dnl 75126a8a12SmrgAC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl 76126a8a12Smrg 77126a8a12Smrg# This can be used to rebuild libtool when needed 78126a8a12SmrgLIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" 79126a8a12Smrg 80126a8a12Smrg# Always use our own libtool. 81126a8a12SmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool' 82126a8a12SmrgAC_SUBST(LIBTOOL)dnl 83126a8a12Smrg 84126a8a12Smrg# Prevent multiple expansion 85126a8a12Smrgdefine([AC_PROG_LIBTOOL], []) 86126a8a12Smrg])# _AC_PROG_LIBTOOL 87126a8a12Smrg 88126a8a12Smrg 89126a8a12Smrg# AC_LIBTOOL_SETUP 90126a8a12Smrg# ---------------- 91126a8a12SmrgAC_DEFUN([AC_LIBTOOL_SETUP], 92126a8a12Smrg[AC_PREREQ(2.50)dnl 93126a8a12SmrgAC_REQUIRE([AC_ENABLE_SHARED])dnl 94126a8a12SmrgAC_REQUIRE([AC_ENABLE_STATIC])dnl 95126a8a12SmrgAC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl 96126a8a12SmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 97126a8a12SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 98126a8a12SmrgAC_REQUIRE([AC_PROG_CC])dnl 99126a8a12SmrgAC_REQUIRE([AC_PROG_LD])dnl 100126a8a12SmrgAC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl 101126a8a12SmrgAC_REQUIRE([AC_PROG_NM])dnl 102126a8a12Smrg 103126a8a12SmrgAC_REQUIRE([AC_PROG_LN_S])dnl 104126a8a12SmrgAC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl 105126a8a12Smrg# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! 106126a8a12SmrgAC_REQUIRE([AC_OBJEXT])dnl 107126a8a12SmrgAC_REQUIRE([AC_EXEEXT])dnl 108126a8a12Smrgdnl 109126a8a12Smrg 110126a8a12SmrgAC_LIBTOOL_SYS_MAX_CMD_LEN 111126a8a12SmrgAC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE 112126a8a12SmrgAC_LIBTOOL_OBJDIR 113126a8a12Smrg 114126a8a12SmrgAC_REQUIRE([_LT_AC_SYS_COMPILER])dnl 115126a8a12Smrg_LT_AC_PROG_ECHO_BACKSLASH 116126a8a12Smrg 117126a8a12Smrgcase $host_os in 118126a8a12Smrgaix3*) 119126a8a12Smrg # AIX sometimes has problems with the GCC collect2 program. For some 120126a8a12Smrg # reason, if we set the COLLECT_NAMES environment variable, the problems 121126a8a12Smrg # vanish in a puff of smoke. 122126a8a12Smrg if test "X${COLLECT_NAMES+set}" != Xset; then 123126a8a12Smrg COLLECT_NAMES= 124126a8a12Smrg export COLLECT_NAMES 125126a8a12Smrg fi 126126a8a12Smrg ;; 127126a8a12Smrgesac 128126a8a12Smrg 129126a8a12Smrg# Sed substitution that helps us do robust quoting. It backslashifies 130126a8a12Smrg# metacharacters that are still active within double-quoted strings. 131126a8a12SmrgXsed='sed -e 1s/^X//' 132126a8a12Smrg[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'] 133126a8a12Smrg 134126a8a12Smrg# Same as above, but do not quote variable references. 135126a8a12Smrg[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'] 136126a8a12Smrg 137126a8a12Smrg# Sed substitution to delay expansion of an escaped shell variable in a 138126a8a12Smrg# double_quote_subst'ed string. 139126a8a12Smrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 140126a8a12Smrg 141126a8a12Smrg# Sed substitution to avoid accidental globbing in evaled expressions 142126a8a12Smrgno_glob_subst='s/\*/\\\*/g' 143126a8a12Smrg 144126a8a12Smrg# Constants: 145126a8a12Smrgrm="rm -f" 146126a8a12Smrg 147126a8a12Smrg# Global variables: 148126a8a12Smrgdefault_ofile=libtool 149126a8a12Smrgcan_build_shared=yes 150126a8a12Smrg 151126a8a12Smrg# All known linkers require a `.a' archive for static linking (except MSVC, 152126a8a12Smrg# which needs '.lib'). 153126a8a12Smrglibext=a 154126a8a12Smrgltmain="$ac_aux_dir/ltmain.sh" 155126a8a12Smrgofile="$default_ofile" 156126a8a12Smrgwith_gnu_ld="$lt_cv_prog_gnu_ld" 157126a8a12Smrg 158126a8a12SmrgAC_CHECK_TOOL(AR, ar, false) 159126a8a12SmrgAC_CHECK_TOOL(RANLIB, ranlib, :) 160126a8a12SmrgAC_CHECK_TOOL(STRIP, strip, :) 161126a8a12Smrg 162126a8a12Smrgold_CC="$CC" 163126a8a12Smrgold_CFLAGS="$CFLAGS" 164126a8a12Smrg 165126a8a12Smrg# Set sane defaults for various variables 166126a8a12Smrgtest -z "$AR" && AR=ar 167126a8a12Smrgtest -z "$AR_FLAGS" && AR_FLAGS=cru 168126a8a12Smrgtest -z "$AS" && AS=as 169126a8a12Smrgtest -z "$CC" && CC=cc 170126a8a12Smrgtest -z "$LTCC" && LTCC=$CC 171126a8a12Smrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 172126a8a12Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 173126a8a12Smrgtest -z "$LD" && LD=ld 174126a8a12Smrgtest -z "$LN_S" && LN_S="ln -s" 175126a8a12Smrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file 176126a8a12Smrgtest -z "$NM" && NM=nm 177126a8a12Smrgtest -z "$SED" && SED=sed 178126a8a12Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump 179126a8a12Smrgtest -z "$RANLIB" && RANLIB=: 180126a8a12Smrgtest -z "$STRIP" && STRIP=: 181126a8a12Smrgtest -z "$ac_objext" && ac_objext=o 182126a8a12Smrg 183126a8a12Smrg# Determine commands to create old-style static archives. 184126a8a12Smrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs' 185126a8a12Smrgold_postinstall_cmds='chmod 644 $oldlib' 186126a8a12Smrgold_postuninstall_cmds= 187126a8a12Smrg 188126a8a12Smrgif test -n "$RANLIB"; then 189126a8a12Smrg case $host_os in 190126a8a12Smrg openbsd*) 191126a8a12Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" 192126a8a12Smrg ;; 193126a8a12Smrg *) 194126a8a12Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" 195126a8a12Smrg ;; 196126a8a12Smrg esac 197126a8a12Smrg old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" 198126a8a12Smrgfi 199126a8a12Smrg 200126a8a12Smrg_LT_CC_BASENAME([$compiler]) 201126a8a12Smrg 202126a8a12Smrg# Only perform the check for file, if the check method requires it 203126a8a12Smrgcase $deplibs_check_method in 204126a8a12Smrgfile_magic*) 205126a8a12Smrg if test "$file_magic_cmd" = '$MAGIC_CMD'; then 206126a8a12Smrg AC_PATH_MAGIC 207126a8a12Smrg fi 208126a8a12Smrg ;; 209126a8a12Smrgesac 210126a8a12Smrg 211126a8a12SmrgAC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no) 212126a8a12SmrgAC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], 213126a8a12Smrgenable_win32_dll=yes, enable_win32_dll=no) 214126a8a12Smrg 215126a8a12SmrgAC_ARG_ENABLE([libtool-lock], 216126a8a12Smrg [AC_HELP_STRING([--disable-libtool-lock], 217126a8a12Smrg [avoid locking (might break parallel builds)])]) 218126a8a12Smrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes 219126a8a12Smrg 220126a8a12SmrgAC_ARG_WITH([pic], 221126a8a12Smrg [AC_HELP_STRING([--with-pic], 222126a8a12Smrg [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 223126a8a12Smrg [pic_mode="$withval"], 224126a8a12Smrg [pic_mode=default]) 225126a8a12Smrgtest -z "$pic_mode" && pic_mode=default 226126a8a12Smrg 227126a8a12Smrg# Use C for the default configuration in the libtool script 228126a8a12Smrgtagname= 229126a8a12SmrgAC_LIBTOOL_LANG_C_CONFIG 230126a8a12Smrg_LT_AC_TAGCONFIG 231126a8a12Smrg])# AC_LIBTOOL_SETUP 232126a8a12Smrg 233126a8a12Smrg 234126a8a12Smrg# _LT_AC_SYS_COMPILER 235126a8a12Smrg# ------------------- 236126a8a12SmrgAC_DEFUN([_LT_AC_SYS_COMPILER], 237126a8a12Smrg[AC_REQUIRE([AC_PROG_CC])dnl 238126a8a12Smrg 239126a8a12Smrg# If no C compiler was specified, use CC. 240126a8a12SmrgLTCC=${LTCC-"$CC"} 241126a8a12Smrg 242126a8a12Smrg# If no C compiler flags were specified, use CFLAGS. 243126a8a12SmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"} 244126a8a12Smrg 245126a8a12Smrg# Allow CC to be a program name with arguments. 246126a8a12Smrgcompiler=$CC 247126a8a12Smrg])# _LT_AC_SYS_COMPILER 248126a8a12Smrg 249126a8a12Smrg 250126a8a12Smrg# _LT_CC_BASENAME(CC) 251126a8a12Smrg# ------------------- 252126a8a12Smrg# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 253126a8a12SmrgAC_DEFUN([_LT_CC_BASENAME], 254126a8a12Smrg[for cc_temp in $1""; do 255126a8a12Smrg case $cc_temp in 256126a8a12Smrg compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 257126a8a12Smrg distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 258126a8a12Smrg \-*) ;; 259126a8a12Smrg *) break;; 260126a8a12Smrg esac 261126a8a12Smrgdone 262126a8a12Smrgcc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` 263126a8a12Smrg]) 264126a8a12Smrg 265126a8a12Smrg 266126a8a12Smrg# _LT_COMPILER_BOILERPLATE 267126a8a12Smrg# ------------------------ 268126a8a12Smrg# Check for compiler boilerplate output or warnings with 269126a8a12Smrg# the simple compiler test code. 270126a8a12SmrgAC_DEFUN([_LT_COMPILER_BOILERPLATE], 271126a8a12Smrg[ac_outfile=conftest.$ac_objext 272126a8a12Smrgprintf "$lt_simple_compile_test_code" >conftest.$ac_ext 273126a8a12Smrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 274126a8a12Smrg_lt_compiler_boilerplate=`cat conftest.err` 275126a8a12Smrg$rm conftest* 276126a8a12Smrg])# _LT_COMPILER_BOILERPLATE 277126a8a12Smrg 278126a8a12Smrg 279126a8a12Smrg# _LT_LINKER_BOILERPLATE 280126a8a12Smrg# ---------------------- 281126a8a12Smrg# Check for linker boilerplate output or warnings with 282126a8a12Smrg# the simple link test code. 283126a8a12SmrgAC_DEFUN([_LT_LINKER_BOILERPLATE], 284126a8a12Smrg[ac_outfile=conftest.$ac_objext 285126a8a12Smrgprintf "$lt_simple_link_test_code" >conftest.$ac_ext 286126a8a12Smrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 287126a8a12Smrg_lt_linker_boilerplate=`cat conftest.err` 288126a8a12Smrg$rm conftest* 289126a8a12Smrg])# _LT_LINKER_BOILERPLATE 290126a8a12Smrg 291126a8a12Smrg 292126a8a12Smrg# _LT_AC_SYS_LIBPATH_AIX 293126a8a12Smrg# ---------------------- 294126a8a12Smrg# Links a minimal program and checks the executable 295126a8a12Smrg# for the system default hardcoded library path. In most cases, 296126a8a12Smrg# this is /usr/lib:/lib, but when the MPI compilers are used 297126a8a12Smrg# the location of the communication and MPI libs are included too. 298126a8a12Smrg# If we don't find anything, use the default library path according 299126a8a12Smrg# to the aix ld manual. 300126a8a12SmrgAC_DEFUN([_LT_AC_SYS_LIBPATH_AIX], 301126a8a12Smrg[AC_LINK_IFELSE(AC_LANG_PROGRAM,[ 302126a8a12Smrgaix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } 303126a8a12Smrg}'` 304126a8a12Smrg# Check for a 64-bit object if we didn't find anything. 305126a8a12Smrgif 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; } 306126a8a12Smrg}'`; fi],[]) 307126a8a12Smrgif test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi 308126a8a12Smrg])# _LT_AC_SYS_LIBPATH_AIX 309126a8a12Smrg 310126a8a12Smrg 311126a8a12Smrg# _LT_AC_SHELL_INIT(ARG) 312126a8a12Smrg# ---------------------- 313126a8a12SmrgAC_DEFUN([_LT_AC_SHELL_INIT], 314126a8a12Smrg[ifdef([AC_DIVERSION_NOTICE], 315126a8a12Smrg [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], 316126a8a12Smrg [AC_DIVERT_PUSH(NOTICE)]) 317126a8a12Smrg$1 318126a8a12SmrgAC_DIVERT_POP 319126a8a12Smrg])# _LT_AC_SHELL_INIT 320126a8a12Smrg 321126a8a12Smrg 322126a8a12Smrg# _LT_AC_PROG_ECHO_BACKSLASH 323126a8a12Smrg# -------------------------- 324126a8a12Smrg# Add some code to the start of the generated configure script which 325126a8a12Smrg# will find an echo command which doesn't interpret backslashes. 326126a8a12SmrgAC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH], 327126a8a12Smrg[_LT_AC_SHELL_INIT([ 328126a8a12Smrg# Check that we are running under the correct shell. 329126a8a12SmrgSHELL=${CONFIG_SHELL-/bin/sh} 330126a8a12Smrg 331126a8a12Smrgcase X$ECHO in 332126a8a12SmrgX*--fallback-echo) 333126a8a12Smrg # Remove one level of quotation (which was required for Make). 334126a8a12Smrg ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` 335126a8a12Smrg ;; 336126a8a12Smrgesac 337126a8a12Smrg 338126a8a12Smrgecho=${ECHO-echo} 339126a8a12Smrgif test "X[$]1" = X--no-reexec; then 340126a8a12Smrg # Discard the --no-reexec flag, and continue. 341126a8a12Smrg shift 342126a8a12Smrgelif test "X[$]1" = X--fallback-echo; then 343126a8a12Smrg # Avoid inline document here, it may be left over 344126a8a12Smrg : 345126a8a12Smrgelif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then 346126a8a12Smrg # Yippee, $echo works! 347126a8a12Smrg : 348126a8a12Smrgelse 349126a8a12Smrg # Restart under the correct shell. 350126a8a12Smrg exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} 351126a8a12Smrgfi 352126a8a12Smrg 353126a8a12Smrgif test "X[$]1" = X--fallback-echo; then 354126a8a12Smrg # used as fallback echo 355126a8a12Smrg shift 356126a8a12Smrg cat <<EOF 357126a8a12Smrg[$]* 358126a8a12SmrgEOF 359126a8a12Smrg exit 0 360126a8a12Smrgfi 361126a8a12Smrg 362126a8a12Smrg# The HP-UX ksh and POSIX shell print the target directory to stdout 363126a8a12Smrg# if CDPATH is set. 364126a8a12Smrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 365126a8a12Smrg 366126a8a12Smrgif test -z "$ECHO"; then 367126a8a12Smrgif test "X${echo_test_string+set}" != Xset; then 368126a8a12Smrg# find a string as large as possible, as long as the shell can cope with it 369126a8a12Smrg for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do 370126a8a12Smrg # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... 371126a8a12Smrg if (echo_test_string=`eval $cmd`) 2>/dev/null && 372126a8a12Smrg echo_test_string=`eval $cmd` && 373126a8a12Smrg (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null 374126a8a12Smrg then 375126a8a12Smrg break 376126a8a12Smrg fi 377126a8a12Smrg done 378126a8a12Smrgfi 379126a8a12Smrg 380126a8a12Smrgif test "X`($echo '\t') 2>/dev/null`" = 'X\t' && 381126a8a12Smrg echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && 382126a8a12Smrg test "X$echo_testing_string" = "X$echo_test_string"; then 383126a8a12Smrg : 384126a8a12Smrgelse 385126a8a12Smrg # The Solaris, AIX, and Digital Unix default echo programs unquote 386126a8a12Smrg # backslashes. This makes it impossible to quote backslashes using 387126a8a12Smrg # echo "$something" | sed 's/\\/\\\\/g' 388126a8a12Smrg # 389126a8a12Smrg # So, first we look for a working echo in the user's PATH. 390126a8a12Smrg 391126a8a12Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 392126a8a12Smrg for dir in $PATH /usr/ucb; do 393126a8a12Smrg IFS="$lt_save_ifs" 394126a8a12Smrg if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && 395126a8a12Smrg test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && 396126a8a12Smrg echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && 397126a8a12Smrg test "X$echo_testing_string" = "X$echo_test_string"; then 398126a8a12Smrg echo="$dir/echo" 399126a8a12Smrg break 400126a8a12Smrg fi 401126a8a12Smrg done 402126a8a12Smrg IFS="$lt_save_ifs" 403126a8a12Smrg 404126a8a12Smrg if test "X$echo" = Xecho; then 405126a8a12Smrg # We didn't find a better echo, so look for alternatives. 406126a8a12Smrg if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && 407126a8a12Smrg echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && 408126a8a12Smrg test "X$echo_testing_string" = "X$echo_test_string"; then 409126a8a12Smrg # This shell has a builtin print -r that does the trick. 410126a8a12Smrg echo='print -r' 411126a8a12Smrg elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && 412126a8a12Smrg test "X$CONFIG_SHELL" != X/bin/ksh; then 413126a8a12Smrg # If we have ksh, try running configure again with it. 414126a8a12Smrg ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} 415126a8a12Smrg export ORIGINAL_CONFIG_SHELL 416126a8a12Smrg CONFIG_SHELL=/bin/ksh 417126a8a12Smrg export CONFIG_SHELL 418126a8a12Smrg exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} 419126a8a12Smrg else 420126a8a12Smrg # Try using printf. 421126a8a12Smrg echo='printf %s\n' 422126a8a12Smrg if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && 423126a8a12Smrg echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && 424126a8a12Smrg test "X$echo_testing_string" = "X$echo_test_string"; then 425126a8a12Smrg # Cool, printf works 426126a8a12Smrg : 427126a8a12Smrg elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && 428126a8a12Smrg test "X$echo_testing_string" = 'X\t' && 429126a8a12Smrg echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && 430126a8a12Smrg test "X$echo_testing_string" = "X$echo_test_string"; then 431126a8a12Smrg CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL 432126a8a12Smrg export CONFIG_SHELL 433126a8a12Smrg SHELL="$CONFIG_SHELL" 434126a8a12Smrg export SHELL 435126a8a12Smrg echo="$CONFIG_SHELL [$]0 --fallback-echo" 436126a8a12Smrg elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && 437126a8a12Smrg test "X$echo_testing_string" = 'X\t' && 438126a8a12Smrg echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && 439126a8a12Smrg test "X$echo_testing_string" = "X$echo_test_string"; then 440126a8a12Smrg echo="$CONFIG_SHELL [$]0 --fallback-echo" 441126a8a12Smrg else 442126a8a12Smrg # maybe with a smaller string... 443126a8a12Smrg prev=: 444126a8a12Smrg 445126a8a12Smrg for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do 446126a8a12Smrg if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null 447126a8a12Smrg then 448126a8a12Smrg break 449126a8a12Smrg fi 450126a8a12Smrg prev="$cmd" 451126a8a12Smrg done 452126a8a12Smrg 453126a8a12Smrg if test "$prev" != 'sed 50q "[$]0"'; then 454126a8a12Smrg echo_test_string=`eval $prev` 455126a8a12Smrg export echo_test_string 456126a8a12Smrg exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} 457126a8a12Smrg else 458126a8a12Smrg # Oops. We lost completely, so just stick with echo. 459126a8a12Smrg echo=echo 460126a8a12Smrg fi 461126a8a12Smrg fi 462126a8a12Smrg fi 463126a8a12Smrg fi 464126a8a12Smrgfi 465126a8a12Smrgfi 466126a8a12Smrg 467126a8a12Smrg# Copy echo and quote the copy suitably for passing to libtool from 468126a8a12Smrg# the Makefile, instead of quoting the original, which is used later. 469126a8a12SmrgECHO=$echo 470126a8a12Smrgif test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then 471126a8a12Smrg ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" 472126a8a12Smrgfi 473126a8a12Smrg 474126a8a12SmrgAC_SUBST(ECHO) 475126a8a12Smrg])])# _LT_AC_PROG_ECHO_BACKSLASH 476126a8a12Smrg 477126a8a12Smrg 478126a8a12Smrg# _LT_AC_LOCK 479126a8a12Smrg# ----------- 480126a8a12SmrgAC_DEFUN([_LT_AC_LOCK], 481126a8a12Smrg[AC_ARG_ENABLE([libtool-lock], 482126a8a12Smrg [AC_HELP_STRING([--disable-libtool-lock], 483126a8a12Smrg [avoid locking (might break parallel builds)])]) 484126a8a12Smrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes 485126a8a12Smrg 486126a8a12Smrg# Some flags need to be propagated to the compiler or linker for good 487126a8a12Smrg# libtool support. 488126a8a12Smrgcase $host in 489126a8a12Smrgia64-*-hpux*) 490126a8a12Smrg # Find out which ABI we are using. 491126a8a12Smrg echo 'int i;' > conftest.$ac_ext 492126a8a12Smrg if AC_TRY_EVAL(ac_compile); then 493126a8a12Smrg case `/usr/bin/file conftest.$ac_objext` in 494126a8a12Smrg *ELF-32*) 495126a8a12Smrg HPUX_IA64_MODE="32" 496126a8a12Smrg ;; 497126a8a12Smrg *ELF-64*) 498126a8a12Smrg HPUX_IA64_MODE="64" 499126a8a12Smrg ;; 500126a8a12Smrg esac 501126a8a12Smrg fi 502126a8a12Smrg rm -rf conftest* 503126a8a12Smrg ;; 504126a8a12Smrg*-*-irix6*) 505126a8a12Smrg # Find out which ABI we are using. 506126a8a12Smrg echo '[#]line __oline__ "configure"' > conftest.$ac_ext 507126a8a12Smrg if AC_TRY_EVAL(ac_compile); then 508126a8a12Smrg if test "$lt_cv_prog_gnu_ld" = yes; then 509126a8a12Smrg case `/usr/bin/file conftest.$ac_objext` in 510126a8a12Smrg *32-bit*) 511126a8a12Smrg LD="${LD-ld} -melf32bsmip" 512126a8a12Smrg ;; 513126a8a12Smrg *N32*) 514126a8a12Smrg LD="${LD-ld} -melf32bmipn32" 515126a8a12Smrg ;; 516126a8a12Smrg *64-bit*) 517126a8a12Smrg LD="${LD-ld} -melf64bmip" 518126a8a12Smrg ;; 519126a8a12Smrg esac 520126a8a12Smrg else 521126a8a12Smrg case `/usr/bin/file conftest.$ac_objext` in 522126a8a12Smrg *32-bit*) 523126a8a12Smrg LD="${LD-ld} -32" 524126a8a12Smrg ;; 525126a8a12Smrg *N32*) 526126a8a12Smrg LD="${LD-ld} -n32" 527126a8a12Smrg ;; 528126a8a12Smrg *64-bit*) 529126a8a12Smrg LD="${LD-ld} -64" 530126a8a12Smrg ;; 531126a8a12Smrg esac 532126a8a12Smrg fi 533126a8a12Smrg fi 534126a8a12Smrg rm -rf conftest* 535126a8a12Smrg ;; 536126a8a12Smrg 537126a8a12Smrgx86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*) 538126a8a12Smrg # Find out which ABI we are using. 539126a8a12Smrg echo 'int i;' > conftest.$ac_ext 540126a8a12Smrg if AC_TRY_EVAL(ac_compile); then 541126a8a12Smrg case `/usr/bin/file conftest.o` in 542126a8a12Smrg *32-bit*) 543126a8a12Smrg case $host in 544126a8a12Smrg x86_64-*linux*) 545126a8a12Smrg LD="${LD-ld} -m elf_i386" 546126a8a12Smrg ;; 547126a8a12Smrg ppc64-*linux*|powerpc64-*linux*) 548126a8a12Smrg LD="${LD-ld} -m elf32ppclinux" 549126a8a12Smrg ;; 550126a8a12Smrg s390x-*linux*) 551126a8a12Smrg LD="${LD-ld} -m elf_s390" 552126a8a12Smrg ;; 553126a8a12Smrg sparc64-*linux*) 554126a8a12Smrg LD="${LD-ld} -m elf32_sparc" 555126a8a12Smrg ;; 556126a8a12Smrg esac 557126a8a12Smrg ;; 558126a8a12Smrg *64-bit*) 559126a8a12Smrg case $host in 560126a8a12Smrg x86_64-*linux*) 561126a8a12Smrg LD="${LD-ld} -m elf_x86_64" 562126a8a12Smrg ;; 563126a8a12Smrg ppc*-*linux*|powerpc*-*linux*) 564126a8a12Smrg LD="${LD-ld} -m elf64ppc" 565126a8a12Smrg ;; 566126a8a12Smrg s390*-*linux*) 567126a8a12Smrg LD="${LD-ld} -m elf64_s390" 568126a8a12Smrg ;; 569126a8a12Smrg sparc*-*linux*) 570126a8a12Smrg LD="${LD-ld} -m elf64_sparc" 571126a8a12Smrg ;; 572126a8a12Smrg esac 573126a8a12Smrg ;; 574126a8a12Smrg esac 575126a8a12Smrg fi 576126a8a12Smrg rm -rf conftest* 577126a8a12Smrg ;; 578126a8a12Smrg 579126a8a12Smrg*-*-sco3.2v5*) 580126a8a12Smrg # On SCO OpenServer 5, we need -belf to get full-featured binaries. 581126a8a12Smrg SAVE_CFLAGS="$CFLAGS" 582126a8a12Smrg CFLAGS="$CFLAGS -belf" 583126a8a12Smrg AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 584126a8a12Smrg [AC_LANG_PUSH(C) 585126a8a12Smrg AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 586126a8a12Smrg AC_LANG_POP]) 587126a8a12Smrg if test x"$lt_cv_cc_needs_belf" != x"yes"; then 588126a8a12Smrg # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 589126a8a12Smrg CFLAGS="$SAVE_CFLAGS" 590126a8a12Smrg fi 591126a8a12Smrg ;; 592126a8a12Smrgsparc*-*solaris*) 593126a8a12Smrg # Find out which ABI we are using. 594126a8a12Smrg echo 'int i;' > conftest.$ac_ext 595126a8a12Smrg if AC_TRY_EVAL(ac_compile); then 596126a8a12Smrg case `/usr/bin/file conftest.o` in 597126a8a12Smrg *64-bit*) 598126a8a12Smrg case $lt_cv_prog_gnu_ld in 599126a8a12Smrg yes*) LD="${LD-ld} -m elf64_sparc" ;; 600126a8a12Smrg *) LD="${LD-ld} -64" ;; 601126a8a12Smrg esac 602126a8a12Smrg ;; 603126a8a12Smrg esac 604126a8a12Smrg fi 605126a8a12Smrg rm -rf conftest* 606126a8a12Smrg ;; 607126a8a12Smrg 608126a8a12SmrgAC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], 609126a8a12Smrg[*-*-cygwin* | *-*-mingw* | *-*-pw32*) 610126a8a12Smrg AC_CHECK_TOOL(DLLTOOL, dlltool, false) 611126a8a12Smrg AC_CHECK_TOOL(AS, as, false) 612126a8a12Smrg AC_CHECK_TOOL(OBJDUMP, objdump, false) 613126a8a12Smrg ;; 614126a8a12Smrg ]) 615126a8a12Smrgesac 616126a8a12Smrg 617126a8a12Smrgneed_locks="$enable_libtool_lock" 618126a8a12Smrg 619126a8a12Smrg])# _LT_AC_LOCK 620126a8a12Smrg 621126a8a12Smrg 622126a8a12Smrg# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 623126a8a12Smrg# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 624126a8a12Smrg# ---------------------------------------------------------------- 625126a8a12Smrg# Check whether the given compiler option works 626126a8a12SmrgAC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], 627126a8a12Smrg[AC_REQUIRE([LT_AC_PROG_SED]) 628126a8a12SmrgAC_CACHE_CHECK([$1], [$2], 629126a8a12Smrg [$2=no 630126a8a12Smrg ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 631126a8a12Smrg printf "$lt_simple_compile_test_code" > conftest.$ac_ext 632126a8a12Smrg lt_compiler_flag="$3" 633126a8a12Smrg # Insert the option either (1) after the last *FLAGS variable, or 634126a8a12Smrg # (2) before a word containing "conftest.", or (3) at the end. 635126a8a12Smrg # Note that $ac_compile itself does not contain backslashes and begins 636126a8a12Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 637126a8a12Smrg # The option is referenced via a variable to avoid confusing sed. 638126a8a12Smrg lt_compile=`echo "$ac_compile" | $SED \ 639126a8a12Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 640126a8a12Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 641126a8a12Smrg -e 's:$: $lt_compiler_flag:'` 642126a8a12Smrg (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 643126a8a12Smrg (eval "$lt_compile" 2>conftest.err) 644126a8a12Smrg ac_status=$? 645126a8a12Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 646126a8a12Smrg echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 647126a8a12Smrg if (exit $ac_status) && test -s "$ac_outfile"; then 648126a8a12Smrg # The compiler can only warn and ignore the option if not recognized 649126a8a12Smrg # So say no if there are warnings other than the usual output. 650126a8a12Smrg $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp 651126a8a12Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 652126a8a12Smrg if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 653126a8a12Smrg $2=yes 654126a8a12Smrg fi 655126a8a12Smrg fi 656126a8a12Smrg $rm conftest* 657126a8a12Smrg]) 658126a8a12Smrg 659126a8a12Smrgif test x"[$]$2" = xyes; then 660126a8a12Smrg ifelse([$5], , :, [$5]) 661126a8a12Smrgelse 662126a8a12Smrg ifelse([$6], , :, [$6]) 663126a8a12Smrgfi 664126a8a12Smrg])# AC_LIBTOOL_COMPILER_OPTION 665126a8a12Smrg 666126a8a12Smrg 667126a8a12Smrg# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 668126a8a12Smrg# [ACTION-SUCCESS], [ACTION-FAILURE]) 669126a8a12Smrg# ------------------------------------------------------------ 670126a8a12Smrg# Check whether the given compiler option works 671126a8a12SmrgAC_DEFUN([AC_LIBTOOL_LINKER_OPTION], 672126a8a12Smrg[AC_CACHE_CHECK([$1], [$2], 673126a8a12Smrg [$2=no 674126a8a12Smrg save_LDFLAGS="$LDFLAGS" 675126a8a12Smrg LDFLAGS="$LDFLAGS $3" 676126a8a12Smrg printf "$lt_simple_link_test_code" > conftest.$ac_ext 677126a8a12Smrg if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 678126a8a12Smrg # The linker can only warn and ignore the option if not recognized 679126a8a12Smrg # So say no if there are warnings 680126a8a12Smrg if test -s conftest.err; then 681126a8a12Smrg # Append any errors to the config.log. 682126a8a12Smrg cat conftest.err 1>&AS_MESSAGE_LOG_FD 683126a8a12Smrg $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp 684126a8a12Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 685126a8a12Smrg if diff conftest.exp conftest.er2 >/dev/null; then 686126a8a12Smrg $2=yes 687126a8a12Smrg fi 688126a8a12Smrg else 689126a8a12Smrg $2=yes 690126a8a12Smrg fi 691126a8a12Smrg fi 692126a8a12Smrg $rm conftest* 693126a8a12Smrg LDFLAGS="$save_LDFLAGS" 694126a8a12Smrg]) 695126a8a12Smrg 696126a8a12Smrgif test x"[$]$2" = xyes; then 697126a8a12Smrg ifelse([$4], , :, [$4]) 698126a8a12Smrgelse 699126a8a12Smrg ifelse([$5], , :, [$5]) 700126a8a12Smrgfi 701126a8a12Smrg])# AC_LIBTOOL_LINKER_OPTION 702126a8a12Smrg 703126a8a12Smrg 704126a8a12Smrg# AC_LIBTOOL_SYS_MAX_CMD_LEN 705126a8a12Smrg# -------------------------- 706126a8a12SmrgAC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], 707126a8a12Smrg[# find the maximum length of command line arguments 708126a8a12SmrgAC_MSG_CHECKING([the maximum length of command line arguments]) 709126a8a12SmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 710126a8a12Smrg i=0 711126a8a12Smrg teststring="ABCD" 712126a8a12Smrg 713126a8a12Smrg case $build_os in 714126a8a12Smrg msdosdjgpp*) 715126a8a12Smrg # On DJGPP, this test can blow up pretty badly due to problems in libc 716126a8a12Smrg # (any single argument exceeding 2000 bytes causes a buffer overrun 717126a8a12Smrg # during glob expansion). Even if it were fixed, the result of this 718126a8a12Smrg # check would be larger than it should be. 719126a8a12Smrg lt_cv_sys_max_cmd_len=12288; # 12K is about right 720126a8a12Smrg ;; 721126a8a12Smrg 722126a8a12Smrg gnu*) 723126a8a12Smrg # Under GNU Hurd, this test is not required because there is 724126a8a12Smrg # no limit to the length of command line arguments. 725126a8a12Smrg # Libtool will interpret -1 as no limit whatsoever 726126a8a12Smrg lt_cv_sys_max_cmd_len=-1; 727126a8a12Smrg ;; 728126a8a12Smrg 729126a8a12Smrg cygwin* | mingw*) 730126a8a12Smrg # On Win9x/ME, this test blows up -- it succeeds, but takes 731126a8a12Smrg # about 5 minutes as the teststring grows exponentially. 732126a8a12Smrg # Worse, since 9x/ME are not pre-emptively multitasking, 733126a8a12Smrg # you end up with a "frozen" computer, even though with patience 734126a8a12Smrg # the test eventually succeeds (with a max line length of 256k). 735126a8a12Smrg # Instead, let's just punt: use the minimum linelength reported by 736126a8a12Smrg # all of the supported platforms: 8192 (on NT/2K/XP). 737126a8a12Smrg lt_cv_sys_max_cmd_len=8192; 738126a8a12Smrg ;; 739126a8a12Smrg 740126a8a12Smrg amigaos*) 741126a8a12Smrg # On AmigaOS with pdksh, this test takes hours, literally. 742126a8a12Smrg # So we just punt and use a minimum line length of 8192. 743126a8a12Smrg lt_cv_sys_max_cmd_len=8192; 744126a8a12Smrg ;; 745126a8a12Smrg 746126a8a12Smrg netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) 747126a8a12Smrg # This has been around since 386BSD, at least. Likely further. 748126a8a12Smrg if test -x /sbin/sysctl; then 749126a8a12Smrg lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 750126a8a12Smrg elif test -x /usr/sbin/sysctl; then 751126a8a12Smrg lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 752126a8a12Smrg else 753126a8a12Smrg lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 754126a8a12Smrg fi 755126a8a12Smrg # And add a safety zone 756126a8a12Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 757126a8a12Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 758126a8a12Smrg ;; 759126a8a12Smrg 760126a8a12Smrg interix*) 761126a8a12Smrg # We know the value 262144 and hardcode it with a safety zone (like BSD) 762126a8a12Smrg lt_cv_sys_max_cmd_len=196608 763126a8a12Smrg ;; 764126a8a12Smrg 765126a8a12Smrg osf*) 766126a8a12Smrg # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 767126a8a12Smrg # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 768126a8a12Smrg # nice to cause kernel panics so lets avoid the loop below. 769126a8a12Smrg # First set a reasonable default. 770126a8a12Smrg lt_cv_sys_max_cmd_len=16384 771126a8a12Smrg # 772126a8a12Smrg if test -x /sbin/sysconfig; then 773126a8a12Smrg case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 774126a8a12Smrg *1*) lt_cv_sys_max_cmd_len=-1 ;; 775126a8a12Smrg esac 776126a8a12Smrg fi 777126a8a12Smrg ;; 778126a8a12Smrg sco3.2v5*) 779126a8a12Smrg lt_cv_sys_max_cmd_len=102400 780126a8a12Smrg ;; 781126a8a12Smrg sysv5* | sco5v6* | sysv4.2uw2*) 782126a8a12Smrg kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 783126a8a12Smrg if test -n "$kargmax"; then 784126a8a12Smrg lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` 785126a8a12Smrg else 786126a8a12Smrg lt_cv_sys_max_cmd_len=32768 787126a8a12Smrg fi 788126a8a12Smrg ;; 789126a8a12Smrg *) 790126a8a12Smrg # If test is not a shell built-in, we'll probably end up computing a 791126a8a12Smrg # maximum length that is only half of the actual maximum length, but 792126a8a12Smrg # we can't tell. 793126a8a12Smrg SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 794126a8a12Smrg while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \ 795126a8a12Smrg = "XX$teststring") >/dev/null 2>&1 && 796126a8a12Smrg new_result=`expr "X$teststring" : ".*" 2>&1` && 797126a8a12Smrg lt_cv_sys_max_cmd_len=$new_result && 798126a8a12Smrg test $i != 17 # 1/2 MB should be enough 799126a8a12Smrg do 800126a8a12Smrg i=`expr $i + 1` 801126a8a12Smrg teststring=$teststring$teststring 802126a8a12Smrg done 803126a8a12Smrg teststring= 804126a8a12Smrg # Add a significant safety factor because C++ compilers can tack on massive 805126a8a12Smrg # amounts of additional arguments before passing them to the linker. 806126a8a12Smrg # It appears as though 1/2 is a usable value. 807126a8a12Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 808126a8a12Smrg ;; 809126a8a12Smrg esac 810126a8a12Smrg]) 811126a8a12Smrgif test -n $lt_cv_sys_max_cmd_len ; then 812126a8a12Smrg AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 813126a8a12Smrgelse 814126a8a12Smrg AC_MSG_RESULT(none) 815126a8a12Smrgfi 816126a8a12Smrg])# AC_LIBTOOL_SYS_MAX_CMD_LEN 817126a8a12Smrg 818126a8a12Smrg 819126a8a12Smrg# _LT_AC_CHECK_DLFCN 820126a8a12Smrg# ------------------ 821126a8a12SmrgAC_DEFUN([_LT_AC_CHECK_DLFCN], 822126a8a12Smrg[AC_CHECK_HEADERS(dlfcn.h)dnl 823126a8a12Smrg])# _LT_AC_CHECK_DLFCN 824126a8a12Smrg 825126a8a12Smrg 826126a8a12Smrg# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 827126a8a12Smrg# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 828126a8a12Smrg# --------------------------------------------------------------------- 829126a8a12SmrgAC_DEFUN([_LT_AC_TRY_DLOPEN_SELF], 830126a8a12Smrg[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl 831126a8a12Smrgif test "$cross_compiling" = yes; then : 832126a8a12Smrg [$4] 833126a8a12Smrgelse 834126a8a12Smrg lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 835126a8a12Smrg lt_status=$lt_dlunknown 836126a8a12Smrg cat > conftest.$ac_ext <<EOF 837126a8a12Smrg[#line __oline__ "configure" 838126a8a12Smrg#include "confdefs.h" 839126a8a12Smrg 840126a8a12Smrg#if HAVE_DLFCN_H 841126a8a12Smrg#include <dlfcn.h> 842126a8a12Smrg#endif 843126a8a12Smrg 844126a8a12Smrg#include <stdio.h> 845126a8a12Smrg 846126a8a12Smrg#ifdef RTLD_GLOBAL 847126a8a12Smrg# define LT_DLGLOBAL RTLD_GLOBAL 848126a8a12Smrg#else 849126a8a12Smrg# ifdef DL_GLOBAL 850126a8a12Smrg# define LT_DLGLOBAL DL_GLOBAL 851126a8a12Smrg# else 852126a8a12Smrg# define LT_DLGLOBAL 0 853126a8a12Smrg# endif 854126a8a12Smrg#endif 855126a8a12Smrg 856126a8a12Smrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 857126a8a12Smrg find out it does not work in some platform. */ 858126a8a12Smrg#ifndef LT_DLLAZY_OR_NOW 859126a8a12Smrg# ifdef RTLD_LAZY 860126a8a12Smrg# define LT_DLLAZY_OR_NOW RTLD_LAZY 861126a8a12Smrg# else 862126a8a12Smrg# ifdef DL_LAZY 863126a8a12Smrg# define LT_DLLAZY_OR_NOW DL_LAZY 864126a8a12Smrg# else 865126a8a12Smrg# ifdef RTLD_NOW 866126a8a12Smrg# define LT_DLLAZY_OR_NOW RTLD_NOW 867126a8a12Smrg# else 868126a8a12Smrg# ifdef DL_NOW 869126a8a12Smrg# define LT_DLLAZY_OR_NOW DL_NOW 870126a8a12Smrg# else 871126a8a12Smrg# define LT_DLLAZY_OR_NOW 0 872126a8a12Smrg# endif 873126a8a12Smrg# endif 874126a8a12Smrg# endif 875126a8a12Smrg# endif 876126a8a12Smrg#endif 877126a8a12Smrg 878126a8a12Smrg#ifdef __cplusplus 879126a8a12Smrgextern "C" void exit (int); 880126a8a12Smrg#endif 881126a8a12Smrg 882126a8a12Smrgvoid fnord() { int i=42;} 883126a8a12Smrgint main () 884126a8a12Smrg{ 885126a8a12Smrg void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 886126a8a12Smrg int status = $lt_dlunknown; 887126a8a12Smrg 888126a8a12Smrg if (self) 889126a8a12Smrg { 890126a8a12Smrg if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 891126a8a12Smrg else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 892126a8a12Smrg /* dlclose (self); */ 893126a8a12Smrg } 894126a8a12Smrg else 895126a8a12Smrg puts (dlerror ()); 896126a8a12Smrg 897126a8a12Smrg exit (status); 898126a8a12Smrg}] 899126a8a12SmrgEOF 900126a8a12Smrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then 901126a8a12Smrg (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 902126a8a12Smrg lt_status=$? 903126a8a12Smrg case x$lt_status in 904126a8a12Smrg x$lt_dlno_uscore) $1 ;; 905126a8a12Smrg x$lt_dlneed_uscore) $2 ;; 906126a8a12Smrg x$lt_dlunknown|x*) $3 ;; 907126a8a12Smrg esac 908126a8a12Smrg else : 909126a8a12Smrg # compilation failed 910126a8a12Smrg $3 911126a8a12Smrg fi 912126a8a12Smrgfi 913126a8a12Smrgrm -fr conftest* 914126a8a12Smrg])# _LT_AC_TRY_DLOPEN_SELF 915126a8a12Smrg 916126a8a12Smrg 917126a8a12Smrg# AC_LIBTOOL_DLOPEN_SELF 918126a8a12Smrg# ---------------------- 919126a8a12SmrgAC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], 920126a8a12Smrg[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl 921126a8a12Smrgif test "x$enable_dlopen" != xyes; then 922126a8a12Smrg enable_dlopen=unknown 923126a8a12Smrg enable_dlopen_self=unknown 924126a8a12Smrg enable_dlopen_self_static=unknown 925126a8a12Smrgelse 926126a8a12Smrg lt_cv_dlopen=no 927126a8a12Smrg lt_cv_dlopen_libs= 928126a8a12Smrg 929126a8a12Smrg case $host_os in 930126a8a12Smrg beos*) 931126a8a12Smrg lt_cv_dlopen="load_add_on" 932126a8a12Smrg lt_cv_dlopen_libs= 933126a8a12Smrg lt_cv_dlopen_self=yes 934126a8a12Smrg ;; 935126a8a12Smrg 936126a8a12Smrg mingw* | pw32*) 937126a8a12Smrg lt_cv_dlopen="LoadLibrary" 938126a8a12Smrg lt_cv_dlopen_libs= 939126a8a12Smrg ;; 940126a8a12Smrg 941126a8a12Smrg cygwin*) 942126a8a12Smrg lt_cv_dlopen="dlopen" 943126a8a12Smrg lt_cv_dlopen_libs= 944126a8a12Smrg ;; 945126a8a12Smrg 946126a8a12Smrg darwin*) 947126a8a12Smrg # if libdl is installed we need to link against it 948126a8a12Smrg AC_CHECK_LIB([dl], [dlopen], 949126a8a12Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ 950126a8a12Smrg lt_cv_dlopen="dyld" 951126a8a12Smrg lt_cv_dlopen_libs= 952126a8a12Smrg lt_cv_dlopen_self=yes 953126a8a12Smrg ]) 954126a8a12Smrg ;; 955126a8a12Smrg 956126a8a12Smrg *) 957126a8a12Smrg AC_CHECK_FUNC([shl_load], 958126a8a12Smrg [lt_cv_dlopen="shl_load"], 959126a8a12Smrg [AC_CHECK_LIB([dld], [shl_load], 960126a8a12Smrg [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"], 961126a8a12Smrg [AC_CHECK_FUNC([dlopen], 962126a8a12Smrg [lt_cv_dlopen="dlopen"], 963126a8a12Smrg [AC_CHECK_LIB([dl], [dlopen], 964126a8a12Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], 965126a8a12Smrg [AC_CHECK_LIB([svld], [dlopen], 966126a8a12Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], 967126a8a12Smrg [AC_CHECK_LIB([dld], [dld_link], 968126a8a12Smrg [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"]) 969126a8a12Smrg ]) 970126a8a12Smrg ]) 971126a8a12Smrg ]) 972126a8a12Smrg ]) 973126a8a12Smrg ]) 974126a8a12Smrg ;; 975126a8a12Smrg esac 976126a8a12Smrg 977126a8a12Smrg if test "x$lt_cv_dlopen" != xno; then 978126a8a12Smrg enable_dlopen=yes 979126a8a12Smrg else 980126a8a12Smrg enable_dlopen=no 981126a8a12Smrg fi 982126a8a12Smrg 983126a8a12Smrg case $lt_cv_dlopen in 984126a8a12Smrg dlopen) 985126a8a12Smrg save_CPPFLAGS="$CPPFLAGS" 986126a8a12Smrg test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 987126a8a12Smrg 988126a8a12Smrg save_LDFLAGS="$LDFLAGS" 989126a8a12Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 990126a8a12Smrg 991126a8a12Smrg save_LIBS="$LIBS" 992126a8a12Smrg LIBS="$lt_cv_dlopen_libs $LIBS" 993126a8a12Smrg 994126a8a12Smrg AC_CACHE_CHECK([whether a program can dlopen itself], 995126a8a12Smrg lt_cv_dlopen_self, [dnl 996126a8a12Smrg _LT_AC_TRY_DLOPEN_SELF( 997126a8a12Smrg lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 998126a8a12Smrg lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 999126a8a12Smrg ]) 1000126a8a12Smrg 1001126a8a12Smrg if test "x$lt_cv_dlopen_self" = xyes; then 1002126a8a12Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 1003126a8a12Smrg AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 1004126a8a12Smrg lt_cv_dlopen_self_static, [dnl 1005126a8a12Smrg _LT_AC_TRY_DLOPEN_SELF( 1006126a8a12Smrg lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 1007126a8a12Smrg lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 1008126a8a12Smrg ]) 1009126a8a12Smrg fi 1010126a8a12Smrg 1011126a8a12Smrg CPPFLAGS="$save_CPPFLAGS" 1012126a8a12Smrg LDFLAGS="$save_LDFLAGS" 1013126a8a12Smrg LIBS="$save_LIBS" 1014126a8a12Smrg ;; 1015126a8a12Smrg esac 1016126a8a12Smrg 1017126a8a12Smrg case $lt_cv_dlopen_self in 1018126a8a12Smrg yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 1019126a8a12Smrg *) enable_dlopen_self=unknown ;; 1020126a8a12Smrg esac 1021126a8a12Smrg 1022126a8a12Smrg case $lt_cv_dlopen_self_static in 1023126a8a12Smrg yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 1024126a8a12Smrg *) enable_dlopen_self_static=unknown ;; 1025126a8a12Smrg esac 1026126a8a12Smrgfi 1027126a8a12Smrg])# AC_LIBTOOL_DLOPEN_SELF 1028126a8a12Smrg 1029126a8a12Smrg 1030126a8a12Smrg# AC_LIBTOOL_PROG_CC_C_O([TAGNAME]) 1031126a8a12Smrg# --------------------------------- 1032126a8a12Smrg# Check to see if options -c and -o are simultaneously supported by compiler 1033126a8a12SmrgAC_DEFUN([AC_LIBTOOL_PROG_CC_C_O], 1034126a8a12Smrg[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl 1035126a8a12SmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 1036126a8a12Smrg [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 1037126a8a12Smrg [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 1038126a8a12Smrg $rm -r conftest 2>/dev/null 1039126a8a12Smrg mkdir conftest 1040126a8a12Smrg cd conftest 1041126a8a12Smrg mkdir out 1042126a8a12Smrg printf "$lt_simple_compile_test_code" > conftest.$ac_ext 1043126a8a12Smrg 1044126a8a12Smrg lt_compiler_flag="-o out/conftest2.$ac_objext" 1045126a8a12Smrg # Insert the option either (1) after the last *FLAGS variable, or 1046126a8a12Smrg # (2) before a word containing "conftest.", or (3) at the end. 1047126a8a12Smrg # Note that $ac_compile itself does not contain backslashes and begins 1048126a8a12Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 1049126a8a12Smrg lt_compile=`echo "$ac_compile" | $SED \ 1050126a8a12Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 1051126a8a12Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 1052126a8a12Smrg -e 's:$: $lt_compiler_flag:'` 1053126a8a12Smrg (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 1054126a8a12Smrg (eval "$lt_compile" 2>out/conftest.err) 1055126a8a12Smrg ac_status=$? 1056126a8a12Smrg cat out/conftest.err >&AS_MESSAGE_LOG_FD 1057126a8a12Smrg echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 1058126a8a12Smrg if (exit $ac_status) && test -s out/conftest2.$ac_objext 1059126a8a12Smrg then 1060126a8a12Smrg # The compiler can only warn and ignore the option if not recognized 1061126a8a12Smrg # So say no if there are warnings 1062126a8a12Smrg $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp 1063126a8a12Smrg $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 1064126a8a12Smrg if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 1065126a8a12Smrg _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 1066126a8a12Smrg fi 1067126a8a12Smrg fi 1068126a8a12Smrg chmod u+w . 2>&AS_MESSAGE_LOG_FD 1069126a8a12Smrg $rm conftest* 1070126a8a12Smrg # SGI C++ compiler will create directory out/ii_files/ for 1071126a8a12Smrg # template instantiation 1072126a8a12Smrg test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files 1073126a8a12Smrg $rm out/* && rmdir out 1074126a8a12Smrg cd .. 1075126a8a12Smrg rmdir conftest 1076126a8a12Smrg $rm conftest* 1077126a8a12Smrg]) 1078126a8a12Smrg])# AC_LIBTOOL_PROG_CC_C_O 1079126a8a12Smrg 1080126a8a12Smrg 1081126a8a12Smrg# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME]) 1082126a8a12Smrg# ----------------------------------------- 1083126a8a12Smrg# Check to see if we can do hard links to lock some files if needed 1084126a8a12SmrgAC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], 1085126a8a12Smrg[AC_REQUIRE([_LT_AC_LOCK])dnl 1086126a8a12Smrg 1087126a8a12Smrghard_links="nottested" 1088126a8a12Smrgif test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then 1089126a8a12Smrg # do not overwrite the value of need_locks provided by the user 1090126a8a12Smrg AC_MSG_CHECKING([if we can lock with hard links]) 1091126a8a12Smrg hard_links=yes 1092126a8a12Smrg $rm conftest* 1093126a8a12Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 1094126a8a12Smrg touch conftest.a 1095126a8a12Smrg ln conftest.a conftest.b 2>&5 || hard_links=no 1096126a8a12Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 1097126a8a12Smrg AC_MSG_RESULT([$hard_links]) 1098126a8a12Smrg if test "$hard_links" = no; then 1099126a8a12Smrg AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) 1100126a8a12Smrg need_locks=warn 1101126a8a12Smrg fi 1102126a8a12Smrgelse 1103126a8a12Smrg need_locks=no 1104126a8a12Smrgfi 1105126a8a12Smrg])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS 1106126a8a12Smrg 1107126a8a12Smrg 1108126a8a12Smrg# AC_LIBTOOL_OBJDIR 1109126a8a12Smrg# ----------------- 1110126a8a12SmrgAC_DEFUN([AC_LIBTOOL_OBJDIR], 1111126a8a12Smrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 1112126a8a12Smrg[rm -f .libs 2>/dev/null 1113126a8a12Smrgmkdir .libs 2>/dev/null 1114126a8a12Smrgif test -d .libs; then 1115126a8a12Smrg lt_cv_objdir=.libs 1116126a8a12Smrgelse 1117126a8a12Smrg # MS-DOS does not allow filenames that begin with a dot. 1118126a8a12Smrg lt_cv_objdir=_libs 1119126a8a12Smrgfi 1120126a8a12Smrgrmdir .libs 2>/dev/null]) 1121126a8a12Smrgobjdir=$lt_cv_objdir 1122126a8a12Smrg])# AC_LIBTOOL_OBJDIR 1123126a8a12Smrg 1124126a8a12Smrg 1125126a8a12Smrg# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME]) 1126126a8a12Smrg# ---------------------------------------------- 1127126a8a12Smrg# Check hardcoding attributes. 1128126a8a12SmrgAC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], 1129126a8a12Smrg[AC_MSG_CHECKING([how to hardcode library paths into programs]) 1130126a8a12Smrg_LT_AC_TAGVAR(hardcode_action, $1)= 1131126a8a12Smrgif test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \ 1132126a8a12Smrg test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \ 1133126a8a12Smrg test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then 1134126a8a12Smrg 1135126a8a12Smrg # We can hardcode non-existant directories. 1136126a8a12Smrg if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no && 1137126a8a12Smrg # If the only mechanism to avoid hardcoding is shlibpath_var, we 1138126a8a12Smrg # have to relink, otherwise we might link with an installed library 1139126a8a12Smrg # when we should be linking with a yet-to-be-installed one 1140126a8a12Smrg ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no && 1141126a8a12Smrg test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then 1142126a8a12Smrg # Linking always hardcodes the temporary library directory. 1143126a8a12Smrg _LT_AC_TAGVAR(hardcode_action, $1)=relink 1144126a8a12Smrg else 1145126a8a12Smrg # We can link without hardcoding, and we can hardcode nonexisting dirs. 1146126a8a12Smrg _LT_AC_TAGVAR(hardcode_action, $1)=immediate 1147126a8a12Smrg fi 1148126a8a12Smrgelse 1149126a8a12Smrg # We cannot hardcode anything, or else we can only hardcode existing 1150126a8a12Smrg # directories. 1151126a8a12Smrg _LT_AC_TAGVAR(hardcode_action, $1)=unsupported 1152126a8a12Smrgfi 1153126a8a12SmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)]) 1154126a8a12Smrg 1155126a8a12Smrgif test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then 1156126a8a12Smrg # Fast installation is not supported 1157126a8a12Smrg enable_fast_install=no 1158126a8a12Smrgelif test "$shlibpath_overrides_runpath" = yes || 1159126a8a12Smrg test "$enable_shared" = no; then 1160126a8a12Smrg # Fast installation is not necessary 1161126a8a12Smrg enable_fast_install=needless 1162126a8a12Smrgfi 1163126a8a12Smrg])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH 1164126a8a12Smrg 1165126a8a12Smrg 1166126a8a12Smrg# AC_LIBTOOL_SYS_LIB_STRIP 1167126a8a12Smrg# ------------------------ 1168126a8a12SmrgAC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP], 1169126a8a12Smrg[striplib= 1170126a8a12Smrgold_striplib= 1171126a8a12SmrgAC_MSG_CHECKING([whether stripping libraries is possible]) 1172126a8a12Smrgif test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then 1173126a8a12Smrg test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" 1174126a8a12Smrg test -z "$striplib" && striplib="$STRIP --strip-unneeded" 1175126a8a12Smrg AC_MSG_RESULT([yes]) 1176126a8a12Smrgelse 1177126a8a12Smrg# FIXME - insert some real tests, host_os isn't really good enough 1178126a8a12Smrg case $host_os in 1179126a8a12Smrg darwin*) 1180126a8a12Smrg if test -n "$STRIP" ; then 1181126a8a12Smrg striplib="$STRIP -x" 1182126a8a12Smrg AC_MSG_RESULT([yes]) 1183126a8a12Smrg else 1184126a8a12Smrg AC_MSG_RESULT([no]) 1185126a8a12Smrgfi 1186126a8a12Smrg ;; 1187126a8a12Smrg *) 1188126a8a12Smrg AC_MSG_RESULT([no]) 1189126a8a12Smrg ;; 1190126a8a12Smrg esac 1191126a8a12Smrgfi 1192126a8a12Smrg])# AC_LIBTOOL_SYS_LIB_STRIP 1193126a8a12Smrg 1194126a8a12Smrg 1195126a8a12Smrg# AC_LIBTOOL_SYS_DYNAMIC_LINKER 1196126a8a12Smrg# ----------------------------- 1197126a8a12Smrg# PORTME Fill in your ld.so characteristics 1198126a8a12SmrgAC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER], 1199126a8a12Smrg[AC_MSG_CHECKING([dynamic linker characteristics]) 1200126a8a12Smrglibrary_names_spec= 1201126a8a12Smrglibname_spec='lib$name' 1202126a8a12Smrgsoname_spec= 1203126a8a12Smrgshrext_cmds=".so" 1204126a8a12Smrgpostinstall_cmds= 1205126a8a12Smrgpostuninstall_cmds= 1206126a8a12Smrgfinish_cmds= 1207126a8a12Smrgfinish_eval= 1208126a8a12Smrgshlibpath_var= 1209126a8a12Smrgshlibpath_overrides_runpath=unknown 1210126a8a12Smrgversion_type=none 1211126a8a12Smrgdynamic_linker="$host_os ld.so" 1212126a8a12Smrgsys_lib_dlsearch_path_spec="/lib /usr/lib" 1213126a8a12Smrgif test "$GCC" = yes; then 1214126a8a12Smrg sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` 1215126a8a12Smrg if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then 1216126a8a12Smrg # if the path contains ";" then we assume it to be the separator 1217126a8a12Smrg # otherwise default to the standard path separator (i.e. ":") - it is 1218126a8a12Smrg # assumed that no part of a normal pathname contains ";" but that should 1219126a8a12Smrg # okay in the real world where ";" in dirpaths is itself problematic. 1220126a8a12Smrg sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 1221126a8a12Smrg else 1222126a8a12Smrg sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 1223126a8a12Smrg fi 1224126a8a12Smrgelse 1225126a8a12Smrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 1226126a8a12Smrgfi 1227126a8a12Smrgneed_lib_prefix=unknown 1228126a8a12Smrghardcode_into_libs=no 1229126a8a12Smrg 1230126a8a12Smrg# when you set need_version to no, make sure it does not cause -set_version 1231126a8a12Smrg# flags to be left without arguments 1232126a8a12Smrgneed_version=unknown 1233126a8a12Smrg 1234126a8a12Smrgcase $host_os in 1235126a8a12Smrgaix3*) 1236126a8a12Smrg version_type=linux 1237126a8a12Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' 1238126a8a12Smrg shlibpath_var=LIBPATH 1239126a8a12Smrg 1240126a8a12Smrg # AIX 3 has no versioning support, so we append a major version to the name. 1241126a8a12Smrg soname_spec='${libname}${release}${shared_ext}$major' 1242126a8a12Smrg ;; 1243126a8a12Smrg 1244126a8a12Smrgaix4* | aix5*) 1245126a8a12Smrg version_type=linux 1246126a8a12Smrg need_lib_prefix=no 1247126a8a12Smrg need_version=no 1248126a8a12Smrg hardcode_into_libs=yes 1249126a8a12Smrg if test "$host_cpu" = ia64; then 1250126a8a12Smrg # AIX 5 supports IA64 1251126a8a12Smrg library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' 1252126a8a12Smrg shlibpath_var=LD_LIBRARY_PATH 1253126a8a12Smrg else 1254126a8a12Smrg # With GCC up to 2.95.x, collect2 would create an import file 1255126a8a12Smrg # for dependence libraries. The import file would start with 1256126a8a12Smrg # the line `#! .'. This would cause the generated library to 1257126a8a12Smrg # depend on `.', always an invalid library. This was fixed in 1258126a8a12Smrg # development snapshots of GCC prior to 3.0. 1259126a8a12Smrg case $host_os in 1260126a8a12Smrg aix4 | aix4.[[01]] | aix4.[[01]].*) 1261126a8a12Smrg if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 1262126a8a12Smrg echo ' yes ' 1263126a8a12Smrg echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then 1264126a8a12Smrg : 1265126a8a12Smrg else 1266126a8a12Smrg can_build_shared=no 1267126a8a12Smrg fi 1268126a8a12Smrg ;; 1269126a8a12Smrg esac 1270126a8a12Smrg # AIX (on Power*) has no versioning support, so currently we can not hardcode correct 1271126a8a12Smrg # soname into executable. Probably we can add versioning support to 1272126a8a12Smrg # collect2, so additional links can be useful in future. 1273126a8a12Smrg if test "$aix_use_runtimelinking" = yes; then 1274126a8a12Smrg # If using run time linking (on AIX 4.2 or later) use lib<name>.so 1275126a8a12Smrg # instead of lib<name>.a to let people know that these are not 1276126a8a12Smrg # typical AIX shared libraries. 1277126a8a12Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 1278126a8a12Smrg else 1279126a8a12Smrg # We preserve .a as extension for shared libraries through AIX4.2 1280126a8a12Smrg # and later when we are not doing run time linking. 1281126a8a12Smrg library_names_spec='${libname}${release}.a $libname.a' 1282126a8a12Smrg soname_spec='${libname}${release}${shared_ext}$major' 1283126a8a12Smrg fi 1284126a8a12Smrg shlibpath_var=LIBPATH 1285126a8a12Smrg fi 1286126a8a12Smrg ;; 1287126a8a12Smrg 1288126a8a12Smrgamigaos*) 1289126a8a12Smrg library_names_spec='$libname.ixlibrary $libname.a' 1290126a8a12Smrg # Create ${libname}_ixlibrary.a entries in /sys/libs. 1291126a8a12Smrg 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' 1292126a8a12Smrg ;; 1293126a8a12Smrg 1294126a8a12Smrgbeos*) 1295126a8a12Smrg library_names_spec='${libname}${shared_ext}' 1296126a8a12Smrg dynamic_linker="$host_os ld.so" 1297126a8a12Smrg shlibpath_var=LIBRARY_PATH 1298126a8a12Smrg ;; 1299126a8a12Smrg 1300126a8a12Smrgbsdi[[45]]*) 1301126a8a12Smrg version_type=linux 1302126a8a12Smrg need_version=no 1303126a8a12Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 1304126a8a12Smrg soname_spec='${libname}${release}${shared_ext}$major' 1305126a8a12Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 1306126a8a12Smrg shlibpath_var=LD_LIBRARY_PATH 1307126a8a12Smrg sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 1308126a8a12Smrg sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 1309126a8a12Smrg # the default ld.so.conf also contains /usr/contrib/lib and 1310126a8a12Smrg # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 1311126a8a12Smrg # libtool to hard-code these into programs 1312126a8a12Smrg ;; 1313126a8a12Smrg 1314126a8a12Smrgcygwin* | mingw* | pw32*) 1315126a8a12Smrg version_type=windows 1316126a8a12Smrg shrext_cmds=".dll" 1317126a8a12Smrg need_version=no 1318126a8a12Smrg need_lib_prefix=no 1319126a8a12Smrg 1320126a8a12Smrg case $GCC,$host_os in 1321126a8a12Smrg yes,cygwin* | yes,mingw* | yes,pw32*) 1322126a8a12Smrg library_names_spec='$libname.dll.a' 1323126a8a12Smrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 1324126a8a12Smrg postinstall_cmds='base_file=`basename \${file}`~ 1325126a8a12Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ 1326126a8a12Smrg dldir=$destdir/`dirname \$dlpath`~ 1327126a8a12Smrg test -d \$dldir || mkdir -p \$dldir~ 1328126a8a12Smrg $install_prog $dir/$dlname \$dldir/$dlname~ 1329126a8a12Smrg chmod a+x \$dldir/$dlname' 1330126a8a12Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 1331126a8a12Smrg dlpath=$dir/\$dldll~ 1332126a8a12Smrg $rm \$dlpath' 1333126a8a12Smrg shlibpath_overrides_runpath=yes 1334126a8a12Smrg 1335126a8a12Smrg case $host_os in 1336126a8a12Smrg cygwin*) 1337126a8a12Smrg # Cygwin DLLs use 'cyg' prefix rather than 'lib' 1338126a8a12Smrg soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 1339126a8a12Smrg sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" 1340126a8a12Smrg ;; 1341126a8a12Smrg mingw*) 1342126a8a12Smrg # MinGW DLLs use traditional 'lib' prefix 1343126a8a12Smrg soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 1344126a8a12Smrg sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` 1345126a8a12Smrg if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then 1346126a8a12Smrg # It is most probably a Windows format PATH printed by 1347126a8a12Smrg # mingw gcc, but we are running on Cygwin. Gcc prints its search 1348126a8a12Smrg # path with ; separators, and with drive letters. We can handle the 1349126a8a12Smrg # drive letters (cygwin fileutils understands them), so leave them, 1350126a8a12Smrg # especially as we might pass files found there to a mingw objdump, 1351126a8a12Smrg # which wouldn't understand a cygwinified path. Ahh. 1352126a8a12Smrg sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 1353126a8a12Smrg else 1354126a8a12Smrg sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 1355126a8a12Smrg fi 1356126a8a12Smrg ;; 1357126a8a12Smrg pw32*) 1358126a8a12Smrg # pw32 DLLs use 'pw' prefix rather than 'lib' 1359126a8a12Smrg library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 1360126a8a12Smrg ;; 1361126a8a12Smrg esac 1362126a8a12Smrg ;; 1363126a8a12Smrg 1364126a8a12Smrg *) 1365126a8a12Smrg library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' 1366126a8a12Smrg ;; 1367126a8a12Smrg esac 1368126a8a12Smrg dynamic_linker='Win32 ld.exe' 1369126a8a12Smrg # FIXME: first we should search . and the directory the executable is in 1370126a8a12Smrg shlibpath_var=PATH 1371126a8a12Smrg ;; 1372126a8a12Smrg 1373126a8a12Smrgdarwin* | rhapsody*) 1374126a8a12Smrg dynamic_linker="$host_os dyld" 1375126a8a12Smrg version_type=darwin 1376126a8a12Smrg need_lib_prefix=no 1377126a8a12Smrg need_version=no 1378126a8a12Smrg library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' 1379126a8a12Smrg soname_spec='${libname}${release}${major}$shared_ext' 1380126a8a12Smrg shlibpath_overrides_runpath=yes 1381126a8a12Smrg shlibpath_var=DYLD_LIBRARY_PATH 1382126a8a12Smrg shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 1383126a8a12Smrg # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. 1384126a8a12Smrg if test "$GCC" = yes; then 1385126a8a12Smrg 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"` 1386126a8a12Smrg else 1387126a8a12Smrg sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' 1388126a8a12Smrg fi 1389126a8a12Smrg sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 1390126a8a12Smrg ;; 1391126a8a12Smrg 1392126a8a12Smrgdgux*) 1393126a8a12Smrg version_type=linux 1394126a8a12Smrg need_lib_prefix=no 1395126a8a12Smrg need_version=no 1396126a8a12Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' 1397126a8a12Smrg soname_spec='${libname}${release}${shared_ext}$major' 1398126a8a12Smrg shlibpath_var=LD_LIBRARY_PATH 1399126a8a12Smrg ;; 1400126a8a12Smrg 1401126a8a12Smrgfreebsd1*) 1402126a8a12Smrg dynamic_linker=no 1403126a8a12Smrg ;; 1404126a8a12Smrg 1405126a8a12Smrgkfreebsd*-gnu) 1406126a8a12Smrg version_type=linux 1407126a8a12Smrg need_lib_prefix=no 1408126a8a12Smrg need_version=no 1409126a8a12Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 1410126a8a12Smrg soname_spec='${libname}${release}${shared_ext}$major' 1411126a8a12Smrg shlibpath_var=LD_LIBRARY_PATH 1412126a8a12Smrg shlibpath_overrides_runpath=no 1413126a8a12Smrg hardcode_into_libs=yes 1414126a8a12Smrg dynamic_linker='GNU ld.so' 1415126a8a12Smrg ;; 1416126a8a12Smrg 1417126a8a12Smrgfreebsd* | dragonfly*) 1418126a8a12Smrg # DragonFly does not have aout. When/if they implement a new 1419126a8a12Smrg # versioning mechanism, adjust this. 1420126a8a12Smrg if test -x /usr/bin/objformat; then 1421126a8a12Smrg objformat=`/usr/bin/objformat` 1422126a8a12Smrg else 1423126a8a12Smrg case $host_os in 1424126a8a12Smrg freebsd[[123]]*) objformat=aout ;; 1425126a8a12Smrg *) objformat=elf ;; 1426126a8a12Smrg esac 1427126a8a12Smrg fi 1428126a8a12Smrg version_type=freebsd-$objformat 1429126a8a12Smrg case $version_type in 1430126a8a12Smrg freebsd-elf*) 1431126a8a12Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 1432126a8a12Smrg need_version=no 1433126a8a12Smrg need_lib_prefix=no 1434126a8a12Smrg ;; 1435126a8a12Smrg freebsd-*) 1436126a8a12Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' 1437126a8a12Smrg need_version=yes 1438126a8a12Smrg ;; 1439126a8a12Smrg esac 1440126a8a12Smrg shlibpath_var=LD_LIBRARY_PATH 1441126a8a12Smrg case $host_os in 1442126a8a12Smrg freebsd2*) 1443126a8a12Smrg shlibpath_overrides_runpath=yes 1444126a8a12Smrg ;; 1445126a8a12Smrg freebsd3.[[01]]* | freebsdelf3.[[01]]*) 1446126a8a12Smrg shlibpath_overrides_runpath=yes 1447126a8a12Smrg hardcode_into_libs=yes 1448126a8a12Smrg ;; 1449126a8a12Smrg freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 1450126a8a12Smrg freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 1451126a8a12Smrg shlibpath_overrides_runpath=no 1452126a8a12Smrg hardcode_into_libs=yes 1453126a8a12Smrg ;; 1454126a8a12Smrg freebsd*) # from 4.6 on 1455126a8a12Smrg shlibpath_overrides_runpath=yes 1456126a8a12Smrg hardcode_into_libs=yes 1457126a8a12Smrg ;; 1458126a8a12Smrg esac 1459126a8a12Smrg ;; 1460126a8a12Smrg 1461126a8a12Smrggnu*) 1462126a8a12Smrg version_type=linux 1463126a8a12Smrg need_lib_prefix=no 1464126a8a12Smrg need_version=no 1465126a8a12Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 1466126a8a12Smrg soname_spec='${libname}${release}${shared_ext}$major' 1467126a8a12Smrg shlibpath_var=LD_LIBRARY_PATH 1468126a8a12Smrg hardcode_into_libs=yes 1469126a8a12Smrg ;; 1470126a8a12Smrg 1471126a8a12Smrghpux9* | hpux10* | hpux11*) 1472126a8a12Smrg # Give a soname corresponding to the major version so that dld.sl refuses to 1473126a8a12Smrg # link against other versions. 1474126a8a12Smrg version_type=sunos 1475126a8a12Smrg need_lib_prefix=no 1476126a8a12Smrg need_version=no 1477126a8a12Smrg case $host_cpu in 1478126a8a12Smrg ia64*) 1479126a8a12Smrg shrext_cmds='.so' 1480126a8a12Smrg hardcode_into_libs=yes 1481126a8a12Smrg dynamic_linker="$host_os dld.so" 1482126a8a12Smrg shlibpath_var=LD_LIBRARY_PATH 1483126a8a12Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 1484126a8a12Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 1485126a8a12Smrg soname_spec='${libname}${release}${shared_ext}$major' 1486126a8a12Smrg if test "X$HPUX_IA64_MODE" = X32; then 1487126a8a12Smrg sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 1488126a8a12Smrg else 1489126a8a12Smrg sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 1490126a8a12Smrg fi 1491126a8a12Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 1492126a8a12Smrg ;; 1493126a8a12Smrg hppa*64*) 1494126a8a12Smrg shrext_cmds='.sl' 1495126a8a12Smrg hardcode_into_libs=yes 1496126a8a12Smrg dynamic_linker="$host_os dld.sl" 1497126a8a12Smrg shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 1498126a8a12Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 1499126a8a12Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 1500126a8a12Smrg soname_spec='${libname}${release}${shared_ext}$major' 1501126a8a12Smrg sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 1502126a8a12Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 1503126a8a12Smrg ;; 1504126a8a12Smrg *) 1505126a8a12Smrg shrext_cmds='.sl' 1506126a8a12Smrg dynamic_linker="$host_os dld.sl" 1507126a8a12Smrg shlibpath_var=SHLIB_PATH 1508126a8a12Smrg shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 1509126a8a12Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 1510126a8a12Smrg soname_spec='${libname}${release}${shared_ext}$major' 1511126a8a12Smrg ;; 1512126a8a12Smrg esac 1513126a8a12Smrg # HP-UX runs *really* slowly unless shared libraries are mode 555. 1514126a8a12Smrg postinstall_cmds='chmod 555 $lib' 1515126a8a12Smrg ;; 1516126a8a12Smrg 1517126a8a12Smrginterix3*) 1518126a8a12Smrg version_type=linux 1519126a8a12Smrg need_lib_prefix=no 1520126a8a12Smrg need_version=no 1521126a8a12Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 1522126a8a12Smrg soname_spec='${libname}${release}${shared_ext}$major' 1523126a8a12Smrg dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 1524126a8a12Smrg shlibpath_var=LD_LIBRARY_PATH 1525126a8a12Smrg shlibpath_overrides_runpath=no 1526126a8a12Smrg hardcode_into_libs=yes 1527126a8a12Smrg ;; 1528126a8a12Smrg 1529126a8a12Smrgirix5* | irix6* | nonstopux*) 1530126a8a12Smrg case $host_os in 1531126a8a12Smrg nonstopux*) version_type=nonstopux ;; 1532126a8a12Smrg *) 1533126a8a12Smrg if test "$lt_cv_prog_gnu_ld" = yes; then 1534126a8a12Smrg version_type=linux 1535126a8a12Smrg else 1536126a8a12Smrg version_type=irix 1537126a8a12Smrg fi ;; 1538126a8a12Smrg esac 1539126a8a12Smrg need_lib_prefix=no 1540126a8a12Smrg need_version=no 1541126a8a12Smrg soname_spec='${libname}${release}${shared_ext}$major' 1542126a8a12Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' 1543126a8a12Smrg case $host_os in 1544126a8a12Smrg irix5* | nonstopux*) 1545126a8a12Smrg libsuff= shlibsuff= 1546126a8a12Smrg ;; 1547126a8a12Smrg *) 1548126a8a12Smrg case $LD in # libtool.m4 will add one of these switches to LD 1549126a8a12Smrg *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 1550126a8a12Smrg libsuff= shlibsuff= libmagic=32-bit;; 1551126a8a12Smrg *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 1552126a8a12Smrg libsuff=32 shlibsuff=N32 libmagic=N32;; 1553126a8a12Smrg *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 1554126a8a12Smrg libsuff=64 shlibsuff=64 libmagic=64-bit;; 1555126a8a12Smrg *) libsuff= shlibsuff= libmagic=never-match;; 1556126a8a12Smrg esac 1557126a8a12Smrg ;; 1558126a8a12Smrg esac 1559126a8a12Smrg shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 1560126a8a12Smrg shlibpath_overrides_runpath=no 1561126a8a12Smrg sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" 1562126a8a12Smrg sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" 1563126a8a12Smrg hardcode_into_libs=yes 1564126a8a12Smrg ;; 1565126a8a12Smrg 1566126a8a12Smrg# No shared lib support for Linux oldld, aout, or coff. 1567126a8a12Smrglinux*oldld* | linux*aout* | linux*coff*) 1568126a8a12Smrg dynamic_linker=no 1569126a8a12Smrg ;; 1570126a8a12Smrg 1571126a8a12Smrg# This must be Linux ELF. 1572126a8a12Smrglinux*) 1573126a8a12Smrg version_type=linux 1574126a8a12Smrg need_lib_prefix=no 1575126a8a12Smrg need_version=no 1576126a8a12Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 1577126a8a12Smrg soname_spec='${libname}${release}${shared_ext}$major' 1578126a8a12Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 1579126a8a12Smrg shlibpath_var=LD_LIBRARY_PATH 1580126a8a12Smrg shlibpath_overrides_runpath=no 1581126a8a12Smrg # This implies no fast_install, which is unacceptable. 1582126a8a12Smrg # Some rework will be needed to allow for fast_install 1583126a8a12Smrg # before this can be enabled. 1584126a8a12Smrg hardcode_into_libs=yes 1585126a8a12Smrg 1586126a8a12Smrg # Append ld.so.conf contents to the search path 1587126a8a12Smrg if test -f /etc/ld.so.conf; then 1588126a8a12Smrg 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' ' '` 1589126a8a12Smrg sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" 1590126a8a12Smrg fi 1591126a8a12Smrg 1592126a8a12Smrg # We used to test for /lib/ld.so.1 and disable shared libraries on 1593126a8a12Smrg # powerpc, because MkLinux only supported shared libraries with the 1594126a8a12Smrg # GNU dynamic linker. Since this was broken with cross compilers, 1595126a8a12Smrg # most powerpc-linux boxes support dynamic linking these days and 1596126a8a12Smrg # people can always --disable-shared, the test was removed, and we 1597126a8a12Smrg # assume the GNU/Linux dynamic linker is in use. 1598126a8a12Smrg dynamic_linker='GNU/Linux ld.so' 1599126a8a12Smrg ;; 1600126a8a12Smrg 1601126a8a12Smrgknetbsd*-gnu) 1602126a8a12Smrg version_type=linux 1603126a8a12Smrg need_lib_prefix=no 1604126a8a12Smrg need_version=no 1605126a8a12Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 1606126a8a12Smrg soname_spec='${libname}${release}${shared_ext}$major' 1607126a8a12Smrg shlibpath_var=LD_LIBRARY_PATH 1608126a8a12Smrg shlibpath_overrides_runpath=no 1609126a8a12Smrg hardcode_into_libs=yes 1610126a8a12Smrg dynamic_linker='GNU ld.so' 1611126a8a12Smrg ;; 1612126a8a12Smrg 1613126a8a12Smrgnetbsd*) 1614126a8a12Smrg version_type=sunos 1615126a8a12Smrg need_lib_prefix=no 1616126a8a12Smrg need_version=no 1617126a8a12Smrg if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then 1618126a8a12Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 1619126a8a12Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 1620126a8a12Smrg dynamic_linker='NetBSD (a.out) ld.so' 1621126a8a12Smrg else 1622126a8a12Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 1623126a8a12Smrg soname_spec='${libname}${release}${shared_ext}$major' 1624126a8a12Smrg dynamic_linker='NetBSD ld.elf_so' 1625126a8a12Smrg fi 1626126a8a12Smrg shlibpath_var=LD_LIBRARY_PATH 1627126a8a12Smrg shlibpath_overrides_runpath=yes 1628126a8a12Smrg hardcode_into_libs=yes 1629126a8a12Smrg ;; 1630126a8a12Smrg 1631126a8a12Smrgnewsos6) 1632126a8a12Smrg version_type=linux 1633126a8a12Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 1634126a8a12Smrg shlibpath_var=LD_LIBRARY_PATH 1635126a8a12Smrg shlibpath_overrides_runpath=yes 1636126a8a12Smrg ;; 1637126a8a12Smrg 1638126a8a12Smrgnto-qnx*) 1639126a8a12Smrg version_type=linux 1640126a8a12Smrg need_lib_prefix=no 1641126a8a12Smrg need_version=no 1642126a8a12Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 1643126a8a12Smrg soname_spec='${libname}${release}${shared_ext}$major' 1644126a8a12Smrg shlibpath_var=LD_LIBRARY_PATH 1645126a8a12Smrg shlibpath_overrides_runpath=yes 1646126a8a12Smrg ;; 1647126a8a12Smrg 1648126a8a12Smrgopenbsd*) 1649126a8a12Smrg version_type=sunos 1650126a8a12Smrg sys_lib_dlsearch_path_spec="/usr/lib" 1651126a8a12Smrg need_lib_prefix=no 1652126a8a12Smrg # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. 1653126a8a12Smrg case $host_os in 1654126a8a12Smrg openbsd3.3 | openbsd3.3.*) need_version=yes ;; 1655126a8a12Smrg *) need_version=no ;; 1656126a8a12Smrg esac 1657126a8a12Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 1658126a8a12Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 1659126a8a12Smrg shlibpath_var=LD_LIBRARY_PATH 1660126a8a12Smrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 1661126a8a12Smrg case $host_os in 1662126a8a12Smrg openbsd2.[[89]] | openbsd2.[[89]].*) 1663126a8a12Smrg shlibpath_overrides_runpath=no 1664126a8a12Smrg ;; 1665126a8a12Smrg *) 1666126a8a12Smrg shlibpath_overrides_runpath=yes 1667126a8a12Smrg ;; 1668126a8a12Smrg esac 1669126a8a12Smrg else 1670126a8a12Smrg shlibpath_overrides_runpath=yes 1671126a8a12Smrg fi 1672126a8a12Smrg ;; 1673126a8a12Smrg 1674126a8a12Smrgos2*) 1675126a8a12Smrg libname_spec='$name' 1676126a8a12Smrg shrext_cmds=".dll" 1677126a8a12Smrg need_lib_prefix=no 1678126a8a12Smrg library_names_spec='$libname${shared_ext} $libname.a' 1679126a8a12Smrg dynamic_linker='OS/2 ld.exe' 1680126a8a12Smrg shlibpath_var=LIBPATH 1681126a8a12Smrg ;; 1682126a8a12Smrg 1683126a8a12Smrgosf3* | osf4* | osf5*) 1684126a8a12Smrg version_type=osf 1685126a8a12Smrg need_lib_prefix=no 1686126a8a12Smrg need_version=no 1687126a8a12Smrg soname_spec='${libname}${release}${shared_ext}$major' 1688126a8a12Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 1689126a8a12Smrg shlibpath_var=LD_LIBRARY_PATH 1690126a8a12Smrg sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 1691126a8a12Smrg sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" 1692126a8a12Smrg ;; 1693126a8a12Smrg 1694126a8a12Smrgsolaris*) 1695126a8a12Smrg version_type=linux 1696126a8a12Smrg need_lib_prefix=no 1697126a8a12Smrg need_version=no 1698126a8a12Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 1699126a8a12Smrg soname_spec='${libname}${release}${shared_ext}$major' 1700126a8a12Smrg shlibpath_var=LD_LIBRARY_PATH 1701126a8a12Smrg shlibpath_overrides_runpath=yes 1702126a8a12Smrg hardcode_into_libs=yes 1703126a8a12Smrg # ldd complains unless libraries are executable 1704126a8a12Smrg postinstall_cmds='chmod +x $lib' 1705126a8a12Smrg ;; 1706126a8a12Smrg 1707126a8a12Smrgsunos4*) 1708126a8a12Smrg version_type=sunos 1709126a8a12Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 1710126a8a12Smrg finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 1711126a8a12Smrg shlibpath_var=LD_LIBRARY_PATH 1712126a8a12Smrg shlibpath_overrides_runpath=yes 1713126a8a12Smrg if test "$with_gnu_ld" = yes; then 1714126a8a12Smrg need_lib_prefix=no 1715126a8a12Smrg fi 1716126a8a12Smrg need_version=yes 1717126a8a12Smrg ;; 1718126a8a12Smrg 1719126a8a12Smrgsysv4 | sysv4.3*) 1720126a8a12Smrg version_type=linux 1721126a8a12Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 1722126a8a12Smrg soname_spec='${libname}${release}${shared_ext}$major' 1723126a8a12Smrg shlibpath_var=LD_LIBRARY_PATH 1724126a8a12Smrg case $host_vendor in 1725126a8a12Smrg sni) 1726126a8a12Smrg shlibpath_overrides_runpath=no 1727126a8a12Smrg need_lib_prefix=no 1728126a8a12Smrg export_dynamic_flag_spec='${wl}-Blargedynsym' 1729126a8a12Smrg runpath_var=LD_RUN_PATH 1730126a8a12Smrg ;; 1731126a8a12Smrg siemens) 1732126a8a12Smrg need_lib_prefix=no 1733126a8a12Smrg ;; 1734126a8a12Smrg motorola) 1735126a8a12Smrg need_lib_prefix=no 1736126a8a12Smrg need_version=no 1737126a8a12Smrg shlibpath_overrides_runpath=no 1738126a8a12Smrg sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 1739126a8a12Smrg ;; 1740126a8a12Smrg esac 1741126a8a12Smrg ;; 1742126a8a12Smrg 1743126a8a12Smrgsysv4*MP*) 1744126a8a12Smrg if test -d /usr/nec ;then 1745126a8a12Smrg version_type=linux 1746126a8a12Smrg library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' 1747126a8a12Smrg soname_spec='$libname${shared_ext}.$major' 1748126a8a12Smrg shlibpath_var=LD_LIBRARY_PATH 1749126a8a12Smrg fi 1750126a8a12Smrg ;; 1751126a8a12Smrg 1752126a8a12Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 1753126a8a12Smrg version_type=freebsd-elf 1754126a8a12Smrg need_lib_prefix=no 1755126a8a12Smrg need_version=no 1756126a8a12Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 1757126a8a12Smrg soname_spec='${libname}${release}${shared_ext}$major' 1758126a8a12Smrg shlibpath_var=LD_LIBRARY_PATH 1759126a8a12Smrg hardcode_into_libs=yes 1760126a8a12Smrg if test "$with_gnu_ld" = yes; then 1761126a8a12Smrg sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 1762126a8a12Smrg shlibpath_overrides_runpath=no 1763126a8a12Smrg else 1764126a8a12Smrg sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 1765126a8a12Smrg shlibpath_overrides_runpath=yes 1766126a8a12Smrg case $host_os in 1767126a8a12Smrg sco3.2v5*) 1768126a8a12Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 1769126a8a12Smrg ;; 1770126a8a12Smrg esac 1771126a8a12Smrg fi 1772126a8a12Smrg sys_lib_dlsearch_path_spec='/usr/lib' 1773126a8a12Smrg ;; 1774126a8a12Smrg 1775126a8a12Smrguts4*) 1776126a8a12Smrg version_type=linux 1777126a8a12Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 1778126a8a12Smrg soname_spec='${libname}${release}${shared_ext}$major' 1779126a8a12Smrg shlibpath_var=LD_LIBRARY_PATH 1780126a8a12Smrg ;; 1781126a8a12Smrg 1782126a8a12Smrg*) 1783126a8a12Smrg dynamic_linker=no 1784126a8a12Smrg ;; 1785126a8a12Smrgesac 1786126a8a12SmrgAC_MSG_RESULT([$dynamic_linker]) 1787126a8a12Smrgtest "$dynamic_linker" = no && can_build_shared=no 1788126a8a12Smrg 1789126a8a12Smrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var" 1790126a8a12Smrgif test "$GCC" = yes; then 1791126a8a12Smrg variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 1792126a8a12Smrgfi 1793126a8a12Smrg])# AC_LIBTOOL_SYS_DYNAMIC_LINKER 1794126a8a12Smrg 1795126a8a12Smrg 1796126a8a12Smrg# _LT_AC_TAGCONFIG 1797126a8a12Smrg# ---------------- 1798126a8a12SmrgAC_DEFUN([_LT_AC_TAGCONFIG], 1799126a8a12Smrg[AC_ARG_WITH([tags], 1800126a8a12Smrg [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@], 1801126a8a12Smrg [include additional configurations @<:@automatic@:>@])], 1802126a8a12Smrg [tagnames="$withval"]) 1803126a8a12Smrg 1804126a8a12Smrgif test -f "$ltmain" && test -n "$tagnames"; then 1805126a8a12Smrg if test ! -f "${ofile}"; then 1806126a8a12Smrg AC_MSG_WARN([output file `$ofile' does not exist]) 1807126a8a12Smrg fi 1808126a8a12Smrg 1809126a8a12Smrg if test -z "$LTCC"; then 1810126a8a12Smrg eval "`$SHELL ${ofile} --config | grep '^LTCC='`" 1811126a8a12Smrg if test -z "$LTCC"; then 1812126a8a12Smrg AC_MSG_WARN([output file `$ofile' does not look like a libtool script]) 1813126a8a12Smrg else 1814126a8a12Smrg AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile']) 1815126a8a12Smrg fi 1816126a8a12Smrg fi 1817126a8a12Smrg if test -z "$LTCFLAGS"; then 1818126a8a12Smrg eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`" 1819126a8a12Smrg fi 1820126a8a12Smrg 1821126a8a12Smrg # Extract list of available tagged configurations in $ofile. 1822126a8a12Smrg # Note that this assumes the entire list is on one line. 1823126a8a12Smrg available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` 1824126a8a12Smrg 1825126a8a12Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 1826126a8a12Smrg for tagname in $tagnames; do 1827126a8a12Smrg IFS="$lt_save_ifs" 1828126a8a12Smrg # Check whether tagname contains only valid characters 1829126a8a12Smrg case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in 1830126a8a12Smrg "") ;; 1831126a8a12Smrg *) AC_MSG_ERROR([invalid tag name: $tagname]) 1832126a8a12Smrg ;; 1833126a8a12Smrg esac 1834126a8a12Smrg 1835126a8a12Smrg if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null 1836126a8a12Smrg then 1837126a8a12Smrg AC_MSG_ERROR([tag name \"$tagname\" already exists]) 1838126a8a12Smrg fi 1839126a8a12Smrg 1840126a8a12Smrg # Update the list of available tags. 1841126a8a12Smrg if test -n "$tagname"; then 1842126a8a12Smrg echo appending configuration tag \"$tagname\" to $ofile 1843126a8a12Smrg 1844126a8a12Smrg case $tagname in 1845126a8a12Smrg CXX) 1846126a8a12Smrg if test -n "$CXX" && ( test "X$CXX" != "Xno" && 1847126a8a12Smrg ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || 1848126a8a12Smrg (test "X$CXX" != "Xg++"))) ; then 1849126a8a12Smrg AC_LIBTOOL_LANG_CXX_CONFIG 1850126a8a12Smrg else 1851126a8a12Smrg tagname="" 1852126a8a12Smrg fi 1853126a8a12Smrg ;; 1854126a8a12Smrg 1855126a8a12Smrg F77) 1856126a8a12Smrg if test -n "$F77" && test "X$F77" != "Xno"; then 1857126a8a12Smrg AC_LIBTOOL_LANG_F77_CONFIG 1858126a8a12Smrg else 1859126a8a12Smrg tagname="" 1860126a8a12Smrg fi 1861126a8a12Smrg ;; 1862126a8a12Smrg 1863126a8a12Smrg GCJ) 1864126a8a12Smrg if test -n "$GCJ" && test "X$GCJ" != "Xno"; then 1865126a8a12Smrg AC_LIBTOOL_LANG_GCJ_CONFIG 1866126a8a12Smrg else 1867126a8a12Smrg tagname="" 1868126a8a12Smrg fi 1869126a8a12Smrg ;; 1870126a8a12Smrg 1871126a8a12Smrg RC) 1872126a8a12Smrg AC_LIBTOOL_LANG_RC_CONFIG 1873126a8a12Smrg ;; 1874126a8a12Smrg 1875126a8a12Smrg *) 1876126a8a12Smrg AC_MSG_ERROR([Unsupported tag name: $tagname]) 1877126a8a12Smrg ;; 1878126a8a12Smrg esac 1879126a8a12Smrg 1880126a8a12Smrg # Append the new tag name to the list of available tags. 1881126a8a12Smrg if test -n "$tagname" ; then 1882126a8a12Smrg available_tags="$available_tags $tagname" 1883126a8a12Smrg fi 1884126a8a12Smrg fi 1885126a8a12Smrg done 1886126a8a12Smrg IFS="$lt_save_ifs" 1887126a8a12Smrg 1888126a8a12Smrg # Now substitute the updated list of available tags. 1889126a8a12Smrg if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then 1890126a8a12Smrg mv "${ofile}T" "$ofile" 1891126a8a12Smrg chmod +x "$ofile" 1892126a8a12Smrg else 1893126a8a12Smrg rm -f "${ofile}T" 1894126a8a12Smrg AC_MSG_ERROR([unable to update list of available tagged configurations.]) 1895126a8a12Smrg fi 1896126a8a12Smrgfi 1897126a8a12Smrg])# _LT_AC_TAGCONFIG 1898126a8a12Smrg 1899126a8a12Smrg 1900126a8a12Smrg# AC_LIBTOOL_DLOPEN 1901126a8a12Smrg# ----------------- 1902126a8a12Smrg# enable checks for dlopen support 1903126a8a12SmrgAC_DEFUN([AC_LIBTOOL_DLOPEN], 1904126a8a12Smrg [AC_BEFORE([$0],[AC_LIBTOOL_SETUP]) 1905126a8a12Smrg])# AC_LIBTOOL_DLOPEN 1906126a8a12Smrg 1907126a8a12Smrg 1908126a8a12Smrg# AC_LIBTOOL_WIN32_DLL 1909126a8a12Smrg# -------------------- 1910126a8a12Smrg# declare package support for building win32 DLLs 1911126a8a12SmrgAC_DEFUN([AC_LIBTOOL_WIN32_DLL], 1912126a8a12Smrg[AC_BEFORE([$0], [AC_LIBTOOL_SETUP]) 1913126a8a12Smrg])# AC_LIBTOOL_WIN32_DLL 1914126a8a12Smrg 1915126a8a12Smrg 1916126a8a12Smrg# AC_ENABLE_SHARED([DEFAULT]) 1917126a8a12Smrg# --------------------------- 1918126a8a12Smrg# implement the --enable-shared flag 1919126a8a12Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 1920126a8a12SmrgAC_DEFUN([AC_ENABLE_SHARED], 1921126a8a12Smrg[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl 1922126a8a12SmrgAC_ARG_ENABLE([shared], 1923126a8a12Smrg [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 1924126a8a12Smrg [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])], 1925126a8a12Smrg [p=${PACKAGE-default} 1926126a8a12Smrg case $enableval in 1927126a8a12Smrg yes) enable_shared=yes ;; 1928126a8a12Smrg no) enable_shared=no ;; 1929126a8a12Smrg *) 1930126a8a12Smrg enable_shared=no 1931126a8a12Smrg # Look at the argument we got. We use all the common list separators. 1932126a8a12Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 1933126a8a12Smrg for pkg in $enableval; do 1934126a8a12Smrg IFS="$lt_save_ifs" 1935126a8a12Smrg if test "X$pkg" = "X$p"; then 1936126a8a12Smrg enable_shared=yes 1937126a8a12Smrg fi 1938126a8a12Smrg done 1939126a8a12Smrg IFS="$lt_save_ifs" 1940126a8a12Smrg ;; 1941126a8a12Smrg esac], 1942126a8a12Smrg [enable_shared=]AC_ENABLE_SHARED_DEFAULT) 1943126a8a12Smrg])# AC_ENABLE_SHARED 1944126a8a12Smrg 1945126a8a12Smrg 1946126a8a12Smrg# AC_DISABLE_SHARED 1947126a8a12Smrg# ----------------- 1948126a8a12Smrg# set the default shared flag to --disable-shared 1949126a8a12SmrgAC_DEFUN([AC_DISABLE_SHARED], 1950126a8a12Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 1951126a8a12SmrgAC_ENABLE_SHARED(no) 1952126a8a12Smrg])# AC_DISABLE_SHARED 1953126a8a12Smrg 1954126a8a12Smrg 1955126a8a12Smrg# AC_ENABLE_STATIC([DEFAULT]) 1956126a8a12Smrg# --------------------------- 1957126a8a12Smrg# implement the --enable-static flag 1958126a8a12Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 1959126a8a12SmrgAC_DEFUN([AC_ENABLE_STATIC], 1960126a8a12Smrg[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl 1961126a8a12SmrgAC_ARG_ENABLE([static], 1962126a8a12Smrg [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@], 1963126a8a12Smrg [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])], 1964126a8a12Smrg [p=${PACKAGE-default} 1965126a8a12Smrg case $enableval in 1966126a8a12Smrg yes) enable_static=yes ;; 1967126a8a12Smrg no) enable_static=no ;; 1968126a8a12Smrg *) 1969126a8a12Smrg enable_static=no 1970126a8a12Smrg # Look at the argument we got. We use all the common list separators. 1971126a8a12Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 1972126a8a12Smrg for pkg in $enableval; do 1973126a8a12Smrg IFS="$lt_save_ifs" 1974126a8a12Smrg if test "X$pkg" = "X$p"; then 1975126a8a12Smrg enable_static=yes 1976126a8a12Smrg fi 1977126a8a12Smrg done 1978126a8a12Smrg IFS="$lt_save_ifs" 1979126a8a12Smrg ;; 1980126a8a12Smrg esac], 1981126a8a12Smrg [enable_static=]AC_ENABLE_STATIC_DEFAULT) 1982126a8a12Smrg])# AC_ENABLE_STATIC 1983126a8a12Smrg 1984126a8a12Smrg 1985126a8a12Smrg# AC_DISABLE_STATIC 1986126a8a12Smrg# ----------------- 1987126a8a12Smrg# set the default static flag to --disable-static 1988126a8a12SmrgAC_DEFUN([AC_DISABLE_STATIC], 1989126a8a12Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 1990126a8a12SmrgAC_ENABLE_STATIC(no) 1991126a8a12Smrg])# AC_DISABLE_STATIC 1992126a8a12Smrg 1993126a8a12Smrg 1994126a8a12Smrg# AC_ENABLE_FAST_INSTALL([DEFAULT]) 1995126a8a12Smrg# --------------------------------- 1996126a8a12Smrg# implement the --enable-fast-install flag 1997126a8a12Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 1998126a8a12SmrgAC_DEFUN([AC_ENABLE_FAST_INSTALL], 1999126a8a12Smrg[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl 2000126a8a12SmrgAC_ARG_ENABLE([fast-install], 2001126a8a12Smrg [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 2002126a8a12Smrg [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 2003126a8a12Smrg [p=${PACKAGE-default} 2004126a8a12Smrg case $enableval in 2005126a8a12Smrg yes) enable_fast_install=yes ;; 2006126a8a12Smrg no) enable_fast_install=no ;; 2007126a8a12Smrg *) 2008126a8a12Smrg enable_fast_install=no 2009126a8a12Smrg # Look at the argument we got. We use all the common list separators. 2010126a8a12Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 2011126a8a12Smrg for pkg in $enableval; do 2012126a8a12Smrg IFS="$lt_save_ifs" 2013126a8a12Smrg if test "X$pkg" = "X$p"; then 2014126a8a12Smrg enable_fast_install=yes 2015126a8a12Smrg fi 2016126a8a12Smrg done 2017126a8a12Smrg IFS="$lt_save_ifs" 2018126a8a12Smrg ;; 2019126a8a12Smrg esac], 2020126a8a12Smrg [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT) 2021126a8a12Smrg])# AC_ENABLE_FAST_INSTALL 2022126a8a12Smrg 2023126a8a12Smrg 2024126a8a12Smrg# AC_DISABLE_FAST_INSTALL 2025126a8a12Smrg# ----------------------- 2026126a8a12Smrg# set the default to --disable-fast-install 2027126a8a12SmrgAC_DEFUN([AC_DISABLE_FAST_INSTALL], 2028126a8a12Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 2029126a8a12SmrgAC_ENABLE_FAST_INSTALL(no) 2030126a8a12Smrg])# AC_DISABLE_FAST_INSTALL 2031126a8a12Smrg 2032126a8a12Smrg 2033126a8a12Smrg# AC_LIBTOOL_PICMODE([MODE]) 2034126a8a12Smrg# -------------------------- 2035126a8a12Smrg# implement the --with-pic flag 2036126a8a12Smrg# MODE is either `yes' or `no'. If omitted, it defaults to `both'. 2037126a8a12SmrgAC_DEFUN([AC_LIBTOOL_PICMODE], 2038126a8a12Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 2039126a8a12Smrgpic_mode=ifelse($#,1,$1,default) 2040126a8a12Smrg])# AC_LIBTOOL_PICMODE 2041126a8a12Smrg 2042126a8a12Smrg 2043126a8a12Smrg# AC_PROG_EGREP 2044126a8a12Smrg# ------------- 2045126a8a12Smrg# This is predefined starting with Autoconf 2.54, so this conditional 2046126a8a12Smrg# definition can be removed once we require Autoconf 2.54 or later. 2047126a8a12Smrgm4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP], 2048126a8a12Smrg[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep], 2049126a8a12Smrg [if echo a | (grep -E '(a|b)') >/dev/null 2>&1 2050126a8a12Smrg then ac_cv_prog_egrep='grep -E' 2051126a8a12Smrg else ac_cv_prog_egrep='egrep' 2052126a8a12Smrg fi]) 2053126a8a12Smrg EGREP=$ac_cv_prog_egrep 2054126a8a12Smrg AC_SUBST([EGREP]) 2055126a8a12Smrg])]) 2056126a8a12Smrg 2057126a8a12Smrg 2058126a8a12Smrg# AC_PATH_TOOL_PREFIX 2059126a8a12Smrg# ------------------- 2060126a8a12Smrg# find a file program which can recognise shared library 2061126a8a12SmrgAC_DEFUN([AC_PATH_TOOL_PREFIX], 2062126a8a12Smrg[AC_REQUIRE([AC_PROG_EGREP])dnl 2063126a8a12SmrgAC_MSG_CHECKING([for $1]) 2064126a8a12SmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 2065126a8a12Smrg[case $MAGIC_CMD in 2066126a8a12Smrg[[\\/*] | ?:[\\/]*]) 2067126a8a12Smrg lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. 2068126a8a12Smrg ;; 2069126a8a12Smrg*) 2070126a8a12Smrg lt_save_MAGIC_CMD="$MAGIC_CMD" 2071126a8a12Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 2072126a8a12Smrgdnl $ac_dummy forces splitting on constant user-supplied paths. 2073126a8a12Smrgdnl POSIX.2 word splitting is done only on the output of word expansions, 2074126a8a12Smrgdnl not every word. This closes a longstanding sh security hole. 2075126a8a12Smrg ac_dummy="ifelse([$2], , $PATH, [$2])" 2076126a8a12Smrg for ac_dir in $ac_dummy; do 2077126a8a12Smrg IFS="$lt_save_ifs" 2078126a8a12Smrg test -z "$ac_dir" && ac_dir=. 2079126a8a12Smrg if test -f $ac_dir/$1; then 2080126a8a12Smrg lt_cv_path_MAGIC_CMD="$ac_dir/$1" 2081126a8a12Smrg if test -n "$file_magic_test_file"; then 2082126a8a12Smrg case $deplibs_check_method in 2083126a8a12Smrg "file_magic "*) 2084126a8a12Smrg file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 2085126a8a12Smrg MAGIC_CMD="$lt_cv_path_MAGIC_CMD" 2086126a8a12Smrg if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 2087126a8a12Smrg $EGREP "$file_magic_regex" > /dev/null; then 2088126a8a12Smrg : 2089126a8a12Smrg else 2090126a8a12Smrg cat <<EOF 1>&2 2091126a8a12Smrg 2092126a8a12Smrg*** Warning: the command libtool uses to detect shared libraries, 2093126a8a12Smrg*** $file_magic_cmd, produces output that libtool cannot recognize. 2094126a8a12Smrg*** The result is that libtool may fail to recognize shared libraries 2095126a8a12Smrg*** as such. This will affect the creation of libtool libraries that 2096126a8a12Smrg*** depend on shared libraries, but programs linked with such libtool 2097126a8a12Smrg*** libraries will work regardless of this problem. Nevertheless, you 2098126a8a12Smrg*** may want to report the problem to your system manager and/or to 2099126a8a12Smrg*** bug-libtool@gnu.org 2100126a8a12Smrg 2101126a8a12SmrgEOF 2102126a8a12Smrg fi ;; 2103126a8a12Smrg esac 2104126a8a12Smrg fi 2105126a8a12Smrg break 2106126a8a12Smrg fi 2107126a8a12Smrg done 2108126a8a12Smrg IFS="$lt_save_ifs" 2109126a8a12Smrg MAGIC_CMD="$lt_save_MAGIC_CMD" 2110126a8a12Smrg ;; 2111126a8a12Smrgesac]) 2112126a8a12SmrgMAGIC_CMD="$lt_cv_path_MAGIC_CMD" 2113126a8a12Smrgif test -n "$MAGIC_CMD"; then 2114126a8a12Smrg AC_MSG_RESULT($MAGIC_CMD) 2115126a8a12Smrgelse 2116126a8a12Smrg AC_MSG_RESULT(no) 2117126a8a12Smrgfi 2118126a8a12Smrg])# AC_PATH_TOOL_PREFIX 2119126a8a12Smrg 2120126a8a12Smrg 2121126a8a12Smrg# AC_PATH_MAGIC 2122126a8a12Smrg# ------------- 2123126a8a12Smrg# find a file program which can recognise a shared library 2124126a8a12SmrgAC_DEFUN([AC_PATH_MAGIC], 2125126a8a12Smrg[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 2126126a8a12Smrgif test -z "$lt_cv_path_MAGIC_CMD"; then 2127126a8a12Smrg if test -n "$ac_tool_prefix"; then 2128126a8a12Smrg AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 2129126a8a12Smrg else 2130126a8a12Smrg MAGIC_CMD=: 2131126a8a12Smrg fi 2132126a8a12Smrgfi 2133126a8a12Smrg])# AC_PATH_MAGIC 2134126a8a12Smrg 2135126a8a12Smrg 2136126a8a12Smrg# AC_PROG_LD 2137126a8a12Smrg# ---------- 2138126a8a12Smrg# find the pathname to the GNU or non-GNU linker 2139126a8a12SmrgAC_DEFUN([AC_PROG_LD], 2140126a8a12Smrg[AC_ARG_WITH([gnu-ld], 2141126a8a12Smrg [AC_HELP_STRING([--with-gnu-ld], 2142126a8a12Smrg [assume the C compiler uses GNU ld @<:@default=no@:>@])], 2143126a8a12Smrg [test "$withval" = no || with_gnu_ld=yes], 2144126a8a12Smrg [with_gnu_ld=no]) 2145126a8a12SmrgAC_REQUIRE([LT_AC_PROG_SED])dnl 2146126a8a12SmrgAC_REQUIRE([AC_PROG_CC])dnl 2147126a8a12SmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 2148126a8a12SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 2149126a8a12Smrgac_prog=ld 2150126a8a12Smrgif test "$GCC" = yes; then 2151126a8a12Smrg # Check if gcc -print-prog-name=ld gives a path. 2152126a8a12Smrg AC_MSG_CHECKING([for ld used by $CC]) 2153126a8a12Smrg case $host in 2154126a8a12Smrg *-*-mingw*) 2155126a8a12Smrg # gcc leaves a trailing carriage return which upsets mingw 2156126a8a12Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 2157126a8a12Smrg *) 2158126a8a12Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 2159126a8a12Smrg esac 2160126a8a12Smrg case $ac_prog in 2161126a8a12Smrg # Accept absolute paths. 2162126a8a12Smrg [[\\/]]* | ?:[[\\/]]*) 2163126a8a12Smrg re_direlt='/[[^/]][[^/]]*/\.\./' 2164126a8a12Smrg # Canonicalize the pathname of ld 2165126a8a12Smrg ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` 2166126a8a12Smrg while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do 2167126a8a12Smrg ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` 2168126a8a12Smrg done 2169126a8a12Smrg test -z "$LD" && LD="$ac_prog" 2170126a8a12Smrg ;; 2171126a8a12Smrg "") 2172126a8a12Smrg # If it fails, then pretend we aren't using GCC. 2173126a8a12Smrg ac_prog=ld 2174126a8a12Smrg ;; 2175126a8a12Smrg *) 2176126a8a12Smrg # If it is relative, then search for the first ld in PATH. 2177126a8a12Smrg with_gnu_ld=unknown 2178126a8a12Smrg ;; 2179126a8a12Smrg esac 2180126a8a12Smrgelif test "$with_gnu_ld" = yes; then 2181126a8a12Smrg AC_MSG_CHECKING([for GNU ld]) 2182126a8a12Smrgelse 2183126a8a12Smrg AC_MSG_CHECKING([for non-GNU ld]) 2184126a8a12Smrgfi 2185126a8a12SmrgAC_CACHE_VAL(lt_cv_path_LD, 2186126a8a12Smrg[if test -z "$LD"; then 2187126a8a12Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 2188126a8a12Smrg for ac_dir in $PATH; do 2189126a8a12Smrg IFS="$lt_save_ifs" 2190126a8a12Smrg test -z "$ac_dir" && ac_dir=. 2191126a8a12Smrg if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 2192126a8a12Smrg lt_cv_path_LD="$ac_dir/$ac_prog" 2193126a8a12Smrg # Check to see if the program is GNU ld. I'd rather use --version, 2194126a8a12Smrg # but apparently some variants of GNU ld only accept -v. 2195126a8a12Smrg # Break only if it was the GNU/non-GNU ld that we prefer. 2196126a8a12Smrg case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 2197126a8a12Smrg *GNU* | *'with BFD'*) 2198126a8a12Smrg test "$with_gnu_ld" != no && break 2199126a8a12Smrg ;; 2200126a8a12Smrg *) 2201126a8a12Smrg test "$with_gnu_ld" != yes && break 2202126a8a12Smrg ;; 2203126a8a12Smrg esac 2204126a8a12Smrg fi 2205126a8a12Smrg done 2206126a8a12Smrg IFS="$lt_save_ifs" 2207126a8a12Smrgelse 2208126a8a12Smrg lt_cv_path_LD="$LD" # Let the user override the test with a path. 2209126a8a12Smrgfi]) 2210126a8a12SmrgLD="$lt_cv_path_LD" 2211126a8a12Smrgif test -n "$LD"; then 2212126a8a12Smrg AC_MSG_RESULT($LD) 2213126a8a12Smrgelse 2214126a8a12Smrg AC_MSG_RESULT(no) 2215126a8a12Smrgfi 2216126a8a12Smrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 2217126a8a12SmrgAC_PROG_LD_GNU 2218126a8a12Smrg])# AC_PROG_LD 2219126a8a12Smrg 2220126a8a12Smrg 2221126a8a12Smrg# AC_PROG_LD_GNU 2222126a8a12Smrg# -------------- 2223126a8a12SmrgAC_DEFUN([AC_PROG_LD_GNU], 2224126a8a12Smrg[AC_REQUIRE([AC_PROG_EGREP])dnl 2225126a8a12SmrgAC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 2226126a8a12Smrg[# I'd rather use --version here, but apparently some GNU lds only accept -v. 2227126a8a12Smrgcase `$LD -v 2>&1 </dev/null` in 2228126a8a12Smrg*GNU* | *'with BFD'*) 2229126a8a12Smrg lt_cv_prog_gnu_ld=yes 2230126a8a12Smrg ;; 2231126a8a12Smrg*) 2232126a8a12Smrg lt_cv_prog_gnu_ld=no 2233126a8a12Smrg ;; 2234126a8a12Smrgesac]) 2235126a8a12Smrgwith_gnu_ld=$lt_cv_prog_gnu_ld 2236126a8a12Smrg])# AC_PROG_LD_GNU 2237126a8a12Smrg 2238126a8a12Smrg 2239126a8a12Smrg# AC_PROG_LD_RELOAD_FLAG 2240126a8a12Smrg# ---------------------- 2241126a8a12Smrg# find reload flag for linker 2242126a8a12Smrg# -- PORTME Some linkers may need a different reload flag. 2243126a8a12SmrgAC_DEFUN([AC_PROG_LD_RELOAD_FLAG], 2244126a8a12Smrg[AC_CACHE_CHECK([for $LD option to reload object files], 2245126a8a12Smrg lt_cv_ld_reload_flag, 2246126a8a12Smrg [lt_cv_ld_reload_flag='-r']) 2247126a8a12Smrgreload_flag=$lt_cv_ld_reload_flag 2248126a8a12Smrgcase $reload_flag in 2249126a8a12Smrg"" | " "*) ;; 2250126a8a12Smrg*) reload_flag=" $reload_flag" ;; 2251126a8a12Smrgesac 2252126a8a12Smrgreload_cmds='$LD$reload_flag -o $output$reload_objs' 2253126a8a12Smrgcase $host_os in 2254126a8a12Smrg darwin*) 2255126a8a12Smrg if test "$GCC" = yes; then 2256126a8a12Smrg reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' 2257126a8a12Smrg else 2258126a8a12Smrg reload_cmds='$LD$reload_flag -o $output$reload_objs' 2259126a8a12Smrg fi 2260126a8a12Smrg ;; 2261126a8a12Smrgesac 2262126a8a12Smrg])# AC_PROG_LD_RELOAD_FLAG 2263126a8a12Smrg 2264126a8a12Smrg 2265126a8a12Smrg# AC_DEPLIBS_CHECK_METHOD 2266126a8a12Smrg# ----------------------- 2267126a8a12Smrg# how to check for library dependencies 2268126a8a12Smrg# -- PORTME fill in with the dynamic library characteristics 2269126a8a12SmrgAC_DEFUN([AC_DEPLIBS_CHECK_METHOD], 2270126a8a12Smrg[AC_CACHE_CHECK([how to recognise dependent libraries], 2271126a8a12Smrglt_cv_deplibs_check_method, 2272126a8a12Smrg[lt_cv_file_magic_cmd='$MAGIC_CMD' 2273126a8a12Smrglt_cv_file_magic_test_file= 2274126a8a12Smrglt_cv_deplibs_check_method='unknown' 2275126a8a12Smrg# Need to set the preceding variable on all platforms that support 2276126a8a12Smrg# interlibrary dependencies. 2277126a8a12Smrg# 'none' -- dependencies not supported. 2278126a8a12Smrg# `unknown' -- same as none, but documents that we really don't know. 2279126a8a12Smrg# 'pass_all' -- all dependencies passed with no checks. 2280126a8a12Smrg# 'test_compile' -- check by making test program. 2281126a8a12Smrg# 'file_magic [[regex]]' -- check by looking for files in library path 2282126a8a12Smrg# which responds to the $file_magic_cmd with a given extended regex. 2283126a8a12Smrg# If you have `file' or equivalent on your system and you're not sure 2284126a8a12Smrg# whether `pass_all' will *always* work, you probably want this one. 2285126a8a12Smrg 2286126a8a12Smrgcase $host_os in 2287126a8a12Smrgaix4* | aix5*) 2288126a8a12Smrg lt_cv_deplibs_check_method=pass_all 2289126a8a12Smrg ;; 2290126a8a12Smrg 2291126a8a12Smrgbeos*) 2292126a8a12Smrg lt_cv_deplibs_check_method=pass_all 2293126a8a12Smrg ;; 2294126a8a12Smrg 2295126a8a12Smrgbsdi[[45]]*) 2296126a8a12Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 2297126a8a12Smrg lt_cv_file_magic_cmd='/usr/bin/file -L' 2298126a8a12Smrg lt_cv_file_magic_test_file=/shlib/libc.so 2299126a8a12Smrg ;; 2300126a8a12Smrg 2301126a8a12Smrgcygwin*) 2302126a8a12Smrg # func_win32_libid is a shell function defined in ltmain.sh 2303126a8a12Smrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 2304126a8a12Smrg lt_cv_file_magic_cmd='func_win32_libid' 2305126a8a12Smrg ;; 2306126a8a12Smrg 2307126a8a12Smrgmingw* | pw32*) 2308126a8a12Smrg # Base MSYS/MinGW do not provide the 'file' command needed by 2309126a8a12Smrg # func_win32_libid shell function, so use a weaker test based on 'objdump'. 2310126a8a12Smrg lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' 2311126a8a12Smrg lt_cv_file_magic_cmd='$OBJDUMP -f' 2312126a8a12Smrg ;; 2313126a8a12Smrg 2314126a8a12Smrgdarwin* | rhapsody*) 2315126a8a12Smrg lt_cv_deplibs_check_method=pass_all 2316126a8a12Smrg ;; 2317126a8a12Smrg 2318126a8a12Smrgfreebsd* | kfreebsd*-gnu | dragonfly*) 2319126a8a12Smrg if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then 2320126a8a12Smrg case $host_cpu in 2321126a8a12Smrg i*86 ) 2322126a8a12Smrg # Not sure whether the presence of OpenBSD here was a mistake. 2323126a8a12Smrg # Let's accept both of them until this is cleared up. 2324126a8a12Smrg lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 2325126a8a12Smrg lt_cv_file_magic_cmd=/usr/bin/file 2326126a8a12Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 2327126a8a12Smrg ;; 2328126a8a12Smrg esac 2329126a8a12Smrg else 2330126a8a12Smrg lt_cv_deplibs_check_method=pass_all 2331126a8a12Smrg fi 2332126a8a12Smrg ;; 2333126a8a12Smrg 2334126a8a12Smrggnu*) 2335126a8a12Smrg lt_cv_deplibs_check_method=pass_all 2336126a8a12Smrg ;; 2337126a8a12Smrg 2338126a8a12Smrghpux10.20* | hpux11*) 2339126a8a12Smrg lt_cv_file_magic_cmd=/usr/bin/file 2340126a8a12Smrg case $host_cpu in 2341126a8a12Smrg ia64*) 2342126a8a12Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 2343126a8a12Smrg lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 2344126a8a12Smrg ;; 2345126a8a12Smrg hppa*64*) 2346126a8a12Smrg [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]'] 2347126a8a12Smrg lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 2348126a8a12Smrg ;; 2349126a8a12Smrg *) 2350126a8a12Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' 2351126a8a12Smrg lt_cv_file_magic_test_file=/usr/lib/libc.sl 2352126a8a12Smrg ;; 2353126a8a12Smrg esac 2354126a8a12Smrg ;; 2355126a8a12Smrg 2356126a8a12Smrginterix3*) 2357126a8a12Smrg # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 2358126a8a12Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 2359126a8a12Smrg ;; 2360126a8a12Smrg 2361126a8a12Smrgirix5* | irix6* | nonstopux*) 2362126a8a12Smrg case $LD in 2363126a8a12Smrg *-32|*"-32 ") libmagic=32-bit;; 2364126a8a12Smrg *-n32|*"-n32 ") libmagic=N32;; 2365126a8a12Smrg *-64|*"-64 ") libmagic=64-bit;; 2366126a8a12Smrg *) libmagic=never-match;; 2367126a8a12Smrg esac 2368126a8a12Smrg lt_cv_deplibs_check_method=pass_all 2369126a8a12Smrg ;; 2370126a8a12Smrg 2371126a8a12Smrg# This must be Linux ELF. 2372126a8a12Smrglinux*) 2373126a8a12Smrg lt_cv_deplibs_check_method=pass_all 2374126a8a12Smrg ;; 2375126a8a12Smrg 2376126a8a12Smrgnetbsd*) 2377126a8a12Smrg if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then 2378126a8a12Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 2379126a8a12Smrg else 2380126a8a12Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 2381126a8a12Smrg fi 2382126a8a12Smrg ;; 2383126a8a12Smrg 2384126a8a12Smrgnewos6*) 2385126a8a12Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 2386126a8a12Smrg lt_cv_file_magic_cmd=/usr/bin/file 2387126a8a12Smrg lt_cv_file_magic_test_file=/usr/lib/libnls.so 2388126a8a12Smrg ;; 2389126a8a12Smrg 2390126a8a12Smrgnto-qnx*) 2391126a8a12Smrg lt_cv_deplibs_check_method=unknown 2392126a8a12Smrg ;; 2393126a8a12Smrg 2394126a8a12Smrgopenbsd*) 2395126a8a12Smrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 2396126a8a12Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 2397126a8a12Smrg else 2398126a8a12Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 2399126a8a12Smrg fi 2400126a8a12Smrg ;; 2401126a8a12Smrg 2402126a8a12Smrgosf3* | osf4* | osf5*) 2403126a8a12Smrg lt_cv_deplibs_check_method=pass_all 2404126a8a12Smrg ;; 2405126a8a12Smrg 2406126a8a12Smrgsolaris*) 2407126a8a12Smrg lt_cv_deplibs_check_method=pass_all 2408126a8a12Smrg ;; 2409126a8a12Smrg 2410126a8a12Smrgsysv4 | sysv4.3*) 2411126a8a12Smrg case $host_vendor in 2412126a8a12Smrg motorola) 2413126a8a12Smrg 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]]' 2414126a8a12Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 2415126a8a12Smrg ;; 2416126a8a12Smrg ncr) 2417126a8a12Smrg lt_cv_deplibs_check_method=pass_all 2418126a8a12Smrg ;; 2419126a8a12Smrg sequent) 2420126a8a12Smrg lt_cv_file_magic_cmd='/bin/file' 2421126a8a12Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 2422126a8a12Smrg ;; 2423126a8a12Smrg sni) 2424126a8a12Smrg lt_cv_file_magic_cmd='/bin/file' 2425126a8a12Smrg lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 2426126a8a12Smrg lt_cv_file_magic_test_file=/lib/libc.so 2427126a8a12Smrg ;; 2428126a8a12Smrg siemens) 2429126a8a12Smrg lt_cv_deplibs_check_method=pass_all 2430126a8a12Smrg ;; 2431126a8a12Smrg pc) 2432126a8a12Smrg lt_cv_deplibs_check_method=pass_all 2433126a8a12Smrg ;; 2434126a8a12Smrg esac 2435126a8a12Smrg ;; 2436126a8a12Smrg 2437126a8a12Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 2438126a8a12Smrg lt_cv_deplibs_check_method=pass_all 2439126a8a12Smrg ;; 2440126a8a12Smrgesac 2441126a8a12Smrg]) 2442126a8a12Smrgfile_magic_cmd=$lt_cv_file_magic_cmd 2443126a8a12Smrgdeplibs_check_method=$lt_cv_deplibs_check_method 2444126a8a12Smrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown 2445126a8a12Smrg])# AC_DEPLIBS_CHECK_METHOD 2446126a8a12Smrg 2447126a8a12Smrg 2448126a8a12Smrg# AC_PROG_NM 2449126a8a12Smrg# ---------- 2450126a8a12Smrg# find the pathname to a BSD-compatible name lister 2451126a8a12SmrgAC_DEFUN([AC_PROG_NM], 2452126a8a12Smrg[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM, 2453126a8a12Smrg[if test -n "$NM"; then 2454126a8a12Smrg # Let the user override the test. 2455126a8a12Smrg lt_cv_path_NM="$NM" 2456126a8a12Smrgelse 2457126a8a12Smrg lt_nm_to_check="${ac_tool_prefix}nm" 2458126a8a12Smrg if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 2459126a8a12Smrg lt_nm_to_check="$lt_nm_to_check nm" 2460126a8a12Smrg fi 2461126a8a12Smrg for lt_tmp_nm in $lt_nm_to_check; do 2462126a8a12Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 2463126a8a12Smrg for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 2464126a8a12Smrg IFS="$lt_save_ifs" 2465126a8a12Smrg test -z "$ac_dir" && ac_dir=. 2466126a8a12Smrg tmp_nm="$ac_dir/$lt_tmp_nm" 2467126a8a12Smrg if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then 2468126a8a12Smrg # Check to see if the nm accepts a BSD-compat flag. 2469126a8a12Smrg # Adding the `sed 1q' prevents false positives on HP-UX, which says: 2470126a8a12Smrg # nm: unknown option "B" ignored 2471126a8a12Smrg # Tru64's nm complains that /dev/null is an invalid object file 2472126a8a12Smrg case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in 2473126a8a12Smrg */dev/null* | *'Invalid file or object type'*) 2474126a8a12Smrg lt_cv_path_NM="$tmp_nm -B" 2475126a8a12Smrg break 2476126a8a12Smrg ;; 2477126a8a12Smrg *) 2478126a8a12Smrg case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in 2479126a8a12Smrg */dev/null*) 2480126a8a12Smrg lt_cv_path_NM="$tmp_nm -p" 2481126a8a12Smrg break 2482126a8a12Smrg ;; 2483126a8a12Smrg *) 2484126a8a12Smrg lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 2485126a8a12Smrg continue # so that we can try to find one that supports BSD flags 2486126a8a12Smrg ;; 2487126a8a12Smrg esac 2488126a8a12Smrg ;; 2489126a8a12Smrg esac 2490126a8a12Smrg fi 2491126a8a12Smrg done 2492126a8a12Smrg IFS="$lt_save_ifs" 2493126a8a12Smrg done 2494126a8a12Smrg test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm 2495126a8a12Smrgfi]) 2496126a8a12SmrgNM="$lt_cv_path_NM" 2497126a8a12Smrg])# AC_PROG_NM 2498126a8a12Smrg 2499126a8a12Smrg 2500126a8a12Smrg# AC_CHECK_LIBM 2501126a8a12Smrg# ------------- 2502126a8a12Smrg# check for math library 2503126a8a12SmrgAC_DEFUN([AC_CHECK_LIBM], 2504126a8a12Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 2505126a8a12SmrgLIBM= 2506126a8a12Smrgcase $host in 2507126a8a12Smrg*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) 2508126a8a12Smrg # These system don't have libm, or don't need it 2509126a8a12Smrg ;; 2510126a8a12Smrg*-ncr-sysv4.3*) 2511126a8a12Smrg AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") 2512126a8a12Smrg AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 2513126a8a12Smrg ;; 2514126a8a12Smrg*) 2515126a8a12Smrg AC_CHECK_LIB(m, cos, LIBM="-lm") 2516126a8a12Smrg ;; 2517126a8a12Smrgesac 2518126a8a12Smrg])# AC_CHECK_LIBM 2519126a8a12Smrg 2520126a8a12Smrg 2521126a8a12Smrg# AC_LIBLTDL_CONVENIENCE([DIRECTORY]) 2522126a8a12Smrg# ----------------------------------- 2523126a8a12Smrg# sets LIBLTDL to the link flags for the libltdl convenience library and 2524126a8a12Smrg# LTDLINCL to the include flags for the libltdl header and adds 2525126a8a12Smrg# --enable-ltdl-convenience to the configure arguments. Note that 2526126a8a12Smrg# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, 2527126a8a12Smrg# it is assumed to be `libltdl'. LIBLTDL will be prefixed with 2528126a8a12Smrg# '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/' 2529126a8a12Smrg# (note the single quotes!). If your package is not flat and you're not 2530126a8a12Smrg# using automake, define top_builddir and top_srcdir appropriately in 2531126a8a12Smrg# the Makefiles. 2532126a8a12SmrgAC_DEFUN([AC_LIBLTDL_CONVENIENCE], 2533126a8a12Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 2534126a8a12Smrg case $enable_ltdl_convenience in 2535126a8a12Smrg no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; 2536126a8a12Smrg "") enable_ltdl_convenience=yes 2537126a8a12Smrg ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; 2538126a8a12Smrg esac 2539126a8a12Smrg LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la 2540126a8a12Smrg LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) 2541126a8a12Smrg # For backwards non-gettext consistent compatibility... 2542126a8a12Smrg INCLTDL="$LTDLINCL" 2543126a8a12Smrg])# AC_LIBLTDL_CONVENIENCE 2544126a8a12Smrg 2545126a8a12Smrg 2546126a8a12Smrg# AC_LIBLTDL_INSTALLABLE([DIRECTORY]) 2547126a8a12Smrg# ----------------------------------- 2548126a8a12Smrg# sets LIBLTDL to the link flags for the libltdl installable library and 2549126a8a12Smrg# LTDLINCL to the include flags for the libltdl header and adds 2550126a8a12Smrg# --enable-ltdl-install to the configure arguments. Note that 2551126a8a12Smrg# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, 2552126a8a12Smrg# and an installed libltdl is not found, it is assumed to be `libltdl'. 2553126a8a12Smrg# LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with 2554126a8a12Smrg# '${top_srcdir}/' (note the single quotes!). If your package is not 2555126a8a12Smrg# flat and you're not using automake, define top_builddir and top_srcdir 2556126a8a12Smrg# appropriately in the Makefiles. 2557126a8a12Smrg# In the future, this macro may have to be called after AC_PROG_LIBTOOL. 2558126a8a12SmrgAC_DEFUN([AC_LIBLTDL_INSTALLABLE], 2559126a8a12Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 2560126a8a12Smrg AC_CHECK_LIB(ltdl, lt_dlinit, 2561126a8a12Smrg [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no], 2562126a8a12Smrg [if test x"$enable_ltdl_install" = xno; then 2563126a8a12Smrg AC_MSG_WARN([libltdl not installed, but installation disabled]) 2564126a8a12Smrg else 2565126a8a12Smrg enable_ltdl_install=yes 2566126a8a12Smrg fi 2567126a8a12Smrg ]) 2568126a8a12Smrg if test x"$enable_ltdl_install" = x"yes"; then 2569126a8a12Smrg ac_configure_args="$ac_configure_args --enable-ltdl-install" 2570126a8a12Smrg LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la 2571126a8a12Smrg LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) 2572126a8a12Smrg else 2573126a8a12Smrg ac_configure_args="$ac_configure_args --enable-ltdl-install=no" 2574126a8a12Smrg LIBLTDL="-lltdl" 2575126a8a12Smrg LTDLINCL= 2576126a8a12Smrg fi 2577126a8a12Smrg # For backwards non-gettext consistent compatibility... 2578126a8a12Smrg INCLTDL="$LTDLINCL" 2579126a8a12Smrg])# AC_LIBLTDL_INSTALLABLE 2580126a8a12Smrg 2581126a8a12Smrg 2582126a8a12Smrg# AC_LIBTOOL_CXX 2583126a8a12Smrg# -------------- 2584126a8a12Smrg# enable support for C++ libraries 2585126a8a12SmrgAC_DEFUN([AC_LIBTOOL_CXX], 2586126a8a12Smrg[AC_REQUIRE([_LT_AC_LANG_CXX]) 2587126a8a12Smrg])# AC_LIBTOOL_CXX 2588126a8a12Smrg 2589126a8a12Smrg 2590126a8a12Smrg# _LT_AC_LANG_CXX 2591126a8a12Smrg# --------------- 2592126a8a12SmrgAC_DEFUN([_LT_AC_LANG_CXX], 2593126a8a12Smrg[AC_REQUIRE([AC_PROG_CXX]) 2594126a8a12SmrgAC_REQUIRE([_LT_AC_PROG_CXXCPP]) 2595126a8a12Smrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX]) 2596126a8a12Smrg])# _LT_AC_LANG_CXX 2597126a8a12Smrg 2598126a8a12Smrg# _LT_AC_PROG_CXXCPP 2599126a8a12Smrg# ------------------ 2600126a8a12SmrgAC_DEFUN([_LT_AC_PROG_CXXCPP], 2601126a8a12Smrg[ 2602126a8a12SmrgAC_REQUIRE([AC_PROG_CXX]) 2603126a8a12Smrgif test -n "$CXX" && ( test "X$CXX" != "Xno" && 2604126a8a12Smrg ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || 2605126a8a12Smrg (test "X$CXX" != "Xg++"))) ; then 2606126a8a12Smrg AC_PROG_CXXCPP 2607126a8a12Smrgfi 2608126a8a12Smrg])# _LT_AC_PROG_CXXCPP 2609126a8a12Smrg 2610126a8a12Smrg# AC_LIBTOOL_F77 2611126a8a12Smrg# -------------- 2612126a8a12Smrg# enable support for Fortran 77 libraries 2613126a8a12SmrgAC_DEFUN([AC_LIBTOOL_F77], 2614126a8a12Smrg[AC_REQUIRE([_LT_AC_LANG_F77]) 2615126a8a12Smrg])# AC_LIBTOOL_F77 2616126a8a12Smrg 2617126a8a12Smrg 2618126a8a12Smrg# _LT_AC_LANG_F77 2619126a8a12Smrg# --------------- 2620126a8a12SmrgAC_DEFUN([_LT_AC_LANG_F77], 2621126a8a12Smrg[AC_REQUIRE([AC_PROG_F77]) 2622126a8a12Smrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77]) 2623126a8a12Smrg])# _LT_AC_LANG_F77 2624126a8a12Smrg 2625126a8a12Smrg 2626126a8a12Smrg# AC_LIBTOOL_GCJ 2627126a8a12Smrg# -------------- 2628126a8a12Smrg# enable support for GCJ libraries 2629126a8a12SmrgAC_DEFUN([AC_LIBTOOL_GCJ], 2630126a8a12Smrg[AC_REQUIRE([_LT_AC_LANG_GCJ]) 2631126a8a12Smrg])# AC_LIBTOOL_GCJ 2632126a8a12Smrg 2633126a8a12Smrg 2634126a8a12Smrg# _LT_AC_LANG_GCJ 2635126a8a12Smrg# --------------- 2636126a8a12SmrgAC_DEFUN([_LT_AC_LANG_GCJ], 2637126a8a12Smrg[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[], 2638126a8a12Smrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[], 2639126a8a12Smrg [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[], 2640126a8a12Smrg [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])], 2641126a8a12Smrg [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])], 2642126a8a12Smrg [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])]) 2643126a8a12Smrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ]) 2644126a8a12Smrg])# _LT_AC_LANG_GCJ 2645126a8a12Smrg 2646126a8a12Smrg 2647126a8a12Smrg# AC_LIBTOOL_RC 2648126a8a12Smrg# ------------- 2649126a8a12Smrg# enable support for Windows resource files 2650126a8a12SmrgAC_DEFUN([AC_LIBTOOL_RC], 2651126a8a12Smrg[AC_REQUIRE([LT_AC_PROG_RC]) 2652126a8a12Smrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC]) 2653126a8a12Smrg])# AC_LIBTOOL_RC 2654126a8a12Smrg 2655126a8a12Smrg 2656126a8a12Smrg# AC_LIBTOOL_LANG_C_CONFIG 2657126a8a12Smrg# ------------------------ 2658126a8a12Smrg# Ensure that the configuration vars for the C compiler are 2659126a8a12Smrg# suitably defined. Those variables are subsequently used by 2660126a8a12Smrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 2661126a8a12SmrgAC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG]) 2662126a8a12SmrgAC_DEFUN([_LT_AC_LANG_C_CONFIG], 2663126a8a12Smrg[lt_save_CC="$CC" 2664126a8a12SmrgAC_LANG_PUSH(C) 2665126a8a12Smrg 2666126a8a12Smrg# Source file extension for C test sources. 2667126a8a12Smrgac_ext=c 2668126a8a12Smrg 2669126a8a12Smrg# Object file extension for compiled C test sources. 2670126a8a12Smrgobjext=o 2671126a8a12Smrg_LT_AC_TAGVAR(objext, $1)=$objext 2672126a8a12Smrg 2673126a8a12Smrg# Code to be used in simple compile tests 2674126a8a12Smrglt_simple_compile_test_code="int some_variable = 0;\n" 2675126a8a12Smrg 2676126a8a12Smrg# Code to be used in simple link tests 2677126a8a12Smrglt_simple_link_test_code='int main(){return(0);}\n' 2678126a8a12Smrg 2679126a8a12Smrg_LT_AC_SYS_COMPILER 2680126a8a12Smrg 2681126a8a12Smrg# save warnings/boilerplate of simple test code 2682126a8a12Smrg_LT_COMPILER_BOILERPLATE 2683126a8a12Smrg_LT_LINKER_BOILERPLATE 2684126a8a12Smrg 2685126a8a12SmrgAC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) 2686126a8a12SmrgAC_LIBTOOL_PROG_COMPILER_PIC($1) 2687126a8a12SmrgAC_LIBTOOL_PROG_CC_C_O($1) 2688126a8a12SmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) 2689126a8a12SmrgAC_LIBTOOL_PROG_LD_SHLIBS($1) 2690126a8a12SmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1) 2691126a8a12SmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) 2692126a8a12SmrgAC_LIBTOOL_SYS_LIB_STRIP 2693126a8a12SmrgAC_LIBTOOL_DLOPEN_SELF 2694126a8a12Smrg 2695126a8a12Smrg# Report which library types will actually be built 2696126a8a12SmrgAC_MSG_CHECKING([if libtool supports shared libraries]) 2697126a8a12SmrgAC_MSG_RESULT([$can_build_shared]) 2698126a8a12Smrg 2699126a8a12SmrgAC_MSG_CHECKING([whether to build shared libraries]) 2700126a8a12Smrgtest "$can_build_shared" = "no" && enable_shared=no 2701126a8a12Smrg 2702126a8a12Smrg# On AIX, shared libraries and static libraries use the same namespace, and 2703126a8a12Smrg# are all built from PIC. 2704126a8a12Smrgcase $host_os in 2705126a8a12Smrgaix3*) 2706126a8a12Smrg test "$enable_shared" = yes && enable_static=no 2707126a8a12Smrg if test -n "$RANLIB"; then 2708126a8a12Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 2709126a8a12Smrg postinstall_cmds='$RANLIB $lib' 2710126a8a12Smrg fi 2711126a8a12Smrg ;; 2712126a8a12Smrg 2713126a8a12Smrgaix4* | aix5*) 2714126a8a12Smrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 2715126a8a12Smrg test "$enable_shared" = yes && enable_static=no 2716126a8a12Smrg fi 2717126a8a12Smrg ;; 2718126a8a12Smrgesac 2719126a8a12SmrgAC_MSG_RESULT([$enable_shared]) 2720126a8a12Smrg 2721126a8a12SmrgAC_MSG_CHECKING([whether to build static libraries]) 2722126a8a12Smrg# Make sure either enable_shared or enable_static is yes. 2723126a8a12Smrgtest "$enable_shared" = yes || enable_static=yes 2724126a8a12SmrgAC_MSG_RESULT([$enable_static]) 2725126a8a12Smrg 2726126a8a12SmrgAC_LIBTOOL_CONFIG($1) 2727126a8a12Smrg 2728126a8a12SmrgAC_LANG_POP 2729126a8a12SmrgCC="$lt_save_CC" 2730126a8a12Smrg])# AC_LIBTOOL_LANG_C_CONFIG 2731126a8a12Smrg 2732126a8a12Smrg 2733126a8a12Smrg# AC_LIBTOOL_LANG_CXX_CONFIG 2734126a8a12Smrg# -------------------------- 2735126a8a12Smrg# Ensure that the configuration vars for the C compiler are 2736126a8a12Smrg# suitably defined. Those variables are subsequently used by 2737126a8a12Smrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 2738126a8a12SmrgAC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)]) 2739126a8a12SmrgAC_DEFUN([_LT_AC_LANG_CXX_CONFIG], 2740126a8a12Smrg[AC_LANG_PUSH(C++) 2741126a8a12SmrgAC_REQUIRE([AC_PROG_CXX]) 2742126a8a12SmrgAC_REQUIRE([_LT_AC_PROG_CXXCPP]) 2743126a8a12Smrg 2744126a8a12Smrg_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 2745126a8a12Smrg_LT_AC_TAGVAR(allow_undefined_flag, $1)= 2746126a8a12Smrg_LT_AC_TAGVAR(always_export_symbols, $1)=no 2747126a8a12Smrg_LT_AC_TAGVAR(archive_expsym_cmds, $1)= 2748126a8a12Smrg_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= 2749126a8a12Smrg_LT_AC_TAGVAR(hardcode_direct, $1)=no 2750126a8a12Smrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= 2751126a8a12Smrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 2752126a8a12Smrg_LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 2753126a8a12Smrg_LT_AC_TAGVAR(hardcode_minus_L, $1)=no 2754126a8a12Smrg_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 2755126a8a12Smrg_LT_AC_TAGVAR(hardcode_automatic, $1)=no 2756126a8a12Smrg_LT_AC_TAGVAR(module_cmds, $1)= 2757126a8a12Smrg_LT_AC_TAGVAR(module_expsym_cmds, $1)= 2758126a8a12Smrg_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown 2759126a8a12Smrg_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 2760126a8a12Smrg_LT_AC_TAGVAR(no_undefined_flag, $1)= 2761126a8a12Smrg_LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 2762126a8a12Smrg_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no 2763126a8a12Smrg 2764126a8a12Smrg# Dependencies to place before and after the object being linked: 2765126a8a12Smrg_LT_AC_TAGVAR(predep_objects, $1)= 2766126a8a12Smrg_LT_AC_TAGVAR(postdep_objects, $1)= 2767126a8a12Smrg_LT_AC_TAGVAR(predeps, $1)= 2768126a8a12Smrg_LT_AC_TAGVAR(postdeps, $1)= 2769126a8a12Smrg_LT_AC_TAGVAR(compiler_lib_search_path, $1)= 2770126a8a12Smrg 2771126a8a12Smrg# Source file extension for C++ test sources. 2772126a8a12Smrgac_ext=cpp 2773126a8a12Smrg 2774126a8a12Smrg# Object file extension for compiled C++ test sources. 2775126a8a12Smrgobjext=o 2776126a8a12Smrg_LT_AC_TAGVAR(objext, $1)=$objext 2777126a8a12Smrg 2778126a8a12Smrg# Code to be used in simple compile tests 2779126a8a12Smrglt_simple_compile_test_code="int some_variable = 0;\n" 2780126a8a12Smrg 2781126a8a12Smrg# Code to be used in simple link tests 2782126a8a12Smrglt_simple_link_test_code='int main(int, char *[[]]) { return(0); }\n' 2783126a8a12Smrg 2784126a8a12Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 2785126a8a12Smrg_LT_AC_SYS_COMPILER 2786126a8a12Smrg 2787126a8a12Smrg# save warnings/boilerplate of simple test code 2788126a8a12Smrg_LT_COMPILER_BOILERPLATE 2789126a8a12Smrg_LT_LINKER_BOILERPLATE 2790126a8a12Smrg 2791126a8a12Smrg# Allow CC to be a program name with arguments. 2792126a8a12Smrglt_save_CC=$CC 2793126a8a12Smrglt_save_LD=$LD 2794126a8a12Smrglt_save_GCC=$GCC 2795126a8a12SmrgGCC=$GXX 2796126a8a12Smrglt_save_with_gnu_ld=$with_gnu_ld 2797126a8a12Smrglt_save_path_LD=$lt_cv_path_LD 2798126a8a12Smrgif test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 2799126a8a12Smrg lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 2800126a8a12Smrgelse 2801126a8a12Smrg $as_unset lt_cv_prog_gnu_ld 2802126a8a12Smrgfi 2803126a8a12Smrgif test -n "${lt_cv_path_LDCXX+set}"; then 2804126a8a12Smrg lt_cv_path_LD=$lt_cv_path_LDCXX 2805126a8a12Smrgelse 2806126a8a12Smrg $as_unset lt_cv_path_LD 2807126a8a12Smrgfi 2808126a8a12Smrgtest -z "${LDCXX+set}" || LD=$LDCXX 2809126a8a12SmrgCC=${CXX-"c++"} 2810126a8a12Smrgcompiler=$CC 2811126a8a12Smrg_LT_AC_TAGVAR(compiler, $1)=$CC 2812126a8a12Smrg_LT_CC_BASENAME([$compiler]) 2813126a8a12Smrg 2814126a8a12Smrg# We don't want -fno-exception wen compiling C++ code, so set the 2815126a8a12Smrg# no_builtin_flag separately 2816126a8a12Smrgif test "$GXX" = yes; then 2817126a8a12Smrg _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 2818126a8a12Smrgelse 2819126a8a12Smrg _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 2820126a8a12Smrgfi 2821126a8a12Smrg 2822126a8a12Smrgif test "$GXX" = yes; then 2823126a8a12Smrg # Set up default GNU C++ configuration 2824126a8a12Smrg 2825126a8a12Smrg AC_PROG_LD 2826126a8a12Smrg 2827126a8a12Smrg # Check if GNU C++ uses GNU ld as the underlying linker, since the 2828126a8a12Smrg # archiving commands below assume that GNU ld is being used. 2829126a8a12Smrg if test "$with_gnu_ld" = yes; then 2830126a8a12Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 2831126a8a12Smrg _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' 2832126a8a12Smrg 2833126a8a12Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 2834126a8a12Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 2835126a8a12Smrg 2836126a8a12Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 2837126a8a12Smrg # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 2838126a8a12Smrg # investigate it a little bit more. (MM) 2839126a8a12Smrg wlarc='${wl}' 2840126a8a12Smrg 2841126a8a12Smrg # ancient GNU ld didn't support --whole-archive et. al. 2842126a8a12Smrg if eval "`$CC -print-prog-name=ld` --help 2>&1" | \ 2843126a8a12Smrg grep 'no-whole-archive' > /dev/null; then 2844126a8a12Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 2845126a8a12Smrg else 2846126a8a12Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 2847126a8a12Smrg fi 2848126a8a12Smrg else 2849126a8a12Smrg with_gnu_ld=no 2850126a8a12Smrg wlarc= 2851126a8a12Smrg 2852126a8a12Smrg # A generic and very simple default shared library creation 2853126a8a12Smrg # command for GNU C++ for the case where it uses the native 2854126a8a12Smrg # linker, instead of GNU ld. If possible, this setting should 2855126a8a12Smrg # overridden to take advantage of the native linker features on 2856126a8a12Smrg # the platform it is being used on. 2857126a8a12Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 2858126a8a12Smrg fi 2859126a8a12Smrg 2860126a8a12Smrg # Commands to make compiler produce verbose output that lists 2861126a8a12Smrg # what "hidden" libraries, object files and flags are used when 2862126a8a12Smrg # linking a shared library. 2863126a8a12Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' 2864126a8a12Smrg 2865126a8a12Smrgelse 2866126a8a12Smrg GXX=no 2867126a8a12Smrg with_gnu_ld=no 2868126a8a12Smrg wlarc= 2869126a8a12Smrgfi 2870126a8a12Smrg 2871126a8a12Smrg# PORTME: fill in a description of your system's C++ link characteristics 2872126a8a12SmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 2873126a8a12Smrg_LT_AC_TAGVAR(ld_shlibs, $1)=yes 2874126a8a12Smrgcase $host_os in 2875126a8a12Smrg aix3*) 2876126a8a12Smrg # FIXME: insert proper C++ library support 2877126a8a12Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 2878126a8a12Smrg ;; 2879126a8a12Smrg aix4* | aix5*) 2880126a8a12Smrg if test "$host_cpu" = ia64; then 2881126a8a12Smrg # On IA64, the linker does run time linking by default, so we don't 2882126a8a12Smrg # have to do anything special. 2883126a8a12Smrg aix_use_runtimelinking=no 2884126a8a12Smrg exp_sym_flag='-Bexport' 2885126a8a12Smrg no_entry_flag="" 2886126a8a12Smrg else 2887126a8a12Smrg aix_use_runtimelinking=no 2888126a8a12Smrg 2889126a8a12Smrg # Test if we are trying to use run time linking or normal 2890126a8a12Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 2891126a8a12Smrg # need to do runtime linking. 2892126a8a12Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*) 2893126a8a12Smrg for ld_flag in $LDFLAGS; do 2894126a8a12Smrg case $ld_flag in 2895126a8a12Smrg *-brtl*) 2896126a8a12Smrg aix_use_runtimelinking=yes 2897126a8a12Smrg break 2898126a8a12Smrg ;; 2899126a8a12Smrg esac 2900126a8a12Smrg done 2901126a8a12Smrg ;; 2902126a8a12Smrg esac 2903126a8a12Smrg 2904126a8a12Smrg exp_sym_flag='-bexport' 2905126a8a12Smrg no_entry_flag='-bnoentry' 2906126a8a12Smrg fi 2907126a8a12Smrg 2908126a8a12Smrg # When large executables or shared objects are built, AIX ld can 2909126a8a12Smrg # have problems creating the table of contents. If linking a library 2910126a8a12Smrg # or program results in "error TOC overflow" add -mminimal-toc to 2911126a8a12Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 2912126a8a12Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 2913126a8a12Smrg 2914126a8a12Smrg _LT_AC_TAGVAR(archive_cmds, $1)='' 2915126a8a12Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 2916126a8a12Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' 2917126a8a12Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 2918126a8a12Smrg 2919126a8a12Smrg if test "$GXX" = yes; then 2920126a8a12Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 2921126a8a12Smrg # We only want to do this on AIX 4.2 and lower, the check 2922126a8a12Smrg # below for broken collect2 doesn't work under 4.3+ 2923126a8a12Smrg collect2name=`${CC} -print-prog-name=collect2` 2924126a8a12Smrg if test -f "$collect2name" && \ 2925126a8a12Smrg strings "$collect2name" | grep resolve_lib_name >/dev/null 2926126a8a12Smrg then 2927126a8a12Smrg # We have reworked collect2 2928126a8a12Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 2929126a8a12Smrg else 2930126a8a12Smrg # We have old collect2 2931126a8a12Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported 2932126a8a12Smrg # It fails to find uninstalled libraries when the uninstalled 2933126a8a12Smrg # path is not listed in the libpath. Setting hardcode_minus_L 2934126a8a12Smrg # to unsupported forces relinking 2935126a8a12Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 2936126a8a12Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 2937126a8a12Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 2938126a8a12Smrg fi 2939126a8a12Smrg ;; 2940126a8a12Smrg esac 2941126a8a12Smrg shared_flag='-shared' 2942126a8a12Smrg if test "$aix_use_runtimelinking" = yes; then 2943126a8a12Smrg shared_flag="$shared_flag "'${wl}-G' 2944126a8a12Smrg fi 2945126a8a12Smrg else 2946126a8a12Smrg # not using gcc 2947126a8a12Smrg if test "$host_cpu" = ia64; then 2948126a8a12Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 2949126a8a12Smrg # chokes on -Wl,-G. The following line is correct: 2950126a8a12Smrg shared_flag='-G' 2951126a8a12Smrg else 2952126a8a12Smrg if test "$aix_use_runtimelinking" = yes; then 2953126a8a12Smrg shared_flag='${wl}-G' 2954126a8a12Smrg else 2955126a8a12Smrg shared_flag='${wl}-bM:SRE' 2956126a8a12Smrg fi 2957126a8a12Smrg fi 2958126a8a12Smrg fi 2959126a8a12Smrg 2960126a8a12Smrg # It seems that -bexpall does not export symbols beginning with 2961126a8a12Smrg # underscore (_), so it is better to generate a list of symbols to export. 2962126a8a12Smrg _LT_AC_TAGVAR(always_export_symbols, $1)=yes 2963126a8a12Smrg if test "$aix_use_runtimelinking" = yes; then 2964126a8a12Smrg # Warning - without using the other runtime loading flags (-brtl), 2965126a8a12Smrg # -berok will link without error, but may produce a broken library. 2966126a8a12Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' 2967126a8a12Smrg # Determine the default libpath from the value encoded in an empty executable. 2968126a8a12Smrg _LT_AC_SYS_LIBPATH_AIX 2969126a8a12Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 2970126a8a12Smrg 2971126a8a12Smrg _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" 2972126a8a12Smrg else 2973126a8a12Smrg if test "$host_cpu" = ia64; then 2974126a8a12Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 2975126a8a12Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 2976126a8a12Smrg _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" 2977126a8a12Smrg else 2978126a8a12Smrg # Determine the default libpath from the value encoded in an empty executable. 2979126a8a12Smrg _LT_AC_SYS_LIBPATH_AIX 2980126a8a12Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 2981126a8a12Smrg # Warning - without using the other run time loading flags, 2982126a8a12Smrg # -berok will link without error, but may produce a broken library. 2983126a8a12Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 2984126a8a12Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 2985126a8a12Smrg # Exported symbols can be pulled into shared objects from archives 2986126a8a12Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 2987126a8a12Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes 2988126a8a12Smrg # This is similar to how AIX traditionally builds its shared libraries. 2989126a8a12Smrg _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' 2990126a8a12Smrg fi 2991126a8a12Smrg fi 2992126a8a12Smrg ;; 2993126a8a12Smrg 2994126a8a12Smrg beos*) 2995126a8a12Smrg if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 2996126a8a12Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 2997126a8a12Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 2998126a8a12Smrg # support --undefined. This deserves some investigation. FIXME 2999126a8a12Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 3000126a8a12Smrg else 3001126a8a12Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3002126a8a12Smrg fi 3003126a8a12Smrg ;; 3004126a8a12Smrg 3005126a8a12Smrg chorus*) 3006126a8a12Smrg case $cc_basename in 3007126a8a12Smrg *) 3008126a8a12Smrg # FIXME: insert proper C++ library support 3009126a8a12Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3010126a8a12Smrg ;; 3011126a8a12Smrg esac 3012126a8a12Smrg ;; 3013126a8a12Smrg 3014126a8a12Smrg cygwin* | mingw* | pw32*) 3015126a8a12Smrg # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 3016126a8a12Smrg # as there is no search path for DLLs. 3017126a8a12Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 3018126a8a12Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 3019126a8a12Smrg _LT_AC_TAGVAR(always_export_symbols, $1)=no 3020126a8a12Smrg _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 3021126a8a12Smrg 3022126a8a12Smrg if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then 3023126a8a12Smrg _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' 3024126a8a12Smrg # If the export-symbols file already is a .def file (1st line 3025126a8a12Smrg # is EXPORTS), use it as is; otherwise, prepend... 3026126a8a12Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 3027126a8a12Smrg cp $export_symbols $output_objdir/$soname.def; 3028126a8a12Smrg else 3029126a8a12Smrg echo EXPORTS > $output_objdir/$soname.def; 3030126a8a12Smrg cat $export_symbols >> $output_objdir/$soname.def; 3031126a8a12Smrg fi~ 3032126a8a12Smrg $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' 3033126a8a12Smrg else 3034126a8a12Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3035126a8a12Smrg fi 3036126a8a12Smrg ;; 3037126a8a12Smrg darwin* | rhapsody*) 3038126a8a12Smrg case $host_os in 3039126a8a12Smrg rhapsody* | darwin1.[[012]]) 3040126a8a12Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' 3041126a8a12Smrg ;; 3042126a8a12Smrg *) # Darwin 1.3 on 3043126a8a12Smrg if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then 3044126a8a12Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' 3045126a8a12Smrg else 3046126a8a12Smrg case ${MACOSX_DEPLOYMENT_TARGET} in 3047126a8a12Smrg 10.[[012]]) 3048126a8a12Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' 3049126a8a12Smrg ;; 3050126a8a12Smrg 10.*) 3051126a8a12Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup' 3052126a8a12Smrg ;; 3053126a8a12Smrg esac 3054126a8a12Smrg fi 3055126a8a12Smrg ;; 3056126a8a12Smrg esac 3057126a8a12Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 3058126a8a12Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 3059126a8a12Smrg _LT_AC_TAGVAR(hardcode_automatic, $1)=yes 3060126a8a12Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 3061126a8a12Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' 3062126a8a12Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 3063126a8a12Smrg 3064126a8a12Smrg if test "$GXX" = yes ; then 3065126a8a12Smrg lt_int_apple_cc_single_mod=no 3066126a8a12Smrg output_verbose_link_cmd='echo' 3067126a8a12Smrg if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then 3068126a8a12Smrg lt_int_apple_cc_single_mod=yes 3069126a8a12Smrg fi 3070126a8a12Smrg if test "X$lt_int_apple_cc_single_mod" = Xyes ; then 3071126a8a12Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' 3072126a8a12Smrg else 3073126a8a12Smrg _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' 3074126a8a12Smrg fi 3075126a8a12Smrg _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' 3076126a8a12Smrg # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds 3077126a8a12Smrg if test "X$lt_int_apple_cc_single_mod" = Xyes ; then 3078126a8a12Smrg _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}' 3079126a8a12Smrg else 3080126a8a12Smrg _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}' 3081126a8a12Smrg fi 3082126a8a12Smrg _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}' 3083126a8a12Smrg else 3084126a8a12Smrg case $cc_basename in 3085126a8a12Smrg xlc*) 3086126a8a12Smrg output_verbose_link_cmd='echo' 3087126a8a12Smrg _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' 3088126a8a12Smrg _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' 3089126a8a12Smrg # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds 3090126a8a12Smrg _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}' 3091126a8a12Smrg _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}' 3092126a8a12Smrg ;; 3093126a8a12Smrg *) 3094126a8a12Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3095126a8a12Smrg ;; 3096126a8a12Smrg esac 3097126a8a12Smrg fi 3098126a8a12Smrg ;; 3099126a8a12Smrg 3100126a8a12Smrg dgux*) 3101126a8a12Smrg case $cc_basename in 3102126a8a12Smrg ec++*) 3103126a8a12Smrg # FIXME: insert proper C++ library support 3104126a8a12Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3105126a8a12Smrg ;; 3106126a8a12Smrg ghcx*) 3107126a8a12Smrg # Green Hills C++ Compiler 3108126a8a12Smrg # FIXME: insert proper C++ library support 3109126a8a12Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3110126a8a12Smrg ;; 3111126a8a12Smrg *) 3112126a8a12Smrg # FIXME: insert proper C++ library support 3113126a8a12Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3114126a8a12Smrg ;; 3115126a8a12Smrg esac 3116126a8a12Smrg ;; 3117126a8a12Smrg freebsd[[12]]*) 3118126a8a12Smrg # C++ shared libraries reported to be fairly broken before switch to ELF 3119126a8a12Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3120126a8a12Smrg ;; 3121126a8a12Smrg freebsd-elf*) 3122126a8a12Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 3123126a8a12Smrg ;; 3124126a8a12Smrg freebsd* | kfreebsd*-gnu | dragonfly*) 3125126a8a12Smrg # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 3126126a8a12Smrg # conventions 3127126a8a12Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=yes 3128126a8a12Smrg ;; 3129126a8a12Smrg gnu*) 3130126a8a12Smrg ;; 3131126a8a12Smrg hpux9*) 3132126a8a12Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 3133126a8a12Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 3134126a8a12Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 3135126a8a12Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 3136126a8a12Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 3137126a8a12Smrg # but as the default 3138126a8a12Smrg # location of the library. 3139126a8a12Smrg 3140126a8a12Smrg case $cc_basename in 3141126a8a12Smrg CC*) 3142126a8a12Smrg # FIXME: insert proper C++ library support 3143126a8a12Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3144126a8a12Smrg ;; 3145126a8a12Smrg aCC*) 3146126a8a12Smrg _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' 3147126a8a12Smrg # Commands to make compiler produce verbose output that lists 3148126a8a12Smrg # what "hidden" libraries, object files and flags are used when 3149126a8a12Smrg # linking a shared library. 3150126a8a12Smrg # 3151126a8a12Smrg # There doesn't appear to be a way to prevent this compiler from 3152126a8a12Smrg # explicitly linking system object files so we need to strip them 3153126a8a12Smrg # from the output so that they don't get included in the library 3154126a8a12Smrg # dependencies. 3155126a8a12Smrg 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' 3156126a8a12Smrg ;; 3157126a8a12Smrg *) 3158126a8a12Smrg if test "$GXX" = yes; then 3159126a8a12Smrg _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' 3160126a8a12Smrg else 3161126a8a12Smrg # FIXME: insert proper C++ library support 3162126a8a12Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3163126a8a12Smrg fi 3164126a8a12Smrg ;; 3165126a8a12Smrg esac 3166126a8a12Smrg ;; 3167126a8a12Smrg hpux10*|hpux11*) 3168126a8a12Smrg if test $with_gnu_ld = no; then 3169126a8a12Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 3170126a8a12Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 3171126a8a12Smrg 3172126a8a12Smrg case $host_cpu in 3173126a8a12Smrg hppa*64*|ia64*) 3174126a8a12Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' 3175126a8a12Smrg ;; 3176126a8a12Smrg *) 3177126a8a12Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 3178126a8a12Smrg ;; 3179126a8a12Smrg esac 3180126a8a12Smrg fi 3181126a8a12Smrg case $host_cpu in 3182126a8a12Smrg hppa*64*|ia64*) 3183126a8a12Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 3184126a8a12Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 3185126a8a12Smrg ;; 3186126a8a12Smrg *) 3187126a8a12Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 3188126a8a12Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 3189126a8a12Smrg # but as the default 3190126a8a12Smrg # location of the library. 3191126a8a12Smrg ;; 3192126a8a12Smrg esac 3193126a8a12Smrg 3194126a8a12Smrg case $cc_basename in 3195126a8a12Smrg CC*) 3196126a8a12Smrg # FIXME: insert proper C++ library support 3197126a8a12Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3198126a8a12Smrg ;; 3199126a8a12Smrg aCC*) 3200126a8a12Smrg case $host_cpu in 3201126a8a12Smrg hppa*64*) 3202126a8a12Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 3203126a8a12Smrg ;; 3204126a8a12Smrg ia64*) 3205126a8a12Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 3206126a8a12Smrg ;; 3207126a8a12Smrg *) 3208126a8a12Smrg _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' 3209126a8a12Smrg ;; 3210126a8a12Smrg esac 3211126a8a12Smrg # Commands to make compiler produce verbose output that lists 3212126a8a12Smrg # what "hidden" libraries, object files and flags are used when 3213126a8a12Smrg # linking a shared library. 3214126a8a12Smrg # 3215126a8a12Smrg # There doesn't appear to be a way to prevent this compiler from 3216126a8a12Smrg # explicitly linking system object files so we need to strip them 3217126a8a12Smrg # from the output so that they don't get included in the library 3218126a8a12Smrg # dependencies. 3219126a8a12Smrg 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' 3220126a8a12Smrg ;; 3221126a8a12Smrg *) 3222126a8a12Smrg if test "$GXX" = yes; then 3223126a8a12Smrg if test $with_gnu_ld = no; then 3224126a8a12Smrg case $host_cpu in 3225126a8a12Smrg hppa*64*) 3226126a8a12Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 3227126a8a12Smrg ;; 3228126a8a12Smrg ia64*) 3229126a8a12Smrg _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' 3230126a8a12Smrg ;; 3231126a8a12Smrg *) 3232126a8a12Smrg _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' 3233126a8a12Smrg ;; 3234126a8a12Smrg esac 3235126a8a12Smrg fi 3236126a8a12Smrg else 3237126a8a12Smrg # FIXME: insert proper C++ library support 3238126a8a12Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3239126a8a12Smrg fi 3240126a8a12Smrg ;; 3241126a8a12Smrg esac 3242126a8a12Smrg ;; 3243126a8a12Smrg interix3*) 3244126a8a12Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 3245126a8a12Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 3246126a8a12Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 3247126a8a12Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 3248126a8a12Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 3249126a8a12Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 3250126a8a12Smrg # default) and relocated if they conflict, which is a slow very memory 3251126a8a12Smrg # consuming and fragmenting process. To avoid this, we pick a random, 3252126a8a12Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 3253126a8a12Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 3254126a8a12Smrg _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' 3255126a8a12Smrg _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' 3256126a8a12Smrg ;; 3257126a8a12Smrg irix5* | irix6*) 3258126a8a12Smrg case $cc_basename in 3259126a8a12Smrg CC*) 3260126a8a12Smrg # SGI C++ 3261126a8a12Smrg _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' 3262126a8a12Smrg 3263126a8a12Smrg # Archives containing C++ object files must be created using 3264126a8a12Smrg # "CC -ar", where "CC" is the IRIX C++ compiler. This is 3265126a8a12Smrg # necessary to make sure instantiated templates are included 3266126a8a12Smrg # in the archive. 3267126a8a12Smrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 3268126a8a12Smrg ;; 3269126a8a12Smrg *) 3270126a8a12Smrg if test "$GXX" = yes; then 3271126a8a12Smrg if test "$with_gnu_ld" = no; then 3272126a8a12Smrg _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' 3273126a8a12Smrg else 3274126a8a12Smrg _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' 3275126a8a12Smrg fi 3276126a8a12Smrg fi 3277126a8a12Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 3278126a8a12Smrg ;; 3279126a8a12Smrg esac 3280126a8a12Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 3281126a8a12Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 3282126a8a12Smrg ;; 3283126a8a12Smrg linux*) 3284126a8a12Smrg case $cc_basename in 3285126a8a12Smrg KCC*) 3286126a8a12Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 3287126a8a12Smrg 3288126a8a12Smrg # KCC will only create a shared library if the output file 3289126a8a12Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 3290126a8a12Smrg # to its proper name (with version) after linking. 3291126a8a12Smrg _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' 3292126a8a12Smrg _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' 3293126a8a12Smrg # Commands to make compiler produce verbose output that lists 3294126a8a12Smrg # what "hidden" libraries, object files and flags are used when 3295126a8a12Smrg # linking a shared library. 3296126a8a12Smrg # 3297126a8a12Smrg # There doesn't appear to be a way to prevent this compiler from 3298126a8a12Smrg # explicitly linking system object files so we need to strip them 3299126a8a12Smrg # from the output so that they don't get included in the library 3300126a8a12Smrg # dependencies. 3301126a8a12Smrg 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' 3302126a8a12Smrg 3303126a8a12Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir' 3304126a8a12Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 3305126a8a12Smrg 3306126a8a12Smrg # Archives containing C++ object files must be created using 3307126a8a12Smrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 3308126a8a12Smrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 3309126a8a12Smrg ;; 3310126a8a12Smrg icpc*) 3311126a8a12Smrg # Intel C++ 3312126a8a12Smrg with_gnu_ld=yes 3313126a8a12Smrg # version 8.0 and above of icpc choke on multiply defined symbols 3314126a8a12Smrg # if we add $predep_objects and $postdep_objects, however 7.1 and 3315126a8a12Smrg # earlier do not add the objects themselves. 3316126a8a12Smrg case `$CC -V 2>&1` in 3317126a8a12Smrg *"Version 7."*) 3318126a8a12Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 3319126a8a12Smrg _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' 3320126a8a12Smrg ;; 3321126a8a12Smrg *) # Version 8.0 or newer 3322126a8a12Smrg tmp_idyn= 3323126a8a12Smrg case $host_cpu in 3324126a8a12Smrg ia64*) tmp_idyn=' -i_dynamic';; 3325126a8a12Smrg esac 3326126a8a12Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 3327126a8a12Smrg _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' 3328126a8a12Smrg ;; 3329126a8a12Smrg esac 3330126a8a12Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 3331126a8a12Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 3332126a8a12Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 3333126a8a12Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 3334126a8a12Smrg ;; 3335126a8a12Smrg pgCC*) 3336126a8a12Smrg # Portland Group C++ compiler 3337126a8a12Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 3338126a8a12Smrg _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' 3339126a8a12Smrg 3340126a8a12Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 3341126a8a12Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 3342126a8a12Smrg _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' 3343126a8a12Smrg ;; 3344126a8a12Smrg cxx*) 3345126a8a12Smrg # Compaq C++ 3346126a8a12Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 3347126a8a12Smrg _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' 3348126a8a12Smrg 3349126a8a12Smrg runpath_var=LD_RUN_PATH 3350126a8a12Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 3351126a8a12Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 3352126a8a12Smrg 3353126a8a12Smrg # Commands to make compiler produce verbose output that lists 3354126a8a12Smrg # what "hidden" libraries, object files and flags are used when 3355126a8a12Smrg # linking a shared library. 3356126a8a12Smrg # 3357126a8a12Smrg # There doesn't appear to be a way to prevent this compiler from 3358126a8a12Smrg # explicitly linking system object files so we need to strip them 3359126a8a12Smrg # from the output so that they don't get included in the library 3360126a8a12Smrg # dependencies. 3361126a8a12Smrg 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' 3362126a8a12Smrg ;; 3363126a8a12Smrg esac 3364126a8a12Smrg ;; 3365126a8a12Smrg lynxos*) 3366126a8a12Smrg # FIXME: insert proper C++ library support 3367126a8a12Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3368126a8a12Smrg ;; 3369126a8a12Smrg m88k*) 3370126a8a12Smrg # FIXME: insert proper C++ library support 3371126a8a12Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3372126a8a12Smrg ;; 3373126a8a12Smrg mvs*) 3374126a8a12Smrg case $cc_basename in 3375126a8a12Smrg cxx*) 3376126a8a12Smrg # FIXME: insert proper C++ library support 3377126a8a12Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3378126a8a12Smrg ;; 3379126a8a12Smrg *) 3380126a8a12Smrg # FIXME: insert proper C++ library support 3381126a8a12Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3382126a8a12Smrg ;; 3383126a8a12Smrg esac 3384126a8a12Smrg ;; 3385126a8a12Smrg netbsd*) 3386126a8a12Smrg if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then 3387126a8a12Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 3388126a8a12Smrg wlarc= 3389126a8a12Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 3390126a8a12Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 3391126a8a12Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 3392126a8a12Smrg fi 3393126a8a12Smrg # Workaround some broken pre-1.5 toolchains 3394126a8a12Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 3395126a8a12Smrg ;; 3396126a8a12Smrg openbsd2*) 3397126a8a12Smrg # C++ shared libraries are fairly broken 3398126a8a12Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3399126a8a12Smrg ;; 3400126a8a12Smrg openbsd*) 3401126a8a12Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 3402126a8a12Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 3403126a8a12Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 3404126a8a12Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 3405126a8a12Smrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 3406126a8a12Smrg _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' 3407126a8a12Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 3408126a8a12Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 3409126a8a12Smrg fi 3410126a8a12Smrg output_verbose_link_cmd='echo' 3411126a8a12Smrg ;; 3412126a8a12Smrg osf3*) 3413126a8a12Smrg case $cc_basename in 3414126a8a12Smrg KCC*) 3415126a8a12Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 3416126a8a12Smrg 3417126a8a12Smrg # KCC will only create a shared library if the output file 3418126a8a12Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 3419126a8a12Smrg # to its proper name (with version) after linking. 3420126a8a12Smrg _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' 3421126a8a12Smrg 3422126a8a12Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 3423126a8a12Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 3424126a8a12Smrg 3425126a8a12Smrg # Archives containing C++ object files must be created using 3426126a8a12Smrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 3427126a8a12Smrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 3428126a8a12Smrg 3429126a8a12Smrg ;; 3430126a8a12Smrg RCC*) 3431126a8a12Smrg # Rational C++ 2.4.1 3432126a8a12Smrg # FIXME: insert proper C++ library support 3433126a8a12Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3434126a8a12Smrg ;; 3435126a8a12Smrg cxx*) 3436126a8a12Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 3437126a8a12Smrg _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' 3438126a8a12Smrg 3439126a8a12Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 3440126a8a12Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 3441126a8a12Smrg 3442126a8a12Smrg # Commands to make compiler produce verbose output that lists 3443126a8a12Smrg # what "hidden" libraries, object files and flags are used when 3444126a8a12Smrg # linking a shared library. 3445126a8a12Smrg # 3446126a8a12Smrg # There doesn't appear to be a way to prevent this compiler from 3447126a8a12Smrg # explicitly linking system object files so we need to strip them 3448126a8a12Smrg # from the output so that they don't get included in the library 3449126a8a12Smrg # dependencies. 3450126a8a12Smrg 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' 3451126a8a12Smrg ;; 3452126a8a12Smrg *) 3453126a8a12Smrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 3454126a8a12Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 3455126a8a12Smrg _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' 3456126a8a12Smrg 3457126a8a12Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 3458126a8a12Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 3459126a8a12Smrg 3460126a8a12Smrg # Commands to make compiler produce verbose output that lists 3461126a8a12Smrg # what "hidden" libraries, object files and flags are used when 3462126a8a12Smrg # linking a shared library. 3463126a8a12Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' 3464126a8a12Smrg 3465126a8a12Smrg else 3466126a8a12Smrg # FIXME: insert proper C++ library support 3467126a8a12Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3468126a8a12Smrg fi 3469126a8a12Smrg ;; 3470126a8a12Smrg esac 3471126a8a12Smrg ;; 3472126a8a12Smrg osf4* | osf5*) 3473126a8a12Smrg case $cc_basename in 3474126a8a12Smrg KCC*) 3475126a8a12Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 3476126a8a12Smrg 3477126a8a12Smrg # KCC will only create a shared library if the output file 3478126a8a12Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 3479126a8a12Smrg # to its proper name (with version) after linking. 3480126a8a12Smrg _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' 3481126a8a12Smrg 3482126a8a12Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 3483126a8a12Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 3484126a8a12Smrg 3485126a8a12Smrg # Archives containing C++ object files must be created using 3486126a8a12Smrg # the KAI C++ compiler. 3487126a8a12Smrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' 3488126a8a12Smrg ;; 3489126a8a12Smrg RCC*) 3490126a8a12Smrg # Rational C++ 2.4.1 3491126a8a12Smrg # FIXME: insert proper C++ library support 3492126a8a12Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3493126a8a12Smrg ;; 3494126a8a12Smrg cxx*) 3495126a8a12Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 3496126a8a12Smrg _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' 3497126a8a12Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 3498126a8a12Smrg echo "-hidden">> $lib.exp~ 3499126a8a12Smrg $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~ 3500126a8a12Smrg $rm $lib.exp' 3501126a8a12Smrg 3502126a8a12Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 3503126a8a12Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 3504126a8a12Smrg 3505126a8a12Smrg # Commands to make compiler produce verbose output that lists 3506126a8a12Smrg # what "hidden" libraries, object files and flags are used when 3507126a8a12Smrg # linking a shared library. 3508126a8a12Smrg # 3509126a8a12Smrg # There doesn't appear to be a way to prevent this compiler from 3510126a8a12Smrg # explicitly linking system object files so we need to strip them 3511126a8a12Smrg # from the output so that they don't get included in the library 3512126a8a12Smrg # dependencies. 3513126a8a12Smrg 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' 3514126a8a12Smrg ;; 3515126a8a12Smrg *) 3516126a8a12Smrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 3517126a8a12Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 3518126a8a12Smrg _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' 3519126a8a12Smrg 3520126a8a12Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 3521126a8a12Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 3522126a8a12Smrg 3523126a8a12Smrg # Commands to make compiler produce verbose output that lists 3524126a8a12Smrg # what "hidden" libraries, object files and flags are used when 3525126a8a12Smrg # linking a shared library. 3526126a8a12Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' 3527126a8a12Smrg 3528126a8a12Smrg else 3529126a8a12Smrg # FIXME: insert proper C++ library support 3530126a8a12Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3531126a8a12Smrg fi 3532126a8a12Smrg ;; 3533126a8a12Smrg esac 3534126a8a12Smrg ;; 3535126a8a12Smrg psos*) 3536126a8a12Smrg # FIXME: insert proper C++ library support 3537126a8a12Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3538126a8a12Smrg ;; 3539126a8a12Smrg sunos4*) 3540126a8a12Smrg case $cc_basename in 3541126a8a12Smrg CC*) 3542126a8a12Smrg # Sun C++ 4.x 3543126a8a12Smrg # FIXME: insert proper C++ library support 3544126a8a12Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3545126a8a12Smrg ;; 3546126a8a12Smrg lcc*) 3547126a8a12Smrg # Lucid 3548126a8a12Smrg # FIXME: insert proper C++ library support 3549126a8a12Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3550126a8a12Smrg ;; 3551126a8a12Smrg *) 3552126a8a12Smrg # FIXME: insert proper C++ library support 3553126a8a12Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3554126a8a12Smrg ;; 3555126a8a12Smrg esac 3556126a8a12Smrg ;; 3557126a8a12Smrg solaris*) 3558126a8a12Smrg case $cc_basename in 3559126a8a12Smrg CC*) 3560126a8a12Smrg # Sun C++ 4.2, 5.x and Centerline C++ 3561126a8a12Smrg _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes 3562126a8a12Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' 3563126a8a12Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 3564126a8a12Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 3565126a8a12Smrg $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' 3566126a8a12Smrg 3567126a8a12Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 3568126a8a12Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 3569126a8a12Smrg case $host_os in 3570126a8a12Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 3571126a8a12Smrg *) 3572126a8a12Smrg # The C++ compiler is used as linker so we must use $wl 3573126a8a12Smrg # flag to pass the commands to the underlying system 3574126a8a12Smrg # linker. We must also pass each convience library through 3575126a8a12Smrg # to the system linker between allextract/defaultextract. 3576126a8a12Smrg # The C++ compiler will combine linker options so we 3577126a8a12Smrg # cannot just pass the convience library names through 3578126a8a12Smrg # without $wl. 3579126a8a12Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 3580126a8a12Smrg _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' 3581126a8a12Smrg ;; 3582126a8a12Smrg esac 3583126a8a12Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 3584126a8a12Smrg 3585126a8a12Smrg output_verbose_link_cmd='echo' 3586126a8a12Smrg 3587126a8a12Smrg # Archives containing C++ object files must be created using 3588126a8a12Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 3589126a8a12Smrg # necessary to make sure instantiated templates are included 3590126a8a12Smrg # in the archive. 3591126a8a12Smrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 3592126a8a12Smrg ;; 3593126a8a12Smrg gcx*) 3594126a8a12Smrg # Green Hills C++ Compiler 3595126a8a12Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 3596126a8a12Smrg 3597126a8a12Smrg # The C++ compiler must be used to create the archive. 3598126a8a12Smrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 3599126a8a12Smrg ;; 3600126a8a12Smrg *) 3601126a8a12Smrg # GNU C++ compiler with Solaris linker 3602126a8a12Smrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 3603126a8a12Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' 3604126a8a12Smrg if $CC --version | grep -v '^2\.7' > /dev/null; then 3605126a8a12Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 3606126a8a12Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 3607126a8a12Smrg $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' 3608126a8a12Smrg 3609126a8a12Smrg # Commands to make compiler produce verbose output that lists 3610126a8a12Smrg # what "hidden" libraries, object files and flags are used when 3611126a8a12Smrg # linking a shared library. 3612126a8a12Smrg output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" 3613126a8a12Smrg else 3614126a8a12Smrg # g++ 2.7 appears to require `-G' NOT `-shared' on this 3615126a8a12Smrg # platform. 3616126a8a12Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 3617126a8a12Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 3618126a8a12Smrg $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' 3619126a8a12Smrg 3620126a8a12Smrg # Commands to make compiler produce verbose output that lists 3621126a8a12Smrg # what "hidden" libraries, object files and flags are used when 3622126a8a12Smrg # linking a shared library. 3623126a8a12Smrg output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" 3624126a8a12Smrg fi 3625126a8a12Smrg 3626126a8a12Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' 3627126a8a12Smrg fi 3628126a8a12Smrg ;; 3629126a8a12Smrg esac 3630126a8a12Smrg ;; 3631126a8a12Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 3632126a8a12Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 3633126a8a12Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 3634126a8a12Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 3635126a8a12Smrg runpath_var='LD_RUN_PATH' 3636126a8a12Smrg 3637126a8a12Smrg case $cc_basename in 3638126a8a12Smrg CC*) 3639126a8a12Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 3640126a8a12Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 3641126a8a12Smrg ;; 3642126a8a12Smrg *) 3643126a8a12Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 3644126a8a12Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 3645126a8a12Smrg ;; 3646126a8a12Smrg esac 3647126a8a12Smrg ;; 3648126a8a12Smrg sysv5* | sco3.2v5* | sco5v6*) 3649126a8a12Smrg # Note: We can NOT use -z defs as we might desire, because we do not 3650126a8a12Smrg # link with -lc, and that would cause any symbols used from libc to 3651126a8a12Smrg # always be unresolved, which means just about no library would 3652126a8a12Smrg # ever link correctly. If we're not using GNU ld we use -z text 3653126a8a12Smrg # though, which does catch some bad symbols but isn't as heavy-handed 3654126a8a12Smrg # as -z defs. 3655126a8a12Smrg # For security reasons, it is highly recommended that you always 3656126a8a12Smrg # use absolute paths for naming shared libraries, and exclude the 3657126a8a12Smrg # DT_RUNPATH tag from executables and libraries. But doing so 3658126a8a12Smrg # requires that you compile everything twice, which is a pain. 3659126a8a12Smrg # So that behaviour is only enabled if SCOABSPATH is set to a 3660126a8a12Smrg # non-empty value in the environment. Most likely only useful for 3661126a8a12Smrg # creating official distributions of packages. 3662126a8a12Smrg # This is a hack until libtool officially supports absolute path 3663126a8a12Smrg # names for shared libraries. 3664126a8a12Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 3665126a8a12Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 3666126a8a12Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 3667126a8a12Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 3668126a8a12Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' 3669126a8a12Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' 3670126a8a12Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 3671126a8a12Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 3672126a8a12Smrg runpath_var='LD_RUN_PATH' 3673126a8a12Smrg 3674126a8a12Smrg case $cc_basename in 3675126a8a12Smrg CC*) 3676126a8a12Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' 3677126a8a12Smrg _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' 3678126a8a12Smrg ;; 3679126a8a12Smrg *) 3680126a8a12Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' 3681126a8a12Smrg _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' 3682126a8a12Smrg ;; 3683126a8a12Smrg esac 3684126a8a12Smrg ;; 3685126a8a12Smrg tandem*) 3686126a8a12Smrg case $cc_basename in 3687126a8a12Smrg NCC*) 3688126a8a12Smrg # NonStop-UX NCC 3.20 3689126a8a12Smrg # FIXME: insert proper C++ library support 3690126a8a12Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3691126a8a12Smrg ;; 3692126a8a12Smrg *) 3693126a8a12Smrg # FIXME: insert proper C++ library support 3694126a8a12Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3695126a8a12Smrg ;; 3696126a8a12Smrg esac 3697126a8a12Smrg ;; 3698126a8a12Smrg vxworks*) 3699126a8a12Smrg # FIXME: insert proper C++ library support 3700126a8a12Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3701126a8a12Smrg ;; 3702126a8a12Smrg *) 3703126a8a12Smrg # FIXME: insert proper C++ library support 3704126a8a12Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3705126a8a12Smrg ;; 3706126a8a12Smrgesac 3707126a8a12SmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) 3708126a8a12Smrgtest "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 3709126a8a12Smrg 3710126a8a12Smrg_LT_AC_TAGVAR(GCC, $1)="$GXX" 3711126a8a12Smrg_LT_AC_TAGVAR(LD, $1)="$LD" 3712126a8a12Smrg 3713126a8a12SmrgAC_LIBTOOL_POSTDEP_PREDEP($1) 3714126a8a12SmrgAC_LIBTOOL_PROG_COMPILER_PIC($1) 3715126a8a12SmrgAC_LIBTOOL_PROG_CC_C_O($1) 3716126a8a12SmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) 3717126a8a12SmrgAC_LIBTOOL_PROG_LD_SHLIBS($1) 3718126a8a12SmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1) 3719126a8a12SmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) 3720126a8a12Smrg 3721126a8a12SmrgAC_LIBTOOL_CONFIG($1) 3722126a8a12Smrg 3723126a8a12SmrgAC_LANG_POP 3724126a8a12SmrgCC=$lt_save_CC 3725126a8a12SmrgLDCXX=$LD 3726126a8a12SmrgLD=$lt_save_LD 3727126a8a12SmrgGCC=$lt_save_GCC 3728126a8a12Smrgwith_gnu_ldcxx=$with_gnu_ld 3729126a8a12Smrgwith_gnu_ld=$lt_save_with_gnu_ld 3730126a8a12Smrglt_cv_path_LDCXX=$lt_cv_path_LD 3731126a8a12Smrglt_cv_path_LD=$lt_save_path_LD 3732126a8a12Smrglt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 3733126a8a12Smrglt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 3734126a8a12Smrg])# AC_LIBTOOL_LANG_CXX_CONFIG 3735126a8a12Smrg 3736126a8a12Smrg# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME]) 3737126a8a12Smrg# ------------------------------------ 3738126a8a12Smrg# Figure out "hidden" library dependencies from verbose 3739126a8a12Smrg# compiler output when linking a shared library. 3740126a8a12Smrg# Parse the compiler output and extract the necessary 3741126a8a12Smrg# objects, libraries and library flags. 3742126a8a12SmrgAC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[ 3743126a8a12Smrgdnl we can't use the lt_simple_compile_test_code here, 3744126a8a12Smrgdnl because it contains code intended for an executable, 3745126a8a12Smrgdnl not a library. It's possible we should let each 3746126a8a12Smrgdnl tag define a new lt_????_link_test_code variable, 3747126a8a12Smrgdnl but it's only used here... 3748126a8a12Smrgifelse([$1],[],[cat > conftest.$ac_ext <<EOF 3749126a8a12Smrgint a; 3750126a8a12Smrgvoid foo (void) { a = 0; } 3751126a8a12SmrgEOF 3752126a8a12Smrg],[$1],[CXX],[cat > conftest.$ac_ext <<EOF 3753126a8a12Smrgclass Foo 3754126a8a12Smrg{ 3755126a8a12Smrgpublic: 3756126a8a12Smrg Foo (void) { a = 0; } 3757126a8a12Smrgprivate: 3758126a8a12Smrg int a; 3759126a8a12Smrg}; 3760126a8a12SmrgEOF 3761126a8a12Smrg],[$1],[F77],[cat > conftest.$ac_ext <<EOF 3762126a8a12Smrg subroutine foo 3763126a8a12Smrg implicit none 3764126a8a12Smrg integer*4 a 3765126a8a12Smrg a=0 3766126a8a12Smrg return 3767126a8a12Smrg end 3768126a8a12SmrgEOF 3769126a8a12Smrg],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF 3770126a8a12Smrgpublic class foo { 3771126a8a12Smrg private int a; 3772126a8a12Smrg public void bar (void) { 3773126a8a12Smrg a = 0; 3774126a8a12Smrg } 3775126a8a12Smrg}; 3776126a8a12SmrgEOF 3777126a8a12Smrg]) 3778126a8a12Smrgdnl Parse the compiler output and extract the necessary 3779126a8a12Smrgdnl objects, libraries and library flags. 3780126a8a12Smrgif AC_TRY_EVAL(ac_compile); then 3781126a8a12Smrg # Parse the compiler output and extract the necessary 3782126a8a12Smrg # objects, libraries and library flags. 3783126a8a12Smrg 3784126a8a12Smrg # Sentinel used to keep track of whether or not we are before 3785126a8a12Smrg # the conftest object file. 3786126a8a12Smrg pre_test_object_deps_done=no 3787126a8a12Smrg 3788126a8a12Smrg # The `*' in the case matches for architectures that use `case' in 3789126a8a12Smrg # $output_verbose_cmd can trigger glob expansion during the loop 3790126a8a12Smrg # eval without this substitution. 3791126a8a12Smrg output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"` 3792126a8a12Smrg 3793126a8a12Smrg for p in `eval $output_verbose_link_cmd`; do 3794126a8a12Smrg case $p in 3795126a8a12Smrg 3796126a8a12Smrg -L* | -R* | -l*) 3797126a8a12Smrg # Some compilers place space between "-{L,R}" and the path. 3798126a8a12Smrg # Remove the space. 3799126a8a12Smrg if test $p = "-L" \ 3800126a8a12Smrg || test $p = "-R"; then 3801126a8a12Smrg prev=$p 3802126a8a12Smrg continue 3803126a8a12Smrg else 3804126a8a12Smrg prev= 3805126a8a12Smrg fi 3806126a8a12Smrg 3807126a8a12Smrg if test "$pre_test_object_deps_done" = no; then 3808126a8a12Smrg case $p in 3809126a8a12Smrg -L* | -R*) 3810126a8a12Smrg # Internal compiler library paths should come after those 3811126a8a12Smrg # provided the user. The postdeps already come after the 3812126a8a12Smrg # user supplied libs so there is no need to process them. 3813126a8a12Smrg if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then 3814126a8a12Smrg _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" 3815126a8a12Smrg else 3816126a8a12Smrg _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" 3817126a8a12Smrg fi 3818126a8a12Smrg ;; 3819126a8a12Smrg # The "-l" case would never come before the object being 3820126a8a12Smrg # linked, so don't bother handling this case. 3821126a8a12Smrg esac 3822126a8a12Smrg else 3823126a8a12Smrg if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then 3824126a8a12Smrg _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}" 3825126a8a12Smrg else 3826126a8a12Smrg _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}" 3827126a8a12Smrg fi 3828126a8a12Smrg fi 3829126a8a12Smrg ;; 3830126a8a12Smrg 3831126a8a12Smrg *.$objext) 3832126a8a12Smrg # This assumes that the test object file only shows up 3833126a8a12Smrg # once in the compiler output. 3834126a8a12Smrg if test "$p" = "conftest.$objext"; then 3835126a8a12Smrg pre_test_object_deps_done=yes 3836126a8a12Smrg continue 3837126a8a12Smrg fi 3838126a8a12Smrg 3839126a8a12Smrg if test "$pre_test_object_deps_done" = no; then 3840126a8a12Smrg if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then 3841126a8a12Smrg _LT_AC_TAGVAR(predep_objects, $1)="$p" 3842126a8a12Smrg else 3843126a8a12Smrg _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p" 3844126a8a12Smrg fi 3845126a8a12Smrg else 3846126a8a12Smrg if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then 3847126a8a12Smrg _LT_AC_TAGVAR(postdep_objects, $1)="$p" 3848126a8a12Smrg else 3849126a8a12Smrg _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p" 3850126a8a12Smrg fi 3851126a8a12Smrg fi 3852126a8a12Smrg ;; 3853126a8a12Smrg 3854126a8a12Smrg *) ;; # Ignore the rest. 3855126a8a12Smrg 3856126a8a12Smrg esac 3857126a8a12Smrg done 3858126a8a12Smrg 3859126a8a12Smrg # Clean up. 3860126a8a12Smrg rm -f a.out a.exe 3861126a8a12Smrgelse 3862126a8a12Smrg echo "libtool.m4: error: problem compiling $1 test program" 3863126a8a12Smrgfi 3864126a8a12Smrg 3865126a8a12Smrg$rm -f confest.$objext 3866126a8a12Smrg 3867126a8a12Smrg# PORTME: override above test on systems where it is broken 3868126a8a12Smrgifelse([$1],[CXX], 3869126a8a12Smrg[case $host_os in 3870126a8a12Smrginterix3*) 3871126a8a12Smrg # Interix 3.5 installs completely hosed .la files for C++, so rather than 3872126a8a12Smrg # hack all around it, let's just trust "g++" to DTRT. 3873126a8a12Smrg _LT_AC_TAGVAR(predep_objects,$1)= 3874126a8a12Smrg _LT_AC_TAGVAR(postdep_objects,$1)= 3875126a8a12Smrg _LT_AC_TAGVAR(postdeps,$1)= 3876126a8a12Smrg ;; 3877126a8a12Smrg 3878126a8a12Smrgsolaris*) 3879126a8a12Smrg case $cc_basename in 3880126a8a12Smrg CC*) 3881126a8a12Smrg # Adding this requires a known-good setup of shared libraries for 3882126a8a12Smrg # Sun compiler versions before 5.6, else PIC objects from an old 3883126a8a12Smrg # archive will be linked into the output, leading to subtle bugs. 3884126a8a12Smrg _LT_AC_TAGVAR(postdeps,$1)='-lCstd -lCrun' 3885126a8a12Smrg ;; 3886126a8a12Smrg esac 3887126a8a12Smrg ;; 3888126a8a12Smrgesac 3889126a8a12Smrg]) 3890126a8a12Smrg 3891126a8a12Smrgcase " $_LT_AC_TAGVAR(postdeps, $1) " in 3892126a8a12Smrg*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;; 3893126a8a12Smrgesac 3894126a8a12Smrg])# AC_LIBTOOL_POSTDEP_PREDEP 3895126a8a12Smrg 3896126a8a12Smrg# AC_LIBTOOL_LANG_F77_CONFIG 3897126a8a12Smrg# -------------------------- 3898126a8a12Smrg# Ensure that the configuration vars for the C compiler are 3899126a8a12Smrg# suitably defined. Those variables are subsequently used by 3900126a8a12Smrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 3901126a8a12SmrgAC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)]) 3902126a8a12SmrgAC_DEFUN([_LT_AC_LANG_F77_CONFIG], 3903126a8a12Smrg[AC_REQUIRE([AC_PROG_F77]) 3904126a8a12SmrgAC_LANG_PUSH(Fortran 77) 3905126a8a12Smrg 3906126a8a12Smrg_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 3907126a8a12Smrg_LT_AC_TAGVAR(allow_undefined_flag, $1)= 3908126a8a12Smrg_LT_AC_TAGVAR(always_export_symbols, $1)=no 3909126a8a12Smrg_LT_AC_TAGVAR(archive_expsym_cmds, $1)= 3910126a8a12Smrg_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= 3911126a8a12Smrg_LT_AC_TAGVAR(hardcode_direct, $1)=no 3912126a8a12Smrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= 3913126a8a12Smrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 3914126a8a12Smrg_LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 3915126a8a12Smrg_LT_AC_TAGVAR(hardcode_minus_L, $1)=no 3916126a8a12Smrg_LT_AC_TAGVAR(hardcode_automatic, $1)=no 3917126a8a12Smrg_LT_AC_TAGVAR(module_cmds, $1)= 3918126a8a12Smrg_LT_AC_TAGVAR(module_expsym_cmds, $1)= 3919126a8a12Smrg_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown 3920126a8a12Smrg_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 3921126a8a12Smrg_LT_AC_TAGVAR(no_undefined_flag, $1)= 3922126a8a12Smrg_LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 3923126a8a12Smrg_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no 3924126a8a12Smrg 3925126a8a12Smrg# Source file extension for f77 test sources. 3926126a8a12Smrgac_ext=f 3927126a8a12Smrg 3928126a8a12Smrg# Object file extension for compiled f77 test sources. 3929126a8a12Smrgobjext=o 3930126a8a12Smrg_LT_AC_TAGVAR(objext, $1)=$objext 3931126a8a12Smrg 3932126a8a12Smrg# Code to be used in simple compile tests 3933126a8a12Smrglt_simple_compile_test_code=" subroutine t\n return\n end\n" 3934126a8a12Smrg 3935126a8a12Smrg# Code to be used in simple link tests 3936126a8a12Smrglt_simple_link_test_code=" program t\n end\n" 3937126a8a12Smrg 3938126a8a12Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 3939126a8a12Smrg_LT_AC_SYS_COMPILER 3940126a8a12Smrg 3941126a8a12Smrg# save warnings/boilerplate of simple test code 3942126a8a12Smrg_LT_COMPILER_BOILERPLATE 3943126a8a12Smrg_LT_LINKER_BOILERPLATE 3944126a8a12Smrg 3945126a8a12Smrg# Allow CC to be a program name with arguments. 3946126a8a12Smrglt_save_CC="$CC" 3947126a8a12SmrgCC=${F77-"f77"} 3948126a8a12Smrgcompiler=$CC 3949126a8a12Smrg_LT_AC_TAGVAR(compiler, $1)=$CC 3950126a8a12Smrg_LT_CC_BASENAME([$compiler]) 3951126a8a12Smrg 3952126a8a12SmrgAC_MSG_CHECKING([if libtool supports shared libraries]) 3953126a8a12SmrgAC_MSG_RESULT([$can_build_shared]) 3954126a8a12Smrg 3955126a8a12SmrgAC_MSG_CHECKING([whether to build shared libraries]) 3956126a8a12Smrgtest "$can_build_shared" = "no" && enable_shared=no 3957126a8a12Smrg 3958126a8a12Smrg# On AIX, shared libraries and static libraries use the same namespace, and 3959126a8a12Smrg# are all built from PIC. 3960126a8a12Smrgcase $host_os in 3961126a8a12Smrgaix3*) 3962126a8a12Smrg test "$enable_shared" = yes && enable_static=no 3963126a8a12Smrg if test -n "$RANLIB"; then 3964126a8a12Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 3965126a8a12Smrg postinstall_cmds='$RANLIB $lib' 3966126a8a12Smrg fi 3967126a8a12Smrg ;; 3968126a8a12Smrgaix4* | aix5*) 3969126a8a12Smrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 3970126a8a12Smrg test "$enable_shared" = yes && enable_static=no 3971126a8a12Smrg fi 3972126a8a12Smrg ;; 3973126a8a12Smrgesac 3974126a8a12SmrgAC_MSG_RESULT([$enable_shared]) 3975126a8a12Smrg 3976126a8a12SmrgAC_MSG_CHECKING([whether to build static libraries]) 3977126a8a12Smrg# Make sure either enable_shared or enable_static is yes. 3978126a8a12Smrgtest "$enable_shared" = yes || enable_static=yes 3979126a8a12SmrgAC_MSG_RESULT([$enable_static]) 3980126a8a12Smrg 3981126a8a12Smrg_LT_AC_TAGVAR(GCC, $1)="$G77" 3982126a8a12Smrg_LT_AC_TAGVAR(LD, $1)="$LD" 3983126a8a12Smrg 3984126a8a12SmrgAC_LIBTOOL_PROG_COMPILER_PIC($1) 3985126a8a12SmrgAC_LIBTOOL_PROG_CC_C_O($1) 3986126a8a12SmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) 3987126a8a12SmrgAC_LIBTOOL_PROG_LD_SHLIBS($1) 3988126a8a12SmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1) 3989126a8a12SmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) 3990126a8a12Smrg 3991126a8a12SmrgAC_LIBTOOL_CONFIG($1) 3992126a8a12Smrg 3993126a8a12SmrgAC_LANG_POP 3994126a8a12SmrgCC="$lt_save_CC" 3995126a8a12Smrg])# AC_LIBTOOL_LANG_F77_CONFIG 3996126a8a12Smrg 3997126a8a12Smrg 3998126a8a12Smrg# AC_LIBTOOL_LANG_GCJ_CONFIG 3999126a8a12Smrg# -------------------------- 4000126a8a12Smrg# Ensure that the configuration vars for the C compiler are 4001126a8a12Smrg# suitably defined. Those variables are subsequently used by 4002126a8a12Smrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 4003126a8a12SmrgAC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)]) 4004126a8a12SmrgAC_DEFUN([_LT_AC_LANG_GCJ_CONFIG], 4005126a8a12Smrg[AC_LANG_SAVE 4006126a8a12Smrg 4007126a8a12Smrg# Source file extension for Java test sources. 4008126a8a12Smrgac_ext=java 4009126a8a12Smrg 4010126a8a12Smrg# Object file extension for compiled Java test sources. 4011126a8a12Smrgobjext=o 4012126a8a12Smrg_LT_AC_TAGVAR(objext, $1)=$objext 4013126a8a12Smrg 4014126a8a12Smrg# Code to be used in simple compile tests 4015126a8a12Smrglt_simple_compile_test_code="class foo {}\n" 4016126a8a12Smrg 4017126a8a12Smrg# Code to be used in simple link tests 4018126a8a12Smrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }\n' 4019126a8a12Smrg 4020126a8a12Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 4021126a8a12Smrg_LT_AC_SYS_COMPILER 4022126a8a12Smrg 4023126a8a12Smrg# save warnings/boilerplate of simple test code 4024126a8a12Smrg_LT_COMPILER_BOILERPLATE 4025126a8a12Smrg_LT_LINKER_BOILERPLATE 4026126a8a12Smrg 4027126a8a12Smrg# Allow CC to be a program name with arguments. 4028126a8a12Smrglt_save_CC="$CC" 4029126a8a12SmrgCC=${GCJ-"gcj"} 4030126a8a12Smrgcompiler=$CC 4031126a8a12Smrg_LT_AC_TAGVAR(compiler, $1)=$CC 4032126a8a12Smrg_LT_CC_BASENAME([$compiler]) 4033126a8a12Smrg 4034126a8a12Smrg# GCJ did not exist at the time GCC didn't implicitly link libc in. 4035126a8a12Smrg_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 4036126a8a12Smrg 4037126a8a12Smrg_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 4038126a8a12Smrg 4039126a8a12SmrgAC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) 4040126a8a12SmrgAC_LIBTOOL_PROG_COMPILER_PIC($1) 4041126a8a12SmrgAC_LIBTOOL_PROG_CC_C_O($1) 4042126a8a12SmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) 4043126a8a12SmrgAC_LIBTOOL_PROG_LD_SHLIBS($1) 4044126a8a12SmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1) 4045126a8a12SmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) 4046126a8a12Smrg 4047126a8a12SmrgAC_LIBTOOL_CONFIG($1) 4048126a8a12Smrg 4049126a8a12SmrgAC_LANG_RESTORE 4050126a8a12SmrgCC="$lt_save_CC" 4051126a8a12Smrg])# AC_LIBTOOL_LANG_GCJ_CONFIG 4052126a8a12Smrg 4053126a8a12Smrg 4054126a8a12Smrg# AC_LIBTOOL_LANG_RC_CONFIG 4055126a8a12Smrg# ------------------------- 4056126a8a12Smrg# Ensure that the configuration vars for the Windows resource compiler are 4057126a8a12Smrg# suitably defined. Those variables are subsequently used by 4058126a8a12Smrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 4059126a8a12SmrgAC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)]) 4060126a8a12SmrgAC_DEFUN([_LT_AC_LANG_RC_CONFIG], 4061126a8a12Smrg[AC_LANG_SAVE 4062126a8a12Smrg 4063126a8a12Smrg# Source file extension for RC test sources. 4064126a8a12Smrgac_ext=rc 4065126a8a12Smrg 4066126a8a12Smrg# Object file extension for compiled RC test sources. 4067126a8a12Smrgobjext=o 4068126a8a12Smrg_LT_AC_TAGVAR(objext, $1)=$objext 4069126a8a12Smrg 4070126a8a12Smrg# Code to be used in simple compile tests 4071126a8a12Smrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n' 4072126a8a12Smrg 4073126a8a12Smrg# Code to be used in simple link tests 4074126a8a12Smrglt_simple_link_test_code="$lt_simple_compile_test_code" 4075126a8a12Smrg 4076126a8a12Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 4077126a8a12Smrg_LT_AC_SYS_COMPILER 4078126a8a12Smrg 4079126a8a12Smrg# save warnings/boilerplate of simple test code 4080126a8a12Smrg_LT_COMPILER_BOILERPLATE 4081126a8a12Smrg_LT_LINKER_BOILERPLATE 4082126a8a12Smrg 4083126a8a12Smrg# Allow CC to be a program name with arguments. 4084126a8a12Smrglt_save_CC="$CC" 4085126a8a12SmrgCC=${RC-"windres"} 4086126a8a12Smrgcompiler=$CC 4087126a8a12Smrg_LT_AC_TAGVAR(compiler, $1)=$CC 4088126a8a12Smrg_LT_CC_BASENAME([$compiler]) 4089126a8a12Smrg_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 4090126a8a12Smrg 4091126a8a12SmrgAC_LIBTOOL_CONFIG($1) 4092126a8a12Smrg 4093126a8a12SmrgAC_LANG_RESTORE 4094126a8a12SmrgCC="$lt_save_CC" 4095126a8a12Smrg])# AC_LIBTOOL_LANG_RC_CONFIG 4096126a8a12Smrg 4097126a8a12Smrg 4098126a8a12Smrg# AC_LIBTOOL_CONFIG([TAGNAME]) 4099126a8a12Smrg# ---------------------------- 4100126a8a12Smrg# If TAGNAME is not passed, then create an initial libtool script 4101126a8a12Smrg# with a default configuration from the untagged config vars. Otherwise 4102126a8a12Smrg# add code to config.status for appending the configuration named by 4103126a8a12Smrg# TAGNAME from the matching tagged config vars. 4104126a8a12SmrgAC_DEFUN([AC_LIBTOOL_CONFIG], 4105126a8a12Smrg[# The else clause should only fire when bootstrapping the 4106126a8a12Smrg# libtool distribution, otherwise you forgot to ship ltmain.sh 4107126a8a12Smrg# with your package, and you will get complaints that there are 4108126a8a12Smrg# no rules to generate ltmain.sh. 4109126a8a12Smrgif test -f "$ltmain"; then 4110126a8a12Smrg # See if we are running on zsh, and set the options which allow our commands through 4111126a8a12Smrg # without removal of \ escapes. 4112126a8a12Smrg if test -n "${ZSH_VERSION+set}" ; then 4113126a8a12Smrg setopt NO_GLOB_SUBST 4114126a8a12Smrg fi 4115126a8a12Smrg # Now quote all the things that may contain metacharacters while being 4116126a8a12Smrg # careful not to overquote the AC_SUBSTed values. We take copies of the 4117126a8a12Smrg # variables and quote the copies for generation of the libtool script. 4118126a8a12Smrg for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ 4119126a8a12Smrg SED SHELL STRIP \ 4120126a8a12Smrg libname_spec library_names_spec soname_spec extract_expsyms_cmds \ 4121126a8a12Smrg old_striplib striplib file_magic_cmd finish_cmds finish_eval \ 4122126a8a12Smrg deplibs_check_method reload_flag reload_cmds need_locks \ 4123126a8a12Smrg lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ 4124126a8a12Smrg lt_cv_sys_global_symbol_to_c_name_address \ 4125126a8a12Smrg sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ 4126126a8a12Smrg old_postinstall_cmds old_postuninstall_cmds \ 4127126a8a12Smrg _LT_AC_TAGVAR(compiler, $1) \ 4128126a8a12Smrg _LT_AC_TAGVAR(CC, $1) \ 4129126a8a12Smrg _LT_AC_TAGVAR(LD, $1) \ 4130126a8a12Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \ 4131126a8a12Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \ 4132126a8a12Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \ 4133126a8a12Smrg _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \ 4134126a8a12Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \ 4135126a8a12Smrg _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \ 4136126a8a12Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \ 4137126a8a12Smrg _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \ 4138126a8a12Smrg _LT_AC_TAGVAR(old_archive_cmds, $1) \ 4139126a8a12Smrg _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \ 4140126a8a12Smrg _LT_AC_TAGVAR(predep_objects, $1) \ 4141126a8a12Smrg _LT_AC_TAGVAR(postdep_objects, $1) \ 4142126a8a12Smrg _LT_AC_TAGVAR(predeps, $1) \ 4143126a8a12Smrg _LT_AC_TAGVAR(postdeps, $1) \ 4144126a8a12Smrg _LT_AC_TAGVAR(compiler_lib_search_path, $1) \ 4145126a8a12Smrg _LT_AC_TAGVAR(archive_cmds, $1) \ 4146126a8a12Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1) \ 4147126a8a12Smrg _LT_AC_TAGVAR(postinstall_cmds, $1) \ 4148126a8a12Smrg _LT_AC_TAGVAR(postuninstall_cmds, $1) \ 4149126a8a12Smrg _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \ 4150126a8a12Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1) \ 4151126a8a12Smrg _LT_AC_TAGVAR(no_undefined_flag, $1) \ 4152126a8a12Smrg _LT_AC_TAGVAR(export_symbols_cmds, $1) \ 4153126a8a12Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \ 4154126a8a12Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \ 4155126a8a12Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \ 4156126a8a12Smrg _LT_AC_TAGVAR(hardcode_automatic, $1) \ 4157126a8a12Smrg _LT_AC_TAGVAR(module_cmds, $1) \ 4158126a8a12Smrg _LT_AC_TAGVAR(module_expsym_cmds, $1) \ 4159126a8a12Smrg _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \ 4160126a8a12Smrg _LT_AC_TAGVAR(exclude_expsyms, $1) \ 4161126a8a12Smrg _LT_AC_TAGVAR(include_expsyms, $1); do 4162126a8a12Smrg 4163126a8a12Smrg case $var in 4164126a8a12Smrg _LT_AC_TAGVAR(old_archive_cmds, $1) | \ 4165126a8a12Smrg _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \ 4166126a8a12Smrg _LT_AC_TAGVAR(archive_cmds, $1) | \ 4167126a8a12Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \ 4168126a8a12Smrg _LT_AC_TAGVAR(module_cmds, $1) | \ 4169126a8a12Smrg _LT_AC_TAGVAR(module_expsym_cmds, $1) | \ 4170126a8a12Smrg _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \ 4171126a8a12Smrg _LT_AC_TAGVAR(export_symbols_cmds, $1) | \ 4172126a8a12Smrg extract_expsyms_cmds | reload_cmds | finish_cmds | \ 4173126a8a12Smrg postinstall_cmds | postuninstall_cmds | \ 4174126a8a12Smrg old_postinstall_cmds | old_postuninstall_cmds | \ 4175126a8a12Smrg sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) 4176126a8a12Smrg # Double-quote double-evaled strings. 4177126a8a12Smrg eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" 4178126a8a12Smrg ;; 4179126a8a12Smrg *) 4180126a8a12Smrg eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" 4181126a8a12Smrg ;; 4182126a8a12Smrg esac 4183126a8a12Smrg done 4184126a8a12Smrg 4185126a8a12Smrg case $lt_echo in 4186126a8a12Smrg *'\[$]0 --fallback-echo"') 4187126a8a12Smrg lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'` 4188126a8a12Smrg ;; 4189126a8a12Smrg esac 4190126a8a12Smrg 4191126a8a12Smrgifelse([$1], [], 4192126a8a12Smrg [cfgfile="${ofile}T" 4193126a8a12Smrg trap "$rm \"$cfgfile\"; exit 1" 1 2 15 4194126a8a12Smrg $rm -f "$cfgfile" 4195126a8a12Smrg AC_MSG_NOTICE([creating $ofile])], 4196126a8a12Smrg [cfgfile="$ofile"]) 4197126a8a12Smrg 4198126a8a12Smrg cat <<__EOF__ >> "$cfgfile" 4199126a8a12Smrgifelse([$1], [], 4200126a8a12Smrg[#! $SHELL 4201126a8a12Smrg 4202126a8a12Smrg# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. 4203126a8a12Smrg# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) 4204126a8a12Smrg# NOTE: Changes made to this file will be lost: look at ltmain.sh. 4205126a8a12Smrg# 4206126a8a12Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 4207126a8a12Smrg# Free Software Foundation, Inc. 4208126a8a12Smrg# 4209126a8a12Smrg# This file is part of GNU Libtool: 4210126a8a12Smrg# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 4211126a8a12Smrg# 4212126a8a12Smrg# This program is free software; you can redistribute it and/or modify 4213126a8a12Smrg# it under the terms of the GNU General Public License as published by 4214126a8a12Smrg# the Free Software Foundation; either version 2 of the License, or 4215126a8a12Smrg# (at your option) any later version. 4216126a8a12Smrg# 4217126a8a12Smrg# This program is distributed in the hope that it will be useful, but 4218126a8a12Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 4219126a8a12Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 4220126a8a12Smrg# General Public License for more details. 4221126a8a12Smrg# 4222126a8a12Smrg# You should have received a copy of the GNU General Public License 4223126a8a12Smrg# along with this program; if not, write to the Free Software 4224126a8a12Smrg# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 4225126a8a12Smrg# 4226126a8a12Smrg# As a special exception to the GNU General Public License, if you 4227126a8a12Smrg# distribute this file as part of a program that contains a 4228126a8a12Smrg# configuration script generated by Autoconf, you may include it under 4229126a8a12Smrg# the same distribution terms that you use for the rest of that program. 4230126a8a12Smrg 4231126a8a12Smrg# A sed program that does not truncate output. 4232126a8a12SmrgSED=$lt_SED 4233126a8a12Smrg 4234126a8a12Smrg# Sed that helps us avoid accidentally triggering echo(1) options like -n. 4235126a8a12SmrgXsed="$SED -e 1s/^X//" 4236126a8a12Smrg 4237126a8a12Smrg# The HP-UX ksh and POSIX shell print the target directory to stdout 4238126a8a12Smrg# if CDPATH is set. 4239126a8a12Smrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 4240126a8a12Smrg 4241126a8a12Smrg# The names of the tagged configurations supported by this script. 4242126a8a12Smrgavailable_tags= 4243126a8a12Smrg 4244126a8a12Smrg# ### BEGIN LIBTOOL CONFIG], 4245126a8a12Smrg[# ### BEGIN LIBTOOL TAG CONFIG: $tagname]) 4246126a8a12Smrg 4247126a8a12Smrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 4248126a8a12Smrg 4249126a8a12Smrg# Shell to use when invoking shell scripts. 4250126a8a12SmrgSHELL=$lt_SHELL 4251126a8a12Smrg 4252126a8a12Smrg# Whether or not to build shared libraries. 4253126a8a12Smrgbuild_libtool_libs=$enable_shared 4254126a8a12Smrg 4255126a8a12Smrg# Whether or not to build static libraries. 4256126a8a12Smrgbuild_old_libs=$enable_static 4257126a8a12Smrg 4258126a8a12Smrg# Whether or not to add -lc for building shared libraries. 4259126a8a12Smrgbuild_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1) 4260126a8a12Smrg 4261126a8a12Smrg# Whether or not to disallow shared libs when runtime libs are static 4262126a8a12Smrgallow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) 4263126a8a12Smrg 4264126a8a12Smrg# Whether or not to optimize for fast installation. 4265126a8a12Smrgfast_install=$enable_fast_install 4266126a8a12Smrg 4267126a8a12Smrg# The host system. 4268126a8a12Smrghost_alias=$host_alias 4269126a8a12Smrghost=$host 4270126a8a12Smrghost_os=$host_os 4271126a8a12Smrg 4272126a8a12Smrg# The build system. 4273126a8a12Smrgbuild_alias=$build_alias 4274126a8a12Smrgbuild=$build 4275126a8a12Smrgbuild_os=$build_os 4276126a8a12Smrg 4277126a8a12Smrg# An echo program that does not interpret backslashes. 4278126a8a12Smrgecho=$lt_echo 4279126a8a12Smrg 4280126a8a12Smrg# The archiver. 4281126a8a12SmrgAR=$lt_AR 4282126a8a12SmrgAR_FLAGS=$lt_AR_FLAGS 4283126a8a12Smrg 4284126a8a12Smrg# A C compiler. 4285126a8a12SmrgLTCC=$lt_LTCC 4286126a8a12Smrg 4287126a8a12Smrg# LTCC compiler flags. 4288126a8a12SmrgLTCFLAGS=$lt_LTCFLAGS 4289126a8a12Smrg 4290126a8a12Smrg# A language-specific compiler. 4291126a8a12SmrgCC=$lt_[]_LT_AC_TAGVAR(compiler, $1) 4292126a8a12Smrg 4293126a8a12Smrg# Is the compiler the GNU C compiler? 4294126a8a12Smrgwith_gcc=$_LT_AC_TAGVAR(GCC, $1) 4295126a8a12Smrg 4296126a8a12Smrg# An ERE matcher. 4297126a8a12SmrgEGREP=$lt_EGREP 4298126a8a12Smrg 4299126a8a12Smrg# The linker used to build libraries. 4300126a8a12SmrgLD=$lt_[]_LT_AC_TAGVAR(LD, $1) 4301126a8a12Smrg 4302126a8a12Smrg# Whether we need hard or soft links. 4303126a8a12SmrgLN_S=$lt_LN_S 4304126a8a12Smrg 4305126a8a12Smrg# A BSD-compatible nm program. 4306126a8a12SmrgNM=$lt_NM 4307126a8a12Smrg 4308126a8a12Smrg# A symbol stripping program 4309126a8a12SmrgSTRIP=$lt_STRIP 4310126a8a12Smrg 4311126a8a12Smrg# Used to examine libraries when file_magic_cmd begins "file" 4312126a8a12SmrgMAGIC_CMD=$MAGIC_CMD 4313126a8a12Smrg 4314126a8a12Smrg# Used on cygwin: DLL creation program. 4315126a8a12SmrgDLLTOOL="$DLLTOOL" 4316126a8a12Smrg 4317126a8a12Smrg# Used on cygwin: object dumper. 4318126a8a12SmrgOBJDUMP="$OBJDUMP" 4319126a8a12Smrg 4320126a8a12Smrg# Used on cygwin: assembler. 4321126a8a12SmrgAS="$AS" 4322126a8a12Smrg 4323126a8a12Smrg# The name of the directory that contains temporary libtool files. 4324126a8a12Smrgobjdir=$objdir 4325126a8a12Smrg 4326126a8a12Smrg# How to create reloadable object files. 4327126a8a12Smrgreload_flag=$lt_reload_flag 4328126a8a12Smrgreload_cmds=$lt_reload_cmds 4329126a8a12Smrg 4330126a8a12Smrg# How to pass a linker flag through the compiler. 4331126a8a12Smrgwl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) 4332126a8a12Smrg 4333126a8a12Smrg# Object file suffix (normally "o"). 4334126a8a12Smrgobjext="$ac_objext" 4335126a8a12Smrg 4336126a8a12Smrg# Old archive suffix (normally "a"). 4337126a8a12Smrglibext="$libext" 4338126a8a12Smrg 4339126a8a12Smrg# Shared library suffix (normally ".so"). 4340126a8a12Smrgshrext_cmds='$shrext_cmds' 4341126a8a12Smrg 4342126a8a12Smrg# Executable file suffix (normally ""). 4343126a8a12Smrgexeext="$exeext" 4344126a8a12Smrg 4345126a8a12Smrg# Additional compiler flags for building library objects. 4346126a8a12Smrgpic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) 4347126a8a12Smrgpic_mode=$pic_mode 4348126a8a12Smrg 4349126a8a12Smrg# What is the maximum length of a command? 4350126a8a12Smrgmax_cmd_len=$lt_cv_sys_max_cmd_len 4351126a8a12Smrg 4352126a8a12Smrg# Does compiler simultaneously support -c and -o options? 4353126a8a12Smrgcompiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) 4354126a8a12Smrg 4355126a8a12Smrg# Must we lock files when doing compilation? 4356126a8a12Smrgneed_locks=$lt_need_locks 4357126a8a12Smrg 4358126a8a12Smrg# Do we need the lib prefix for modules? 4359126a8a12Smrgneed_lib_prefix=$need_lib_prefix 4360126a8a12Smrg 4361126a8a12Smrg# Do we need a version for libraries? 4362126a8a12Smrgneed_version=$need_version 4363126a8a12Smrg 4364126a8a12Smrg# Whether dlopen is supported. 4365126a8a12Smrgdlopen_support=$enable_dlopen 4366126a8a12Smrg 4367126a8a12Smrg# Whether dlopen of programs is supported. 4368126a8a12Smrgdlopen_self=$enable_dlopen_self 4369126a8a12Smrg 4370126a8a12Smrg# Whether dlopen of statically linked programs is supported. 4371126a8a12Smrgdlopen_self_static=$enable_dlopen_self_static 4372126a8a12Smrg 4373126a8a12Smrg# Compiler flag to prevent dynamic linking. 4374126a8a12Smrglink_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1) 4375126a8a12Smrg 4376126a8a12Smrg# Compiler flag to turn off builtin functions. 4377126a8a12Smrgno_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) 4378126a8a12Smrg 4379126a8a12Smrg# Compiler flag to allow reflexive dlopens. 4380126a8a12Smrgexport_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1) 4381126a8a12Smrg 4382126a8a12Smrg# Compiler flag to generate shared objects directly from archives. 4383126a8a12Smrgwhole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1) 4384126a8a12Smrg 4385126a8a12Smrg# Compiler flag to generate thread-safe objects. 4386126a8a12Smrgthread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1) 4387126a8a12Smrg 4388126a8a12Smrg# Library versioning type. 4389126a8a12Smrgversion_type=$version_type 4390126a8a12Smrg 4391126a8a12Smrg# Format of library name prefix. 4392126a8a12Smrglibname_spec=$lt_libname_spec 4393126a8a12Smrg 4394126a8a12Smrg# List of archive names. First name is the real one, the rest are links. 4395126a8a12Smrg# The last name is the one that the linker finds with -lNAME. 4396126a8a12Smrglibrary_names_spec=$lt_library_names_spec 4397126a8a12Smrg 4398126a8a12Smrg# The coded name of the library, if different from the real name. 4399126a8a12Smrgsoname_spec=$lt_soname_spec 4400126a8a12Smrg 4401126a8a12Smrg# Commands used to build and install an old-style archive. 4402126a8a12SmrgRANLIB=$lt_RANLIB 4403126a8a12Smrgold_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1) 4404126a8a12Smrgold_postinstall_cmds=$lt_old_postinstall_cmds 4405126a8a12Smrgold_postuninstall_cmds=$lt_old_postuninstall_cmds 4406126a8a12Smrg 4407126a8a12Smrg# Create an old-style archive from a shared archive. 4408126a8a12Smrgold_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1) 4409126a8a12Smrg 4410126a8a12Smrg# Create a temporary old-style archive to link instead of a shared archive. 4411126a8a12Smrgold_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) 4412126a8a12Smrg 4413126a8a12Smrg# Commands used to build and install a shared archive. 4414126a8a12Smrgarchive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1) 4415126a8a12Smrgarchive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1) 4416126a8a12Smrgpostinstall_cmds=$lt_postinstall_cmds 4417126a8a12Smrgpostuninstall_cmds=$lt_postuninstall_cmds 4418126a8a12Smrg 4419126a8a12Smrg# Commands used to build a loadable module (assumed same as above if empty) 4420126a8a12Smrgmodule_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1) 4421126a8a12Smrgmodule_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1) 4422126a8a12Smrg 4423126a8a12Smrg# Commands to strip libraries. 4424126a8a12Smrgold_striplib=$lt_old_striplib 4425126a8a12Smrgstriplib=$lt_striplib 4426126a8a12Smrg 4427126a8a12Smrg# Dependencies to place before the objects being linked to create a 4428126a8a12Smrg# shared library. 4429126a8a12Smrgpredep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1) 4430126a8a12Smrg 4431126a8a12Smrg# Dependencies to place after the objects being linked to create a 4432126a8a12Smrg# shared library. 4433126a8a12Smrgpostdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1) 4434126a8a12Smrg 4435126a8a12Smrg# Dependencies to place before the objects being linked to create a 4436126a8a12Smrg# shared library. 4437126a8a12Smrgpredeps=$lt_[]_LT_AC_TAGVAR(predeps, $1) 4438126a8a12Smrg 4439126a8a12Smrg# Dependencies to place after the objects being linked to create a 4440126a8a12Smrg# shared library. 4441126a8a12Smrgpostdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1) 4442126a8a12Smrg 4443126a8a12Smrg# The library search path used internally by the compiler when linking 4444126a8a12Smrg# a shared library. 4445126a8a12Smrgcompiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1) 4446126a8a12Smrg 4447126a8a12Smrg# Method to check whether dependent libraries are shared objects. 4448126a8a12Smrgdeplibs_check_method=$lt_deplibs_check_method 4449126a8a12Smrg 4450126a8a12Smrg# Command to use when deplibs_check_method == file_magic. 4451126a8a12Smrgfile_magic_cmd=$lt_file_magic_cmd 4452126a8a12Smrg 4453126a8a12Smrg# Flag that allows shared libraries with undefined symbols to be built. 4454126a8a12Smrgallow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1) 4455126a8a12Smrg 4456126a8a12Smrg# Flag that forces no undefined symbols. 4457126a8a12Smrgno_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1) 4458126a8a12Smrg 4459126a8a12Smrg# Commands used to finish a libtool library installation in a directory. 4460126a8a12Smrgfinish_cmds=$lt_finish_cmds 4461126a8a12Smrg 4462126a8a12Smrg# Same as above, but a single script fragment to be evaled but not shown. 4463126a8a12Smrgfinish_eval=$lt_finish_eval 4464126a8a12Smrg 4465126a8a12Smrg# Take the output of nm and produce a listing of raw symbols and C names. 4466126a8a12Smrgglobal_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe 4467126a8a12Smrg 4468126a8a12Smrg# Transform the output of nm in a proper C declaration 4469126a8a12Smrgglobal_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl 4470126a8a12Smrg 4471126a8a12Smrg# Transform the output of nm in a C name address pair 4472126a8a12Smrgglobal_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address 4473126a8a12Smrg 4474126a8a12Smrg# This is the shared library runtime path variable. 4475126a8a12Smrgrunpath_var=$runpath_var 4476126a8a12Smrg 4477126a8a12Smrg# This is the shared library path variable. 4478126a8a12Smrgshlibpath_var=$shlibpath_var 4479126a8a12Smrg 4480126a8a12Smrg# Is shlibpath searched before the hard-coded library search path? 4481126a8a12Smrgshlibpath_overrides_runpath=$shlibpath_overrides_runpath 4482126a8a12Smrg 4483126a8a12Smrg# How to hardcode a shared library path into an executable. 4484126a8a12Smrghardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1) 4485126a8a12Smrg 4486126a8a12Smrg# Whether we should hardcode library paths into libraries. 4487126a8a12Smrghardcode_into_libs=$hardcode_into_libs 4488126a8a12Smrg 4489126a8a12Smrg# Flag to hardcode \$libdir into a binary during linking. 4490126a8a12Smrg# This must work even if \$libdir does not exist. 4491126a8a12Smrghardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) 4492126a8a12Smrg 4493126a8a12Smrg# If ld is used when linking, flag to hardcode \$libdir into 4494126a8a12Smrg# a binary during linking. This must work even if \$libdir does 4495126a8a12Smrg# not exist. 4496126a8a12Smrghardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) 4497126a8a12Smrg 4498126a8a12Smrg# Whether we need a single -rpath flag with a separated argument. 4499126a8a12Smrghardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1) 4500126a8a12Smrg 4501126a8a12Smrg# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the 4502126a8a12Smrg# resulting binary. 4503126a8a12Smrghardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1) 4504126a8a12Smrg 4505126a8a12Smrg# Set to yes if using the -LDIR flag during linking hardcodes DIR into the 4506126a8a12Smrg# resulting binary. 4507126a8a12Smrghardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1) 4508126a8a12Smrg 4509126a8a12Smrg# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into 4510126a8a12Smrg# the resulting binary. 4511126a8a12Smrghardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1) 4512126a8a12Smrg 4513126a8a12Smrg# Set to yes if building a shared library automatically hardcodes DIR into the library 4514126a8a12Smrg# and all subsequent libraries and executables linked against it. 4515126a8a12Smrghardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1) 4516126a8a12Smrg 4517126a8a12Smrg# Variables whose values should be saved in libtool wrapper scripts and 4518126a8a12Smrg# restored at relink time. 4519126a8a12Smrgvariables_saved_for_relink="$variables_saved_for_relink" 4520126a8a12Smrg 4521126a8a12Smrg# Whether libtool must link a program against all its dependency libraries. 4522126a8a12Smrglink_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1) 4523126a8a12Smrg 4524126a8a12Smrg# Compile-time system search path for libraries 4525126a8a12Smrgsys_lib_search_path_spec=$lt_sys_lib_search_path_spec 4526126a8a12Smrg 4527126a8a12Smrg# Run-time system search path for libraries 4528126a8a12Smrgsys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec 4529126a8a12Smrg 4530126a8a12Smrg# Fix the shell variable \$srcfile for the compiler. 4531126a8a12Smrgfix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)" 4532126a8a12Smrg 4533126a8a12Smrg# Set to yes if exported symbols are required. 4534126a8a12Smrgalways_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1) 4535126a8a12Smrg 4536126a8a12Smrg# The commands to list exported symbols. 4537126a8a12Smrgexport_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1) 4538126a8a12Smrg 4539126a8a12Smrg# The commands to extract the exported symbol list from a shared archive. 4540126a8a12Smrgextract_expsyms_cmds=$lt_extract_expsyms_cmds 4541126a8a12Smrg 4542126a8a12Smrg# Symbols that should not be listed in the preloaded symbols. 4543126a8a12Smrgexclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1) 4544126a8a12Smrg 4545126a8a12Smrg# Symbols that must always be exported. 4546126a8a12Smrginclude_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1) 4547126a8a12Smrg 4548126a8a12Smrgifelse([$1],[], 4549126a8a12Smrg[# ### END LIBTOOL CONFIG], 4550126a8a12Smrg[# ### END LIBTOOL TAG CONFIG: $tagname]) 4551126a8a12Smrg 4552126a8a12Smrg__EOF__ 4553126a8a12Smrg 4554126a8a12Smrgifelse([$1],[], [ 4555126a8a12Smrg case $host_os in 4556126a8a12Smrg aix3*) 4557126a8a12Smrg cat <<\EOF >> "$cfgfile" 4558126a8a12Smrg 4559126a8a12Smrg# AIX sometimes has problems with the GCC collect2 program. For some 4560126a8a12Smrg# reason, if we set the COLLECT_NAMES environment variable, the problems 4561126a8a12Smrg# vanish in a puff of smoke. 4562126a8a12Smrgif test "X${COLLECT_NAMES+set}" != Xset; then 4563126a8a12Smrg COLLECT_NAMES= 4564126a8a12Smrg export COLLECT_NAMES 4565126a8a12Smrgfi 4566126a8a12SmrgEOF 4567126a8a12Smrg ;; 4568126a8a12Smrg esac 4569126a8a12Smrg 4570126a8a12Smrg # We use sed instead of cat because bash on DJGPP gets confused if 4571126a8a12Smrg # if finds mixed CR/LF and LF-only lines. Since sed operates in 4572126a8a12Smrg # text mode, it properly converts lines to CR/LF. This bash problem 4573126a8a12Smrg # is reportedly fixed, but why not run on old versions too? 4574126a8a12Smrg sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1) 4575126a8a12Smrg 4576126a8a12Smrg mv -f "$cfgfile" "$ofile" || \ 4577126a8a12Smrg (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 4578126a8a12Smrg chmod +x "$ofile" 4579126a8a12Smrg]) 4580126a8a12Smrgelse 4581126a8a12Smrg # If there is no Makefile yet, we rely on a make rule to execute 4582126a8a12Smrg # `config.status --recheck' to rerun these tests and create the 4583126a8a12Smrg # libtool script then. 4584126a8a12Smrg ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` 4585126a8a12Smrg if test -f "$ltmain_in"; then 4586126a8a12Smrg test -f Makefile && make "$ltmain" 4587126a8a12Smrg fi 4588126a8a12Smrgfi 4589126a8a12Smrg])# AC_LIBTOOL_CONFIG 4590126a8a12Smrg 4591126a8a12Smrg 4592126a8a12Smrg# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME]) 4593126a8a12Smrg# ------------------------------------------- 4594126a8a12SmrgAC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], 4595126a8a12Smrg[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl 4596126a8a12Smrg 4597126a8a12Smrg_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 4598126a8a12Smrg 4599126a8a12Smrgif test "$GCC" = yes; then 4600126a8a12Smrg _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 4601126a8a12Smrg 4602126a8a12Smrg AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 4603126a8a12Smrg lt_cv_prog_compiler_rtti_exceptions, 4604126a8a12Smrg [-fno-rtti -fno-exceptions], [], 4605126a8a12Smrg [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 4606126a8a12Smrgfi 4607126a8a12Smrg])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI 4608126a8a12Smrg 4609126a8a12Smrg 4610126a8a12Smrg# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE 4611126a8a12Smrg# --------------------------------- 4612126a8a12SmrgAC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], 4613126a8a12Smrg[AC_REQUIRE([AC_CANONICAL_HOST]) 4614126a8a12SmrgAC_REQUIRE([AC_PROG_NM]) 4615126a8a12SmrgAC_REQUIRE([AC_OBJEXT]) 4616126a8a12Smrg# Check for command to grab the raw symbol name followed by C symbol from nm. 4617126a8a12SmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object]) 4618126a8a12SmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 4619126a8a12Smrg[ 4620126a8a12Smrg# These are sane defaults that work on at least a few old systems. 4621126a8a12Smrg# [They come from Ultrix. What could be older than Ultrix?!! ;)] 4622126a8a12Smrg 4623126a8a12Smrg# Character class describing NM global symbol codes. 4624126a8a12Smrgsymcode='[[BCDEGRST]]' 4625126a8a12Smrg 4626126a8a12Smrg# Regexp to match symbols that can be accessed directly from C. 4627126a8a12Smrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 4628126a8a12Smrg 4629126a8a12Smrg# Transform an extracted symbol line into a proper C declaration 4630126a8a12Smrglt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'" 4631126a8a12Smrg 4632126a8a12Smrg# Transform an extracted symbol line into symbol name and symbol address 4633126a8a12Smrglt_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'" 4634126a8a12Smrg 4635126a8a12Smrg# Define system-specific variables. 4636126a8a12Smrgcase $host_os in 4637126a8a12Smrgaix*) 4638126a8a12Smrg symcode='[[BCDT]]' 4639126a8a12Smrg ;; 4640126a8a12Smrgcygwin* | mingw* | pw32*) 4641126a8a12Smrg symcode='[[ABCDGISTW]]' 4642126a8a12Smrg ;; 4643126a8a12Smrghpux*) # Its linker distinguishes data from code symbols 4644126a8a12Smrg if test "$host_cpu" = ia64; then 4645126a8a12Smrg symcode='[[ABCDEGRST]]' 4646126a8a12Smrg fi 4647126a8a12Smrg lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 4648126a8a12Smrg 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'" 4649126a8a12Smrg ;; 4650126a8a12Smrglinux*) 4651126a8a12Smrg if test "$host_cpu" = ia64; then 4652126a8a12Smrg symcode='[[ABCDGIRSTW]]' 4653126a8a12Smrg lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 4654126a8a12Smrg 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'" 4655126a8a12Smrg fi 4656126a8a12Smrg ;; 4657126a8a12Smrgirix* | nonstopux*) 4658126a8a12Smrg symcode='[[BCDEGRST]]' 4659126a8a12Smrg ;; 4660126a8a12Smrgosf*) 4661126a8a12Smrg symcode='[[BCDEGQRST]]' 4662126a8a12Smrg ;; 4663126a8a12Smrgsolaris*) 4664126a8a12Smrg symcode='[[BDRT]]' 4665126a8a12Smrg ;; 4666126a8a12Smrgsco3.2v5*) 4667126a8a12Smrg symcode='[[DT]]' 4668126a8a12Smrg ;; 4669126a8a12Smrgsysv4.2uw2*) 4670126a8a12Smrg symcode='[[DT]]' 4671126a8a12Smrg ;; 4672126a8a12Smrgsysv5* | sco5v6* | unixware* | OpenUNIX*) 4673126a8a12Smrg symcode='[[ABDT]]' 4674126a8a12Smrg ;; 4675126a8a12Smrgsysv4) 4676126a8a12Smrg symcode='[[DFNSTU]]' 4677126a8a12Smrg ;; 4678126a8a12Smrgesac 4679126a8a12Smrg 4680126a8a12Smrg# Handle CRLF in mingw tool chain 4681126a8a12Smrgopt_cr= 4682126a8a12Smrgcase $build_os in 4683126a8a12Smrgmingw*) 4684126a8a12Smrg opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp 4685126a8a12Smrg ;; 4686126a8a12Smrgesac 4687126a8a12Smrg 4688126a8a12Smrg# If we're using GNU nm, then use its standard symbol codes. 4689126a8a12Smrgcase `$NM -V 2>&1` in 4690126a8a12Smrg*GNU* | *'with BFD'*) 4691126a8a12Smrg symcode='[[ABCDGIRSTW]]' ;; 4692126a8a12Smrgesac 4693126a8a12Smrg 4694126a8a12Smrg# Try without a prefix undercore, then with it. 4695126a8a12Smrgfor ac_symprfx in "" "_"; do 4696126a8a12Smrg 4697126a8a12Smrg # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 4698126a8a12Smrg symxfrm="\\1 $ac_symprfx\\2 \\2" 4699126a8a12Smrg 4700126a8a12Smrg # Write the raw and C identifiers. 4701126a8a12Smrg lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 4702126a8a12Smrg 4703126a8a12Smrg # Check to see that the pipe works correctly. 4704126a8a12Smrg pipe_works=no 4705126a8a12Smrg 4706126a8a12Smrg rm -f conftest* 4707126a8a12Smrg cat > conftest.$ac_ext <<EOF 4708126a8a12Smrg#ifdef __cplusplus 4709126a8a12Smrgextern "C" { 4710126a8a12Smrg#endif 4711126a8a12Smrgchar nm_test_var; 4712126a8a12Smrgvoid nm_test_func(){} 4713126a8a12Smrg#ifdef __cplusplus 4714126a8a12Smrg} 4715126a8a12Smrg#endif 4716126a8a12Smrgint main(){nm_test_var='a';nm_test_func();return(0);} 4717126a8a12SmrgEOF 4718126a8a12Smrg 4719126a8a12Smrg if AC_TRY_EVAL(ac_compile); then 4720126a8a12Smrg # Now try to grab the symbols. 4721126a8a12Smrg nlist=conftest.nm 4722126a8a12Smrg if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then 4723126a8a12Smrg # Try sorting and uniquifying the output. 4724126a8a12Smrg if sort "$nlist" | uniq > "$nlist"T; then 4725126a8a12Smrg mv -f "$nlist"T "$nlist" 4726126a8a12Smrg else 4727126a8a12Smrg rm -f "$nlist"T 4728126a8a12Smrg fi 4729126a8a12Smrg 4730126a8a12Smrg # Make sure that we snagged all the symbols we need. 4731126a8a12Smrg if grep ' nm_test_var$' "$nlist" >/dev/null; then 4732126a8a12Smrg if grep ' nm_test_func$' "$nlist" >/dev/null; then 4733126a8a12Smrg cat <<EOF > conftest.$ac_ext 4734126a8a12Smrg#ifdef __cplusplus 4735126a8a12Smrgextern "C" { 4736126a8a12Smrg#endif 4737126a8a12Smrg 4738126a8a12SmrgEOF 4739126a8a12Smrg # Now generate the symbol file. 4740126a8a12Smrg eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' 4741126a8a12Smrg 4742126a8a12Smrg cat <<EOF >> conftest.$ac_ext 4743126a8a12Smrg#if defined (__STDC__) && __STDC__ 4744126a8a12Smrg# define lt_ptr_t void * 4745126a8a12Smrg#else 4746126a8a12Smrg# define lt_ptr_t char * 4747126a8a12Smrg# define const 4748126a8a12Smrg#endif 4749126a8a12Smrg 4750126a8a12Smrg/* The mapping between symbol names and symbols. */ 4751126a8a12Smrgconst struct { 4752126a8a12Smrg const char *name; 4753126a8a12Smrg lt_ptr_t address; 4754126a8a12Smrg} 4755126a8a12Smrglt_preloaded_symbols[[]] = 4756126a8a12Smrg{ 4757126a8a12SmrgEOF 4758126a8a12Smrg $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext 4759126a8a12Smrg cat <<\EOF >> conftest.$ac_ext 4760126a8a12Smrg {0, (lt_ptr_t) 0} 4761126a8a12Smrg}; 4762126a8a12Smrg 4763126a8a12Smrg#ifdef __cplusplus 4764126a8a12Smrg} 4765126a8a12Smrg#endif 4766126a8a12SmrgEOF 4767126a8a12Smrg # Now try linking the two files. 4768126a8a12Smrg mv conftest.$ac_objext conftstm.$ac_objext 4769126a8a12Smrg lt_save_LIBS="$LIBS" 4770126a8a12Smrg lt_save_CFLAGS="$CFLAGS" 4771126a8a12Smrg LIBS="conftstm.$ac_objext" 4772126a8a12Smrg CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 4773126a8a12Smrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then 4774126a8a12Smrg pipe_works=yes 4775126a8a12Smrg fi 4776126a8a12Smrg LIBS="$lt_save_LIBS" 4777126a8a12Smrg CFLAGS="$lt_save_CFLAGS" 4778126a8a12Smrg else 4779126a8a12Smrg echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 4780126a8a12Smrg fi 4781126a8a12Smrg else 4782126a8a12Smrg echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 4783126a8a12Smrg fi 4784126a8a12Smrg else 4785126a8a12Smrg echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 4786126a8a12Smrg fi 4787126a8a12Smrg else 4788126a8a12Smrg echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 4789126a8a12Smrg cat conftest.$ac_ext >&5 4790126a8a12Smrg fi 4791126a8a12Smrg rm -f conftest* conftst* 4792126a8a12Smrg 4793126a8a12Smrg # Do not use the global_symbol_pipe unless it works. 4794126a8a12Smrg if test "$pipe_works" = yes; then 4795126a8a12Smrg break 4796126a8a12Smrg else 4797126a8a12Smrg lt_cv_sys_global_symbol_pipe= 4798126a8a12Smrg fi 4799126a8a12Smrgdone 4800126a8a12Smrg]) 4801126a8a12Smrgif test -z "$lt_cv_sys_global_symbol_pipe"; then 4802126a8a12Smrg lt_cv_sys_global_symbol_to_cdecl= 4803126a8a12Smrgfi 4804126a8a12Smrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 4805126a8a12Smrg AC_MSG_RESULT(failed) 4806126a8a12Smrgelse 4807126a8a12Smrg AC_MSG_RESULT(ok) 4808126a8a12Smrgfi 4809126a8a12Smrg]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE 4810126a8a12Smrg 4811126a8a12Smrg 4812126a8a12Smrg# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME]) 4813126a8a12Smrg# --------------------------------------- 4814126a8a12SmrgAC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC], 4815126a8a12Smrg[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)= 4816126a8a12Smrg_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 4817126a8a12Smrg_LT_AC_TAGVAR(lt_prog_compiler_static, $1)= 4818126a8a12Smrg 4819126a8a12SmrgAC_MSG_CHECKING([for $compiler option to produce PIC]) 4820126a8a12Smrg ifelse([$1],[CXX],[ 4821126a8a12Smrg # C++ specific cases for pic, static, wl, etc. 4822126a8a12Smrg if test "$GXX" = yes; then 4823126a8a12Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4824126a8a12Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' 4825126a8a12Smrg 4826126a8a12Smrg case $host_os in 4827126a8a12Smrg aix*) 4828126a8a12Smrg # All AIX code is PIC. 4829126a8a12Smrg if test "$host_cpu" = ia64; then 4830126a8a12Smrg # AIX 5 now supports IA64 processor 4831126a8a12Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4832126a8a12Smrg fi 4833126a8a12Smrg ;; 4834126a8a12Smrg amigaos*) 4835126a8a12Smrg # FIXME: we need at least 68020 code to build shared libraries, but 4836126a8a12Smrg # adding the `-m68020' flag to GCC prevents building anything better, 4837126a8a12Smrg # like `-m68040'. 4838126a8a12Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 4839126a8a12Smrg ;; 4840126a8a12Smrg beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 4841126a8a12Smrg # PIC is the default for these OSes. 4842126a8a12Smrg ;; 4843126a8a12Smrg mingw* | os2* | pw32*) 4844126a8a12Smrg # This hack is so that the source file can tell whether it is being 4845126a8a12Smrg # built for inclusion in a dll (and should export symbols for example). 4846126a8a12Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' 4847126a8a12Smrg ;; 4848126a8a12Smrg darwin* | rhapsody*) 4849126a8a12Smrg # PIC is the default on this platform 4850126a8a12Smrg # Common symbols not allowed in MH_DYLIB files 4851126a8a12Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 4852126a8a12Smrg ;; 4853126a8a12Smrg *djgpp*) 4854126a8a12Smrg # DJGPP does not support shared libraries at all 4855126a8a12Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 4856126a8a12Smrg ;; 4857126a8a12Smrg interix3*) 4858126a8a12Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 4859126a8a12Smrg # Instead, we relocate shared libraries at runtime. 4860126a8a12Smrg ;; 4861126a8a12Smrg sysv4*MP*) 4862126a8a12Smrg if test -d /usr/nec; then 4863126a8a12Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 4864126a8a12Smrg fi 4865126a8a12Smrg ;; 4866126a8a12Smrg hpux*) 4867126a8a12Smrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 4868126a8a12Smrg # not for PA HP-UX. 4869126a8a12Smrg case $host_cpu in 4870126a8a12Smrg hppa*64*|ia64*) 4871126a8a12Smrg ;; 4872126a8a12Smrg *) 4873126a8a12Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4874126a8a12Smrg ;; 4875126a8a12Smrg esac 4876126a8a12Smrg ;; 4877126a8a12Smrg *) 4878126a8a12Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4879126a8a12Smrg ;; 4880126a8a12Smrg esac 4881126a8a12Smrg else 4882126a8a12Smrg case $host_os in 4883126a8a12Smrg aix4* | aix5*) 4884126a8a12Smrg # All AIX code is PIC. 4885126a8a12Smrg if test "$host_cpu" = ia64; then 4886126a8a12Smrg # AIX 5 now supports IA64 processor 4887126a8a12Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4888126a8a12Smrg else 4889126a8a12Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 4890126a8a12Smrg fi 4891126a8a12Smrg ;; 4892126a8a12Smrg chorus*) 4893126a8a12Smrg case $cc_basename in 4894126a8a12Smrg cxch68*) 4895126a8a12Smrg # Green Hills C++ Compiler 4896126a8a12Smrg # _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" 4897126a8a12Smrg ;; 4898126a8a12Smrg esac 4899126a8a12Smrg ;; 4900126a8a12Smrg darwin*) 4901126a8a12Smrg # PIC is the default on this platform 4902126a8a12Smrg # Common symbols not allowed in MH_DYLIB files 4903126a8a12Smrg case $cc_basename in 4904126a8a12Smrg xlc*) 4905126a8a12Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' 4906126a8a12Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4907126a8a12Smrg ;; 4908126a8a12Smrg esac 4909126a8a12Smrg ;; 4910126a8a12Smrg dgux*) 4911126a8a12Smrg case $cc_basename in 4912126a8a12Smrg ec++*) 4913126a8a12Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4914126a8a12Smrg ;; 4915126a8a12Smrg ghcx*) 4916126a8a12Smrg # Green Hills C++ Compiler 4917126a8a12Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4918126a8a12Smrg ;; 4919126a8a12Smrg *) 4920126a8a12Smrg ;; 4921126a8a12Smrg esac 4922126a8a12Smrg ;; 4923126a8a12Smrg freebsd* | kfreebsd*-gnu | dragonfly*) 4924126a8a12Smrg # FreeBSD uses GNU C++ 4925126a8a12Smrg ;; 4926126a8a12Smrg hpux9* | hpux10* | hpux11*) 4927126a8a12Smrg case $cc_basename in 4928126a8a12Smrg CC*) 4929126a8a12Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4930126a8a12Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 4931126a8a12Smrg if test "$host_cpu" != ia64; then 4932126a8a12Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 4933126a8a12Smrg fi 4934126a8a12Smrg ;; 4935126a8a12Smrg aCC*) 4936126a8a12Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4937126a8a12Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 4938126a8a12Smrg case $host_cpu in 4939126a8a12Smrg hppa*64*|ia64*) 4940126a8a12Smrg # +Z the default 4941126a8a12Smrg ;; 4942126a8a12Smrg *) 4943126a8a12Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 4944126a8a12Smrg ;; 4945126a8a12Smrg esac 4946126a8a12Smrg ;; 4947126a8a12Smrg *) 4948126a8a12Smrg ;; 4949126a8a12Smrg esac 4950126a8a12Smrg ;; 4951126a8a12Smrg interix*) 4952126a8a12Smrg # This is c89, which is MS Visual C++ (no shared libs) 4953126a8a12Smrg # Anyone wants to do a port? 4954126a8a12Smrg ;; 4955126a8a12Smrg irix5* | irix6* | nonstopux*) 4956126a8a12Smrg case $cc_basename in 4957126a8a12Smrg CC*) 4958126a8a12Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4959126a8a12Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4960126a8a12Smrg # CC pic flag -KPIC is the default. 4961126a8a12Smrg ;; 4962126a8a12Smrg *) 4963126a8a12Smrg ;; 4964126a8a12Smrg esac 4965126a8a12Smrg ;; 4966126a8a12Smrg linux*) 4967126a8a12Smrg case $cc_basename in 4968126a8a12Smrg KCC*) 4969126a8a12Smrg # KAI C++ Compiler 4970126a8a12Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 4971126a8a12Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4972126a8a12Smrg ;; 4973126a8a12Smrg icpc* | ecpc*) 4974126a8a12Smrg # Intel C++ 4975126a8a12Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4976126a8a12Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4977126a8a12Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' 4978126a8a12Smrg ;; 4979126a8a12Smrg pgCC*) 4980126a8a12Smrg # Portland Group C++ compiler. 4981126a8a12Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4982126a8a12Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 4983126a8a12Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4984126a8a12Smrg ;; 4985126a8a12Smrg cxx*) 4986126a8a12Smrg # Compaq C++ 4987126a8a12Smrg # Make sure the PIC flag is empty. It appears that all Alpha 4988126a8a12Smrg # Linux and Compaq Tru64 Unix objects are PIC. 4989126a8a12Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 4990126a8a12Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4991126a8a12Smrg ;; 4992126a8a12Smrg *) 4993126a8a12Smrg ;; 4994126a8a12Smrg esac 4995126a8a12Smrg ;; 4996126a8a12Smrg lynxos*) 4997126a8a12Smrg ;; 4998126a8a12Smrg m88k*) 4999126a8a12Smrg ;; 5000126a8a12Smrg mvs*) 5001126a8a12Smrg case $cc_basename in 5002126a8a12Smrg cxx*) 5003126a8a12Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 5004126a8a12Smrg ;; 5005126a8a12Smrg *) 5006126a8a12Smrg ;; 5007126a8a12Smrg esac 5008126a8a12Smrg ;; 5009126a8a12Smrg netbsd*) 5010126a8a12Smrg ;; 5011126a8a12Smrg osf3* | osf4* | osf5*) 5012126a8a12Smrg case $cc_basename in 5013126a8a12Smrg KCC*) 5014126a8a12Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 5015126a8a12Smrg ;; 5016126a8a12Smrg RCC*) 5017126a8a12Smrg # Rational C++ 2.4.1 5018126a8a12Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 5019126a8a12Smrg ;; 5020126a8a12Smrg cxx*) 5021126a8a12Smrg # Digital/Compaq C++ 5022126a8a12Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5023126a8a12Smrg # Make sure the PIC flag is empty. It appears that all Alpha 5024126a8a12Smrg # Linux and Compaq Tru64 Unix objects are PIC. 5025126a8a12Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 5026126a8a12Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5027126a8a12Smrg ;; 5028126a8a12Smrg *) 5029126a8a12Smrg ;; 5030126a8a12Smrg esac 5031126a8a12Smrg ;; 5032126a8a12Smrg psos*) 5033126a8a12Smrg ;; 5034126a8a12Smrg solaris*) 5035126a8a12Smrg case $cc_basename in 5036126a8a12Smrg CC*) 5037126a8a12Smrg # Sun C++ 4.2, 5.x and Centerline C++ 5038126a8a12Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5039126a8a12Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5040126a8a12Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 5041126a8a12Smrg ;; 5042126a8a12Smrg gcx*) 5043126a8a12Smrg # Green Hills C++ Compiler 5044126a8a12Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 5045126a8a12Smrg ;; 5046126a8a12Smrg *) 5047126a8a12Smrg ;; 5048126a8a12Smrg esac 5049126a8a12Smrg ;; 5050126a8a12Smrg sunos4*) 5051126a8a12Smrg case $cc_basename in 5052126a8a12Smrg CC*) 5053126a8a12Smrg # Sun C++ 4.x 5054126a8a12Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 5055126a8a12Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5056126a8a12Smrg ;; 5057126a8a12Smrg lcc*) 5058126a8a12Smrg # Lucid 5059126a8a12Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 5060126a8a12Smrg ;; 5061126a8a12Smrg *) 5062126a8a12Smrg ;; 5063126a8a12Smrg esac 5064126a8a12Smrg ;; 5065126a8a12Smrg tandem*) 5066126a8a12Smrg case $cc_basename in 5067126a8a12Smrg NCC*) 5068126a8a12Smrg # NonStop-UX NCC 3.20 5069126a8a12Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5070126a8a12Smrg ;; 5071126a8a12Smrg *) 5072126a8a12Smrg ;; 5073126a8a12Smrg esac 5074126a8a12Smrg ;; 5075126a8a12Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 5076126a8a12Smrg case $cc_basename in 5077126a8a12Smrg CC*) 5078126a8a12Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5079126a8a12Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5080126a8a12Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5081126a8a12Smrg ;; 5082126a8a12Smrg esac 5083126a8a12Smrg ;; 5084126a8a12Smrg vxworks*) 5085126a8a12Smrg ;; 5086126a8a12Smrg *) 5087126a8a12Smrg _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 5088126a8a12Smrg ;; 5089126a8a12Smrg esac 5090126a8a12Smrg fi 5091126a8a12Smrg], 5092126a8a12Smrg[ 5093126a8a12Smrg if test "$GCC" = yes; then 5094126a8a12Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5095126a8a12Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' 5096126a8a12Smrg 5097126a8a12Smrg case $host_os in 5098126a8a12Smrg aix*) 5099126a8a12Smrg # All AIX code is PIC. 5100126a8a12Smrg if test "$host_cpu" = ia64; then 5101126a8a12Smrg # AIX 5 now supports IA64 processor 5102126a8a12Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5103126a8a12Smrg fi 5104126a8a12Smrg ;; 5105126a8a12Smrg 5106126a8a12Smrg amigaos*) 5107126a8a12Smrg # FIXME: we need at least 68020 code to build shared libraries, but 5108126a8a12Smrg # adding the `-m68020' flag to GCC prevents building anything better, 5109126a8a12Smrg # like `-m68040'. 5110126a8a12Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 5111126a8a12Smrg ;; 5112126a8a12Smrg 5113126a8a12Smrg beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 5114126a8a12Smrg # PIC is the default for these OSes. 5115126a8a12Smrg ;; 5116126a8a12Smrg 5117126a8a12Smrg mingw* | pw32* | os2*) 5118126a8a12Smrg # This hack is so that the source file can tell whether it is being 5119126a8a12Smrg # built for inclusion in a dll (and should export symbols for example). 5120126a8a12Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' 5121126a8a12Smrg ;; 5122126a8a12Smrg 5123126a8a12Smrg darwin* | rhapsody*) 5124126a8a12Smrg # PIC is the default on this platform 5125126a8a12Smrg # Common symbols not allowed in MH_DYLIB files 5126126a8a12Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 5127126a8a12Smrg ;; 5128126a8a12Smrg 5129126a8a12Smrg interix3*) 5130126a8a12Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 5131126a8a12Smrg # Instead, we relocate shared libraries at runtime. 5132126a8a12Smrg ;; 5133126a8a12Smrg 5134126a8a12Smrg msdosdjgpp*) 5135126a8a12Smrg # Just because we use GCC doesn't mean we suddenly get shared libraries 5136126a8a12Smrg # on systems that don't support them. 5137126a8a12Smrg _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 5138126a8a12Smrg enable_shared=no 5139126a8a12Smrg ;; 5140126a8a12Smrg 5141126a8a12Smrg sysv4*MP*) 5142126a8a12Smrg if test -d /usr/nec; then 5143126a8a12Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 5144126a8a12Smrg fi 5145126a8a12Smrg ;; 5146126a8a12Smrg 5147126a8a12Smrg hpux*) 5148126a8a12Smrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 5149126a8a12Smrg # not for PA HP-UX. 5150126a8a12Smrg case $host_cpu in 5151126a8a12Smrg hppa*64*|ia64*) 5152126a8a12Smrg # +Z the default 5153126a8a12Smrg ;; 5154126a8a12Smrg *) 5155126a8a12Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5156126a8a12Smrg ;; 5157126a8a12Smrg esac 5158126a8a12Smrg ;; 5159126a8a12Smrg 5160126a8a12Smrg *) 5161126a8a12Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5162126a8a12Smrg ;; 5163126a8a12Smrg esac 5164126a8a12Smrg else 5165126a8a12Smrg # PORTME Check for flag to pass linker flags through the system compiler. 5166126a8a12Smrg case $host_os in 5167126a8a12Smrg aix*) 5168126a8a12Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5169126a8a12Smrg if test "$host_cpu" = ia64; then 5170126a8a12Smrg # AIX 5 now supports IA64 processor 5171126a8a12Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5172126a8a12Smrg else 5173126a8a12Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 5174126a8a12Smrg fi 5175126a8a12Smrg ;; 5176126a8a12Smrg darwin*) 5177126a8a12Smrg # PIC is the default on this platform 5178126a8a12Smrg # Common symbols not allowed in MH_DYLIB files 5179126a8a12Smrg case $cc_basename in 5180126a8a12Smrg xlc*) 5181126a8a12Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' 5182126a8a12Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5183126a8a12Smrg ;; 5184126a8a12Smrg esac 5185126a8a12Smrg ;; 5186126a8a12Smrg 5187126a8a12Smrg mingw* | pw32* | os2*) 5188126a8a12Smrg # This hack is so that the source file can tell whether it is being 5189126a8a12Smrg # built for inclusion in a dll (and should export symbols for example). 5190126a8a12Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' 5191126a8a12Smrg ;; 5192126a8a12Smrg 5193126a8a12Smrg hpux9* | hpux10* | hpux11*) 5194126a8a12Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5195126a8a12Smrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 5196126a8a12Smrg # not for PA HP-UX. 5197126a8a12Smrg case $host_cpu in 5198126a8a12Smrg hppa*64*|ia64*) 5199126a8a12Smrg # +Z the default 5200126a8a12Smrg ;; 5201126a8a12Smrg *) 5202126a8a12Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 5203126a8a12Smrg ;; 5204126a8a12Smrg esac 5205126a8a12Smrg # Is there a better lt_prog_compiler_static that works with the bundled CC? 5206126a8a12Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 5207126a8a12Smrg ;; 5208126a8a12Smrg 5209126a8a12Smrg irix5* | irix6* | nonstopux*) 5210126a8a12Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5211126a8a12Smrg # PIC (with -KPIC) is the default. 5212126a8a12Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5213126a8a12Smrg ;; 5214126a8a12Smrg 5215126a8a12Smrg newsos6) 5216126a8a12Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5217126a8a12Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5218126a8a12Smrg ;; 5219126a8a12Smrg 5220126a8a12Smrg linux*) 5221126a8a12Smrg case $cc_basename in 5222126a8a12Smrg icc* | ecc*) 5223126a8a12Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5224126a8a12Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5225126a8a12Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' 5226126a8a12Smrg ;; 5227126a8a12Smrg pgcc* | pgf77* | pgf90* | pgf95*) 5228126a8a12Smrg # Portland Group compilers (*not* the Pentium gcc compiler, 5229126a8a12Smrg # which looks to be a dead project) 5230126a8a12Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5231126a8a12Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 5232126a8a12Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5233126a8a12Smrg ;; 5234126a8a12Smrg ccc*) 5235126a8a12Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5236126a8a12Smrg # All Alpha code is PIC. 5237126a8a12Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5238126a8a12Smrg ;; 5239126a8a12Smrg esac 5240126a8a12Smrg ;; 5241126a8a12Smrg 5242126a8a12Smrg osf3* | osf4* | osf5*) 5243126a8a12Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5244126a8a12Smrg # All OSF/1 code is PIC. 5245126a8a12Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5246126a8a12Smrg ;; 5247126a8a12Smrg 5248126a8a12Smrg solaris*) 5249126a8a12Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5250126a8a12Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5251126a8a12Smrg case $cc_basename in 5252126a8a12Smrg f77* | f90* | f95*) 5253126a8a12Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 5254126a8a12Smrg *) 5255126a8a12Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 5256126a8a12Smrg esac 5257126a8a12Smrg ;; 5258126a8a12Smrg 5259126a8a12Smrg sunos4*) 5260126a8a12Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 5261126a8a12Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 5262126a8a12Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5263126a8a12Smrg ;; 5264126a8a12Smrg 5265126a8a12Smrg sysv4 | sysv4.2uw2* | sysv4.3*) 5266126a8a12Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5267126a8a12Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5268126a8a12Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5269126a8a12Smrg ;; 5270126a8a12Smrg 5271126a8a12Smrg sysv4*MP*) 5272126a8a12Smrg if test -d /usr/nec ;then 5273126a8a12Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 5274126a8a12Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5275126a8a12Smrg fi 5276126a8a12Smrg ;; 5277126a8a12Smrg 5278126a8a12Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 5279126a8a12Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5280126a8a12Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5281126a8a12Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5282126a8a12Smrg ;; 5283126a8a12Smrg 5284126a8a12Smrg unicos*) 5285126a8a12Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5286126a8a12Smrg _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 5287126a8a12Smrg ;; 5288126a8a12Smrg 5289126a8a12Smrg uts4*) 5290126a8a12Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 5291126a8a12Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5292126a8a12Smrg ;; 5293126a8a12Smrg 5294126a8a12Smrg *) 5295126a8a12Smrg _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 5296126a8a12Smrg ;; 5297126a8a12Smrg esac 5298126a8a12Smrg fi 5299126a8a12Smrg]) 5300126a8a12SmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)]) 5301126a8a12Smrg 5302126a8a12Smrg# 5303126a8a12Smrg# Check to make sure the PIC flag actually works. 5304126a8a12Smrg# 5305126a8a12Smrgif test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then 5306126a8a12Smrg AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works], 5307126a8a12Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1), 5308126a8a12Smrg [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [], 5309126a8a12Smrg [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in 5310126a8a12Smrg "" | " "*) ;; 5311126a8a12Smrg *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;; 5312126a8a12Smrg esac], 5313126a8a12Smrg [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 5314126a8a12Smrg _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 5315126a8a12Smrgfi 5316126a8a12Smrgcase $host_os in 5317126a8a12Smrg # For platforms which do not support PIC, -DPIC is meaningless: 5318126a8a12Smrg *djgpp*) 5319126a8a12Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 5320126a8a12Smrg ;; 5321126a8a12Smrg *) 5322126a8a12Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])" 5323126a8a12Smrg ;; 5324126a8a12Smrgesac 5325126a8a12Smrg 5326126a8a12Smrg# 5327126a8a12Smrg# Check to make sure the static flag actually works. 5328126a8a12Smrg# 5329126a8a12Smrgwl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\" 5330126a8a12SmrgAC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 5331126a8a12Smrg _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1), 5332126a8a12Smrg $lt_tmp_static_flag, 5333126a8a12Smrg [], 5334126a8a12Smrg [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=]) 5335126a8a12Smrg]) 5336126a8a12Smrg 5337126a8a12Smrg 5338126a8a12Smrg# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME]) 5339126a8a12Smrg# ------------------------------------ 5340126a8a12Smrg# See if the linker supports building shared libraries. 5341126a8a12SmrgAC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS], 5342126a8a12Smrg[AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 5343126a8a12Smrgifelse([$1],[CXX],[ 5344126a8a12Smrg _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 5345126a8a12Smrg case $host_os in 5346126a8a12Smrg aix4* | aix5*) 5347126a8a12Smrg # If we're using GNU nm, then we don't want the "-C" option. 5348126a8a12Smrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 5349126a8a12Smrg if $NM -V 2>&1 | grep 'GNU' > /dev/null; then 5350126a8a12Smrg _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' 5351126a8a12Smrg else 5352126a8a12Smrg _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' 5353126a8a12Smrg fi 5354126a8a12Smrg ;; 5355126a8a12Smrg pw32*) 5356126a8a12Smrg _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" 5357126a8a12Smrg ;; 5358126a8a12Smrg cygwin* | mingw*) 5359126a8a12Smrg _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' 5360126a8a12Smrg ;; 5361126a8a12Smrg *) 5362126a8a12Smrg _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 5363126a8a12Smrg ;; 5364126a8a12Smrg esac 5365126a8a12Smrg],[ 5366126a8a12Smrg runpath_var= 5367126a8a12Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)= 5368126a8a12Smrg _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no 5369126a8a12Smrg _LT_AC_TAGVAR(archive_cmds, $1)= 5370126a8a12Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)= 5371126a8a12Smrg _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)= 5372126a8a12Smrg _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)= 5373126a8a12Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= 5374126a8a12Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 5375126a8a12Smrg _LT_AC_TAGVAR(thread_safe_flag_spec, $1)= 5376126a8a12Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= 5377126a8a12Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 5378126a8a12Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 5379126a8a12Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 5380126a8a12Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=no 5381126a8a12Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 5382126a8a12Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown 5383126a8a12Smrg _LT_AC_TAGVAR(hardcode_automatic, $1)=no 5384126a8a12Smrg _LT_AC_TAGVAR(module_cmds, $1)= 5385126a8a12Smrg _LT_AC_TAGVAR(module_expsym_cmds, $1)= 5386126a8a12Smrg _LT_AC_TAGVAR(always_export_symbols, $1)=no 5387126a8a12Smrg _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 5388126a8a12Smrg # include_expsyms should be a list of space-separated symbols to be *always* 5389126a8a12Smrg # included in the symbol list 5390126a8a12Smrg _LT_AC_TAGVAR(include_expsyms, $1)= 5391126a8a12Smrg # exclude_expsyms can be an extended regexp of symbols to exclude 5392126a8a12Smrg # it will be wrapped by ` (' and `)$', so one must not match beginning or 5393126a8a12Smrg # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', 5394126a8a12Smrg # as well as any symbol that contains `d'. 5395126a8a12Smrg _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_" 5396126a8a12Smrg # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 5397126a8a12Smrg # platforms (ab)use it in PIC code, but their linkers get confused if 5398126a8a12Smrg # the symbol is explicitly referenced. Since portable code cannot 5399126a8a12Smrg # rely on this symbol name, it's probably fine to never include it in 5400126a8a12Smrg # preloaded symbol tables. 5401126a8a12Smrg extract_expsyms_cmds= 5402126a8a12Smrg # Just being paranoid about ensuring that cc_basename is set. 5403126a8a12Smrg _LT_CC_BASENAME([$compiler]) 5404126a8a12Smrg case $host_os in 5405126a8a12Smrg cygwin* | mingw* | pw32*) 5406126a8a12Smrg # FIXME: the MSVC++ port hasn't been tested in a loooong time 5407126a8a12Smrg # When not using gcc, we currently assume that we are using 5408126a8a12Smrg # Microsoft Visual C++. 5409126a8a12Smrg if test "$GCC" != yes; then 5410126a8a12Smrg with_gnu_ld=no 5411126a8a12Smrg fi 5412126a8a12Smrg ;; 5413126a8a12Smrg interix*) 5414126a8a12Smrg # we just hope/assume this is gcc and not c89 (= MSVC++) 5415126a8a12Smrg with_gnu_ld=yes 5416126a8a12Smrg ;; 5417126a8a12Smrg openbsd*) 5418126a8a12Smrg with_gnu_ld=no 5419126a8a12Smrg ;; 5420126a8a12Smrg esac 5421126a8a12Smrg 5422126a8a12Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=yes 5423126a8a12Smrg if test "$with_gnu_ld" = yes; then 5424126a8a12Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 5425126a8a12Smrg wlarc='${wl}' 5426126a8a12Smrg 5427126a8a12Smrg # Set some defaults for GNU ld with shared library support. These 5428126a8a12Smrg # are reset later if shared libraries are not supported. Putting them 5429126a8a12Smrg # here allows them to be overridden if necessary. 5430126a8a12Smrg runpath_var=LD_RUN_PATH 5431126a8a12Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 5432126a8a12Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 5433126a8a12Smrg # ancient GNU ld didn't support --whole-archive et. al. 5434126a8a12Smrg if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then 5435126a8a12Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 5436126a8a12Smrg else 5437126a8a12Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 5438126a8a12Smrg fi 5439126a8a12Smrg supports_anon_versioning=no 5440126a8a12Smrg case `$LD -v 2>/dev/null` in 5441126a8a12Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 5442126a8a12Smrg *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 5443126a8a12Smrg *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 5444126a8a12Smrg *\ 2.11.*) ;; # other 2.11 versions 5445126a8a12Smrg *) supports_anon_versioning=yes ;; 5446126a8a12Smrg esac 5447126a8a12Smrg 5448126a8a12Smrg # See if GNU ld supports shared libraries. 5449126a8a12Smrg case $host_os in 5450126a8a12Smrg aix3* | aix4* | aix5*) 5451126a8a12Smrg # On AIX/PPC, the GNU linker is very broken 5452126a8a12Smrg if test "$host_cpu" != ia64; then 5453126a8a12Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 5454126a8a12Smrg cat <<EOF 1>&2 5455126a8a12Smrg 5456126a8a12Smrg*** Warning: the GNU linker, at least up to release 2.9.1, is reported 5457126a8a12Smrg*** to be unable to reliably create shared libraries on AIX. 5458126a8a12Smrg*** Therefore, libtool is disabling shared libraries support. If you 5459126a8a12Smrg*** really care for shared libraries, you may want to modify your PATH 5460126a8a12Smrg*** so that a non-GNU linker is found, and then restart. 5461126a8a12Smrg 5462126a8a12SmrgEOF 5463126a8a12Smrg fi 5464126a8a12Smrg ;; 5465126a8a12Smrg 5466126a8a12Smrg amigaos*) 5467126a8a12Smrg _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)' 5468126a8a12Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5469126a8a12Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 5470126a8a12Smrg 5471126a8a12Smrg # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports 5472126a8a12Smrg # that the semantics of dynamic libraries on AmigaOS, at least up 5473126a8a12Smrg # to version 4, is to share data among multiple programs linked 5474126a8a12Smrg # with the same dynamic library. Since this doesn't match the 5475126a8a12Smrg # behavior of shared libraries on other platforms, we can't use 5476126a8a12Smrg # them. 5477126a8a12Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 5478126a8a12Smrg ;; 5479126a8a12Smrg 5480126a8a12Smrg beos*) 5481126a8a12Smrg if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 5482126a8a12Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 5483126a8a12Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 5484126a8a12Smrg # support --undefined. This deserves some investigation. FIXME 5485126a8a12Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5486126a8a12Smrg else 5487126a8a12Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 5488126a8a12Smrg fi 5489126a8a12Smrg ;; 5490126a8a12Smrg 5491126a8a12Smrg cygwin* | mingw* | pw32*) 5492126a8a12Smrg # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 5493126a8a12Smrg # as there is no search path for DLLs. 5494126a8a12Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5495126a8a12Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 5496126a8a12Smrg _LT_AC_TAGVAR(always_export_symbols, $1)=no 5497126a8a12Smrg _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5498126a8a12Smrg _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' 5499126a8a12Smrg 5500126a8a12Smrg if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then 5501126a8a12Smrg _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' 5502126a8a12Smrg # If the export-symbols file already is a .def file (1st line 5503126a8a12Smrg # is EXPORTS), use it as is; otherwise, prepend... 5504126a8a12Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 5505126a8a12Smrg cp $export_symbols $output_objdir/$soname.def; 5506126a8a12Smrg else 5507126a8a12Smrg echo EXPORTS > $output_objdir/$soname.def; 5508126a8a12Smrg cat $export_symbols >> $output_objdir/$soname.def; 5509126a8a12Smrg fi~ 5510126a8a12Smrg $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 5511126a8a12Smrg else 5512126a8a12Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 5513126a8a12Smrg fi 5514126a8a12Smrg ;; 5515126a8a12Smrg 5516126a8a12Smrg interix3*) 5517126a8a12Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 5518126a8a12Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 5519126a8a12Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 5520126a8a12Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 5521126a8a12Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 5522126a8a12Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 5523126a8a12Smrg # default) and relocated if they conflict, which is a slow very memory 5524126a8a12Smrg # consuming and fragmenting process. To avoid this, we pick a random, 5525126a8a12Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 5526126a8a12Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 5527126a8a12Smrg _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' 5528126a8a12Smrg _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' 5529126a8a12Smrg ;; 5530126a8a12Smrg 5531126a8a12Smrg linux*) 5532126a8a12Smrg if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 5533126a8a12Smrg tmp_addflag= 5534126a8a12Smrg case $cc_basename,$host_cpu in 5535126a8a12Smrg pgcc*) # Portland Group C compiler 5536126a8a12Smrg _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' 5537126a8a12Smrg tmp_addflag=' $pic_flag' 5538126a8a12Smrg ;; 5539126a8a12Smrg pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers 5540126a8a12Smrg _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' 5541126a8a12Smrg tmp_addflag=' $pic_flag -Mnomain' ;; 5542126a8a12Smrg ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 5543126a8a12Smrg tmp_addflag=' -i_dynamic' ;; 5544126a8a12Smrg efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 5545126a8a12Smrg tmp_addflag=' -i_dynamic -nofor_main' ;; 5546126a8a12Smrg ifc* | ifort*) # Intel Fortran compiler 5547126a8a12Smrg tmp_addflag=' -nofor_main' ;; 5548126a8a12Smrg esac 5549126a8a12Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5550126a8a12Smrg 5551126a8a12Smrg if test $supports_anon_versioning = yes; then 5552126a8a12Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~ 5553126a8a12Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 5554126a8a12Smrg $echo "local: *; };" >> $output_objdir/$libname.ver~ 5555126a8a12Smrg $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 5556126a8a12Smrg fi 5557126a8a12Smrg else 5558126a8a12Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 5559126a8a12Smrg fi 5560126a8a12Smrg ;; 5561126a8a12Smrg 5562126a8a12Smrg netbsd*) 5563126a8a12Smrg if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then 5564126a8a12Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 5565126a8a12Smrg wlarc= 5566126a8a12Smrg else 5567126a8a12Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5568126a8a12Smrg _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' 5569126a8a12Smrg fi 5570126a8a12Smrg ;; 5571126a8a12Smrg 5572126a8a12Smrg solaris*) 5573126a8a12Smrg if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then 5574126a8a12Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 5575126a8a12Smrg cat <<EOF 1>&2 5576126a8a12Smrg 5577126a8a12Smrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably 5578126a8a12Smrg*** create shared libraries on Solaris systems. Therefore, libtool 5579126a8a12Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 5580126a8a12Smrg*** binutils to release 2.9.1 or newer. Another option is to modify 5581126a8a12Smrg*** your PATH or compiler configuration so that the native linker is 5582126a8a12Smrg*** used, and then restart. 5583126a8a12Smrg 5584126a8a12SmrgEOF 5585126a8a12Smrg elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 5586126a8a12Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5587126a8a12Smrg _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' 5588126a8a12Smrg else 5589126a8a12Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 5590126a8a12Smrg fi 5591126a8a12Smrg ;; 5592126a8a12Smrg 5593126a8a12Smrg sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 5594126a8a12Smrg case `$LD -v 2>&1` in 5595126a8a12Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 5596126a8a12Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 5597126a8a12Smrg cat <<_LT_EOF 1>&2 5598126a8a12Smrg 5599126a8a12Smrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not 5600126a8a12Smrg*** reliably create shared libraries on SCO systems. Therefore, libtool 5601126a8a12Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 5602126a8a12Smrg*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 5603126a8a12Smrg*** your PATH or compiler configuration so that the native linker is 5604126a8a12Smrg*** used, and then restart. 5605126a8a12Smrg 5606126a8a12Smrg_LT_EOF 5607126a8a12Smrg ;; 5608126a8a12Smrg *) 5609126a8a12Smrg if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 5610126a8a12Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' 5611126a8a12Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' 5612126a8a12Smrg _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' 5613126a8a12Smrg else 5614126a8a12Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 5615126a8a12Smrg fi 5616126a8a12Smrg ;; 5617126a8a12Smrg esac 5618126a8a12Smrg ;; 5619126a8a12Smrg 5620126a8a12Smrg sunos4*) 5621126a8a12Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 5622126a8a12Smrg wlarc= 5623126a8a12Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 5624126a8a12Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 5625126a8a12Smrg ;; 5626126a8a12Smrg 5627126a8a12Smrg *) 5628126a8a12Smrg if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 5629126a8a12Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5630126a8a12Smrg _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' 5631126a8a12Smrg else 5632126a8a12Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 5633126a8a12Smrg fi 5634126a8a12Smrg ;; 5635126a8a12Smrg esac 5636126a8a12Smrg 5637126a8a12Smrg if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then 5638126a8a12Smrg runpath_var= 5639126a8a12Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= 5640126a8a12Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= 5641126a8a12Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 5642126a8a12Smrg fi 5643126a8a12Smrg else 5644126a8a12Smrg # PORTME fill in a description of your system's linker (not GNU ld) 5645126a8a12Smrg case $host_os in 5646126a8a12Smrg aix3*) 5647126a8a12Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 5648126a8a12Smrg _LT_AC_TAGVAR(always_export_symbols, $1)=yes 5649126a8a12Smrg _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' 5650126a8a12Smrg # Note: this linker hardcodes the directories in LIBPATH if there 5651126a8a12Smrg # are no directories specified by -L. 5652126a8a12Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 5653126a8a12Smrg if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then 5654126a8a12Smrg # Neither direct hardcoding nor static linking is supported with a 5655126a8a12Smrg # broken collect2. 5656126a8a12Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported 5657126a8a12Smrg fi 5658126a8a12Smrg ;; 5659126a8a12Smrg 5660126a8a12Smrg aix4* | aix5*) 5661126a8a12Smrg if test "$host_cpu" = ia64; then 5662126a8a12Smrg # On IA64, the linker does run time linking by default, so we don't 5663126a8a12Smrg # have to do anything special. 5664126a8a12Smrg aix_use_runtimelinking=no 5665126a8a12Smrg exp_sym_flag='-Bexport' 5666126a8a12Smrg no_entry_flag="" 5667126a8a12Smrg else 5668126a8a12Smrg # If we're using GNU nm, then we don't want the "-C" option. 5669126a8a12Smrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 5670126a8a12Smrg if $NM -V 2>&1 | grep 'GNU' > /dev/null; then 5671126a8a12Smrg _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' 5672126a8a12Smrg else 5673126a8a12Smrg _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' 5674126a8a12Smrg fi 5675126a8a12Smrg aix_use_runtimelinking=no 5676126a8a12Smrg 5677126a8a12Smrg # Test if we are trying to use run time linking or normal 5678126a8a12Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 5679126a8a12Smrg # need to do runtime linking. 5680126a8a12Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*) 5681126a8a12Smrg for ld_flag in $LDFLAGS; do 5682126a8a12Smrg if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then 5683126a8a12Smrg aix_use_runtimelinking=yes 5684126a8a12Smrg break 5685126a8a12Smrg fi 5686126a8a12Smrg done 5687126a8a12Smrg ;; 5688126a8a12Smrg esac 5689126a8a12Smrg 5690126a8a12Smrg exp_sym_flag='-bexport' 5691126a8a12Smrg no_entry_flag='-bnoentry' 5692126a8a12Smrg fi 5693126a8a12Smrg 5694126a8a12Smrg # When large executables or shared objects are built, AIX ld can 5695126a8a12Smrg # have problems creating the table of contents. If linking a library 5696126a8a12Smrg # or program results in "error TOC overflow" add -mminimal-toc to 5697126a8a12Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 5698126a8a12Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 5699126a8a12Smrg 5700126a8a12Smrg _LT_AC_TAGVAR(archive_cmds, $1)='' 5701126a8a12Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 5702126a8a12Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' 5703126a8a12Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 5704126a8a12Smrg 5705126a8a12Smrg if test "$GCC" = yes; then 5706126a8a12Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 5707126a8a12Smrg # We only want to do this on AIX 4.2 and lower, the check 5708126a8a12Smrg # below for broken collect2 doesn't work under 4.3+ 5709126a8a12Smrg collect2name=`${CC} -print-prog-name=collect2` 5710126a8a12Smrg if test -f "$collect2name" && \ 5711126a8a12Smrg strings "$collect2name" | grep resolve_lib_name >/dev/null 5712126a8a12Smrg then 5713126a8a12Smrg # We have reworked collect2 5714126a8a12Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 5715126a8a12Smrg else 5716126a8a12Smrg # We have old collect2 5717126a8a12Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported 5718126a8a12Smrg # It fails to find uninstalled libraries when the uninstalled 5719126a8a12Smrg # path is not listed in the libpath. Setting hardcode_minus_L 5720126a8a12Smrg # to unsupported forces relinking 5721126a8a12Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 5722126a8a12Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5723126a8a12Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 5724126a8a12Smrg fi 5725126a8a12Smrg ;; 5726126a8a12Smrg esac 5727126a8a12Smrg shared_flag='-shared' 5728126a8a12Smrg if test "$aix_use_runtimelinking" = yes; then 5729126a8a12Smrg shared_flag="$shared_flag "'${wl}-G' 5730126a8a12Smrg fi 5731126a8a12Smrg else 5732126a8a12Smrg # not using gcc 5733126a8a12Smrg if test "$host_cpu" = ia64; then 5734126a8a12Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 5735126a8a12Smrg # chokes on -Wl,-G. The following line is correct: 5736126a8a12Smrg shared_flag='-G' 5737126a8a12Smrg else 5738126a8a12Smrg if test "$aix_use_runtimelinking" = yes; then 5739126a8a12Smrg shared_flag='${wl}-G' 5740126a8a12Smrg else 5741126a8a12Smrg shared_flag='${wl}-bM:SRE' 5742126a8a12Smrg fi 5743126a8a12Smrg fi 5744126a8a12Smrg fi 5745126a8a12Smrg 5746126a8a12Smrg # It seems that -bexpall does not export symbols beginning with 5747126a8a12Smrg # underscore (_), so it is better to generate a list of symbols to export. 5748126a8a12Smrg _LT_AC_TAGVAR(always_export_symbols, $1)=yes 5749126a8a12Smrg if test "$aix_use_runtimelinking" = yes; then 5750126a8a12Smrg # Warning - without using the other runtime loading flags (-brtl), 5751126a8a12Smrg # -berok will link without error, but may produce a broken library. 5752126a8a12Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' 5753126a8a12Smrg # Determine the default libpath from the value encoded in an empty executable. 5754126a8a12Smrg _LT_AC_SYS_LIBPATH_AIX 5755126a8a12Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 5756126a8a12Smrg _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" 5757126a8a12Smrg else 5758126a8a12Smrg if test "$host_cpu" = ia64; then 5759126a8a12Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 5760126a8a12Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 5761126a8a12Smrg _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" 5762126a8a12Smrg else 5763126a8a12Smrg # Determine the default libpath from the value encoded in an empty executable. 5764126a8a12Smrg _LT_AC_SYS_LIBPATH_AIX 5765126a8a12Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 5766126a8a12Smrg # Warning - without using the other run time loading flags, 5767126a8a12Smrg # -berok will link without error, but may produce a broken library. 5768126a8a12Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 5769126a8a12Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 5770126a8a12Smrg # Exported symbols can be pulled into shared objects from archives 5771126a8a12Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 5772126a8a12Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes 5773126a8a12Smrg # This is similar to how AIX traditionally builds its shared libraries. 5774126a8a12Smrg _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' 5775126a8a12Smrg fi 5776126a8a12Smrg fi 5777126a8a12Smrg ;; 5778126a8a12Smrg 5779126a8a12Smrg amigaos*) 5780126a8a12Smrg _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)' 5781126a8a12Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5782126a8a12Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 5783126a8a12Smrg # see comment about different semantics on the GNU ld section 5784126a8a12Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 5785126a8a12Smrg ;; 5786126a8a12Smrg 5787126a8a12Smrg bsdi[[45]]*) 5788126a8a12Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 5789126a8a12Smrg ;; 5790126a8a12Smrg 5791126a8a12Smrg cygwin* | mingw* | pw32*) 5792126a8a12Smrg # When not using gcc, we currently assume that we are using 5793126a8a12Smrg # Microsoft Visual C++. 5794126a8a12Smrg # hardcode_libdir_flag_spec is actually meaningless, as there is 5795126a8a12Smrg # no search path for DLLs. 5796126a8a12Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 5797126a8a12Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 5798126a8a12Smrg # Tell ltmain to make .lib files, not .a files. 5799126a8a12Smrg libext=lib 5800126a8a12Smrg # Tell ltmain to make .dll files, not .so files. 5801126a8a12Smrg shrext_cmds=".dll" 5802126a8a12Smrg # FIXME: Setting linknames here is a bad hack. 5803126a8a12Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' 5804126a8a12Smrg # The linker will automatically build a .lib file if we build a DLL. 5805126a8a12Smrg _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true' 5806126a8a12Smrg # FIXME: Should let the user specify the lib program. 5807126a8a12Smrg _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs' 5808126a8a12Smrg _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' 5809126a8a12Smrg _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5810126a8a12Smrg ;; 5811126a8a12Smrg 5812126a8a12Smrg darwin* | rhapsody*) 5813126a8a12Smrg case $host_os in 5814126a8a12Smrg rhapsody* | darwin1.[[012]]) 5815126a8a12Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' 5816126a8a12Smrg ;; 5817126a8a12Smrg *) # Darwin 1.3 on 5818126a8a12Smrg if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then 5819126a8a12Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' 5820126a8a12Smrg else 5821126a8a12Smrg case ${MACOSX_DEPLOYMENT_TARGET} in 5822126a8a12Smrg 10.[[012]]) 5823126a8a12Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' 5824126a8a12Smrg ;; 5825126a8a12Smrg 10.*) 5826126a8a12Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup' 5827126a8a12Smrg ;; 5828126a8a12Smrg esac 5829126a8a12Smrg fi 5830126a8a12Smrg ;; 5831126a8a12Smrg esac 5832126a8a12Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 5833126a8a12Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 5834126a8a12Smrg _LT_AC_TAGVAR(hardcode_automatic, $1)=yes 5835126a8a12Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 5836126a8a12Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' 5837126a8a12Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 5838126a8a12Smrg if test "$GCC" = yes ; then 5839126a8a12Smrg output_verbose_link_cmd='echo' 5840126a8a12Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' 5841126a8a12Smrg _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' 5842126a8a12Smrg # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds 5843126a8a12Smrg _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}' 5844126a8a12Smrg _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}' 5845126a8a12Smrg else 5846126a8a12Smrg case $cc_basename in 5847126a8a12Smrg xlc*) 5848126a8a12Smrg output_verbose_link_cmd='echo' 5849126a8a12Smrg _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' 5850126a8a12Smrg _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' 5851126a8a12Smrg # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds 5852126a8a12Smrg _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}' 5853126a8a12Smrg _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}' 5854126a8a12Smrg ;; 5855126a8a12Smrg *) 5856126a8a12Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 5857126a8a12Smrg ;; 5858126a8a12Smrg esac 5859126a8a12Smrg fi 5860126a8a12Smrg ;; 5861126a8a12Smrg 5862126a8a12Smrg dgux*) 5863126a8a12Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5864126a8a12Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5865126a8a12Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 5866126a8a12Smrg ;; 5867126a8a12Smrg 5868126a8a12Smrg freebsd1*) 5869126a8a12Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 5870126a8a12Smrg ;; 5871126a8a12Smrg 5872126a8a12Smrg # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 5873126a8a12Smrg # support. Future versions do this automatically, but an explicit c++rt0.o 5874126a8a12Smrg # does not break anything, and helps significantly (at the cost of a little 5875126a8a12Smrg # extra space). 5876126a8a12Smrg freebsd2.2*) 5877126a8a12Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 5878126a8a12Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5879126a8a12Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 5880126a8a12Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 5881126a8a12Smrg ;; 5882126a8a12Smrg 5883126a8a12Smrg # Unfortunately, older versions of FreeBSD 2 do not have this feature. 5884126a8a12Smrg freebsd2*) 5885126a8a12Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 5886126a8a12Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 5887126a8a12Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 5888126a8a12Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 5889126a8a12Smrg ;; 5890126a8a12Smrg 5891126a8a12Smrg # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 5892126a8a12Smrg freebsd* | kfreebsd*-gnu | dragonfly*) 5893126a8a12Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' 5894126a8a12Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5895126a8a12Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 5896126a8a12Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 5897126a8a12Smrg ;; 5898126a8a12Smrg 5899126a8a12Smrg hpux9*) 5900126a8a12Smrg if test "$GCC" = yes; then 5901126a8a12Smrg _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' 5902126a8a12Smrg else 5903126a8a12Smrg _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' 5904126a8a12Smrg fi 5905126a8a12Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 5906126a8a12Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 5907126a8a12Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 5908126a8a12Smrg 5909126a8a12Smrg # hardcode_minus_L: Not really in the search PATH, 5910126a8a12Smrg # but as the default location of the library. 5911126a8a12Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 5912126a8a12Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 5913126a8a12Smrg ;; 5914126a8a12Smrg 5915126a8a12Smrg hpux10*) 5916126a8a12Smrg if test "$GCC" = yes -a "$with_gnu_ld" = no; then 5917126a8a12Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 5918126a8a12Smrg else 5919126a8a12Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 5920126a8a12Smrg fi 5921126a8a12Smrg if test "$with_gnu_ld" = no; then 5922126a8a12Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 5923126a8a12Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 5924126a8a12Smrg 5925126a8a12Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 5926126a8a12Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 5927126a8a12Smrg 5928126a8a12Smrg # hardcode_minus_L: Not really in the search PATH, 5929126a8a12Smrg # but as the default location of the library. 5930126a8a12Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 5931126a8a12Smrg fi 5932126a8a12Smrg ;; 5933126a8a12Smrg 5934126a8a12Smrg hpux11*) 5935126a8a12Smrg if test "$GCC" = yes -a "$with_gnu_ld" = no; then 5936126a8a12Smrg case $host_cpu in 5937126a8a12Smrg hppa*64*) 5938126a8a12Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 5939126a8a12Smrg ;; 5940126a8a12Smrg ia64*) 5941126a8a12Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 5942126a8a12Smrg ;; 5943126a8a12Smrg *) 5944126a8a12Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 5945126a8a12Smrg ;; 5946126a8a12Smrg esac 5947126a8a12Smrg else 5948126a8a12Smrg case $host_cpu in 5949126a8a12Smrg hppa*64*) 5950126a8a12Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 5951126a8a12Smrg ;; 5952126a8a12Smrg ia64*) 5953126a8a12Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 5954126a8a12Smrg ;; 5955126a8a12Smrg *) 5956126a8a12Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 5957126a8a12Smrg ;; 5958126a8a12Smrg esac 5959126a8a12Smrg fi 5960126a8a12Smrg if test "$with_gnu_ld" = no; then 5961126a8a12Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 5962126a8a12Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 5963126a8a12Smrg 5964126a8a12Smrg case $host_cpu in 5965126a8a12Smrg hppa*64*|ia64*) 5966126a8a12Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' 5967126a8a12Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 5968126a8a12Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 5969126a8a12Smrg ;; 5970126a8a12Smrg *) 5971126a8a12Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 5972126a8a12Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 5973126a8a12Smrg 5974126a8a12Smrg # hardcode_minus_L: Not really in the search PATH, 5975126a8a12Smrg # but as the default location of the library. 5976126a8a12Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 5977126a8a12Smrg ;; 5978126a8a12Smrg esac 5979126a8a12Smrg fi 5980126a8a12Smrg ;; 5981126a8a12Smrg 5982126a8a12Smrg irix5* | irix6* | nonstopux*) 5983126a8a12Smrg if test "$GCC" = yes; then 5984126a8a12Smrg _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' 5985126a8a12Smrg else 5986126a8a12Smrg _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' 5987126a8a12Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' 5988126a8a12Smrg fi 5989126a8a12Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 5990126a8a12Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 5991126a8a12Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 5992126a8a12Smrg ;; 5993126a8a12Smrg 5994126a8a12Smrg netbsd*) 5995126a8a12Smrg if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then 5996126a8a12Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 5997126a8a12Smrg else 5998126a8a12Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 5999126a8a12Smrg fi 6000126a8a12Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6001126a8a12Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 6002126a8a12Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6003126a8a12Smrg ;; 6004126a8a12Smrg 6005126a8a12Smrg newsos6) 6006126a8a12Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6007126a8a12Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 6008126a8a12Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6009126a8a12Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 6010126a8a12Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6011126a8a12Smrg ;; 6012126a8a12Smrg 6013126a8a12Smrg openbsd*) 6014126a8a12Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 6015126a8a12Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6016126a8a12Smrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 6017126a8a12Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 6018126a8a12Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' 6019126a8a12Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 6020126a8a12Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6021126a8a12Smrg else 6022126a8a12Smrg case $host_os in 6023126a8a12Smrg openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) 6024126a8a12Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 6025126a8a12Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6026126a8a12Smrg ;; 6027126a8a12Smrg *) 6028126a8a12Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 6029126a8a12Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 6030126a8a12Smrg ;; 6031126a8a12Smrg esac 6032126a8a12Smrg fi 6033126a8a12Smrg ;; 6034126a8a12Smrg 6035126a8a12Smrg os2*) 6036126a8a12Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6037126a8a12Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 6038126a8a12Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 6039126a8a12Smrg _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' 6040126a8a12Smrg _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' 6041126a8a12Smrg ;; 6042126a8a12Smrg 6043126a8a12Smrg osf3*) 6044126a8a12Smrg if test "$GCC" = yes; then 6045126a8a12Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 6046126a8a12Smrg _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' 6047126a8a12Smrg else 6048126a8a12Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 6049126a8a12Smrg _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' 6050126a8a12Smrg fi 6051126a8a12Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6052126a8a12Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 6053126a8a12Smrg ;; 6054126a8a12Smrg 6055126a8a12Smrg osf4* | osf5*) # as osf3* with the addition of -msym flag 6056126a8a12Smrg if test "$GCC" = yes; then 6057126a8a12Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 6058126a8a12Smrg _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' 6059126a8a12Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6060126a8a12Smrg else 6061126a8a12Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 6062126a8a12Smrg _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' 6063126a8a12Smrg _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~ 6064126a8a12Smrg $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' 6065126a8a12Smrg 6066126a8a12Smrg # Both c and cxx compiler support -rpath directly 6067126a8a12Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 6068126a8a12Smrg fi 6069126a8a12Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 6070126a8a12Smrg ;; 6071126a8a12Smrg 6072126a8a12Smrg solaris*) 6073126a8a12Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text' 6074126a8a12Smrg if test "$GCC" = yes; then 6075126a8a12Smrg wlarc='${wl}' 6076126a8a12Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 6077126a8a12Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 6078126a8a12Smrg $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' 6079126a8a12Smrg else 6080126a8a12Smrg wlarc='' 6081126a8a12Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' 6082126a8a12Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 6083126a8a12Smrg $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' 6084126a8a12Smrg fi 6085126a8a12Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6086126a8a12Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6087126a8a12Smrg case $host_os in 6088126a8a12Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 6089126a8a12Smrg *) 6090126a8a12Smrg # The compiler driver will combine linker options so we 6091126a8a12Smrg # cannot just pass the convience library names through 6092126a8a12Smrg # without $wl, iff we do not link with $LD. 6093126a8a12Smrg # Luckily, gcc supports the same syntax we need for Sun Studio. 6094126a8a12Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 6095126a8a12Smrg case $wlarc in 6096126a8a12Smrg '') 6097126a8a12Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; 6098126a8a12Smrg *) 6099126a8a12Smrg _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' ;; 6100126a8a12Smrg esac ;; 6101126a8a12Smrg esac 6102126a8a12Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 6103126a8a12Smrg ;; 6104126a8a12Smrg 6105126a8a12Smrg sunos4*) 6106126a8a12Smrg if test "x$host_vendor" = xsequent; then 6107126a8a12Smrg # Use $CC to link under sequent, because it throws in some extra .o 6108126a8a12Smrg # files that make .init and .fini sections work. 6109126a8a12Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' 6110126a8a12Smrg else 6111126a8a12Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 6112126a8a12Smrg fi 6113126a8a12Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6114126a8a12Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 6115126a8a12Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 6116126a8a12Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6117126a8a12Smrg ;; 6118126a8a12Smrg 6119126a8a12Smrg sysv4) 6120126a8a12Smrg case $host_vendor in 6121126a8a12Smrg sni) 6122126a8a12Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6123126a8a12Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 6124126a8a12Smrg ;; 6125126a8a12Smrg siemens) 6126126a8a12Smrg ## LD is ld it makes a PLAMLIB 6127126a8a12Smrg ## CC just makes a GrossModule. 6128126a8a12Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 6129126a8a12Smrg _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 6130126a8a12Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 6131126a8a12Smrg ;; 6132126a8a12Smrg motorola) 6133126a8a12Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6134126a8a12Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 6135126a8a12Smrg ;; 6136126a8a12Smrg esac 6137126a8a12Smrg runpath_var='LD_RUN_PATH' 6138126a8a12Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6139126a8a12Smrg ;; 6140126a8a12Smrg 6141126a8a12Smrg sysv4.3*) 6142126a8a12Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6143126a8a12Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6144126a8a12Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 6145126a8a12Smrg ;; 6146126a8a12Smrg 6147126a8a12Smrg sysv4*MP*) 6148126a8a12Smrg if test -d /usr/nec; then 6149126a8a12Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6150126a8a12Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6151126a8a12Smrg runpath_var=LD_RUN_PATH 6152126a8a12Smrg hardcode_runpath_var=yes 6153126a8a12Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=yes 6154126a8a12Smrg fi 6155126a8a12Smrg ;; 6156126a8a12Smrg 6157126a8a12Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7*) 6158126a8a12Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 6159126a8a12Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 6160126a8a12Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6161126a8a12Smrg runpath_var='LD_RUN_PATH' 6162126a8a12Smrg 6163126a8a12Smrg if test "$GCC" = yes; then 6164126a8a12Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6165126a8a12Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6166126a8a12Smrg else 6167126a8a12Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6168126a8a12Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6169126a8a12Smrg fi 6170126a8a12Smrg ;; 6171126a8a12Smrg 6172126a8a12Smrg sysv5* | sco3.2v5* | sco5v6*) 6173126a8a12Smrg # Note: We can NOT use -z defs as we might desire, because we do not 6174126a8a12Smrg # link with -lc, and that would cause any symbols used from libc to 6175126a8a12Smrg # always be unresolved, which means just about no library would 6176126a8a12Smrg # ever link correctly. If we're not using GNU ld we use -z text 6177126a8a12Smrg # though, which does catch some bad symbols but isn't as heavy-handed 6178126a8a12Smrg # as -z defs. 6179126a8a12Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 6180126a8a12Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 6181126a8a12Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 6182126a8a12Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6183126a8a12Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' 6184126a8a12Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' 6185126a8a12Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 6186126a8a12Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 6187126a8a12Smrg runpath_var='LD_RUN_PATH' 6188126a8a12Smrg 6189126a8a12Smrg if test "$GCC" = yes; then 6190126a8a12Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' 6191126a8a12Smrg _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' 6192126a8a12Smrg else 6193126a8a12Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' 6194126a8a12Smrg _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' 6195126a8a12Smrg fi 6196126a8a12Smrg ;; 6197126a8a12Smrg 6198126a8a12Smrg uts4*) 6199126a8a12Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6200126a8a12Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6201126a8a12Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6202126a8a12Smrg ;; 6203126a8a12Smrg 6204126a8a12Smrg *) 6205126a8a12Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 6206126a8a12Smrg ;; 6207126a8a12Smrg esac 6208126a8a12Smrg fi 6209126a8a12Smrg]) 6210126a8a12SmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) 6211126a8a12Smrgtest "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 6212126a8a12Smrg 6213126a8a12Smrg# 6214126a8a12Smrg# Do we need to explicitly link libc? 6215126a8a12Smrg# 6216126a8a12Smrgcase "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in 6217126a8a12Smrgx|xyes) 6218126a8a12Smrg # Assume -lc should be added 6219126a8a12Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes 6220126a8a12Smrg 6221126a8a12Smrg if test "$enable_shared" = yes && test "$GCC" = yes; then 6222126a8a12Smrg case $_LT_AC_TAGVAR(archive_cmds, $1) in 6223126a8a12Smrg *'~'*) 6224126a8a12Smrg # FIXME: we may have to deal with multi-command sequences. 6225126a8a12Smrg ;; 6226126a8a12Smrg '$CC '*) 6227126a8a12Smrg # Test whether the compiler implicitly links with -lc since on some 6228126a8a12Smrg # systems, -lgcc has to come before -lc. If gcc already passes -lc 6229126a8a12Smrg # to ld, don't add -lc before -lgcc. 6230126a8a12Smrg AC_MSG_CHECKING([whether -lc should be explicitly linked in]) 6231126a8a12Smrg $rm conftest* 6232126a8a12Smrg printf "$lt_simple_compile_test_code" > conftest.$ac_ext 6233126a8a12Smrg 6234126a8a12Smrg if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 6235126a8a12Smrg soname=conftest 6236126a8a12Smrg lib=conftest 6237126a8a12Smrg libobjs=conftest.$ac_objext 6238126a8a12Smrg deplibs= 6239126a8a12Smrg wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) 6240126a8a12Smrg pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) 6241126a8a12Smrg compiler_flags=-v 6242126a8a12Smrg linker_flags=-v 6243126a8a12Smrg verstring= 6244126a8a12Smrg output_objdir=. 6245126a8a12Smrg libname=conftest 6246126a8a12Smrg lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1) 6247126a8a12Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)= 6248126a8a12Smrg if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 6249126a8a12Smrg then 6250126a8a12Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 6251126a8a12Smrg else 6252126a8a12Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes 6253126a8a12Smrg fi 6254126a8a12Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 6255126a8a12Smrg else 6256126a8a12Smrg cat conftest.err 1>&5 6257126a8a12Smrg fi 6258126a8a12Smrg $rm conftest* 6259126a8a12Smrg AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)]) 6260126a8a12Smrg ;; 6261126a8a12Smrg esac 6262126a8a12Smrg fi 6263126a8a12Smrg ;; 6264126a8a12Smrgesac 6265126a8a12Smrg])# AC_LIBTOOL_PROG_LD_SHLIBS 6266126a8a12Smrg 6267126a8a12Smrg 6268126a8a12Smrg# _LT_AC_FILE_LTDLL_C 6269126a8a12Smrg# ------------------- 6270126a8a12Smrg# Be careful that the start marker always follows a newline. 6271126a8a12SmrgAC_DEFUN([_LT_AC_FILE_LTDLL_C], [ 6272126a8a12Smrg# /* ltdll.c starts here */ 6273126a8a12Smrg# #define WIN32_LEAN_AND_MEAN 6274126a8a12Smrg# #include <windows.h> 6275126a8a12Smrg# #undef WIN32_LEAN_AND_MEAN 6276126a8a12Smrg# #include <stdio.h> 6277126a8a12Smrg# 6278126a8a12Smrg# #ifndef __CYGWIN__ 6279126a8a12Smrg# # ifdef __CYGWIN32__ 6280126a8a12Smrg# # define __CYGWIN__ __CYGWIN32__ 6281126a8a12Smrg# # endif 6282126a8a12Smrg# #endif 6283126a8a12Smrg# 6284126a8a12Smrg# #ifdef __cplusplus 6285126a8a12Smrg# extern "C" { 6286126a8a12Smrg# #endif 6287126a8a12Smrg# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved); 6288126a8a12Smrg# #ifdef __cplusplus 6289126a8a12Smrg# } 6290126a8a12Smrg# #endif 6291126a8a12Smrg# 6292126a8a12Smrg# #ifdef __CYGWIN__ 6293126a8a12Smrg# #include <cygwin/cygwin_dll.h> 6294126a8a12Smrg# DECLARE_CYGWIN_DLL( DllMain ); 6295126a8a12Smrg# #endif 6296126a8a12Smrg# HINSTANCE __hDllInstance_base; 6297126a8a12Smrg# 6298126a8a12Smrg# BOOL APIENTRY 6299126a8a12Smrg# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved) 6300126a8a12Smrg# { 6301126a8a12Smrg# __hDllInstance_base = hInst; 6302126a8a12Smrg# return TRUE; 6303126a8a12Smrg# } 6304126a8a12Smrg# /* ltdll.c ends here */ 6305126a8a12Smrg])# _LT_AC_FILE_LTDLL_C 6306126a8a12Smrg 6307126a8a12Smrg 6308126a8a12Smrg# _LT_AC_TAGVAR(VARNAME, [TAGNAME]) 6309126a8a12Smrg# --------------------------------- 6310126a8a12SmrgAC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])]) 6311126a8a12Smrg 6312126a8a12Smrg 6313126a8a12Smrg# old names 6314126a8a12SmrgAC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL]) 6315126a8a12SmrgAC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 6316126a8a12SmrgAC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 6317126a8a12SmrgAC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 6318126a8a12SmrgAC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 6319126a8a12SmrgAC_DEFUN([AM_PROG_LD], [AC_PROG_LD]) 6320126a8a12SmrgAC_DEFUN([AM_PROG_NM], [AC_PROG_NM]) 6321126a8a12Smrg 6322126a8a12Smrg# This is just to silence aclocal about the macro not being used 6323126a8a12Smrgifelse([AC_DISABLE_FAST_INSTALL]) 6324126a8a12Smrg 6325126a8a12SmrgAC_DEFUN([LT_AC_PROG_GCJ], 6326126a8a12Smrg[AC_CHECK_TOOL(GCJ, gcj, no) 6327126a8a12Smrg test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" 6328126a8a12Smrg AC_SUBST(GCJFLAGS) 6329126a8a12Smrg]) 6330126a8a12Smrg 6331126a8a12SmrgAC_DEFUN([LT_AC_PROG_RC], 6332126a8a12Smrg[AC_CHECK_TOOL(RC, windres, no) 6333126a8a12Smrg]) 6334126a8a12Smrg 6335126a8a12Smrg# NOTE: This macro has been submitted for inclusion into # 6336126a8a12Smrg# GNU Autoconf as AC_PROG_SED. When it is available in # 6337126a8a12Smrg# a released version of Autoconf we should remove this # 6338126a8a12Smrg# macro and use it instead. # 6339126a8a12Smrg# LT_AC_PROG_SED 6340126a8a12Smrg# -------------- 6341126a8a12Smrg# Check for a fully-functional sed program, that truncates 6342126a8a12Smrg# as few characters as possible. Prefer GNU sed if found. 6343126a8a12SmrgAC_DEFUN([LT_AC_PROG_SED], 6344126a8a12Smrg[AC_MSG_CHECKING([for a sed that does not truncate output]) 6345126a8a12SmrgAC_CACHE_VAL(lt_cv_path_SED, 6346126a8a12Smrg[# Loop through the user's path and test for sed and gsed. 6347126a8a12Smrg# Then use that list of sed's as ones to test for truncation. 6348126a8a12Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 6349126a8a12Smrgfor as_dir in $PATH 6350126a8a12Smrgdo 6351126a8a12Smrg IFS=$as_save_IFS 6352126a8a12Smrg test -z "$as_dir" && as_dir=. 6353126a8a12Smrg for lt_ac_prog in sed gsed; do 6354126a8a12Smrg for ac_exec_ext in '' $ac_executable_extensions; do 6355126a8a12Smrg if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 6356126a8a12Smrg lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 6357126a8a12Smrg fi 6358126a8a12Smrg done 6359126a8a12Smrg done 6360126a8a12Smrgdone 6361126a8a12Smrglt_ac_max=0 6362126a8a12Smrglt_ac_count=0 6363126a8a12Smrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris 6364126a8a12Smrg# along with /bin/sed that truncates output. 6365126a8a12Smrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 6366126a8a12Smrg test ! -f $lt_ac_sed && continue 6367126a8a12Smrg cat /dev/null > conftest.in 6368126a8a12Smrg lt_ac_count=0 6369126a8a12Smrg echo $ECHO_N "0123456789$ECHO_C" >conftest.in 6370126a8a12Smrg # Check for GNU sed and select it if it is found. 6371126a8a12Smrg if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 6372126a8a12Smrg lt_cv_path_SED=$lt_ac_sed 6373126a8a12Smrg break 6374126a8a12Smrg fi 6375126a8a12Smrg while true; do 6376126a8a12Smrg cat conftest.in conftest.in >conftest.tmp 6377126a8a12Smrg mv conftest.tmp conftest.in 6378126a8a12Smrg cp conftest.in conftest.nl 6379126a8a12Smrg echo >>conftest.nl 6380126a8a12Smrg $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 6381126a8a12Smrg cmp -s conftest.out conftest.nl || break 6382126a8a12Smrg # 10000 chars as input seems more than enough 6383126a8a12Smrg test $lt_ac_count -gt 10 && break 6384126a8a12Smrg lt_ac_count=`expr $lt_ac_count + 1` 6385126a8a12Smrg if test $lt_ac_count -gt $lt_ac_max; then 6386126a8a12Smrg lt_ac_max=$lt_ac_count 6387126a8a12Smrg lt_cv_path_SED=$lt_ac_sed 6388126a8a12Smrg fi 6389126a8a12Smrg done 6390126a8a12Smrgdone 6391126a8a12Smrg]) 6392126a8a12SmrgSED=$lt_cv_path_SED 6393126a8a12SmrgAC_MSG_RESULT([$SED]) 6394126a8a12Smrg]) 6395126a8a12Smrg 6396126a8a12Smrg# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 6397126a8a12Smrg# 6398126a8a12Smrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 6399126a8a12Smrg# 6400126a8a12Smrg# This program is free software; you can redistribute it and/or modify 6401126a8a12Smrg# it under the terms of the GNU General Public License as published by 6402126a8a12Smrg# the Free Software Foundation; either version 2 of the License, or 6403126a8a12Smrg# (at your option) any later version. 6404126a8a12Smrg# 6405126a8a12Smrg# This program is distributed in the hope that it will be useful, but 6406126a8a12Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 6407126a8a12Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 6408126a8a12Smrg# General Public License for more details. 6409126a8a12Smrg# 6410126a8a12Smrg# You should have received a copy of the GNU General Public License 6411126a8a12Smrg# along with this program; if not, write to the Free Software 6412126a8a12Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 6413126a8a12Smrg# 6414126a8a12Smrg# As a special exception to the GNU General Public License, if you 6415126a8a12Smrg# distribute this file as part of a program that contains a 6416126a8a12Smrg# configuration script generated by Autoconf, you may include it under 6417126a8a12Smrg# the same distribution terms that you use for the rest of that program. 6418126a8a12Smrg 6419126a8a12Smrg# PKG_PROG_PKG_CONFIG([MIN-VERSION]) 6420126a8a12Smrg# ---------------------------------- 6421126a8a12SmrgAC_DEFUN([PKG_PROG_PKG_CONFIG], 6422126a8a12Smrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 6423126a8a12Smrgm4_pattern_allow([^PKG_CONFIG(_PATH)?$]) 6424126a8a12SmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl 6425126a8a12Smrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 6426126a8a12Smrg AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 6427126a8a12Smrgfi 6428126a8a12Smrgif test -n "$PKG_CONFIG"; then 6429126a8a12Smrg _pkg_min_version=m4_default([$1], [0.9.0]) 6430126a8a12Smrg AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 6431126a8a12Smrg if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 6432126a8a12Smrg AC_MSG_RESULT([yes]) 6433126a8a12Smrg else 6434126a8a12Smrg AC_MSG_RESULT([no]) 6435126a8a12Smrg PKG_CONFIG="" 6436126a8a12Smrg fi 6437126a8a12Smrg 6438126a8a12Smrgfi[]dnl 6439126a8a12Smrg])# PKG_PROG_PKG_CONFIG 6440126a8a12Smrg 6441126a8a12Smrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 6442126a8a12Smrg# 6443126a8a12Smrg# Check to see whether a particular set of modules exists. Similar 6444126a8a12Smrg# to PKG_CHECK_MODULES(), but does not set variables or print errors. 6445126a8a12Smrg# 6446126a8a12Smrg# 6447126a8a12Smrg# Similar to PKG_CHECK_MODULES, make sure that the first instance of 6448126a8a12Smrg# this or PKG_CHECK_MODULES is called, or make sure to call 6449126a8a12Smrg# PKG_CHECK_EXISTS manually 6450126a8a12Smrg# -------------------------------------------------------------- 6451126a8a12SmrgAC_DEFUN([PKG_CHECK_EXISTS], 6452126a8a12Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 6453126a8a12Smrgif test -n "$PKG_CONFIG" && \ 6454126a8a12Smrg AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 6455126a8a12Smrg m4_ifval([$2], [$2], [:]) 6456126a8a12Smrgm4_ifvaln([$3], [else 6457126a8a12Smrg $3])dnl 6458126a8a12Smrgfi]) 6459126a8a12Smrg 6460126a8a12Smrg 6461126a8a12Smrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 6462126a8a12Smrg# --------------------------------------------- 6463126a8a12Smrgm4_define([_PKG_CONFIG], 6464126a8a12Smrg[if test -n "$PKG_CONFIG"; then 6465126a8a12Smrg if test -n "$$1"; then 6466126a8a12Smrg pkg_cv_[]$1="$$1" 6467126a8a12Smrg else 6468126a8a12Smrg PKG_CHECK_EXISTS([$3], 6469126a8a12Smrg [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], 6470126a8a12Smrg [pkg_failed=yes]) 6471126a8a12Smrg fi 6472126a8a12Smrgelse 6473126a8a12Smrg pkg_failed=untried 6474126a8a12Smrgfi[]dnl 6475126a8a12Smrg])# _PKG_CONFIG 6476126a8a12Smrg 6477126a8a12Smrg# _PKG_SHORT_ERRORS_SUPPORTED 6478126a8a12Smrg# ----------------------------- 6479126a8a12SmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 6480126a8a12Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 6481126a8a12Smrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 6482126a8a12Smrg _pkg_short_errors_supported=yes 6483126a8a12Smrgelse 6484126a8a12Smrg _pkg_short_errors_supported=no 6485126a8a12Smrgfi[]dnl 6486126a8a12Smrg])# _PKG_SHORT_ERRORS_SUPPORTED 6487126a8a12Smrg 6488126a8a12Smrg 6489126a8a12Smrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 6490126a8a12Smrg# [ACTION-IF-NOT-FOUND]) 6491126a8a12Smrg# 6492126a8a12Smrg# 6493126a8a12Smrg# Note that if there is a possibility the first call to 6494126a8a12Smrg# PKG_CHECK_MODULES might not happen, you should be sure to include an 6495126a8a12Smrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 6496126a8a12Smrg# 6497126a8a12Smrg# 6498126a8a12Smrg# -------------------------------------------------------------- 6499126a8a12SmrgAC_DEFUN([PKG_CHECK_MODULES], 6500126a8a12Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 6501126a8a12SmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 6502126a8a12SmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 6503126a8a12Smrg 6504126a8a12Smrgpkg_failed=no 6505126a8a12SmrgAC_MSG_CHECKING([for $1]) 6506126a8a12Smrg 6507126a8a12Smrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 6508126a8a12Smrg_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 6509126a8a12Smrg 6510126a8a12Smrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 6511126a8a12Smrgand $1[]_LIBS to avoid the need to call pkg-config. 6512126a8a12SmrgSee the pkg-config man page for more details.]) 6513126a8a12Smrg 6514126a8a12Smrgif test $pkg_failed = yes; then 6515126a8a12Smrg _PKG_SHORT_ERRORS_SUPPORTED 6516126a8a12Smrg if test $_pkg_short_errors_supported = yes; then 6517126a8a12Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"` 6518126a8a12Smrg else 6519126a8a12Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` 6520126a8a12Smrg fi 6521126a8a12Smrg # Put the nasty error message in config.log where it belongs 6522126a8a12Smrg echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 6523126a8a12Smrg 6524126a8a12Smrg ifelse([$4], , [AC_MSG_ERROR(dnl 6525126a8a12Smrg[Package requirements ($2) were not met: 6526126a8a12Smrg 6527126a8a12Smrg$$1_PKG_ERRORS 6528126a8a12Smrg 6529126a8a12SmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you 6530126a8a12Smrginstalled software in a non-standard prefix. 6531126a8a12Smrg 6532126a8a12Smrg_PKG_TEXT 6533126a8a12Smrg])], 6534126a8a12Smrg [AC_MSG_RESULT([no]) 6535126a8a12Smrg $4]) 6536126a8a12Smrgelif test $pkg_failed = untried; then 6537126a8a12Smrg ifelse([$4], , [AC_MSG_FAILURE(dnl 6538126a8a12Smrg[The pkg-config script could not be found or is too old. Make sure it 6539126a8a12Smrgis in your PATH or set the PKG_CONFIG environment variable to the full 6540126a8a12Smrgpath to pkg-config. 6541126a8a12Smrg 6542126a8a12Smrg_PKG_TEXT 6543126a8a12Smrg 6544126a8a12SmrgTo get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.])], 6545126a8a12Smrg [$4]) 6546126a8a12Smrgelse 6547126a8a12Smrg $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 6548126a8a12Smrg $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 6549126a8a12Smrg AC_MSG_RESULT([yes]) 6550126a8a12Smrg ifelse([$3], , :, [$3]) 6551126a8a12Smrgfi[]dnl 6552126a8a12Smrg])# PKG_CHECK_MODULES 6553126a8a12Smrg 6554126a8a12Smrgdnl Copyright 2005 Red Hat, Inc 6555126a8a12Smrgdnl 6556126a8a12Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its 6557126a8a12Smrgdnl documentation for any purpose is hereby granted without fee, provided that 6558126a8a12Smrgdnl the above copyright notice appear in all copies and that both that 6559126a8a12Smrgdnl copyright notice and this permission notice appear in supporting 6560126a8a12Smrgdnl documentation. 6561126a8a12Smrgdnl 6562126a8a12Smrgdnl The above copyright notice and this permission notice shall be included 6563126a8a12Smrgdnl in all copies or substantial portions of the Software. 6564126a8a12Smrgdnl 6565126a8a12Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 6566126a8a12Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 6567126a8a12Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 6568126a8a12Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 6569126a8a12Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 6570126a8a12Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 6571126a8a12Smrgdnl OTHER DEALINGS IN THE SOFTWARE. 6572126a8a12Smrgdnl 6573126a8a12Smrgdnl Except as contained in this notice, the name of the copyright holders shall 6574126a8a12Smrgdnl not be used in advertising or otherwise to promote the sale, use or 6575126a8a12Smrgdnl other dealings in this Software without prior written authorization 6576126a8a12Smrgdnl from the copyright holders. 6577126a8a12Smrgdnl 6578126a8a12Smrg 6579126a8a12Smrg# XORG_RELEASE_VERSION 6580126a8a12Smrg# -------------------- 6581126a8a12Smrg# Adds --with/without-release-string and changes the PACKAGE and 6582126a8a12Smrg# PACKAGE_TARNAME to use "$PACKAGE{_TARNAME}-$RELEASE_VERSION". If 6583126a8a12Smrg# no option is given, PACKAGE and PACKAGE_TARNAME are unchanged. Also 6584126a8a12Smrg# defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 6585126a8a12Smrg 6586126a8a12SmrgAC_DEFUN([XORG_RELEASE_VERSION],[ 6587126a8a12Smrg AC_ARG_WITH(release-version, 6588126a8a12Smrg AC_HELP_STRING([--with-release-version=STRING], 6589126a8a12Smrg [Use release version string in package name]), 6590126a8a12Smrg [RELEASE_VERSION="$withval"], 6591126a8a12Smrg [RELEASE_VERSION=""]) 6592126a8a12Smrg if test "x$RELEASE_VERSION" != "x"; then 6593126a8a12Smrg PACKAGE="$PACKAGE-$RELEASE_VERSION" 6594126a8a12Smrg PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION" 6595126a8a12Smrg AC_MSG_NOTICE([Building with package name set to $PACKAGE]) 6596126a8a12Smrg fi 6597126a8a12Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 6598126a8a12Smrg [`echo $PACKAGE_VERSION | cut -d . -f 1`], 6599126a8a12Smrg [Major version of this package]) 6600126a8a12Smrg PVM=`echo $PACKAGE_VERSION | cut -d . -f 2` 6601126a8a12Smrg if test "x$PVM" = "x"; then 6602126a8a12Smrg PVM="0" 6603126a8a12Smrg fi 6604126a8a12Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 6605126a8a12Smrg [$PVM], 6606126a8a12Smrg [Minor version of this package]) 6607126a8a12Smrg PVP=`echo $PACKAGE_VERSION | cut -d . -f 3` 6608126a8a12Smrg if test "x$PVP" = "x"; then 6609126a8a12Smrg PVP="0" 6610126a8a12Smrg fi 6611126a8a12Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 6612126a8a12Smrg [$PVP], 6613126a8a12Smrg [Patch version of this package]) 6614126a8a12Smrg]) 6615126a8a12Smrg 6616126a8a12Smrgdnl $XdotOrg: lib/xtrans/xtrans.m4,v 1.6 2005/07/26 18:59:11 alanc Exp $ 6617126a8a12Smrgdnl 6618126a8a12Smrgdnl Copyright 2005 Sun Microsystems, Inc. All rights reserved. 6619126a8a12Smrgdnl 6620126a8a12Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its 6621126a8a12Smrgdnl documentation for any purpose is hereby granted without fee, provided that 6622126a8a12Smrgdnl the above copyright notice appear in all copies and that both that 6623126a8a12Smrgdnl copyright notice and this permission notice appear in supporting 6624126a8a12Smrgdnl documentation. 6625126a8a12Smrgdnl 6626126a8a12Smrgdnl The above copyright notice and this permission notice shall be included 6627126a8a12Smrgdnl in all copies or substantial portions of the Software. 6628126a8a12Smrgdnl 6629126a8a12Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 6630126a8a12Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 6631126a8a12Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 6632126a8a12Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 6633126a8a12Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 6634126a8a12Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 6635126a8a12Smrgdnl OTHER DEALINGS IN THE SOFTWARE. 6636126a8a12Smrgdnl 6637126a8a12Smrgdnl Except as contained in this notice, the name of the copyright holders shall 6638126a8a12Smrgdnl not be used in advertising or otherwise to promote the sale, use or 6639126a8a12Smrgdnl other dealings in this Software without prior written authorization 6640126a8a12Smrgdnl from the copyright holders. 6641126a8a12Smrgdnl 6642126a8a12Smrg 6643126a8a12Smrg# XTRANS_TCP_FLAGS() 6644126a8a12Smrg# ------------------ 6645126a8a12Smrg# Find needed libraries for TCP sockets, and check for IPv6 support 6646126a8a12SmrgAC_DEFUN([XTRANS_TCP_FLAGS],[ 6647126a8a12Smrg # SVR4 hides these in libraries other than libc 6648126a8a12Smrg AC_SEARCH_LIBS(socket, [socket]) 6649126a8a12Smrg AC_SEARCH_LIBS(gethostbyname, [nsl]) 6650126a8a12Smrg 6651126a8a12Smrg # Needs to come after above checks for libsocket & libnsl for SVR4 systems 6652126a8a12Smrg AC_ARG_ENABLE(ipv6, 6653126a8a12Smrg AC_HELP_STRING([--enable-IPv6],[Enable IPv6 support]), 6654126a8a12Smrg [IPV6CONN=$enableval], 6655126a8a12Smrg [AC_CHECK_FUNC(getaddrinfo,[IPV6CONN=yes],[IPV6CONN=no])]) 6656126a8a12Smrg AC_MSG_CHECKING([if IPv6 support should be built]) 6657126a8a12Smrg if test "$IPV6CONN" = "yes"; then 6658126a8a12Smrg AC_DEFINE(IPv6,1,[Support IPv6 for TCP connections]) 6659126a8a12Smrg fi 6660126a8a12Smrg AC_MSG_RESULT($IPV6CONN) 6661126a8a12Smrg 6662126a8a12Smrg # 4.3BSD-Reno added a new member to struct sockaddr_in 6663126a8a12Smrg AC_CHECK_MEMBER([struct sockaddr_in.sin_len], 6664126a8a12Smrg AC_DEFINE([BSD44SOCKETS],1, 6665126a8a12Smrg [Define to 1 if `struct sockaddr_in' has a `sin_len' member]), [], [ 6666126a8a12Smrg#include <sys/types.h> 6667126a8a12Smrg#include <sys/socket.h> 6668126a8a12Smrg#include <netinet/in.h> 6669126a8a12Smrg ]) 6670126a8a12Smrg]) # XTRANS_TCP_FLAGS 6671126a8a12Smrg 6672126a8a12Smrg# XTRANS_CONNECTION_FLAGS() 6673126a8a12Smrg# ------------------------- 6674126a8a12Smrg# Standard checks for which Xtrans transports to use by the Xorg packages 6675126a8a12Smrg# that use Xtrans functions 6676126a8a12SmrgAC_DEFUN([XTRANS_CONNECTION_FLAGS],[ 6677126a8a12Smrg AC_REQUIRE([AC_CANONICAL_HOST]) 6678126a8a12Smrg AC_REQUIRE([AC_TYPE_SIGNAL]) 6679126a8a12Smrg AC_ARG_ENABLE(unix-transport, 6680126a8a12Smrg AC_HELP_STRING([--enable-unix-transport],[Enable UNIX domain socket transport]), 6681126a8a12Smrg [UNIXCONN=$enableval], [UNIXCONN=yes]) 6682126a8a12Smrg AC_ARG_ENABLE(tcp-transport, 6683126a8a12Smrg AC_HELP_STRING([--enable-tcp-transport],[Enable TCP socket transport]), 6684126a8a12Smrg [TCPCONN=$enableval], [TCPCONN=yes]) 6685126a8a12Smrg AC_MSG_CHECKING([if Xtrans should support UNIX socket connections]) 6686126a8a12Smrg if test "$UNIXCONN" = "yes"; then 6687126a8a12Smrg AC_DEFINE(UNIXCONN,1,[Support UNIX socket connections]) 6688126a8a12Smrg fi 6689126a8a12Smrg AC_MSG_RESULT($UNIXCONN) 6690126a8a12Smrg AC_MSG_CHECKING([if Xtrans should support TCP socket connections]) 6691126a8a12Smrg AC_MSG_RESULT($TCPCONN) 6692126a8a12Smrg if test "$TCPCONN" = "yes"; then 6693126a8a12Smrg AC_DEFINE(TCPCONN,1,[Support TCP socket connections]) 6694126a8a12Smrg XTRANS_TCP_FLAGS 6695126a8a12Smrg fi 6696126a8a12Smrg [case $host_os in 6697126a8a12Smrg solaris*|sco*|sysv4*) localdef="yes" ;; 6698126a8a12Smrg *) localdef="no" ;; 6699126a8a12Smrg esac] 6700126a8a12Smrg AC_ARG_ENABLE(local-transport, 6701126a8a12Smrg AC_HELP_STRING([--enable-local-transport],[Enable os-specific local transport]), 6702126a8a12Smrg [LOCALCONN=$enableval], [LOCALCONN=$localdef]) 6703126a8a12Smrg AC_MSG_CHECKING([if Xtrans should support os-specific local connections]) 6704126a8a12Smrg AC_MSG_RESULT($LOCALCONN) 6705126a8a12Smrg if test "$LOCALCONN" = "yes"; then 6706126a8a12Smrg AC_DEFINE(LOCALCONN,1,[Support os-specific local connections]) 6707126a8a12Smrg fi 6708126a8a12Smrg 6709126a8a12Smrg]) # XTRANS_CONNECTION_FLAGS 6710126a8a12Smrg 6711126a8a12Smrg 6712126a8a12Smrg# XTRANS_SECURE_RPC_FLAGS() 6713126a8a12Smrg# ------------------------- 6714126a8a12Smrg# Check for Secure RPC functions - must come after XTRANS_TCP_FLAGS 6715126a8a12Smrg# so that any necessary networking libraries are already found 6716126a8a12SmrgAC_DEFUN([XTRANS_SECURE_RPC_FLAGS], 6717126a8a12Smrg[AC_REQUIRE([XTRANS_TCP_FLAGS]) 6718126a8a12Smrg AC_ARG_ENABLE(secure-rpc, 6719126a8a12Smrg AC_HELP_STRING([--enable-secure-rpc],[Enable Secure RPC]), 6720126a8a12Smrg [SECURE_RPC=$enableval], [SECURE_RPC="try"]) 6721126a8a12Smrg 6722126a8a12Smrg if test "x$SECURE_RPC" = "xyes" -o "x$SECURE_RPC" = "xtry" ; then 6723126a8a12Smrg FOUND_SECURE_RPC="no" 6724126a8a12Smrg AC_CHECK_FUNCS([authdes_seccreate authdes_create], 6725126a8a12Smrg [FOUND_SECURE_RPC="yes"]) 6726126a8a12Smrg if test "x$FOUND_SECURE_RPC" = "xno" ; then 6727126a8a12Smrg if test "x$SECURE_RPC" = "xyes" ; then 6728126a8a12Smrg AC_MSG_ERROR([Secure RPC requested, but required functions not found]) 6729126a8a12Smrg fi 6730126a8a12Smrg SECURE_RPC="no" 6731126a8a12Smrg else 6732126a8a12Smrg dnl FreeBSD keeps getsecretkey in librpcsvc 6733126a8a12Smrg AC_SEARCH_LIBS(getsecretkey, [rpcsvc]) 6734126a8a12Smrg SECURE_RPC="yes" 6735126a8a12Smrg fi 6736126a8a12Smrg fi 6737126a8a12Smrg AC_MSG_CHECKING([if Secure RPC authentication ("SUN-DES-1") should be supported]) 6738126a8a12Smrg if test "x$SECURE_RPC" = "xyes" ; then 6739126a8a12Smrg AC_DEFINE(SECURE_RPC, 1, [Support Secure RPC ("SUN-DES-1") authentication for X11 clients]) 6740126a8a12Smrg fi 6741126a8a12Smrg AC_MSG_RESULT($SECURE_RPC) 6742126a8a12Smrg]) # XTRANS_SECURE_RPC_FLAGS 6743126a8a12Smrg 6744126a8a12Smrg 6745126a8a12Smrg# Copyright (C) 2002, 2003, 2005, 2006 Free Software Foundation, Inc. 6746126a8a12Smrg# 6747126a8a12Smrg# This file is free software; the Free Software Foundation 6748126a8a12Smrg# gives unlimited permission to copy and/or distribute it, 6749126a8a12Smrg# with or without modifications, as long as this notice is preserved. 6750126a8a12Smrg 6751126a8a12Smrg# AM_AUTOMAKE_VERSION(VERSION) 6752126a8a12Smrg# ---------------------------- 6753126a8a12Smrg# Automake X.Y traces this macro to ensure aclocal.m4 has been 6754126a8a12Smrg# generated from the m4 files accompanying Automake X.Y. 6755126a8a12Smrg# (This private macro should not be called outside this file.) 6756126a8a12SmrgAC_DEFUN([AM_AUTOMAKE_VERSION], 6757126a8a12Smrg[am__api_version='1.10' 6758126a8a12Smrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 6759126a8a12Smrgdnl require some minimum version. Point them to the right macro. 6760126a8a12Smrgm4_if([$1], [1.10], [], 6761126a8a12Smrg [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 6762126a8a12Smrg]) 6763126a8a12Smrg 6764126a8a12Smrg# _AM_AUTOCONF_VERSION(VERSION) 6765126a8a12Smrg# ----------------------------- 6766126a8a12Smrg# aclocal traces this macro to find the Autoconf version. 6767126a8a12Smrg# This is a private macro too. Using m4_define simplifies 6768126a8a12Smrg# the logic in aclocal, which can simply ignore this definition. 6769126a8a12Smrgm4_define([_AM_AUTOCONF_VERSION], []) 6770126a8a12Smrg 6771126a8a12Smrg# AM_SET_CURRENT_AUTOMAKE_VERSION 6772126a8a12Smrg# ------------------------------- 6773126a8a12Smrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 6774126a8a12Smrg# This function is AC_REQUIREd by AC_INIT_AUTOMAKE. 6775126a8a12SmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 6776126a8a12Smrg[AM_AUTOMAKE_VERSION([1.10])dnl 6777126a8a12Smrg_AM_AUTOCONF_VERSION(m4_PACKAGE_VERSION)]) 6778126a8a12Smrg 6779126a8a12Smrg# AM_AUX_DIR_EXPAND -*- Autoconf -*- 6780126a8a12Smrg 6781126a8a12Smrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 6782126a8a12Smrg# 6783126a8a12Smrg# This file is free software; the Free Software Foundation 6784126a8a12Smrg# gives unlimited permission to copy and/or distribute it, 6785126a8a12Smrg# with or without modifications, as long as this notice is preserved. 6786126a8a12Smrg 6787126a8a12Smrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 6788126a8a12Smrg# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to 6789126a8a12Smrg# `$srcdir', `$srcdir/..', or `$srcdir/../..'. 6790126a8a12Smrg# 6791126a8a12Smrg# Of course, Automake must honor this variable whenever it calls a 6792126a8a12Smrg# tool from the auxiliary directory. The problem is that $srcdir (and 6793126a8a12Smrg# therefore $ac_aux_dir as well) can be either absolute or relative, 6794126a8a12Smrg# depending on how configure is run. This is pretty annoying, since 6795126a8a12Smrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top 6796126a8a12Smrg# source directory, any form will work fine, but in subdirectories a 6797126a8a12Smrg# relative path needs to be adjusted first. 6798126a8a12Smrg# 6799126a8a12Smrg# $ac_aux_dir/missing 6800126a8a12Smrg# fails when called from a subdirectory if $ac_aux_dir is relative 6801126a8a12Smrg# $top_srcdir/$ac_aux_dir/missing 6802126a8a12Smrg# fails if $ac_aux_dir is absolute, 6803126a8a12Smrg# fails when called from a subdirectory in a VPATH build with 6804126a8a12Smrg# a relative $ac_aux_dir 6805126a8a12Smrg# 6806126a8a12Smrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 6807126a8a12Smrg# are both prefixed by $srcdir. In an in-source build this is usually 6808126a8a12Smrg# harmless because $srcdir is `.', but things will broke when you 6809126a8a12Smrg# start a VPATH build or use an absolute $srcdir. 6810126a8a12Smrg# 6811126a8a12Smrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 6812126a8a12Smrg# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 6813126a8a12Smrg# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 6814126a8a12Smrg# and then we would define $MISSING as 6815126a8a12Smrg# MISSING="\${SHELL} $am_aux_dir/missing" 6816126a8a12Smrg# This will work as long as MISSING is not called from configure, because 6817126a8a12Smrg# unfortunately $(top_srcdir) has no meaning in configure. 6818126a8a12Smrg# However there are other variables, like CC, which are often used in 6819126a8a12Smrg# configure, and could therefore not use this "fixed" $ac_aux_dir. 6820126a8a12Smrg# 6821126a8a12Smrg# Another solution, used here, is to always expand $ac_aux_dir to an 6822126a8a12Smrg# absolute PATH. The drawback is that using absolute paths prevent a 6823126a8a12Smrg# configured tree to be moved without reconfiguration. 6824126a8a12Smrg 6825126a8a12SmrgAC_DEFUN([AM_AUX_DIR_EXPAND], 6826126a8a12Smrg[dnl Rely on autoconf to set up CDPATH properly. 6827126a8a12SmrgAC_PREREQ([2.50])dnl 6828126a8a12Smrg# expand $ac_aux_dir to an absolute path 6829126a8a12Smrgam_aux_dir=`cd $ac_aux_dir && pwd` 6830126a8a12Smrg]) 6831126a8a12Smrg 6832126a8a12Smrg# AM_CONDITIONAL -*- Autoconf -*- 6833126a8a12Smrg 6834126a8a12Smrg# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006 6835126a8a12Smrg# Free Software Foundation, Inc. 6836126a8a12Smrg# 6837126a8a12Smrg# This file is free software; the Free Software Foundation 6838126a8a12Smrg# gives unlimited permission to copy and/or distribute it, 6839126a8a12Smrg# with or without modifications, as long as this notice is preserved. 6840126a8a12Smrg 6841126a8a12Smrg# serial 8 6842126a8a12Smrg 6843126a8a12Smrg# AM_CONDITIONAL(NAME, SHELL-CONDITION) 6844126a8a12Smrg# ------------------------------------- 6845126a8a12Smrg# Define a conditional. 6846126a8a12SmrgAC_DEFUN([AM_CONDITIONAL], 6847126a8a12Smrg[AC_PREREQ(2.52)dnl 6848126a8a12Smrg ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 6849126a8a12Smrg [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 6850126a8a12SmrgAC_SUBST([$1_TRUE])dnl 6851126a8a12SmrgAC_SUBST([$1_FALSE])dnl 6852126a8a12Smrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl 6853126a8a12Smrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl 6854126a8a12Smrgif $2; then 6855126a8a12Smrg $1_TRUE= 6856126a8a12Smrg $1_FALSE='#' 6857126a8a12Smrgelse 6858126a8a12Smrg $1_TRUE='#' 6859126a8a12Smrg $1_FALSE= 6860126a8a12Smrgfi 6861126a8a12SmrgAC_CONFIG_COMMANDS_PRE( 6862126a8a12Smrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 6863126a8a12Smrg AC_MSG_ERROR([[conditional "$1" was never defined. 6864126a8a12SmrgUsually this means the macro was only invoked conditionally.]]) 6865126a8a12Smrgfi])]) 6866126a8a12Smrg 6867126a8a12Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 6868126a8a12Smrg# Free Software Foundation, Inc. 6869126a8a12Smrg# 6870126a8a12Smrg# This file is free software; the Free Software Foundation 6871126a8a12Smrg# gives unlimited permission to copy and/or distribute it, 6872126a8a12Smrg# with or without modifications, as long as this notice is preserved. 6873126a8a12Smrg 6874126a8a12Smrg# serial 9 6875126a8a12Smrg 6876126a8a12Smrg# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be 6877126a8a12Smrg# written in clear, in which case automake, when reading aclocal.m4, 6878126a8a12Smrg# will think it sees a *use*, and therefore will trigger all it's 6879126a8a12Smrg# C support machinery. Also note that it means that autoscan, seeing 6880126a8a12Smrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 6881126a8a12Smrg 6882126a8a12Smrg 6883126a8a12Smrg# _AM_DEPENDENCIES(NAME) 6884126a8a12Smrg# ---------------------- 6885126a8a12Smrg# See how the compiler implements dependency checking. 6886126a8a12Smrg# NAME is "CC", "CXX", "GCJ", or "OBJC". 6887126a8a12Smrg# We try a few techniques and use that to set a single cache variable. 6888126a8a12Smrg# 6889126a8a12Smrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 6890126a8a12Smrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 6891126a8a12Smrg# dependency, and given that the user is not expected to run this macro, 6892126a8a12Smrg# just rely on AC_PROG_CC. 6893126a8a12SmrgAC_DEFUN([_AM_DEPENDENCIES], 6894126a8a12Smrg[AC_REQUIRE([AM_SET_DEPDIR])dnl 6895126a8a12SmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 6896126a8a12SmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl 6897126a8a12SmrgAC_REQUIRE([AM_DEP_TRACK])dnl 6898126a8a12Smrg 6899126a8a12Smrgifelse([$1], CC, [depcc="$CC" am_compiler_list=], 6900126a8a12Smrg [$1], CXX, [depcc="$CXX" am_compiler_list=], 6901126a8a12Smrg [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 6902126a8a12Smrg [$1], UPC, [depcc="$UPC" am_compiler_list=], 6903126a8a12Smrg [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 6904126a8a12Smrg [depcc="$$1" am_compiler_list=]) 6905126a8a12Smrg 6906126a8a12SmrgAC_CACHE_CHECK([dependency style of $depcc], 6907126a8a12Smrg [am_cv_$1_dependencies_compiler_type], 6908126a8a12Smrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 6909126a8a12Smrg # We make a subdir and do the tests there. Otherwise we can end up 6910126a8a12Smrg # making bogus files that we don't know about and never remove. For 6911126a8a12Smrg # instance it was reported that on HP-UX the gcc test will end up 6912126a8a12Smrg # making a dummy file named `D' -- because `-MD' means `put the output 6913126a8a12Smrg # in D'. 6914126a8a12Smrg mkdir conftest.dir 6915126a8a12Smrg # Copy depcomp to subdir because otherwise we won't find it if we're 6916126a8a12Smrg # using a relative directory. 6917126a8a12Smrg cp "$am_depcomp" conftest.dir 6918126a8a12Smrg cd conftest.dir 6919126a8a12Smrg # We will build objects and dependencies in a subdirectory because 6920126a8a12Smrg # it helps to detect inapplicable dependency modes. For instance 6921126a8a12Smrg # both Tru64's cc and ICC support -MD to output dependencies as a 6922126a8a12Smrg # side effect of compilation, but ICC will put the dependencies in 6923126a8a12Smrg # the current directory while Tru64 will put them in the object 6924126a8a12Smrg # directory. 6925126a8a12Smrg mkdir sub 6926126a8a12Smrg 6927126a8a12Smrg am_cv_$1_dependencies_compiler_type=none 6928126a8a12Smrg if test "$am_compiler_list" = ""; then 6929126a8a12Smrg am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 6930126a8a12Smrg fi 6931126a8a12Smrg for depmode in $am_compiler_list; do 6932126a8a12Smrg # Setup a source with many dependencies, because some compilers 6933126a8a12Smrg # like to wrap large dependency lists on column 80 (with \), and 6934126a8a12Smrg # we should not choose a depcomp mode which is confused by this. 6935126a8a12Smrg # 6936126a8a12Smrg # We need to recreate these files for each test, as the compiler may 6937126a8a12Smrg # overwrite some of them when testing with obscure command lines. 6938126a8a12Smrg # This happens at least with the AIX C compiler. 6939126a8a12Smrg : > sub/conftest.c 6940126a8a12Smrg for i in 1 2 3 4 5 6; do 6941126a8a12Smrg echo '#include "conftst'$i'.h"' >> sub/conftest.c 6942126a8a12Smrg # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with 6943126a8a12Smrg # Solaris 8's {/usr,}/bin/sh. 6944126a8a12Smrg touch sub/conftst$i.h 6945126a8a12Smrg done 6946126a8a12Smrg echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 6947126a8a12Smrg 6948126a8a12Smrg case $depmode in 6949126a8a12Smrg nosideeffect) 6950126a8a12Smrg # after this tag, mechanisms are not by side-effect, so they'll 6951126a8a12Smrg # only be used when explicitly requested 6952126a8a12Smrg if test "x$enable_dependency_tracking" = xyes; then 6953126a8a12Smrg continue 6954126a8a12Smrg else 6955126a8a12Smrg break 6956126a8a12Smrg fi 6957126a8a12Smrg ;; 6958126a8a12Smrg none) break ;; 6959126a8a12Smrg esac 6960126a8a12Smrg # We check with `-c' and `-o' for the sake of the "dashmstdout" 6961126a8a12Smrg # mode. It turns out that the SunPro C++ compiler does not properly 6962126a8a12Smrg # handle `-M -o', and we need to detect this. 6963126a8a12Smrg if depmode=$depmode \ 6964126a8a12Smrg source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ 6965126a8a12Smrg depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 6966126a8a12Smrg $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ 6967126a8a12Smrg >/dev/null 2>conftest.err && 6968126a8a12Smrg grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 6969126a8a12Smrg grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 6970126a8a12Smrg grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && 6971126a8a12Smrg ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 6972126a8a12Smrg # icc doesn't choke on unknown options, it will just issue warnings 6973126a8a12Smrg # or remarks (even with -Werror). So we grep stderr for any message 6974126a8a12Smrg # that says an option was ignored or not supported. 6975126a8a12Smrg # When given -MP, icc 7.0 and 7.1 complain thusly: 6976126a8a12Smrg # icc: Command line warning: ignoring option '-M'; no argument required 6977126a8a12Smrg # The diagnosis changed in icc 8.0: 6978126a8a12Smrg # icc: Command line remark: option '-MP' not supported 6979126a8a12Smrg if (grep 'ignoring option' conftest.err || 6980126a8a12Smrg grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 6981126a8a12Smrg am_cv_$1_dependencies_compiler_type=$depmode 6982126a8a12Smrg break 6983126a8a12Smrg fi 6984126a8a12Smrg fi 6985126a8a12Smrg done 6986126a8a12Smrg 6987126a8a12Smrg cd .. 6988126a8a12Smrg rm -rf conftest.dir 6989126a8a12Smrgelse 6990126a8a12Smrg am_cv_$1_dependencies_compiler_type=none 6991126a8a12Smrgfi 6992126a8a12Smrg]) 6993126a8a12SmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 6994126a8a12SmrgAM_CONDITIONAL([am__fastdep$1], [ 6995126a8a12Smrg test "x$enable_dependency_tracking" != xno \ 6996126a8a12Smrg && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 6997126a8a12Smrg]) 6998126a8a12Smrg 6999126a8a12Smrg 7000126a8a12Smrg# AM_SET_DEPDIR 7001126a8a12Smrg# ------------- 7002126a8a12Smrg# Choose a directory name for dependency files. 7003126a8a12Smrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES 7004126a8a12SmrgAC_DEFUN([AM_SET_DEPDIR], 7005126a8a12Smrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 7006126a8a12SmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 7007126a8a12Smrg]) 7008126a8a12Smrg 7009126a8a12Smrg 7010126a8a12Smrg# AM_DEP_TRACK 7011126a8a12Smrg# ------------ 7012126a8a12SmrgAC_DEFUN([AM_DEP_TRACK], 7013126a8a12Smrg[AC_ARG_ENABLE(dependency-tracking, 7014126a8a12Smrg[ --disable-dependency-tracking speeds up one-time build 7015126a8a12Smrg --enable-dependency-tracking do not reject slow dependency extractors]) 7016126a8a12Smrgif test "x$enable_dependency_tracking" != xno; then 7017126a8a12Smrg am_depcomp="$ac_aux_dir/depcomp" 7018126a8a12Smrg AMDEPBACKSLASH='\' 7019126a8a12Smrgfi 7020126a8a12SmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 7021126a8a12SmrgAC_SUBST([AMDEPBACKSLASH])dnl 7022126a8a12Smrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 7023126a8a12Smrg]) 7024126a8a12Smrg 7025126a8a12Smrg# Generate code to set up dependency tracking. -*- Autoconf -*- 7026126a8a12Smrg 7027126a8a12Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 7028126a8a12Smrg# Free Software Foundation, Inc. 7029126a8a12Smrg# 7030126a8a12Smrg# This file is free software; the Free Software Foundation 7031126a8a12Smrg# gives unlimited permission to copy and/or distribute it, 7032126a8a12Smrg# with or without modifications, as long as this notice is preserved. 7033126a8a12Smrg 7034126a8a12Smrg#serial 3 7035126a8a12Smrg 7036126a8a12Smrg# _AM_OUTPUT_DEPENDENCY_COMMANDS 7037126a8a12Smrg# ------------------------------ 7038126a8a12SmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 7039126a8a12Smrg[for mf in $CONFIG_FILES; do 7040126a8a12Smrg # Strip MF so we end up with the name of the file. 7041126a8a12Smrg mf=`echo "$mf" | sed -e 's/:.*$//'` 7042126a8a12Smrg # Check whether this is an Automake generated Makefile or not. 7043126a8a12Smrg # We used to match only the files named `Makefile.in', but 7044126a8a12Smrg # some people rename them; so instead we look at the file content. 7045126a8a12Smrg # Grep'ing the first line is not enough: some people post-process 7046126a8a12Smrg # each Makefile.in and add a new line on top of each file to say so. 7047126a8a12Smrg # Grep'ing the whole file is not good either: AIX grep has a line 7048126a8a12Smrg # limit of 2048, but all sed's we know have understand at least 4000. 7049126a8a12Smrg if sed 10q "$mf" | grep '^#.*generated by automake' > /dev/null 2>&1; then 7050126a8a12Smrg dirpart=`AS_DIRNAME("$mf")` 7051126a8a12Smrg else 7052126a8a12Smrg continue 7053126a8a12Smrg fi 7054126a8a12Smrg # Extract the definition of DEPDIR, am__include, and am__quote 7055126a8a12Smrg # from the Makefile without running `make'. 7056126a8a12Smrg DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` 7057126a8a12Smrg test -z "$DEPDIR" && continue 7058126a8a12Smrg am__include=`sed -n 's/^am__include = //p' < "$mf"` 7059126a8a12Smrg test -z "am__include" && continue 7060126a8a12Smrg am__quote=`sed -n 's/^am__quote = //p' < "$mf"` 7061126a8a12Smrg # When using ansi2knr, U may be empty or an underscore; expand it 7062126a8a12Smrg U=`sed -n 's/^U = //p' < "$mf"` 7063126a8a12Smrg # Find all dependency output files, they are included files with 7064126a8a12Smrg # $(DEPDIR) in their names. We invoke sed twice because it is the 7065126a8a12Smrg # simplest approach to changing $(DEPDIR) to its actual value in the 7066126a8a12Smrg # expansion. 7067126a8a12Smrg for file in `sed -n " 7068126a8a12Smrg s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ 7069126a8a12Smrg sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do 7070126a8a12Smrg # Make sure the directory exists. 7071126a8a12Smrg test -f "$dirpart/$file" && continue 7072126a8a12Smrg fdir=`AS_DIRNAME(["$file"])` 7073126a8a12Smrg AS_MKDIR_P([$dirpart/$fdir]) 7074126a8a12Smrg # echo "creating $dirpart/$file" 7075126a8a12Smrg echo '# dummy' > "$dirpart/$file" 7076126a8a12Smrg done 7077126a8a12Smrgdone 7078126a8a12Smrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS 7079126a8a12Smrg 7080126a8a12Smrg 7081126a8a12Smrg# AM_OUTPUT_DEPENDENCY_COMMANDS 7082126a8a12Smrg# ----------------------------- 7083126a8a12Smrg# This macro should only be invoked once -- use via AC_REQUIRE. 7084126a8a12Smrg# 7085126a8a12Smrg# This code is only required when automatic dependency tracking 7086126a8a12Smrg# is enabled. FIXME. This creates each `.P' file that we will 7087126a8a12Smrg# need in order to bootstrap the dependency handling code. 7088126a8a12SmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 7089126a8a12Smrg[AC_CONFIG_COMMANDS([depfiles], 7090126a8a12Smrg [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 7091126a8a12Smrg [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 7092126a8a12Smrg]) 7093126a8a12Smrg 7094126a8a12Smrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 7095126a8a12Smrg# Free Software Foundation, Inc. 7096126a8a12Smrg# 7097126a8a12Smrg# This file is free software; the Free Software Foundation 7098126a8a12Smrg# gives unlimited permission to copy and/or distribute it, 7099126a8a12Smrg# with or without modifications, as long as this notice is preserved. 7100126a8a12Smrg 7101126a8a12Smrg# serial 8 7102126a8a12Smrg 7103126a8a12Smrg# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. 7104126a8a12SmrgAU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) 7105126a8a12Smrg 7106126a8a12Smrg# Do all the work for Automake. -*- Autoconf -*- 7107126a8a12Smrg 7108126a8a12Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 7109126a8a12Smrg# 2005, 2006 Free Software Foundation, Inc. 7110126a8a12Smrg# 7111126a8a12Smrg# This file is free software; the Free Software Foundation 7112126a8a12Smrg# gives unlimited permission to copy and/or distribute it, 7113126a8a12Smrg# with or without modifications, as long as this notice is preserved. 7114126a8a12Smrg 7115126a8a12Smrg# serial 12 7116126a8a12Smrg 7117126a8a12Smrg# This macro actually does too much. Some checks are only needed if 7118126a8a12Smrg# your package does certain things. But this isn't really a big deal. 7119126a8a12Smrg 7120126a8a12Smrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 7121126a8a12Smrg# AM_INIT_AUTOMAKE([OPTIONS]) 7122126a8a12Smrg# ----------------------------------------------- 7123126a8a12Smrg# The call with PACKAGE and VERSION arguments is the old style 7124126a8a12Smrg# call (pre autoconf-2.50), which is being phased out. PACKAGE 7125126a8a12Smrg# and VERSION should now be passed to AC_INIT and removed from 7126126a8a12Smrg# the call to AM_INIT_AUTOMAKE. 7127126a8a12Smrg# We support both call styles for the transition. After 7128126a8a12Smrg# the next Automake release, Autoconf can make the AC_INIT 7129126a8a12Smrg# arguments mandatory, and then we can depend on a new Autoconf 7130126a8a12Smrg# release and drop the old call support. 7131126a8a12SmrgAC_DEFUN([AM_INIT_AUTOMAKE], 7132126a8a12Smrg[AC_PREREQ([2.60])dnl 7133126a8a12Smrgdnl Autoconf wants to disallow AM_ names. We explicitly allow 7134126a8a12Smrgdnl the ones we care about. 7135126a8a12Smrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 7136126a8a12SmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 7137126a8a12SmrgAC_REQUIRE([AC_PROG_INSTALL])dnl 7138126a8a12Smrgif test "`cd $srcdir && pwd`" != "`pwd`"; then 7139126a8a12Smrg # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 7140126a8a12Smrg # is not polluted with repeated "-I." 7141126a8a12Smrg AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 7142126a8a12Smrg # test to see if srcdir already configured 7143126a8a12Smrg if test -f $srcdir/config.status; then 7144126a8a12Smrg AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 7145126a8a12Smrg fi 7146126a8a12Smrgfi 7147126a8a12Smrg 7148126a8a12Smrg# test whether we have cygpath 7149126a8a12Smrgif test -z "$CYGPATH_W"; then 7150126a8a12Smrg if (cygpath --version) >/dev/null 2>/dev/null; then 7151126a8a12Smrg CYGPATH_W='cygpath -w' 7152126a8a12Smrg else 7153126a8a12Smrg CYGPATH_W=echo 7154126a8a12Smrg fi 7155126a8a12Smrgfi 7156126a8a12SmrgAC_SUBST([CYGPATH_W]) 7157126a8a12Smrg 7158126a8a12Smrg# Define the identity of the package. 7159126a8a12Smrgdnl Distinguish between old-style and new-style calls. 7160126a8a12Smrgm4_ifval([$2], 7161126a8a12Smrg[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 7162126a8a12Smrg AC_SUBST([PACKAGE], [$1])dnl 7163126a8a12Smrg AC_SUBST([VERSION], [$2])], 7164126a8a12Smrg[_AM_SET_OPTIONS([$1])dnl 7165126a8a12Smrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 7166126a8a12Smrgm4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, 7167126a8a12Smrg [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 7168126a8a12Smrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 7169126a8a12Smrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 7170126a8a12Smrg 7171126a8a12Smrg_AM_IF_OPTION([no-define],, 7172126a8a12Smrg[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) 7173126a8a12Smrg AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl 7174126a8a12Smrg 7175126a8a12Smrg# Some tools Automake needs. 7176126a8a12SmrgAC_REQUIRE([AM_SANITY_CHECK])dnl 7177126a8a12SmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl 7178126a8a12SmrgAM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) 7179126a8a12SmrgAM_MISSING_PROG(AUTOCONF, autoconf) 7180126a8a12SmrgAM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) 7181126a8a12SmrgAM_MISSING_PROG(AUTOHEADER, autoheader) 7182126a8a12SmrgAM_MISSING_PROG(MAKEINFO, makeinfo) 7183126a8a12SmrgAM_PROG_INSTALL_SH 7184126a8a12SmrgAM_PROG_INSTALL_STRIP 7185126a8a12SmrgAC_REQUIRE([AM_PROG_MKDIR_P])dnl 7186126a8a12Smrg# We need awk for the "check" target. The system "awk" is bad on 7187126a8a12Smrg# some platforms. 7188126a8a12SmrgAC_REQUIRE([AC_PROG_AWK])dnl 7189126a8a12SmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl 7190126a8a12SmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl 7191126a8a12Smrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 7192126a8a12Smrg [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 7193126a8a12Smrg [_AM_PROG_TAR([v7])])]) 7194126a8a12Smrg_AM_IF_OPTION([no-dependencies],, 7195126a8a12Smrg[AC_PROVIDE_IFELSE([AC_PROG_CC], 7196126a8a12Smrg [_AM_DEPENDENCIES(CC)], 7197126a8a12Smrg [define([AC_PROG_CC], 7198126a8a12Smrg defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl 7199126a8a12SmrgAC_PROVIDE_IFELSE([AC_PROG_CXX], 7200126a8a12Smrg [_AM_DEPENDENCIES(CXX)], 7201126a8a12Smrg [define([AC_PROG_CXX], 7202126a8a12Smrg defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl 7203126a8a12SmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC], 7204126a8a12Smrg [_AM_DEPENDENCIES(OBJC)], 7205126a8a12Smrg [define([AC_PROG_OBJC], 7206126a8a12Smrg defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl 7207126a8a12Smrg]) 7208126a8a12Smrg]) 7209126a8a12Smrg 7210126a8a12Smrg 7211126a8a12Smrg# When config.status generates a header, we must update the stamp-h file. 7212126a8a12Smrg# This file resides in the same directory as the config header 7213126a8a12Smrg# that is generated. The stamp files are numbered to have different names. 7214126a8a12Smrg 7215126a8a12Smrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 7216126a8a12Smrg# loop where config.status creates the headers, so we can generate 7217126a8a12Smrg# our stamp files there. 7218126a8a12SmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 7219126a8a12Smrg[# Compute $1's index in $config_headers. 7220126a8a12Smrg_am_stamp_count=1 7221126a8a12Smrgfor _am_header in $config_headers :; do 7222126a8a12Smrg case $_am_header in 7223126a8a12Smrg $1 | $1:* ) 7224126a8a12Smrg break ;; 7225126a8a12Smrg * ) 7226126a8a12Smrg _am_stamp_count=`expr $_am_stamp_count + 1` ;; 7227126a8a12Smrg esac 7228126a8a12Smrgdone 7229126a8a12Smrgecho "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) 7230126a8a12Smrg 7231126a8a12Smrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 7232126a8a12Smrg# 7233126a8a12Smrg# This file is free software; the Free Software Foundation 7234126a8a12Smrg# gives unlimited permission to copy and/or distribute it, 7235126a8a12Smrg# with or without modifications, as long as this notice is preserved. 7236126a8a12Smrg 7237126a8a12Smrg# AM_PROG_INSTALL_SH 7238126a8a12Smrg# ------------------ 7239126a8a12Smrg# Define $install_sh. 7240126a8a12SmrgAC_DEFUN([AM_PROG_INSTALL_SH], 7241126a8a12Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 7242126a8a12Smrginstall_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"} 7243126a8a12SmrgAC_SUBST(install_sh)]) 7244126a8a12Smrg 7245126a8a12Smrg# Copyright (C) 2003, 2005 Free Software Foundation, Inc. 7246126a8a12Smrg# 7247126a8a12Smrg# This file is free software; the Free Software Foundation 7248126a8a12Smrg# gives unlimited permission to copy and/or distribute it, 7249126a8a12Smrg# with or without modifications, as long as this notice is preserved. 7250126a8a12Smrg 7251126a8a12Smrg# serial 2 7252126a8a12Smrg 7253126a8a12Smrg# Check whether the underlying file-system supports filenames 7254126a8a12Smrg# with a leading dot. For instance MS-DOS doesn't. 7255126a8a12SmrgAC_DEFUN([AM_SET_LEADING_DOT], 7256126a8a12Smrg[rm -rf .tst 2>/dev/null 7257126a8a12Smrgmkdir .tst 2>/dev/null 7258126a8a12Smrgif test -d .tst; then 7259126a8a12Smrg am__leading_dot=. 7260126a8a12Smrgelse 7261126a8a12Smrg am__leading_dot=_ 7262126a8a12Smrgfi 7263126a8a12Smrgrmdir .tst 2>/dev/null 7264126a8a12SmrgAC_SUBST([am__leading_dot])]) 7265126a8a12Smrg 7266126a8a12Smrg# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- 7267126a8a12Smrg# From Jim Meyering 7268126a8a12Smrg 7269126a8a12Smrg# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005 7270126a8a12Smrg# Free Software Foundation, Inc. 7271126a8a12Smrg# 7272126a8a12Smrg# This file is free software; the Free Software Foundation 7273126a8a12Smrg# gives unlimited permission to copy and/or distribute it, 7274126a8a12Smrg# with or without modifications, as long as this notice is preserved. 7275126a8a12Smrg 7276126a8a12Smrg# serial 4 7277126a8a12Smrg 7278126a8a12SmrgAC_DEFUN([AM_MAINTAINER_MODE], 7279126a8a12Smrg[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) 7280126a8a12Smrg dnl maintainer-mode is disabled by default 7281126a8a12Smrg AC_ARG_ENABLE(maintainer-mode, 7282126a8a12Smrg[ --enable-maintainer-mode enable make rules and dependencies not useful 7283126a8a12Smrg (and sometimes confusing) to the casual installer], 7284126a8a12Smrg USE_MAINTAINER_MODE=$enableval, 7285126a8a12Smrg USE_MAINTAINER_MODE=no) 7286126a8a12Smrg AC_MSG_RESULT([$USE_MAINTAINER_MODE]) 7287126a8a12Smrg AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes]) 7288126a8a12Smrg MAINT=$MAINTAINER_MODE_TRUE 7289126a8a12Smrg AC_SUBST(MAINT)dnl 7290126a8a12Smrg] 7291126a8a12Smrg) 7292126a8a12Smrg 7293126a8a12SmrgAU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) 7294126a8a12Smrg 7295126a8a12Smrg# Check to see how 'make' treats includes. -*- Autoconf -*- 7296126a8a12Smrg 7297126a8a12Smrg# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. 7298126a8a12Smrg# 7299126a8a12Smrg# This file is free software; the Free Software Foundation 7300126a8a12Smrg# gives unlimited permission to copy and/or distribute it, 7301126a8a12Smrg# with or without modifications, as long as this notice is preserved. 7302126a8a12Smrg 7303126a8a12Smrg# serial 3 7304126a8a12Smrg 7305126a8a12Smrg# AM_MAKE_INCLUDE() 7306126a8a12Smrg# ----------------- 7307126a8a12Smrg# Check to see how make treats includes. 7308126a8a12SmrgAC_DEFUN([AM_MAKE_INCLUDE], 7309126a8a12Smrg[am_make=${MAKE-make} 7310126a8a12Smrgcat > confinc << 'END' 7311126a8a12Smrgam__doit: 7312126a8a12Smrg @echo done 7313126a8a12Smrg.PHONY: am__doit 7314126a8a12SmrgEND 7315126a8a12Smrg# If we don't find an include directive, just comment out the code. 7316126a8a12SmrgAC_MSG_CHECKING([for style of include used by $am_make]) 7317126a8a12Smrgam__include="#" 7318126a8a12Smrgam__quote= 7319126a8a12Smrg_am_result=none 7320126a8a12Smrg# First try GNU make style include. 7321126a8a12Smrgecho "include confinc" > confmf 7322126a8a12Smrg# We grep out `Entering directory' and `Leaving directory' 7323126a8a12Smrg# messages which can occur if `w' ends up in MAKEFLAGS. 7324126a8a12Smrg# In particular we don't look at `^make:' because GNU make might 7325126a8a12Smrg# be invoked under some other name (usually "gmake"), in which 7326126a8a12Smrg# case it prints its new name instead of `make'. 7327126a8a12Smrgif test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then 7328126a8a12Smrg am__include=include 7329126a8a12Smrg am__quote= 7330126a8a12Smrg _am_result=GNU 7331126a8a12Smrgfi 7332126a8a12Smrg# Now try BSD make style include. 7333126a8a12Smrgif test "$am__include" = "#"; then 7334126a8a12Smrg echo '.include "confinc"' > confmf 7335126a8a12Smrg if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then 7336126a8a12Smrg am__include=.include 7337126a8a12Smrg am__quote="\"" 7338126a8a12Smrg _am_result=BSD 7339126a8a12Smrg fi 7340126a8a12Smrgfi 7341126a8a12SmrgAC_SUBST([am__include]) 7342126a8a12SmrgAC_SUBST([am__quote]) 7343126a8a12SmrgAC_MSG_RESULT([$_am_result]) 7344126a8a12Smrgrm -f confinc confmf 7345126a8a12Smrg]) 7346126a8a12Smrg 7347126a8a12Smrg# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 7348126a8a12Smrg 7349126a8a12Smrg# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005 7350126a8a12Smrg# Free Software Foundation, Inc. 7351126a8a12Smrg# 7352126a8a12Smrg# This file is free software; the Free Software Foundation 7353126a8a12Smrg# gives unlimited permission to copy and/or distribute it, 7354126a8a12Smrg# with or without modifications, as long as this notice is preserved. 7355126a8a12Smrg 7356126a8a12Smrg# serial 5 7357126a8a12Smrg 7358126a8a12Smrg# AM_MISSING_PROG(NAME, PROGRAM) 7359126a8a12Smrg# ------------------------------ 7360126a8a12SmrgAC_DEFUN([AM_MISSING_PROG], 7361126a8a12Smrg[AC_REQUIRE([AM_MISSING_HAS_RUN]) 7362126a8a12Smrg$1=${$1-"${am_missing_run}$2"} 7363126a8a12SmrgAC_SUBST($1)]) 7364126a8a12Smrg 7365126a8a12Smrg 7366126a8a12Smrg# AM_MISSING_HAS_RUN 7367126a8a12Smrg# ------------------ 7368126a8a12Smrg# Define MISSING if not defined so far and test if it supports --run. 7369126a8a12Smrg# If it does, set am_missing_run to use it, otherwise, to nothing. 7370126a8a12SmrgAC_DEFUN([AM_MISSING_HAS_RUN], 7371126a8a12Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 7372126a8a12SmrgAC_REQUIRE_AUX_FILE([missing])dnl 7373126a8a12Smrgtest x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" 7374126a8a12Smrg# Use eval to expand $SHELL 7375126a8a12Smrgif eval "$MISSING --run true"; then 7376126a8a12Smrg am_missing_run="$MISSING --run " 7377126a8a12Smrgelse 7378126a8a12Smrg am_missing_run= 7379126a8a12Smrg AC_MSG_WARN([`missing' script is too old or missing]) 7380126a8a12Smrgfi 7381126a8a12Smrg]) 7382126a8a12Smrg 7383126a8a12Smrg# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. 7384126a8a12Smrg# 7385126a8a12Smrg# This file is free software; the Free Software Foundation 7386126a8a12Smrg# gives unlimited permission to copy and/or distribute it, 7387126a8a12Smrg# with or without modifications, as long as this notice is preserved. 7388126a8a12Smrg 7389126a8a12Smrg# AM_PROG_MKDIR_P 7390126a8a12Smrg# --------------- 7391126a8a12Smrg# Check for `mkdir -p'. 7392126a8a12SmrgAC_DEFUN([AM_PROG_MKDIR_P], 7393126a8a12Smrg[AC_PREREQ([2.60])dnl 7394126a8a12SmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl 7395126a8a12Smrgdnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, 7396126a8a12Smrgdnl while keeping a definition of mkdir_p for backward compatibility. 7397126a8a12Smrgdnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. 7398126a8a12Smrgdnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of 7399126a8a12Smrgdnl Makefile.ins that do not define MKDIR_P, so we do our own 7400126a8a12Smrgdnl adjustment using top_builddir (which is defined more often than 7401126a8a12Smrgdnl MKDIR_P). 7402126a8a12SmrgAC_SUBST([mkdir_p], ["$MKDIR_P"])dnl 7403126a8a12Smrgcase $mkdir_p in 7404126a8a12Smrg [[\\/$]]* | ?:[[\\/]]*) ;; 7405126a8a12Smrg */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; 7406126a8a12Smrgesac 7407126a8a12Smrg]) 7408126a8a12Smrg 7409126a8a12Smrg# Helper functions for option handling. -*- Autoconf -*- 7410126a8a12Smrg 7411126a8a12Smrg# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. 7412126a8a12Smrg# 7413126a8a12Smrg# This file is free software; the Free Software Foundation 7414126a8a12Smrg# gives unlimited permission to copy and/or distribute it, 7415126a8a12Smrg# with or without modifications, as long as this notice is preserved. 7416126a8a12Smrg 7417126a8a12Smrg# serial 3 7418126a8a12Smrg 7419126a8a12Smrg# _AM_MANGLE_OPTION(NAME) 7420126a8a12Smrg# ----------------------- 7421126a8a12SmrgAC_DEFUN([_AM_MANGLE_OPTION], 7422126a8a12Smrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 7423126a8a12Smrg 7424126a8a12Smrg# _AM_SET_OPTION(NAME) 7425126a8a12Smrg# ------------------------------ 7426126a8a12Smrg# Set option NAME. Presently that only means defining a flag for this option. 7427126a8a12SmrgAC_DEFUN([_AM_SET_OPTION], 7428126a8a12Smrg[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) 7429126a8a12Smrg 7430126a8a12Smrg# _AM_SET_OPTIONS(OPTIONS) 7431126a8a12Smrg# ---------------------------------- 7432126a8a12Smrg# OPTIONS is a space-separated list of Automake options. 7433126a8a12SmrgAC_DEFUN([_AM_SET_OPTIONS], 7434126a8a12Smrg[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 7435126a8a12Smrg 7436126a8a12Smrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 7437126a8a12Smrg# ------------------------------------------- 7438126a8a12Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 7439126a8a12SmrgAC_DEFUN([_AM_IF_OPTION], 7440126a8a12Smrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 7441126a8a12Smrg 7442126a8a12Smrg# Check to make sure that the build environment is sane. -*- Autoconf -*- 7443126a8a12Smrg 7444126a8a12Smrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 7445126a8a12Smrg# Free Software Foundation, Inc. 7446126a8a12Smrg# 7447126a8a12Smrg# This file is free software; the Free Software Foundation 7448126a8a12Smrg# gives unlimited permission to copy and/or distribute it, 7449126a8a12Smrg# with or without modifications, as long as this notice is preserved. 7450126a8a12Smrg 7451126a8a12Smrg# serial 4 7452126a8a12Smrg 7453126a8a12Smrg# AM_SANITY_CHECK 7454126a8a12Smrg# --------------- 7455126a8a12SmrgAC_DEFUN([AM_SANITY_CHECK], 7456126a8a12Smrg[AC_MSG_CHECKING([whether build environment is sane]) 7457126a8a12Smrg# Just in case 7458126a8a12Smrgsleep 1 7459126a8a12Smrgecho timestamp > conftest.file 7460126a8a12Smrg# Do `set' in a subshell so we don't clobber the current shell's 7461126a8a12Smrg# arguments. Must try -L first in case configure is actually a 7462126a8a12Smrg# symlink; some systems play weird games with the mod time of symlinks 7463126a8a12Smrg# (eg FreeBSD returns the mod time of the symlink's containing 7464126a8a12Smrg# directory). 7465126a8a12Smrgif ( 7466126a8a12Smrg set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` 7467126a8a12Smrg if test "$[*]" = "X"; then 7468126a8a12Smrg # -L didn't work. 7469126a8a12Smrg set X `ls -t $srcdir/configure conftest.file` 7470126a8a12Smrg fi 7471126a8a12Smrg rm -f conftest.file 7472126a8a12Smrg if test "$[*]" != "X $srcdir/configure conftest.file" \ 7473126a8a12Smrg && test "$[*]" != "X conftest.file $srcdir/configure"; then 7474126a8a12Smrg 7475126a8a12Smrg # If neither matched, then we have a broken ls. This can happen 7476126a8a12Smrg # if, for instance, CONFIG_SHELL is bash and it inherits a 7477126a8a12Smrg # broken ls alias from the environment. This has actually 7478126a8a12Smrg # happened. Such a system could not be considered "sane". 7479126a8a12Smrg AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 7480126a8a12Smrgalias in your environment]) 7481126a8a12Smrg fi 7482126a8a12Smrg 7483126a8a12Smrg test "$[2]" = conftest.file 7484126a8a12Smrg ) 7485126a8a12Smrgthen 7486126a8a12Smrg # Ok. 7487126a8a12Smrg : 7488126a8a12Smrgelse 7489126a8a12Smrg AC_MSG_ERROR([newly created file is older than distributed files! 7490126a8a12SmrgCheck your system clock]) 7491126a8a12Smrgfi 7492126a8a12SmrgAC_MSG_RESULT(yes)]) 7493126a8a12Smrg 7494126a8a12Smrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 7495126a8a12Smrg# 7496126a8a12Smrg# This file is free software; the Free Software Foundation 7497126a8a12Smrg# gives unlimited permission to copy and/or distribute it, 7498126a8a12Smrg# with or without modifications, as long as this notice is preserved. 7499126a8a12Smrg 7500126a8a12Smrg# AM_PROG_INSTALL_STRIP 7501126a8a12Smrg# --------------------- 7502126a8a12Smrg# One issue with vendor `install' (even GNU) is that you can't 7503126a8a12Smrg# specify the program used to strip binaries. This is especially 7504126a8a12Smrg# annoying in cross-compiling environments, where the build's strip 7505126a8a12Smrg# is unlikely to handle the host's binaries. 7506126a8a12Smrg# Fortunately install-sh will honor a STRIPPROG variable, so we 7507126a8a12Smrg# always use install-sh in `make install-strip', and initialize 7508126a8a12Smrg# STRIPPROG with the value of the STRIP variable (set by the user). 7509126a8a12SmrgAC_DEFUN([AM_PROG_INSTALL_STRIP], 7510126a8a12Smrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 7511126a8a12Smrg# Installed binaries are usually stripped using `strip' when the user 7512126a8a12Smrg# run `make install-strip'. However `strip' might not be the right 7513126a8a12Smrg# tool to use in cross-compilation environments, therefore Automake 7514126a8a12Smrg# will honor the `STRIP' environment variable to overrule this program. 7515126a8a12Smrgdnl Don't test for $cross_compiling = yes, because it might be `maybe'. 7516126a8a12Smrgif test "$cross_compiling" != no; then 7517126a8a12Smrg AC_CHECK_TOOL([STRIP], [strip], :) 7518126a8a12Smrgfi 7519126a8a12SmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 7520126a8a12SmrgAC_SUBST([INSTALL_STRIP_PROGRAM])]) 7521126a8a12Smrg 7522126a8a12Smrg# Copyright (C) 2006 Free Software Foundation, Inc. 7523126a8a12Smrg# 7524126a8a12Smrg# This file is free software; the Free Software Foundation 7525126a8a12Smrg# gives unlimited permission to copy and/or distribute it, 7526126a8a12Smrg# with or without modifications, as long as this notice is preserved. 7527126a8a12Smrg 7528126a8a12Smrg# _AM_SUBST_NOTMAKE(VARIABLE) 7529126a8a12Smrg# --------------------------- 7530126a8a12Smrg# Prevent Automake from outputing VARIABLE = @VARIABLE@ in Makefile.in. 7531126a8a12Smrg# This macro is traced by Automake. 7532126a8a12SmrgAC_DEFUN([_AM_SUBST_NOTMAKE]) 7533126a8a12Smrg 7534126a8a12Smrg# Check how to create a tarball. -*- Autoconf -*- 7535126a8a12Smrg 7536126a8a12Smrg# Copyright (C) 2004, 2005 Free Software Foundation, Inc. 7537126a8a12Smrg# 7538126a8a12Smrg# This file is free software; the Free Software Foundation 7539126a8a12Smrg# gives unlimited permission to copy and/or distribute it, 7540126a8a12Smrg# with or without modifications, as long as this notice is preserved. 7541126a8a12Smrg 7542126a8a12Smrg# serial 2 7543126a8a12Smrg 7544126a8a12Smrg# _AM_PROG_TAR(FORMAT) 7545126a8a12Smrg# -------------------- 7546126a8a12Smrg# Check how to create a tarball in format FORMAT. 7547126a8a12Smrg# FORMAT should be one of `v7', `ustar', or `pax'. 7548126a8a12Smrg# 7549126a8a12Smrg# Substitute a variable $(am__tar) that is a command 7550126a8a12Smrg# writing to stdout a FORMAT-tarball containing the directory 7551126a8a12Smrg# $tardir. 7552126a8a12Smrg# tardir=directory && $(am__tar) > result.tar 7553126a8a12Smrg# 7554126a8a12Smrg# Substitute a variable $(am__untar) that extract such 7555126a8a12Smrg# a tarball read from stdin. 7556126a8a12Smrg# $(am__untar) < result.tar 7557126a8a12SmrgAC_DEFUN([_AM_PROG_TAR], 7558126a8a12Smrg[# Always define AMTAR for backward compatibility. 7559126a8a12SmrgAM_MISSING_PROG([AMTAR], [tar]) 7560126a8a12Smrgm4_if([$1], [v7], 7561126a8a12Smrg [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], 7562126a8a12Smrg [m4_case([$1], [ustar],, [pax],, 7563126a8a12Smrg [m4_fatal([Unknown tar format])]) 7564126a8a12SmrgAC_MSG_CHECKING([how to create a $1 tar archive]) 7565126a8a12Smrg# Loop over all known methods to create a tar archive until one works. 7566126a8a12Smrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 7567126a8a12Smrg_am_tools=${am_cv_prog_tar_$1-$_am_tools} 7568126a8a12Smrg# Do not fold the above two line into one, because Tru64 sh and 7569126a8a12Smrg# Solaris sh will not grok spaces in the rhs of `-'. 7570126a8a12Smrgfor _am_tool in $_am_tools 7571126a8a12Smrgdo 7572126a8a12Smrg case $_am_tool in 7573126a8a12Smrg gnutar) 7574126a8a12Smrg for _am_tar in tar gnutar gtar; 7575126a8a12Smrg do 7576126a8a12Smrg AM_RUN_LOG([$_am_tar --version]) && break 7577126a8a12Smrg done 7578126a8a12Smrg am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 7579126a8a12Smrg am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 7580126a8a12Smrg am__untar="$_am_tar -xf -" 7581126a8a12Smrg ;; 7582126a8a12Smrg plaintar) 7583126a8a12Smrg # Must skip GNU tar: if it does not support --format= it doesn't create 7584126a8a12Smrg # ustar tarball either. 7585126a8a12Smrg (tar --version) >/dev/null 2>&1 && continue 7586126a8a12Smrg am__tar='tar chf - "$$tardir"' 7587126a8a12Smrg am__tar_='tar chf - "$tardir"' 7588126a8a12Smrg am__untar='tar xf -' 7589126a8a12Smrg ;; 7590126a8a12Smrg pax) 7591126a8a12Smrg am__tar='pax -L -x $1 -w "$$tardir"' 7592126a8a12Smrg am__tar_='pax -L -x $1 -w "$tardir"' 7593126a8a12Smrg am__untar='pax -r' 7594126a8a12Smrg ;; 7595126a8a12Smrg cpio) 7596126a8a12Smrg am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 7597126a8a12Smrg am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 7598126a8a12Smrg am__untar='cpio -i -H $1 -d' 7599126a8a12Smrg ;; 7600126a8a12Smrg none) 7601126a8a12Smrg am__tar=false 7602126a8a12Smrg am__tar_=false 7603126a8a12Smrg am__untar=false 7604126a8a12Smrg ;; 7605126a8a12Smrg esac 7606126a8a12Smrg 7607126a8a12Smrg # If the value was cached, stop now. We just wanted to have am__tar 7608126a8a12Smrg # and am__untar set. 7609126a8a12Smrg test -n "${am_cv_prog_tar_$1}" && break 7610126a8a12Smrg 7611126a8a12Smrg # tar/untar a dummy directory, and stop if the command works 7612126a8a12Smrg rm -rf conftest.dir 7613126a8a12Smrg mkdir conftest.dir 7614126a8a12Smrg echo GrepMe > conftest.dir/file 7615126a8a12Smrg AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 7616126a8a12Smrg rm -rf conftest.dir 7617126a8a12Smrg if test -s conftest.tar; then 7618126a8a12Smrg AM_RUN_LOG([$am__untar <conftest.tar]) 7619126a8a12Smrg grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 7620126a8a12Smrg fi 7621126a8a12Smrgdone 7622126a8a12Smrgrm -rf conftest.dir 7623126a8a12Smrg 7624126a8a12SmrgAC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 7625126a8a12SmrgAC_MSG_RESULT([$am_cv_prog_tar_$1])]) 7626126a8a12SmrgAC_SUBST([am__tar]) 7627126a8a12SmrgAC_SUBST([am__untar]) 7628126a8a12Smrg]) # _AM_PROG_TAR 7629126a8a12Smrg 7630