aclocal.m4 revision 173143
1173143Srwatson# generated automatically by aclocal 1.10 -*- Autoconf -*- 2156283Srwatson 3156283Srwatson# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 4173143Srwatson# 2005, 2006 Free Software Foundation, Inc. 5156283Srwatson# This file is free software; the Free Software Foundation 6156283Srwatson# gives unlimited permission to copy and/or distribute it, 7156283Srwatson# with or without modifications, as long as this notice is preserved. 8156283Srwatson 9156283Srwatson# This program is distributed in the hope that it will be useful, 10156283Srwatson# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 11156283Srwatson# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 12156283Srwatson# PARTICULAR PURPOSE. 13156283Srwatson 14173143Srwatsonm4_if(m4_PACKAGE_VERSION, [2.61],, 15173143Srwatson[m4_fatal([this file was generated for autoconf 2.61. 16173143SrwatsonYou have another version of autoconf. If you want to use that, 17173143Srwatsonyou should regenerate the build system entirely.], [63])]) 18173143Srwatson 19156283Srwatson# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 20156283Srwatson 21173143Srwatson# serial 51 AC_PROG_LIBTOOL 22156283Srwatson 23156283Srwatson 24156283Srwatson# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED) 25156283Srwatson# ----------------------------------------------------------- 26156283Srwatson# If this macro is not defined by Autoconf, define it here. 27156283Srwatsonm4_ifdef([AC_PROVIDE_IFELSE], 28156283Srwatson [], 29156283Srwatson [m4_define([AC_PROVIDE_IFELSE], 30156283Srwatson [m4_ifdef([AC_PROVIDE_$1], 31156283Srwatson [$2], [$3])])]) 32156283Srwatson 33156283Srwatson 34156283Srwatson# AC_PROG_LIBTOOL 35156283Srwatson# --------------- 36156283SrwatsonAC_DEFUN([AC_PROG_LIBTOOL], 37156283Srwatson[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl 38156283Srwatsondnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX 39156283Srwatsondnl immediately, otherwise, hook it in at the end of AC_PROG_CXX. 40156283Srwatson AC_PROVIDE_IFELSE([AC_PROG_CXX], 41156283Srwatson [AC_LIBTOOL_CXX], 42156283Srwatson [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX 43156283Srwatson ])]) 44156283Srwatsondnl And a similar setup for Fortran 77 support 45156283Srwatson AC_PROVIDE_IFELSE([AC_PROG_F77], 46156283Srwatson [AC_LIBTOOL_F77], 47156283Srwatson [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77 48156283Srwatson])]) 49156283Srwatson 50156283Srwatsondnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly. 51156283Srwatsondnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run 52156283Srwatsondnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both. 53156283Srwatson AC_PROVIDE_IFELSE([AC_PROG_GCJ], 54156283Srwatson [AC_LIBTOOL_GCJ], 55156283Srwatson [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 56156283Srwatson [AC_LIBTOOL_GCJ], 57156283Srwatson [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ], 58156283Srwatson [AC_LIBTOOL_GCJ], 59156283Srwatson [ifdef([AC_PROG_GCJ], 60156283Srwatson [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])]) 61156283Srwatson ifdef([A][M_PROG_GCJ], 62156283Srwatson [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])]) 63156283Srwatson ifdef([LT_AC_PROG_GCJ], 64156283Srwatson [define([LT_AC_PROG_GCJ], 65156283Srwatson defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])]) 66156283Srwatson])])# AC_PROG_LIBTOOL 67156283Srwatson 68156283Srwatson 69156283Srwatson# _AC_PROG_LIBTOOL 70156283Srwatson# ---------------- 71156283SrwatsonAC_DEFUN([_AC_PROG_LIBTOOL], 72156283Srwatson[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl 73156283SrwatsonAC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl 74156283SrwatsonAC_BEFORE([$0],[AC_LIBTOOL_F77])dnl 75156283SrwatsonAC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl 76156283Srwatson 77156283Srwatson# This can be used to rebuild libtool when needed 78156283SrwatsonLIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" 79156283Srwatson 80156283Srwatson# Always use our own libtool. 81156283SrwatsonLIBTOOL='$(SHELL) $(top_builddir)/libtool' 82156283SrwatsonAC_SUBST(LIBTOOL)dnl 83156283Srwatson 84156283Srwatson# Prevent multiple expansion 85156283Srwatsondefine([AC_PROG_LIBTOOL], []) 86156283Srwatson])# _AC_PROG_LIBTOOL 87156283Srwatson 88156283Srwatson 89156283Srwatson# AC_LIBTOOL_SETUP 90156283Srwatson# ---------------- 91156283SrwatsonAC_DEFUN([AC_LIBTOOL_SETUP], 92156283Srwatson[AC_PREREQ(2.50)dnl 93156283SrwatsonAC_REQUIRE([AC_ENABLE_SHARED])dnl 94156283SrwatsonAC_REQUIRE([AC_ENABLE_STATIC])dnl 95156283SrwatsonAC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl 96156283SrwatsonAC_REQUIRE([AC_CANONICAL_HOST])dnl 97156283SrwatsonAC_REQUIRE([AC_CANONICAL_BUILD])dnl 98156283SrwatsonAC_REQUIRE([AC_PROG_CC])dnl 99156283SrwatsonAC_REQUIRE([AC_PROG_LD])dnl 100156283SrwatsonAC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl 101156283SrwatsonAC_REQUIRE([AC_PROG_NM])dnl 102156283Srwatson 103156283SrwatsonAC_REQUIRE([AC_PROG_LN_S])dnl 104156283SrwatsonAC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl 105156283Srwatson# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! 106156283SrwatsonAC_REQUIRE([AC_OBJEXT])dnl 107156283SrwatsonAC_REQUIRE([AC_EXEEXT])dnl 108156283Srwatsondnl 109156283Srwatson 110156283SrwatsonAC_LIBTOOL_SYS_MAX_CMD_LEN 111156283SrwatsonAC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE 112156283SrwatsonAC_LIBTOOL_OBJDIR 113156283Srwatson 114156283SrwatsonAC_REQUIRE([_LT_AC_SYS_COMPILER])dnl 115156283Srwatson_LT_AC_PROG_ECHO_BACKSLASH 116156283Srwatson 117156283Srwatsoncase $host_os in 118156283Srwatsonaix3*) 119156283Srwatson # AIX sometimes has problems with the GCC collect2 program. For some 120156283Srwatson # reason, if we set the COLLECT_NAMES environment variable, the problems 121156283Srwatson # vanish in a puff of smoke. 122156283Srwatson if test "X${COLLECT_NAMES+set}" != Xset; then 123156283Srwatson COLLECT_NAMES= 124156283Srwatson export COLLECT_NAMES 125156283Srwatson fi 126156283Srwatson ;; 127156283Srwatsonesac 128156283Srwatson 129156283Srwatson# Sed substitution that helps us do robust quoting. It backslashifies 130156283Srwatson# metacharacters that are still active within double-quoted strings. 131156283SrwatsonXsed='sed -e 1s/^X//' 132156283Srwatson[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'] 133156283Srwatson 134156283Srwatson# Same as above, but do not quote variable references. 135156283Srwatson[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'] 136156283Srwatson 137156283Srwatson# Sed substitution to delay expansion of an escaped shell variable in a 138156283Srwatson# double_quote_subst'ed string. 139156283Srwatsondelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 140156283Srwatson 141156283Srwatson# Sed substitution to avoid accidental globbing in evaled expressions 142156283Srwatsonno_glob_subst='s/\*/\\\*/g' 143156283Srwatson 144156283Srwatson# Constants: 145156283Srwatsonrm="rm -f" 146156283Srwatson 147156283Srwatson# Global variables: 148156283Srwatsondefault_ofile=libtool 149156283Srwatsoncan_build_shared=yes 150156283Srwatson 151156283Srwatson# All known linkers require a `.a' archive for static linking (except MSVC, 152156283Srwatson# which needs '.lib'). 153156283Srwatsonlibext=a 154156283Srwatsonltmain="$ac_aux_dir/ltmain.sh" 155156283Srwatsonofile="$default_ofile" 156156283Srwatsonwith_gnu_ld="$lt_cv_prog_gnu_ld" 157156283Srwatson 158156283SrwatsonAC_CHECK_TOOL(AR, ar, false) 159156283SrwatsonAC_CHECK_TOOL(RANLIB, ranlib, :) 160156283SrwatsonAC_CHECK_TOOL(STRIP, strip, :) 161156283Srwatson 162156283Srwatsonold_CC="$CC" 163156283Srwatsonold_CFLAGS="$CFLAGS" 164156283Srwatson 165156283Srwatson# Set sane defaults for various variables 166156283Srwatsontest -z "$AR" && AR=ar 167156283Srwatsontest -z "$AR_FLAGS" && AR_FLAGS=cru 168156283Srwatsontest -z "$AS" && AS=as 169156283Srwatsontest -z "$CC" && CC=cc 170156283Srwatsontest -z "$LTCC" && LTCC=$CC 171173143Srwatsontest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 172156283Srwatsontest -z "$DLLTOOL" && DLLTOOL=dlltool 173156283Srwatsontest -z "$LD" && LD=ld 174156283Srwatsontest -z "$LN_S" && LN_S="ln -s" 175156283Srwatsontest -z "$MAGIC_CMD" && MAGIC_CMD=file 176156283Srwatsontest -z "$NM" && NM=nm 177156283Srwatsontest -z "$SED" && SED=sed 178156283Srwatsontest -z "$OBJDUMP" && OBJDUMP=objdump 179156283Srwatsontest -z "$RANLIB" && RANLIB=: 180156283Srwatsontest -z "$STRIP" && STRIP=: 181156283Srwatsontest -z "$ac_objext" && ac_objext=o 182156283Srwatson 183156283Srwatson# Determine commands to create old-style static archives. 184173143Srwatsonold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 185156283Srwatsonold_postinstall_cmds='chmod 644 $oldlib' 186156283Srwatsonold_postuninstall_cmds= 187156283Srwatson 188156283Srwatsonif test -n "$RANLIB"; then 189156283Srwatson case $host_os in 190156283Srwatson openbsd*) 191173143Srwatson old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" 192156283Srwatson ;; 193156283Srwatson *) 194173143Srwatson old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" 195156283Srwatson ;; 196156283Srwatson esac 197156283Srwatson old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" 198156283Srwatsonfi 199156283Srwatson 200156283Srwatson_LT_CC_BASENAME([$compiler]) 201156283Srwatson 202156283Srwatson# Only perform the check for file, if the check method requires it 203156283Srwatsoncase $deplibs_check_method in 204156283Srwatsonfile_magic*) 205156283Srwatson if test "$file_magic_cmd" = '$MAGIC_CMD'; then 206156283Srwatson AC_PATH_MAGIC 207156283Srwatson fi 208156283Srwatson ;; 209156283Srwatsonesac 210156283Srwatson 211156283SrwatsonAC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no) 212156283SrwatsonAC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], 213156283Srwatsonenable_win32_dll=yes, enable_win32_dll=no) 214156283Srwatson 215156283SrwatsonAC_ARG_ENABLE([libtool-lock], 216156283Srwatson [AC_HELP_STRING([--disable-libtool-lock], 217156283Srwatson [avoid locking (might break parallel builds)])]) 218156283Srwatsontest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes 219156283Srwatson 220156283SrwatsonAC_ARG_WITH([pic], 221156283Srwatson [AC_HELP_STRING([--with-pic], 222156283Srwatson [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 223156283Srwatson [pic_mode="$withval"], 224156283Srwatson [pic_mode=default]) 225156283Srwatsontest -z "$pic_mode" && pic_mode=default 226156283Srwatson 227156283Srwatson# Use C for the default configuration in the libtool script 228156283Srwatsontagname= 229156283SrwatsonAC_LIBTOOL_LANG_C_CONFIG 230156283Srwatson_LT_AC_TAGCONFIG 231156283Srwatson])# AC_LIBTOOL_SETUP 232156283Srwatson 233156283Srwatson 234156283Srwatson# _LT_AC_SYS_COMPILER 235156283Srwatson# ------------------- 236156283SrwatsonAC_DEFUN([_LT_AC_SYS_COMPILER], 237156283Srwatson[AC_REQUIRE([AC_PROG_CC])dnl 238156283Srwatson 239156283Srwatson# If no C compiler was specified, use CC. 240156283SrwatsonLTCC=${LTCC-"$CC"} 241156283Srwatson 242173143Srwatson# If no C compiler flags were specified, use CFLAGS. 243173143SrwatsonLTCFLAGS=${LTCFLAGS-"$CFLAGS"} 244173143Srwatson 245156283Srwatson# Allow CC to be a program name with arguments. 246156283Srwatsoncompiler=$CC 247156283Srwatson])# _LT_AC_SYS_COMPILER 248156283Srwatson 249156283Srwatson 250156283Srwatson# _LT_CC_BASENAME(CC) 251156283Srwatson# ------------------- 252156283Srwatson# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 253156283SrwatsonAC_DEFUN([_LT_CC_BASENAME], 254156283Srwatson[for cc_temp in $1""; do 255156283Srwatson case $cc_temp in 256156283Srwatson compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 257156283Srwatson distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 258156283Srwatson \-*) ;; 259156283Srwatson *) break;; 260156283Srwatson esac 261156283Srwatsondone 262156283Srwatsoncc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` 263156283Srwatson]) 264156283Srwatson 265156283Srwatson 266156283Srwatson# _LT_COMPILER_BOILERPLATE 267156283Srwatson# ------------------------ 268156283Srwatson# Check for compiler boilerplate output or warnings with 269156283Srwatson# the simple compiler test code. 270156283SrwatsonAC_DEFUN([_LT_COMPILER_BOILERPLATE], 271173143Srwatson[AC_REQUIRE([LT_AC_PROG_SED])dnl 272173143Srwatsonac_outfile=conftest.$ac_objext 273173143Srwatsonecho "$lt_simple_compile_test_code" >conftest.$ac_ext 274173143Srwatsoneval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 275156283Srwatson_lt_compiler_boilerplate=`cat conftest.err` 276156283Srwatson$rm conftest* 277156283Srwatson])# _LT_COMPILER_BOILERPLATE 278156283Srwatson 279156283Srwatson 280156283Srwatson# _LT_LINKER_BOILERPLATE 281156283Srwatson# ---------------------- 282156283Srwatson# Check for linker boilerplate output or warnings with 283156283Srwatson# the simple link test code. 284156283SrwatsonAC_DEFUN([_LT_LINKER_BOILERPLATE], 285173143Srwatson[AC_REQUIRE([LT_AC_PROG_SED])dnl 286173143Srwatsonac_outfile=conftest.$ac_objext 287173143Srwatsonecho "$lt_simple_link_test_code" >conftest.$ac_ext 288173143Srwatsoneval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 289156283Srwatson_lt_linker_boilerplate=`cat conftest.err` 290156283Srwatson$rm conftest* 291156283Srwatson])# _LT_LINKER_BOILERPLATE 292156283Srwatson 293156283Srwatson 294156283Srwatson# _LT_AC_SYS_LIBPATH_AIX 295156283Srwatson# ---------------------- 296156283Srwatson# Links a minimal program and checks the executable 297156283Srwatson# for the system default hardcoded library path. In most cases, 298156283Srwatson# this is /usr/lib:/lib, but when the MPI compilers are used 299156283Srwatson# the location of the communication and MPI libs are included too. 300156283Srwatson# If we don't find anything, use the default library path according 301156283Srwatson# to the aix ld manual. 302156283SrwatsonAC_DEFUN([_LT_AC_SYS_LIBPATH_AIX], 303173143Srwatson[AC_REQUIRE([LT_AC_PROG_SED])dnl 304173143SrwatsonAC_LINK_IFELSE(AC_LANG_PROGRAM,[ 305173143Srwatsonlt_aix_libpath_sed=' 306173143Srwatson /Import File Strings/,/^$/ { 307173143Srwatson /^0/ { 308173143Srwatson s/^0 *\(.*\)$/\1/ 309173143Srwatson p 310173143Srwatson } 311173143Srwatson }' 312173143Srwatsonaix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 313156283Srwatson# Check for a 64-bit object if we didn't find anything. 314173143Srwatsonif test -z "$aix_libpath"; then 315173143Srwatson aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 316173143Srwatsonfi],[]) 317156283Srwatsonif test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi 318156283Srwatson])# _LT_AC_SYS_LIBPATH_AIX 319156283Srwatson 320156283Srwatson 321156283Srwatson# _LT_AC_SHELL_INIT(ARG) 322156283Srwatson# ---------------------- 323156283SrwatsonAC_DEFUN([_LT_AC_SHELL_INIT], 324156283Srwatson[ifdef([AC_DIVERSION_NOTICE], 325156283Srwatson [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], 326156283Srwatson [AC_DIVERT_PUSH(NOTICE)]) 327156283Srwatson$1 328156283SrwatsonAC_DIVERT_POP 329156283Srwatson])# _LT_AC_SHELL_INIT 330156283Srwatson 331156283Srwatson 332156283Srwatson# _LT_AC_PROG_ECHO_BACKSLASH 333156283Srwatson# -------------------------- 334156283Srwatson# Add some code to the start of the generated configure script which 335156283Srwatson# will find an echo command which doesn't interpret backslashes. 336156283SrwatsonAC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH], 337156283Srwatson[_LT_AC_SHELL_INIT([ 338156283Srwatson# Check that we are running under the correct shell. 339156283SrwatsonSHELL=${CONFIG_SHELL-/bin/sh} 340156283Srwatson 341156283Srwatsoncase X$ECHO in 342156283SrwatsonX*--fallback-echo) 343156283Srwatson # Remove one level of quotation (which was required for Make). 344156283Srwatson ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` 345156283Srwatson ;; 346156283Srwatsonesac 347156283Srwatson 348156283Srwatsonecho=${ECHO-echo} 349156283Srwatsonif test "X[$]1" = X--no-reexec; then 350156283Srwatson # Discard the --no-reexec flag, and continue. 351156283Srwatson shift 352156283Srwatsonelif test "X[$]1" = X--fallback-echo; then 353156283Srwatson # Avoid inline document here, it may be left over 354156283Srwatson : 355156283Srwatsonelif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then 356156283Srwatson # Yippee, $echo works! 357156283Srwatson : 358156283Srwatsonelse 359156283Srwatson # Restart under the correct shell. 360156283Srwatson exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} 361156283Srwatsonfi 362156283Srwatson 363156283Srwatsonif test "X[$]1" = X--fallback-echo; then 364156283Srwatson # used as fallback echo 365156283Srwatson shift 366156283Srwatson cat <<EOF 367156283Srwatson[$]* 368156283SrwatsonEOF 369156283Srwatson exit 0 370156283Srwatsonfi 371156283Srwatson 372156283Srwatson# The HP-UX ksh and POSIX shell print the target directory to stdout 373156283Srwatson# if CDPATH is set. 374156283Srwatson(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 375156283Srwatson 376156283Srwatsonif test -z "$ECHO"; then 377156283Srwatsonif test "X${echo_test_string+set}" != Xset; then 378156283Srwatson# find a string as large as possible, as long as the shell can cope with it 379156283Srwatson for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do 380156283Srwatson # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... 381156283Srwatson if (echo_test_string=`eval $cmd`) 2>/dev/null && 382156283Srwatson echo_test_string=`eval $cmd` && 383156283Srwatson (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null 384156283Srwatson then 385156283Srwatson break 386156283Srwatson fi 387156283Srwatson done 388156283Srwatsonfi 389156283Srwatson 390156283Srwatsonif test "X`($echo '\t') 2>/dev/null`" = 'X\t' && 391156283Srwatson echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && 392156283Srwatson test "X$echo_testing_string" = "X$echo_test_string"; then 393156283Srwatson : 394156283Srwatsonelse 395156283Srwatson # The Solaris, AIX, and Digital Unix default echo programs unquote 396156283Srwatson # backslashes. This makes it impossible to quote backslashes using 397156283Srwatson # echo "$something" | sed 's/\\/\\\\/g' 398156283Srwatson # 399156283Srwatson # So, first we look for a working echo in the user's PATH. 400156283Srwatson 401156283Srwatson lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 402156283Srwatson for dir in $PATH /usr/ucb; do 403156283Srwatson IFS="$lt_save_ifs" 404156283Srwatson if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && 405156283Srwatson test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && 406156283Srwatson echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && 407156283Srwatson test "X$echo_testing_string" = "X$echo_test_string"; then 408156283Srwatson echo="$dir/echo" 409156283Srwatson break 410156283Srwatson fi 411156283Srwatson done 412156283Srwatson IFS="$lt_save_ifs" 413156283Srwatson 414156283Srwatson if test "X$echo" = Xecho; then 415156283Srwatson # We didn't find a better echo, so look for alternatives. 416156283Srwatson if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && 417156283Srwatson echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && 418156283Srwatson test "X$echo_testing_string" = "X$echo_test_string"; then 419156283Srwatson # This shell has a builtin print -r that does the trick. 420156283Srwatson echo='print -r' 421156283Srwatson elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && 422156283Srwatson test "X$CONFIG_SHELL" != X/bin/ksh; then 423156283Srwatson # If we have ksh, try running configure again with it. 424156283Srwatson ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} 425156283Srwatson export ORIGINAL_CONFIG_SHELL 426156283Srwatson CONFIG_SHELL=/bin/ksh 427156283Srwatson export CONFIG_SHELL 428156283Srwatson exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} 429156283Srwatson else 430156283Srwatson # Try using printf. 431156283Srwatson echo='printf %s\n' 432156283Srwatson if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && 433156283Srwatson echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && 434156283Srwatson test "X$echo_testing_string" = "X$echo_test_string"; then 435156283Srwatson # Cool, printf works 436156283Srwatson : 437156283Srwatson elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && 438156283Srwatson test "X$echo_testing_string" = 'X\t' && 439156283Srwatson echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && 440156283Srwatson test "X$echo_testing_string" = "X$echo_test_string"; then 441156283Srwatson CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL 442156283Srwatson export CONFIG_SHELL 443156283Srwatson SHELL="$CONFIG_SHELL" 444156283Srwatson export SHELL 445156283Srwatson echo="$CONFIG_SHELL [$]0 --fallback-echo" 446156283Srwatson elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && 447156283Srwatson test "X$echo_testing_string" = 'X\t' && 448156283Srwatson echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && 449156283Srwatson test "X$echo_testing_string" = "X$echo_test_string"; then 450156283Srwatson echo="$CONFIG_SHELL [$]0 --fallback-echo" 451156283Srwatson else 452156283Srwatson # maybe with a smaller string... 453156283Srwatson prev=: 454156283Srwatson 455156283Srwatson for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do 456156283Srwatson if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null 457156283Srwatson then 458156283Srwatson break 459156283Srwatson fi 460156283Srwatson prev="$cmd" 461156283Srwatson done 462156283Srwatson 463156283Srwatson if test "$prev" != 'sed 50q "[$]0"'; then 464156283Srwatson echo_test_string=`eval $prev` 465156283Srwatson export echo_test_string 466156283Srwatson exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} 467156283Srwatson else 468156283Srwatson # Oops. We lost completely, so just stick with echo. 469156283Srwatson echo=echo 470156283Srwatson fi 471156283Srwatson fi 472156283Srwatson fi 473156283Srwatson fi 474156283Srwatsonfi 475156283Srwatsonfi 476156283Srwatson 477156283Srwatson# Copy echo and quote the copy suitably for passing to libtool from 478156283Srwatson# the Makefile, instead of quoting the original, which is used later. 479156283SrwatsonECHO=$echo 480156283Srwatsonif test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then 481156283Srwatson ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" 482156283Srwatsonfi 483156283Srwatson 484156283SrwatsonAC_SUBST(ECHO) 485156283Srwatson])])# _LT_AC_PROG_ECHO_BACKSLASH 486156283Srwatson 487156283Srwatson 488156283Srwatson# _LT_AC_LOCK 489156283Srwatson# ----------- 490156283SrwatsonAC_DEFUN([_LT_AC_LOCK], 491156283Srwatson[AC_ARG_ENABLE([libtool-lock], 492156283Srwatson [AC_HELP_STRING([--disable-libtool-lock], 493156283Srwatson [avoid locking (might break parallel builds)])]) 494156283Srwatsontest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes 495156283Srwatson 496156283Srwatson# Some flags need to be propagated to the compiler or linker for good 497156283Srwatson# libtool support. 498156283Srwatsoncase $host in 499156283Srwatsonia64-*-hpux*) 500156283Srwatson # Find out which ABI we are using. 501156283Srwatson echo 'int i;' > conftest.$ac_ext 502156283Srwatson if AC_TRY_EVAL(ac_compile); then 503156283Srwatson case `/usr/bin/file conftest.$ac_objext` in 504156283Srwatson *ELF-32*) 505156283Srwatson HPUX_IA64_MODE="32" 506156283Srwatson ;; 507156283Srwatson *ELF-64*) 508156283Srwatson HPUX_IA64_MODE="64" 509156283Srwatson ;; 510156283Srwatson esac 511156283Srwatson fi 512156283Srwatson rm -rf conftest* 513156283Srwatson ;; 514156283Srwatson*-*-irix6*) 515156283Srwatson # Find out which ABI we are using. 516156283Srwatson echo '[#]line __oline__ "configure"' > conftest.$ac_ext 517156283Srwatson if AC_TRY_EVAL(ac_compile); then 518156283Srwatson if test "$lt_cv_prog_gnu_ld" = yes; then 519156283Srwatson case `/usr/bin/file conftest.$ac_objext` in 520156283Srwatson *32-bit*) 521156283Srwatson LD="${LD-ld} -melf32bsmip" 522156283Srwatson ;; 523156283Srwatson *N32*) 524156283Srwatson LD="${LD-ld} -melf32bmipn32" 525156283Srwatson ;; 526156283Srwatson *64-bit*) 527156283Srwatson LD="${LD-ld} -melf64bmip" 528156283Srwatson ;; 529156283Srwatson esac 530156283Srwatson else 531156283Srwatson case `/usr/bin/file conftest.$ac_objext` in 532156283Srwatson *32-bit*) 533156283Srwatson LD="${LD-ld} -32" 534156283Srwatson ;; 535156283Srwatson *N32*) 536156283Srwatson LD="${LD-ld} -n32" 537156283Srwatson ;; 538156283Srwatson *64-bit*) 539156283Srwatson LD="${LD-ld} -64" 540156283Srwatson ;; 541156283Srwatson esac 542156283Srwatson fi 543156283Srwatson fi 544156283Srwatson rm -rf conftest* 545156283Srwatson ;; 546156283Srwatson 547173143Srwatsonx86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ 548173143Srwatsons390*-*linux*|sparc*-*linux*) 549156283Srwatson # Find out which ABI we are using. 550156283Srwatson echo 'int i;' > conftest.$ac_ext 551156283Srwatson if AC_TRY_EVAL(ac_compile); then 552156283Srwatson case `/usr/bin/file conftest.o` in 553156283Srwatson *32-bit*) 554156283Srwatson case $host in 555173143Srwatson x86_64-*kfreebsd*-gnu) 556173143Srwatson LD="${LD-ld} -m elf_i386_fbsd" 557173143Srwatson ;; 558156283Srwatson x86_64-*linux*) 559156283Srwatson LD="${LD-ld} -m elf_i386" 560156283Srwatson ;; 561156283Srwatson ppc64-*linux*|powerpc64-*linux*) 562156283Srwatson LD="${LD-ld} -m elf32ppclinux" 563156283Srwatson ;; 564156283Srwatson s390x-*linux*) 565156283Srwatson LD="${LD-ld} -m elf_s390" 566156283Srwatson ;; 567156283Srwatson sparc64-*linux*) 568156283Srwatson LD="${LD-ld} -m elf32_sparc" 569156283Srwatson ;; 570156283Srwatson esac 571156283Srwatson ;; 572156283Srwatson *64-bit*) 573156283Srwatson case $host in 574173143Srwatson x86_64-*kfreebsd*-gnu) 575173143Srwatson LD="${LD-ld} -m elf_x86_64_fbsd" 576173143Srwatson ;; 577156283Srwatson x86_64-*linux*) 578156283Srwatson LD="${LD-ld} -m elf_x86_64" 579156283Srwatson ;; 580156283Srwatson ppc*-*linux*|powerpc*-*linux*) 581156283Srwatson LD="${LD-ld} -m elf64ppc" 582156283Srwatson ;; 583156283Srwatson s390*-*linux*) 584156283Srwatson LD="${LD-ld} -m elf64_s390" 585156283Srwatson ;; 586156283Srwatson sparc*-*linux*) 587156283Srwatson LD="${LD-ld} -m elf64_sparc" 588156283Srwatson ;; 589156283Srwatson esac 590156283Srwatson ;; 591156283Srwatson esac 592156283Srwatson fi 593156283Srwatson rm -rf conftest* 594156283Srwatson ;; 595156283Srwatson 596156283Srwatson*-*-sco3.2v5*) 597156283Srwatson # On SCO OpenServer 5, we need -belf to get full-featured binaries. 598156283Srwatson SAVE_CFLAGS="$CFLAGS" 599156283Srwatson CFLAGS="$CFLAGS -belf" 600156283Srwatson AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 601156283Srwatson [AC_LANG_PUSH(C) 602156283Srwatson AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 603156283Srwatson AC_LANG_POP]) 604156283Srwatson if test x"$lt_cv_cc_needs_belf" != x"yes"; then 605156283Srwatson # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 606156283Srwatson CFLAGS="$SAVE_CFLAGS" 607156283Srwatson fi 608156283Srwatson ;; 609173143Srwatsonsparc*-*solaris*) 610173143Srwatson # Find out which ABI we are using. 611173143Srwatson echo 'int i;' > conftest.$ac_ext 612173143Srwatson if AC_TRY_EVAL(ac_compile); then 613173143Srwatson case `/usr/bin/file conftest.o` in 614173143Srwatson *64-bit*) 615173143Srwatson case $lt_cv_prog_gnu_ld in 616173143Srwatson yes*) LD="${LD-ld} -m elf64_sparc" ;; 617173143Srwatson *) LD="${LD-ld} -64" ;; 618173143Srwatson esac 619173143Srwatson ;; 620173143Srwatson esac 621173143Srwatson fi 622173143Srwatson rm -rf conftest* 623173143Srwatson ;; 624173143Srwatson 625156283SrwatsonAC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], 626156283Srwatson[*-*-cygwin* | *-*-mingw* | *-*-pw32*) 627156283Srwatson AC_CHECK_TOOL(DLLTOOL, dlltool, false) 628156283Srwatson AC_CHECK_TOOL(AS, as, false) 629156283Srwatson AC_CHECK_TOOL(OBJDUMP, objdump, false) 630156283Srwatson ;; 631156283Srwatson ]) 632156283Srwatsonesac 633156283Srwatson 634156283Srwatsonneed_locks="$enable_libtool_lock" 635156283Srwatson 636156283Srwatson])# _LT_AC_LOCK 637156283Srwatson 638156283Srwatson 639156283Srwatson# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 640156283Srwatson# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 641156283Srwatson# ---------------------------------------------------------------- 642156283Srwatson# Check whether the given compiler option works 643156283SrwatsonAC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], 644156283Srwatson[AC_REQUIRE([LT_AC_PROG_SED]) 645156283SrwatsonAC_CACHE_CHECK([$1], [$2], 646156283Srwatson [$2=no 647156283Srwatson ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 648173143Srwatson echo "$lt_simple_compile_test_code" > conftest.$ac_ext 649156283Srwatson lt_compiler_flag="$3" 650156283Srwatson # Insert the option either (1) after the last *FLAGS variable, or 651156283Srwatson # (2) before a word containing "conftest.", or (3) at the end. 652156283Srwatson # Note that $ac_compile itself does not contain backslashes and begins 653156283Srwatson # with a dollar sign (not a hyphen), so the echo should work correctly. 654156283Srwatson # The option is referenced via a variable to avoid confusing sed. 655156283Srwatson lt_compile=`echo "$ac_compile" | $SED \ 656156283Srwatson -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 657156283Srwatson -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 658156283Srwatson -e 's:$: $lt_compiler_flag:'` 659156283Srwatson (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 660156283Srwatson (eval "$lt_compile" 2>conftest.err) 661156283Srwatson ac_status=$? 662156283Srwatson cat conftest.err >&AS_MESSAGE_LOG_FD 663156283Srwatson echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 664156283Srwatson if (exit $ac_status) && test -s "$ac_outfile"; then 665156283Srwatson # The compiler can only warn and ignore the option if not recognized 666156283Srwatson # So say no if there are warnings other than the usual output. 667173143Srwatson $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp 668173143Srwatson $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 669173143Srwatson if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 670156283Srwatson $2=yes 671156283Srwatson fi 672156283Srwatson fi 673156283Srwatson $rm conftest* 674156283Srwatson]) 675156283Srwatson 676156283Srwatsonif test x"[$]$2" = xyes; then 677156283Srwatson ifelse([$5], , :, [$5]) 678156283Srwatsonelse 679156283Srwatson ifelse([$6], , :, [$6]) 680156283Srwatsonfi 681156283Srwatson])# AC_LIBTOOL_COMPILER_OPTION 682156283Srwatson 683156283Srwatson 684156283Srwatson# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 685156283Srwatson# [ACTION-SUCCESS], [ACTION-FAILURE]) 686156283Srwatson# ------------------------------------------------------------ 687156283Srwatson# Check whether the given compiler option works 688156283SrwatsonAC_DEFUN([AC_LIBTOOL_LINKER_OPTION], 689173143Srwatson[AC_REQUIRE([LT_AC_PROG_SED])dnl 690173143SrwatsonAC_CACHE_CHECK([$1], [$2], 691156283Srwatson [$2=no 692156283Srwatson save_LDFLAGS="$LDFLAGS" 693156283Srwatson LDFLAGS="$LDFLAGS $3" 694173143Srwatson echo "$lt_simple_link_test_code" > conftest.$ac_ext 695156283Srwatson if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 696156283Srwatson # The linker can only warn and ignore the option if not recognized 697156283Srwatson # So say no if there are warnings 698156283Srwatson if test -s conftest.err; then 699156283Srwatson # Append any errors to the config.log. 700156283Srwatson cat conftest.err 1>&AS_MESSAGE_LOG_FD 701173143Srwatson $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp 702173143Srwatson $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 703156283Srwatson if diff conftest.exp conftest.er2 >/dev/null; then 704156283Srwatson $2=yes 705156283Srwatson fi 706156283Srwatson else 707156283Srwatson $2=yes 708156283Srwatson fi 709156283Srwatson fi 710156283Srwatson $rm conftest* 711156283Srwatson LDFLAGS="$save_LDFLAGS" 712156283Srwatson]) 713156283Srwatson 714156283Srwatsonif test x"[$]$2" = xyes; then 715156283Srwatson ifelse([$4], , :, [$4]) 716156283Srwatsonelse 717156283Srwatson ifelse([$5], , :, [$5]) 718156283Srwatsonfi 719156283Srwatson])# AC_LIBTOOL_LINKER_OPTION 720156283Srwatson 721156283Srwatson 722156283Srwatson# AC_LIBTOOL_SYS_MAX_CMD_LEN 723156283Srwatson# -------------------------- 724156283SrwatsonAC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], 725156283Srwatson[# find the maximum length of command line arguments 726156283SrwatsonAC_MSG_CHECKING([the maximum length of command line arguments]) 727156283SrwatsonAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 728156283Srwatson i=0 729156283Srwatson teststring="ABCD" 730156283Srwatson 731156283Srwatson case $build_os in 732156283Srwatson msdosdjgpp*) 733156283Srwatson # On DJGPP, this test can blow up pretty badly due to problems in libc 734156283Srwatson # (any single argument exceeding 2000 bytes causes a buffer overrun 735156283Srwatson # during glob expansion). Even if it were fixed, the result of this 736156283Srwatson # check would be larger than it should be. 737156283Srwatson lt_cv_sys_max_cmd_len=12288; # 12K is about right 738156283Srwatson ;; 739156283Srwatson 740156283Srwatson gnu*) 741156283Srwatson # Under GNU Hurd, this test is not required because there is 742156283Srwatson # no limit to the length of command line arguments. 743156283Srwatson # Libtool will interpret -1 as no limit whatsoever 744156283Srwatson lt_cv_sys_max_cmd_len=-1; 745156283Srwatson ;; 746156283Srwatson 747156283Srwatson cygwin* | mingw*) 748156283Srwatson # On Win9x/ME, this test blows up -- it succeeds, but takes 749156283Srwatson # about 5 minutes as the teststring grows exponentially. 750156283Srwatson # Worse, since 9x/ME are not pre-emptively multitasking, 751156283Srwatson # you end up with a "frozen" computer, even though with patience 752156283Srwatson # the test eventually succeeds (with a max line length of 256k). 753156283Srwatson # Instead, let's just punt: use the minimum linelength reported by 754156283Srwatson # all of the supported platforms: 8192 (on NT/2K/XP). 755156283Srwatson lt_cv_sys_max_cmd_len=8192; 756156283Srwatson ;; 757156283Srwatson 758156283Srwatson amigaos*) 759156283Srwatson # On AmigaOS with pdksh, this test takes hours, literally. 760156283Srwatson # So we just punt and use a minimum line length of 8192. 761156283Srwatson lt_cv_sys_max_cmd_len=8192; 762156283Srwatson ;; 763156283Srwatson 764156283Srwatson netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) 765156283Srwatson # This has been around since 386BSD, at least. Likely further. 766156283Srwatson if test -x /sbin/sysctl; then 767156283Srwatson lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 768156283Srwatson elif test -x /usr/sbin/sysctl; then 769156283Srwatson lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 770156283Srwatson else 771156283Srwatson lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 772156283Srwatson fi 773156283Srwatson # And add a safety zone 774156283Srwatson lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 775156283Srwatson lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 776156283Srwatson ;; 777173143Srwatson 778173143Srwatson interix*) 779173143Srwatson # We know the value 262144 and hardcode it with a safety zone (like BSD) 780173143Srwatson lt_cv_sys_max_cmd_len=196608 781173143Srwatson ;; 782173143Srwatson 783156283Srwatson osf*) 784156283Srwatson # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 785156283Srwatson # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 786156283Srwatson # nice to cause kernel panics so lets avoid the loop below. 787156283Srwatson # First set a reasonable default. 788156283Srwatson lt_cv_sys_max_cmd_len=16384 789156283Srwatson # 790156283Srwatson if test -x /sbin/sysconfig; then 791156283Srwatson case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 792156283Srwatson *1*) lt_cv_sys_max_cmd_len=-1 ;; 793156283Srwatson esac 794156283Srwatson fi 795156283Srwatson ;; 796173143Srwatson sco3.2v5*) 797173143Srwatson lt_cv_sys_max_cmd_len=102400 798173143Srwatson ;; 799173143Srwatson sysv5* | sco5v6* | sysv4.2uw2*) 800173143Srwatson kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 801173143Srwatson if test -n "$kargmax"; then 802173143Srwatson lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` 803173143Srwatson else 804173143Srwatson lt_cv_sys_max_cmd_len=32768 805173143Srwatson fi 806173143Srwatson ;; 807156283Srwatson *) 808173143Srwatson lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 809173143Srwatson if test -n "$lt_cv_sys_max_cmd_len"; then 810173143Srwatson lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 811173143Srwatson lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 812173143Srwatson else 813173143Srwatson SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 814173143Srwatson while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \ 815156283Srwatson = "XX$teststring") >/dev/null 2>&1 && 816173143Srwatson new_result=`expr "X$teststring" : ".*" 2>&1` && 817173143Srwatson lt_cv_sys_max_cmd_len=$new_result && 818173143Srwatson test $i != 17 # 1/2 MB should be enough 819173143Srwatson do 820173143Srwatson i=`expr $i + 1` 821173143Srwatson teststring=$teststring$teststring 822173143Srwatson done 823173143Srwatson teststring= 824173143Srwatson # Add a significant safety factor because C++ compilers can tack on massive 825173143Srwatson # amounts of additional arguments before passing them to the linker. 826173143Srwatson # It appears as though 1/2 is a usable value. 827173143Srwatson lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 828173143Srwatson fi 829156283Srwatson ;; 830156283Srwatson esac 831156283Srwatson]) 832156283Srwatsonif test -n $lt_cv_sys_max_cmd_len ; then 833156283Srwatson AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 834156283Srwatsonelse 835156283Srwatson AC_MSG_RESULT(none) 836156283Srwatsonfi 837156283Srwatson])# AC_LIBTOOL_SYS_MAX_CMD_LEN 838156283Srwatson 839156283Srwatson 840156283Srwatson# _LT_AC_CHECK_DLFCN 841173143Srwatson# ------------------ 842156283SrwatsonAC_DEFUN([_LT_AC_CHECK_DLFCN], 843156283Srwatson[AC_CHECK_HEADERS(dlfcn.h)dnl 844156283Srwatson])# _LT_AC_CHECK_DLFCN 845156283Srwatson 846156283Srwatson 847156283Srwatson# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 848156283Srwatson# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 849173143Srwatson# --------------------------------------------------------------------- 850156283SrwatsonAC_DEFUN([_LT_AC_TRY_DLOPEN_SELF], 851156283Srwatson[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl 852156283Srwatsonif test "$cross_compiling" = yes; then : 853156283Srwatson [$4] 854156283Srwatsonelse 855156283Srwatson lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 856156283Srwatson lt_status=$lt_dlunknown 857156283Srwatson cat > conftest.$ac_ext <<EOF 858156283Srwatson[#line __oline__ "configure" 859156283Srwatson#include "confdefs.h" 860156283Srwatson 861156283Srwatson#if HAVE_DLFCN_H 862156283Srwatson#include <dlfcn.h> 863156283Srwatson#endif 864156283Srwatson 865156283Srwatson#include <stdio.h> 866156283Srwatson 867156283Srwatson#ifdef RTLD_GLOBAL 868156283Srwatson# define LT_DLGLOBAL RTLD_GLOBAL 869156283Srwatson#else 870156283Srwatson# ifdef DL_GLOBAL 871156283Srwatson# define LT_DLGLOBAL DL_GLOBAL 872156283Srwatson# else 873156283Srwatson# define LT_DLGLOBAL 0 874156283Srwatson# endif 875156283Srwatson#endif 876156283Srwatson 877156283Srwatson/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 878156283Srwatson find out it does not work in some platform. */ 879156283Srwatson#ifndef LT_DLLAZY_OR_NOW 880156283Srwatson# ifdef RTLD_LAZY 881156283Srwatson# define LT_DLLAZY_OR_NOW RTLD_LAZY 882156283Srwatson# else 883156283Srwatson# ifdef DL_LAZY 884156283Srwatson# define LT_DLLAZY_OR_NOW DL_LAZY 885156283Srwatson# else 886156283Srwatson# ifdef RTLD_NOW 887156283Srwatson# define LT_DLLAZY_OR_NOW RTLD_NOW 888156283Srwatson# else 889156283Srwatson# ifdef DL_NOW 890156283Srwatson# define LT_DLLAZY_OR_NOW DL_NOW 891156283Srwatson# else 892156283Srwatson# define LT_DLLAZY_OR_NOW 0 893156283Srwatson# endif 894156283Srwatson# endif 895156283Srwatson# endif 896156283Srwatson# endif 897156283Srwatson#endif 898156283Srwatson 899156283Srwatson#ifdef __cplusplus 900156283Srwatsonextern "C" void exit (int); 901156283Srwatson#endif 902156283Srwatson 903156283Srwatsonvoid fnord() { int i=42;} 904156283Srwatsonint main () 905156283Srwatson{ 906156283Srwatson void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 907156283Srwatson int status = $lt_dlunknown; 908156283Srwatson 909156283Srwatson if (self) 910156283Srwatson { 911156283Srwatson if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 912156283Srwatson else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 913156283Srwatson /* dlclose (self); */ 914156283Srwatson } 915173143Srwatson else 916173143Srwatson puts (dlerror ()); 917156283Srwatson 918156283Srwatson exit (status); 919156283Srwatson}] 920156283SrwatsonEOF 921156283Srwatson if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then 922156283Srwatson (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 923156283Srwatson lt_status=$? 924156283Srwatson case x$lt_status in 925156283Srwatson x$lt_dlno_uscore) $1 ;; 926156283Srwatson x$lt_dlneed_uscore) $2 ;; 927173143Srwatson x$lt_dlunknown|x*) $3 ;; 928156283Srwatson esac 929156283Srwatson else : 930156283Srwatson # compilation failed 931156283Srwatson $3 932156283Srwatson fi 933156283Srwatsonfi 934156283Srwatsonrm -fr conftest* 935156283Srwatson])# _LT_AC_TRY_DLOPEN_SELF 936156283Srwatson 937156283Srwatson 938156283Srwatson# AC_LIBTOOL_DLOPEN_SELF 939173143Srwatson# ---------------------- 940156283SrwatsonAC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], 941156283Srwatson[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl 942156283Srwatsonif test "x$enable_dlopen" != xyes; then 943156283Srwatson enable_dlopen=unknown 944156283Srwatson enable_dlopen_self=unknown 945156283Srwatson enable_dlopen_self_static=unknown 946156283Srwatsonelse 947156283Srwatson lt_cv_dlopen=no 948156283Srwatson lt_cv_dlopen_libs= 949156283Srwatson 950156283Srwatson case $host_os in 951156283Srwatson beos*) 952156283Srwatson lt_cv_dlopen="load_add_on" 953156283Srwatson lt_cv_dlopen_libs= 954156283Srwatson lt_cv_dlopen_self=yes 955156283Srwatson ;; 956156283Srwatson 957156283Srwatson mingw* | pw32*) 958156283Srwatson lt_cv_dlopen="LoadLibrary" 959156283Srwatson lt_cv_dlopen_libs= 960156283Srwatson ;; 961156283Srwatson 962156283Srwatson cygwin*) 963156283Srwatson lt_cv_dlopen="dlopen" 964156283Srwatson lt_cv_dlopen_libs= 965156283Srwatson ;; 966156283Srwatson 967156283Srwatson darwin*) 968156283Srwatson # if libdl is installed we need to link against it 969156283Srwatson AC_CHECK_LIB([dl], [dlopen], 970156283Srwatson [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ 971156283Srwatson lt_cv_dlopen="dyld" 972156283Srwatson lt_cv_dlopen_libs= 973156283Srwatson lt_cv_dlopen_self=yes 974156283Srwatson ]) 975156283Srwatson ;; 976156283Srwatson 977156283Srwatson *) 978156283Srwatson AC_CHECK_FUNC([shl_load], 979156283Srwatson [lt_cv_dlopen="shl_load"], 980156283Srwatson [AC_CHECK_LIB([dld], [shl_load], 981156283Srwatson [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"], 982156283Srwatson [AC_CHECK_FUNC([dlopen], 983156283Srwatson [lt_cv_dlopen="dlopen"], 984156283Srwatson [AC_CHECK_LIB([dl], [dlopen], 985156283Srwatson [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], 986156283Srwatson [AC_CHECK_LIB([svld], [dlopen], 987156283Srwatson [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], 988156283Srwatson [AC_CHECK_LIB([dld], [dld_link], 989156283Srwatson [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"]) 990156283Srwatson ]) 991156283Srwatson ]) 992156283Srwatson ]) 993156283Srwatson ]) 994156283Srwatson ]) 995156283Srwatson ;; 996156283Srwatson esac 997156283Srwatson 998156283Srwatson if test "x$lt_cv_dlopen" != xno; then 999156283Srwatson enable_dlopen=yes 1000156283Srwatson else 1001156283Srwatson enable_dlopen=no 1002156283Srwatson fi 1003156283Srwatson 1004156283Srwatson case $lt_cv_dlopen in 1005156283Srwatson dlopen) 1006156283Srwatson save_CPPFLAGS="$CPPFLAGS" 1007156283Srwatson test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 1008156283Srwatson 1009156283Srwatson save_LDFLAGS="$LDFLAGS" 1010173143Srwatson wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 1011156283Srwatson 1012156283Srwatson save_LIBS="$LIBS" 1013156283Srwatson LIBS="$lt_cv_dlopen_libs $LIBS" 1014156283Srwatson 1015156283Srwatson AC_CACHE_CHECK([whether a program can dlopen itself], 1016156283Srwatson lt_cv_dlopen_self, [dnl 1017156283Srwatson _LT_AC_TRY_DLOPEN_SELF( 1018156283Srwatson lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 1019156283Srwatson lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 1020156283Srwatson ]) 1021156283Srwatson 1022156283Srwatson if test "x$lt_cv_dlopen_self" = xyes; then 1023173143Srwatson wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 1024156283Srwatson AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 1025156283Srwatson lt_cv_dlopen_self_static, [dnl 1026156283Srwatson _LT_AC_TRY_DLOPEN_SELF( 1027156283Srwatson lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 1028156283Srwatson lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 1029156283Srwatson ]) 1030156283Srwatson fi 1031156283Srwatson 1032156283Srwatson CPPFLAGS="$save_CPPFLAGS" 1033156283Srwatson LDFLAGS="$save_LDFLAGS" 1034156283Srwatson LIBS="$save_LIBS" 1035156283Srwatson ;; 1036156283Srwatson esac 1037156283Srwatson 1038156283Srwatson case $lt_cv_dlopen_self in 1039156283Srwatson yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 1040156283Srwatson *) enable_dlopen_self=unknown ;; 1041156283Srwatson esac 1042156283Srwatson 1043156283Srwatson case $lt_cv_dlopen_self_static in 1044156283Srwatson yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 1045156283Srwatson *) enable_dlopen_self_static=unknown ;; 1046156283Srwatson esac 1047156283Srwatsonfi 1048156283Srwatson])# AC_LIBTOOL_DLOPEN_SELF 1049156283Srwatson 1050156283Srwatson 1051156283Srwatson# AC_LIBTOOL_PROG_CC_C_O([TAGNAME]) 1052156283Srwatson# --------------------------------- 1053156283Srwatson# Check to see if options -c and -o are simultaneously supported by compiler 1054156283SrwatsonAC_DEFUN([AC_LIBTOOL_PROG_CC_C_O], 1055173143Srwatson[AC_REQUIRE([LT_AC_PROG_SED])dnl 1056173143SrwatsonAC_REQUIRE([_LT_AC_SYS_COMPILER])dnl 1057156283SrwatsonAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 1058156283Srwatson [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 1059156283Srwatson [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 1060156283Srwatson $rm -r conftest 2>/dev/null 1061156283Srwatson mkdir conftest 1062156283Srwatson cd conftest 1063156283Srwatson mkdir out 1064173143Srwatson echo "$lt_simple_compile_test_code" > conftest.$ac_ext 1065156283Srwatson 1066156283Srwatson lt_compiler_flag="-o out/conftest2.$ac_objext" 1067156283Srwatson # Insert the option either (1) after the last *FLAGS variable, or 1068156283Srwatson # (2) before a word containing "conftest.", or (3) at the end. 1069156283Srwatson # Note that $ac_compile itself does not contain backslashes and begins 1070156283Srwatson # with a dollar sign (not a hyphen), so the echo should work correctly. 1071156283Srwatson lt_compile=`echo "$ac_compile" | $SED \ 1072156283Srwatson -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 1073156283Srwatson -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 1074156283Srwatson -e 's:$: $lt_compiler_flag:'` 1075156283Srwatson (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 1076156283Srwatson (eval "$lt_compile" 2>out/conftest.err) 1077156283Srwatson ac_status=$? 1078156283Srwatson cat out/conftest.err >&AS_MESSAGE_LOG_FD 1079156283Srwatson echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 1080156283Srwatson if (exit $ac_status) && test -s out/conftest2.$ac_objext 1081156283Srwatson then 1082156283Srwatson # The compiler can only warn and ignore the option if not recognized 1083156283Srwatson # So say no if there are warnings 1084173143Srwatson $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp 1085173143Srwatson $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 1086173143Srwatson if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 1087156283Srwatson _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 1088156283Srwatson fi 1089156283Srwatson fi 1090156283Srwatson chmod u+w . 2>&AS_MESSAGE_LOG_FD 1091156283Srwatson $rm conftest* 1092156283Srwatson # SGI C++ compiler will create directory out/ii_files/ for 1093156283Srwatson # template instantiation 1094156283Srwatson test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files 1095156283Srwatson $rm out/* && rmdir out 1096156283Srwatson cd .. 1097156283Srwatson rmdir conftest 1098156283Srwatson $rm conftest* 1099156283Srwatson]) 1100156283Srwatson])# AC_LIBTOOL_PROG_CC_C_O 1101156283Srwatson 1102156283Srwatson 1103156283Srwatson# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME]) 1104156283Srwatson# ----------------------------------------- 1105156283Srwatson# Check to see if we can do hard links to lock some files if needed 1106156283SrwatsonAC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], 1107156283Srwatson[AC_REQUIRE([_LT_AC_LOCK])dnl 1108156283Srwatson 1109156283Srwatsonhard_links="nottested" 1110156283Srwatsonif test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then 1111156283Srwatson # do not overwrite the value of need_locks provided by the user 1112156283Srwatson AC_MSG_CHECKING([if we can lock with hard links]) 1113156283Srwatson hard_links=yes 1114156283Srwatson $rm conftest* 1115156283Srwatson ln conftest.a conftest.b 2>/dev/null && hard_links=no 1116156283Srwatson touch conftest.a 1117156283Srwatson ln conftest.a conftest.b 2>&5 || hard_links=no 1118156283Srwatson ln conftest.a conftest.b 2>/dev/null && hard_links=no 1119156283Srwatson AC_MSG_RESULT([$hard_links]) 1120156283Srwatson if test "$hard_links" = no; then 1121156283Srwatson AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) 1122156283Srwatson need_locks=warn 1123156283Srwatson fi 1124156283Srwatsonelse 1125156283Srwatson need_locks=no 1126156283Srwatsonfi 1127156283Srwatson])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS 1128156283Srwatson 1129156283Srwatson 1130156283Srwatson# AC_LIBTOOL_OBJDIR 1131156283Srwatson# ----------------- 1132156283SrwatsonAC_DEFUN([AC_LIBTOOL_OBJDIR], 1133156283Srwatson[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 1134156283Srwatson[rm -f .libs 2>/dev/null 1135156283Srwatsonmkdir .libs 2>/dev/null 1136156283Srwatsonif test -d .libs; then 1137156283Srwatson lt_cv_objdir=.libs 1138156283Srwatsonelse 1139156283Srwatson # MS-DOS does not allow filenames that begin with a dot. 1140156283Srwatson lt_cv_objdir=_libs 1141156283Srwatsonfi 1142156283Srwatsonrmdir .libs 2>/dev/null]) 1143156283Srwatsonobjdir=$lt_cv_objdir 1144156283Srwatson])# AC_LIBTOOL_OBJDIR 1145156283Srwatson 1146156283Srwatson 1147156283Srwatson# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME]) 1148156283Srwatson# ---------------------------------------------- 1149156283Srwatson# Check hardcoding attributes. 1150156283SrwatsonAC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], 1151156283Srwatson[AC_MSG_CHECKING([how to hardcode library paths into programs]) 1152156283Srwatson_LT_AC_TAGVAR(hardcode_action, $1)= 1153156283Srwatsonif test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \ 1154156283Srwatson test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \ 1155156283Srwatson test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then 1156156283Srwatson 1157156283Srwatson # We can hardcode non-existant directories. 1158156283Srwatson if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no && 1159156283Srwatson # If the only mechanism to avoid hardcoding is shlibpath_var, we 1160156283Srwatson # have to relink, otherwise we might link with an installed library 1161156283Srwatson # when we should be linking with a yet-to-be-installed one 1162156283Srwatson ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no && 1163156283Srwatson test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then 1164156283Srwatson # Linking always hardcodes the temporary library directory. 1165156283Srwatson _LT_AC_TAGVAR(hardcode_action, $1)=relink 1166156283Srwatson else 1167156283Srwatson # We can link without hardcoding, and we can hardcode nonexisting dirs. 1168156283Srwatson _LT_AC_TAGVAR(hardcode_action, $1)=immediate 1169156283Srwatson fi 1170156283Srwatsonelse 1171156283Srwatson # We cannot hardcode anything, or else we can only hardcode existing 1172156283Srwatson # directories. 1173156283Srwatson _LT_AC_TAGVAR(hardcode_action, $1)=unsupported 1174156283Srwatsonfi 1175156283SrwatsonAC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)]) 1176156283Srwatson 1177156283Srwatsonif test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then 1178156283Srwatson # Fast installation is not supported 1179156283Srwatson enable_fast_install=no 1180156283Srwatsonelif test "$shlibpath_overrides_runpath" = yes || 1181156283Srwatson test "$enable_shared" = no; then 1182156283Srwatson # Fast installation is not necessary 1183156283Srwatson enable_fast_install=needless 1184156283Srwatsonfi 1185156283Srwatson])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH 1186156283Srwatson 1187156283Srwatson 1188156283Srwatson# AC_LIBTOOL_SYS_LIB_STRIP 1189156283Srwatson# ------------------------ 1190156283SrwatsonAC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP], 1191156283Srwatson[striplib= 1192156283Srwatsonold_striplib= 1193156283SrwatsonAC_MSG_CHECKING([whether stripping libraries is possible]) 1194156283Srwatsonif test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then 1195156283Srwatson test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" 1196156283Srwatson test -z "$striplib" && striplib="$STRIP --strip-unneeded" 1197156283Srwatson AC_MSG_RESULT([yes]) 1198156283Srwatsonelse 1199156283Srwatson# FIXME - insert some real tests, host_os isn't really good enough 1200156283Srwatson case $host_os in 1201156283Srwatson darwin*) 1202156283Srwatson if test -n "$STRIP" ; then 1203156283Srwatson striplib="$STRIP -x" 1204173143Srwatson old_striplib="$STRIP -S" 1205156283Srwatson AC_MSG_RESULT([yes]) 1206156283Srwatson else 1207156283Srwatson AC_MSG_RESULT([no]) 1208156283Srwatsonfi 1209156283Srwatson ;; 1210156283Srwatson *) 1211156283Srwatson AC_MSG_RESULT([no]) 1212156283Srwatson ;; 1213156283Srwatson esac 1214156283Srwatsonfi 1215156283Srwatson])# AC_LIBTOOL_SYS_LIB_STRIP 1216156283Srwatson 1217156283Srwatson 1218156283Srwatson# AC_LIBTOOL_SYS_DYNAMIC_LINKER 1219156283Srwatson# ----------------------------- 1220156283Srwatson# PORTME Fill in your ld.so characteristics 1221156283SrwatsonAC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER], 1222173143Srwatson[AC_REQUIRE([LT_AC_PROG_SED])dnl 1223173143SrwatsonAC_MSG_CHECKING([dynamic linker characteristics]) 1224156283Srwatsonlibrary_names_spec= 1225156283Srwatsonlibname_spec='lib$name' 1226156283Srwatsonsoname_spec= 1227156283Srwatsonshrext_cmds=".so" 1228156283Srwatsonpostinstall_cmds= 1229156283Srwatsonpostuninstall_cmds= 1230156283Srwatsonfinish_cmds= 1231156283Srwatsonfinish_eval= 1232156283Srwatsonshlibpath_var= 1233156283Srwatsonshlibpath_overrides_runpath=unknown 1234156283Srwatsonversion_type=none 1235156283Srwatsondynamic_linker="$host_os ld.so" 1236156283Srwatsonsys_lib_dlsearch_path_spec="/lib /usr/lib" 1237173143Srwatsonm4_if($1,[],[ 1238156283Srwatsonif test "$GCC" = yes; then 1239173143Srwatson case $host_os in 1240173143Srwatson darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; 1241173143Srwatson *) lt_awk_arg="/^libraries:/" ;; 1242173143Srwatson esac 1243173143Srwatson lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` 1244173143Srwatson if echo "$lt_search_path_spec" | grep ';' >/dev/null ; then 1245156283Srwatson # if the path contains ";" then we assume it to be the separator 1246156283Srwatson # otherwise default to the standard path separator (i.e. ":") - it is 1247156283Srwatson # assumed that no part of a normal pathname contains ";" but that should 1248156283Srwatson # okay in the real world where ";" in dirpaths is itself problematic. 1249173143Srwatson lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e 's/;/ /g'` 1250156283Srwatson else 1251173143Srwatson lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 1252156283Srwatson fi 1253173143Srwatson # Ok, now we have the path, separated by spaces, we can step through it 1254173143Srwatson # and add multilib dir if necessary. 1255173143Srwatson lt_tmp_lt_search_path_spec= 1256173143Srwatson lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 1257173143Srwatson for lt_sys_path in $lt_search_path_spec; do 1258173143Srwatson if test -d "$lt_sys_path/$lt_multi_os_dir"; then 1259173143Srwatson lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" 1260173143Srwatson else 1261173143Srwatson test -d "$lt_sys_path" && \ 1262173143Srwatson lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 1263173143Srwatson fi 1264173143Srwatson done 1265173143Srwatson lt_search_path_spec=`echo $lt_tmp_lt_search_path_spec | awk ' 1266173143SrwatsonBEGIN {RS=" "; FS="/|\n";} { 1267173143Srwatson lt_foo=""; 1268173143Srwatson lt_count=0; 1269173143Srwatson for (lt_i = NF; lt_i > 0; lt_i--) { 1270173143Srwatson if ($lt_i != "" && $lt_i != ".") { 1271173143Srwatson if ($lt_i == "..") { 1272173143Srwatson lt_count++; 1273173143Srwatson } else { 1274173143Srwatson if (lt_count == 0) { 1275173143Srwatson lt_foo="/" $lt_i lt_foo; 1276173143Srwatson } else { 1277173143Srwatson lt_count--; 1278173143Srwatson } 1279173143Srwatson } 1280173143Srwatson } 1281173143Srwatson } 1282173143Srwatson if (lt_foo != "") { lt_freq[[lt_foo]]++; } 1283173143Srwatson if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 1284173143Srwatson}'` 1285173143Srwatson sys_lib_search_path_spec=`echo $lt_search_path_spec` 1286156283Srwatsonelse 1287156283Srwatson sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 1288173143Srwatsonfi]) 1289156283Srwatsonneed_lib_prefix=unknown 1290156283Srwatsonhardcode_into_libs=no 1291156283Srwatson 1292156283Srwatson# when you set need_version to no, make sure it does not cause -set_version 1293156283Srwatson# flags to be left without arguments 1294156283Srwatsonneed_version=unknown 1295156283Srwatson 1296156283Srwatsoncase $host_os in 1297156283Srwatsonaix3*) 1298156283Srwatson version_type=linux 1299156283Srwatson library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' 1300156283Srwatson shlibpath_var=LIBPATH 1301156283Srwatson 1302156283Srwatson # AIX 3 has no versioning support, so we append a major version to the name. 1303156283Srwatson soname_spec='${libname}${release}${shared_ext}$major' 1304156283Srwatson ;; 1305156283Srwatson 1306156283Srwatsonaix4* | aix5*) 1307156283Srwatson version_type=linux 1308156283Srwatson need_lib_prefix=no 1309156283Srwatson need_version=no 1310156283Srwatson hardcode_into_libs=yes 1311156283Srwatson if test "$host_cpu" = ia64; then 1312156283Srwatson # AIX 5 supports IA64 1313156283Srwatson library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' 1314156283Srwatson shlibpath_var=LD_LIBRARY_PATH 1315156283Srwatson else 1316156283Srwatson # With GCC up to 2.95.x, collect2 would create an import file 1317156283Srwatson # for dependence libraries. The import file would start with 1318156283Srwatson # the line `#! .'. This would cause the generated library to 1319156283Srwatson # depend on `.', always an invalid library. This was fixed in 1320156283Srwatson # development snapshots of GCC prior to 3.0. 1321156283Srwatson case $host_os in 1322156283Srwatson aix4 | aix4.[[01]] | aix4.[[01]].*) 1323156283Srwatson if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 1324156283Srwatson echo ' yes ' 1325156283Srwatson echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then 1326156283Srwatson : 1327156283Srwatson else 1328156283Srwatson can_build_shared=no 1329156283Srwatson fi 1330156283Srwatson ;; 1331156283Srwatson esac 1332156283Srwatson # AIX (on Power*) has no versioning support, so currently we can not hardcode correct 1333156283Srwatson # soname into executable. Probably we can add versioning support to 1334156283Srwatson # collect2, so additional links can be useful in future. 1335156283Srwatson if test "$aix_use_runtimelinking" = yes; then 1336156283Srwatson # If using run time linking (on AIX 4.2 or later) use lib<name>.so 1337156283Srwatson # instead of lib<name>.a to let people know that these are not 1338156283Srwatson # typical AIX shared libraries. 1339156283Srwatson library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 1340156283Srwatson else 1341156283Srwatson # We preserve .a as extension for shared libraries through AIX4.2 1342156283Srwatson # and later when we are not doing run time linking. 1343156283Srwatson library_names_spec='${libname}${release}.a $libname.a' 1344156283Srwatson soname_spec='${libname}${release}${shared_ext}$major' 1345156283Srwatson fi 1346156283Srwatson shlibpath_var=LIBPATH 1347156283Srwatson fi 1348156283Srwatson ;; 1349156283Srwatson 1350156283Srwatsonamigaos*) 1351156283Srwatson library_names_spec='$libname.ixlibrary $libname.a' 1352156283Srwatson # Create ${libname}_ixlibrary.a entries in /sys/libs. 1353156283Srwatson 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' 1354156283Srwatson ;; 1355156283Srwatson 1356156283Srwatsonbeos*) 1357156283Srwatson library_names_spec='${libname}${shared_ext}' 1358156283Srwatson dynamic_linker="$host_os ld.so" 1359156283Srwatson shlibpath_var=LIBRARY_PATH 1360156283Srwatson ;; 1361156283Srwatson 1362156283Srwatsonbsdi[[45]]*) 1363156283Srwatson version_type=linux 1364156283Srwatson need_version=no 1365156283Srwatson library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 1366156283Srwatson soname_spec='${libname}${release}${shared_ext}$major' 1367156283Srwatson finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 1368156283Srwatson shlibpath_var=LD_LIBRARY_PATH 1369156283Srwatson sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 1370156283Srwatson sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 1371156283Srwatson # the default ld.so.conf also contains /usr/contrib/lib and 1372156283Srwatson # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 1373156283Srwatson # libtool to hard-code these into programs 1374156283Srwatson ;; 1375156283Srwatson 1376156283Srwatsoncygwin* | mingw* | pw32*) 1377156283Srwatson version_type=windows 1378156283Srwatson shrext_cmds=".dll" 1379156283Srwatson need_version=no 1380156283Srwatson need_lib_prefix=no 1381156283Srwatson 1382156283Srwatson case $GCC,$host_os in 1383156283Srwatson yes,cygwin* | yes,mingw* | yes,pw32*) 1384156283Srwatson library_names_spec='$libname.dll.a' 1385156283Srwatson # DLL is installed to $(libdir)/../bin by postinstall_cmds 1386156283Srwatson postinstall_cmds='base_file=`basename \${file}`~ 1387156283Srwatson dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ 1388156283Srwatson dldir=$destdir/`dirname \$dlpath`~ 1389156283Srwatson test -d \$dldir || mkdir -p \$dldir~ 1390156283Srwatson $install_prog $dir/$dlname \$dldir/$dlname~ 1391156283Srwatson chmod a+x \$dldir/$dlname' 1392156283Srwatson postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 1393156283Srwatson dlpath=$dir/\$dldll~ 1394156283Srwatson $rm \$dlpath' 1395156283Srwatson shlibpath_overrides_runpath=yes 1396156283Srwatson 1397156283Srwatson case $host_os in 1398156283Srwatson cygwin*) 1399156283Srwatson # Cygwin DLLs use 'cyg' prefix rather than 'lib' 1400156283Srwatson soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 1401156283Srwatson sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" 1402156283Srwatson ;; 1403156283Srwatson mingw*) 1404156283Srwatson # MinGW DLLs use traditional 'lib' prefix 1405156283Srwatson soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 1406156283Srwatson sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` 1407156283Srwatson if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then 1408156283Srwatson # It is most probably a Windows format PATH printed by 1409156283Srwatson # mingw gcc, but we are running on Cygwin. Gcc prints its search 1410156283Srwatson # path with ; separators, and with drive letters. We can handle the 1411156283Srwatson # drive letters (cygwin fileutils understands them), so leave them, 1412156283Srwatson # especially as we might pass files found there to a mingw objdump, 1413156283Srwatson # which wouldn't understand a cygwinified path. Ahh. 1414156283Srwatson sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 1415156283Srwatson else 1416156283Srwatson sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 1417156283Srwatson fi 1418156283Srwatson ;; 1419156283Srwatson pw32*) 1420156283Srwatson # pw32 DLLs use 'pw' prefix rather than 'lib' 1421156283Srwatson library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 1422156283Srwatson ;; 1423156283Srwatson esac 1424156283Srwatson ;; 1425156283Srwatson 1426156283Srwatson *) 1427156283Srwatson library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' 1428156283Srwatson ;; 1429156283Srwatson esac 1430156283Srwatson dynamic_linker='Win32 ld.exe' 1431156283Srwatson # FIXME: first we should search . and the directory the executable is in 1432156283Srwatson shlibpath_var=PATH 1433156283Srwatson ;; 1434156283Srwatson 1435156283Srwatsondarwin* | rhapsody*) 1436156283Srwatson dynamic_linker="$host_os dyld" 1437156283Srwatson version_type=darwin 1438156283Srwatson need_lib_prefix=no 1439156283Srwatson need_version=no 1440156283Srwatson library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' 1441156283Srwatson soname_spec='${libname}${release}${major}$shared_ext' 1442156283Srwatson shlibpath_overrides_runpath=yes 1443156283Srwatson shlibpath_var=DYLD_LIBRARY_PATH 1444156283Srwatson shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 1445173143Srwatson m4_if([$1], [],[ 1446173143Srwatson sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 1447156283Srwatson sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 1448156283Srwatson ;; 1449156283Srwatson 1450156283Srwatsondgux*) 1451156283Srwatson version_type=linux 1452156283Srwatson need_lib_prefix=no 1453156283Srwatson need_version=no 1454156283Srwatson library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' 1455156283Srwatson soname_spec='${libname}${release}${shared_ext}$major' 1456156283Srwatson shlibpath_var=LD_LIBRARY_PATH 1457156283Srwatson ;; 1458156283Srwatson 1459156283Srwatsonfreebsd1*) 1460156283Srwatson dynamic_linker=no 1461156283Srwatson ;; 1462156283Srwatson 1463156283Srwatsonfreebsd* | dragonfly*) 1464156283Srwatson # DragonFly does not have aout. When/if they implement a new 1465156283Srwatson # versioning mechanism, adjust this. 1466156283Srwatson if test -x /usr/bin/objformat; then 1467156283Srwatson objformat=`/usr/bin/objformat` 1468156283Srwatson else 1469156283Srwatson case $host_os in 1470156283Srwatson freebsd[[123]]*) objformat=aout ;; 1471156283Srwatson *) objformat=elf ;; 1472156283Srwatson esac 1473156283Srwatson fi 1474156283Srwatson version_type=freebsd-$objformat 1475156283Srwatson case $version_type in 1476156283Srwatson freebsd-elf*) 1477156283Srwatson library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 1478156283Srwatson need_version=no 1479156283Srwatson need_lib_prefix=no 1480156283Srwatson ;; 1481156283Srwatson freebsd-*) 1482156283Srwatson library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' 1483156283Srwatson need_version=yes 1484156283Srwatson ;; 1485156283Srwatson esac 1486156283Srwatson shlibpath_var=LD_LIBRARY_PATH 1487156283Srwatson case $host_os in 1488156283Srwatson freebsd2*) 1489156283Srwatson shlibpath_overrides_runpath=yes 1490156283Srwatson ;; 1491156283Srwatson freebsd3.[[01]]* | freebsdelf3.[[01]]*) 1492156283Srwatson shlibpath_overrides_runpath=yes 1493156283Srwatson hardcode_into_libs=yes 1494156283Srwatson ;; 1495173143Srwatson freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 1496173143Srwatson freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 1497156283Srwatson shlibpath_overrides_runpath=no 1498156283Srwatson hardcode_into_libs=yes 1499156283Srwatson ;; 1500173143Srwatson *) # from 4.6 on, and DragonFly 1501173143Srwatson shlibpath_overrides_runpath=yes 1502173143Srwatson hardcode_into_libs=yes 1503173143Srwatson ;; 1504156283Srwatson esac 1505156283Srwatson ;; 1506156283Srwatson 1507156283Srwatsongnu*) 1508156283Srwatson version_type=linux 1509156283Srwatson need_lib_prefix=no 1510156283Srwatson need_version=no 1511156283Srwatson library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 1512156283Srwatson soname_spec='${libname}${release}${shared_ext}$major' 1513156283Srwatson shlibpath_var=LD_LIBRARY_PATH 1514156283Srwatson hardcode_into_libs=yes 1515156283Srwatson ;; 1516156283Srwatson 1517156283Srwatsonhpux9* | hpux10* | hpux11*) 1518156283Srwatson # Give a soname corresponding to the major version so that dld.sl refuses to 1519156283Srwatson # link against other versions. 1520156283Srwatson version_type=sunos 1521156283Srwatson need_lib_prefix=no 1522156283Srwatson need_version=no 1523156283Srwatson case $host_cpu in 1524156283Srwatson ia64*) 1525156283Srwatson shrext_cmds='.so' 1526156283Srwatson hardcode_into_libs=yes 1527156283Srwatson dynamic_linker="$host_os dld.so" 1528156283Srwatson shlibpath_var=LD_LIBRARY_PATH 1529156283Srwatson shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 1530156283Srwatson library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 1531156283Srwatson soname_spec='${libname}${release}${shared_ext}$major' 1532156283Srwatson if test "X$HPUX_IA64_MODE" = X32; then 1533156283Srwatson sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 1534156283Srwatson else 1535156283Srwatson sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 1536156283Srwatson fi 1537156283Srwatson sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 1538156283Srwatson ;; 1539156283Srwatson hppa*64*) 1540156283Srwatson shrext_cmds='.sl' 1541156283Srwatson hardcode_into_libs=yes 1542156283Srwatson dynamic_linker="$host_os dld.sl" 1543156283Srwatson shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 1544156283Srwatson shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 1545156283Srwatson library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 1546156283Srwatson soname_spec='${libname}${release}${shared_ext}$major' 1547156283Srwatson sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 1548156283Srwatson sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 1549156283Srwatson ;; 1550156283Srwatson *) 1551156283Srwatson shrext_cmds='.sl' 1552156283Srwatson dynamic_linker="$host_os dld.sl" 1553156283Srwatson shlibpath_var=SHLIB_PATH 1554156283Srwatson shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 1555156283Srwatson library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 1556156283Srwatson soname_spec='${libname}${release}${shared_ext}$major' 1557156283Srwatson ;; 1558156283Srwatson esac 1559156283Srwatson # HP-UX runs *really* slowly unless shared libraries are mode 555. 1560156283Srwatson postinstall_cmds='chmod 555 $lib' 1561156283Srwatson ;; 1562156283Srwatson 1563173143Srwatsoninterix[[3-9]]*) 1564173143Srwatson version_type=linux 1565173143Srwatson need_lib_prefix=no 1566173143Srwatson need_version=no 1567173143Srwatson library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 1568173143Srwatson soname_spec='${libname}${release}${shared_ext}$major' 1569173143Srwatson dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 1570173143Srwatson shlibpath_var=LD_LIBRARY_PATH 1571173143Srwatson shlibpath_overrides_runpath=no 1572173143Srwatson hardcode_into_libs=yes 1573173143Srwatson ;; 1574173143Srwatson 1575156283Srwatsonirix5* | irix6* | nonstopux*) 1576156283Srwatson case $host_os in 1577156283Srwatson nonstopux*) version_type=nonstopux ;; 1578156283Srwatson *) 1579156283Srwatson if test "$lt_cv_prog_gnu_ld" = yes; then 1580156283Srwatson version_type=linux 1581156283Srwatson else 1582156283Srwatson version_type=irix 1583156283Srwatson fi ;; 1584156283Srwatson esac 1585156283Srwatson need_lib_prefix=no 1586156283Srwatson need_version=no 1587156283Srwatson soname_spec='${libname}${release}${shared_ext}$major' 1588156283Srwatson library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' 1589156283Srwatson case $host_os in 1590156283Srwatson irix5* | nonstopux*) 1591156283Srwatson libsuff= shlibsuff= 1592156283Srwatson ;; 1593156283Srwatson *) 1594156283Srwatson case $LD in # libtool.m4 will add one of these switches to LD 1595156283Srwatson *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 1596156283Srwatson libsuff= shlibsuff= libmagic=32-bit;; 1597156283Srwatson *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 1598156283Srwatson libsuff=32 shlibsuff=N32 libmagic=N32;; 1599156283Srwatson *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 1600156283Srwatson libsuff=64 shlibsuff=64 libmagic=64-bit;; 1601156283Srwatson *) libsuff= shlibsuff= libmagic=never-match;; 1602156283Srwatson esac 1603156283Srwatson ;; 1604156283Srwatson esac 1605156283Srwatson shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 1606156283Srwatson shlibpath_overrides_runpath=no 1607156283Srwatson sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" 1608156283Srwatson sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" 1609156283Srwatson hardcode_into_libs=yes 1610156283Srwatson ;; 1611156283Srwatson 1612156283Srwatson# No shared lib support for Linux oldld, aout, or coff. 1613156283Srwatsonlinux*oldld* | linux*aout* | linux*coff*) 1614156283Srwatson dynamic_linker=no 1615156283Srwatson ;; 1616156283Srwatson 1617156283Srwatson# This must be Linux ELF. 1618173143Srwatsonlinux* | k*bsd*-gnu) 1619156283Srwatson version_type=linux 1620156283Srwatson need_lib_prefix=no 1621156283Srwatson need_version=no 1622156283Srwatson library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 1623156283Srwatson soname_spec='${libname}${release}${shared_ext}$major' 1624156283Srwatson finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 1625156283Srwatson shlibpath_var=LD_LIBRARY_PATH 1626156283Srwatson shlibpath_overrides_runpath=no 1627156283Srwatson # This implies no fast_install, which is unacceptable. 1628156283Srwatson # Some rework will be needed to allow for fast_install 1629156283Srwatson # before this can be enabled. 1630156283Srwatson hardcode_into_libs=yes 1631156283Srwatson 1632156283Srwatson # Append ld.so.conf contents to the search path 1633156283Srwatson if test -f /etc/ld.so.conf; then 1634173143Srwatson lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` 1635156283Srwatson sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" 1636156283Srwatson fi 1637156283Srwatson 1638156283Srwatson # We used to test for /lib/ld.so.1 and disable shared libraries on 1639156283Srwatson # powerpc, because MkLinux only supported shared libraries with the 1640156283Srwatson # GNU dynamic linker. Since this was broken with cross compilers, 1641156283Srwatson # most powerpc-linux boxes support dynamic linking these days and 1642156283Srwatson # people can always --disable-shared, the test was removed, and we 1643156283Srwatson # assume the GNU/Linux dynamic linker is in use. 1644156283Srwatson dynamic_linker='GNU/Linux ld.so' 1645156283Srwatson ;; 1646156283Srwatson 1647156283Srwatsonnetbsd*) 1648156283Srwatson version_type=sunos 1649156283Srwatson need_lib_prefix=no 1650156283Srwatson need_version=no 1651156283Srwatson if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then 1652156283Srwatson library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 1653156283Srwatson finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 1654156283Srwatson dynamic_linker='NetBSD (a.out) ld.so' 1655156283Srwatson else 1656156283Srwatson library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 1657156283Srwatson soname_spec='${libname}${release}${shared_ext}$major' 1658156283Srwatson dynamic_linker='NetBSD ld.elf_so' 1659156283Srwatson fi 1660156283Srwatson shlibpath_var=LD_LIBRARY_PATH 1661156283Srwatson shlibpath_overrides_runpath=yes 1662156283Srwatson hardcode_into_libs=yes 1663156283Srwatson ;; 1664156283Srwatson 1665156283Srwatsonnewsos6) 1666156283Srwatson version_type=linux 1667156283Srwatson library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 1668156283Srwatson shlibpath_var=LD_LIBRARY_PATH 1669156283Srwatson shlibpath_overrides_runpath=yes 1670156283Srwatson ;; 1671156283Srwatson 1672156283Srwatsonnto-qnx*) 1673156283Srwatson version_type=linux 1674156283Srwatson need_lib_prefix=no 1675156283Srwatson need_version=no 1676156283Srwatson library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 1677156283Srwatson soname_spec='${libname}${release}${shared_ext}$major' 1678156283Srwatson shlibpath_var=LD_LIBRARY_PATH 1679156283Srwatson shlibpath_overrides_runpath=yes 1680156283Srwatson ;; 1681156283Srwatson 1682156283Srwatsonopenbsd*) 1683156283Srwatson version_type=sunos 1684173143Srwatson sys_lib_dlsearch_path_spec="/usr/lib" 1685156283Srwatson need_lib_prefix=no 1686156283Srwatson # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. 1687156283Srwatson case $host_os in 1688156283Srwatson openbsd3.3 | openbsd3.3.*) need_version=yes ;; 1689156283Srwatson *) need_version=no ;; 1690156283Srwatson esac 1691156283Srwatson library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 1692156283Srwatson finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 1693156283Srwatson shlibpath_var=LD_LIBRARY_PATH 1694156283Srwatson if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 1695156283Srwatson case $host_os in 1696156283Srwatson openbsd2.[[89]] | openbsd2.[[89]].*) 1697156283Srwatson shlibpath_overrides_runpath=no 1698156283Srwatson ;; 1699156283Srwatson *) 1700156283Srwatson shlibpath_overrides_runpath=yes 1701156283Srwatson ;; 1702156283Srwatson esac 1703156283Srwatson else 1704156283Srwatson shlibpath_overrides_runpath=yes 1705156283Srwatson fi 1706156283Srwatson ;; 1707156283Srwatson 1708156283Srwatsonos2*) 1709156283Srwatson libname_spec='$name' 1710156283Srwatson shrext_cmds=".dll" 1711156283Srwatson need_lib_prefix=no 1712156283Srwatson library_names_spec='$libname${shared_ext} $libname.a' 1713156283Srwatson dynamic_linker='OS/2 ld.exe' 1714156283Srwatson shlibpath_var=LIBPATH 1715156283Srwatson ;; 1716156283Srwatson 1717156283Srwatsonosf3* | osf4* | osf5*) 1718156283Srwatson version_type=osf 1719156283Srwatson need_lib_prefix=no 1720156283Srwatson need_version=no 1721156283Srwatson soname_spec='${libname}${release}${shared_ext}$major' 1722156283Srwatson library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 1723156283Srwatson shlibpath_var=LD_LIBRARY_PATH 1724156283Srwatson sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 1725156283Srwatson sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" 1726156283Srwatson ;; 1727156283Srwatson 1728173143Srwatsonrdos*) 1729173143Srwatson dynamic_linker=no 1730156283Srwatson ;; 1731156283Srwatson 1732156283Srwatsonsolaris*) 1733156283Srwatson version_type=linux 1734156283Srwatson need_lib_prefix=no 1735156283Srwatson need_version=no 1736156283Srwatson library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 1737156283Srwatson soname_spec='${libname}${release}${shared_ext}$major' 1738156283Srwatson shlibpath_var=LD_LIBRARY_PATH 1739156283Srwatson shlibpath_overrides_runpath=yes 1740156283Srwatson hardcode_into_libs=yes 1741156283Srwatson # ldd complains unless libraries are executable 1742156283Srwatson postinstall_cmds='chmod +x $lib' 1743156283Srwatson ;; 1744156283Srwatson 1745156283Srwatsonsunos4*) 1746156283Srwatson version_type=sunos 1747156283Srwatson library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 1748156283Srwatson finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 1749156283Srwatson shlibpath_var=LD_LIBRARY_PATH 1750156283Srwatson shlibpath_overrides_runpath=yes 1751156283Srwatson if test "$with_gnu_ld" = yes; then 1752156283Srwatson need_lib_prefix=no 1753156283Srwatson fi 1754156283Srwatson need_version=yes 1755156283Srwatson ;; 1756156283Srwatson 1757173143Srwatsonsysv4 | sysv4.3*) 1758156283Srwatson version_type=linux 1759156283Srwatson library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 1760156283Srwatson soname_spec='${libname}${release}${shared_ext}$major' 1761156283Srwatson shlibpath_var=LD_LIBRARY_PATH 1762156283Srwatson case $host_vendor in 1763156283Srwatson sni) 1764156283Srwatson shlibpath_overrides_runpath=no 1765156283Srwatson need_lib_prefix=no 1766156283Srwatson export_dynamic_flag_spec='${wl}-Blargedynsym' 1767156283Srwatson runpath_var=LD_RUN_PATH 1768156283Srwatson ;; 1769156283Srwatson siemens) 1770156283Srwatson need_lib_prefix=no 1771156283Srwatson ;; 1772156283Srwatson motorola) 1773156283Srwatson need_lib_prefix=no 1774156283Srwatson need_version=no 1775156283Srwatson shlibpath_overrides_runpath=no 1776156283Srwatson sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 1777156283Srwatson ;; 1778156283Srwatson esac 1779156283Srwatson ;; 1780156283Srwatson 1781156283Srwatsonsysv4*MP*) 1782156283Srwatson if test -d /usr/nec ;then 1783156283Srwatson version_type=linux 1784156283Srwatson library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' 1785156283Srwatson soname_spec='$libname${shared_ext}.$major' 1786156283Srwatson shlibpath_var=LD_LIBRARY_PATH 1787156283Srwatson fi 1788156283Srwatson ;; 1789156283Srwatson 1790173143Srwatsonsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 1791173143Srwatson version_type=freebsd-elf 1792173143Srwatson need_lib_prefix=no 1793173143Srwatson need_version=no 1794173143Srwatson library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 1795173143Srwatson soname_spec='${libname}${release}${shared_ext}$major' 1796173143Srwatson shlibpath_var=LD_LIBRARY_PATH 1797173143Srwatson hardcode_into_libs=yes 1798173143Srwatson if test "$with_gnu_ld" = yes; then 1799173143Srwatson sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 1800173143Srwatson shlibpath_overrides_runpath=no 1801173143Srwatson else 1802173143Srwatson sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 1803173143Srwatson shlibpath_overrides_runpath=yes 1804173143Srwatson case $host_os in 1805173143Srwatson sco3.2v5*) 1806173143Srwatson sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 1807173143Srwatson ;; 1808173143Srwatson esac 1809173143Srwatson fi 1810173143Srwatson sys_lib_dlsearch_path_spec='/usr/lib' 1811173143Srwatson ;; 1812173143Srwatson 1813156283Srwatsonuts4*) 1814156283Srwatson version_type=linux 1815156283Srwatson library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 1816156283Srwatson soname_spec='${libname}${release}${shared_ext}$major' 1817156283Srwatson shlibpath_var=LD_LIBRARY_PATH 1818156283Srwatson ;; 1819156283Srwatson 1820156283Srwatson*) 1821156283Srwatson dynamic_linker=no 1822156283Srwatson ;; 1823156283Srwatsonesac 1824156283SrwatsonAC_MSG_RESULT([$dynamic_linker]) 1825156283Srwatsontest "$dynamic_linker" = no && can_build_shared=no 1826173143Srwatson 1827173143Srwatsonvariables_saved_for_relink="PATH $shlibpath_var $runpath_var" 1828173143Srwatsonif test "$GCC" = yes; then 1829173143Srwatson variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 1830173143Srwatsonfi 1831156283Srwatson])# AC_LIBTOOL_SYS_DYNAMIC_LINKER 1832156283Srwatson 1833156283Srwatson 1834156283Srwatson# _LT_AC_TAGCONFIG 1835156283Srwatson# ---------------- 1836156283SrwatsonAC_DEFUN([_LT_AC_TAGCONFIG], 1837173143Srwatson[AC_REQUIRE([LT_AC_PROG_SED])dnl 1838173143SrwatsonAC_ARG_WITH([tags], 1839156283Srwatson [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@], 1840156283Srwatson [include additional configurations @<:@automatic@:>@])], 1841156283Srwatson [tagnames="$withval"]) 1842156283Srwatson 1843156283Srwatsonif test -f "$ltmain" && test -n "$tagnames"; then 1844156283Srwatson if test ! -f "${ofile}"; then 1845156283Srwatson AC_MSG_WARN([output file `$ofile' does not exist]) 1846156283Srwatson fi 1847156283Srwatson 1848156283Srwatson if test -z "$LTCC"; then 1849156283Srwatson eval "`$SHELL ${ofile} --config | grep '^LTCC='`" 1850156283Srwatson if test -z "$LTCC"; then 1851156283Srwatson AC_MSG_WARN([output file `$ofile' does not look like a libtool script]) 1852156283Srwatson else 1853156283Srwatson AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile']) 1854156283Srwatson fi 1855156283Srwatson fi 1856173143Srwatson if test -z "$LTCFLAGS"; then 1857173143Srwatson eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`" 1858173143Srwatson fi 1859156283Srwatson 1860156283Srwatson # Extract list of available tagged configurations in $ofile. 1861156283Srwatson # Note that this assumes the entire list is on one line. 1862156283Srwatson available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` 1863156283Srwatson 1864156283Srwatson lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 1865156283Srwatson for tagname in $tagnames; do 1866156283Srwatson IFS="$lt_save_ifs" 1867156283Srwatson # Check whether tagname contains only valid characters 1868156283Srwatson case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in 1869156283Srwatson "") ;; 1870156283Srwatson *) AC_MSG_ERROR([invalid tag name: $tagname]) 1871156283Srwatson ;; 1872156283Srwatson esac 1873156283Srwatson 1874156283Srwatson if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null 1875156283Srwatson then 1876156283Srwatson AC_MSG_ERROR([tag name \"$tagname\" already exists]) 1877156283Srwatson fi 1878156283Srwatson 1879156283Srwatson # Update the list of available tags. 1880156283Srwatson if test -n "$tagname"; then 1881156283Srwatson echo appending configuration tag \"$tagname\" to $ofile 1882156283Srwatson 1883156283Srwatson case $tagname in 1884156283Srwatson CXX) 1885156283Srwatson if test -n "$CXX" && ( test "X$CXX" != "Xno" && 1886156283Srwatson ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || 1887156283Srwatson (test "X$CXX" != "Xg++"))) ; then 1888156283Srwatson AC_LIBTOOL_LANG_CXX_CONFIG 1889156283Srwatson else 1890156283Srwatson tagname="" 1891156283Srwatson fi 1892156283Srwatson ;; 1893156283Srwatson 1894156283Srwatson F77) 1895156283Srwatson if test -n "$F77" && test "X$F77" != "Xno"; then 1896156283Srwatson AC_LIBTOOL_LANG_F77_CONFIG 1897156283Srwatson else 1898156283Srwatson tagname="" 1899156283Srwatson fi 1900156283Srwatson ;; 1901156283Srwatson 1902156283Srwatson GCJ) 1903156283Srwatson if test -n "$GCJ" && test "X$GCJ" != "Xno"; then 1904156283Srwatson AC_LIBTOOL_LANG_GCJ_CONFIG 1905156283Srwatson else 1906156283Srwatson tagname="" 1907156283Srwatson fi 1908156283Srwatson ;; 1909156283Srwatson 1910156283Srwatson RC) 1911156283Srwatson AC_LIBTOOL_LANG_RC_CONFIG 1912156283Srwatson ;; 1913156283Srwatson 1914156283Srwatson *) 1915156283Srwatson AC_MSG_ERROR([Unsupported tag name: $tagname]) 1916156283Srwatson ;; 1917156283Srwatson esac 1918156283Srwatson 1919156283Srwatson # Append the new tag name to the list of available tags. 1920156283Srwatson if test -n "$tagname" ; then 1921156283Srwatson available_tags="$available_tags $tagname" 1922156283Srwatson fi 1923156283Srwatson fi 1924156283Srwatson done 1925156283Srwatson IFS="$lt_save_ifs" 1926156283Srwatson 1927156283Srwatson # Now substitute the updated list of available tags. 1928156283Srwatson if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then 1929156283Srwatson mv "${ofile}T" "$ofile" 1930156283Srwatson chmod +x "$ofile" 1931156283Srwatson else 1932156283Srwatson rm -f "${ofile}T" 1933156283Srwatson AC_MSG_ERROR([unable to update list of available tagged configurations.]) 1934156283Srwatson fi 1935156283Srwatsonfi 1936156283Srwatson])# _LT_AC_TAGCONFIG 1937156283Srwatson 1938156283Srwatson 1939156283Srwatson# AC_LIBTOOL_DLOPEN 1940156283Srwatson# ----------------- 1941156283Srwatson# enable checks for dlopen support 1942156283SrwatsonAC_DEFUN([AC_LIBTOOL_DLOPEN], 1943156283Srwatson [AC_BEFORE([$0],[AC_LIBTOOL_SETUP]) 1944156283Srwatson])# AC_LIBTOOL_DLOPEN 1945156283Srwatson 1946156283Srwatson 1947156283Srwatson# AC_LIBTOOL_WIN32_DLL 1948156283Srwatson# -------------------- 1949156283Srwatson# declare package support for building win32 DLLs 1950156283SrwatsonAC_DEFUN([AC_LIBTOOL_WIN32_DLL], 1951156283Srwatson[AC_BEFORE([$0], [AC_LIBTOOL_SETUP]) 1952156283Srwatson])# AC_LIBTOOL_WIN32_DLL 1953156283Srwatson 1954156283Srwatson 1955156283Srwatson# AC_ENABLE_SHARED([DEFAULT]) 1956156283Srwatson# --------------------------- 1957156283Srwatson# implement the --enable-shared flag 1958156283Srwatson# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 1959156283SrwatsonAC_DEFUN([AC_ENABLE_SHARED], 1960156283Srwatson[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl 1961156283SrwatsonAC_ARG_ENABLE([shared], 1962156283Srwatson [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 1963156283Srwatson [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])], 1964156283Srwatson [p=${PACKAGE-default} 1965156283Srwatson case $enableval in 1966156283Srwatson yes) enable_shared=yes ;; 1967156283Srwatson no) enable_shared=no ;; 1968156283Srwatson *) 1969156283Srwatson enable_shared=no 1970156283Srwatson # Look at the argument we got. We use all the common list separators. 1971156283Srwatson lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 1972156283Srwatson for pkg in $enableval; do 1973156283Srwatson IFS="$lt_save_ifs" 1974156283Srwatson if test "X$pkg" = "X$p"; then 1975156283Srwatson enable_shared=yes 1976156283Srwatson fi 1977156283Srwatson done 1978156283Srwatson IFS="$lt_save_ifs" 1979156283Srwatson ;; 1980156283Srwatson esac], 1981156283Srwatson [enable_shared=]AC_ENABLE_SHARED_DEFAULT) 1982156283Srwatson])# AC_ENABLE_SHARED 1983156283Srwatson 1984156283Srwatson 1985156283Srwatson# AC_DISABLE_SHARED 1986156283Srwatson# ----------------- 1987173143Srwatson# set the default shared flag to --disable-shared 1988156283SrwatsonAC_DEFUN([AC_DISABLE_SHARED], 1989156283Srwatson[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 1990156283SrwatsonAC_ENABLE_SHARED(no) 1991156283Srwatson])# AC_DISABLE_SHARED 1992156283Srwatson 1993156283Srwatson 1994156283Srwatson# AC_ENABLE_STATIC([DEFAULT]) 1995156283Srwatson# --------------------------- 1996156283Srwatson# implement the --enable-static flag 1997156283Srwatson# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 1998156283SrwatsonAC_DEFUN([AC_ENABLE_STATIC], 1999156283Srwatson[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl 2000156283SrwatsonAC_ARG_ENABLE([static], 2001156283Srwatson [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@], 2002156283Srwatson [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])], 2003156283Srwatson [p=${PACKAGE-default} 2004156283Srwatson case $enableval in 2005156283Srwatson yes) enable_static=yes ;; 2006156283Srwatson no) enable_static=no ;; 2007156283Srwatson *) 2008156283Srwatson enable_static=no 2009156283Srwatson # Look at the argument we got. We use all the common list separators. 2010156283Srwatson lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 2011156283Srwatson for pkg in $enableval; do 2012156283Srwatson IFS="$lt_save_ifs" 2013156283Srwatson if test "X$pkg" = "X$p"; then 2014156283Srwatson enable_static=yes 2015156283Srwatson fi 2016156283Srwatson done 2017156283Srwatson IFS="$lt_save_ifs" 2018156283Srwatson ;; 2019156283Srwatson esac], 2020156283Srwatson [enable_static=]AC_ENABLE_STATIC_DEFAULT) 2021156283Srwatson])# AC_ENABLE_STATIC 2022156283Srwatson 2023156283Srwatson 2024156283Srwatson# AC_DISABLE_STATIC 2025156283Srwatson# ----------------- 2026156283Srwatson# set the default static flag to --disable-static 2027156283SrwatsonAC_DEFUN([AC_DISABLE_STATIC], 2028156283Srwatson[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 2029156283SrwatsonAC_ENABLE_STATIC(no) 2030156283Srwatson])# AC_DISABLE_STATIC 2031156283Srwatson 2032156283Srwatson 2033156283Srwatson# AC_ENABLE_FAST_INSTALL([DEFAULT]) 2034156283Srwatson# --------------------------------- 2035156283Srwatson# implement the --enable-fast-install flag 2036156283Srwatson# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 2037156283SrwatsonAC_DEFUN([AC_ENABLE_FAST_INSTALL], 2038156283Srwatson[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl 2039156283SrwatsonAC_ARG_ENABLE([fast-install], 2040156283Srwatson [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 2041156283Srwatson [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 2042156283Srwatson [p=${PACKAGE-default} 2043156283Srwatson case $enableval in 2044156283Srwatson yes) enable_fast_install=yes ;; 2045156283Srwatson no) enable_fast_install=no ;; 2046156283Srwatson *) 2047156283Srwatson enable_fast_install=no 2048156283Srwatson # Look at the argument we got. We use all the common list separators. 2049156283Srwatson lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 2050156283Srwatson for pkg in $enableval; do 2051156283Srwatson IFS="$lt_save_ifs" 2052156283Srwatson if test "X$pkg" = "X$p"; then 2053156283Srwatson enable_fast_install=yes 2054156283Srwatson fi 2055156283Srwatson done 2056156283Srwatson IFS="$lt_save_ifs" 2057156283Srwatson ;; 2058156283Srwatson esac], 2059156283Srwatson [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT) 2060156283Srwatson])# AC_ENABLE_FAST_INSTALL 2061156283Srwatson 2062156283Srwatson 2063156283Srwatson# AC_DISABLE_FAST_INSTALL 2064156283Srwatson# ----------------------- 2065156283Srwatson# set the default to --disable-fast-install 2066156283SrwatsonAC_DEFUN([AC_DISABLE_FAST_INSTALL], 2067156283Srwatson[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 2068156283SrwatsonAC_ENABLE_FAST_INSTALL(no) 2069156283Srwatson])# AC_DISABLE_FAST_INSTALL 2070156283Srwatson 2071156283Srwatson 2072156283Srwatson# AC_LIBTOOL_PICMODE([MODE]) 2073156283Srwatson# -------------------------- 2074156283Srwatson# implement the --with-pic flag 2075156283Srwatson# MODE is either `yes' or `no'. If omitted, it defaults to `both'. 2076156283SrwatsonAC_DEFUN([AC_LIBTOOL_PICMODE], 2077156283Srwatson[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 2078156283Srwatsonpic_mode=ifelse($#,1,$1,default) 2079156283Srwatson])# AC_LIBTOOL_PICMODE 2080156283Srwatson 2081156283Srwatson 2082156283Srwatson# AC_PROG_EGREP 2083156283Srwatson# ------------- 2084156283Srwatson# This is predefined starting with Autoconf 2.54, so this conditional 2085156283Srwatson# definition can be removed once we require Autoconf 2.54 or later. 2086156283Srwatsonm4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP], 2087156283Srwatson[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep], 2088156283Srwatson [if echo a | (grep -E '(a|b)') >/dev/null 2>&1 2089156283Srwatson then ac_cv_prog_egrep='grep -E' 2090156283Srwatson else ac_cv_prog_egrep='egrep' 2091156283Srwatson fi]) 2092156283Srwatson EGREP=$ac_cv_prog_egrep 2093156283Srwatson AC_SUBST([EGREP]) 2094156283Srwatson])]) 2095156283Srwatson 2096156283Srwatson 2097156283Srwatson# AC_PATH_TOOL_PREFIX 2098156283Srwatson# ------------------- 2099173143Srwatson# find a file program which can recognize shared library 2100156283SrwatsonAC_DEFUN([AC_PATH_TOOL_PREFIX], 2101156283Srwatson[AC_REQUIRE([AC_PROG_EGREP])dnl 2102156283SrwatsonAC_MSG_CHECKING([for $1]) 2103156283SrwatsonAC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 2104156283Srwatson[case $MAGIC_CMD in 2105156283Srwatson[[\\/*] | ?:[\\/]*]) 2106156283Srwatson lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. 2107156283Srwatson ;; 2108156283Srwatson*) 2109156283Srwatson lt_save_MAGIC_CMD="$MAGIC_CMD" 2110156283Srwatson lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 2111156283Srwatsondnl $ac_dummy forces splitting on constant user-supplied paths. 2112156283Srwatsondnl POSIX.2 word splitting is done only on the output of word expansions, 2113156283Srwatsondnl not every word. This closes a longstanding sh security hole. 2114156283Srwatson ac_dummy="ifelse([$2], , $PATH, [$2])" 2115156283Srwatson for ac_dir in $ac_dummy; do 2116156283Srwatson IFS="$lt_save_ifs" 2117156283Srwatson test -z "$ac_dir" && ac_dir=. 2118156283Srwatson if test -f $ac_dir/$1; then 2119156283Srwatson lt_cv_path_MAGIC_CMD="$ac_dir/$1" 2120156283Srwatson if test -n "$file_magic_test_file"; then 2121156283Srwatson case $deplibs_check_method in 2122156283Srwatson "file_magic "*) 2123156283Srwatson file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 2124156283Srwatson MAGIC_CMD="$lt_cv_path_MAGIC_CMD" 2125156283Srwatson if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 2126156283Srwatson $EGREP "$file_magic_regex" > /dev/null; then 2127156283Srwatson : 2128156283Srwatson else 2129156283Srwatson cat <<EOF 1>&2 2130156283Srwatson 2131156283Srwatson*** Warning: the command libtool uses to detect shared libraries, 2132156283Srwatson*** $file_magic_cmd, produces output that libtool cannot recognize. 2133156283Srwatson*** The result is that libtool may fail to recognize shared libraries 2134156283Srwatson*** as such. This will affect the creation of libtool libraries that 2135156283Srwatson*** depend on shared libraries, but programs linked with such libtool 2136156283Srwatson*** libraries will work regardless of this problem. Nevertheless, you 2137156283Srwatson*** may want to report the problem to your system manager and/or to 2138156283Srwatson*** bug-libtool@gnu.org 2139156283Srwatson 2140156283SrwatsonEOF 2141156283Srwatson fi ;; 2142156283Srwatson esac 2143156283Srwatson fi 2144156283Srwatson break 2145156283Srwatson fi 2146156283Srwatson done 2147156283Srwatson IFS="$lt_save_ifs" 2148156283Srwatson MAGIC_CMD="$lt_save_MAGIC_CMD" 2149156283Srwatson ;; 2150156283Srwatsonesac]) 2151156283SrwatsonMAGIC_CMD="$lt_cv_path_MAGIC_CMD" 2152156283Srwatsonif test -n "$MAGIC_CMD"; then 2153156283Srwatson AC_MSG_RESULT($MAGIC_CMD) 2154156283Srwatsonelse 2155156283Srwatson AC_MSG_RESULT(no) 2156156283Srwatsonfi 2157156283Srwatson])# AC_PATH_TOOL_PREFIX 2158156283Srwatson 2159156283Srwatson 2160156283Srwatson# AC_PATH_MAGIC 2161156283Srwatson# ------------- 2162173143Srwatson# find a file program which can recognize a shared library 2163156283SrwatsonAC_DEFUN([AC_PATH_MAGIC], 2164156283Srwatson[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 2165156283Srwatsonif test -z "$lt_cv_path_MAGIC_CMD"; then 2166156283Srwatson if test -n "$ac_tool_prefix"; then 2167156283Srwatson AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 2168156283Srwatson else 2169156283Srwatson MAGIC_CMD=: 2170156283Srwatson fi 2171156283Srwatsonfi 2172156283Srwatson])# AC_PATH_MAGIC 2173156283Srwatson 2174156283Srwatson 2175156283Srwatson# AC_PROG_LD 2176156283Srwatson# ---------- 2177156283Srwatson# find the pathname to the GNU or non-GNU linker 2178156283SrwatsonAC_DEFUN([AC_PROG_LD], 2179156283Srwatson[AC_ARG_WITH([gnu-ld], 2180156283Srwatson [AC_HELP_STRING([--with-gnu-ld], 2181156283Srwatson [assume the C compiler uses GNU ld @<:@default=no@:>@])], 2182156283Srwatson [test "$withval" = no || with_gnu_ld=yes], 2183156283Srwatson [with_gnu_ld=no]) 2184156283SrwatsonAC_REQUIRE([LT_AC_PROG_SED])dnl 2185156283SrwatsonAC_REQUIRE([AC_PROG_CC])dnl 2186156283SrwatsonAC_REQUIRE([AC_CANONICAL_HOST])dnl 2187156283SrwatsonAC_REQUIRE([AC_CANONICAL_BUILD])dnl 2188156283Srwatsonac_prog=ld 2189156283Srwatsonif test "$GCC" = yes; then 2190156283Srwatson # Check if gcc -print-prog-name=ld gives a path. 2191156283Srwatson AC_MSG_CHECKING([for ld used by $CC]) 2192156283Srwatson case $host in 2193156283Srwatson *-*-mingw*) 2194156283Srwatson # gcc leaves a trailing carriage return which upsets mingw 2195156283Srwatson ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 2196156283Srwatson *) 2197156283Srwatson ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 2198156283Srwatson esac 2199156283Srwatson case $ac_prog in 2200156283Srwatson # Accept absolute paths. 2201156283Srwatson [[\\/]]* | ?:[[\\/]]*) 2202156283Srwatson re_direlt='/[[^/]][[^/]]*/\.\./' 2203156283Srwatson # Canonicalize the pathname of ld 2204156283Srwatson ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` 2205156283Srwatson while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do 2206156283Srwatson ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` 2207156283Srwatson done 2208156283Srwatson test -z "$LD" && LD="$ac_prog" 2209156283Srwatson ;; 2210156283Srwatson "") 2211156283Srwatson # If it fails, then pretend we aren't using GCC. 2212156283Srwatson ac_prog=ld 2213156283Srwatson ;; 2214156283Srwatson *) 2215156283Srwatson # If it is relative, then search for the first ld in PATH. 2216156283Srwatson with_gnu_ld=unknown 2217156283Srwatson ;; 2218156283Srwatson esac 2219156283Srwatsonelif test "$with_gnu_ld" = yes; then 2220156283Srwatson AC_MSG_CHECKING([for GNU ld]) 2221156283Srwatsonelse 2222156283Srwatson AC_MSG_CHECKING([for non-GNU ld]) 2223156283Srwatsonfi 2224156283SrwatsonAC_CACHE_VAL(lt_cv_path_LD, 2225156283Srwatson[if test -z "$LD"; then 2226156283Srwatson lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 2227156283Srwatson for ac_dir in $PATH; do 2228156283Srwatson IFS="$lt_save_ifs" 2229156283Srwatson test -z "$ac_dir" && ac_dir=. 2230156283Srwatson if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 2231156283Srwatson lt_cv_path_LD="$ac_dir/$ac_prog" 2232156283Srwatson # Check to see if the program is GNU ld. I'd rather use --version, 2233156283Srwatson # but apparently some variants of GNU ld only accept -v. 2234156283Srwatson # Break only if it was the GNU/non-GNU ld that we prefer. 2235156283Srwatson case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 2236156283Srwatson *GNU* | *'with BFD'*) 2237156283Srwatson test "$with_gnu_ld" != no && break 2238156283Srwatson ;; 2239156283Srwatson *) 2240156283Srwatson test "$with_gnu_ld" != yes && break 2241156283Srwatson ;; 2242156283Srwatson esac 2243156283Srwatson fi 2244156283Srwatson done 2245156283Srwatson IFS="$lt_save_ifs" 2246156283Srwatsonelse 2247156283Srwatson lt_cv_path_LD="$LD" # Let the user override the test with a path. 2248156283Srwatsonfi]) 2249156283SrwatsonLD="$lt_cv_path_LD" 2250156283Srwatsonif test -n "$LD"; then 2251156283Srwatson AC_MSG_RESULT($LD) 2252156283Srwatsonelse 2253156283Srwatson AC_MSG_RESULT(no) 2254156283Srwatsonfi 2255156283Srwatsontest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 2256156283SrwatsonAC_PROG_LD_GNU 2257156283Srwatson])# AC_PROG_LD 2258156283Srwatson 2259156283Srwatson 2260156283Srwatson# AC_PROG_LD_GNU 2261156283Srwatson# -------------- 2262156283SrwatsonAC_DEFUN([AC_PROG_LD_GNU], 2263156283Srwatson[AC_REQUIRE([AC_PROG_EGREP])dnl 2264156283SrwatsonAC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 2265156283Srwatson[# I'd rather use --version here, but apparently some GNU lds only accept -v. 2266156283Srwatsoncase `$LD -v 2>&1 </dev/null` in 2267156283Srwatson*GNU* | *'with BFD'*) 2268156283Srwatson lt_cv_prog_gnu_ld=yes 2269156283Srwatson ;; 2270156283Srwatson*) 2271156283Srwatson lt_cv_prog_gnu_ld=no 2272156283Srwatson ;; 2273156283Srwatsonesac]) 2274156283Srwatsonwith_gnu_ld=$lt_cv_prog_gnu_ld 2275156283Srwatson])# AC_PROG_LD_GNU 2276156283Srwatson 2277156283Srwatson 2278156283Srwatson# AC_PROG_LD_RELOAD_FLAG 2279156283Srwatson# ---------------------- 2280156283Srwatson# find reload flag for linker 2281156283Srwatson# -- PORTME Some linkers may need a different reload flag. 2282156283SrwatsonAC_DEFUN([AC_PROG_LD_RELOAD_FLAG], 2283156283Srwatson[AC_CACHE_CHECK([for $LD option to reload object files], 2284156283Srwatson lt_cv_ld_reload_flag, 2285156283Srwatson [lt_cv_ld_reload_flag='-r']) 2286156283Srwatsonreload_flag=$lt_cv_ld_reload_flag 2287156283Srwatsoncase $reload_flag in 2288156283Srwatson"" | " "*) ;; 2289156283Srwatson*) reload_flag=" $reload_flag" ;; 2290156283Srwatsonesac 2291156283Srwatsonreload_cmds='$LD$reload_flag -o $output$reload_objs' 2292156283Srwatsoncase $host_os in 2293156283Srwatson darwin*) 2294156283Srwatson if test "$GCC" = yes; then 2295173143Srwatson reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' 2296156283Srwatson else 2297156283Srwatson reload_cmds='$LD$reload_flag -o $output$reload_objs' 2298156283Srwatson fi 2299156283Srwatson ;; 2300156283Srwatsonesac 2301156283Srwatson])# AC_PROG_LD_RELOAD_FLAG 2302156283Srwatson 2303156283Srwatson 2304156283Srwatson# AC_DEPLIBS_CHECK_METHOD 2305156283Srwatson# ----------------------- 2306156283Srwatson# how to check for library dependencies 2307156283Srwatson# -- PORTME fill in with the dynamic library characteristics 2308156283SrwatsonAC_DEFUN([AC_DEPLIBS_CHECK_METHOD], 2309173143Srwatson[AC_CACHE_CHECK([how to recognize dependent libraries], 2310156283Srwatsonlt_cv_deplibs_check_method, 2311156283Srwatson[lt_cv_file_magic_cmd='$MAGIC_CMD' 2312156283Srwatsonlt_cv_file_magic_test_file= 2313156283Srwatsonlt_cv_deplibs_check_method='unknown' 2314156283Srwatson# Need to set the preceding variable on all platforms that support 2315156283Srwatson# interlibrary dependencies. 2316156283Srwatson# 'none' -- dependencies not supported. 2317156283Srwatson# `unknown' -- same as none, but documents that we really don't know. 2318156283Srwatson# 'pass_all' -- all dependencies passed with no checks. 2319156283Srwatson# 'test_compile' -- check by making test program. 2320156283Srwatson# 'file_magic [[regex]]' -- check by looking for files in library path 2321156283Srwatson# which responds to the $file_magic_cmd with a given extended regex. 2322156283Srwatson# If you have `file' or equivalent on your system and you're not sure 2323156283Srwatson# whether `pass_all' will *always* work, you probably want this one. 2324156283Srwatson 2325156283Srwatsoncase $host_os in 2326156283Srwatsonaix4* | aix5*) 2327156283Srwatson lt_cv_deplibs_check_method=pass_all 2328156283Srwatson ;; 2329156283Srwatson 2330156283Srwatsonbeos*) 2331156283Srwatson lt_cv_deplibs_check_method=pass_all 2332156283Srwatson ;; 2333156283Srwatson 2334156283Srwatsonbsdi[[45]]*) 2335156283Srwatson lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 2336156283Srwatson lt_cv_file_magic_cmd='/usr/bin/file -L' 2337156283Srwatson lt_cv_file_magic_test_file=/shlib/libc.so 2338156283Srwatson ;; 2339156283Srwatson 2340156283Srwatsoncygwin*) 2341156283Srwatson # func_win32_libid is a shell function defined in ltmain.sh 2342156283Srwatson lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 2343156283Srwatson lt_cv_file_magic_cmd='func_win32_libid' 2344156283Srwatson ;; 2345156283Srwatson 2346156283Srwatsonmingw* | pw32*) 2347156283Srwatson # Base MSYS/MinGW do not provide the 'file' command needed by 2348173143Srwatson # func_win32_libid shell function, so use a weaker test based on 'objdump', 2349173143Srwatson # unless we find 'file', for example because we are cross-compiling. 2350173143Srwatson if ( file / ) >/dev/null 2>&1; then 2351173143Srwatson lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 2352173143Srwatson lt_cv_file_magic_cmd='func_win32_libid' 2353173143Srwatson else 2354173143Srwatson lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' 2355173143Srwatson lt_cv_file_magic_cmd='$OBJDUMP -f' 2356173143Srwatson fi 2357156283Srwatson ;; 2358156283Srwatson 2359156283Srwatsondarwin* | rhapsody*) 2360156283Srwatson lt_cv_deplibs_check_method=pass_all 2361156283Srwatson ;; 2362156283Srwatson 2363173143Srwatsonfreebsd* | dragonfly*) 2364156283Srwatson if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then 2365156283Srwatson case $host_cpu in 2366156283Srwatson i*86 ) 2367156283Srwatson # Not sure whether the presence of OpenBSD here was a mistake. 2368156283Srwatson # Let's accept both of them until this is cleared up. 2369156283Srwatson lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 2370156283Srwatson lt_cv_file_magic_cmd=/usr/bin/file 2371156283Srwatson lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 2372156283Srwatson ;; 2373156283Srwatson esac 2374156283Srwatson else 2375156283Srwatson lt_cv_deplibs_check_method=pass_all 2376156283Srwatson fi 2377156283Srwatson ;; 2378156283Srwatson 2379156283Srwatsongnu*) 2380156283Srwatson lt_cv_deplibs_check_method=pass_all 2381156283Srwatson ;; 2382156283Srwatson 2383156283Srwatsonhpux10.20* | hpux11*) 2384156283Srwatson lt_cv_file_magic_cmd=/usr/bin/file 2385156283Srwatson case $host_cpu in 2386156283Srwatson ia64*) 2387156283Srwatson lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 2388156283Srwatson lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 2389156283Srwatson ;; 2390156283Srwatson hppa*64*) 2391156283Srwatson [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]'] 2392156283Srwatson lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 2393156283Srwatson ;; 2394156283Srwatson *) 2395156283Srwatson lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' 2396156283Srwatson lt_cv_file_magic_test_file=/usr/lib/libc.sl 2397156283Srwatson ;; 2398156283Srwatson esac 2399156283Srwatson ;; 2400156283Srwatson 2401173143Srwatsoninterix[[3-9]]*) 2402173143Srwatson # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 2403173143Srwatson lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 2404173143Srwatson ;; 2405173143Srwatson 2406156283Srwatsonirix5* | irix6* | nonstopux*) 2407156283Srwatson case $LD in 2408156283Srwatson *-32|*"-32 ") libmagic=32-bit;; 2409156283Srwatson *-n32|*"-n32 ") libmagic=N32;; 2410156283Srwatson *-64|*"-64 ") libmagic=64-bit;; 2411156283Srwatson *) libmagic=never-match;; 2412156283Srwatson esac 2413156283Srwatson lt_cv_deplibs_check_method=pass_all 2414156283Srwatson ;; 2415156283Srwatson 2416156283Srwatson# This must be Linux ELF. 2417173143Srwatsonlinux* | k*bsd*-gnu) 2418156283Srwatson lt_cv_deplibs_check_method=pass_all 2419156283Srwatson ;; 2420156283Srwatson 2421156283Srwatsonnetbsd*) 2422156283Srwatson if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then 2423156283Srwatson lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 2424156283Srwatson else 2425156283Srwatson lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 2426156283Srwatson fi 2427156283Srwatson ;; 2428156283Srwatson 2429156283Srwatsonnewos6*) 2430156283Srwatson lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 2431156283Srwatson lt_cv_file_magic_cmd=/usr/bin/file 2432156283Srwatson lt_cv_file_magic_test_file=/usr/lib/libnls.so 2433156283Srwatson ;; 2434156283Srwatson 2435156283Srwatsonnto-qnx*) 2436156283Srwatson lt_cv_deplibs_check_method=unknown 2437156283Srwatson ;; 2438156283Srwatson 2439156283Srwatsonopenbsd*) 2440156283Srwatson if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 2441156283Srwatson lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 2442156283Srwatson else 2443156283Srwatson lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 2444156283Srwatson fi 2445156283Srwatson ;; 2446156283Srwatson 2447156283Srwatsonosf3* | osf4* | osf5*) 2448156283Srwatson lt_cv_deplibs_check_method=pass_all 2449156283Srwatson ;; 2450156283Srwatson 2451173143Srwatsonrdos*) 2452156283Srwatson lt_cv_deplibs_check_method=pass_all 2453156283Srwatson ;; 2454156283Srwatson 2455156283Srwatsonsolaris*) 2456156283Srwatson lt_cv_deplibs_check_method=pass_all 2457156283Srwatson ;; 2458156283Srwatson 2459173143Srwatsonsysv4 | sysv4.3*) 2460156283Srwatson case $host_vendor in 2461156283Srwatson motorola) 2462156283Srwatson 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]]' 2463156283Srwatson lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 2464156283Srwatson ;; 2465156283Srwatson ncr) 2466156283Srwatson lt_cv_deplibs_check_method=pass_all 2467156283Srwatson ;; 2468156283Srwatson sequent) 2469156283Srwatson lt_cv_file_magic_cmd='/bin/file' 2470156283Srwatson lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 2471156283Srwatson ;; 2472156283Srwatson sni) 2473156283Srwatson lt_cv_file_magic_cmd='/bin/file' 2474156283Srwatson lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 2475156283Srwatson lt_cv_file_magic_test_file=/lib/libc.so 2476156283Srwatson ;; 2477156283Srwatson siemens) 2478156283Srwatson lt_cv_deplibs_check_method=pass_all 2479156283Srwatson ;; 2480173143Srwatson pc) 2481173143Srwatson lt_cv_deplibs_check_method=pass_all 2482173143Srwatson ;; 2483156283Srwatson esac 2484156283Srwatson ;; 2485156283Srwatson 2486173143Srwatsonsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 2487156283Srwatson lt_cv_deplibs_check_method=pass_all 2488156283Srwatson ;; 2489156283Srwatsonesac 2490156283Srwatson]) 2491156283Srwatsonfile_magic_cmd=$lt_cv_file_magic_cmd 2492156283Srwatsondeplibs_check_method=$lt_cv_deplibs_check_method 2493156283Srwatsontest -z "$deplibs_check_method" && deplibs_check_method=unknown 2494156283Srwatson])# AC_DEPLIBS_CHECK_METHOD 2495156283Srwatson 2496156283Srwatson 2497156283Srwatson# AC_PROG_NM 2498156283Srwatson# ---------- 2499156283Srwatson# find the pathname to a BSD-compatible name lister 2500156283SrwatsonAC_DEFUN([AC_PROG_NM], 2501156283Srwatson[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM, 2502156283Srwatson[if test -n "$NM"; then 2503156283Srwatson # Let the user override the test. 2504156283Srwatson lt_cv_path_NM="$NM" 2505156283Srwatsonelse 2506173143Srwatson lt_nm_to_check="${ac_tool_prefix}nm" 2507173143Srwatson if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 2508173143Srwatson lt_nm_to_check="$lt_nm_to_check nm" 2509173143Srwatson fi 2510173143Srwatson for lt_tmp_nm in $lt_nm_to_check; do 2511173143Srwatson lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 2512173143Srwatson for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 2513173143Srwatson IFS="$lt_save_ifs" 2514173143Srwatson test -z "$ac_dir" && ac_dir=. 2515173143Srwatson tmp_nm="$ac_dir/$lt_tmp_nm" 2516173143Srwatson if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then 2517173143Srwatson # Check to see if the nm accepts a BSD-compat flag. 2518173143Srwatson # Adding the `sed 1q' prevents false positives on HP-UX, which says: 2519173143Srwatson # nm: unknown option "B" ignored 2520173143Srwatson # Tru64's nm complains that /dev/null is an invalid object file 2521173143Srwatson case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in 2522173143Srwatson */dev/null* | *'Invalid file or object type'*) 2523173143Srwatson lt_cv_path_NM="$tmp_nm -B" 2524156283Srwatson break 2525156283Srwatson ;; 2526156283Srwatson *) 2527173143Srwatson case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in 2528173143Srwatson */dev/null*) 2529173143Srwatson lt_cv_path_NM="$tmp_nm -p" 2530173143Srwatson break 2531173143Srwatson ;; 2532173143Srwatson *) 2533173143Srwatson lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 2534173143Srwatson continue # so that we can try to find one that supports BSD flags 2535173143Srwatson ;; 2536173143Srwatson esac 2537156283Srwatson ;; 2538156283Srwatson esac 2539173143Srwatson fi 2540173143Srwatson done 2541173143Srwatson IFS="$lt_save_ifs" 2542156283Srwatson done 2543156283Srwatson test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm 2544156283Srwatsonfi]) 2545156283SrwatsonNM="$lt_cv_path_NM" 2546156283Srwatson])# AC_PROG_NM 2547156283Srwatson 2548156283Srwatson 2549156283Srwatson# AC_CHECK_LIBM 2550156283Srwatson# ------------- 2551156283Srwatson# check for math library 2552156283SrwatsonAC_DEFUN([AC_CHECK_LIBM], 2553156283Srwatson[AC_REQUIRE([AC_CANONICAL_HOST])dnl 2554156283SrwatsonLIBM= 2555156283Srwatsoncase $host in 2556156283Srwatson*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) 2557156283Srwatson # These system don't have libm, or don't need it 2558156283Srwatson ;; 2559156283Srwatson*-ncr-sysv4.3*) 2560156283Srwatson AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") 2561156283Srwatson AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 2562156283Srwatson ;; 2563156283Srwatson*) 2564156283Srwatson AC_CHECK_LIB(m, cos, LIBM="-lm") 2565156283Srwatson ;; 2566156283Srwatsonesac 2567156283Srwatson])# AC_CHECK_LIBM 2568156283Srwatson 2569156283Srwatson 2570156283Srwatson# AC_LIBLTDL_CONVENIENCE([DIRECTORY]) 2571156283Srwatson# ----------------------------------- 2572156283Srwatson# sets LIBLTDL to the link flags for the libltdl convenience library and 2573156283Srwatson# LTDLINCL to the include flags for the libltdl header and adds 2574156283Srwatson# --enable-ltdl-convenience to the configure arguments. Note that 2575156283Srwatson# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, 2576156283Srwatson# it is assumed to be `libltdl'. LIBLTDL will be prefixed with 2577156283Srwatson# '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/' 2578156283Srwatson# (note the single quotes!). If your package is not flat and you're not 2579156283Srwatson# using automake, define top_builddir and top_srcdir appropriately in 2580156283Srwatson# the Makefiles. 2581156283SrwatsonAC_DEFUN([AC_LIBLTDL_CONVENIENCE], 2582156283Srwatson[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 2583156283Srwatson case $enable_ltdl_convenience in 2584156283Srwatson no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; 2585156283Srwatson "") enable_ltdl_convenience=yes 2586156283Srwatson ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; 2587156283Srwatson esac 2588156283Srwatson LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la 2589156283Srwatson LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) 2590156283Srwatson # For backwards non-gettext consistent compatibility... 2591156283Srwatson INCLTDL="$LTDLINCL" 2592156283Srwatson])# AC_LIBLTDL_CONVENIENCE 2593156283Srwatson 2594156283Srwatson 2595156283Srwatson# AC_LIBLTDL_INSTALLABLE([DIRECTORY]) 2596156283Srwatson# ----------------------------------- 2597156283Srwatson# sets LIBLTDL to the link flags for the libltdl installable library and 2598156283Srwatson# LTDLINCL to the include flags for the libltdl header and adds 2599156283Srwatson# --enable-ltdl-install to the configure arguments. Note that 2600156283Srwatson# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, 2601156283Srwatson# and an installed libltdl is not found, it is assumed to be `libltdl'. 2602156283Srwatson# LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with 2603156283Srwatson# '${top_srcdir}/' (note the single quotes!). If your package is not 2604156283Srwatson# flat and you're not using automake, define top_builddir and top_srcdir 2605156283Srwatson# appropriately in the Makefiles. 2606156283Srwatson# In the future, this macro may have to be called after AC_PROG_LIBTOOL. 2607156283SrwatsonAC_DEFUN([AC_LIBLTDL_INSTALLABLE], 2608156283Srwatson[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 2609156283Srwatson AC_CHECK_LIB(ltdl, lt_dlinit, 2610156283Srwatson [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no], 2611156283Srwatson [if test x"$enable_ltdl_install" = xno; then 2612156283Srwatson AC_MSG_WARN([libltdl not installed, but installation disabled]) 2613156283Srwatson else 2614156283Srwatson enable_ltdl_install=yes 2615156283Srwatson fi 2616156283Srwatson ]) 2617156283Srwatson if test x"$enable_ltdl_install" = x"yes"; then 2618156283Srwatson ac_configure_args="$ac_configure_args --enable-ltdl-install" 2619156283Srwatson LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la 2620156283Srwatson LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) 2621156283Srwatson else 2622156283Srwatson ac_configure_args="$ac_configure_args --enable-ltdl-install=no" 2623156283Srwatson LIBLTDL="-lltdl" 2624156283Srwatson LTDLINCL= 2625156283Srwatson fi 2626156283Srwatson # For backwards non-gettext consistent compatibility... 2627156283Srwatson INCLTDL="$LTDLINCL" 2628156283Srwatson])# AC_LIBLTDL_INSTALLABLE 2629156283Srwatson 2630156283Srwatson 2631156283Srwatson# AC_LIBTOOL_CXX 2632156283Srwatson# -------------- 2633156283Srwatson# enable support for C++ libraries 2634156283SrwatsonAC_DEFUN([AC_LIBTOOL_CXX], 2635156283Srwatson[AC_REQUIRE([_LT_AC_LANG_CXX]) 2636156283Srwatson])# AC_LIBTOOL_CXX 2637156283Srwatson 2638156283Srwatson 2639156283Srwatson# _LT_AC_LANG_CXX 2640156283Srwatson# --------------- 2641156283SrwatsonAC_DEFUN([_LT_AC_LANG_CXX], 2642156283Srwatson[AC_REQUIRE([AC_PROG_CXX]) 2643156283SrwatsonAC_REQUIRE([_LT_AC_PROG_CXXCPP]) 2644156283Srwatson_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX]) 2645156283Srwatson])# _LT_AC_LANG_CXX 2646156283Srwatson 2647156283Srwatson# _LT_AC_PROG_CXXCPP 2648173143Srwatson# ------------------ 2649156283SrwatsonAC_DEFUN([_LT_AC_PROG_CXXCPP], 2650156283Srwatson[ 2651156283SrwatsonAC_REQUIRE([AC_PROG_CXX]) 2652156283Srwatsonif test -n "$CXX" && ( test "X$CXX" != "Xno" && 2653156283Srwatson ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || 2654156283Srwatson (test "X$CXX" != "Xg++"))) ; then 2655156283Srwatson AC_PROG_CXXCPP 2656156283Srwatsonfi 2657156283Srwatson])# _LT_AC_PROG_CXXCPP 2658156283Srwatson 2659156283Srwatson# AC_LIBTOOL_F77 2660156283Srwatson# -------------- 2661156283Srwatson# enable support for Fortran 77 libraries 2662156283SrwatsonAC_DEFUN([AC_LIBTOOL_F77], 2663156283Srwatson[AC_REQUIRE([_LT_AC_LANG_F77]) 2664156283Srwatson])# AC_LIBTOOL_F77 2665156283Srwatson 2666156283Srwatson 2667156283Srwatson# _LT_AC_LANG_F77 2668156283Srwatson# --------------- 2669156283SrwatsonAC_DEFUN([_LT_AC_LANG_F77], 2670156283Srwatson[AC_REQUIRE([AC_PROG_F77]) 2671156283Srwatson_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77]) 2672156283Srwatson])# _LT_AC_LANG_F77 2673156283Srwatson 2674156283Srwatson 2675156283Srwatson# AC_LIBTOOL_GCJ 2676156283Srwatson# -------------- 2677156283Srwatson# enable support for GCJ libraries 2678156283SrwatsonAC_DEFUN([AC_LIBTOOL_GCJ], 2679156283Srwatson[AC_REQUIRE([_LT_AC_LANG_GCJ]) 2680156283Srwatson])# AC_LIBTOOL_GCJ 2681156283Srwatson 2682156283Srwatson 2683156283Srwatson# _LT_AC_LANG_GCJ 2684156283Srwatson# --------------- 2685156283SrwatsonAC_DEFUN([_LT_AC_LANG_GCJ], 2686156283Srwatson[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[], 2687156283Srwatson [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[], 2688156283Srwatson [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[], 2689156283Srwatson [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])], 2690156283Srwatson [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])], 2691156283Srwatson [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])]) 2692156283Srwatson_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ]) 2693156283Srwatson])# _LT_AC_LANG_GCJ 2694156283Srwatson 2695156283Srwatson 2696156283Srwatson# AC_LIBTOOL_RC 2697173143Srwatson# ------------- 2698156283Srwatson# enable support for Windows resource files 2699156283SrwatsonAC_DEFUN([AC_LIBTOOL_RC], 2700156283Srwatson[AC_REQUIRE([LT_AC_PROG_RC]) 2701156283Srwatson_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC]) 2702156283Srwatson])# AC_LIBTOOL_RC 2703156283Srwatson 2704156283Srwatson 2705156283Srwatson# AC_LIBTOOL_LANG_C_CONFIG 2706156283Srwatson# ------------------------ 2707156283Srwatson# Ensure that the configuration vars for the C compiler are 2708156283Srwatson# suitably defined. Those variables are subsequently used by 2709156283Srwatson# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 2710156283SrwatsonAC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG]) 2711156283SrwatsonAC_DEFUN([_LT_AC_LANG_C_CONFIG], 2712156283Srwatson[lt_save_CC="$CC" 2713156283SrwatsonAC_LANG_PUSH(C) 2714156283Srwatson 2715156283Srwatson# Source file extension for C test sources. 2716156283Srwatsonac_ext=c 2717156283Srwatson 2718156283Srwatson# Object file extension for compiled C test sources. 2719156283Srwatsonobjext=o 2720156283Srwatson_LT_AC_TAGVAR(objext, $1)=$objext 2721156283Srwatson 2722156283Srwatson# Code to be used in simple compile tests 2723173143Srwatsonlt_simple_compile_test_code="int some_variable = 0;" 2724156283Srwatson 2725156283Srwatson# Code to be used in simple link tests 2726173143Srwatsonlt_simple_link_test_code='int main(){return(0);}' 2727156283Srwatson 2728156283Srwatson_LT_AC_SYS_COMPILER 2729156283Srwatson 2730156283Srwatson# save warnings/boilerplate of simple test code 2731156283Srwatson_LT_COMPILER_BOILERPLATE 2732156283Srwatson_LT_LINKER_BOILERPLATE 2733156283Srwatson 2734156283SrwatsonAC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) 2735156283SrwatsonAC_LIBTOOL_PROG_COMPILER_PIC($1) 2736156283SrwatsonAC_LIBTOOL_PROG_CC_C_O($1) 2737156283SrwatsonAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) 2738156283SrwatsonAC_LIBTOOL_PROG_LD_SHLIBS($1) 2739156283SrwatsonAC_LIBTOOL_SYS_DYNAMIC_LINKER($1) 2740156283SrwatsonAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) 2741156283SrwatsonAC_LIBTOOL_SYS_LIB_STRIP 2742173143SrwatsonAC_LIBTOOL_DLOPEN_SELF 2743156283Srwatson 2744173143Srwatson# Report which library types will actually be built 2745156283SrwatsonAC_MSG_CHECKING([if libtool supports shared libraries]) 2746156283SrwatsonAC_MSG_RESULT([$can_build_shared]) 2747156283Srwatson 2748156283SrwatsonAC_MSG_CHECKING([whether to build shared libraries]) 2749156283Srwatsontest "$can_build_shared" = "no" && enable_shared=no 2750156283Srwatson 2751156283Srwatson# On AIX, shared libraries and static libraries use the same namespace, and 2752156283Srwatson# are all built from PIC. 2753156283Srwatsoncase $host_os in 2754156283Srwatsonaix3*) 2755156283Srwatson test "$enable_shared" = yes && enable_static=no 2756156283Srwatson if test -n "$RANLIB"; then 2757156283Srwatson archive_cmds="$archive_cmds~\$RANLIB \$lib" 2758156283Srwatson postinstall_cmds='$RANLIB $lib' 2759156283Srwatson fi 2760156283Srwatson ;; 2761156283Srwatson 2762156283Srwatsonaix4* | aix5*) 2763156283Srwatson if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 2764156283Srwatson test "$enable_shared" = yes && enable_static=no 2765156283Srwatson fi 2766156283Srwatson ;; 2767156283Srwatsonesac 2768156283SrwatsonAC_MSG_RESULT([$enable_shared]) 2769156283Srwatson 2770156283SrwatsonAC_MSG_CHECKING([whether to build static libraries]) 2771156283Srwatson# Make sure either enable_shared or enable_static is yes. 2772156283Srwatsontest "$enable_shared" = yes || enable_static=yes 2773156283SrwatsonAC_MSG_RESULT([$enable_static]) 2774156283Srwatson 2775156283SrwatsonAC_LIBTOOL_CONFIG($1) 2776156283Srwatson 2777156283SrwatsonAC_LANG_POP 2778156283SrwatsonCC="$lt_save_CC" 2779156283Srwatson])# AC_LIBTOOL_LANG_C_CONFIG 2780156283Srwatson 2781156283Srwatson 2782156283Srwatson# AC_LIBTOOL_LANG_CXX_CONFIG 2783156283Srwatson# -------------------------- 2784156283Srwatson# Ensure that the configuration vars for the C compiler are 2785156283Srwatson# suitably defined. Those variables are subsequently used by 2786156283Srwatson# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 2787156283SrwatsonAC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)]) 2788156283SrwatsonAC_DEFUN([_LT_AC_LANG_CXX_CONFIG], 2789156283Srwatson[AC_LANG_PUSH(C++) 2790156283SrwatsonAC_REQUIRE([AC_PROG_CXX]) 2791156283SrwatsonAC_REQUIRE([_LT_AC_PROG_CXXCPP]) 2792156283Srwatson 2793156283Srwatson_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 2794156283Srwatson_LT_AC_TAGVAR(allow_undefined_flag, $1)= 2795156283Srwatson_LT_AC_TAGVAR(always_export_symbols, $1)=no 2796156283Srwatson_LT_AC_TAGVAR(archive_expsym_cmds, $1)= 2797156283Srwatson_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= 2798156283Srwatson_LT_AC_TAGVAR(hardcode_direct, $1)=no 2799156283Srwatson_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= 2800156283Srwatson_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 2801156283Srwatson_LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 2802156283Srwatson_LT_AC_TAGVAR(hardcode_minus_L, $1)=no 2803173143Srwatson_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 2804156283Srwatson_LT_AC_TAGVAR(hardcode_automatic, $1)=no 2805156283Srwatson_LT_AC_TAGVAR(module_cmds, $1)= 2806156283Srwatson_LT_AC_TAGVAR(module_expsym_cmds, $1)= 2807156283Srwatson_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown 2808156283Srwatson_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 2809156283Srwatson_LT_AC_TAGVAR(no_undefined_flag, $1)= 2810156283Srwatson_LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 2811156283Srwatson_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no 2812156283Srwatson 2813156283Srwatson# Dependencies to place before and after the object being linked: 2814156283Srwatson_LT_AC_TAGVAR(predep_objects, $1)= 2815156283Srwatson_LT_AC_TAGVAR(postdep_objects, $1)= 2816156283Srwatson_LT_AC_TAGVAR(predeps, $1)= 2817156283Srwatson_LT_AC_TAGVAR(postdeps, $1)= 2818156283Srwatson_LT_AC_TAGVAR(compiler_lib_search_path, $1)= 2819156283Srwatson 2820156283Srwatson# Source file extension for C++ test sources. 2821156283Srwatsonac_ext=cpp 2822156283Srwatson 2823156283Srwatson# Object file extension for compiled C++ test sources. 2824156283Srwatsonobjext=o 2825156283Srwatson_LT_AC_TAGVAR(objext, $1)=$objext 2826156283Srwatson 2827156283Srwatson# Code to be used in simple compile tests 2828173143Srwatsonlt_simple_compile_test_code="int some_variable = 0;" 2829156283Srwatson 2830156283Srwatson# Code to be used in simple link tests 2831173143Srwatsonlt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 2832156283Srwatson 2833156283Srwatson# ltmain only uses $CC for tagged configurations so make sure $CC is set. 2834156283Srwatson_LT_AC_SYS_COMPILER 2835156283Srwatson 2836156283Srwatson# save warnings/boilerplate of simple test code 2837156283Srwatson_LT_COMPILER_BOILERPLATE 2838156283Srwatson_LT_LINKER_BOILERPLATE 2839156283Srwatson 2840156283Srwatson# Allow CC to be a program name with arguments. 2841156283Srwatsonlt_save_CC=$CC 2842156283Srwatsonlt_save_LD=$LD 2843156283Srwatsonlt_save_GCC=$GCC 2844156283SrwatsonGCC=$GXX 2845156283Srwatsonlt_save_with_gnu_ld=$with_gnu_ld 2846156283Srwatsonlt_save_path_LD=$lt_cv_path_LD 2847156283Srwatsonif test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 2848156283Srwatson lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 2849156283Srwatsonelse 2850173143Srwatson $as_unset lt_cv_prog_gnu_ld 2851156283Srwatsonfi 2852156283Srwatsonif test -n "${lt_cv_path_LDCXX+set}"; then 2853156283Srwatson lt_cv_path_LD=$lt_cv_path_LDCXX 2854156283Srwatsonelse 2855173143Srwatson $as_unset lt_cv_path_LD 2856156283Srwatsonfi 2857156283Srwatsontest -z "${LDCXX+set}" || LD=$LDCXX 2858156283SrwatsonCC=${CXX-"c++"} 2859156283Srwatsoncompiler=$CC 2860156283Srwatson_LT_AC_TAGVAR(compiler, $1)=$CC 2861156283Srwatson_LT_CC_BASENAME([$compiler]) 2862156283Srwatson 2863156283Srwatson# We don't want -fno-exception wen compiling C++ code, so set the 2864156283Srwatson# no_builtin_flag separately 2865156283Srwatsonif test "$GXX" = yes; then 2866156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 2867156283Srwatsonelse 2868156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 2869156283Srwatsonfi 2870156283Srwatson 2871156283Srwatsonif test "$GXX" = yes; then 2872156283Srwatson # Set up default GNU C++ configuration 2873156283Srwatson 2874156283Srwatson AC_PROG_LD 2875156283Srwatson 2876156283Srwatson # Check if GNU C++ uses GNU ld as the underlying linker, since the 2877156283Srwatson # archiving commands below assume that GNU ld is being used. 2878156283Srwatson if test "$with_gnu_ld" = yes; then 2879156283Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 2880156283Srwatson _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' 2881156283Srwatson 2882156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 2883156283Srwatson _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 2884156283Srwatson 2885156283Srwatson # If archive_cmds runs LD, not CC, wlarc should be empty 2886156283Srwatson # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 2887156283Srwatson # investigate it a little bit more. (MM) 2888156283Srwatson wlarc='${wl}' 2889156283Srwatson 2890156283Srwatson # ancient GNU ld didn't support --whole-archive et. al. 2891156283Srwatson if eval "`$CC -print-prog-name=ld` --help 2>&1" | \ 2892156283Srwatson grep 'no-whole-archive' > /dev/null; then 2893156283Srwatson _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 2894156283Srwatson else 2895156283Srwatson _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 2896156283Srwatson fi 2897156283Srwatson else 2898156283Srwatson with_gnu_ld=no 2899156283Srwatson wlarc= 2900156283Srwatson 2901156283Srwatson # A generic and very simple default shared library creation 2902156283Srwatson # command for GNU C++ for the case where it uses the native 2903156283Srwatson # linker, instead of GNU ld. If possible, this setting should 2904156283Srwatson # overridden to take advantage of the native linker features on 2905156283Srwatson # the platform it is being used on. 2906156283Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 2907156283Srwatson fi 2908156283Srwatson 2909156283Srwatson # Commands to make compiler produce verbose output that lists 2910156283Srwatson # what "hidden" libraries, object files and flags are used when 2911156283Srwatson # linking a shared library. 2912156283Srwatson output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' 2913156283Srwatson 2914156283Srwatsonelse 2915156283Srwatson GXX=no 2916156283Srwatson with_gnu_ld=no 2917156283Srwatson wlarc= 2918156283Srwatsonfi 2919156283Srwatson 2920156283Srwatson# PORTME: fill in a description of your system's C++ link characteristics 2921156283SrwatsonAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 2922156283Srwatson_LT_AC_TAGVAR(ld_shlibs, $1)=yes 2923156283Srwatsoncase $host_os in 2924156283Srwatson aix3*) 2925156283Srwatson # FIXME: insert proper C++ library support 2926156283Srwatson _LT_AC_TAGVAR(ld_shlibs, $1)=no 2927156283Srwatson ;; 2928156283Srwatson aix4* | aix5*) 2929156283Srwatson if test "$host_cpu" = ia64; then 2930156283Srwatson # On IA64, the linker does run time linking by default, so we don't 2931156283Srwatson # have to do anything special. 2932156283Srwatson aix_use_runtimelinking=no 2933156283Srwatson exp_sym_flag='-Bexport' 2934156283Srwatson no_entry_flag="" 2935156283Srwatson else 2936156283Srwatson aix_use_runtimelinking=no 2937156283Srwatson 2938156283Srwatson # Test if we are trying to use run time linking or normal 2939156283Srwatson # AIX style linking. If -brtl is somewhere in LDFLAGS, we 2940156283Srwatson # need to do runtime linking. 2941156283Srwatson case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*) 2942156283Srwatson for ld_flag in $LDFLAGS; do 2943156283Srwatson case $ld_flag in 2944156283Srwatson *-brtl*) 2945156283Srwatson aix_use_runtimelinking=yes 2946156283Srwatson break 2947156283Srwatson ;; 2948156283Srwatson esac 2949156283Srwatson done 2950173143Srwatson ;; 2951156283Srwatson esac 2952156283Srwatson 2953156283Srwatson exp_sym_flag='-bexport' 2954156283Srwatson no_entry_flag='-bnoentry' 2955156283Srwatson fi 2956156283Srwatson 2957156283Srwatson # When large executables or shared objects are built, AIX ld can 2958156283Srwatson # have problems creating the table of contents. If linking a library 2959156283Srwatson # or program results in "error TOC overflow" add -mminimal-toc to 2960156283Srwatson # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 2961156283Srwatson # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 2962156283Srwatson 2963156283Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='' 2964156283Srwatson _LT_AC_TAGVAR(hardcode_direct, $1)=yes 2965156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' 2966156283Srwatson _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 2967156283Srwatson 2968156283Srwatson if test "$GXX" = yes; then 2969156283Srwatson case $host_os in aix4.[[012]]|aix4.[[012]].*) 2970156283Srwatson # We only want to do this on AIX 4.2 and lower, the check 2971156283Srwatson # below for broken collect2 doesn't work under 4.3+ 2972156283Srwatson collect2name=`${CC} -print-prog-name=collect2` 2973156283Srwatson if test -f "$collect2name" && \ 2974156283Srwatson strings "$collect2name" | grep resolve_lib_name >/dev/null 2975156283Srwatson then 2976156283Srwatson # We have reworked collect2 2977173143Srwatson : 2978156283Srwatson else 2979156283Srwatson # We have old collect2 2980156283Srwatson _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported 2981156283Srwatson # It fails to find uninstalled libraries when the uninstalled 2982156283Srwatson # path is not listed in the libpath. Setting hardcode_minus_L 2983156283Srwatson # to unsupported forces relinking 2984156283Srwatson _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 2985156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 2986156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 2987156283Srwatson fi 2988173143Srwatson ;; 2989156283Srwatson esac 2990156283Srwatson shared_flag='-shared' 2991156283Srwatson if test "$aix_use_runtimelinking" = yes; then 2992156283Srwatson shared_flag="$shared_flag "'${wl}-G' 2993156283Srwatson fi 2994156283Srwatson else 2995156283Srwatson # not using gcc 2996156283Srwatson if test "$host_cpu" = ia64; then 2997156283Srwatson # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 2998156283Srwatson # chokes on -Wl,-G. The following line is correct: 2999156283Srwatson shared_flag='-G' 3000156283Srwatson else 3001156283Srwatson if test "$aix_use_runtimelinking" = yes; then 3002156283Srwatson shared_flag='${wl}-G' 3003156283Srwatson else 3004156283Srwatson shared_flag='${wl}-bM:SRE' 3005156283Srwatson fi 3006156283Srwatson fi 3007156283Srwatson fi 3008156283Srwatson 3009156283Srwatson # It seems that -bexpall does not export symbols beginning with 3010156283Srwatson # underscore (_), so it is better to generate a list of symbols to export. 3011156283Srwatson _LT_AC_TAGVAR(always_export_symbols, $1)=yes 3012156283Srwatson if test "$aix_use_runtimelinking" = yes; then 3013156283Srwatson # Warning - without using the other runtime loading flags (-brtl), 3014156283Srwatson # -berok will link without error, but may produce a broken library. 3015156283Srwatson _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' 3016156283Srwatson # Determine the default libpath from the value encoded in an empty executable. 3017156283Srwatson _LT_AC_SYS_LIBPATH_AIX 3018156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 3019156283Srwatson 3020173143Srwatson _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" 3021156283Srwatson else 3022156283Srwatson if test "$host_cpu" = ia64; then 3023156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 3024156283Srwatson _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 3025173143Srwatson _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" 3026156283Srwatson else 3027156283Srwatson # Determine the default libpath from the value encoded in an empty executable. 3028156283Srwatson _LT_AC_SYS_LIBPATH_AIX 3029156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 3030156283Srwatson # Warning - without using the other run time loading flags, 3031156283Srwatson # -berok will link without error, but may produce a broken library. 3032156283Srwatson _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 3033156283Srwatson _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 3034156283Srwatson # Exported symbols can be pulled into shared objects from archives 3035173143Srwatson _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 3036156283Srwatson _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes 3037156283Srwatson # This is similar to how AIX traditionally builds its shared libraries. 3038173143Srwatson _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' 3039156283Srwatson fi 3040156283Srwatson fi 3041156283Srwatson ;; 3042173143Srwatson 3043173143Srwatson beos*) 3044173143Srwatson if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 3045173143Srwatson _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 3046173143Srwatson # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 3047173143Srwatson # support --undefined. This deserves some investigation. FIXME 3048173143Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 3049173143Srwatson else 3050173143Srwatson _LT_AC_TAGVAR(ld_shlibs, $1)=no 3051173143Srwatson fi 3052173143Srwatson ;; 3053173143Srwatson 3054156283Srwatson chorus*) 3055156283Srwatson case $cc_basename in 3056156283Srwatson *) 3057156283Srwatson # FIXME: insert proper C++ library support 3058156283Srwatson _LT_AC_TAGVAR(ld_shlibs, $1)=no 3059156283Srwatson ;; 3060156283Srwatson esac 3061156283Srwatson ;; 3062156283Srwatson 3063156283Srwatson cygwin* | mingw* | pw32*) 3064156283Srwatson # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 3065156283Srwatson # as there is no search path for DLLs. 3066156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 3067156283Srwatson _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 3068156283Srwatson _LT_AC_TAGVAR(always_export_symbols, $1)=no 3069156283Srwatson _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 3070156283Srwatson 3071156283Srwatson if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then 3072173143Srwatson _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' 3073156283Srwatson # If the export-symbols file already is a .def file (1st line 3074156283Srwatson # is EXPORTS), use it as is; otherwise, prepend... 3075156283Srwatson _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 3076156283Srwatson cp $export_symbols $output_objdir/$soname.def; 3077156283Srwatson else 3078156283Srwatson echo EXPORTS > $output_objdir/$soname.def; 3079156283Srwatson cat $export_symbols >> $output_objdir/$soname.def; 3080156283Srwatson fi~ 3081173143Srwatson $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' 3082156283Srwatson else 3083156283Srwatson _LT_AC_TAGVAR(ld_shlibs, $1)=no 3084156283Srwatson fi 3085156283Srwatson ;; 3086156283Srwatson darwin* | rhapsody*) 3087156283Srwatson case $host_os in 3088156283Srwatson rhapsody* | darwin1.[[012]]) 3089156283Srwatson _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' 3090156283Srwatson ;; 3091156283Srwatson *) # Darwin 1.3 on 3092156283Srwatson if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then 3093156283Srwatson _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' 3094156283Srwatson else 3095156283Srwatson case ${MACOSX_DEPLOYMENT_TARGET} in 3096156283Srwatson 10.[[012]]) 3097156283Srwatson _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' 3098156283Srwatson ;; 3099156283Srwatson 10.*) 3100156283Srwatson _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup' 3101156283Srwatson ;; 3102156283Srwatson esac 3103156283Srwatson fi 3104156283Srwatson ;; 3105156283Srwatson esac 3106156283Srwatson _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 3107156283Srwatson _LT_AC_TAGVAR(hardcode_direct, $1)=no 3108156283Srwatson _LT_AC_TAGVAR(hardcode_automatic, $1)=yes 3109156283Srwatson _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 3110156283Srwatson _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' 3111156283Srwatson _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 3112156283Srwatson 3113156283Srwatson if test "$GXX" = yes ; then 3114156283Srwatson lt_int_apple_cc_single_mod=no 3115156283Srwatson output_verbose_link_cmd='echo' 3116156283Srwatson if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then 3117156283Srwatson lt_int_apple_cc_single_mod=yes 3118156283Srwatson fi 3119156283Srwatson if test "X$lt_int_apple_cc_single_mod" = Xyes ; then 3120156283Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' 3121156283Srwatson else 3122156283Srwatson _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' 3123156283Srwatson fi 3124156283Srwatson _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' 3125156283Srwatson # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds 3126156283Srwatson if test "X$lt_int_apple_cc_single_mod" = Xyes ; then 3127156283Srwatson _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}' 3128156283Srwatson else 3129156283Srwatson _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}' 3130156283Srwatson fi 3131156283Srwatson _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}' 3132156283Srwatson else 3133156283Srwatson case $cc_basename in 3134156283Srwatson xlc*) 3135156283Srwatson output_verbose_link_cmd='echo' 3136173143Srwatson _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` $xlcverstring' 3137156283Srwatson _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' 3138156283Srwatson # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds 3139173143Srwatson _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 $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' 3140156283Srwatson _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}' 3141156283Srwatson ;; 3142156283Srwatson *) 3143156283Srwatson _LT_AC_TAGVAR(ld_shlibs, $1)=no 3144156283Srwatson ;; 3145156283Srwatson esac 3146156283Srwatson fi 3147156283Srwatson ;; 3148156283Srwatson 3149156283Srwatson dgux*) 3150156283Srwatson case $cc_basename in 3151156283Srwatson ec++*) 3152156283Srwatson # FIXME: insert proper C++ library support 3153156283Srwatson _LT_AC_TAGVAR(ld_shlibs, $1)=no 3154156283Srwatson ;; 3155156283Srwatson ghcx*) 3156156283Srwatson # Green Hills C++ Compiler 3157156283Srwatson # FIXME: insert proper C++ library support 3158156283Srwatson _LT_AC_TAGVAR(ld_shlibs, $1)=no 3159156283Srwatson ;; 3160156283Srwatson *) 3161156283Srwatson # FIXME: insert proper C++ library support 3162156283Srwatson _LT_AC_TAGVAR(ld_shlibs, $1)=no 3163156283Srwatson ;; 3164156283Srwatson esac 3165156283Srwatson ;; 3166156283Srwatson freebsd[[12]]*) 3167156283Srwatson # C++ shared libraries reported to be fairly broken before switch to ELF 3168156283Srwatson _LT_AC_TAGVAR(ld_shlibs, $1)=no 3169156283Srwatson ;; 3170156283Srwatson freebsd-elf*) 3171156283Srwatson _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 3172156283Srwatson ;; 3173173143Srwatson freebsd* | dragonfly*) 3174156283Srwatson # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 3175156283Srwatson # conventions 3176156283Srwatson _LT_AC_TAGVAR(ld_shlibs, $1)=yes 3177156283Srwatson ;; 3178156283Srwatson gnu*) 3179156283Srwatson ;; 3180156283Srwatson hpux9*) 3181156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 3182156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 3183156283Srwatson _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 3184156283Srwatson _LT_AC_TAGVAR(hardcode_direct, $1)=yes 3185156283Srwatson _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 3186156283Srwatson # but as the default 3187156283Srwatson # location of the library. 3188156283Srwatson 3189156283Srwatson case $cc_basename in 3190156283Srwatson CC*) 3191156283Srwatson # FIXME: insert proper C++ library support 3192156283Srwatson _LT_AC_TAGVAR(ld_shlibs, $1)=no 3193156283Srwatson ;; 3194156283Srwatson aCC*) 3195156283Srwatson _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' 3196156283Srwatson # Commands to make compiler produce verbose output that lists 3197156283Srwatson # what "hidden" libraries, object files and flags are used when 3198156283Srwatson # linking a shared library. 3199156283Srwatson # 3200156283Srwatson # There doesn't appear to be a way to prevent this compiler from 3201156283Srwatson # explicitly linking system object files so we need to strip them 3202156283Srwatson # from the output so that they don't get included in the library 3203156283Srwatson # dependencies. 3204156283Srwatson 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' 3205156283Srwatson ;; 3206156283Srwatson *) 3207156283Srwatson if test "$GXX" = yes; then 3208156283Srwatson _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' 3209156283Srwatson else 3210156283Srwatson # FIXME: insert proper C++ library support 3211156283Srwatson _LT_AC_TAGVAR(ld_shlibs, $1)=no 3212156283Srwatson fi 3213156283Srwatson ;; 3214156283Srwatson esac 3215156283Srwatson ;; 3216156283Srwatson hpux10*|hpux11*) 3217156283Srwatson if test $with_gnu_ld = no; then 3218173143Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 3219173143Srwatson _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 3220173143Srwatson 3221156283Srwatson case $host_cpu in 3222173143Srwatson hppa*64*|ia64*) ;; 3223156283Srwatson *) 3224156283Srwatson _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 3225156283Srwatson ;; 3226156283Srwatson esac 3227156283Srwatson fi 3228156283Srwatson case $host_cpu in 3229173143Srwatson hppa*64*|ia64*) 3230156283Srwatson _LT_AC_TAGVAR(hardcode_direct, $1)=no 3231156283Srwatson _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 3232156283Srwatson ;; 3233156283Srwatson *) 3234156283Srwatson _LT_AC_TAGVAR(hardcode_direct, $1)=yes 3235156283Srwatson _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 3236156283Srwatson # but as the default 3237156283Srwatson # location of the library. 3238156283Srwatson ;; 3239156283Srwatson esac 3240156283Srwatson 3241156283Srwatson case $cc_basename in 3242156283Srwatson CC*) 3243156283Srwatson # FIXME: insert proper C++ library support 3244156283Srwatson _LT_AC_TAGVAR(ld_shlibs, $1)=no 3245156283Srwatson ;; 3246156283Srwatson aCC*) 3247156283Srwatson case $host_cpu in 3248173143Srwatson hppa*64*) 3249173143Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 3250156283Srwatson ;; 3251173143Srwatson ia64*) 3252173143Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 3253173143Srwatson ;; 3254156283Srwatson *) 3255156283Srwatson _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' 3256156283Srwatson ;; 3257156283Srwatson esac 3258156283Srwatson # Commands to make compiler produce verbose output that lists 3259156283Srwatson # what "hidden" libraries, object files and flags are used when 3260156283Srwatson # linking a shared library. 3261156283Srwatson # 3262156283Srwatson # There doesn't appear to be a way to prevent this compiler from 3263156283Srwatson # explicitly linking system object files so we need to strip them 3264156283Srwatson # from the output so that they don't get included in the library 3265156283Srwatson # dependencies. 3266156283Srwatson 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' 3267156283Srwatson ;; 3268156283Srwatson *) 3269156283Srwatson if test "$GXX" = yes; then 3270156283Srwatson if test $with_gnu_ld = no; then 3271156283Srwatson case $host_cpu in 3272173143Srwatson hppa*64*) 3273173143Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 3274156283Srwatson ;; 3275173143Srwatson ia64*) 3276173143Srwatson _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' 3277173143Srwatson ;; 3278156283Srwatson *) 3279156283Srwatson _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' 3280156283Srwatson ;; 3281156283Srwatson esac 3282156283Srwatson fi 3283156283Srwatson else 3284156283Srwatson # FIXME: insert proper C++ library support 3285156283Srwatson _LT_AC_TAGVAR(ld_shlibs, $1)=no 3286156283Srwatson fi 3287156283Srwatson ;; 3288156283Srwatson esac 3289156283Srwatson ;; 3290173143Srwatson interix[[3-9]]*) 3291173143Srwatson _LT_AC_TAGVAR(hardcode_direct, $1)=no 3292173143Srwatson _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 3293173143Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 3294173143Srwatson _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 3295173143Srwatson # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 3296173143Srwatson # Instead, shared libraries are loaded at an image base (0x10000000 by 3297173143Srwatson # default) and relocated if they conflict, which is a slow very memory 3298173143Srwatson # consuming and fragmenting process. To avoid this, we pick a random, 3299173143Srwatson # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 3300173143Srwatson # time. Moving up from 0x10000000 also allows more sbrk(2) space. 3301173143Srwatson _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' 3302173143Srwatson _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' 3303173143Srwatson ;; 3304156283Srwatson irix5* | irix6*) 3305156283Srwatson case $cc_basename in 3306156283Srwatson CC*) 3307156283Srwatson # SGI C++ 3308156283Srwatson _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' 3309156283Srwatson 3310156283Srwatson # Archives containing C++ object files must be created using 3311156283Srwatson # "CC -ar", where "CC" is the IRIX C++ compiler. This is 3312156283Srwatson # necessary to make sure instantiated templates are included 3313156283Srwatson # in the archive. 3314156283Srwatson _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 3315156283Srwatson ;; 3316156283Srwatson *) 3317156283Srwatson if test "$GXX" = yes; then 3318156283Srwatson if test "$with_gnu_ld" = no; then 3319156283Srwatson _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' 3320156283Srwatson else 3321156283Srwatson _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' 3322156283Srwatson fi 3323156283Srwatson fi 3324156283Srwatson _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 3325156283Srwatson ;; 3326156283Srwatson esac 3327156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 3328156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 3329156283Srwatson ;; 3330173143Srwatson linux* | k*bsd*-gnu) 3331156283Srwatson case $cc_basename in 3332156283Srwatson KCC*) 3333156283Srwatson # Kuck and Associates, Inc. (KAI) C++ Compiler 3334156283Srwatson 3335156283Srwatson # KCC will only create a shared library if the output file 3336156283Srwatson # ends with ".so" (or ".sl" for HP-UX), so rename the library 3337156283Srwatson # to its proper name (with version) after linking. 3338156283Srwatson _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' 3339156283Srwatson _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' 3340156283Srwatson # Commands to make compiler produce verbose output that lists 3341156283Srwatson # what "hidden" libraries, object files and flags are used when 3342156283Srwatson # linking a shared library. 3343156283Srwatson # 3344156283Srwatson # There doesn't appear to be a way to prevent this compiler from 3345156283Srwatson # explicitly linking system object files so we need to strip them 3346156283Srwatson # from the output so that they don't get included in the library 3347156283Srwatson # dependencies. 3348156283Srwatson 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' 3349156283Srwatson 3350156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir' 3351156283Srwatson _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 3352156283Srwatson 3353156283Srwatson # Archives containing C++ object files must be created using 3354156283Srwatson # "CC -Bstatic", where "CC" is the KAI C++ compiler. 3355156283Srwatson _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 3356156283Srwatson ;; 3357156283Srwatson icpc*) 3358156283Srwatson # Intel C++ 3359156283Srwatson with_gnu_ld=yes 3360156283Srwatson # version 8.0 and above of icpc choke on multiply defined symbols 3361156283Srwatson # if we add $predep_objects and $postdep_objects, however 7.1 and 3362156283Srwatson # earlier do not add the objects themselves. 3363156283Srwatson case `$CC -V 2>&1` in 3364156283Srwatson *"Version 7."*) 3365156283Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 3366156283Srwatson _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' 3367156283Srwatson ;; 3368156283Srwatson *) # Version 8.0 or newer 3369156283Srwatson tmp_idyn= 3370156283Srwatson case $host_cpu in 3371156283Srwatson ia64*) tmp_idyn=' -i_dynamic';; 3372156283Srwatson esac 3373156283Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 3374156283Srwatson _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' 3375156283Srwatson ;; 3376156283Srwatson esac 3377156283Srwatson _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 3378156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 3379156283Srwatson _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 3380156283Srwatson _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 3381156283Srwatson ;; 3382156283Srwatson pgCC*) 3383156283Srwatson # Portland Group C++ compiler 3384156283Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 3385156283Srwatson _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' 3386156283Srwatson 3387156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 3388156283Srwatson _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 3389156283Srwatson _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' 3390156283Srwatson ;; 3391156283Srwatson cxx*) 3392156283Srwatson # Compaq C++ 3393156283Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 3394156283Srwatson _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' 3395156283Srwatson 3396156283Srwatson runpath_var=LD_RUN_PATH 3397156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 3398156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 3399156283Srwatson 3400156283Srwatson # Commands to make compiler produce verbose output that lists 3401156283Srwatson # what "hidden" libraries, object files and flags are used when 3402156283Srwatson # linking a shared library. 3403156283Srwatson # 3404156283Srwatson # There doesn't appear to be a way to prevent this compiler from 3405156283Srwatson # explicitly linking system object files so we need to strip them 3406156283Srwatson # from the output so that they don't get included in the library 3407156283Srwatson # dependencies. 3408156283Srwatson 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' 3409156283Srwatson ;; 3410173143Srwatson *) 3411173143Srwatson case `$CC -V 2>&1 | sed 5q` in 3412173143Srwatson *Sun\ C*) 3413173143Srwatson # Sun C++ 5.9 3414173143Srwatson _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' 3415173143Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 3416173143Srwatson _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' 3417173143Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 3418173143Srwatson _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' 3419173143Srwatson 3420173143Srwatson # Not sure whether something based on 3421173143Srwatson # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 3422173143Srwatson # would be better. 3423173143Srwatson output_verbose_link_cmd='echo' 3424173143Srwatson 3425173143Srwatson # Archives containing C++ object files must be created using 3426173143Srwatson # "CC -xar", where "CC" is the Sun C++ compiler. This is 3427173143Srwatson # necessary to make sure instantiated templates are included 3428173143Srwatson # in the archive. 3429173143Srwatson _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 3430173143Srwatson ;; 3431173143Srwatson esac 3432173143Srwatson ;; 3433156283Srwatson esac 3434156283Srwatson ;; 3435156283Srwatson lynxos*) 3436156283Srwatson # FIXME: insert proper C++ library support 3437156283Srwatson _LT_AC_TAGVAR(ld_shlibs, $1)=no 3438156283Srwatson ;; 3439156283Srwatson m88k*) 3440156283Srwatson # FIXME: insert proper C++ library support 3441156283Srwatson _LT_AC_TAGVAR(ld_shlibs, $1)=no 3442156283Srwatson ;; 3443156283Srwatson mvs*) 3444156283Srwatson case $cc_basename in 3445156283Srwatson cxx*) 3446156283Srwatson # FIXME: insert proper C++ library support 3447156283Srwatson _LT_AC_TAGVAR(ld_shlibs, $1)=no 3448156283Srwatson ;; 3449156283Srwatson *) 3450156283Srwatson # FIXME: insert proper C++ library support 3451156283Srwatson _LT_AC_TAGVAR(ld_shlibs, $1)=no 3452156283Srwatson ;; 3453156283Srwatson esac 3454156283Srwatson ;; 3455156283Srwatson netbsd*) 3456156283Srwatson if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then 3457156283Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 3458156283Srwatson wlarc= 3459156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 3460156283Srwatson _LT_AC_TAGVAR(hardcode_direct, $1)=yes 3461156283Srwatson _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 3462156283Srwatson fi 3463156283Srwatson # Workaround some broken pre-1.5 toolchains 3464156283Srwatson output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 3465156283Srwatson ;; 3466156283Srwatson openbsd2*) 3467156283Srwatson # C++ shared libraries are fairly broken 3468156283Srwatson _LT_AC_TAGVAR(ld_shlibs, $1)=no 3469156283Srwatson ;; 3470156283Srwatson openbsd*) 3471173143Srwatson if test -f /usr/libexec/ld.so; then 3472173143Srwatson _LT_AC_TAGVAR(hardcode_direct, $1)=yes 3473173143Srwatson _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 3474173143Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 3475173143Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 3476173143Srwatson if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 3477173143Srwatson _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' 3478173143Srwatson _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 3479173143Srwatson _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 3480173143Srwatson fi 3481173143Srwatson output_verbose_link_cmd='echo' 3482173143Srwatson else 3483173143Srwatson _LT_AC_TAGVAR(ld_shlibs, $1)=no 3484156283Srwatson fi 3485156283Srwatson ;; 3486156283Srwatson osf3*) 3487156283Srwatson case $cc_basename in 3488156283Srwatson KCC*) 3489156283Srwatson # Kuck and Associates, Inc. (KAI) C++ Compiler 3490156283Srwatson 3491156283Srwatson # KCC will only create a shared library if the output file 3492156283Srwatson # ends with ".so" (or ".sl" for HP-UX), so rename the library 3493156283Srwatson # to its proper name (with version) after linking. 3494156283Srwatson _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' 3495156283Srwatson 3496156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 3497156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 3498156283Srwatson 3499156283Srwatson # Archives containing C++ object files must be created using 3500156283Srwatson # "CC -Bstatic", where "CC" is the KAI C++ compiler. 3501156283Srwatson _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 3502156283Srwatson 3503156283Srwatson ;; 3504156283Srwatson RCC*) 3505156283Srwatson # Rational C++ 2.4.1 3506156283Srwatson # FIXME: insert proper C++ library support 3507156283Srwatson _LT_AC_TAGVAR(ld_shlibs, $1)=no 3508156283Srwatson ;; 3509156283Srwatson cxx*) 3510156283Srwatson _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 3511156283Srwatson _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' 3512156283Srwatson 3513156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 3514156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 3515156283Srwatson 3516156283Srwatson # Commands to make compiler produce verbose output that lists 3517156283Srwatson # what "hidden" libraries, object files and flags are used when 3518156283Srwatson # linking a shared library. 3519156283Srwatson # 3520156283Srwatson # There doesn't appear to be a way to prevent this compiler from 3521156283Srwatson # explicitly linking system object files so we need to strip them 3522156283Srwatson # from the output so that they don't get included in the library 3523156283Srwatson # dependencies. 3524156283Srwatson 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' 3525156283Srwatson ;; 3526156283Srwatson *) 3527156283Srwatson if test "$GXX" = yes && test "$with_gnu_ld" = no; then 3528156283Srwatson _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 3529156283Srwatson _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' 3530156283Srwatson 3531156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 3532156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 3533156283Srwatson 3534156283Srwatson # Commands to make compiler produce verbose output that lists 3535156283Srwatson # what "hidden" libraries, object files and flags are used when 3536156283Srwatson # linking a shared library. 3537156283Srwatson output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' 3538156283Srwatson 3539156283Srwatson else 3540156283Srwatson # FIXME: insert proper C++ library support 3541156283Srwatson _LT_AC_TAGVAR(ld_shlibs, $1)=no 3542156283Srwatson fi 3543156283Srwatson ;; 3544156283Srwatson esac 3545156283Srwatson ;; 3546156283Srwatson osf4* | osf5*) 3547156283Srwatson case $cc_basename in 3548156283Srwatson KCC*) 3549156283Srwatson # Kuck and Associates, Inc. (KAI) C++ Compiler 3550156283Srwatson 3551156283Srwatson # KCC will only create a shared library if the output file 3552156283Srwatson # ends with ".so" (or ".sl" for HP-UX), so rename the library 3553156283Srwatson # to its proper name (with version) after linking. 3554156283Srwatson _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' 3555156283Srwatson 3556156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 3557156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 3558156283Srwatson 3559156283Srwatson # Archives containing C++ object files must be created using 3560156283Srwatson # the KAI C++ compiler. 3561156283Srwatson _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' 3562156283Srwatson ;; 3563156283Srwatson RCC*) 3564156283Srwatson # Rational C++ 2.4.1 3565156283Srwatson # FIXME: insert proper C++ library support 3566156283Srwatson _LT_AC_TAGVAR(ld_shlibs, $1)=no 3567156283Srwatson ;; 3568156283Srwatson cxx*) 3569156283Srwatson _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 3570156283Srwatson _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' 3571156283Srwatson _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 3572156283Srwatson echo "-hidden">> $lib.exp~ 3573156283Srwatson $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~ 3574156283Srwatson $rm $lib.exp' 3575156283Srwatson 3576156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 3577156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 3578156283Srwatson 3579156283Srwatson # Commands to make compiler produce verbose output that lists 3580156283Srwatson # what "hidden" libraries, object files and flags are used when 3581156283Srwatson # linking a shared library. 3582156283Srwatson # 3583156283Srwatson # There doesn't appear to be a way to prevent this compiler from 3584156283Srwatson # explicitly linking system object files so we need to strip them 3585156283Srwatson # from the output so that they don't get included in the library 3586156283Srwatson # dependencies. 3587156283Srwatson 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' 3588156283Srwatson ;; 3589156283Srwatson *) 3590156283Srwatson if test "$GXX" = yes && test "$with_gnu_ld" = no; then 3591156283Srwatson _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 3592156283Srwatson _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' 3593156283Srwatson 3594156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 3595156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 3596156283Srwatson 3597156283Srwatson # Commands to make compiler produce verbose output that lists 3598156283Srwatson # what "hidden" libraries, object files and flags are used when 3599156283Srwatson # linking a shared library. 3600156283Srwatson output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' 3601156283Srwatson 3602156283Srwatson else 3603156283Srwatson # FIXME: insert proper C++ library support 3604156283Srwatson _LT_AC_TAGVAR(ld_shlibs, $1)=no 3605156283Srwatson fi 3606156283Srwatson ;; 3607156283Srwatson esac 3608156283Srwatson ;; 3609156283Srwatson psos*) 3610156283Srwatson # FIXME: insert proper C++ library support 3611156283Srwatson _LT_AC_TAGVAR(ld_shlibs, $1)=no 3612156283Srwatson ;; 3613156283Srwatson sunos4*) 3614156283Srwatson case $cc_basename in 3615156283Srwatson CC*) 3616156283Srwatson # Sun C++ 4.x 3617156283Srwatson # FIXME: insert proper C++ library support 3618156283Srwatson _LT_AC_TAGVAR(ld_shlibs, $1)=no 3619156283Srwatson ;; 3620156283Srwatson lcc*) 3621156283Srwatson # Lucid 3622156283Srwatson # FIXME: insert proper C++ library support 3623156283Srwatson _LT_AC_TAGVAR(ld_shlibs, $1)=no 3624156283Srwatson ;; 3625156283Srwatson *) 3626156283Srwatson # FIXME: insert proper C++ library support 3627156283Srwatson _LT_AC_TAGVAR(ld_shlibs, $1)=no 3628156283Srwatson ;; 3629156283Srwatson esac 3630156283Srwatson ;; 3631156283Srwatson solaris*) 3632156283Srwatson case $cc_basename in 3633156283Srwatson CC*) 3634156283Srwatson # Sun C++ 4.2, 5.x and Centerline C++ 3635156283Srwatson _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes 3636156283Srwatson _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' 3637156283Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 3638156283Srwatson _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 3639156283Srwatson $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' 3640156283Srwatson 3641156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 3642156283Srwatson _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 3643156283Srwatson case $host_os in 3644156283Srwatson solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 3645156283Srwatson *) 3646173143Srwatson # The compiler driver will combine and reorder linker options, 3647173143Srwatson # but understands `-z linker_flag'. 3648156283Srwatson # Supported since Solaris 2.6 (maybe 2.5.1?) 3649173143Srwatson _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 3650156283Srwatson ;; 3651156283Srwatson esac 3652156283Srwatson _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 3653156283Srwatson 3654156283Srwatson output_verbose_link_cmd='echo' 3655156283Srwatson 3656156283Srwatson # Archives containing C++ object files must be created using 3657156283Srwatson # "CC -xar", where "CC" is the Sun C++ compiler. This is 3658156283Srwatson # necessary to make sure instantiated templates are included 3659156283Srwatson # in the archive. 3660156283Srwatson _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 3661156283Srwatson ;; 3662156283Srwatson gcx*) 3663156283Srwatson # Green Hills C++ Compiler 3664156283Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 3665156283Srwatson 3666156283Srwatson # The C++ compiler must be used to create the archive. 3667156283Srwatson _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 3668156283Srwatson ;; 3669156283Srwatson *) 3670156283Srwatson # GNU C++ compiler with Solaris linker 3671156283Srwatson if test "$GXX" = yes && test "$with_gnu_ld" = no; then 3672156283Srwatson _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' 3673156283Srwatson if $CC --version | grep -v '^2\.7' > /dev/null; then 3674156283Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 3675156283Srwatson _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 3676156283Srwatson $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' 3677156283Srwatson 3678156283Srwatson # Commands to make compiler produce verbose output that lists 3679156283Srwatson # what "hidden" libraries, object files and flags are used when 3680156283Srwatson # linking a shared library. 3681156283Srwatson output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" 3682156283Srwatson else 3683156283Srwatson # g++ 2.7 appears to require `-G' NOT `-shared' on this 3684156283Srwatson # platform. 3685156283Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 3686156283Srwatson _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 3687156283Srwatson $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' 3688156283Srwatson 3689156283Srwatson # Commands to make compiler produce verbose output that lists 3690156283Srwatson # what "hidden" libraries, object files and flags are used when 3691156283Srwatson # linking a shared library. 3692156283Srwatson output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" 3693156283Srwatson fi 3694156283Srwatson 3695156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' 3696173143Srwatson case $host_os in 3697173143Srwatson solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 3698173143Srwatson *) 3699173143Srwatson _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 3700173143Srwatson ;; 3701173143Srwatson esac 3702156283Srwatson fi 3703156283Srwatson ;; 3704156283Srwatson esac 3705156283Srwatson ;; 3706173143Srwatson sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 3707173143Srwatson _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 3708156283Srwatson _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 3709173143Srwatson _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 3710173143Srwatson runpath_var='LD_RUN_PATH' 3711173143Srwatson 3712173143Srwatson case $cc_basename in 3713173143Srwatson CC*) 3714173143Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 3715173143Srwatson _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 3716173143Srwatson ;; 3717173143Srwatson *) 3718173143Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 3719173143Srwatson _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 3720173143Srwatson ;; 3721173143Srwatson esac 3722156283Srwatson ;; 3723173143Srwatson sysv5* | sco3.2v5* | sco5v6*) 3724173143Srwatson # Note: We can NOT use -z defs as we might desire, because we do not 3725173143Srwatson # link with -lc, and that would cause any symbols used from libc to 3726173143Srwatson # always be unresolved, which means just about no library would 3727173143Srwatson # ever link correctly. If we're not using GNU ld we use -z text 3728173143Srwatson # though, which does catch some bad symbols but isn't as heavy-handed 3729173143Srwatson # as -z defs. 3730173143Srwatson # For security reasons, it is highly recommended that you always 3731173143Srwatson # use absolute paths for naming shared libraries, and exclude the 3732173143Srwatson # DT_RUNPATH tag from executables and libraries. But doing so 3733173143Srwatson # requires that you compile everything twice, which is a pain. 3734173143Srwatson # So that behaviour is only enabled if SCOABSPATH is set to a 3735173143Srwatson # non-empty value in the environment. Most likely only useful for 3736173143Srwatson # creating official distributions of packages. 3737173143Srwatson # This is a hack until libtool officially supports absolute path 3738173143Srwatson # names for shared libraries. 3739173143Srwatson _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 3740173143Srwatson _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 3741173143Srwatson _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 3742173143Srwatson _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 3743173143Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' 3744173143Srwatson _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' 3745173143Srwatson _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 3746173143Srwatson _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 3747173143Srwatson runpath_var='LD_RUN_PATH' 3748173143Srwatson 3749173143Srwatson case $cc_basename in 3750173143Srwatson CC*) 3751173143Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' 3752173143Srwatson _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' 3753173143Srwatson ;; 3754173143Srwatson *) 3755173143Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' 3756173143Srwatson _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' 3757173143Srwatson ;; 3758173143Srwatson esac 3759173143Srwatson ;; 3760156283Srwatson tandem*) 3761156283Srwatson case $cc_basename in 3762156283Srwatson NCC*) 3763156283Srwatson # NonStop-UX NCC 3.20 3764156283Srwatson # FIXME: insert proper C++ library support 3765156283Srwatson _LT_AC_TAGVAR(ld_shlibs, $1)=no 3766156283Srwatson ;; 3767156283Srwatson *) 3768156283Srwatson # FIXME: insert proper C++ library support 3769156283Srwatson _LT_AC_TAGVAR(ld_shlibs, $1)=no 3770156283Srwatson ;; 3771156283Srwatson esac 3772156283Srwatson ;; 3773156283Srwatson vxworks*) 3774156283Srwatson # FIXME: insert proper C++ library support 3775156283Srwatson _LT_AC_TAGVAR(ld_shlibs, $1)=no 3776156283Srwatson ;; 3777156283Srwatson *) 3778156283Srwatson # FIXME: insert proper C++ library support 3779156283Srwatson _LT_AC_TAGVAR(ld_shlibs, $1)=no 3780156283Srwatson ;; 3781156283Srwatsonesac 3782156283SrwatsonAC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) 3783156283Srwatsontest "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 3784156283Srwatson 3785156283Srwatson_LT_AC_TAGVAR(GCC, $1)="$GXX" 3786156283Srwatson_LT_AC_TAGVAR(LD, $1)="$LD" 3787156283Srwatson 3788156283SrwatsonAC_LIBTOOL_POSTDEP_PREDEP($1) 3789156283SrwatsonAC_LIBTOOL_PROG_COMPILER_PIC($1) 3790156283SrwatsonAC_LIBTOOL_PROG_CC_C_O($1) 3791156283SrwatsonAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) 3792156283SrwatsonAC_LIBTOOL_PROG_LD_SHLIBS($1) 3793156283SrwatsonAC_LIBTOOL_SYS_DYNAMIC_LINKER($1) 3794156283SrwatsonAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) 3795156283Srwatson 3796156283SrwatsonAC_LIBTOOL_CONFIG($1) 3797156283Srwatson 3798156283SrwatsonAC_LANG_POP 3799156283SrwatsonCC=$lt_save_CC 3800156283SrwatsonLDCXX=$LD 3801156283SrwatsonLD=$lt_save_LD 3802156283SrwatsonGCC=$lt_save_GCC 3803156283Srwatsonwith_gnu_ldcxx=$with_gnu_ld 3804156283Srwatsonwith_gnu_ld=$lt_save_with_gnu_ld 3805156283Srwatsonlt_cv_path_LDCXX=$lt_cv_path_LD 3806156283Srwatsonlt_cv_path_LD=$lt_save_path_LD 3807156283Srwatsonlt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 3808156283Srwatsonlt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 3809156283Srwatson])# AC_LIBTOOL_LANG_CXX_CONFIG 3810156283Srwatson 3811156283Srwatson# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME]) 3812173143Srwatson# ------------------------------------ 3813156283Srwatson# Figure out "hidden" library dependencies from verbose 3814156283Srwatson# compiler output when linking a shared library. 3815156283Srwatson# Parse the compiler output and extract the necessary 3816156283Srwatson# objects, libraries and library flags. 3817156283SrwatsonAC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[ 3818156283Srwatsondnl we can't use the lt_simple_compile_test_code here, 3819156283Srwatsondnl because it contains code intended for an executable, 3820156283Srwatsondnl not a library. It's possible we should let each 3821156283Srwatsondnl tag define a new lt_????_link_test_code variable, 3822156283Srwatsondnl but it's only used here... 3823156283Srwatsonifelse([$1],[],[cat > conftest.$ac_ext <<EOF 3824156283Srwatsonint a; 3825156283Srwatsonvoid foo (void) { a = 0; } 3826156283SrwatsonEOF 3827156283Srwatson],[$1],[CXX],[cat > conftest.$ac_ext <<EOF 3828156283Srwatsonclass Foo 3829156283Srwatson{ 3830156283Srwatsonpublic: 3831156283Srwatson Foo (void) { a = 0; } 3832156283Srwatsonprivate: 3833156283Srwatson int a; 3834156283Srwatson}; 3835156283SrwatsonEOF 3836156283Srwatson],[$1],[F77],[cat > conftest.$ac_ext <<EOF 3837156283Srwatson subroutine foo 3838156283Srwatson implicit none 3839156283Srwatson integer*4 a 3840156283Srwatson a=0 3841156283Srwatson return 3842156283Srwatson end 3843156283SrwatsonEOF 3844156283Srwatson],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF 3845156283Srwatsonpublic class foo { 3846156283Srwatson private int a; 3847156283Srwatson public void bar (void) { 3848156283Srwatson a = 0; 3849156283Srwatson } 3850156283Srwatson}; 3851156283SrwatsonEOF 3852156283Srwatson]) 3853156283Srwatsondnl Parse the compiler output and extract the necessary 3854156283Srwatsondnl objects, libraries and library flags. 3855156283Srwatsonif AC_TRY_EVAL(ac_compile); then 3856156283Srwatson # Parse the compiler output and extract the necessary 3857156283Srwatson # objects, libraries and library flags. 3858156283Srwatson 3859156283Srwatson # Sentinel used to keep track of whether or not we are before 3860156283Srwatson # the conftest object file. 3861156283Srwatson pre_test_object_deps_done=no 3862156283Srwatson 3863156283Srwatson # The `*' in the case matches for architectures that use `case' in 3864156283Srwatson # $output_verbose_cmd can trigger glob expansion during the loop 3865156283Srwatson # eval without this substitution. 3866156283Srwatson output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"` 3867156283Srwatson 3868156283Srwatson for p in `eval $output_verbose_link_cmd`; do 3869156283Srwatson case $p in 3870156283Srwatson 3871156283Srwatson -L* | -R* | -l*) 3872156283Srwatson # Some compilers place space between "-{L,R}" and the path. 3873156283Srwatson # Remove the space. 3874156283Srwatson if test $p = "-L" \ 3875156283Srwatson || test $p = "-R"; then 3876156283Srwatson prev=$p 3877156283Srwatson continue 3878156283Srwatson else 3879156283Srwatson prev= 3880156283Srwatson fi 3881156283Srwatson 3882156283Srwatson if test "$pre_test_object_deps_done" = no; then 3883156283Srwatson case $p in 3884156283Srwatson -L* | -R*) 3885156283Srwatson # Internal compiler library paths should come after those 3886156283Srwatson # provided the user. The postdeps already come after the 3887156283Srwatson # user supplied libs so there is no need to process them. 3888156283Srwatson if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then 3889156283Srwatson _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" 3890156283Srwatson else 3891156283Srwatson _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" 3892156283Srwatson fi 3893156283Srwatson ;; 3894156283Srwatson # The "-l" case would never come before the object being 3895156283Srwatson # linked, so don't bother handling this case. 3896156283Srwatson esac 3897156283Srwatson else 3898156283Srwatson if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then 3899156283Srwatson _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}" 3900156283Srwatson else 3901156283Srwatson _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}" 3902156283Srwatson fi 3903156283Srwatson fi 3904156283Srwatson ;; 3905156283Srwatson 3906156283Srwatson *.$objext) 3907156283Srwatson # This assumes that the test object file only shows up 3908156283Srwatson # once in the compiler output. 3909156283Srwatson if test "$p" = "conftest.$objext"; then 3910156283Srwatson pre_test_object_deps_done=yes 3911156283Srwatson continue 3912156283Srwatson fi 3913156283Srwatson 3914156283Srwatson if test "$pre_test_object_deps_done" = no; then 3915156283Srwatson if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then 3916156283Srwatson _LT_AC_TAGVAR(predep_objects, $1)="$p" 3917156283Srwatson else 3918156283Srwatson _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p" 3919156283Srwatson fi 3920156283Srwatson else 3921156283Srwatson if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then 3922156283Srwatson _LT_AC_TAGVAR(postdep_objects, $1)="$p" 3923156283Srwatson else 3924156283Srwatson _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p" 3925156283Srwatson fi 3926156283Srwatson fi 3927156283Srwatson ;; 3928156283Srwatson 3929156283Srwatson *) ;; # Ignore the rest. 3930156283Srwatson 3931156283Srwatson esac 3932156283Srwatson done 3933156283Srwatson 3934156283Srwatson # Clean up. 3935156283Srwatson rm -f a.out a.exe 3936156283Srwatsonelse 3937156283Srwatson echo "libtool.m4: error: problem compiling $1 test program" 3938156283Srwatsonfi 3939156283Srwatson 3940156283Srwatson$rm -f confest.$objext 3941156283Srwatson 3942156283Srwatson# PORTME: override above test on systems where it is broken 3943156283Srwatsonifelse([$1],[CXX], 3944156283Srwatson[case $host_os in 3945173143Srwatsoninterix[[3-9]]*) 3946173143Srwatson # Interix 3.5 installs completely hosed .la files for C++, so rather than 3947173143Srwatson # hack all around it, let's just trust "g++" to DTRT. 3948173143Srwatson _LT_AC_TAGVAR(predep_objects,$1)= 3949173143Srwatson _LT_AC_TAGVAR(postdep_objects,$1)= 3950173143Srwatson _LT_AC_TAGVAR(postdeps,$1)= 3951173143Srwatson ;; 3952173143Srwatson 3953173143Srwatsonlinux*) 3954173143Srwatson case `$CC -V 2>&1 | sed 5q` in 3955173143Srwatson *Sun\ C*) 3956173143Srwatson # Sun C++ 5.9 3957173143Srwatson # 3958173143Srwatson # The more standards-conforming stlport4 library is 3959173143Srwatson # incompatible with the Cstd library. Avoid specifying 3960173143Srwatson # it if it's in CXXFLAGS. Ignore libCrun as 3961173143Srwatson # -library=stlport4 depends on it. 3962173143Srwatson case " $CXX $CXXFLAGS " in 3963173143Srwatson *" -library=stlport4 "*) 3964173143Srwatson solaris_use_stlport4=yes 3965173143Srwatson ;; 3966173143Srwatson esac 3967173143Srwatson if test "$solaris_use_stlport4" != yes; then 3968173143Srwatson _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 3969173143Srwatson fi 3970173143Srwatson ;; 3971173143Srwatson esac 3972173143Srwatson ;; 3973173143Srwatson 3974156283Srwatsonsolaris*) 3975156283Srwatson case $cc_basename in 3976156283Srwatson CC*) 3977173143Srwatson # The more standards-conforming stlport4 library is 3978173143Srwatson # incompatible with the Cstd library. Avoid specifying 3979173143Srwatson # it if it's in CXXFLAGS. Ignore libCrun as 3980173143Srwatson # -library=stlport4 depends on it. 3981173143Srwatson case " $CXX $CXXFLAGS " in 3982173143Srwatson *" -library=stlport4 "*) 3983173143Srwatson solaris_use_stlport4=yes 3984173143Srwatson ;; 3985173143Srwatson esac 3986173143Srwatson 3987156283Srwatson # Adding this requires a known-good setup of shared libraries for 3988156283Srwatson # Sun compiler versions before 5.6, else PIC objects from an old 3989156283Srwatson # archive will be linked into the output, leading to subtle bugs. 3990173143Srwatson if test "$solaris_use_stlport4" != yes; then 3991173143Srwatson _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 3992173143Srwatson fi 3993156283Srwatson ;; 3994156283Srwatson esac 3995173143Srwatson ;; 3996156283Srwatsonesac 3997156283Srwatson]) 3998156283Srwatson 3999156283Srwatsoncase " $_LT_AC_TAGVAR(postdeps, $1) " in 4000156283Srwatson*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;; 4001156283Srwatsonesac 4002156283Srwatson])# AC_LIBTOOL_POSTDEP_PREDEP 4003156283Srwatson 4004156283Srwatson# AC_LIBTOOL_LANG_F77_CONFIG 4005173143Srwatson# -------------------------- 4006156283Srwatson# Ensure that the configuration vars for the C compiler are 4007156283Srwatson# suitably defined. Those variables are subsequently used by 4008156283Srwatson# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 4009156283SrwatsonAC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)]) 4010156283SrwatsonAC_DEFUN([_LT_AC_LANG_F77_CONFIG], 4011156283Srwatson[AC_REQUIRE([AC_PROG_F77]) 4012156283SrwatsonAC_LANG_PUSH(Fortran 77) 4013156283Srwatson 4014156283Srwatson_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 4015156283Srwatson_LT_AC_TAGVAR(allow_undefined_flag, $1)= 4016156283Srwatson_LT_AC_TAGVAR(always_export_symbols, $1)=no 4017156283Srwatson_LT_AC_TAGVAR(archive_expsym_cmds, $1)= 4018156283Srwatson_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= 4019156283Srwatson_LT_AC_TAGVAR(hardcode_direct, $1)=no 4020156283Srwatson_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= 4021156283Srwatson_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 4022156283Srwatson_LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 4023156283Srwatson_LT_AC_TAGVAR(hardcode_minus_L, $1)=no 4024156283Srwatson_LT_AC_TAGVAR(hardcode_automatic, $1)=no 4025156283Srwatson_LT_AC_TAGVAR(module_cmds, $1)= 4026156283Srwatson_LT_AC_TAGVAR(module_expsym_cmds, $1)= 4027156283Srwatson_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown 4028156283Srwatson_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 4029156283Srwatson_LT_AC_TAGVAR(no_undefined_flag, $1)= 4030156283Srwatson_LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 4031156283Srwatson_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no 4032156283Srwatson 4033156283Srwatson# Source file extension for f77 test sources. 4034156283Srwatsonac_ext=f 4035156283Srwatson 4036156283Srwatson# Object file extension for compiled f77 test sources. 4037156283Srwatsonobjext=o 4038156283Srwatson_LT_AC_TAGVAR(objext, $1)=$objext 4039156283Srwatson 4040156283Srwatson# Code to be used in simple compile tests 4041173143Srwatsonlt_simple_compile_test_code="\ 4042173143Srwatson subroutine t 4043173143Srwatson return 4044173143Srwatson end 4045173143Srwatson" 4046156283Srwatson 4047156283Srwatson# Code to be used in simple link tests 4048173143Srwatsonlt_simple_link_test_code="\ 4049173143Srwatson program t 4050173143Srwatson end 4051173143Srwatson" 4052156283Srwatson 4053156283Srwatson# ltmain only uses $CC for tagged configurations so make sure $CC is set. 4054156283Srwatson_LT_AC_SYS_COMPILER 4055156283Srwatson 4056156283Srwatson# save warnings/boilerplate of simple test code 4057156283Srwatson_LT_COMPILER_BOILERPLATE 4058156283Srwatson_LT_LINKER_BOILERPLATE 4059156283Srwatson 4060156283Srwatson# Allow CC to be a program name with arguments. 4061156283Srwatsonlt_save_CC="$CC" 4062156283SrwatsonCC=${F77-"f77"} 4063156283Srwatsoncompiler=$CC 4064156283Srwatson_LT_AC_TAGVAR(compiler, $1)=$CC 4065156283Srwatson_LT_CC_BASENAME([$compiler]) 4066156283Srwatson 4067156283SrwatsonAC_MSG_CHECKING([if libtool supports shared libraries]) 4068156283SrwatsonAC_MSG_RESULT([$can_build_shared]) 4069156283Srwatson 4070156283SrwatsonAC_MSG_CHECKING([whether to build shared libraries]) 4071156283Srwatsontest "$can_build_shared" = "no" && enable_shared=no 4072156283Srwatson 4073156283Srwatson# On AIX, shared libraries and static libraries use the same namespace, and 4074156283Srwatson# are all built from PIC. 4075156283Srwatsoncase $host_os in 4076156283Srwatsonaix3*) 4077156283Srwatson test "$enable_shared" = yes && enable_static=no 4078156283Srwatson if test -n "$RANLIB"; then 4079156283Srwatson archive_cmds="$archive_cmds~\$RANLIB \$lib" 4080156283Srwatson postinstall_cmds='$RANLIB $lib' 4081156283Srwatson fi 4082156283Srwatson ;; 4083156283Srwatsonaix4* | aix5*) 4084156283Srwatson if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 4085156283Srwatson test "$enable_shared" = yes && enable_static=no 4086156283Srwatson fi 4087156283Srwatson ;; 4088156283Srwatsonesac 4089156283SrwatsonAC_MSG_RESULT([$enable_shared]) 4090156283Srwatson 4091156283SrwatsonAC_MSG_CHECKING([whether to build static libraries]) 4092156283Srwatson# Make sure either enable_shared or enable_static is yes. 4093156283Srwatsontest "$enable_shared" = yes || enable_static=yes 4094156283SrwatsonAC_MSG_RESULT([$enable_static]) 4095156283Srwatson 4096156283Srwatson_LT_AC_TAGVAR(GCC, $1)="$G77" 4097156283Srwatson_LT_AC_TAGVAR(LD, $1)="$LD" 4098156283Srwatson 4099156283SrwatsonAC_LIBTOOL_PROG_COMPILER_PIC($1) 4100156283SrwatsonAC_LIBTOOL_PROG_CC_C_O($1) 4101156283SrwatsonAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) 4102156283SrwatsonAC_LIBTOOL_PROG_LD_SHLIBS($1) 4103156283SrwatsonAC_LIBTOOL_SYS_DYNAMIC_LINKER($1) 4104156283SrwatsonAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) 4105156283Srwatson 4106156283SrwatsonAC_LIBTOOL_CONFIG($1) 4107156283Srwatson 4108156283SrwatsonAC_LANG_POP 4109156283SrwatsonCC="$lt_save_CC" 4110156283Srwatson])# AC_LIBTOOL_LANG_F77_CONFIG 4111156283Srwatson 4112156283Srwatson 4113156283Srwatson# AC_LIBTOOL_LANG_GCJ_CONFIG 4114156283Srwatson# -------------------------- 4115156283Srwatson# Ensure that the configuration vars for the C compiler are 4116156283Srwatson# suitably defined. Those variables are subsequently used by 4117156283Srwatson# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 4118156283SrwatsonAC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)]) 4119156283SrwatsonAC_DEFUN([_LT_AC_LANG_GCJ_CONFIG], 4120156283Srwatson[AC_LANG_SAVE 4121156283Srwatson 4122156283Srwatson# Source file extension for Java test sources. 4123156283Srwatsonac_ext=java 4124156283Srwatson 4125156283Srwatson# Object file extension for compiled Java test sources. 4126156283Srwatsonobjext=o 4127156283Srwatson_LT_AC_TAGVAR(objext, $1)=$objext 4128156283Srwatson 4129156283Srwatson# Code to be used in simple compile tests 4130173143Srwatsonlt_simple_compile_test_code="class foo {}" 4131156283Srwatson 4132156283Srwatson# Code to be used in simple link tests 4133173143Srwatsonlt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 4134156283Srwatson 4135156283Srwatson# ltmain only uses $CC for tagged configurations so make sure $CC is set. 4136156283Srwatson_LT_AC_SYS_COMPILER 4137156283Srwatson 4138156283Srwatson# save warnings/boilerplate of simple test code 4139156283Srwatson_LT_COMPILER_BOILERPLATE 4140156283Srwatson_LT_LINKER_BOILERPLATE 4141156283Srwatson 4142156283Srwatson# Allow CC to be a program name with arguments. 4143156283Srwatsonlt_save_CC="$CC" 4144156283SrwatsonCC=${GCJ-"gcj"} 4145156283Srwatsoncompiler=$CC 4146156283Srwatson_LT_AC_TAGVAR(compiler, $1)=$CC 4147156283Srwatson_LT_CC_BASENAME([$compiler]) 4148156283Srwatson 4149156283Srwatson# GCJ did not exist at the time GCC didn't implicitly link libc in. 4150156283Srwatson_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 4151156283Srwatson 4152156283Srwatson_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 4153156283Srwatson 4154156283SrwatsonAC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) 4155156283SrwatsonAC_LIBTOOL_PROG_COMPILER_PIC($1) 4156156283SrwatsonAC_LIBTOOL_PROG_CC_C_O($1) 4157156283SrwatsonAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) 4158156283SrwatsonAC_LIBTOOL_PROG_LD_SHLIBS($1) 4159156283SrwatsonAC_LIBTOOL_SYS_DYNAMIC_LINKER($1) 4160156283SrwatsonAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) 4161156283Srwatson 4162156283SrwatsonAC_LIBTOOL_CONFIG($1) 4163156283Srwatson 4164156283SrwatsonAC_LANG_RESTORE 4165156283SrwatsonCC="$lt_save_CC" 4166156283Srwatson])# AC_LIBTOOL_LANG_GCJ_CONFIG 4167156283Srwatson 4168156283Srwatson 4169156283Srwatson# AC_LIBTOOL_LANG_RC_CONFIG 4170173143Srwatson# ------------------------- 4171156283Srwatson# Ensure that the configuration vars for the Windows resource compiler are 4172156283Srwatson# suitably defined. Those variables are subsequently used by 4173156283Srwatson# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 4174156283SrwatsonAC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)]) 4175156283SrwatsonAC_DEFUN([_LT_AC_LANG_RC_CONFIG], 4176156283Srwatson[AC_LANG_SAVE 4177156283Srwatson 4178156283Srwatson# Source file extension for RC test sources. 4179156283Srwatsonac_ext=rc 4180156283Srwatson 4181156283Srwatson# Object file extension for compiled RC test sources. 4182156283Srwatsonobjext=o 4183156283Srwatson_LT_AC_TAGVAR(objext, $1)=$objext 4184156283Srwatson 4185156283Srwatson# Code to be used in simple compile tests 4186173143Srwatsonlt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 4187156283Srwatson 4188156283Srwatson# Code to be used in simple link tests 4189156283Srwatsonlt_simple_link_test_code="$lt_simple_compile_test_code" 4190156283Srwatson 4191156283Srwatson# ltmain only uses $CC for tagged configurations so make sure $CC is set. 4192156283Srwatson_LT_AC_SYS_COMPILER 4193156283Srwatson 4194156283Srwatson# save warnings/boilerplate of simple test code 4195156283Srwatson_LT_COMPILER_BOILERPLATE 4196156283Srwatson_LT_LINKER_BOILERPLATE 4197156283Srwatson 4198156283Srwatson# Allow CC to be a program name with arguments. 4199156283Srwatsonlt_save_CC="$CC" 4200156283SrwatsonCC=${RC-"windres"} 4201156283Srwatsoncompiler=$CC 4202156283Srwatson_LT_AC_TAGVAR(compiler, $1)=$CC 4203156283Srwatson_LT_CC_BASENAME([$compiler]) 4204156283Srwatson_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 4205156283Srwatson 4206156283SrwatsonAC_LIBTOOL_CONFIG($1) 4207156283Srwatson 4208156283SrwatsonAC_LANG_RESTORE 4209156283SrwatsonCC="$lt_save_CC" 4210156283Srwatson])# AC_LIBTOOL_LANG_RC_CONFIG 4211156283Srwatson 4212156283Srwatson 4213156283Srwatson# AC_LIBTOOL_CONFIG([TAGNAME]) 4214156283Srwatson# ---------------------------- 4215156283Srwatson# If TAGNAME is not passed, then create an initial libtool script 4216156283Srwatson# with a default configuration from the untagged config vars. Otherwise 4217156283Srwatson# add code to config.status for appending the configuration named by 4218156283Srwatson# TAGNAME from the matching tagged config vars. 4219156283SrwatsonAC_DEFUN([AC_LIBTOOL_CONFIG], 4220156283Srwatson[# The else clause should only fire when bootstrapping the 4221156283Srwatson# libtool distribution, otherwise you forgot to ship ltmain.sh 4222156283Srwatson# with your package, and you will get complaints that there are 4223156283Srwatson# no rules to generate ltmain.sh. 4224156283Srwatsonif test -f "$ltmain"; then 4225156283Srwatson # See if we are running on zsh, and set the options which allow our commands through 4226156283Srwatson # without removal of \ escapes. 4227156283Srwatson if test -n "${ZSH_VERSION+set}" ; then 4228156283Srwatson setopt NO_GLOB_SUBST 4229156283Srwatson fi 4230156283Srwatson # Now quote all the things that may contain metacharacters while being 4231156283Srwatson # careful not to overquote the AC_SUBSTed values. We take copies of the 4232156283Srwatson # variables and quote the copies for generation of the libtool script. 4233173143Srwatson for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ 4234156283Srwatson SED SHELL STRIP \ 4235156283Srwatson libname_spec library_names_spec soname_spec extract_expsyms_cmds \ 4236156283Srwatson old_striplib striplib file_magic_cmd finish_cmds finish_eval \ 4237156283Srwatson deplibs_check_method reload_flag reload_cmds need_locks \ 4238156283Srwatson lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ 4239156283Srwatson lt_cv_sys_global_symbol_to_c_name_address \ 4240156283Srwatson sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ 4241156283Srwatson old_postinstall_cmds old_postuninstall_cmds \ 4242156283Srwatson _LT_AC_TAGVAR(compiler, $1) \ 4243156283Srwatson _LT_AC_TAGVAR(CC, $1) \ 4244156283Srwatson _LT_AC_TAGVAR(LD, $1) \ 4245156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \ 4246156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \ 4247156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \ 4248156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \ 4249156283Srwatson _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \ 4250156283Srwatson _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \ 4251156283Srwatson _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \ 4252156283Srwatson _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \ 4253156283Srwatson _LT_AC_TAGVAR(old_archive_cmds, $1) \ 4254156283Srwatson _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \ 4255156283Srwatson _LT_AC_TAGVAR(predep_objects, $1) \ 4256156283Srwatson _LT_AC_TAGVAR(postdep_objects, $1) \ 4257156283Srwatson _LT_AC_TAGVAR(predeps, $1) \ 4258156283Srwatson _LT_AC_TAGVAR(postdeps, $1) \ 4259156283Srwatson _LT_AC_TAGVAR(compiler_lib_search_path, $1) \ 4260156283Srwatson _LT_AC_TAGVAR(archive_cmds, $1) \ 4261156283Srwatson _LT_AC_TAGVAR(archive_expsym_cmds, $1) \ 4262156283Srwatson _LT_AC_TAGVAR(postinstall_cmds, $1) \ 4263156283Srwatson _LT_AC_TAGVAR(postuninstall_cmds, $1) \ 4264156283Srwatson _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \ 4265156283Srwatson _LT_AC_TAGVAR(allow_undefined_flag, $1) \ 4266156283Srwatson _LT_AC_TAGVAR(no_undefined_flag, $1) \ 4267156283Srwatson _LT_AC_TAGVAR(export_symbols_cmds, $1) \ 4268156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \ 4269156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \ 4270156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \ 4271156283Srwatson _LT_AC_TAGVAR(hardcode_automatic, $1) \ 4272156283Srwatson _LT_AC_TAGVAR(module_cmds, $1) \ 4273156283Srwatson _LT_AC_TAGVAR(module_expsym_cmds, $1) \ 4274156283Srwatson _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \ 4275173143Srwatson _LT_AC_TAGVAR(fix_srcfile_path, $1) \ 4276156283Srwatson _LT_AC_TAGVAR(exclude_expsyms, $1) \ 4277156283Srwatson _LT_AC_TAGVAR(include_expsyms, $1); do 4278156283Srwatson 4279156283Srwatson case $var in 4280156283Srwatson _LT_AC_TAGVAR(old_archive_cmds, $1) | \ 4281156283Srwatson _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \ 4282156283Srwatson _LT_AC_TAGVAR(archive_cmds, $1) | \ 4283156283Srwatson _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \ 4284156283Srwatson _LT_AC_TAGVAR(module_cmds, $1) | \ 4285156283Srwatson _LT_AC_TAGVAR(module_expsym_cmds, $1) | \ 4286156283Srwatson _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \ 4287156283Srwatson _LT_AC_TAGVAR(export_symbols_cmds, $1) | \ 4288156283Srwatson extract_expsyms_cmds | reload_cmds | finish_cmds | \ 4289156283Srwatson postinstall_cmds | postuninstall_cmds | \ 4290156283Srwatson old_postinstall_cmds | old_postuninstall_cmds | \ 4291156283Srwatson sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) 4292156283Srwatson # Double-quote double-evaled strings. 4293156283Srwatson eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" 4294156283Srwatson ;; 4295156283Srwatson *) 4296156283Srwatson eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" 4297156283Srwatson ;; 4298156283Srwatson esac 4299156283Srwatson done 4300156283Srwatson 4301156283Srwatson case $lt_echo in 4302156283Srwatson *'\[$]0 --fallback-echo"') 4303156283Srwatson lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'` 4304156283Srwatson ;; 4305156283Srwatson esac 4306156283Srwatson 4307156283Srwatsonifelse([$1], [], 4308156283Srwatson [cfgfile="${ofile}T" 4309156283Srwatson trap "$rm \"$cfgfile\"; exit 1" 1 2 15 4310156283Srwatson $rm -f "$cfgfile" 4311156283Srwatson AC_MSG_NOTICE([creating $ofile])], 4312156283Srwatson [cfgfile="$ofile"]) 4313156283Srwatson 4314156283Srwatson cat <<__EOF__ >> "$cfgfile" 4315156283Srwatsonifelse([$1], [], 4316156283Srwatson[#! $SHELL 4317156283Srwatson 4318156283Srwatson# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. 4319156283Srwatson# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) 4320156283Srwatson# NOTE: Changes made to this file will be lost: look at ltmain.sh. 4321156283Srwatson# 4322173143Srwatson# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 4323156283Srwatson# Free Software Foundation, Inc. 4324156283Srwatson# 4325156283Srwatson# This file is part of GNU Libtool: 4326156283Srwatson# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 4327156283Srwatson# 4328156283Srwatson# This program is free software; you can redistribute it and/or modify 4329156283Srwatson# it under the terms of the GNU General Public License as published by 4330156283Srwatson# the Free Software Foundation; either version 2 of the License, or 4331156283Srwatson# (at your option) any later version. 4332156283Srwatson# 4333156283Srwatson# This program is distributed in the hope that it will be useful, but 4334156283Srwatson# WITHOUT ANY WARRANTY; without even the implied warranty of 4335156283Srwatson# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 4336156283Srwatson# General Public License for more details. 4337156283Srwatson# 4338156283Srwatson# You should have received a copy of the GNU General Public License 4339156283Srwatson# along with this program; if not, write to the Free Software 4340156283Srwatson# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 4341156283Srwatson# 4342156283Srwatson# As a special exception to the GNU General Public License, if you 4343156283Srwatson# distribute this file as part of a program that contains a 4344156283Srwatson# configuration script generated by Autoconf, you may include it under 4345156283Srwatson# the same distribution terms that you use for the rest of that program. 4346156283Srwatson 4347156283Srwatson# A sed program that does not truncate output. 4348156283SrwatsonSED=$lt_SED 4349156283Srwatson 4350156283Srwatson# Sed that helps us avoid accidentally triggering echo(1) options like -n. 4351156283SrwatsonXsed="$SED -e 1s/^X//" 4352156283Srwatson 4353156283Srwatson# The HP-UX ksh and POSIX shell print the target directory to stdout 4354156283Srwatson# if CDPATH is set. 4355156283Srwatson(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 4356156283Srwatson 4357156283Srwatson# The names of the tagged configurations supported by this script. 4358156283Srwatsonavailable_tags= 4359156283Srwatson 4360156283Srwatson# ### BEGIN LIBTOOL CONFIG], 4361156283Srwatson[# ### BEGIN LIBTOOL TAG CONFIG: $tagname]) 4362156283Srwatson 4363156283Srwatson# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 4364156283Srwatson 4365156283Srwatson# Shell to use when invoking shell scripts. 4366156283SrwatsonSHELL=$lt_SHELL 4367156283Srwatson 4368156283Srwatson# Whether or not to build shared libraries. 4369156283Srwatsonbuild_libtool_libs=$enable_shared 4370156283Srwatson 4371156283Srwatson# Whether or not to build static libraries. 4372156283Srwatsonbuild_old_libs=$enable_static 4373156283Srwatson 4374156283Srwatson# Whether or not to add -lc for building shared libraries. 4375156283Srwatsonbuild_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1) 4376156283Srwatson 4377156283Srwatson# Whether or not to disallow shared libs when runtime libs are static 4378156283Srwatsonallow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) 4379156283Srwatson 4380156283Srwatson# Whether or not to optimize for fast installation. 4381156283Srwatsonfast_install=$enable_fast_install 4382156283Srwatson 4383156283Srwatson# The host system. 4384156283Srwatsonhost_alias=$host_alias 4385156283Srwatsonhost=$host 4386156283Srwatsonhost_os=$host_os 4387156283Srwatson 4388156283Srwatson# The build system. 4389156283Srwatsonbuild_alias=$build_alias 4390156283Srwatsonbuild=$build 4391156283Srwatsonbuild_os=$build_os 4392156283Srwatson 4393156283Srwatson# An echo program that does not interpret backslashes. 4394156283Srwatsonecho=$lt_echo 4395156283Srwatson 4396156283Srwatson# The archiver. 4397156283SrwatsonAR=$lt_AR 4398156283SrwatsonAR_FLAGS=$lt_AR_FLAGS 4399156283Srwatson 4400156283Srwatson# A C compiler. 4401156283SrwatsonLTCC=$lt_LTCC 4402156283Srwatson 4403173143Srwatson# LTCC compiler flags. 4404173143SrwatsonLTCFLAGS=$lt_LTCFLAGS 4405173143Srwatson 4406156283Srwatson# A language-specific compiler. 4407156283SrwatsonCC=$lt_[]_LT_AC_TAGVAR(compiler, $1) 4408156283Srwatson 4409156283Srwatson# Is the compiler the GNU C compiler? 4410156283Srwatsonwith_gcc=$_LT_AC_TAGVAR(GCC, $1) 4411156283Srwatson 4412156283Srwatson# An ERE matcher. 4413156283SrwatsonEGREP=$lt_EGREP 4414156283Srwatson 4415156283Srwatson# The linker used to build libraries. 4416156283SrwatsonLD=$lt_[]_LT_AC_TAGVAR(LD, $1) 4417156283Srwatson 4418156283Srwatson# Whether we need hard or soft links. 4419156283SrwatsonLN_S=$lt_LN_S 4420156283Srwatson 4421156283Srwatson# A BSD-compatible nm program. 4422156283SrwatsonNM=$lt_NM 4423156283Srwatson 4424156283Srwatson# A symbol stripping program 4425156283SrwatsonSTRIP=$lt_STRIP 4426156283Srwatson 4427156283Srwatson# Used to examine libraries when file_magic_cmd begins "file" 4428156283SrwatsonMAGIC_CMD=$MAGIC_CMD 4429156283Srwatson 4430156283Srwatson# Used on cygwin: DLL creation program. 4431156283SrwatsonDLLTOOL="$DLLTOOL" 4432156283Srwatson 4433156283Srwatson# Used on cygwin: object dumper. 4434156283SrwatsonOBJDUMP="$OBJDUMP" 4435156283Srwatson 4436156283Srwatson# Used on cygwin: assembler. 4437156283SrwatsonAS="$AS" 4438156283Srwatson 4439156283Srwatson# The name of the directory that contains temporary libtool files. 4440156283Srwatsonobjdir=$objdir 4441156283Srwatson 4442156283Srwatson# How to create reloadable object files. 4443156283Srwatsonreload_flag=$lt_reload_flag 4444156283Srwatsonreload_cmds=$lt_reload_cmds 4445156283Srwatson 4446156283Srwatson# How to pass a linker flag through the compiler. 4447156283Srwatsonwl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) 4448156283Srwatson 4449156283Srwatson# Object file suffix (normally "o"). 4450156283Srwatsonobjext="$ac_objext" 4451156283Srwatson 4452156283Srwatson# Old archive suffix (normally "a"). 4453156283Srwatsonlibext="$libext" 4454156283Srwatson 4455156283Srwatson# Shared library suffix (normally ".so"). 4456156283Srwatsonshrext_cmds='$shrext_cmds' 4457156283Srwatson 4458156283Srwatson# Executable file suffix (normally ""). 4459156283Srwatsonexeext="$exeext" 4460156283Srwatson 4461156283Srwatson# Additional compiler flags for building library objects. 4462156283Srwatsonpic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) 4463156283Srwatsonpic_mode=$pic_mode 4464156283Srwatson 4465156283Srwatson# What is the maximum length of a command? 4466156283Srwatsonmax_cmd_len=$lt_cv_sys_max_cmd_len 4467156283Srwatson 4468156283Srwatson# Does compiler simultaneously support -c and -o options? 4469156283Srwatsoncompiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) 4470156283Srwatson 4471156283Srwatson# Must we lock files when doing compilation? 4472156283Srwatsonneed_locks=$lt_need_locks 4473156283Srwatson 4474156283Srwatson# Do we need the lib prefix for modules? 4475156283Srwatsonneed_lib_prefix=$need_lib_prefix 4476156283Srwatson 4477156283Srwatson# Do we need a version for libraries? 4478156283Srwatsonneed_version=$need_version 4479156283Srwatson 4480156283Srwatson# Whether dlopen is supported. 4481156283Srwatsondlopen_support=$enable_dlopen 4482156283Srwatson 4483156283Srwatson# Whether dlopen of programs is supported. 4484156283Srwatsondlopen_self=$enable_dlopen_self 4485156283Srwatson 4486156283Srwatson# Whether dlopen of statically linked programs is supported. 4487156283Srwatsondlopen_self_static=$enable_dlopen_self_static 4488156283Srwatson 4489156283Srwatson# Compiler flag to prevent dynamic linking. 4490156283Srwatsonlink_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1) 4491156283Srwatson 4492156283Srwatson# Compiler flag to turn off builtin functions. 4493156283Srwatsonno_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) 4494156283Srwatson 4495156283Srwatson# Compiler flag to allow reflexive dlopens. 4496156283Srwatsonexport_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1) 4497156283Srwatson 4498156283Srwatson# Compiler flag to generate shared objects directly from archives. 4499156283Srwatsonwhole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1) 4500156283Srwatson 4501156283Srwatson# Compiler flag to generate thread-safe objects. 4502156283Srwatsonthread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1) 4503156283Srwatson 4504156283Srwatson# Library versioning type. 4505156283Srwatsonversion_type=$version_type 4506156283Srwatson 4507156283Srwatson# Format of library name prefix. 4508156283Srwatsonlibname_spec=$lt_libname_spec 4509156283Srwatson 4510156283Srwatson# List of archive names. First name is the real one, the rest are links. 4511156283Srwatson# The last name is the one that the linker finds with -lNAME. 4512156283Srwatsonlibrary_names_spec=$lt_library_names_spec 4513156283Srwatson 4514156283Srwatson# The coded name of the library, if different from the real name. 4515156283Srwatsonsoname_spec=$lt_soname_spec 4516156283Srwatson 4517156283Srwatson# Commands used to build and install an old-style archive. 4518156283SrwatsonRANLIB=$lt_RANLIB 4519156283Srwatsonold_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1) 4520156283Srwatsonold_postinstall_cmds=$lt_old_postinstall_cmds 4521156283Srwatsonold_postuninstall_cmds=$lt_old_postuninstall_cmds 4522156283Srwatson 4523156283Srwatson# Create an old-style archive from a shared archive. 4524156283Srwatsonold_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1) 4525156283Srwatson 4526156283Srwatson# Create a temporary old-style archive to link instead of a shared archive. 4527156283Srwatsonold_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) 4528156283Srwatson 4529156283Srwatson# Commands used to build and install a shared archive. 4530156283Srwatsonarchive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1) 4531156283Srwatsonarchive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1) 4532156283Srwatsonpostinstall_cmds=$lt_postinstall_cmds 4533156283Srwatsonpostuninstall_cmds=$lt_postuninstall_cmds 4534156283Srwatson 4535156283Srwatson# Commands used to build a loadable module (assumed same as above if empty) 4536156283Srwatsonmodule_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1) 4537156283Srwatsonmodule_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1) 4538156283Srwatson 4539156283Srwatson# Commands to strip libraries. 4540156283Srwatsonold_striplib=$lt_old_striplib 4541156283Srwatsonstriplib=$lt_striplib 4542156283Srwatson 4543156283Srwatson# Dependencies to place before the objects being linked to create a 4544156283Srwatson# shared library. 4545156283Srwatsonpredep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1) 4546156283Srwatson 4547156283Srwatson# Dependencies to place after the objects being linked to create a 4548156283Srwatson# shared library. 4549156283Srwatsonpostdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1) 4550156283Srwatson 4551156283Srwatson# Dependencies to place before the objects being linked to create a 4552156283Srwatson# shared library. 4553156283Srwatsonpredeps=$lt_[]_LT_AC_TAGVAR(predeps, $1) 4554156283Srwatson 4555156283Srwatson# Dependencies to place after the objects being linked to create a 4556156283Srwatson# shared library. 4557156283Srwatsonpostdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1) 4558156283Srwatson 4559156283Srwatson# The library search path used internally by the compiler when linking 4560156283Srwatson# a shared library. 4561156283Srwatsoncompiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1) 4562156283Srwatson 4563156283Srwatson# Method to check whether dependent libraries are shared objects. 4564156283Srwatsondeplibs_check_method=$lt_deplibs_check_method 4565156283Srwatson 4566156283Srwatson# Command to use when deplibs_check_method == file_magic. 4567156283Srwatsonfile_magic_cmd=$lt_file_magic_cmd 4568156283Srwatson 4569156283Srwatson# Flag that allows shared libraries with undefined symbols to be built. 4570156283Srwatsonallow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1) 4571156283Srwatson 4572156283Srwatson# Flag that forces no undefined symbols. 4573156283Srwatsonno_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1) 4574156283Srwatson 4575156283Srwatson# Commands used to finish a libtool library installation in a directory. 4576156283Srwatsonfinish_cmds=$lt_finish_cmds 4577156283Srwatson 4578156283Srwatson# Same as above, but a single script fragment to be evaled but not shown. 4579156283Srwatsonfinish_eval=$lt_finish_eval 4580156283Srwatson 4581156283Srwatson# Take the output of nm and produce a listing of raw symbols and C names. 4582156283Srwatsonglobal_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe 4583156283Srwatson 4584156283Srwatson# Transform the output of nm in a proper C declaration 4585156283Srwatsonglobal_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl 4586156283Srwatson 4587156283Srwatson# Transform the output of nm in a C name address pair 4588156283Srwatsonglobal_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address 4589156283Srwatson 4590156283Srwatson# This is the shared library runtime path variable. 4591156283Srwatsonrunpath_var=$runpath_var 4592156283Srwatson 4593156283Srwatson# This is the shared library path variable. 4594156283Srwatsonshlibpath_var=$shlibpath_var 4595156283Srwatson 4596156283Srwatson# Is shlibpath searched before the hard-coded library search path? 4597156283Srwatsonshlibpath_overrides_runpath=$shlibpath_overrides_runpath 4598156283Srwatson 4599156283Srwatson# How to hardcode a shared library path into an executable. 4600156283Srwatsonhardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1) 4601156283Srwatson 4602156283Srwatson# Whether we should hardcode library paths into libraries. 4603156283Srwatsonhardcode_into_libs=$hardcode_into_libs 4604156283Srwatson 4605156283Srwatson# Flag to hardcode \$libdir into a binary during linking. 4606156283Srwatson# This must work even if \$libdir does not exist. 4607156283Srwatsonhardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) 4608156283Srwatson 4609156283Srwatson# If ld is used when linking, flag to hardcode \$libdir into 4610156283Srwatson# a binary during linking. This must work even if \$libdir does 4611156283Srwatson# not exist. 4612156283Srwatsonhardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) 4613156283Srwatson 4614156283Srwatson# Whether we need a single -rpath flag with a separated argument. 4615156283Srwatsonhardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1) 4616156283Srwatson 4617156283Srwatson# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the 4618156283Srwatson# resulting binary. 4619156283Srwatsonhardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1) 4620156283Srwatson 4621156283Srwatson# Set to yes if using the -LDIR flag during linking hardcodes DIR into the 4622156283Srwatson# resulting binary. 4623156283Srwatsonhardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1) 4624156283Srwatson 4625156283Srwatson# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into 4626156283Srwatson# the resulting binary. 4627156283Srwatsonhardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1) 4628156283Srwatson 4629156283Srwatson# Set to yes if building a shared library automatically hardcodes DIR into the library 4630156283Srwatson# and all subsequent libraries and executables linked against it. 4631156283Srwatsonhardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1) 4632156283Srwatson 4633156283Srwatson# Variables whose values should be saved in libtool wrapper scripts and 4634156283Srwatson# restored at relink time. 4635156283Srwatsonvariables_saved_for_relink="$variables_saved_for_relink" 4636156283Srwatson 4637156283Srwatson# Whether libtool must link a program against all its dependency libraries. 4638156283Srwatsonlink_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1) 4639156283Srwatson 4640156283Srwatson# Compile-time system search path for libraries 4641156283Srwatsonsys_lib_search_path_spec=$lt_sys_lib_search_path_spec 4642156283Srwatson 4643156283Srwatson# Run-time system search path for libraries 4644156283Srwatsonsys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec 4645156283Srwatson 4646156283Srwatson# Fix the shell variable \$srcfile for the compiler. 4647173143Srwatsonfix_srcfile_path=$lt_fix_srcfile_path 4648156283Srwatson 4649156283Srwatson# Set to yes if exported symbols are required. 4650156283Srwatsonalways_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1) 4651156283Srwatson 4652156283Srwatson# The commands to list exported symbols. 4653156283Srwatsonexport_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1) 4654156283Srwatson 4655156283Srwatson# The commands to extract the exported symbol list from a shared archive. 4656156283Srwatsonextract_expsyms_cmds=$lt_extract_expsyms_cmds 4657156283Srwatson 4658156283Srwatson# Symbols that should not be listed in the preloaded symbols. 4659156283Srwatsonexclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1) 4660156283Srwatson 4661156283Srwatson# Symbols that must always be exported. 4662156283Srwatsoninclude_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1) 4663156283Srwatson 4664156283Srwatsonifelse([$1],[], 4665156283Srwatson[# ### END LIBTOOL CONFIG], 4666156283Srwatson[# ### END LIBTOOL TAG CONFIG: $tagname]) 4667156283Srwatson 4668156283Srwatson__EOF__ 4669156283Srwatson 4670156283Srwatsonifelse([$1],[], [ 4671156283Srwatson case $host_os in 4672156283Srwatson aix3*) 4673156283Srwatson cat <<\EOF >> "$cfgfile" 4674156283Srwatson 4675156283Srwatson# AIX sometimes has problems with the GCC collect2 program. For some 4676156283Srwatson# reason, if we set the COLLECT_NAMES environment variable, the problems 4677156283Srwatson# vanish in a puff of smoke. 4678156283Srwatsonif test "X${COLLECT_NAMES+set}" != Xset; then 4679156283Srwatson COLLECT_NAMES= 4680156283Srwatson export COLLECT_NAMES 4681156283Srwatsonfi 4682156283SrwatsonEOF 4683156283Srwatson ;; 4684156283Srwatson esac 4685156283Srwatson 4686156283Srwatson # We use sed instead of cat because bash on DJGPP gets confused if 4687156283Srwatson # if finds mixed CR/LF and LF-only lines. Since sed operates in 4688156283Srwatson # text mode, it properly converts lines to CR/LF. This bash problem 4689156283Srwatson # is reportedly fixed, but why not run on old versions too? 4690156283Srwatson sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1) 4691156283Srwatson 4692156283Srwatson mv -f "$cfgfile" "$ofile" || \ 4693156283Srwatson (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 4694156283Srwatson chmod +x "$ofile" 4695156283Srwatson]) 4696156283Srwatsonelse 4697156283Srwatson # If there is no Makefile yet, we rely on a make rule to execute 4698156283Srwatson # `config.status --recheck' to rerun these tests and create the 4699156283Srwatson # libtool script then. 4700156283Srwatson ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` 4701156283Srwatson if test -f "$ltmain_in"; then 4702156283Srwatson test -f Makefile && make "$ltmain" 4703156283Srwatson fi 4704156283Srwatsonfi 4705156283Srwatson])# AC_LIBTOOL_CONFIG 4706156283Srwatson 4707156283Srwatson 4708156283Srwatson# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME]) 4709156283Srwatson# ------------------------------------------- 4710156283SrwatsonAC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], 4711156283Srwatson[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl 4712156283Srwatson 4713156283Srwatson_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 4714156283Srwatson 4715156283Srwatsonif test "$GCC" = yes; then 4716156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 4717156283Srwatson 4718156283Srwatson AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 4719156283Srwatson lt_cv_prog_compiler_rtti_exceptions, 4720156283Srwatson [-fno-rtti -fno-exceptions], [], 4721156283Srwatson [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 4722156283Srwatsonfi 4723156283Srwatson])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI 4724156283Srwatson 4725156283Srwatson 4726156283Srwatson# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE 4727156283Srwatson# --------------------------------- 4728156283SrwatsonAC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], 4729156283Srwatson[AC_REQUIRE([AC_CANONICAL_HOST]) 4730173143SrwatsonAC_REQUIRE([LT_AC_PROG_SED]) 4731156283SrwatsonAC_REQUIRE([AC_PROG_NM]) 4732156283SrwatsonAC_REQUIRE([AC_OBJEXT]) 4733156283Srwatson# Check for command to grab the raw symbol name followed by C symbol from nm. 4734156283SrwatsonAC_MSG_CHECKING([command to parse $NM output from $compiler object]) 4735156283SrwatsonAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 4736156283Srwatson[ 4737156283Srwatson# These are sane defaults that work on at least a few old systems. 4738156283Srwatson# [They come from Ultrix. What could be older than Ultrix?!! ;)] 4739156283Srwatson 4740156283Srwatson# Character class describing NM global symbol codes. 4741156283Srwatsonsymcode='[[BCDEGRST]]' 4742156283Srwatson 4743156283Srwatson# Regexp to match symbols that can be accessed directly from C. 4744156283Srwatsonsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 4745156283Srwatson 4746156283Srwatson# Transform an extracted symbol line into a proper C declaration 4747156283Srwatsonlt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'" 4748156283Srwatson 4749156283Srwatson# Transform an extracted symbol line into symbol name and symbol address 4750156283Srwatsonlt_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'" 4751156283Srwatson 4752156283Srwatson# Define system-specific variables. 4753156283Srwatsoncase $host_os in 4754156283Srwatsonaix*) 4755156283Srwatson symcode='[[BCDT]]' 4756156283Srwatson ;; 4757156283Srwatsoncygwin* | mingw* | pw32*) 4758156283Srwatson symcode='[[ABCDGISTW]]' 4759156283Srwatson ;; 4760156283Srwatsonhpux*) # Its linker distinguishes data from code symbols 4761156283Srwatson if test "$host_cpu" = ia64; then 4762156283Srwatson symcode='[[ABCDEGRST]]' 4763156283Srwatson fi 4764156283Srwatson lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 4765156283Srwatson 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'" 4766156283Srwatson ;; 4767173143Srwatsonlinux* | k*bsd*-gnu) 4768156283Srwatson if test "$host_cpu" = ia64; then 4769156283Srwatson symcode='[[ABCDGIRSTW]]' 4770156283Srwatson lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 4771156283Srwatson 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'" 4772156283Srwatson fi 4773156283Srwatson ;; 4774156283Srwatsonirix* | nonstopux*) 4775156283Srwatson symcode='[[BCDEGRST]]' 4776156283Srwatson ;; 4777156283Srwatsonosf*) 4778156283Srwatson symcode='[[BCDEGQRST]]' 4779156283Srwatson ;; 4780173143Srwatsonsolaris*) 4781156283Srwatson symcode='[[BDRT]]' 4782156283Srwatson ;; 4783173143Srwatsonsco3.2v5*) 4784173143Srwatson symcode='[[DT]]' 4785173143Srwatson ;; 4786173143Srwatsonsysv4.2uw2*) 4787173143Srwatson symcode='[[DT]]' 4788173143Srwatson ;; 4789173143Srwatsonsysv5* | sco5v6* | unixware* | OpenUNIX*) 4790173143Srwatson symcode='[[ABDT]]' 4791173143Srwatson ;; 4792156283Srwatsonsysv4) 4793156283Srwatson symcode='[[DFNSTU]]' 4794156283Srwatson ;; 4795156283Srwatsonesac 4796156283Srwatson 4797156283Srwatson# Handle CRLF in mingw tool chain 4798156283Srwatsonopt_cr= 4799156283Srwatsoncase $build_os in 4800156283Srwatsonmingw*) 4801156283Srwatson opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp 4802156283Srwatson ;; 4803156283Srwatsonesac 4804156283Srwatson 4805156283Srwatson# If we're using GNU nm, then use its standard symbol codes. 4806156283Srwatsoncase `$NM -V 2>&1` in 4807156283Srwatson*GNU* | *'with BFD'*) 4808156283Srwatson symcode='[[ABCDGIRSTW]]' ;; 4809156283Srwatsonesac 4810156283Srwatson 4811156283Srwatson# Try without a prefix undercore, then with it. 4812156283Srwatsonfor ac_symprfx in "" "_"; do 4813156283Srwatson 4814156283Srwatson # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 4815156283Srwatson symxfrm="\\1 $ac_symprfx\\2 \\2" 4816156283Srwatson 4817156283Srwatson # Write the raw and C identifiers. 4818156283Srwatson lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 4819156283Srwatson 4820156283Srwatson # Check to see that the pipe works correctly. 4821156283Srwatson pipe_works=no 4822156283Srwatson 4823156283Srwatson rm -f conftest* 4824156283Srwatson cat > conftest.$ac_ext <<EOF 4825156283Srwatson#ifdef __cplusplus 4826156283Srwatsonextern "C" { 4827156283Srwatson#endif 4828156283Srwatsonchar nm_test_var; 4829156283Srwatsonvoid nm_test_func(){} 4830156283Srwatson#ifdef __cplusplus 4831156283Srwatson} 4832156283Srwatson#endif 4833156283Srwatsonint main(){nm_test_var='a';nm_test_func();return(0);} 4834156283SrwatsonEOF 4835156283Srwatson 4836156283Srwatson if AC_TRY_EVAL(ac_compile); then 4837156283Srwatson # Now try to grab the symbols. 4838156283Srwatson nlist=conftest.nm 4839156283Srwatson if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then 4840156283Srwatson # Try sorting and uniquifying the output. 4841156283Srwatson if sort "$nlist" | uniq > "$nlist"T; then 4842156283Srwatson mv -f "$nlist"T "$nlist" 4843156283Srwatson else 4844156283Srwatson rm -f "$nlist"T 4845156283Srwatson fi 4846156283Srwatson 4847156283Srwatson # Make sure that we snagged all the symbols we need. 4848156283Srwatson if grep ' nm_test_var$' "$nlist" >/dev/null; then 4849156283Srwatson if grep ' nm_test_func$' "$nlist" >/dev/null; then 4850156283Srwatson cat <<EOF > conftest.$ac_ext 4851156283Srwatson#ifdef __cplusplus 4852156283Srwatsonextern "C" { 4853156283Srwatson#endif 4854156283Srwatson 4855156283SrwatsonEOF 4856156283Srwatson # Now generate the symbol file. 4857156283Srwatson eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' 4858156283Srwatson 4859156283Srwatson cat <<EOF >> conftest.$ac_ext 4860156283Srwatson#if defined (__STDC__) && __STDC__ 4861156283Srwatson# define lt_ptr_t void * 4862156283Srwatson#else 4863156283Srwatson# define lt_ptr_t char * 4864156283Srwatson# define const 4865156283Srwatson#endif 4866156283Srwatson 4867156283Srwatson/* The mapping between symbol names and symbols. */ 4868156283Srwatsonconst struct { 4869156283Srwatson const char *name; 4870156283Srwatson lt_ptr_t address; 4871156283Srwatson} 4872156283Srwatsonlt_preloaded_symbols[[]] = 4873156283Srwatson{ 4874156283SrwatsonEOF 4875156283Srwatson $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext 4876156283Srwatson cat <<\EOF >> conftest.$ac_ext 4877156283Srwatson {0, (lt_ptr_t) 0} 4878156283Srwatson}; 4879156283Srwatson 4880156283Srwatson#ifdef __cplusplus 4881156283Srwatson} 4882156283Srwatson#endif 4883156283SrwatsonEOF 4884156283Srwatson # Now try linking the two files. 4885156283Srwatson mv conftest.$ac_objext conftstm.$ac_objext 4886156283Srwatson lt_save_LIBS="$LIBS" 4887156283Srwatson lt_save_CFLAGS="$CFLAGS" 4888156283Srwatson LIBS="conftstm.$ac_objext" 4889156283Srwatson CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 4890156283Srwatson if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then 4891156283Srwatson pipe_works=yes 4892156283Srwatson fi 4893156283Srwatson LIBS="$lt_save_LIBS" 4894156283Srwatson CFLAGS="$lt_save_CFLAGS" 4895156283Srwatson else 4896156283Srwatson echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 4897156283Srwatson fi 4898156283Srwatson else 4899156283Srwatson echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 4900156283Srwatson fi 4901156283Srwatson else 4902156283Srwatson echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 4903156283Srwatson fi 4904156283Srwatson else 4905156283Srwatson echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 4906156283Srwatson cat conftest.$ac_ext >&5 4907156283Srwatson fi 4908156283Srwatson rm -f conftest* conftst* 4909156283Srwatson 4910156283Srwatson # Do not use the global_symbol_pipe unless it works. 4911156283Srwatson if test "$pipe_works" = yes; then 4912156283Srwatson break 4913156283Srwatson else 4914156283Srwatson lt_cv_sys_global_symbol_pipe= 4915156283Srwatson fi 4916156283Srwatsondone 4917156283Srwatson]) 4918156283Srwatsonif test -z "$lt_cv_sys_global_symbol_pipe"; then 4919156283Srwatson lt_cv_sys_global_symbol_to_cdecl= 4920156283Srwatsonfi 4921156283Srwatsonif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 4922156283Srwatson AC_MSG_RESULT(failed) 4923156283Srwatsonelse 4924156283Srwatson AC_MSG_RESULT(ok) 4925156283Srwatsonfi 4926156283Srwatson]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE 4927156283Srwatson 4928156283Srwatson 4929156283Srwatson# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME]) 4930156283Srwatson# --------------------------------------- 4931156283SrwatsonAC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC], 4932156283Srwatson[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)= 4933156283Srwatson_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 4934156283Srwatson_LT_AC_TAGVAR(lt_prog_compiler_static, $1)= 4935156283Srwatson 4936156283SrwatsonAC_MSG_CHECKING([for $compiler option to produce PIC]) 4937156283Srwatson ifelse([$1],[CXX],[ 4938156283Srwatson # C++ specific cases for pic, static, wl, etc. 4939156283Srwatson if test "$GXX" = yes; then 4940156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4941156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' 4942156283Srwatson 4943156283Srwatson case $host_os in 4944156283Srwatson aix*) 4945156283Srwatson # All AIX code is PIC. 4946156283Srwatson if test "$host_cpu" = ia64; then 4947156283Srwatson # AIX 5 now supports IA64 processor 4948156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4949156283Srwatson fi 4950156283Srwatson ;; 4951156283Srwatson amigaos*) 4952156283Srwatson # FIXME: we need at least 68020 code to build shared libraries, but 4953156283Srwatson # adding the `-m68020' flag to GCC prevents building anything better, 4954156283Srwatson # like `-m68040'. 4955156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 4956156283Srwatson ;; 4957173143Srwatson beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 4958156283Srwatson # PIC is the default for these OSes. 4959156283Srwatson ;; 4960173143Srwatson mingw* | cygwin* | os2* | pw32*) 4961156283Srwatson # This hack is so that the source file can tell whether it is being 4962156283Srwatson # built for inclusion in a dll (and should export symbols for example). 4963173143Srwatson # Although the cygwin gcc ignores -fPIC, still need this for old-style 4964173143Srwatson # (--disable-auto-import) libraries 4965156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' 4966156283Srwatson ;; 4967156283Srwatson darwin* | rhapsody*) 4968156283Srwatson # PIC is the default on this platform 4969156283Srwatson # Common symbols not allowed in MH_DYLIB files 4970156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 4971156283Srwatson ;; 4972156283Srwatson *djgpp*) 4973156283Srwatson # DJGPP does not support shared libraries at all 4974156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 4975156283Srwatson ;; 4976173143Srwatson interix[[3-9]]*) 4977173143Srwatson # Interix 3.x gcc -fpic/-fPIC options generate broken code. 4978173143Srwatson # Instead, we relocate shared libraries at runtime. 4979173143Srwatson ;; 4980156283Srwatson sysv4*MP*) 4981156283Srwatson if test -d /usr/nec; then 4982156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 4983156283Srwatson fi 4984156283Srwatson ;; 4985156283Srwatson hpux*) 4986156283Srwatson # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 4987156283Srwatson # not for PA HP-UX. 4988156283Srwatson case $host_cpu in 4989156283Srwatson hppa*64*|ia64*) 4990156283Srwatson ;; 4991156283Srwatson *) 4992156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4993156283Srwatson ;; 4994156283Srwatson esac 4995156283Srwatson ;; 4996156283Srwatson *) 4997156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4998156283Srwatson ;; 4999156283Srwatson esac 5000156283Srwatson else 5001156283Srwatson case $host_os in 5002156283Srwatson aix4* | aix5*) 5003156283Srwatson # All AIX code is PIC. 5004156283Srwatson if test "$host_cpu" = ia64; then 5005156283Srwatson # AIX 5 now supports IA64 processor 5006156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5007156283Srwatson else 5008156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 5009156283Srwatson fi 5010156283Srwatson ;; 5011156283Srwatson chorus*) 5012156283Srwatson case $cc_basename in 5013156283Srwatson cxch68*) 5014156283Srwatson # Green Hills C++ Compiler 5015156283Srwatson # _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" 5016156283Srwatson ;; 5017156283Srwatson esac 5018156283Srwatson ;; 5019156283Srwatson darwin*) 5020156283Srwatson # PIC is the default on this platform 5021156283Srwatson # Common symbols not allowed in MH_DYLIB files 5022156283Srwatson case $cc_basename in 5023156283Srwatson xlc*) 5024156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' 5025156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5026156283Srwatson ;; 5027156283Srwatson esac 5028156283Srwatson ;; 5029156283Srwatson dgux*) 5030156283Srwatson case $cc_basename in 5031156283Srwatson ec++*) 5032156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5033156283Srwatson ;; 5034156283Srwatson ghcx*) 5035156283Srwatson # Green Hills C++ Compiler 5036156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 5037156283Srwatson ;; 5038156283Srwatson *) 5039156283Srwatson ;; 5040156283Srwatson esac 5041156283Srwatson ;; 5042173143Srwatson freebsd* | dragonfly*) 5043156283Srwatson # FreeBSD uses GNU C++ 5044156283Srwatson ;; 5045156283Srwatson hpux9* | hpux10* | hpux11*) 5046156283Srwatson case $cc_basename in 5047156283Srwatson CC*) 5048156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5049173143Srwatson _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 5050156283Srwatson if test "$host_cpu" != ia64; then 5051156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 5052156283Srwatson fi 5053156283Srwatson ;; 5054156283Srwatson aCC*) 5055156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5056173143Srwatson _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 5057156283Srwatson case $host_cpu in 5058156283Srwatson hppa*64*|ia64*) 5059156283Srwatson # +Z the default 5060156283Srwatson ;; 5061156283Srwatson *) 5062156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 5063156283Srwatson ;; 5064156283Srwatson esac 5065156283Srwatson ;; 5066156283Srwatson *) 5067156283Srwatson ;; 5068156283Srwatson esac 5069156283Srwatson ;; 5070173143Srwatson interix*) 5071173143Srwatson # This is c89, which is MS Visual C++ (no shared libs) 5072173143Srwatson # Anyone wants to do a port? 5073173143Srwatson ;; 5074156283Srwatson irix5* | irix6* | nonstopux*) 5075156283Srwatson case $cc_basename in 5076156283Srwatson CC*) 5077156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5078156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5079156283Srwatson # CC pic flag -KPIC is the default. 5080156283Srwatson ;; 5081156283Srwatson *) 5082156283Srwatson ;; 5083156283Srwatson esac 5084156283Srwatson ;; 5085173143Srwatson linux* | k*bsd*-gnu) 5086156283Srwatson case $cc_basename in 5087156283Srwatson KCC*) 5088156283Srwatson # KAI C++ Compiler 5089156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 5090156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5091156283Srwatson ;; 5092156283Srwatson icpc* | ecpc*) 5093156283Srwatson # Intel C++ 5094156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5095156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5096156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' 5097156283Srwatson ;; 5098156283Srwatson pgCC*) 5099156283Srwatson # Portland Group C++ compiler. 5100156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5101156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 5102156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5103156283Srwatson ;; 5104156283Srwatson cxx*) 5105156283Srwatson # Compaq C++ 5106156283Srwatson # Make sure the PIC flag is empty. It appears that all Alpha 5107156283Srwatson # Linux and Compaq Tru64 Unix objects are PIC. 5108156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 5109156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5110156283Srwatson ;; 5111156283Srwatson *) 5112173143Srwatson case `$CC -V 2>&1 | sed 5q` in 5113173143Srwatson *Sun\ C*) 5114173143Srwatson # Sun C++ 5.9 5115173143Srwatson _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5116173143Srwatson _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5117173143Srwatson _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 5118173143Srwatson ;; 5119173143Srwatson esac 5120156283Srwatson ;; 5121156283Srwatson esac 5122156283Srwatson ;; 5123156283Srwatson lynxos*) 5124156283Srwatson ;; 5125156283Srwatson m88k*) 5126156283Srwatson ;; 5127156283Srwatson mvs*) 5128156283Srwatson case $cc_basename in 5129156283Srwatson cxx*) 5130156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 5131156283Srwatson ;; 5132156283Srwatson *) 5133156283Srwatson ;; 5134156283Srwatson esac 5135156283Srwatson ;; 5136156283Srwatson netbsd*) 5137156283Srwatson ;; 5138156283Srwatson osf3* | osf4* | osf5*) 5139156283Srwatson case $cc_basename in 5140156283Srwatson KCC*) 5141156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 5142156283Srwatson ;; 5143156283Srwatson RCC*) 5144156283Srwatson # Rational C++ 2.4.1 5145156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 5146156283Srwatson ;; 5147156283Srwatson cxx*) 5148156283Srwatson # Digital/Compaq C++ 5149156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5150156283Srwatson # Make sure the PIC flag is empty. It appears that all Alpha 5151156283Srwatson # Linux and Compaq Tru64 Unix objects are PIC. 5152156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 5153156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5154156283Srwatson ;; 5155156283Srwatson *) 5156156283Srwatson ;; 5157156283Srwatson esac 5158156283Srwatson ;; 5159156283Srwatson psos*) 5160156283Srwatson ;; 5161156283Srwatson solaris*) 5162156283Srwatson case $cc_basename in 5163156283Srwatson CC*) 5164156283Srwatson # Sun C++ 4.2, 5.x and Centerline C++ 5165156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5166156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5167156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 5168156283Srwatson ;; 5169156283Srwatson gcx*) 5170156283Srwatson # Green Hills C++ Compiler 5171156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 5172156283Srwatson ;; 5173156283Srwatson *) 5174156283Srwatson ;; 5175156283Srwatson esac 5176156283Srwatson ;; 5177156283Srwatson sunos4*) 5178156283Srwatson case $cc_basename in 5179156283Srwatson CC*) 5180156283Srwatson # Sun C++ 4.x 5181156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 5182156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5183156283Srwatson ;; 5184156283Srwatson lcc*) 5185156283Srwatson # Lucid 5186156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 5187156283Srwatson ;; 5188156283Srwatson *) 5189156283Srwatson ;; 5190156283Srwatson esac 5191156283Srwatson ;; 5192156283Srwatson tandem*) 5193156283Srwatson case $cc_basename in 5194156283Srwatson NCC*) 5195156283Srwatson # NonStop-UX NCC 3.20 5196156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5197156283Srwatson ;; 5198156283Srwatson *) 5199156283Srwatson ;; 5200156283Srwatson esac 5201156283Srwatson ;; 5202173143Srwatson sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 5203173143Srwatson case $cc_basename in 5204173143Srwatson CC*) 5205173143Srwatson _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5206173143Srwatson _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5207173143Srwatson _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5208173143Srwatson ;; 5209173143Srwatson esac 5210156283Srwatson ;; 5211156283Srwatson vxworks*) 5212156283Srwatson ;; 5213156283Srwatson *) 5214156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 5215156283Srwatson ;; 5216156283Srwatson esac 5217156283Srwatson fi 5218156283Srwatson], 5219156283Srwatson[ 5220156283Srwatson if test "$GCC" = yes; then 5221156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5222156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' 5223156283Srwatson 5224156283Srwatson case $host_os in 5225156283Srwatson aix*) 5226156283Srwatson # All AIX code is PIC. 5227156283Srwatson if test "$host_cpu" = ia64; then 5228156283Srwatson # AIX 5 now supports IA64 processor 5229156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5230156283Srwatson fi 5231156283Srwatson ;; 5232156283Srwatson 5233156283Srwatson amigaos*) 5234156283Srwatson # FIXME: we need at least 68020 code to build shared libraries, but 5235156283Srwatson # adding the `-m68020' flag to GCC prevents building anything better, 5236156283Srwatson # like `-m68040'. 5237156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 5238156283Srwatson ;; 5239156283Srwatson 5240173143Srwatson beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 5241156283Srwatson # PIC is the default for these OSes. 5242156283Srwatson ;; 5243156283Srwatson 5244173143Srwatson mingw* | cygwin* | pw32* | os2*) 5245156283Srwatson # This hack is so that the source file can tell whether it is being 5246156283Srwatson # built for inclusion in a dll (and should export symbols for example). 5247173143Srwatson # Although the cygwin gcc ignores -fPIC, still need this for old-style 5248173143Srwatson # (--disable-auto-import) libraries 5249156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' 5250156283Srwatson ;; 5251156283Srwatson 5252156283Srwatson darwin* | rhapsody*) 5253156283Srwatson # PIC is the default on this platform 5254156283Srwatson # Common symbols not allowed in MH_DYLIB files 5255156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 5256156283Srwatson ;; 5257156283Srwatson 5258173143Srwatson interix[[3-9]]*) 5259173143Srwatson # Interix 3.x gcc -fpic/-fPIC options generate broken code. 5260173143Srwatson # Instead, we relocate shared libraries at runtime. 5261173143Srwatson ;; 5262173143Srwatson 5263156283Srwatson msdosdjgpp*) 5264156283Srwatson # Just because we use GCC doesn't mean we suddenly get shared libraries 5265156283Srwatson # on systems that don't support them. 5266156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 5267156283Srwatson enable_shared=no 5268156283Srwatson ;; 5269156283Srwatson 5270156283Srwatson sysv4*MP*) 5271156283Srwatson if test -d /usr/nec; then 5272156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 5273156283Srwatson fi 5274156283Srwatson ;; 5275156283Srwatson 5276156283Srwatson hpux*) 5277156283Srwatson # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 5278156283Srwatson # not for PA HP-UX. 5279156283Srwatson case $host_cpu in 5280156283Srwatson hppa*64*|ia64*) 5281156283Srwatson # +Z the default 5282156283Srwatson ;; 5283156283Srwatson *) 5284156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5285156283Srwatson ;; 5286156283Srwatson esac 5287156283Srwatson ;; 5288156283Srwatson 5289156283Srwatson *) 5290156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5291156283Srwatson ;; 5292156283Srwatson esac 5293156283Srwatson else 5294156283Srwatson # PORTME Check for flag to pass linker flags through the system compiler. 5295156283Srwatson case $host_os in 5296156283Srwatson aix*) 5297156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5298156283Srwatson if test "$host_cpu" = ia64; then 5299156283Srwatson # AIX 5 now supports IA64 processor 5300156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5301156283Srwatson else 5302156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 5303156283Srwatson fi 5304156283Srwatson ;; 5305156283Srwatson darwin*) 5306156283Srwatson # PIC is the default on this platform 5307156283Srwatson # Common symbols not allowed in MH_DYLIB files 5308156283Srwatson case $cc_basename in 5309156283Srwatson xlc*) 5310156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' 5311156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5312156283Srwatson ;; 5313156283Srwatson esac 5314156283Srwatson ;; 5315156283Srwatson 5316173143Srwatson mingw* | cygwin* | pw32* | os2*) 5317156283Srwatson # This hack is so that the source file can tell whether it is being 5318156283Srwatson # built for inclusion in a dll (and should export symbols for example). 5319156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' 5320156283Srwatson ;; 5321156283Srwatson 5322156283Srwatson hpux9* | hpux10* | hpux11*) 5323156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5324156283Srwatson # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 5325156283Srwatson # not for PA HP-UX. 5326156283Srwatson case $host_cpu in 5327156283Srwatson hppa*64*|ia64*) 5328156283Srwatson # +Z the default 5329156283Srwatson ;; 5330156283Srwatson *) 5331156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 5332156283Srwatson ;; 5333156283Srwatson esac 5334156283Srwatson # Is there a better lt_prog_compiler_static that works with the bundled CC? 5335156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 5336156283Srwatson ;; 5337156283Srwatson 5338156283Srwatson irix5* | irix6* | nonstopux*) 5339156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5340156283Srwatson # PIC (with -KPIC) is the default. 5341156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5342156283Srwatson ;; 5343156283Srwatson 5344156283Srwatson newsos6) 5345156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5346156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5347156283Srwatson ;; 5348156283Srwatson 5349173143Srwatson linux* | k*bsd*-gnu) 5350156283Srwatson case $cc_basename in 5351156283Srwatson icc* | ecc*) 5352156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5353156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5354156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' 5355156283Srwatson ;; 5356156283Srwatson pgcc* | pgf77* | pgf90* | pgf95*) 5357156283Srwatson # Portland Group compilers (*not* the Pentium gcc compiler, 5358156283Srwatson # which looks to be a dead project) 5359156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5360156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 5361156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5362156283Srwatson ;; 5363156283Srwatson ccc*) 5364156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5365156283Srwatson # All Alpha code is PIC. 5366156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5367156283Srwatson ;; 5368173143Srwatson *) 5369173143Srwatson case `$CC -V 2>&1 | sed 5q` in 5370173143Srwatson *Sun\ C*) 5371173143Srwatson # Sun C 5.9 5372173143Srwatson _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5373173143Srwatson _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5374173143Srwatson _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5375173143Srwatson ;; 5376173143Srwatson *Sun\ F*) 5377173143Srwatson # Sun Fortran 8.3 passes all unrecognized flags to the linker 5378173143Srwatson _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5379173143Srwatson _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5380173143Srwatson _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='' 5381173143Srwatson ;; 5382173143Srwatson esac 5383173143Srwatson ;; 5384156283Srwatson esac 5385156283Srwatson ;; 5386156283Srwatson 5387156283Srwatson osf3* | osf4* | osf5*) 5388156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5389156283Srwatson # All OSF/1 code is PIC. 5390156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5391156283Srwatson ;; 5392156283Srwatson 5393173143Srwatson rdos*) 5394173143Srwatson _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5395156283Srwatson ;; 5396156283Srwatson 5397156283Srwatson solaris*) 5398156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5399156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5400156283Srwatson case $cc_basename in 5401156283Srwatson f77* | f90* | f95*) 5402156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 5403156283Srwatson *) 5404156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 5405156283Srwatson esac 5406156283Srwatson ;; 5407156283Srwatson 5408156283Srwatson sunos4*) 5409156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 5410156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 5411156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5412156283Srwatson ;; 5413156283Srwatson 5414173143Srwatson sysv4 | sysv4.2uw2* | sysv4.3*) 5415156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5416156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5417156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5418156283Srwatson ;; 5419156283Srwatson 5420156283Srwatson sysv4*MP*) 5421156283Srwatson if test -d /usr/nec ;then 5422156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 5423156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5424156283Srwatson fi 5425156283Srwatson ;; 5426156283Srwatson 5427173143Srwatson sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 5428173143Srwatson _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5429173143Srwatson _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5430173143Srwatson _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5431173143Srwatson ;; 5432173143Srwatson 5433156283Srwatson unicos*) 5434156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5435156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 5436156283Srwatson ;; 5437156283Srwatson 5438156283Srwatson uts4*) 5439156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 5440156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5441156283Srwatson ;; 5442156283Srwatson 5443156283Srwatson *) 5444156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 5445156283Srwatson ;; 5446156283Srwatson esac 5447156283Srwatson fi 5448156283Srwatson]) 5449156283SrwatsonAC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)]) 5450156283Srwatson 5451156283Srwatson# 5452156283Srwatson# Check to make sure the PIC flag actually works. 5453156283Srwatson# 5454156283Srwatsonif test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then 5455156283Srwatson AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works], 5456156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1), 5457156283Srwatson [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [], 5458156283Srwatson [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in 5459156283Srwatson "" | " "*) ;; 5460156283Srwatson *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;; 5461156283Srwatson esac], 5462156283Srwatson [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 5463156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 5464156283Srwatsonfi 5465156283Srwatsoncase $host_os in 5466156283Srwatson # For platforms which do not support PIC, -DPIC is meaningless: 5467156283Srwatson *djgpp*) 5468156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 5469156283Srwatson ;; 5470156283Srwatson *) 5471156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])" 5472156283Srwatson ;; 5473156283Srwatsonesac 5474173143Srwatson 5475173143Srwatson# 5476173143Srwatson# Check to make sure the static flag actually works. 5477173143Srwatson# 5478173143Srwatsonwl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\" 5479173143SrwatsonAC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 5480173143Srwatson _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1), 5481173143Srwatson $lt_tmp_static_flag, 5482173143Srwatson [], 5483173143Srwatson [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=]) 5484156283Srwatson]) 5485156283Srwatson 5486156283Srwatson 5487156283Srwatson# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME]) 5488156283Srwatson# ------------------------------------ 5489156283Srwatson# See if the linker supports building shared libraries. 5490156283SrwatsonAC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS], 5491173143Srwatson[AC_REQUIRE([LT_AC_PROG_SED])dnl 5492173143SrwatsonAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 5493156283Srwatsonifelse([$1],[CXX],[ 5494156283Srwatson _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 5495156283Srwatson case $host_os in 5496156283Srwatson aix4* | aix5*) 5497156283Srwatson # If we're using GNU nm, then we don't want the "-C" option. 5498156283Srwatson # -C means demangle to AIX nm, but means don't demangle with GNU nm 5499156283Srwatson if $NM -V 2>&1 | grep 'GNU' > /dev/null; then 5500156283Srwatson _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' 5501156283Srwatson else 5502156283Srwatson _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' 5503156283Srwatson fi 5504156283Srwatson ;; 5505156283Srwatson pw32*) 5506156283Srwatson _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" 5507156283Srwatson ;; 5508156283Srwatson cygwin* | mingw*) 5509173143Srwatson _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' 5510156283Srwatson ;; 5511156283Srwatson *) 5512156283Srwatson _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 5513156283Srwatson ;; 5514156283Srwatson esac 5515156283Srwatson],[ 5516156283Srwatson runpath_var= 5517156283Srwatson _LT_AC_TAGVAR(allow_undefined_flag, $1)= 5518156283Srwatson _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no 5519156283Srwatson _LT_AC_TAGVAR(archive_cmds, $1)= 5520156283Srwatson _LT_AC_TAGVAR(archive_expsym_cmds, $1)= 5521156283Srwatson _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)= 5522156283Srwatson _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)= 5523156283Srwatson _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= 5524156283Srwatson _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 5525156283Srwatson _LT_AC_TAGVAR(thread_safe_flag_spec, $1)= 5526156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= 5527156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 5528156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 5529156283Srwatson _LT_AC_TAGVAR(hardcode_direct, $1)=no 5530156283Srwatson _LT_AC_TAGVAR(hardcode_minus_L, $1)=no 5531156283Srwatson _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 5532156283Srwatson _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown 5533156283Srwatson _LT_AC_TAGVAR(hardcode_automatic, $1)=no 5534156283Srwatson _LT_AC_TAGVAR(module_cmds, $1)= 5535156283Srwatson _LT_AC_TAGVAR(module_expsym_cmds, $1)= 5536156283Srwatson _LT_AC_TAGVAR(always_export_symbols, $1)=no 5537156283Srwatson _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 5538156283Srwatson # include_expsyms should be a list of space-separated symbols to be *always* 5539156283Srwatson # included in the symbol list 5540156283Srwatson _LT_AC_TAGVAR(include_expsyms, $1)= 5541156283Srwatson # exclude_expsyms can be an extended regexp of symbols to exclude 5542156283Srwatson # it will be wrapped by ` (' and `)$', so one must not match beginning or 5543156283Srwatson # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', 5544156283Srwatson # as well as any symbol that contains `d'. 5545156283Srwatson _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_" 5546156283Srwatson # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 5547156283Srwatson # platforms (ab)use it in PIC code, but their linkers get confused if 5548156283Srwatson # the symbol is explicitly referenced. Since portable code cannot 5549156283Srwatson # rely on this symbol name, it's probably fine to never include it in 5550156283Srwatson # preloaded symbol tables. 5551156283Srwatson extract_expsyms_cmds= 5552156283Srwatson # Just being paranoid about ensuring that cc_basename is set. 5553156283Srwatson _LT_CC_BASENAME([$compiler]) 5554156283Srwatson case $host_os in 5555156283Srwatson cygwin* | mingw* | pw32*) 5556156283Srwatson # FIXME: the MSVC++ port hasn't been tested in a loooong time 5557156283Srwatson # When not using gcc, we currently assume that we are using 5558156283Srwatson # Microsoft Visual C++. 5559156283Srwatson if test "$GCC" != yes; then 5560156283Srwatson with_gnu_ld=no 5561156283Srwatson fi 5562156283Srwatson ;; 5563173143Srwatson interix*) 5564173143Srwatson # we just hope/assume this is gcc and not c89 (= MSVC++) 5565173143Srwatson with_gnu_ld=yes 5566173143Srwatson ;; 5567156283Srwatson openbsd*) 5568156283Srwatson with_gnu_ld=no 5569156283Srwatson ;; 5570156283Srwatson esac 5571156283Srwatson 5572156283Srwatson _LT_AC_TAGVAR(ld_shlibs, $1)=yes 5573156283Srwatson if test "$with_gnu_ld" = yes; then 5574156283Srwatson # If archive_cmds runs LD, not CC, wlarc should be empty 5575156283Srwatson wlarc='${wl}' 5576156283Srwatson 5577156283Srwatson # Set some defaults for GNU ld with shared library support. These 5578156283Srwatson # are reset later if shared libraries are not supported. Putting them 5579156283Srwatson # here allows them to be overridden if necessary. 5580156283Srwatson runpath_var=LD_RUN_PATH 5581156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 5582156283Srwatson _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 5583156283Srwatson # ancient GNU ld didn't support --whole-archive et. al. 5584156283Srwatson if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then 5585156283Srwatson _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 5586156283Srwatson else 5587156283Srwatson _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 5588156283Srwatson fi 5589156283Srwatson supports_anon_versioning=no 5590156283Srwatson case `$LD -v 2>/dev/null` in 5591156283Srwatson *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 5592156283Srwatson *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 5593156283Srwatson *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 5594156283Srwatson *\ 2.11.*) ;; # other 2.11 versions 5595156283Srwatson *) supports_anon_versioning=yes ;; 5596156283Srwatson esac 5597156283Srwatson 5598156283Srwatson # See if GNU ld supports shared libraries. 5599156283Srwatson case $host_os in 5600156283Srwatson aix3* | aix4* | aix5*) 5601156283Srwatson # On AIX/PPC, the GNU linker is very broken 5602156283Srwatson if test "$host_cpu" != ia64; then 5603156283Srwatson _LT_AC_TAGVAR(ld_shlibs, $1)=no 5604156283Srwatson cat <<EOF 1>&2 5605156283Srwatson 5606156283Srwatson*** Warning: the GNU linker, at least up to release 2.9.1, is reported 5607156283Srwatson*** to be unable to reliably create shared libraries on AIX. 5608156283Srwatson*** Therefore, libtool is disabling shared libraries support. If you 5609156283Srwatson*** really care for shared libraries, you may want to modify your PATH 5610156283Srwatson*** so that a non-GNU linker is found, and then restart. 5611156283Srwatson 5612156283SrwatsonEOF 5613156283Srwatson fi 5614156283Srwatson ;; 5615156283Srwatson 5616156283Srwatson amigaos*) 5617156283Srwatson _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)' 5618156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5619156283Srwatson _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 5620156283Srwatson 5621156283Srwatson # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports 5622156283Srwatson # that the semantics of dynamic libraries on AmigaOS, at least up 5623156283Srwatson # to version 4, is to share data among multiple programs linked 5624156283Srwatson # with the same dynamic library. Since this doesn't match the 5625156283Srwatson # behavior of shared libraries on other platforms, we can't use 5626156283Srwatson # them. 5627156283Srwatson _LT_AC_TAGVAR(ld_shlibs, $1)=no 5628156283Srwatson ;; 5629156283Srwatson 5630156283Srwatson beos*) 5631156283Srwatson if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 5632156283Srwatson _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 5633156283Srwatson # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 5634156283Srwatson # support --undefined. This deserves some investigation. FIXME 5635156283Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5636156283Srwatson else 5637156283Srwatson _LT_AC_TAGVAR(ld_shlibs, $1)=no 5638156283Srwatson fi 5639156283Srwatson ;; 5640156283Srwatson 5641156283Srwatson cygwin* | mingw* | pw32*) 5642156283Srwatson # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 5643156283Srwatson # as there is no search path for DLLs. 5644156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5645156283Srwatson _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 5646156283Srwatson _LT_AC_TAGVAR(always_export_symbols, $1)=no 5647156283Srwatson _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5648173143Srwatson _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' 5649156283Srwatson 5650156283Srwatson if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then 5651173143Srwatson _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' 5652156283Srwatson # If the export-symbols file already is a .def file (1st line 5653156283Srwatson # is EXPORTS), use it as is; otherwise, prepend... 5654156283Srwatson _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 5655156283Srwatson cp $export_symbols $output_objdir/$soname.def; 5656156283Srwatson else 5657156283Srwatson echo EXPORTS > $output_objdir/$soname.def; 5658156283Srwatson cat $export_symbols >> $output_objdir/$soname.def; 5659156283Srwatson fi~ 5660173143Srwatson $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 5661156283Srwatson else 5662156283Srwatson _LT_AC_TAGVAR(ld_shlibs, $1)=no 5663156283Srwatson fi 5664156283Srwatson ;; 5665156283Srwatson 5666173143Srwatson interix[[3-9]]*) 5667173143Srwatson _LT_AC_TAGVAR(hardcode_direct, $1)=no 5668173143Srwatson _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 5669173143Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 5670173143Srwatson _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 5671173143Srwatson # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 5672173143Srwatson # Instead, shared libraries are loaded at an image base (0x10000000 by 5673173143Srwatson # default) and relocated if they conflict, which is a slow very memory 5674173143Srwatson # consuming and fragmenting process. To avoid this, we pick a random, 5675173143Srwatson # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 5676173143Srwatson # time. Moving up from 0x10000000 also allows more sbrk(2) space. 5677173143Srwatson _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' 5678173143Srwatson _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' 5679173143Srwatson ;; 5680173143Srwatson 5681173143Srwatson gnu* | linux* | k*bsd*-gnu) 5682156283Srwatson if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 5683156283Srwatson tmp_addflag= 5684156283Srwatson case $cc_basename,$host_cpu in 5685156283Srwatson pgcc*) # Portland Group C compiler 5686156283Srwatson _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' 5687156283Srwatson tmp_addflag=' $pic_flag' 5688156283Srwatson ;; 5689156283Srwatson pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers 5690156283Srwatson _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' 5691156283Srwatson tmp_addflag=' $pic_flag -Mnomain' ;; 5692156283Srwatson ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 5693156283Srwatson tmp_addflag=' -i_dynamic' ;; 5694156283Srwatson efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 5695156283Srwatson tmp_addflag=' -i_dynamic -nofor_main' ;; 5696156283Srwatson ifc* | ifort*) # Intel Fortran compiler 5697156283Srwatson tmp_addflag=' -nofor_main' ;; 5698156283Srwatson esac 5699173143Srwatson case `$CC -V 2>&1 | sed 5q` in 5700173143Srwatson *Sun\ C*) # Sun C 5.9 5701173143Srwatson _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' 5702173143Srwatson tmp_sharedflag='-G' ;; 5703173143Srwatson *Sun\ F*) # Sun Fortran 8.3 5704173143Srwatson tmp_sharedflag='-G' ;; 5705173143Srwatson *) 5706173143Srwatson tmp_sharedflag='-shared' ;; 5707173143Srwatson esac 5708173143Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5709156283Srwatson 5710156283Srwatson if test $supports_anon_versioning = yes; then 5711156283Srwatson _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~ 5712156283Srwatson cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 5713156283Srwatson $echo "local: *; };" >> $output_objdir/$libname.ver~ 5714173143Srwatson $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 5715156283Srwatson fi 5716156283Srwatson else 5717156283Srwatson _LT_AC_TAGVAR(ld_shlibs, $1)=no 5718156283Srwatson fi 5719156283Srwatson ;; 5720156283Srwatson 5721156283Srwatson netbsd*) 5722156283Srwatson if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then 5723156283Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 5724156283Srwatson wlarc= 5725156283Srwatson else 5726156283Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5727156283Srwatson _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' 5728156283Srwatson fi 5729156283Srwatson ;; 5730156283Srwatson 5731173143Srwatson solaris*) 5732156283Srwatson if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then 5733156283Srwatson _LT_AC_TAGVAR(ld_shlibs, $1)=no 5734156283Srwatson cat <<EOF 1>&2 5735156283Srwatson 5736156283Srwatson*** Warning: The releases 2.8.* of the GNU linker cannot reliably 5737156283Srwatson*** create shared libraries on Solaris systems. Therefore, libtool 5738156283Srwatson*** is disabling shared libraries support. We urge you to upgrade GNU 5739156283Srwatson*** binutils to release 2.9.1 or newer. Another option is to modify 5740156283Srwatson*** your PATH or compiler configuration so that the native linker is 5741156283Srwatson*** used, and then restart. 5742156283Srwatson 5743156283SrwatsonEOF 5744156283Srwatson elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 5745156283Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5746156283Srwatson _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' 5747156283Srwatson else 5748156283Srwatson _LT_AC_TAGVAR(ld_shlibs, $1)=no 5749156283Srwatson fi 5750156283Srwatson ;; 5751156283Srwatson 5752173143Srwatson sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 5753173143Srwatson case `$LD -v 2>&1` in 5754173143Srwatson *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 5755173143Srwatson _LT_AC_TAGVAR(ld_shlibs, $1)=no 5756173143Srwatson cat <<_LT_EOF 1>&2 5757173143Srwatson 5758173143Srwatson*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not 5759173143Srwatson*** reliably create shared libraries on SCO systems. Therefore, libtool 5760173143Srwatson*** is disabling shared libraries support. We urge you to upgrade GNU 5761173143Srwatson*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 5762173143Srwatson*** your PATH or compiler configuration so that the native linker is 5763173143Srwatson*** used, and then restart. 5764173143Srwatson 5765173143Srwatson_LT_EOF 5766173143Srwatson ;; 5767173143Srwatson *) 5768173143Srwatson if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 5769173143Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' 5770173143Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' 5771173143Srwatson _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' 5772173143Srwatson else 5773173143Srwatson _LT_AC_TAGVAR(ld_shlibs, $1)=no 5774173143Srwatson fi 5775173143Srwatson ;; 5776173143Srwatson esac 5777173143Srwatson ;; 5778173143Srwatson 5779156283Srwatson sunos4*) 5780156283Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 5781156283Srwatson wlarc= 5782156283Srwatson _LT_AC_TAGVAR(hardcode_direct, $1)=yes 5783156283Srwatson _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 5784156283Srwatson ;; 5785156283Srwatson 5786156283Srwatson *) 5787156283Srwatson if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 5788156283Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5789156283Srwatson _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' 5790156283Srwatson else 5791156283Srwatson _LT_AC_TAGVAR(ld_shlibs, $1)=no 5792156283Srwatson fi 5793156283Srwatson ;; 5794156283Srwatson esac 5795156283Srwatson 5796156283Srwatson if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then 5797156283Srwatson runpath_var= 5798156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= 5799156283Srwatson _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= 5800156283Srwatson _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 5801156283Srwatson fi 5802156283Srwatson else 5803156283Srwatson # PORTME fill in a description of your system's linker (not GNU ld) 5804156283Srwatson case $host_os in 5805156283Srwatson aix3*) 5806156283Srwatson _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 5807156283Srwatson _LT_AC_TAGVAR(always_export_symbols, $1)=yes 5808156283Srwatson _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' 5809156283Srwatson # Note: this linker hardcodes the directories in LIBPATH if there 5810156283Srwatson # are no directories specified by -L. 5811156283Srwatson _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 5812173143Srwatson if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then 5813156283Srwatson # Neither direct hardcoding nor static linking is supported with a 5814156283Srwatson # broken collect2. 5815156283Srwatson _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported 5816156283Srwatson fi 5817156283Srwatson ;; 5818156283Srwatson 5819156283Srwatson aix4* | aix5*) 5820156283Srwatson if test "$host_cpu" = ia64; then 5821156283Srwatson # On IA64, the linker does run time linking by default, so we don't 5822156283Srwatson # have to do anything special. 5823156283Srwatson aix_use_runtimelinking=no 5824156283Srwatson exp_sym_flag='-Bexport' 5825156283Srwatson no_entry_flag="" 5826156283Srwatson else 5827156283Srwatson # If we're using GNU nm, then we don't want the "-C" option. 5828156283Srwatson # -C means demangle to AIX nm, but means don't demangle with GNU nm 5829156283Srwatson if $NM -V 2>&1 | grep 'GNU' > /dev/null; then 5830156283Srwatson _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' 5831156283Srwatson else 5832156283Srwatson _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' 5833156283Srwatson fi 5834156283Srwatson aix_use_runtimelinking=no 5835156283Srwatson 5836156283Srwatson # Test if we are trying to use run time linking or normal 5837156283Srwatson # AIX style linking. If -brtl is somewhere in LDFLAGS, we 5838156283Srwatson # need to do runtime linking. 5839156283Srwatson case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*) 5840156283Srwatson for ld_flag in $LDFLAGS; do 5841156283Srwatson if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then 5842156283Srwatson aix_use_runtimelinking=yes 5843156283Srwatson break 5844156283Srwatson fi 5845156283Srwatson done 5846173143Srwatson ;; 5847156283Srwatson esac 5848156283Srwatson 5849156283Srwatson exp_sym_flag='-bexport' 5850156283Srwatson no_entry_flag='-bnoentry' 5851156283Srwatson fi 5852156283Srwatson 5853156283Srwatson # When large executables or shared objects are built, AIX ld can 5854156283Srwatson # have problems creating the table of contents. If linking a library 5855156283Srwatson # or program results in "error TOC overflow" add -mminimal-toc to 5856156283Srwatson # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 5857156283Srwatson # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 5858156283Srwatson 5859156283Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='' 5860156283Srwatson _LT_AC_TAGVAR(hardcode_direct, $1)=yes 5861156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' 5862156283Srwatson _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 5863156283Srwatson 5864156283Srwatson if test "$GCC" = yes; then 5865156283Srwatson case $host_os in aix4.[[012]]|aix4.[[012]].*) 5866156283Srwatson # We only want to do this on AIX 4.2 and lower, the check 5867156283Srwatson # below for broken collect2 doesn't work under 4.3+ 5868156283Srwatson collect2name=`${CC} -print-prog-name=collect2` 5869156283Srwatson if test -f "$collect2name" && \ 5870156283Srwatson strings "$collect2name" | grep resolve_lib_name >/dev/null 5871156283Srwatson then 5872156283Srwatson # We have reworked collect2 5873173143Srwatson : 5874156283Srwatson else 5875156283Srwatson # We have old collect2 5876156283Srwatson _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported 5877156283Srwatson # It fails to find uninstalled libraries when the uninstalled 5878156283Srwatson # path is not listed in the libpath. Setting hardcode_minus_L 5879156283Srwatson # to unsupported forces relinking 5880156283Srwatson _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 5881156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5882156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 5883156283Srwatson fi 5884173143Srwatson ;; 5885156283Srwatson esac 5886156283Srwatson shared_flag='-shared' 5887156283Srwatson if test "$aix_use_runtimelinking" = yes; then 5888156283Srwatson shared_flag="$shared_flag "'${wl}-G' 5889156283Srwatson fi 5890156283Srwatson else 5891156283Srwatson # not using gcc 5892156283Srwatson if test "$host_cpu" = ia64; then 5893156283Srwatson # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 5894156283Srwatson # chokes on -Wl,-G. The following line is correct: 5895156283Srwatson shared_flag='-G' 5896156283Srwatson else 5897173143Srwatson if test "$aix_use_runtimelinking" = yes; then 5898156283Srwatson shared_flag='${wl}-G' 5899156283Srwatson else 5900156283Srwatson shared_flag='${wl}-bM:SRE' 5901173143Srwatson fi 5902156283Srwatson fi 5903156283Srwatson fi 5904156283Srwatson 5905156283Srwatson # It seems that -bexpall does not export symbols beginning with 5906156283Srwatson # underscore (_), so it is better to generate a list of symbols to export. 5907156283Srwatson _LT_AC_TAGVAR(always_export_symbols, $1)=yes 5908156283Srwatson if test "$aix_use_runtimelinking" = yes; then 5909156283Srwatson # Warning - without using the other runtime loading flags (-brtl), 5910156283Srwatson # -berok will link without error, but may produce a broken library. 5911156283Srwatson _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' 5912156283Srwatson # Determine the default libpath from the value encoded in an empty executable. 5913156283Srwatson _LT_AC_SYS_LIBPATH_AIX 5914156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 5915173143Srwatson _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" 5916156283Srwatson else 5917156283Srwatson if test "$host_cpu" = ia64; then 5918156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 5919156283Srwatson _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 5920173143Srwatson _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" 5921156283Srwatson else 5922156283Srwatson # Determine the default libpath from the value encoded in an empty executable. 5923156283Srwatson _LT_AC_SYS_LIBPATH_AIX 5924156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 5925156283Srwatson # Warning - without using the other run time loading flags, 5926156283Srwatson # -berok will link without error, but may produce a broken library. 5927156283Srwatson _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 5928156283Srwatson _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 5929156283Srwatson # Exported symbols can be pulled into shared objects from archives 5930173143Srwatson _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 5931156283Srwatson _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes 5932156283Srwatson # This is similar to how AIX traditionally builds its shared libraries. 5933173143Srwatson _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' 5934156283Srwatson fi 5935156283Srwatson fi 5936156283Srwatson ;; 5937156283Srwatson 5938156283Srwatson amigaos*) 5939156283Srwatson _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)' 5940156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5941156283Srwatson _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 5942156283Srwatson # see comment about different semantics on the GNU ld section 5943156283Srwatson _LT_AC_TAGVAR(ld_shlibs, $1)=no 5944156283Srwatson ;; 5945156283Srwatson 5946156283Srwatson bsdi[[45]]*) 5947156283Srwatson _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 5948156283Srwatson ;; 5949156283Srwatson 5950156283Srwatson cygwin* | mingw* | pw32*) 5951156283Srwatson # When not using gcc, we currently assume that we are using 5952156283Srwatson # Microsoft Visual C++. 5953156283Srwatson # hardcode_libdir_flag_spec is actually meaningless, as there is 5954156283Srwatson # no search path for DLLs. 5955156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 5956156283Srwatson _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 5957156283Srwatson # Tell ltmain to make .lib files, not .a files. 5958156283Srwatson libext=lib 5959156283Srwatson # Tell ltmain to make .dll files, not .so files. 5960156283Srwatson shrext_cmds=".dll" 5961156283Srwatson # FIXME: Setting linknames here is a bad hack. 5962156283Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' 5963156283Srwatson # The linker will automatically build a .lib file if we build a DLL. 5964156283Srwatson _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true' 5965156283Srwatson # FIXME: Should let the user specify the lib program. 5966173143Srwatson _LT_AC_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 5967156283Srwatson _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' 5968156283Srwatson _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5969156283Srwatson ;; 5970156283Srwatson 5971156283Srwatson darwin* | rhapsody*) 5972156283Srwatson case $host_os in 5973156283Srwatson rhapsody* | darwin1.[[012]]) 5974156283Srwatson _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' 5975156283Srwatson ;; 5976156283Srwatson *) # Darwin 1.3 on 5977156283Srwatson if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then 5978156283Srwatson _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' 5979156283Srwatson else 5980156283Srwatson case ${MACOSX_DEPLOYMENT_TARGET} in 5981156283Srwatson 10.[[012]]) 5982156283Srwatson _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' 5983156283Srwatson ;; 5984156283Srwatson 10.*) 5985156283Srwatson _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup' 5986156283Srwatson ;; 5987156283Srwatson esac 5988156283Srwatson fi 5989156283Srwatson ;; 5990156283Srwatson esac 5991156283Srwatson _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 5992156283Srwatson _LT_AC_TAGVAR(hardcode_direct, $1)=no 5993156283Srwatson _LT_AC_TAGVAR(hardcode_automatic, $1)=yes 5994156283Srwatson _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 5995156283Srwatson _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' 5996156283Srwatson _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 5997156283Srwatson if test "$GCC" = yes ; then 5998156283Srwatson output_verbose_link_cmd='echo' 5999156283Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' 6000156283Srwatson _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' 6001156283Srwatson # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds 6002156283Srwatson _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}' 6003156283Srwatson _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}' 6004156283Srwatson else 6005156283Srwatson case $cc_basename in 6006156283Srwatson xlc*) 6007156283Srwatson output_verbose_link_cmd='echo' 6008173143Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' 6009156283Srwatson _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' 6010156283Srwatson # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds 6011173143Srwatson _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 $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' 6012156283Srwatson _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}' 6013156283Srwatson ;; 6014156283Srwatson *) 6015156283Srwatson _LT_AC_TAGVAR(ld_shlibs, $1)=no 6016156283Srwatson ;; 6017156283Srwatson esac 6018156283Srwatson fi 6019156283Srwatson ;; 6020156283Srwatson 6021156283Srwatson dgux*) 6022156283Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6023156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6024156283Srwatson _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6025156283Srwatson ;; 6026156283Srwatson 6027156283Srwatson freebsd1*) 6028156283Srwatson _LT_AC_TAGVAR(ld_shlibs, $1)=no 6029156283Srwatson ;; 6030156283Srwatson 6031156283Srwatson # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 6032156283Srwatson # support. Future versions do this automatically, but an explicit c++rt0.o 6033156283Srwatson # does not break anything, and helps significantly (at the cost of a little 6034156283Srwatson # extra space). 6035156283Srwatson freebsd2.2*) 6036156283Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 6037156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6038156283Srwatson _LT_AC_TAGVAR(hardcode_direct, $1)=yes 6039156283Srwatson _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6040156283Srwatson ;; 6041156283Srwatson 6042156283Srwatson # Unfortunately, older versions of FreeBSD 2 do not have this feature. 6043156283Srwatson freebsd2*) 6044156283Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 6045156283Srwatson _LT_AC_TAGVAR(hardcode_direct, $1)=yes 6046156283Srwatson _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 6047156283Srwatson _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6048156283Srwatson ;; 6049156283Srwatson 6050156283Srwatson # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 6051173143Srwatson freebsd* | dragonfly*) 6052156283Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' 6053156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6054156283Srwatson _LT_AC_TAGVAR(hardcode_direct, $1)=yes 6055156283Srwatson _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6056156283Srwatson ;; 6057156283Srwatson 6058156283Srwatson hpux9*) 6059156283Srwatson if test "$GCC" = yes; then 6060156283Srwatson _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' 6061156283Srwatson else 6062156283Srwatson _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' 6063156283Srwatson fi 6064156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 6065156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 6066156283Srwatson _LT_AC_TAGVAR(hardcode_direct, $1)=yes 6067156283Srwatson 6068156283Srwatson # hardcode_minus_L: Not really in the search PATH, 6069156283Srwatson # but as the default location of the library. 6070156283Srwatson _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 6071156283Srwatson _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6072156283Srwatson ;; 6073156283Srwatson 6074173143Srwatson hpux10*) 6075156283Srwatson if test "$GCC" = yes -a "$with_gnu_ld" = no; then 6076173143Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 6077173143Srwatson else 6078173143Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 6079173143Srwatson fi 6080173143Srwatson if test "$with_gnu_ld" = no; then 6081173143Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 6082173143Srwatson _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 6083173143Srwatson 6084173143Srwatson _LT_AC_TAGVAR(hardcode_direct, $1)=yes 6085173143Srwatson _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6086173143Srwatson 6087173143Srwatson # hardcode_minus_L: Not really in the search PATH, 6088173143Srwatson # but as the default location of the library. 6089173143Srwatson _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 6090173143Srwatson fi 6091173143Srwatson ;; 6092173143Srwatson 6093173143Srwatson hpux11*) 6094173143Srwatson if test "$GCC" = yes -a "$with_gnu_ld" = no; then 6095156283Srwatson case $host_cpu in 6096173143Srwatson hppa*64*) 6097156283Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 6098156283Srwatson ;; 6099173143Srwatson ia64*) 6100173143Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 6101173143Srwatson ;; 6102156283Srwatson *) 6103156283Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 6104156283Srwatson ;; 6105156283Srwatson esac 6106156283Srwatson else 6107156283Srwatson case $host_cpu in 6108173143Srwatson hppa*64*) 6109173143Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 6110156283Srwatson ;; 6111173143Srwatson ia64*) 6112173143Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 6113173143Srwatson ;; 6114156283Srwatson *) 6115173143Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 6116156283Srwatson ;; 6117156283Srwatson esac 6118156283Srwatson fi 6119156283Srwatson if test "$with_gnu_ld" = no; then 6120173143Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 6121173143Srwatson _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 6122173143Srwatson 6123156283Srwatson case $host_cpu in 6124173143Srwatson hppa*64*|ia64*) 6125156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' 6126156283Srwatson _LT_AC_TAGVAR(hardcode_direct, $1)=no 6127156283Srwatson _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6128156283Srwatson ;; 6129156283Srwatson *) 6130156283Srwatson _LT_AC_TAGVAR(hardcode_direct, $1)=yes 6131156283Srwatson _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6132156283Srwatson 6133156283Srwatson # hardcode_minus_L: Not really in the search PATH, 6134156283Srwatson # but as the default location of the library. 6135156283Srwatson _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 6136156283Srwatson ;; 6137156283Srwatson esac 6138156283Srwatson fi 6139156283Srwatson ;; 6140156283Srwatson 6141156283Srwatson irix5* | irix6* | nonstopux*) 6142156283Srwatson if test "$GCC" = yes; then 6143156283Srwatson _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' 6144156283Srwatson else 6145156283Srwatson _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' 6146156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' 6147156283Srwatson fi 6148156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6149156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 6150156283Srwatson _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 6151156283Srwatson ;; 6152156283Srwatson 6153156283Srwatson netbsd*) 6154156283Srwatson if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then 6155156283Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 6156156283Srwatson else 6157156283Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 6158156283Srwatson fi 6159156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6160156283Srwatson _LT_AC_TAGVAR(hardcode_direct, $1)=yes 6161156283Srwatson _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6162156283Srwatson ;; 6163156283Srwatson 6164156283Srwatson newsos6) 6165156283Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6166156283Srwatson _LT_AC_TAGVAR(hardcode_direct, $1)=yes 6167156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6168156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 6169156283Srwatson _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6170156283Srwatson ;; 6171156283Srwatson 6172156283Srwatson openbsd*) 6173173143Srwatson if test -f /usr/libexec/ld.so; then 6174173143Srwatson _LT_AC_TAGVAR(hardcode_direct, $1)=yes 6175173143Srwatson _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6176173143Srwatson if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 6177173143Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 6178173143Srwatson _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' 6179173143Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 6180173143Srwatson _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6181173143Srwatson else 6182173143Srwatson case $host_os in 6183173143Srwatson openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) 6184173143Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 6185173143Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6186173143Srwatson ;; 6187173143Srwatson *) 6188173143Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 6189173143Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 6190173143Srwatson ;; 6191173143Srwatson esac 6192173143Srwatson fi 6193156283Srwatson else 6194173143Srwatson _LT_AC_TAGVAR(ld_shlibs, $1)=no 6195156283Srwatson fi 6196156283Srwatson ;; 6197156283Srwatson 6198156283Srwatson os2*) 6199156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6200156283Srwatson _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 6201156283Srwatson _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 6202156283Srwatson _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' 6203156283Srwatson _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' 6204156283Srwatson ;; 6205156283Srwatson 6206156283Srwatson osf3*) 6207156283Srwatson if test "$GCC" = yes; then 6208156283Srwatson _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 6209156283Srwatson _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' 6210156283Srwatson else 6211156283Srwatson _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 6212156283Srwatson _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' 6213156283Srwatson fi 6214156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6215156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 6216156283Srwatson ;; 6217156283Srwatson 6218156283Srwatson osf4* | osf5*) # as osf3* with the addition of -msym flag 6219156283Srwatson if test "$GCC" = yes; then 6220156283Srwatson _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 6221156283Srwatson _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' 6222156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6223156283Srwatson else 6224156283Srwatson _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 6225156283Srwatson _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' 6226156283Srwatson _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~ 6227156283Srwatson $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' 6228156283Srwatson 6229156283Srwatson # Both c and cxx compiler support -rpath directly 6230156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 6231156283Srwatson fi 6232156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 6233156283Srwatson ;; 6234156283Srwatson 6235156283Srwatson solaris*) 6236156283Srwatson _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text' 6237156283Srwatson if test "$GCC" = yes; then 6238156283Srwatson wlarc='${wl}' 6239156283Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 6240156283Srwatson _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 6241156283Srwatson $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' 6242156283Srwatson else 6243156283Srwatson wlarc='' 6244156283Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' 6245156283Srwatson _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 6246156283Srwatson $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' 6247156283Srwatson fi 6248156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6249156283Srwatson _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6250156283Srwatson case $host_os in 6251156283Srwatson solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 6252156283Srwatson *) 6253173143Srwatson # The compiler driver will combine and reorder linker options, 6254173143Srwatson # but understands `-z linker_flag'. GCC discards it without `$wl', 6255173143Srwatson # but is careful enough not to reorder. 6256156283Srwatson # Supported since Solaris 2.6 (maybe 2.5.1?) 6257173143Srwatson if test "$GCC" = yes; then 6258173143Srwatson _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 6259173143Srwatson else 6260173143Srwatson _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 6261173143Srwatson fi 6262173143Srwatson ;; 6263156283Srwatson esac 6264156283Srwatson _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 6265156283Srwatson ;; 6266156283Srwatson 6267156283Srwatson sunos4*) 6268156283Srwatson if test "x$host_vendor" = xsequent; then 6269156283Srwatson # Use $CC to link under sequent, because it throws in some extra .o 6270156283Srwatson # files that make .init and .fini sections work. 6271156283Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' 6272156283Srwatson else 6273156283Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 6274156283Srwatson fi 6275156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6276156283Srwatson _LT_AC_TAGVAR(hardcode_direct, $1)=yes 6277156283Srwatson _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 6278156283Srwatson _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6279156283Srwatson ;; 6280156283Srwatson 6281156283Srwatson sysv4) 6282156283Srwatson case $host_vendor in 6283156283Srwatson sni) 6284156283Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6285156283Srwatson _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 6286156283Srwatson ;; 6287156283Srwatson siemens) 6288156283Srwatson ## LD is ld it makes a PLAMLIB 6289156283Srwatson ## CC just makes a GrossModule. 6290156283Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 6291156283Srwatson _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 6292156283Srwatson _LT_AC_TAGVAR(hardcode_direct, $1)=no 6293156283Srwatson ;; 6294156283Srwatson motorola) 6295156283Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6296156283Srwatson _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 6297156283Srwatson ;; 6298156283Srwatson esac 6299156283Srwatson runpath_var='LD_RUN_PATH' 6300156283Srwatson _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6301156283Srwatson ;; 6302156283Srwatson 6303156283Srwatson sysv4.3*) 6304156283Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6305156283Srwatson _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6306156283Srwatson _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 6307156283Srwatson ;; 6308156283Srwatson 6309156283Srwatson sysv4*MP*) 6310156283Srwatson if test -d /usr/nec; then 6311156283Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6312156283Srwatson _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6313156283Srwatson runpath_var=LD_RUN_PATH 6314156283Srwatson hardcode_runpath_var=yes 6315156283Srwatson _LT_AC_TAGVAR(ld_shlibs, $1)=yes 6316156283Srwatson fi 6317156283Srwatson ;; 6318156283Srwatson 6319173143Srwatson sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 6320173143Srwatson _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 6321173143Srwatson _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 6322156283Srwatson _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6323173143Srwatson runpath_var='LD_RUN_PATH' 6324156283Srwatson 6325156283Srwatson if test "$GCC" = yes; then 6326173143Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6327173143Srwatson _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6328156283Srwatson else 6329173143Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6330173143Srwatson _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6331156283Srwatson fi 6332156283Srwatson ;; 6333156283Srwatson 6334173143Srwatson sysv5* | sco3.2v5* | sco5v6*) 6335173143Srwatson # Note: We can NOT use -z defs as we might desire, because we do not 6336173143Srwatson # link with -lc, and that would cause any symbols used from libc to 6337173143Srwatson # always be unresolved, which means just about no library would 6338173143Srwatson # ever link correctly. If we're not using GNU ld we use -z text 6339173143Srwatson # though, which does catch some bad symbols but isn't as heavy-handed 6340173143Srwatson # as -z defs. 6341173143Srwatson _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 6342173143Srwatson _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 6343173143Srwatson _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 6344156283Srwatson _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6345173143Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' 6346173143Srwatson _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' 6347173143Srwatson _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 6348173143Srwatson _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 6349156283Srwatson runpath_var='LD_RUN_PATH' 6350173143Srwatson 6351173143Srwatson if test "$GCC" = yes; then 6352173143Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' 6353173143Srwatson _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' 6354173143Srwatson else 6355173143Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' 6356173143Srwatson _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' 6357173143Srwatson fi 6358156283Srwatson ;; 6359156283Srwatson 6360156283Srwatson uts4*) 6361156283Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6362156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6363156283Srwatson _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6364156283Srwatson ;; 6365156283Srwatson 6366156283Srwatson *) 6367156283Srwatson _LT_AC_TAGVAR(ld_shlibs, $1)=no 6368156283Srwatson ;; 6369156283Srwatson esac 6370156283Srwatson fi 6371156283Srwatson]) 6372156283SrwatsonAC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) 6373156283Srwatsontest "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 6374156283Srwatson 6375156283Srwatson# 6376156283Srwatson# Do we need to explicitly link libc? 6377156283Srwatson# 6378156283Srwatsoncase "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in 6379156283Srwatsonx|xyes) 6380156283Srwatson # Assume -lc should be added 6381156283Srwatson _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes 6382156283Srwatson 6383156283Srwatson if test "$enable_shared" = yes && test "$GCC" = yes; then 6384156283Srwatson case $_LT_AC_TAGVAR(archive_cmds, $1) in 6385156283Srwatson *'~'*) 6386156283Srwatson # FIXME: we may have to deal with multi-command sequences. 6387156283Srwatson ;; 6388156283Srwatson '$CC '*) 6389156283Srwatson # Test whether the compiler implicitly links with -lc since on some 6390156283Srwatson # systems, -lgcc has to come before -lc. If gcc already passes -lc 6391156283Srwatson # to ld, don't add -lc before -lgcc. 6392156283Srwatson AC_MSG_CHECKING([whether -lc should be explicitly linked in]) 6393156283Srwatson $rm conftest* 6394173143Srwatson echo "$lt_simple_compile_test_code" > conftest.$ac_ext 6395156283Srwatson 6396156283Srwatson if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 6397156283Srwatson soname=conftest 6398156283Srwatson lib=conftest 6399156283Srwatson libobjs=conftest.$ac_objext 6400156283Srwatson deplibs= 6401156283Srwatson wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) 6402173143Srwatson pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) 6403156283Srwatson compiler_flags=-v 6404156283Srwatson linker_flags=-v 6405156283Srwatson verstring= 6406156283Srwatson output_objdir=. 6407156283Srwatson libname=conftest 6408156283Srwatson lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1) 6409156283Srwatson _LT_AC_TAGVAR(allow_undefined_flag, $1)= 6410156283Srwatson if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 6411156283Srwatson then 6412156283Srwatson _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 6413156283Srwatson else 6414156283Srwatson _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes 6415156283Srwatson fi 6416156283Srwatson _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 6417156283Srwatson else 6418156283Srwatson cat conftest.err 1>&5 6419156283Srwatson fi 6420156283Srwatson $rm conftest* 6421156283Srwatson AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)]) 6422156283Srwatson ;; 6423156283Srwatson esac 6424156283Srwatson fi 6425156283Srwatson ;; 6426156283Srwatsonesac 6427156283Srwatson])# AC_LIBTOOL_PROG_LD_SHLIBS 6428156283Srwatson 6429156283Srwatson 6430156283Srwatson# _LT_AC_FILE_LTDLL_C 6431156283Srwatson# ------------------- 6432156283Srwatson# Be careful that the start marker always follows a newline. 6433156283SrwatsonAC_DEFUN([_LT_AC_FILE_LTDLL_C], [ 6434156283Srwatson# /* ltdll.c starts here */ 6435156283Srwatson# #define WIN32_LEAN_AND_MEAN 6436156283Srwatson# #include <windows.h> 6437156283Srwatson# #undef WIN32_LEAN_AND_MEAN 6438156283Srwatson# #include <stdio.h> 6439156283Srwatson# 6440156283Srwatson# #ifndef __CYGWIN__ 6441156283Srwatson# # ifdef __CYGWIN32__ 6442156283Srwatson# # define __CYGWIN__ __CYGWIN32__ 6443156283Srwatson# # endif 6444156283Srwatson# #endif 6445156283Srwatson# 6446156283Srwatson# #ifdef __cplusplus 6447156283Srwatson# extern "C" { 6448156283Srwatson# #endif 6449156283Srwatson# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved); 6450156283Srwatson# #ifdef __cplusplus 6451156283Srwatson# } 6452156283Srwatson# #endif 6453156283Srwatson# 6454156283Srwatson# #ifdef __CYGWIN__ 6455156283Srwatson# #include <cygwin/cygwin_dll.h> 6456156283Srwatson# DECLARE_CYGWIN_DLL( DllMain ); 6457156283Srwatson# #endif 6458156283Srwatson# HINSTANCE __hDllInstance_base; 6459156283Srwatson# 6460156283Srwatson# BOOL APIENTRY 6461156283Srwatson# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved) 6462156283Srwatson# { 6463156283Srwatson# __hDllInstance_base = hInst; 6464156283Srwatson# return TRUE; 6465156283Srwatson# } 6466156283Srwatson# /* ltdll.c ends here */ 6467156283Srwatson])# _LT_AC_FILE_LTDLL_C 6468156283Srwatson 6469156283Srwatson 6470156283Srwatson# _LT_AC_TAGVAR(VARNAME, [TAGNAME]) 6471156283Srwatson# --------------------------------- 6472156283SrwatsonAC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])]) 6473156283Srwatson 6474156283Srwatson 6475156283Srwatson# old names 6476156283SrwatsonAC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL]) 6477156283SrwatsonAC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 6478156283SrwatsonAC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 6479156283SrwatsonAC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 6480156283SrwatsonAC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 6481156283SrwatsonAC_DEFUN([AM_PROG_LD], [AC_PROG_LD]) 6482156283SrwatsonAC_DEFUN([AM_PROG_NM], [AC_PROG_NM]) 6483156283Srwatson 6484156283Srwatson# This is just to silence aclocal about the macro not being used 6485156283Srwatsonifelse([AC_DISABLE_FAST_INSTALL]) 6486156283Srwatson 6487156283SrwatsonAC_DEFUN([LT_AC_PROG_GCJ], 6488156283Srwatson[AC_CHECK_TOOL(GCJ, gcj, no) 6489156283Srwatson test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" 6490156283Srwatson AC_SUBST(GCJFLAGS) 6491156283Srwatson]) 6492156283Srwatson 6493156283SrwatsonAC_DEFUN([LT_AC_PROG_RC], 6494156283Srwatson[AC_CHECK_TOOL(RC, windres, no) 6495156283Srwatson]) 6496156283Srwatson 6497173143Srwatson 6498173143Srwatson# Cheap backport of AS_EXECUTABLE_P and required macros 6499173143Srwatson# from Autoconf 2.59; we should not use $as_executable_p directly. 6500173143Srwatson 6501173143Srwatson# _AS_TEST_PREPARE 6502173143Srwatson# ---------------- 6503173143Srwatsonm4_ifndef([_AS_TEST_PREPARE], 6504173143Srwatson[m4_defun([_AS_TEST_PREPARE], 6505173143Srwatson[if test -x / >/dev/null 2>&1; then 6506173143Srwatson as_executable_p='test -x' 6507173143Srwatsonelse 6508173143Srwatson as_executable_p='test -f' 6509173143Srwatsonfi 6510173143Srwatson])])# _AS_TEST_PREPARE 6511173143Srwatson 6512173143Srwatson# AS_EXECUTABLE_P 6513173143Srwatson# --------------- 6514173143Srwatson# Check whether a file is executable. 6515173143Srwatsonm4_ifndef([AS_EXECUTABLE_P], 6516173143Srwatson[m4_defun([AS_EXECUTABLE_P], 6517173143Srwatson[AS_REQUIRE([_AS_TEST_PREPARE])dnl 6518173143Srwatson$as_executable_p $1[]dnl 6519173143Srwatson])])# AS_EXECUTABLE_P 6520173143Srwatson 6521156283Srwatson# NOTE: This macro has been submitted for inclusion into # 6522156283Srwatson# GNU Autoconf as AC_PROG_SED. When it is available in # 6523156283Srwatson# a released version of Autoconf we should remove this # 6524156283Srwatson# macro and use it instead. # 6525156283Srwatson# LT_AC_PROG_SED 6526156283Srwatson# -------------- 6527156283Srwatson# Check for a fully-functional sed program, that truncates 6528156283Srwatson# as few characters as possible. Prefer GNU sed if found. 6529156283SrwatsonAC_DEFUN([LT_AC_PROG_SED], 6530156283Srwatson[AC_MSG_CHECKING([for a sed that does not truncate output]) 6531156283SrwatsonAC_CACHE_VAL(lt_cv_path_SED, 6532156283Srwatson[# Loop through the user's path and test for sed and gsed. 6533156283Srwatson# Then use that list of sed's as ones to test for truncation. 6534156283Srwatsonas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 6535156283Srwatsonfor as_dir in $PATH 6536156283Srwatsondo 6537156283Srwatson IFS=$as_save_IFS 6538156283Srwatson test -z "$as_dir" && as_dir=. 6539156283Srwatson for lt_ac_prog in sed gsed; do 6540156283Srwatson for ac_exec_ext in '' $ac_executable_extensions; do 6541173143Srwatson if AS_EXECUTABLE_P(["$as_dir/$lt_ac_prog$ac_exec_ext"]); then 6542156283Srwatson lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 6543156283Srwatson fi 6544156283Srwatson done 6545156283Srwatson done 6546156283Srwatsondone 6547173143SrwatsonIFS=$as_save_IFS 6548156283Srwatsonlt_ac_max=0 6549156283Srwatsonlt_ac_count=0 6550156283Srwatson# Add /usr/xpg4/bin/sed as it is typically found on Solaris 6551156283Srwatson# along with /bin/sed that truncates output. 6552156283Srwatsonfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 6553156283Srwatson test ! -f $lt_ac_sed && continue 6554156283Srwatson cat /dev/null > conftest.in 6555156283Srwatson lt_ac_count=0 6556156283Srwatson echo $ECHO_N "0123456789$ECHO_C" >conftest.in 6557156283Srwatson # Check for GNU sed and select it if it is found. 6558156283Srwatson if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 6559156283Srwatson lt_cv_path_SED=$lt_ac_sed 6560156283Srwatson break 6561156283Srwatson fi 6562156283Srwatson while true; do 6563156283Srwatson cat conftest.in conftest.in >conftest.tmp 6564156283Srwatson mv conftest.tmp conftest.in 6565156283Srwatson cp conftest.in conftest.nl 6566156283Srwatson echo >>conftest.nl 6567156283Srwatson $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 6568156283Srwatson cmp -s conftest.out conftest.nl || break 6569156283Srwatson # 10000 chars as input seems more than enough 6570156283Srwatson test $lt_ac_count -gt 10 && break 6571156283Srwatson lt_ac_count=`expr $lt_ac_count + 1` 6572156283Srwatson if test $lt_ac_count -gt $lt_ac_max; then 6573156283Srwatson lt_ac_max=$lt_ac_count 6574156283Srwatson lt_cv_path_SED=$lt_ac_sed 6575156283Srwatson fi 6576156283Srwatson done 6577156283Srwatsondone 6578156283Srwatson]) 6579156283SrwatsonSED=$lt_cv_path_SED 6580173143SrwatsonAC_SUBST([SED]) 6581156283SrwatsonAC_MSG_RESULT([$SED]) 6582156283Srwatson]) 6583156283Srwatson 6584173143Srwatson# Copyright (C) 2002, 2003, 2005, 2006 Free Software Foundation, Inc. 6585156283Srwatson# 6586156283Srwatson# This file is free software; the Free Software Foundation 6587156283Srwatson# gives unlimited permission to copy and/or distribute it, 6588156283Srwatson# with or without modifications, as long as this notice is preserved. 6589156283Srwatson 6590156283Srwatson# AM_AUTOMAKE_VERSION(VERSION) 6591156283Srwatson# ---------------------------- 6592156283Srwatson# Automake X.Y traces this macro to ensure aclocal.m4 has been 6593156283Srwatson# generated from the m4 files accompanying Automake X.Y. 6594173143Srwatson# (This private macro should not be called outside this file.) 6595173143SrwatsonAC_DEFUN([AM_AUTOMAKE_VERSION], 6596173143Srwatson[am__api_version='1.10' 6597173143Srwatsondnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 6598173143Srwatsondnl require some minimum version. Point them to the right macro. 6599173143Srwatsonm4_if([$1], [1.10], [], 6600173143Srwatson [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 6601173143Srwatson]) 6602156283Srwatson 6603173143Srwatson# _AM_AUTOCONF_VERSION(VERSION) 6604173143Srwatson# ----------------------------- 6605173143Srwatson# aclocal traces this macro to find the Autoconf version. 6606173143Srwatson# This is a private macro too. Using m4_define simplifies 6607173143Srwatson# the logic in aclocal, which can simply ignore this definition. 6608173143Srwatsonm4_define([_AM_AUTOCONF_VERSION], []) 6609173143Srwatson 6610156283Srwatson# AM_SET_CURRENT_AUTOMAKE_VERSION 6611156283Srwatson# ------------------------------- 6612173143Srwatson# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 6613156283Srwatson# This function is AC_REQUIREd by AC_INIT_AUTOMAKE. 6614156283SrwatsonAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 6615173143Srwatson[AM_AUTOMAKE_VERSION([1.10])dnl 6616173143Srwatson_AM_AUTOCONF_VERSION(m4_PACKAGE_VERSION)]) 6617156283Srwatson 6618156283Srwatson# AM_AUX_DIR_EXPAND -*- Autoconf -*- 6619156283Srwatson 6620156283Srwatson# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 6621156283Srwatson# 6622156283Srwatson# This file is free software; the Free Software Foundation 6623156283Srwatson# gives unlimited permission to copy and/or distribute it, 6624156283Srwatson# with or without modifications, as long as this notice is preserved. 6625156283Srwatson 6626156283Srwatson# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 6627156283Srwatson# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to 6628156283Srwatson# `$srcdir', `$srcdir/..', or `$srcdir/../..'. 6629156283Srwatson# 6630156283Srwatson# Of course, Automake must honor this variable whenever it calls a 6631156283Srwatson# tool from the auxiliary directory. The problem is that $srcdir (and 6632156283Srwatson# therefore $ac_aux_dir as well) can be either absolute or relative, 6633156283Srwatson# depending on how configure is run. This is pretty annoying, since 6634156283Srwatson# it makes $ac_aux_dir quite unusable in subdirectories: in the top 6635156283Srwatson# source directory, any form will work fine, but in subdirectories a 6636156283Srwatson# relative path needs to be adjusted first. 6637156283Srwatson# 6638156283Srwatson# $ac_aux_dir/missing 6639156283Srwatson# fails when called from a subdirectory if $ac_aux_dir is relative 6640156283Srwatson# $top_srcdir/$ac_aux_dir/missing 6641156283Srwatson# fails if $ac_aux_dir is absolute, 6642156283Srwatson# fails when called from a subdirectory in a VPATH build with 6643156283Srwatson# a relative $ac_aux_dir 6644156283Srwatson# 6645156283Srwatson# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 6646156283Srwatson# are both prefixed by $srcdir. In an in-source build this is usually 6647156283Srwatson# harmless because $srcdir is `.', but things will broke when you 6648156283Srwatson# start a VPATH build or use an absolute $srcdir. 6649156283Srwatson# 6650156283Srwatson# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 6651156283Srwatson# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 6652156283Srwatson# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 6653156283Srwatson# and then we would define $MISSING as 6654156283Srwatson# MISSING="\${SHELL} $am_aux_dir/missing" 6655156283Srwatson# This will work as long as MISSING is not called from configure, because 6656156283Srwatson# unfortunately $(top_srcdir) has no meaning in configure. 6657156283Srwatson# However there are other variables, like CC, which are often used in 6658156283Srwatson# configure, and could therefore not use this "fixed" $ac_aux_dir. 6659156283Srwatson# 6660156283Srwatson# Another solution, used here, is to always expand $ac_aux_dir to an 6661156283Srwatson# absolute PATH. The drawback is that using absolute paths prevent a 6662156283Srwatson# configured tree to be moved without reconfiguration. 6663156283Srwatson 6664156283SrwatsonAC_DEFUN([AM_AUX_DIR_EXPAND], 6665156283Srwatson[dnl Rely on autoconf to set up CDPATH properly. 6666156283SrwatsonAC_PREREQ([2.50])dnl 6667156283Srwatson# expand $ac_aux_dir to an absolute path 6668156283Srwatsonam_aux_dir=`cd $ac_aux_dir && pwd` 6669156283Srwatson]) 6670156283Srwatson 6671156283Srwatson# AM_CONDITIONAL -*- Autoconf -*- 6672156283Srwatson 6673173143Srwatson# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006 6674156283Srwatson# Free Software Foundation, Inc. 6675156283Srwatson# 6676156283Srwatson# This file is free software; the Free Software Foundation 6677156283Srwatson# gives unlimited permission to copy and/or distribute it, 6678156283Srwatson# with or without modifications, as long as this notice is preserved. 6679156283Srwatson 6680173143Srwatson# serial 8 6681156283Srwatson 6682156283Srwatson# AM_CONDITIONAL(NAME, SHELL-CONDITION) 6683156283Srwatson# ------------------------------------- 6684156283Srwatson# Define a conditional. 6685156283SrwatsonAC_DEFUN([AM_CONDITIONAL], 6686156283Srwatson[AC_PREREQ(2.52)dnl 6687156283Srwatson ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 6688156283Srwatson [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 6689173143SrwatsonAC_SUBST([$1_TRUE])dnl 6690173143SrwatsonAC_SUBST([$1_FALSE])dnl 6691173143Srwatson_AM_SUBST_NOTMAKE([$1_TRUE])dnl 6692173143Srwatson_AM_SUBST_NOTMAKE([$1_FALSE])dnl 6693156283Srwatsonif $2; then 6694156283Srwatson $1_TRUE= 6695156283Srwatson $1_FALSE='#' 6696156283Srwatsonelse 6697156283Srwatson $1_TRUE='#' 6698156283Srwatson $1_FALSE= 6699156283Srwatsonfi 6700156283SrwatsonAC_CONFIG_COMMANDS_PRE( 6701156283Srwatson[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 6702156283Srwatson AC_MSG_ERROR([[conditional "$1" was never defined. 6703156283SrwatsonUsually this means the macro was only invoked conditionally.]]) 6704156283Srwatsonfi])]) 6705156283Srwatson 6706173143Srwatson# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 6707156283Srwatson# Free Software Foundation, Inc. 6708156283Srwatson# 6709156283Srwatson# This file is free software; the Free Software Foundation 6710156283Srwatson# gives unlimited permission to copy and/or distribute it, 6711156283Srwatson# with or without modifications, as long as this notice is preserved. 6712156283Srwatson 6713173143Srwatson# serial 9 6714156283Srwatson 6715156283Srwatson# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be 6716156283Srwatson# written in clear, in which case automake, when reading aclocal.m4, 6717156283Srwatson# will think it sees a *use*, and therefore will trigger all it's 6718156283Srwatson# C support machinery. Also note that it means that autoscan, seeing 6719156283Srwatson# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 6720156283Srwatson 6721156283Srwatson 6722156283Srwatson# _AM_DEPENDENCIES(NAME) 6723156283Srwatson# ---------------------- 6724156283Srwatson# See how the compiler implements dependency checking. 6725156283Srwatson# NAME is "CC", "CXX", "GCJ", or "OBJC". 6726156283Srwatson# We try a few techniques and use that to set a single cache variable. 6727156283Srwatson# 6728156283Srwatson# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 6729156283Srwatson# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 6730156283Srwatson# dependency, and given that the user is not expected to run this macro, 6731156283Srwatson# just rely on AC_PROG_CC. 6732156283SrwatsonAC_DEFUN([_AM_DEPENDENCIES], 6733156283Srwatson[AC_REQUIRE([AM_SET_DEPDIR])dnl 6734156283SrwatsonAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 6735156283SrwatsonAC_REQUIRE([AM_MAKE_INCLUDE])dnl 6736156283SrwatsonAC_REQUIRE([AM_DEP_TRACK])dnl 6737156283Srwatson 6738156283Srwatsonifelse([$1], CC, [depcc="$CC" am_compiler_list=], 6739156283Srwatson [$1], CXX, [depcc="$CXX" am_compiler_list=], 6740156283Srwatson [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 6741173143Srwatson [$1], UPC, [depcc="$UPC" am_compiler_list=], 6742156283Srwatson [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 6743156283Srwatson [depcc="$$1" am_compiler_list=]) 6744156283Srwatson 6745156283SrwatsonAC_CACHE_CHECK([dependency style of $depcc], 6746156283Srwatson [am_cv_$1_dependencies_compiler_type], 6747156283Srwatson[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 6748156283Srwatson # We make a subdir and do the tests there. Otherwise we can end up 6749156283Srwatson # making bogus files that we don't know about and never remove. For 6750156283Srwatson # instance it was reported that on HP-UX the gcc test will end up 6751156283Srwatson # making a dummy file named `D' -- because `-MD' means `put the output 6752156283Srwatson # in D'. 6753156283Srwatson mkdir conftest.dir 6754156283Srwatson # Copy depcomp to subdir because otherwise we won't find it if we're 6755156283Srwatson # using a relative directory. 6756156283Srwatson cp "$am_depcomp" conftest.dir 6757156283Srwatson cd conftest.dir 6758156283Srwatson # We will build objects and dependencies in a subdirectory because 6759156283Srwatson # it helps to detect inapplicable dependency modes. For instance 6760156283Srwatson # both Tru64's cc and ICC support -MD to output dependencies as a 6761156283Srwatson # side effect of compilation, but ICC will put the dependencies in 6762156283Srwatson # the current directory while Tru64 will put them in the object 6763156283Srwatson # directory. 6764156283Srwatson mkdir sub 6765156283Srwatson 6766156283Srwatson am_cv_$1_dependencies_compiler_type=none 6767156283Srwatson if test "$am_compiler_list" = ""; then 6768156283Srwatson am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 6769156283Srwatson fi 6770156283Srwatson for depmode in $am_compiler_list; do 6771156283Srwatson # Setup a source with many dependencies, because some compilers 6772156283Srwatson # like to wrap large dependency lists on column 80 (with \), and 6773156283Srwatson # we should not choose a depcomp mode which is confused by this. 6774156283Srwatson # 6775156283Srwatson # We need to recreate these files for each test, as the compiler may 6776156283Srwatson # overwrite some of them when testing with obscure command lines. 6777156283Srwatson # This happens at least with the AIX C compiler. 6778156283Srwatson : > sub/conftest.c 6779156283Srwatson for i in 1 2 3 4 5 6; do 6780156283Srwatson echo '#include "conftst'$i'.h"' >> sub/conftest.c 6781156283Srwatson # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with 6782156283Srwatson # Solaris 8's {/usr,}/bin/sh. 6783156283Srwatson touch sub/conftst$i.h 6784156283Srwatson done 6785156283Srwatson echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 6786156283Srwatson 6787156283Srwatson case $depmode in 6788156283Srwatson nosideeffect) 6789156283Srwatson # after this tag, mechanisms are not by side-effect, so they'll 6790156283Srwatson # only be used when explicitly requested 6791156283Srwatson if test "x$enable_dependency_tracking" = xyes; then 6792156283Srwatson continue 6793156283Srwatson else 6794156283Srwatson break 6795156283Srwatson fi 6796156283Srwatson ;; 6797156283Srwatson none) break ;; 6798156283Srwatson esac 6799156283Srwatson # We check with `-c' and `-o' for the sake of the "dashmstdout" 6800156283Srwatson # mode. It turns out that the SunPro C++ compiler does not properly 6801156283Srwatson # handle `-M -o', and we need to detect this. 6802156283Srwatson if depmode=$depmode \ 6803156283Srwatson source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ 6804156283Srwatson depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 6805156283Srwatson $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ 6806156283Srwatson >/dev/null 2>conftest.err && 6807173143Srwatson grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 6808156283Srwatson grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 6809156283Srwatson grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && 6810156283Srwatson ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 6811156283Srwatson # icc doesn't choke on unknown options, it will just issue warnings 6812156283Srwatson # or remarks (even with -Werror). So we grep stderr for any message 6813156283Srwatson # that says an option was ignored or not supported. 6814156283Srwatson # When given -MP, icc 7.0 and 7.1 complain thusly: 6815156283Srwatson # icc: Command line warning: ignoring option '-M'; no argument required 6816156283Srwatson # The diagnosis changed in icc 8.0: 6817156283Srwatson # icc: Command line remark: option '-MP' not supported 6818156283Srwatson if (grep 'ignoring option' conftest.err || 6819156283Srwatson grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 6820156283Srwatson am_cv_$1_dependencies_compiler_type=$depmode 6821156283Srwatson break 6822156283Srwatson fi 6823156283Srwatson fi 6824156283Srwatson done 6825156283Srwatson 6826156283Srwatson cd .. 6827156283Srwatson rm -rf conftest.dir 6828156283Srwatsonelse 6829156283Srwatson am_cv_$1_dependencies_compiler_type=none 6830156283Srwatsonfi 6831156283Srwatson]) 6832156283SrwatsonAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 6833156283SrwatsonAM_CONDITIONAL([am__fastdep$1], [ 6834156283Srwatson test "x$enable_dependency_tracking" != xno \ 6835156283Srwatson && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 6836156283Srwatson]) 6837156283Srwatson 6838156283Srwatson 6839156283Srwatson# AM_SET_DEPDIR 6840156283Srwatson# ------------- 6841156283Srwatson# Choose a directory name for dependency files. 6842156283Srwatson# This macro is AC_REQUIREd in _AM_DEPENDENCIES 6843156283SrwatsonAC_DEFUN([AM_SET_DEPDIR], 6844156283Srwatson[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 6845156283SrwatsonAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 6846156283Srwatson]) 6847156283Srwatson 6848156283Srwatson 6849156283Srwatson# AM_DEP_TRACK 6850156283Srwatson# ------------ 6851156283SrwatsonAC_DEFUN([AM_DEP_TRACK], 6852156283Srwatson[AC_ARG_ENABLE(dependency-tracking, 6853156283Srwatson[ --disable-dependency-tracking speeds up one-time build 6854156283Srwatson --enable-dependency-tracking do not reject slow dependency extractors]) 6855156283Srwatsonif test "x$enable_dependency_tracking" != xno; then 6856156283Srwatson am_depcomp="$ac_aux_dir/depcomp" 6857156283Srwatson AMDEPBACKSLASH='\' 6858156283Srwatsonfi 6859156283SrwatsonAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 6860173143SrwatsonAC_SUBST([AMDEPBACKSLASH])dnl 6861173143Srwatson_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 6862156283Srwatson]) 6863156283Srwatson 6864156283Srwatson# Generate code to set up dependency tracking. -*- Autoconf -*- 6865156283Srwatson 6866156283Srwatson# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 6867156283Srwatson# Free Software Foundation, Inc. 6868156283Srwatson# 6869156283Srwatson# This file is free software; the Free Software Foundation 6870156283Srwatson# gives unlimited permission to copy and/or distribute it, 6871156283Srwatson# with or without modifications, as long as this notice is preserved. 6872156283Srwatson 6873156283Srwatson#serial 3 6874156283Srwatson 6875156283Srwatson# _AM_OUTPUT_DEPENDENCY_COMMANDS 6876156283Srwatson# ------------------------------ 6877156283SrwatsonAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 6878156283Srwatson[for mf in $CONFIG_FILES; do 6879156283Srwatson # Strip MF so we end up with the name of the file. 6880156283Srwatson mf=`echo "$mf" | sed -e 's/:.*$//'` 6881156283Srwatson # Check whether this is an Automake generated Makefile or not. 6882156283Srwatson # We used to match only the files named `Makefile.in', but 6883156283Srwatson # some people rename them; so instead we look at the file content. 6884156283Srwatson # Grep'ing the first line is not enough: some people post-process 6885156283Srwatson # each Makefile.in and add a new line on top of each file to say so. 6886173143Srwatson # Grep'ing the whole file is not good either: AIX grep has a line 6887173143Srwatson # limit of 2048, but all sed's we know have understand at least 4000. 6888173143Srwatson if sed 10q "$mf" | grep '^#.*generated by automake' > /dev/null 2>&1; then 6889156283Srwatson dirpart=`AS_DIRNAME("$mf")` 6890156283Srwatson else 6891156283Srwatson continue 6892156283Srwatson fi 6893156283Srwatson # Extract the definition of DEPDIR, am__include, and am__quote 6894156283Srwatson # from the Makefile without running `make'. 6895156283Srwatson DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` 6896156283Srwatson test -z "$DEPDIR" && continue 6897156283Srwatson am__include=`sed -n 's/^am__include = //p' < "$mf"` 6898156283Srwatson test -z "am__include" && continue 6899156283Srwatson am__quote=`sed -n 's/^am__quote = //p' < "$mf"` 6900156283Srwatson # When using ansi2knr, U may be empty or an underscore; expand it 6901156283Srwatson U=`sed -n 's/^U = //p' < "$mf"` 6902156283Srwatson # Find all dependency output files, they are included files with 6903156283Srwatson # $(DEPDIR) in their names. We invoke sed twice because it is the 6904156283Srwatson # simplest approach to changing $(DEPDIR) to its actual value in the 6905156283Srwatson # expansion. 6906156283Srwatson for file in `sed -n " 6907156283Srwatson s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ 6908156283Srwatson sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do 6909156283Srwatson # Make sure the directory exists. 6910156283Srwatson test -f "$dirpart/$file" && continue 6911156283Srwatson fdir=`AS_DIRNAME(["$file"])` 6912156283Srwatson AS_MKDIR_P([$dirpart/$fdir]) 6913156283Srwatson # echo "creating $dirpart/$file" 6914156283Srwatson echo '# dummy' > "$dirpart/$file" 6915156283Srwatson done 6916156283Srwatsondone 6917156283Srwatson])# _AM_OUTPUT_DEPENDENCY_COMMANDS 6918156283Srwatson 6919156283Srwatson 6920156283Srwatson# AM_OUTPUT_DEPENDENCY_COMMANDS 6921156283Srwatson# ----------------------------- 6922156283Srwatson# This macro should only be invoked once -- use via AC_REQUIRE. 6923156283Srwatson# 6924156283Srwatson# This code is only required when automatic dependency tracking 6925156283Srwatson# is enabled. FIXME. This creates each `.P' file that we will 6926156283Srwatson# need in order to bootstrap the dependency handling code. 6927156283SrwatsonAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 6928156283Srwatson[AC_CONFIG_COMMANDS([depfiles], 6929156283Srwatson [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 6930156283Srwatson [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 6931156283Srwatson]) 6932156283Srwatson 6933156283Srwatson# Do all the work for Automake. -*- Autoconf -*- 6934156283Srwatson 6935173143Srwatson# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 6936173143Srwatson# 2005, 2006 Free Software Foundation, Inc. 6937156283Srwatson# 6938156283Srwatson# This file is free software; the Free Software Foundation 6939156283Srwatson# gives unlimited permission to copy and/or distribute it, 6940156283Srwatson# with or without modifications, as long as this notice is preserved. 6941156283Srwatson 6942156283Srwatson# serial 12 6943156283Srwatson 6944156283Srwatson# This macro actually does too much. Some checks are only needed if 6945156283Srwatson# your package does certain things. But this isn't really a big deal. 6946156283Srwatson 6947156283Srwatson# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 6948156283Srwatson# AM_INIT_AUTOMAKE([OPTIONS]) 6949156283Srwatson# ----------------------------------------------- 6950156283Srwatson# The call with PACKAGE and VERSION arguments is the old style 6951156283Srwatson# call (pre autoconf-2.50), which is being phased out. PACKAGE 6952156283Srwatson# and VERSION should now be passed to AC_INIT and removed from 6953156283Srwatson# the call to AM_INIT_AUTOMAKE. 6954156283Srwatson# We support both call styles for the transition. After 6955156283Srwatson# the next Automake release, Autoconf can make the AC_INIT 6956156283Srwatson# arguments mandatory, and then we can depend on a new Autoconf 6957156283Srwatson# release and drop the old call support. 6958156283SrwatsonAC_DEFUN([AM_INIT_AUTOMAKE], 6959173143Srwatson[AC_PREREQ([2.60])dnl 6960156283Srwatsondnl Autoconf wants to disallow AM_ names. We explicitly allow 6961156283Srwatsondnl the ones we care about. 6962156283Srwatsonm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 6963156283SrwatsonAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 6964156283SrwatsonAC_REQUIRE([AC_PROG_INSTALL])dnl 6965173143Srwatsonif test "`cd $srcdir && pwd`" != "`pwd`"; then 6966173143Srwatson # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 6967173143Srwatson # is not polluted with repeated "-I." 6968173143Srwatson AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 6969173143Srwatson # test to see if srcdir already configured 6970173143Srwatson if test -f $srcdir/config.status; then 6971173143Srwatson AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 6972173143Srwatson fi 6973156283Srwatsonfi 6974156283Srwatson 6975156283Srwatson# test whether we have cygpath 6976156283Srwatsonif test -z "$CYGPATH_W"; then 6977156283Srwatson if (cygpath --version) >/dev/null 2>/dev/null; then 6978156283Srwatson CYGPATH_W='cygpath -w' 6979156283Srwatson else 6980156283Srwatson CYGPATH_W=echo 6981156283Srwatson fi 6982156283Srwatsonfi 6983156283SrwatsonAC_SUBST([CYGPATH_W]) 6984156283Srwatson 6985156283Srwatson# Define the identity of the package. 6986156283Srwatsondnl Distinguish between old-style and new-style calls. 6987156283Srwatsonm4_ifval([$2], 6988156283Srwatson[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 6989156283Srwatson AC_SUBST([PACKAGE], [$1])dnl 6990156283Srwatson AC_SUBST([VERSION], [$2])], 6991156283Srwatson[_AM_SET_OPTIONS([$1])dnl 6992173143Srwatsondnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 6993173143Srwatsonm4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, 6994173143Srwatson [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 6995156283Srwatson AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 6996156283Srwatson AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 6997156283Srwatson 6998156283Srwatson_AM_IF_OPTION([no-define],, 6999156283Srwatson[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) 7000156283Srwatson AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl 7001156283Srwatson 7002156283Srwatson# Some tools Automake needs. 7003156283SrwatsonAC_REQUIRE([AM_SANITY_CHECK])dnl 7004156283SrwatsonAC_REQUIRE([AC_ARG_PROGRAM])dnl 7005156283SrwatsonAM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) 7006156283SrwatsonAM_MISSING_PROG(AUTOCONF, autoconf) 7007156283SrwatsonAM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) 7008156283SrwatsonAM_MISSING_PROG(AUTOHEADER, autoheader) 7009156283SrwatsonAM_MISSING_PROG(MAKEINFO, makeinfo) 7010156283SrwatsonAM_PROG_INSTALL_SH 7011156283SrwatsonAM_PROG_INSTALL_STRIP 7012156283SrwatsonAC_REQUIRE([AM_PROG_MKDIR_P])dnl 7013156283Srwatson# We need awk for the "check" target. The system "awk" is bad on 7014156283Srwatson# some platforms. 7015156283SrwatsonAC_REQUIRE([AC_PROG_AWK])dnl 7016156283SrwatsonAC_REQUIRE([AC_PROG_MAKE_SET])dnl 7017156283SrwatsonAC_REQUIRE([AM_SET_LEADING_DOT])dnl 7018156283Srwatson_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 7019156283Srwatson [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 7020156283Srwatson [_AM_PROG_TAR([v7])])]) 7021156283Srwatson_AM_IF_OPTION([no-dependencies],, 7022156283Srwatson[AC_PROVIDE_IFELSE([AC_PROG_CC], 7023156283Srwatson [_AM_DEPENDENCIES(CC)], 7024156283Srwatson [define([AC_PROG_CC], 7025156283Srwatson defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl 7026156283SrwatsonAC_PROVIDE_IFELSE([AC_PROG_CXX], 7027156283Srwatson [_AM_DEPENDENCIES(CXX)], 7028156283Srwatson [define([AC_PROG_CXX], 7029156283Srwatson defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl 7030173143SrwatsonAC_PROVIDE_IFELSE([AC_PROG_OBJC], 7031173143Srwatson [_AM_DEPENDENCIES(OBJC)], 7032173143Srwatson [define([AC_PROG_OBJC], 7033173143Srwatson defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl 7034156283Srwatson]) 7035156283Srwatson]) 7036156283Srwatson 7037156283Srwatson 7038156283Srwatson# When config.status generates a header, we must update the stamp-h file. 7039156283Srwatson# This file resides in the same directory as the config header 7040156283Srwatson# that is generated. The stamp files are numbered to have different names. 7041156283Srwatson 7042156283Srwatson# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 7043156283Srwatson# loop where config.status creates the headers, so we can generate 7044156283Srwatson# our stamp files there. 7045156283SrwatsonAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 7046156283Srwatson[# Compute $1's index in $config_headers. 7047156283Srwatson_am_stamp_count=1 7048156283Srwatsonfor _am_header in $config_headers :; do 7049156283Srwatson case $_am_header in 7050156283Srwatson $1 | $1:* ) 7051156283Srwatson break ;; 7052156283Srwatson * ) 7053156283Srwatson _am_stamp_count=`expr $_am_stamp_count + 1` ;; 7054156283Srwatson esac 7055156283Srwatsondone 7056156283Srwatsonecho "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) 7057156283Srwatson 7058156283Srwatson# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 7059156283Srwatson# 7060156283Srwatson# This file is free software; the Free Software Foundation 7061156283Srwatson# gives unlimited permission to copy and/or distribute it, 7062156283Srwatson# with or without modifications, as long as this notice is preserved. 7063156283Srwatson 7064156283Srwatson# AM_PROG_INSTALL_SH 7065156283Srwatson# ------------------ 7066156283Srwatson# Define $install_sh. 7067156283SrwatsonAC_DEFUN([AM_PROG_INSTALL_SH], 7068156283Srwatson[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 7069173143Srwatsoninstall_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"} 7070156283SrwatsonAC_SUBST(install_sh)]) 7071156283Srwatson 7072156283Srwatson# Copyright (C) 2003, 2005 Free Software Foundation, Inc. 7073156283Srwatson# 7074156283Srwatson# This file is free software; the Free Software Foundation 7075156283Srwatson# gives unlimited permission to copy and/or distribute it, 7076156283Srwatson# with or without modifications, as long as this notice is preserved. 7077156283Srwatson 7078156283Srwatson# serial 2 7079156283Srwatson 7080156283Srwatson# Check whether the underlying file-system supports filenames 7081156283Srwatson# with a leading dot. For instance MS-DOS doesn't. 7082156283SrwatsonAC_DEFUN([AM_SET_LEADING_DOT], 7083156283Srwatson[rm -rf .tst 2>/dev/null 7084156283Srwatsonmkdir .tst 2>/dev/null 7085156283Srwatsonif test -d .tst; then 7086156283Srwatson am__leading_dot=. 7087156283Srwatsonelse 7088156283Srwatson am__leading_dot=_ 7089156283Srwatsonfi 7090156283Srwatsonrmdir .tst 2>/dev/null 7091156283SrwatsonAC_SUBST([am__leading_dot])]) 7092156283Srwatson 7093156283Srwatson# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- 7094156283Srwatson# From Jim Meyering 7095156283Srwatson 7096156283Srwatson# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005 7097156283Srwatson# Free Software Foundation, Inc. 7098156283Srwatson# 7099156283Srwatson# This file is free software; the Free Software Foundation 7100156283Srwatson# gives unlimited permission to copy and/or distribute it, 7101156283Srwatson# with or without modifications, as long as this notice is preserved. 7102156283Srwatson 7103156283Srwatson# serial 4 7104156283Srwatson 7105156283SrwatsonAC_DEFUN([AM_MAINTAINER_MODE], 7106156283Srwatson[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) 7107156283Srwatson dnl maintainer-mode is disabled by default 7108156283Srwatson AC_ARG_ENABLE(maintainer-mode, 7109156283Srwatson[ --enable-maintainer-mode enable make rules and dependencies not useful 7110156283Srwatson (and sometimes confusing) to the casual installer], 7111156283Srwatson USE_MAINTAINER_MODE=$enableval, 7112156283Srwatson USE_MAINTAINER_MODE=no) 7113156283Srwatson AC_MSG_RESULT([$USE_MAINTAINER_MODE]) 7114156283Srwatson AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes]) 7115156283Srwatson MAINT=$MAINTAINER_MODE_TRUE 7116156283Srwatson AC_SUBST(MAINT)dnl 7117156283Srwatson] 7118156283Srwatson) 7119156283Srwatson 7120156283SrwatsonAU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) 7121156283Srwatson 7122156283Srwatson# Check to see how 'make' treats includes. -*- Autoconf -*- 7123156283Srwatson 7124156283Srwatson# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. 7125156283Srwatson# 7126156283Srwatson# This file is free software; the Free Software Foundation 7127156283Srwatson# gives unlimited permission to copy and/or distribute it, 7128156283Srwatson# with or without modifications, as long as this notice is preserved. 7129156283Srwatson 7130156283Srwatson# serial 3 7131156283Srwatson 7132156283Srwatson# AM_MAKE_INCLUDE() 7133156283Srwatson# ----------------- 7134156283Srwatson# Check to see how make treats includes. 7135156283SrwatsonAC_DEFUN([AM_MAKE_INCLUDE], 7136156283Srwatson[am_make=${MAKE-make} 7137156283Srwatsoncat > confinc << 'END' 7138156283Srwatsonam__doit: 7139156283Srwatson @echo done 7140156283Srwatson.PHONY: am__doit 7141156283SrwatsonEND 7142156283Srwatson# If we don't find an include directive, just comment out the code. 7143156283SrwatsonAC_MSG_CHECKING([for style of include used by $am_make]) 7144156283Srwatsonam__include="#" 7145156283Srwatsonam__quote= 7146156283Srwatson_am_result=none 7147156283Srwatson# First try GNU make style include. 7148156283Srwatsonecho "include confinc" > confmf 7149156283Srwatson# We grep out `Entering directory' and `Leaving directory' 7150156283Srwatson# messages which can occur if `w' ends up in MAKEFLAGS. 7151156283Srwatson# In particular we don't look at `^make:' because GNU make might 7152156283Srwatson# be invoked under some other name (usually "gmake"), in which 7153156283Srwatson# case it prints its new name instead of `make'. 7154156283Srwatsonif test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then 7155156283Srwatson am__include=include 7156156283Srwatson am__quote= 7157156283Srwatson _am_result=GNU 7158156283Srwatsonfi 7159156283Srwatson# Now try BSD make style include. 7160156283Srwatsonif test "$am__include" = "#"; then 7161156283Srwatson echo '.include "confinc"' > confmf 7162156283Srwatson if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then 7163156283Srwatson am__include=.include 7164156283Srwatson am__quote="\"" 7165156283Srwatson _am_result=BSD 7166156283Srwatson fi 7167156283Srwatsonfi 7168156283SrwatsonAC_SUBST([am__include]) 7169156283SrwatsonAC_SUBST([am__quote]) 7170156283SrwatsonAC_MSG_RESULT([$_am_result]) 7171156283Srwatsonrm -f confinc confmf 7172156283Srwatson]) 7173156283Srwatson 7174156283Srwatson# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 7175156283Srwatson 7176173143Srwatson# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005 7177156283Srwatson# Free Software Foundation, Inc. 7178156283Srwatson# 7179156283Srwatson# This file is free software; the Free Software Foundation 7180156283Srwatson# gives unlimited permission to copy and/or distribute it, 7181156283Srwatson# with or without modifications, as long as this notice is preserved. 7182156283Srwatson 7183173143Srwatson# serial 5 7184156283Srwatson 7185156283Srwatson# AM_MISSING_PROG(NAME, PROGRAM) 7186156283Srwatson# ------------------------------ 7187156283SrwatsonAC_DEFUN([AM_MISSING_PROG], 7188156283Srwatson[AC_REQUIRE([AM_MISSING_HAS_RUN]) 7189156283Srwatson$1=${$1-"${am_missing_run}$2"} 7190156283SrwatsonAC_SUBST($1)]) 7191156283Srwatson 7192156283Srwatson 7193156283Srwatson# AM_MISSING_HAS_RUN 7194156283Srwatson# ------------------ 7195156283Srwatson# Define MISSING if not defined so far and test if it supports --run. 7196156283Srwatson# If it does, set am_missing_run to use it, otherwise, to nothing. 7197156283SrwatsonAC_DEFUN([AM_MISSING_HAS_RUN], 7198156283Srwatson[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 7199173143SrwatsonAC_REQUIRE_AUX_FILE([missing])dnl 7200156283Srwatsontest x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" 7201156283Srwatson# Use eval to expand $SHELL 7202156283Srwatsonif eval "$MISSING --run true"; then 7203156283Srwatson am_missing_run="$MISSING --run " 7204156283Srwatsonelse 7205156283Srwatson am_missing_run= 7206156283Srwatson AC_MSG_WARN([`missing' script is too old or missing]) 7207156283Srwatsonfi 7208156283Srwatson]) 7209156283Srwatson 7210173143Srwatson# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. 7211156283Srwatson# 7212156283Srwatson# This file is free software; the Free Software Foundation 7213156283Srwatson# gives unlimited permission to copy and/or distribute it, 7214156283Srwatson# with or without modifications, as long as this notice is preserved. 7215156283Srwatson 7216156283Srwatson# AM_PROG_MKDIR_P 7217156283Srwatson# --------------- 7218173143Srwatson# Check for `mkdir -p'. 7219156283SrwatsonAC_DEFUN([AM_PROG_MKDIR_P], 7220173143Srwatson[AC_PREREQ([2.60])dnl 7221173143SrwatsonAC_REQUIRE([AC_PROG_MKDIR_P])dnl 7222173143Srwatsondnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, 7223173143Srwatsondnl while keeping a definition of mkdir_p for backward compatibility. 7224173143Srwatsondnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. 7225173143Srwatsondnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of 7226173143Srwatsondnl Makefile.ins that do not define MKDIR_P, so we do our own 7227173143Srwatsondnl adjustment using top_builddir (which is defined more often than 7228173143Srwatsondnl MKDIR_P). 7229173143SrwatsonAC_SUBST([mkdir_p], ["$MKDIR_P"])dnl 7230173143Srwatsoncase $mkdir_p in 7231173143Srwatson [[\\/$]]* | ?:[[\\/]]*) ;; 7232173143Srwatson */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; 7233173143Srwatsonesac 7234173143Srwatson]) 7235156283Srwatson 7236156283Srwatson# Helper functions for option handling. -*- Autoconf -*- 7237156283Srwatson 7238156283Srwatson# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. 7239156283Srwatson# 7240156283Srwatson# This file is free software; the Free Software Foundation 7241156283Srwatson# gives unlimited permission to copy and/or distribute it, 7242156283Srwatson# with or without modifications, as long as this notice is preserved. 7243156283Srwatson 7244156283Srwatson# serial 3 7245156283Srwatson 7246156283Srwatson# _AM_MANGLE_OPTION(NAME) 7247156283Srwatson# ----------------------- 7248156283SrwatsonAC_DEFUN([_AM_MANGLE_OPTION], 7249156283Srwatson[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 7250156283Srwatson 7251156283Srwatson# _AM_SET_OPTION(NAME) 7252156283Srwatson# ------------------------------ 7253156283Srwatson# Set option NAME. Presently that only means defining a flag for this option. 7254156283SrwatsonAC_DEFUN([_AM_SET_OPTION], 7255156283Srwatson[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) 7256156283Srwatson 7257156283Srwatson# _AM_SET_OPTIONS(OPTIONS) 7258156283Srwatson# ---------------------------------- 7259156283Srwatson# OPTIONS is a space-separated list of Automake options. 7260156283SrwatsonAC_DEFUN([_AM_SET_OPTIONS], 7261156283Srwatson[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 7262156283Srwatson 7263156283Srwatson# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 7264156283Srwatson# ------------------------------------------- 7265156283Srwatson# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 7266156283SrwatsonAC_DEFUN([_AM_IF_OPTION], 7267156283Srwatson[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 7268156283Srwatson 7269156283Srwatson# Check to make sure that the build environment is sane. -*- Autoconf -*- 7270156283Srwatson 7271156283Srwatson# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 7272156283Srwatson# Free Software Foundation, Inc. 7273156283Srwatson# 7274156283Srwatson# This file is free software; the Free Software Foundation 7275156283Srwatson# gives unlimited permission to copy and/or distribute it, 7276156283Srwatson# with or without modifications, as long as this notice is preserved. 7277156283Srwatson 7278156283Srwatson# serial 4 7279156283Srwatson 7280156283Srwatson# AM_SANITY_CHECK 7281156283Srwatson# --------------- 7282156283SrwatsonAC_DEFUN([AM_SANITY_CHECK], 7283156283Srwatson[AC_MSG_CHECKING([whether build environment is sane]) 7284156283Srwatson# Just in case 7285156283Srwatsonsleep 1 7286156283Srwatsonecho timestamp > conftest.file 7287156283Srwatson# Do `set' in a subshell so we don't clobber the current shell's 7288156283Srwatson# arguments. Must try -L first in case configure is actually a 7289156283Srwatson# symlink; some systems play weird games with the mod time of symlinks 7290156283Srwatson# (eg FreeBSD returns the mod time of the symlink's containing 7291156283Srwatson# directory). 7292156283Srwatsonif ( 7293156283Srwatson set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` 7294156283Srwatson if test "$[*]" = "X"; then 7295156283Srwatson # -L didn't work. 7296156283Srwatson set X `ls -t $srcdir/configure conftest.file` 7297156283Srwatson fi 7298156283Srwatson rm -f conftest.file 7299156283Srwatson if test "$[*]" != "X $srcdir/configure conftest.file" \ 7300156283Srwatson && test "$[*]" != "X conftest.file $srcdir/configure"; then 7301156283Srwatson 7302156283Srwatson # If neither matched, then we have a broken ls. This can happen 7303156283Srwatson # if, for instance, CONFIG_SHELL is bash and it inherits a 7304156283Srwatson # broken ls alias from the environment. This has actually 7305156283Srwatson # happened. Such a system could not be considered "sane". 7306156283Srwatson AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 7307156283Srwatsonalias in your environment]) 7308156283Srwatson fi 7309156283Srwatson 7310156283Srwatson test "$[2]" = conftest.file 7311156283Srwatson ) 7312156283Srwatsonthen 7313156283Srwatson # Ok. 7314156283Srwatson : 7315156283Srwatsonelse 7316156283Srwatson AC_MSG_ERROR([newly created file is older than distributed files! 7317156283SrwatsonCheck your system clock]) 7318156283Srwatsonfi 7319156283SrwatsonAC_MSG_RESULT(yes)]) 7320156283Srwatson 7321156283Srwatson# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 7322156283Srwatson# 7323156283Srwatson# This file is free software; the Free Software Foundation 7324156283Srwatson# gives unlimited permission to copy and/or distribute it, 7325156283Srwatson# with or without modifications, as long as this notice is preserved. 7326156283Srwatson 7327156283Srwatson# AM_PROG_INSTALL_STRIP 7328156283Srwatson# --------------------- 7329156283Srwatson# One issue with vendor `install' (even GNU) is that you can't 7330156283Srwatson# specify the program used to strip binaries. This is especially 7331156283Srwatson# annoying in cross-compiling environments, where the build's strip 7332156283Srwatson# is unlikely to handle the host's binaries. 7333156283Srwatson# Fortunately install-sh will honor a STRIPPROG variable, so we 7334156283Srwatson# always use install-sh in `make install-strip', and initialize 7335156283Srwatson# STRIPPROG with the value of the STRIP variable (set by the user). 7336156283SrwatsonAC_DEFUN([AM_PROG_INSTALL_STRIP], 7337156283Srwatson[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 7338156283Srwatson# Installed binaries are usually stripped using `strip' when the user 7339156283Srwatson# run `make install-strip'. However `strip' might not be the right 7340156283Srwatson# tool to use in cross-compilation environments, therefore Automake 7341156283Srwatson# will honor the `STRIP' environment variable to overrule this program. 7342156283Srwatsondnl Don't test for $cross_compiling = yes, because it might be `maybe'. 7343156283Srwatsonif test "$cross_compiling" != no; then 7344156283Srwatson AC_CHECK_TOOL([STRIP], [strip], :) 7345156283Srwatsonfi 7346173143SrwatsonINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 7347156283SrwatsonAC_SUBST([INSTALL_STRIP_PROGRAM])]) 7348156283Srwatson 7349173143Srwatson# Copyright (C) 2006 Free Software Foundation, Inc. 7350173143Srwatson# 7351173143Srwatson# This file is free software; the Free Software Foundation 7352173143Srwatson# gives unlimited permission to copy and/or distribute it, 7353173143Srwatson# with or without modifications, as long as this notice is preserved. 7354173143Srwatson 7355173143Srwatson# _AM_SUBST_NOTMAKE(VARIABLE) 7356173143Srwatson# --------------------------- 7357173143Srwatson# Prevent Automake from outputing VARIABLE = @VARIABLE@ in Makefile.in. 7358173143Srwatson# This macro is traced by Automake. 7359173143SrwatsonAC_DEFUN([_AM_SUBST_NOTMAKE]) 7360173143Srwatson 7361156283Srwatson# Check how to create a tarball. -*- Autoconf -*- 7362156283Srwatson 7363156283Srwatson# Copyright (C) 2004, 2005 Free Software Foundation, Inc. 7364156283Srwatson# 7365156283Srwatson# This file is free software; the Free Software Foundation 7366156283Srwatson# gives unlimited permission to copy and/or distribute it, 7367156283Srwatson# with or without modifications, as long as this notice is preserved. 7368156283Srwatson 7369156283Srwatson# serial 2 7370156283Srwatson 7371156283Srwatson# _AM_PROG_TAR(FORMAT) 7372156283Srwatson# -------------------- 7373156283Srwatson# Check how to create a tarball in format FORMAT. 7374156283Srwatson# FORMAT should be one of `v7', `ustar', or `pax'. 7375156283Srwatson# 7376156283Srwatson# Substitute a variable $(am__tar) that is a command 7377156283Srwatson# writing to stdout a FORMAT-tarball containing the directory 7378156283Srwatson# $tardir. 7379156283Srwatson# tardir=directory && $(am__tar) > result.tar 7380156283Srwatson# 7381156283Srwatson# Substitute a variable $(am__untar) that extract such 7382156283Srwatson# a tarball read from stdin. 7383156283Srwatson# $(am__untar) < result.tar 7384156283SrwatsonAC_DEFUN([_AM_PROG_TAR], 7385156283Srwatson[# Always define AMTAR for backward compatibility. 7386156283SrwatsonAM_MISSING_PROG([AMTAR], [tar]) 7387156283Srwatsonm4_if([$1], [v7], 7388156283Srwatson [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], 7389156283Srwatson [m4_case([$1], [ustar],, [pax],, 7390156283Srwatson [m4_fatal([Unknown tar format])]) 7391156283SrwatsonAC_MSG_CHECKING([how to create a $1 tar archive]) 7392156283Srwatson# Loop over all known methods to create a tar archive until one works. 7393156283Srwatson_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 7394156283Srwatson_am_tools=${am_cv_prog_tar_$1-$_am_tools} 7395156283Srwatson# Do not fold the above two line into one, because Tru64 sh and 7396156283Srwatson# Solaris sh will not grok spaces in the rhs of `-'. 7397156283Srwatsonfor _am_tool in $_am_tools 7398156283Srwatsondo 7399156283Srwatson case $_am_tool in 7400156283Srwatson gnutar) 7401156283Srwatson for _am_tar in tar gnutar gtar; 7402156283Srwatson do 7403156283Srwatson AM_RUN_LOG([$_am_tar --version]) && break 7404156283Srwatson done 7405156283Srwatson am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 7406156283Srwatson am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 7407156283Srwatson am__untar="$_am_tar -xf -" 7408156283Srwatson ;; 7409156283Srwatson plaintar) 7410156283Srwatson # Must skip GNU tar: if it does not support --format= it doesn't create 7411156283Srwatson # ustar tarball either. 7412156283Srwatson (tar --version) >/dev/null 2>&1 && continue 7413156283Srwatson am__tar='tar chf - "$$tardir"' 7414156283Srwatson am__tar_='tar chf - "$tardir"' 7415156283Srwatson am__untar='tar xf -' 7416156283Srwatson ;; 7417156283Srwatson pax) 7418156283Srwatson am__tar='pax -L -x $1 -w "$$tardir"' 7419156283Srwatson am__tar_='pax -L -x $1 -w "$tardir"' 7420156283Srwatson am__untar='pax -r' 7421156283Srwatson ;; 7422156283Srwatson cpio) 7423156283Srwatson am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 7424156283Srwatson am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 7425156283Srwatson am__untar='cpio -i -H $1 -d' 7426156283Srwatson ;; 7427156283Srwatson none) 7428156283Srwatson am__tar=false 7429156283Srwatson am__tar_=false 7430156283Srwatson am__untar=false 7431156283Srwatson ;; 7432156283Srwatson esac 7433156283Srwatson 7434156283Srwatson # If the value was cached, stop now. We just wanted to have am__tar 7435156283Srwatson # and am__untar set. 7436156283Srwatson test -n "${am_cv_prog_tar_$1}" && break 7437156283Srwatson 7438156283Srwatson # tar/untar a dummy directory, and stop if the command works 7439156283Srwatson rm -rf conftest.dir 7440156283Srwatson mkdir conftest.dir 7441156283Srwatson echo GrepMe > conftest.dir/file 7442156283Srwatson AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 7443156283Srwatson rm -rf conftest.dir 7444156283Srwatson if test -s conftest.tar; then 7445156283Srwatson AM_RUN_LOG([$am__untar <conftest.tar]) 7446156283Srwatson grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 7447156283Srwatson fi 7448156283Srwatsondone 7449156283Srwatsonrm -rf conftest.dir 7450156283Srwatson 7451156283SrwatsonAC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 7452156283SrwatsonAC_MSG_RESULT([$am_cv_prog_tar_$1])]) 7453156283SrwatsonAC_SUBST([am__tar]) 7454156283SrwatsonAC_SUBST([am__untar]) 7455156283Srwatson]) # _AM_PROG_TAR 7456156283Srwatson 7457