aclocal.m4 revision 156283
1156283Srwatson# generated automatically by aclocal 1.9.6 -*- Autoconf -*- 2156283Srwatson 3156283Srwatson# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 4156283Srwatson# 2005 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 14156283Srwatson# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 15156283Srwatson 16156283Srwatson# serial 47 AC_PROG_LIBTOOL 17156283Srwatson 18156283Srwatson 19156283Srwatson# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED) 20156283Srwatson# ----------------------------------------------------------- 21156283Srwatson# If this macro is not defined by Autoconf, define it here. 22156283Srwatsonm4_ifdef([AC_PROVIDE_IFELSE], 23156283Srwatson [], 24156283Srwatson [m4_define([AC_PROVIDE_IFELSE], 25156283Srwatson [m4_ifdef([AC_PROVIDE_$1], 26156283Srwatson [$2], [$3])])]) 27156283Srwatson 28156283Srwatson 29156283Srwatson# AC_PROG_LIBTOOL 30156283Srwatson# --------------- 31156283SrwatsonAC_DEFUN([AC_PROG_LIBTOOL], 32156283Srwatson[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl 33156283Srwatsondnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX 34156283Srwatsondnl immediately, otherwise, hook it in at the end of AC_PROG_CXX. 35156283Srwatson AC_PROVIDE_IFELSE([AC_PROG_CXX], 36156283Srwatson [AC_LIBTOOL_CXX], 37156283Srwatson [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX 38156283Srwatson ])]) 39156283Srwatsondnl And a similar setup for Fortran 77 support 40156283Srwatson AC_PROVIDE_IFELSE([AC_PROG_F77], 41156283Srwatson [AC_LIBTOOL_F77], 42156283Srwatson [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77 43156283Srwatson])]) 44156283Srwatson 45156283Srwatsondnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly. 46156283Srwatsondnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run 47156283Srwatsondnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both. 48156283Srwatson AC_PROVIDE_IFELSE([AC_PROG_GCJ], 49156283Srwatson [AC_LIBTOOL_GCJ], 50156283Srwatson [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 51156283Srwatson [AC_LIBTOOL_GCJ], 52156283Srwatson [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ], 53156283Srwatson [AC_LIBTOOL_GCJ], 54156283Srwatson [ifdef([AC_PROG_GCJ], 55156283Srwatson [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])]) 56156283Srwatson ifdef([A][M_PROG_GCJ], 57156283Srwatson [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])]) 58156283Srwatson ifdef([LT_AC_PROG_GCJ], 59156283Srwatson [define([LT_AC_PROG_GCJ], 60156283Srwatson defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])]) 61156283Srwatson])])# AC_PROG_LIBTOOL 62156283Srwatson 63156283Srwatson 64156283Srwatson# _AC_PROG_LIBTOOL 65156283Srwatson# ---------------- 66156283SrwatsonAC_DEFUN([_AC_PROG_LIBTOOL], 67156283Srwatson[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl 68156283SrwatsonAC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl 69156283SrwatsonAC_BEFORE([$0],[AC_LIBTOOL_F77])dnl 70156283SrwatsonAC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl 71156283Srwatson 72156283Srwatson# This can be used to rebuild libtool when needed 73156283SrwatsonLIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" 74156283Srwatson 75156283Srwatson# Always use our own libtool. 76156283SrwatsonLIBTOOL='$(SHELL) $(top_builddir)/libtool' 77156283SrwatsonAC_SUBST(LIBTOOL)dnl 78156283Srwatson 79156283Srwatson# Prevent multiple expansion 80156283Srwatsondefine([AC_PROG_LIBTOOL], []) 81156283Srwatson])# _AC_PROG_LIBTOOL 82156283Srwatson 83156283Srwatson 84156283Srwatson# AC_LIBTOOL_SETUP 85156283Srwatson# ---------------- 86156283SrwatsonAC_DEFUN([AC_LIBTOOL_SETUP], 87156283Srwatson[AC_PREREQ(2.50)dnl 88156283SrwatsonAC_REQUIRE([AC_ENABLE_SHARED])dnl 89156283SrwatsonAC_REQUIRE([AC_ENABLE_STATIC])dnl 90156283SrwatsonAC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl 91156283SrwatsonAC_REQUIRE([AC_CANONICAL_HOST])dnl 92156283SrwatsonAC_REQUIRE([AC_CANONICAL_BUILD])dnl 93156283SrwatsonAC_REQUIRE([AC_PROG_CC])dnl 94156283SrwatsonAC_REQUIRE([AC_PROG_LD])dnl 95156283SrwatsonAC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl 96156283SrwatsonAC_REQUIRE([AC_PROG_NM])dnl 97156283Srwatson 98156283SrwatsonAC_REQUIRE([AC_PROG_LN_S])dnl 99156283SrwatsonAC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl 100156283Srwatson# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! 101156283SrwatsonAC_REQUIRE([AC_OBJEXT])dnl 102156283SrwatsonAC_REQUIRE([AC_EXEEXT])dnl 103156283Srwatsondnl 104156283Srwatson 105156283SrwatsonAC_LIBTOOL_SYS_MAX_CMD_LEN 106156283SrwatsonAC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE 107156283SrwatsonAC_LIBTOOL_OBJDIR 108156283Srwatson 109156283SrwatsonAC_REQUIRE([_LT_AC_SYS_COMPILER])dnl 110156283Srwatson_LT_AC_PROG_ECHO_BACKSLASH 111156283Srwatson 112156283Srwatsoncase $host_os in 113156283Srwatsonaix3*) 114156283Srwatson # AIX sometimes has problems with the GCC collect2 program. For some 115156283Srwatson # reason, if we set the COLLECT_NAMES environment variable, the problems 116156283Srwatson # vanish in a puff of smoke. 117156283Srwatson if test "X${COLLECT_NAMES+set}" != Xset; then 118156283Srwatson COLLECT_NAMES= 119156283Srwatson export COLLECT_NAMES 120156283Srwatson fi 121156283Srwatson ;; 122156283Srwatsonesac 123156283Srwatson 124156283Srwatson# Sed substitution that helps us do robust quoting. It backslashifies 125156283Srwatson# metacharacters that are still active within double-quoted strings. 126156283SrwatsonXsed='sed -e 1s/^X//' 127156283Srwatson[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'] 128156283Srwatson 129156283Srwatson# Same as above, but do not quote variable references. 130156283Srwatson[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'] 131156283Srwatson 132156283Srwatson# Sed substitution to delay expansion of an escaped shell variable in a 133156283Srwatson# double_quote_subst'ed string. 134156283Srwatsondelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 135156283Srwatson 136156283Srwatson# Sed substitution to avoid accidental globbing in evaled expressions 137156283Srwatsonno_glob_subst='s/\*/\\\*/g' 138156283Srwatson 139156283Srwatson# Constants: 140156283Srwatsonrm="rm -f" 141156283Srwatson 142156283Srwatson# Global variables: 143156283Srwatsondefault_ofile=libtool 144156283Srwatsoncan_build_shared=yes 145156283Srwatson 146156283Srwatson# All known linkers require a `.a' archive for static linking (except MSVC, 147156283Srwatson# which needs '.lib'). 148156283Srwatsonlibext=a 149156283Srwatsonltmain="$ac_aux_dir/ltmain.sh" 150156283Srwatsonofile="$default_ofile" 151156283Srwatsonwith_gnu_ld="$lt_cv_prog_gnu_ld" 152156283Srwatson 153156283SrwatsonAC_CHECK_TOOL(AR, ar, false) 154156283SrwatsonAC_CHECK_TOOL(RANLIB, ranlib, :) 155156283SrwatsonAC_CHECK_TOOL(STRIP, strip, :) 156156283Srwatson 157156283Srwatsonold_CC="$CC" 158156283Srwatsonold_CFLAGS="$CFLAGS" 159156283Srwatson 160156283Srwatson# Set sane defaults for various variables 161156283Srwatsontest -z "$AR" && AR=ar 162156283Srwatsontest -z "$AR_FLAGS" && AR_FLAGS=cru 163156283Srwatsontest -z "$AS" && AS=as 164156283Srwatsontest -z "$CC" && CC=cc 165156283Srwatsontest -z "$LTCC" && LTCC=$CC 166156283Srwatsontest -z "$DLLTOOL" && DLLTOOL=dlltool 167156283Srwatsontest -z "$LD" && LD=ld 168156283Srwatsontest -z "$LN_S" && LN_S="ln -s" 169156283Srwatsontest -z "$MAGIC_CMD" && MAGIC_CMD=file 170156283Srwatsontest -z "$NM" && NM=nm 171156283Srwatsontest -z "$SED" && SED=sed 172156283Srwatsontest -z "$OBJDUMP" && OBJDUMP=objdump 173156283Srwatsontest -z "$RANLIB" && RANLIB=: 174156283Srwatsontest -z "$STRIP" && STRIP=: 175156283Srwatsontest -z "$ac_objext" && ac_objext=o 176156283Srwatson 177156283Srwatson# Determine commands to create old-style static archives. 178156283Srwatsonold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs' 179156283Srwatsonold_postinstall_cmds='chmod 644 $oldlib' 180156283Srwatsonold_postuninstall_cmds= 181156283Srwatson 182156283Srwatsonif test -n "$RANLIB"; then 183156283Srwatson case $host_os in 184156283Srwatson openbsd*) 185156283Srwatson old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds" 186156283Srwatson ;; 187156283Srwatson *) 188156283Srwatson old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds" 189156283Srwatson ;; 190156283Srwatson esac 191156283Srwatson old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" 192156283Srwatsonfi 193156283Srwatson 194156283Srwatson_LT_CC_BASENAME([$compiler]) 195156283Srwatson 196156283Srwatson# Only perform the check for file, if the check method requires it 197156283Srwatsoncase $deplibs_check_method in 198156283Srwatsonfile_magic*) 199156283Srwatson if test "$file_magic_cmd" = '$MAGIC_CMD'; then 200156283Srwatson AC_PATH_MAGIC 201156283Srwatson fi 202156283Srwatson ;; 203156283Srwatsonesac 204156283Srwatson 205156283SrwatsonAC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no) 206156283SrwatsonAC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], 207156283Srwatsonenable_win32_dll=yes, enable_win32_dll=no) 208156283Srwatson 209156283SrwatsonAC_ARG_ENABLE([libtool-lock], 210156283Srwatson [AC_HELP_STRING([--disable-libtool-lock], 211156283Srwatson [avoid locking (might break parallel builds)])]) 212156283Srwatsontest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes 213156283Srwatson 214156283SrwatsonAC_ARG_WITH([pic], 215156283Srwatson [AC_HELP_STRING([--with-pic], 216156283Srwatson [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 217156283Srwatson [pic_mode="$withval"], 218156283Srwatson [pic_mode=default]) 219156283Srwatsontest -z "$pic_mode" && pic_mode=default 220156283Srwatson 221156283Srwatson# Use C for the default configuration in the libtool script 222156283Srwatsontagname= 223156283SrwatsonAC_LIBTOOL_LANG_C_CONFIG 224156283Srwatson_LT_AC_TAGCONFIG 225156283Srwatson])# AC_LIBTOOL_SETUP 226156283Srwatson 227156283Srwatson 228156283Srwatson# _LT_AC_SYS_COMPILER 229156283Srwatson# ------------------- 230156283SrwatsonAC_DEFUN([_LT_AC_SYS_COMPILER], 231156283Srwatson[AC_REQUIRE([AC_PROG_CC])dnl 232156283Srwatson 233156283Srwatson# If no C compiler was specified, use CC. 234156283SrwatsonLTCC=${LTCC-"$CC"} 235156283Srwatson 236156283Srwatson# Allow CC to be a program name with arguments. 237156283Srwatsoncompiler=$CC 238156283Srwatson])# _LT_AC_SYS_COMPILER 239156283Srwatson 240156283Srwatson 241156283Srwatson# _LT_CC_BASENAME(CC) 242156283Srwatson# ------------------- 243156283Srwatson# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 244156283SrwatsonAC_DEFUN([_LT_CC_BASENAME], 245156283Srwatson[for cc_temp in $1""; do 246156283Srwatson case $cc_temp in 247156283Srwatson compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 248156283Srwatson distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 249156283Srwatson \-*) ;; 250156283Srwatson *) break;; 251156283Srwatson esac 252156283Srwatsondone 253156283Srwatsoncc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` 254156283Srwatson]) 255156283Srwatson 256156283Srwatson 257156283Srwatson# _LT_COMPILER_BOILERPLATE 258156283Srwatson# ------------------------ 259156283Srwatson# Check for compiler boilerplate output or warnings with 260156283Srwatson# the simple compiler test code. 261156283SrwatsonAC_DEFUN([_LT_COMPILER_BOILERPLATE], 262156283Srwatson[ac_outfile=conftest.$ac_objext 263156283Srwatsonprintf "$lt_simple_compile_test_code" >conftest.$ac_ext 264156283Srwatsoneval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err 265156283Srwatson_lt_compiler_boilerplate=`cat conftest.err` 266156283Srwatson$rm conftest* 267156283Srwatson])# _LT_COMPILER_BOILERPLATE 268156283Srwatson 269156283Srwatson 270156283Srwatson# _LT_LINKER_BOILERPLATE 271156283Srwatson# ---------------------- 272156283Srwatson# Check for linker boilerplate output or warnings with 273156283Srwatson# the simple link test code. 274156283SrwatsonAC_DEFUN([_LT_LINKER_BOILERPLATE], 275156283Srwatson[ac_outfile=conftest.$ac_objext 276156283Srwatsonprintf "$lt_simple_link_test_code" >conftest.$ac_ext 277156283Srwatsoneval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err 278156283Srwatson_lt_linker_boilerplate=`cat conftest.err` 279156283Srwatson$rm conftest* 280156283Srwatson])# _LT_LINKER_BOILERPLATE 281156283Srwatson 282156283Srwatson 283156283Srwatson# _LT_AC_SYS_LIBPATH_AIX 284156283Srwatson# ---------------------- 285156283Srwatson# Links a minimal program and checks the executable 286156283Srwatson# for the system default hardcoded library path. In most cases, 287156283Srwatson# this is /usr/lib:/lib, but when the MPI compilers are used 288156283Srwatson# the location of the communication and MPI libs are included too. 289156283Srwatson# If we don't find anything, use the default library path according 290156283Srwatson# to the aix ld manual. 291156283SrwatsonAC_DEFUN([_LT_AC_SYS_LIBPATH_AIX], 292156283Srwatson[AC_LINK_IFELSE(AC_LANG_PROGRAM,[ 293156283Srwatsonaix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } 294156283Srwatson}'` 295156283Srwatson# Check for a 64-bit object if we didn't find anything. 296156283Srwatsonif test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } 297156283Srwatson}'`; fi],[]) 298156283Srwatsonif test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi 299156283Srwatson])# _LT_AC_SYS_LIBPATH_AIX 300156283Srwatson 301156283Srwatson 302156283Srwatson# _LT_AC_SHELL_INIT(ARG) 303156283Srwatson# ---------------------- 304156283SrwatsonAC_DEFUN([_LT_AC_SHELL_INIT], 305156283Srwatson[ifdef([AC_DIVERSION_NOTICE], 306156283Srwatson [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], 307156283Srwatson [AC_DIVERT_PUSH(NOTICE)]) 308156283Srwatson$1 309156283SrwatsonAC_DIVERT_POP 310156283Srwatson])# _LT_AC_SHELL_INIT 311156283Srwatson 312156283Srwatson 313156283Srwatson# _LT_AC_PROG_ECHO_BACKSLASH 314156283Srwatson# -------------------------- 315156283Srwatson# Add some code to the start of the generated configure script which 316156283Srwatson# will find an echo command which doesn't interpret backslashes. 317156283SrwatsonAC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH], 318156283Srwatson[_LT_AC_SHELL_INIT([ 319156283Srwatson# Check that we are running under the correct shell. 320156283SrwatsonSHELL=${CONFIG_SHELL-/bin/sh} 321156283Srwatson 322156283Srwatsoncase X$ECHO in 323156283SrwatsonX*--fallback-echo) 324156283Srwatson # Remove one level of quotation (which was required for Make). 325156283Srwatson ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` 326156283Srwatson ;; 327156283Srwatsonesac 328156283Srwatson 329156283Srwatsonecho=${ECHO-echo} 330156283Srwatsonif test "X[$]1" = X--no-reexec; then 331156283Srwatson # Discard the --no-reexec flag, and continue. 332156283Srwatson shift 333156283Srwatsonelif test "X[$]1" = X--fallback-echo; then 334156283Srwatson # Avoid inline document here, it may be left over 335156283Srwatson : 336156283Srwatsonelif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then 337156283Srwatson # Yippee, $echo works! 338156283Srwatson : 339156283Srwatsonelse 340156283Srwatson # Restart under the correct shell. 341156283Srwatson exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} 342156283Srwatsonfi 343156283Srwatson 344156283Srwatsonif test "X[$]1" = X--fallback-echo; then 345156283Srwatson # used as fallback echo 346156283Srwatson shift 347156283Srwatson cat <<EOF 348156283Srwatson[$]* 349156283SrwatsonEOF 350156283Srwatson exit 0 351156283Srwatsonfi 352156283Srwatson 353156283Srwatson# The HP-UX ksh and POSIX shell print the target directory to stdout 354156283Srwatson# if CDPATH is set. 355156283Srwatson(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 356156283Srwatson 357156283Srwatsonif test -z "$ECHO"; then 358156283Srwatsonif test "X${echo_test_string+set}" != Xset; then 359156283Srwatson# find a string as large as possible, as long as the shell can cope with it 360156283Srwatson for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do 361156283Srwatson # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... 362156283Srwatson if (echo_test_string=`eval $cmd`) 2>/dev/null && 363156283Srwatson echo_test_string=`eval $cmd` && 364156283Srwatson (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null 365156283Srwatson then 366156283Srwatson break 367156283Srwatson fi 368156283Srwatson done 369156283Srwatsonfi 370156283Srwatson 371156283Srwatsonif test "X`($echo '\t') 2>/dev/null`" = 'X\t' && 372156283Srwatson echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && 373156283Srwatson test "X$echo_testing_string" = "X$echo_test_string"; then 374156283Srwatson : 375156283Srwatsonelse 376156283Srwatson # The Solaris, AIX, and Digital Unix default echo programs unquote 377156283Srwatson # backslashes. This makes it impossible to quote backslashes using 378156283Srwatson # echo "$something" | sed 's/\\/\\\\/g' 379156283Srwatson # 380156283Srwatson # So, first we look for a working echo in the user's PATH. 381156283Srwatson 382156283Srwatson lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 383156283Srwatson for dir in $PATH /usr/ucb; do 384156283Srwatson IFS="$lt_save_ifs" 385156283Srwatson if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && 386156283Srwatson test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && 387156283Srwatson echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && 388156283Srwatson test "X$echo_testing_string" = "X$echo_test_string"; then 389156283Srwatson echo="$dir/echo" 390156283Srwatson break 391156283Srwatson fi 392156283Srwatson done 393156283Srwatson IFS="$lt_save_ifs" 394156283Srwatson 395156283Srwatson if test "X$echo" = Xecho; then 396156283Srwatson # We didn't find a better echo, so look for alternatives. 397156283Srwatson if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && 398156283Srwatson echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && 399156283Srwatson test "X$echo_testing_string" = "X$echo_test_string"; then 400156283Srwatson # This shell has a builtin print -r that does the trick. 401156283Srwatson echo='print -r' 402156283Srwatson elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && 403156283Srwatson test "X$CONFIG_SHELL" != X/bin/ksh; then 404156283Srwatson # If we have ksh, try running configure again with it. 405156283Srwatson ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} 406156283Srwatson export ORIGINAL_CONFIG_SHELL 407156283Srwatson CONFIG_SHELL=/bin/ksh 408156283Srwatson export CONFIG_SHELL 409156283Srwatson exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} 410156283Srwatson else 411156283Srwatson # Try using printf. 412156283Srwatson echo='printf %s\n' 413156283Srwatson if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && 414156283Srwatson echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && 415156283Srwatson test "X$echo_testing_string" = "X$echo_test_string"; then 416156283Srwatson # Cool, printf works 417156283Srwatson : 418156283Srwatson elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && 419156283Srwatson test "X$echo_testing_string" = 'X\t' && 420156283Srwatson echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && 421156283Srwatson test "X$echo_testing_string" = "X$echo_test_string"; then 422156283Srwatson CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL 423156283Srwatson export CONFIG_SHELL 424156283Srwatson SHELL="$CONFIG_SHELL" 425156283Srwatson export SHELL 426156283Srwatson echo="$CONFIG_SHELL [$]0 --fallback-echo" 427156283Srwatson elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && 428156283Srwatson test "X$echo_testing_string" = 'X\t' && 429156283Srwatson echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && 430156283Srwatson test "X$echo_testing_string" = "X$echo_test_string"; then 431156283Srwatson echo="$CONFIG_SHELL [$]0 --fallback-echo" 432156283Srwatson else 433156283Srwatson # maybe with a smaller string... 434156283Srwatson prev=: 435156283Srwatson 436156283Srwatson for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do 437156283Srwatson if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null 438156283Srwatson then 439156283Srwatson break 440156283Srwatson fi 441156283Srwatson prev="$cmd" 442156283Srwatson done 443156283Srwatson 444156283Srwatson if test "$prev" != 'sed 50q "[$]0"'; then 445156283Srwatson echo_test_string=`eval $prev` 446156283Srwatson export echo_test_string 447156283Srwatson exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} 448156283Srwatson else 449156283Srwatson # Oops. We lost completely, so just stick with echo. 450156283Srwatson echo=echo 451156283Srwatson fi 452156283Srwatson fi 453156283Srwatson fi 454156283Srwatson fi 455156283Srwatsonfi 456156283Srwatsonfi 457156283Srwatson 458156283Srwatson# Copy echo and quote the copy suitably for passing to libtool from 459156283Srwatson# the Makefile, instead of quoting the original, which is used later. 460156283SrwatsonECHO=$echo 461156283Srwatsonif test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then 462156283Srwatson ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" 463156283Srwatsonfi 464156283Srwatson 465156283SrwatsonAC_SUBST(ECHO) 466156283Srwatson])])# _LT_AC_PROG_ECHO_BACKSLASH 467156283Srwatson 468156283Srwatson 469156283Srwatson# _LT_AC_LOCK 470156283Srwatson# ----------- 471156283SrwatsonAC_DEFUN([_LT_AC_LOCK], 472156283Srwatson[AC_ARG_ENABLE([libtool-lock], 473156283Srwatson [AC_HELP_STRING([--disable-libtool-lock], 474156283Srwatson [avoid locking (might break parallel builds)])]) 475156283Srwatsontest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes 476156283Srwatson 477156283Srwatson# Some flags need to be propagated to the compiler or linker for good 478156283Srwatson# libtool support. 479156283Srwatsoncase $host in 480156283Srwatsonia64-*-hpux*) 481156283Srwatson # Find out which ABI we are using. 482156283Srwatson echo 'int i;' > conftest.$ac_ext 483156283Srwatson if AC_TRY_EVAL(ac_compile); then 484156283Srwatson case `/usr/bin/file conftest.$ac_objext` in 485156283Srwatson *ELF-32*) 486156283Srwatson HPUX_IA64_MODE="32" 487156283Srwatson ;; 488156283Srwatson *ELF-64*) 489156283Srwatson HPUX_IA64_MODE="64" 490156283Srwatson ;; 491156283Srwatson esac 492156283Srwatson fi 493156283Srwatson rm -rf conftest* 494156283Srwatson ;; 495156283Srwatson*-*-irix6*) 496156283Srwatson # Find out which ABI we are using. 497156283Srwatson echo '[#]line __oline__ "configure"' > conftest.$ac_ext 498156283Srwatson if AC_TRY_EVAL(ac_compile); then 499156283Srwatson if test "$lt_cv_prog_gnu_ld" = yes; then 500156283Srwatson case `/usr/bin/file conftest.$ac_objext` in 501156283Srwatson *32-bit*) 502156283Srwatson LD="${LD-ld} -melf32bsmip" 503156283Srwatson ;; 504156283Srwatson *N32*) 505156283Srwatson LD="${LD-ld} -melf32bmipn32" 506156283Srwatson ;; 507156283Srwatson *64-bit*) 508156283Srwatson LD="${LD-ld} -melf64bmip" 509156283Srwatson ;; 510156283Srwatson esac 511156283Srwatson else 512156283Srwatson case `/usr/bin/file conftest.$ac_objext` in 513156283Srwatson *32-bit*) 514156283Srwatson LD="${LD-ld} -32" 515156283Srwatson ;; 516156283Srwatson *N32*) 517156283Srwatson LD="${LD-ld} -n32" 518156283Srwatson ;; 519156283Srwatson *64-bit*) 520156283Srwatson LD="${LD-ld} -64" 521156283Srwatson ;; 522156283Srwatson esac 523156283Srwatson fi 524156283Srwatson fi 525156283Srwatson rm -rf conftest* 526156283Srwatson ;; 527156283Srwatson 528156283Srwatsonx86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*) 529156283Srwatson # Find out which ABI we are using. 530156283Srwatson echo 'int i;' > conftest.$ac_ext 531156283Srwatson if AC_TRY_EVAL(ac_compile); then 532156283Srwatson case `/usr/bin/file conftest.o` in 533156283Srwatson *32-bit*) 534156283Srwatson case $host in 535156283Srwatson x86_64-*linux*) 536156283Srwatson LD="${LD-ld} -m elf_i386" 537156283Srwatson ;; 538156283Srwatson ppc64-*linux*|powerpc64-*linux*) 539156283Srwatson LD="${LD-ld} -m elf32ppclinux" 540156283Srwatson ;; 541156283Srwatson s390x-*linux*) 542156283Srwatson LD="${LD-ld} -m elf_s390" 543156283Srwatson ;; 544156283Srwatson sparc64-*linux*) 545156283Srwatson LD="${LD-ld} -m elf32_sparc" 546156283Srwatson ;; 547156283Srwatson esac 548156283Srwatson ;; 549156283Srwatson *64-bit*) 550156283Srwatson case $host in 551156283Srwatson x86_64-*linux*) 552156283Srwatson LD="${LD-ld} -m elf_x86_64" 553156283Srwatson ;; 554156283Srwatson ppc*-*linux*|powerpc*-*linux*) 555156283Srwatson LD="${LD-ld} -m elf64ppc" 556156283Srwatson ;; 557156283Srwatson s390*-*linux*) 558156283Srwatson LD="${LD-ld} -m elf64_s390" 559156283Srwatson ;; 560156283Srwatson sparc*-*linux*) 561156283Srwatson LD="${LD-ld} -m elf64_sparc" 562156283Srwatson ;; 563156283Srwatson esac 564156283Srwatson ;; 565156283Srwatson esac 566156283Srwatson fi 567156283Srwatson rm -rf conftest* 568156283Srwatson ;; 569156283Srwatson 570156283Srwatson*-*-sco3.2v5*) 571156283Srwatson # On SCO OpenServer 5, we need -belf to get full-featured binaries. 572156283Srwatson SAVE_CFLAGS="$CFLAGS" 573156283Srwatson CFLAGS="$CFLAGS -belf" 574156283Srwatson AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 575156283Srwatson [AC_LANG_PUSH(C) 576156283Srwatson AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 577156283Srwatson AC_LANG_POP]) 578156283Srwatson if test x"$lt_cv_cc_needs_belf" != x"yes"; then 579156283Srwatson # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 580156283Srwatson CFLAGS="$SAVE_CFLAGS" 581156283Srwatson fi 582156283Srwatson ;; 583156283SrwatsonAC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], 584156283Srwatson[*-*-cygwin* | *-*-mingw* | *-*-pw32*) 585156283Srwatson AC_CHECK_TOOL(DLLTOOL, dlltool, false) 586156283Srwatson AC_CHECK_TOOL(AS, as, false) 587156283Srwatson AC_CHECK_TOOL(OBJDUMP, objdump, false) 588156283Srwatson ;; 589156283Srwatson ]) 590156283Srwatsonesac 591156283Srwatson 592156283Srwatsonneed_locks="$enable_libtool_lock" 593156283Srwatson 594156283Srwatson])# _LT_AC_LOCK 595156283Srwatson 596156283Srwatson 597156283Srwatson# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 598156283Srwatson# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 599156283Srwatson# ---------------------------------------------------------------- 600156283Srwatson# Check whether the given compiler option works 601156283SrwatsonAC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], 602156283Srwatson[AC_REQUIRE([LT_AC_PROG_SED]) 603156283SrwatsonAC_CACHE_CHECK([$1], [$2], 604156283Srwatson [$2=no 605156283Srwatson ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 606156283Srwatson printf "$lt_simple_compile_test_code" > conftest.$ac_ext 607156283Srwatson lt_compiler_flag="$3" 608156283Srwatson # Insert the option either (1) after the last *FLAGS variable, or 609156283Srwatson # (2) before a word containing "conftest.", or (3) at the end. 610156283Srwatson # Note that $ac_compile itself does not contain backslashes and begins 611156283Srwatson # with a dollar sign (not a hyphen), so the echo should work correctly. 612156283Srwatson # The option is referenced via a variable to avoid confusing sed. 613156283Srwatson lt_compile=`echo "$ac_compile" | $SED \ 614156283Srwatson -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 615156283Srwatson -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 616156283Srwatson -e 's:$: $lt_compiler_flag:'` 617156283Srwatson (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 618156283Srwatson (eval "$lt_compile" 2>conftest.err) 619156283Srwatson ac_status=$? 620156283Srwatson cat conftest.err >&AS_MESSAGE_LOG_FD 621156283Srwatson echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 622156283Srwatson if (exit $ac_status) && test -s "$ac_outfile"; then 623156283Srwatson # The compiler can only warn and ignore the option if not recognized 624156283Srwatson # So say no if there are warnings other than the usual output. 625156283Srwatson $echo "X$_lt_compiler_boilerplate" | $Xsed >conftest.exp 626156283Srwatson $SED '/^$/d' conftest.err >conftest.er2 627156283Srwatson if test ! -s conftest.err || diff conftest.exp conftest.er2 >/dev/null; then 628156283Srwatson $2=yes 629156283Srwatson fi 630156283Srwatson fi 631156283Srwatson $rm conftest* 632156283Srwatson]) 633156283Srwatson 634156283Srwatsonif test x"[$]$2" = xyes; then 635156283Srwatson ifelse([$5], , :, [$5]) 636156283Srwatsonelse 637156283Srwatson ifelse([$6], , :, [$6]) 638156283Srwatsonfi 639156283Srwatson])# AC_LIBTOOL_COMPILER_OPTION 640156283Srwatson 641156283Srwatson 642156283Srwatson# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 643156283Srwatson# [ACTION-SUCCESS], [ACTION-FAILURE]) 644156283Srwatson# ------------------------------------------------------------ 645156283Srwatson# Check whether the given compiler option works 646156283SrwatsonAC_DEFUN([AC_LIBTOOL_LINKER_OPTION], 647156283Srwatson[AC_CACHE_CHECK([$1], [$2], 648156283Srwatson [$2=no 649156283Srwatson save_LDFLAGS="$LDFLAGS" 650156283Srwatson LDFLAGS="$LDFLAGS $3" 651156283Srwatson printf "$lt_simple_link_test_code" > conftest.$ac_ext 652156283Srwatson if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 653156283Srwatson # The linker can only warn and ignore the option if not recognized 654156283Srwatson # So say no if there are warnings 655156283Srwatson if test -s conftest.err; then 656156283Srwatson # Append any errors to the config.log. 657156283Srwatson cat conftest.err 1>&AS_MESSAGE_LOG_FD 658156283Srwatson $echo "X$_lt_linker_boilerplate" | $Xsed > conftest.exp 659156283Srwatson $SED '/^$/d' conftest.err >conftest.er2 660156283Srwatson if diff conftest.exp conftest.er2 >/dev/null; then 661156283Srwatson $2=yes 662156283Srwatson fi 663156283Srwatson else 664156283Srwatson $2=yes 665156283Srwatson fi 666156283Srwatson fi 667156283Srwatson $rm conftest* 668156283Srwatson LDFLAGS="$save_LDFLAGS" 669156283Srwatson]) 670156283Srwatson 671156283Srwatsonif test x"[$]$2" = xyes; then 672156283Srwatson ifelse([$4], , :, [$4]) 673156283Srwatsonelse 674156283Srwatson ifelse([$5], , :, [$5]) 675156283Srwatsonfi 676156283Srwatson])# AC_LIBTOOL_LINKER_OPTION 677156283Srwatson 678156283Srwatson 679156283Srwatson# AC_LIBTOOL_SYS_MAX_CMD_LEN 680156283Srwatson# -------------------------- 681156283SrwatsonAC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], 682156283Srwatson[# find the maximum length of command line arguments 683156283SrwatsonAC_MSG_CHECKING([the maximum length of command line arguments]) 684156283SrwatsonAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 685156283Srwatson i=0 686156283Srwatson teststring="ABCD" 687156283Srwatson 688156283Srwatson case $build_os in 689156283Srwatson msdosdjgpp*) 690156283Srwatson # On DJGPP, this test can blow up pretty badly due to problems in libc 691156283Srwatson # (any single argument exceeding 2000 bytes causes a buffer overrun 692156283Srwatson # during glob expansion). Even if it were fixed, the result of this 693156283Srwatson # check would be larger than it should be. 694156283Srwatson lt_cv_sys_max_cmd_len=12288; # 12K is about right 695156283Srwatson ;; 696156283Srwatson 697156283Srwatson gnu*) 698156283Srwatson # Under GNU Hurd, this test is not required because there is 699156283Srwatson # no limit to the length of command line arguments. 700156283Srwatson # Libtool will interpret -1 as no limit whatsoever 701156283Srwatson lt_cv_sys_max_cmd_len=-1; 702156283Srwatson ;; 703156283Srwatson 704156283Srwatson cygwin* | mingw*) 705156283Srwatson # On Win9x/ME, this test blows up -- it succeeds, but takes 706156283Srwatson # about 5 minutes as the teststring grows exponentially. 707156283Srwatson # Worse, since 9x/ME are not pre-emptively multitasking, 708156283Srwatson # you end up with a "frozen" computer, even though with patience 709156283Srwatson # the test eventually succeeds (with a max line length of 256k). 710156283Srwatson # Instead, let's just punt: use the minimum linelength reported by 711156283Srwatson # all of the supported platforms: 8192 (on NT/2K/XP). 712156283Srwatson lt_cv_sys_max_cmd_len=8192; 713156283Srwatson ;; 714156283Srwatson 715156283Srwatson amigaos*) 716156283Srwatson # On AmigaOS with pdksh, this test takes hours, literally. 717156283Srwatson # So we just punt and use a minimum line length of 8192. 718156283Srwatson lt_cv_sys_max_cmd_len=8192; 719156283Srwatson ;; 720156283Srwatson 721156283Srwatson netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) 722156283Srwatson # This has been around since 386BSD, at least. Likely further. 723156283Srwatson if test -x /sbin/sysctl; then 724156283Srwatson lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 725156283Srwatson elif test -x /usr/sbin/sysctl; then 726156283Srwatson lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 727156283Srwatson else 728156283Srwatson lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 729156283Srwatson fi 730156283Srwatson # And add a safety zone 731156283Srwatson lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 732156283Srwatson lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 733156283Srwatson ;; 734156283Srwatson osf*) 735156283Srwatson # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 736156283Srwatson # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 737156283Srwatson # nice to cause kernel panics so lets avoid the loop below. 738156283Srwatson # First set a reasonable default. 739156283Srwatson lt_cv_sys_max_cmd_len=16384 740156283Srwatson # 741156283Srwatson if test -x /sbin/sysconfig; then 742156283Srwatson case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 743156283Srwatson *1*) lt_cv_sys_max_cmd_len=-1 ;; 744156283Srwatson esac 745156283Srwatson fi 746156283Srwatson ;; 747156283Srwatson *) 748156283Srwatson # If test is not a shell built-in, we'll probably end up computing a 749156283Srwatson # maximum length that is only half of the actual maximum length, but 750156283Srwatson # we can't tell. 751156283Srwatson SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 752156283Srwatson while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \ 753156283Srwatson = "XX$teststring") >/dev/null 2>&1 && 754156283Srwatson new_result=`expr "X$teststring" : ".*" 2>&1` && 755156283Srwatson lt_cv_sys_max_cmd_len=$new_result && 756156283Srwatson test $i != 17 # 1/2 MB should be enough 757156283Srwatson do 758156283Srwatson i=`expr $i + 1` 759156283Srwatson teststring=$teststring$teststring 760156283Srwatson done 761156283Srwatson teststring= 762156283Srwatson # Add a significant safety factor because C++ compilers can tack on massive 763156283Srwatson # amounts of additional arguments before passing them to the linker. 764156283Srwatson # It appears as though 1/2 is a usable value. 765156283Srwatson lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 766156283Srwatson ;; 767156283Srwatson esac 768156283Srwatson]) 769156283Srwatsonif test -n $lt_cv_sys_max_cmd_len ; then 770156283Srwatson AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 771156283Srwatsonelse 772156283Srwatson AC_MSG_RESULT(none) 773156283Srwatsonfi 774156283Srwatson])# AC_LIBTOOL_SYS_MAX_CMD_LEN 775156283Srwatson 776156283Srwatson 777156283Srwatson# _LT_AC_CHECK_DLFCN 778156283Srwatson# -------------------- 779156283SrwatsonAC_DEFUN([_LT_AC_CHECK_DLFCN], 780156283Srwatson[AC_CHECK_HEADERS(dlfcn.h)dnl 781156283Srwatson])# _LT_AC_CHECK_DLFCN 782156283Srwatson 783156283Srwatson 784156283Srwatson# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 785156283Srwatson# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 786156283Srwatson# ------------------------------------------------------------------ 787156283SrwatsonAC_DEFUN([_LT_AC_TRY_DLOPEN_SELF], 788156283Srwatson[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl 789156283Srwatsonif test "$cross_compiling" = yes; then : 790156283Srwatson [$4] 791156283Srwatsonelse 792156283Srwatson lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 793156283Srwatson lt_status=$lt_dlunknown 794156283Srwatson cat > conftest.$ac_ext <<EOF 795156283Srwatson[#line __oline__ "configure" 796156283Srwatson#include "confdefs.h" 797156283Srwatson 798156283Srwatson#if HAVE_DLFCN_H 799156283Srwatson#include <dlfcn.h> 800156283Srwatson#endif 801156283Srwatson 802156283Srwatson#include <stdio.h> 803156283Srwatson 804156283Srwatson#ifdef RTLD_GLOBAL 805156283Srwatson# define LT_DLGLOBAL RTLD_GLOBAL 806156283Srwatson#else 807156283Srwatson# ifdef DL_GLOBAL 808156283Srwatson# define LT_DLGLOBAL DL_GLOBAL 809156283Srwatson# else 810156283Srwatson# define LT_DLGLOBAL 0 811156283Srwatson# endif 812156283Srwatson#endif 813156283Srwatson 814156283Srwatson/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 815156283Srwatson find out it does not work in some platform. */ 816156283Srwatson#ifndef LT_DLLAZY_OR_NOW 817156283Srwatson# ifdef RTLD_LAZY 818156283Srwatson# define LT_DLLAZY_OR_NOW RTLD_LAZY 819156283Srwatson# else 820156283Srwatson# ifdef DL_LAZY 821156283Srwatson# define LT_DLLAZY_OR_NOW DL_LAZY 822156283Srwatson# else 823156283Srwatson# ifdef RTLD_NOW 824156283Srwatson# define LT_DLLAZY_OR_NOW RTLD_NOW 825156283Srwatson# else 826156283Srwatson# ifdef DL_NOW 827156283Srwatson# define LT_DLLAZY_OR_NOW DL_NOW 828156283Srwatson# else 829156283Srwatson# define LT_DLLAZY_OR_NOW 0 830156283Srwatson# endif 831156283Srwatson# endif 832156283Srwatson# endif 833156283Srwatson# endif 834156283Srwatson#endif 835156283Srwatson 836156283Srwatson#ifdef __cplusplus 837156283Srwatsonextern "C" void exit (int); 838156283Srwatson#endif 839156283Srwatson 840156283Srwatsonvoid fnord() { int i=42;} 841156283Srwatsonint main () 842156283Srwatson{ 843156283Srwatson void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 844156283Srwatson int status = $lt_dlunknown; 845156283Srwatson 846156283Srwatson if (self) 847156283Srwatson { 848156283Srwatson if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 849156283Srwatson else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 850156283Srwatson /* dlclose (self); */ 851156283Srwatson } 852156283Srwatson 853156283Srwatson exit (status); 854156283Srwatson}] 855156283SrwatsonEOF 856156283Srwatson if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then 857156283Srwatson (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 858156283Srwatson lt_status=$? 859156283Srwatson case x$lt_status in 860156283Srwatson x$lt_dlno_uscore) $1 ;; 861156283Srwatson x$lt_dlneed_uscore) $2 ;; 862156283Srwatson x$lt_unknown|x*) $3 ;; 863156283Srwatson esac 864156283Srwatson else : 865156283Srwatson # compilation failed 866156283Srwatson $3 867156283Srwatson fi 868156283Srwatsonfi 869156283Srwatsonrm -fr conftest* 870156283Srwatson])# _LT_AC_TRY_DLOPEN_SELF 871156283Srwatson 872156283Srwatson 873156283Srwatson# AC_LIBTOOL_DLOPEN_SELF 874156283Srwatson# ------------------- 875156283SrwatsonAC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], 876156283Srwatson[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl 877156283Srwatsonif test "x$enable_dlopen" != xyes; then 878156283Srwatson enable_dlopen=unknown 879156283Srwatson enable_dlopen_self=unknown 880156283Srwatson enable_dlopen_self_static=unknown 881156283Srwatsonelse 882156283Srwatson lt_cv_dlopen=no 883156283Srwatson lt_cv_dlopen_libs= 884156283Srwatson 885156283Srwatson case $host_os in 886156283Srwatson beos*) 887156283Srwatson lt_cv_dlopen="load_add_on" 888156283Srwatson lt_cv_dlopen_libs= 889156283Srwatson lt_cv_dlopen_self=yes 890156283Srwatson ;; 891156283Srwatson 892156283Srwatson mingw* | pw32*) 893156283Srwatson lt_cv_dlopen="LoadLibrary" 894156283Srwatson lt_cv_dlopen_libs= 895156283Srwatson ;; 896156283Srwatson 897156283Srwatson cygwin*) 898156283Srwatson lt_cv_dlopen="dlopen" 899156283Srwatson lt_cv_dlopen_libs= 900156283Srwatson ;; 901156283Srwatson 902156283Srwatson darwin*) 903156283Srwatson # if libdl is installed we need to link against it 904156283Srwatson AC_CHECK_LIB([dl], [dlopen], 905156283Srwatson [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ 906156283Srwatson lt_cv_dlopen="dyld" 907156283Srwatson lt_cv_dlopen_libs= 908156283Srwatson lt_cv_dlopen_self=yes 909156283Srwatson ]) 910156283Srwatson ;; 911156283Srwatson 912156283Srwatson *) 913156283Srwatson AC_CHECK_FUNC([shl_load], 914156283Srwatson [lt_cv_dlopen="shl_load"], 915156283Srwatson [AC_CHECK_LIB([dld], [shl_load], 916156283Srwatson [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"], 917156283Srwatson [AC_CHECK_FUNC([dlopen], 918156283Srwatson [lt_cv_dlopen="dlopen"], 919156283Srwatson [AC_CHECK_LIB([dl], [dlopen], 920156283Srwatson [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], 921156283Srwatson [AC_CHECK_LIB([svld], [dlopen], 922156283Srwatson [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], 923156283Srwatson [AC_CHECK_LIB([dld], [dld_link], 924156283Srwatson [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"]) 925156283Srwatson ]) 926156283Srwatson ]) 927156283Srwatson ]) 928156283Srwatson ]) 929156283Srwatson ]) 930156283Srwatson ;; 931156283Srwatson esac 932156283Srwatson 933156283Srwatson if test "x$lt_cv_dlopen" != xno; then 934156283Srwatson enable_dlopen=yes 935156283Srwatson else 936156283Srwatson enable_dlopen=no 937156283Srwatson fi 938156283Srwatson 939156283Srwatson case $lt_cv_dlopen in 940156283Srwatson dlopen) 941156283Srwatson save_CPPFLAGS="$CPPFLAGS" 942156283Srwatson test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 943156283Srwatson 944156283Srwatson save_LDFLAGS="$LDFLAGS" 945156283Srwatson eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 946156283Srwatson 947156283Srwatson save_LIBS="$LIBS" 948156283Srwatson LIBS="$lt_cv_dlopen_libs $LIBS" 949156283Srwatson 950156283Srwatson AC_CACHE_CHECK([whether a program can dlopen itself], 951156283Srwatson lt_cv_dlopen_self, [dnl 952156283Srwatson _LT_AC_TRY_DLOPEN_SELF( 953156283Srwatson lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 954156283Srwatson lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 955156283Srwatson ]) 956156283Srwatson 957156283Srwatson if test "x$lt_cv_dlopen_self" = xyes; then 958156283Srwatson LDFLAGS="$LDFLAGS $link_static_flag" 959156283Srwatson AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 960156283Srwatson lt_cv_dlopen_self_static, [dnl 961156283Srwatson _LT_AC_TRY_DLOPEN_SELF( 962156283Srwatson lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 963156283Srwatson lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 964156283Srwatson ]) 965156283Srwatson fi 966156283Srwatson 967156283Srwatson CPPFLAGS="$save_CPPFLAGS" 968156283Srwatson LDFLAGS="$save_LDFLAGS" 969156283Srwatson LIBS="$save_LIBS" 970156283Srwatson ;; 971156283Srwatson esac 972156283Srwatson 973156283Srwatson case $lt_cv_dlopen_self in 974156283Srwatson yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 975156283Srwatson *) enable_dlopen_self=unknown ;; 976156283Srwatson esac 977156283Srwatson 978156283Srwatson case $lt_cv_dlopen_self_static in 979156283Srwatson yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 980156283Srwatson *) enable_dlopen_self_static=unknown ;; 981156283Srwatson esac 982156283Srwatsonfi 983156283Srwatson])# AC_LIBTOOL_DLOPEN_SELF 984156283Srwatson 985156283Srwatson 986156283Srwatson# AC_LIBTOOL_PROG_CC_C_O([TAGNAME]) 987156283Srwatson# --------------------------------- 988156283Srwatson# Check to see if options -c and -o are simultaneously supported by compiler 989156283SrwatsonAC_DEFUN([AC_LIBTOOL_PROG_CC_C_O], 990156283Srwatson[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl 991156283SrwatsonAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 992156283Srwatson [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 993156283Srwatson [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 994156283Srwatson $rm -r conftest 2>/dev/null 995156283Srwatson mkdir conftest 996156283Srwatson cd conftest 997156283Srwatson mkdir out 998156283Srwatson printf "$lt_simple_compile_test_code" > conftest.$ac_ext 999156283Srwatson 1000156283Srwatson lt_compiler_flag="-o out/conftest2.$ac_objext" 1001156283Srwatson # Insert the option either (1) after the last *FLAGS variable, or 1002156283Srwatson # (2) before a word containing "conftest.", or (3) at the end. 1003156283Srwatson # Note that $ac_compile itself does not contain backslashes and begins 1004156283Srwatson # with a dollar sign (not a hyphen), so the echo should work correctly. 1005156283Srwatson lt_compile=`echo "$ac_compile" | $SED \ 1006156283Srwatson -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 1007156283Srwatson -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 1008156283Srwatson -e 's:$: $lt_compiler_flag:'` 1009156283Srwatson (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 1010156283Srwatson (eval "$lt_compile" 2>out/conftest.err) 1011156283Srwatson ac_status=$? 1012156283Srwatson cat out/conftest.err >&AS_MESSAGE_LOG_FD 1013156283Srwatson echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 1014156283Srwatson if (exit $ac_status) && test -s out/conftest2.$ac_objext 1015156283Srwatson then 1016156283Srwatson # The compiler can only warn and ignore the option if not recognized 1017156283Srwatson # So say no if there are warnings 1018156283Srwatson $echo "X$_lt_compiler_boilerplate" | $Xsed > out/conftest.exp 1019156283Srwatson $SED '/^$/d' out/conftest.err >out/conftest.er2 1020156283Srwatson if test ! -s out/conftest.err || diff out/conftest.exp out/conftest.er2 >/dev/null; then 1021156283Srwatson _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 1022156283Srwatson fi 1023156283Srwatson fi 1024156283Srwatson chmod u+w . 2>&AS_MESSAGE_LOG_FD 1025156283Srwatson $rm conftest* 1026156283Srwatson # SGI C++ compiler will create directory out/ii_files/ for 1027156283Srwatson # template instantiation 1028156283Srwatson test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files 1029156283Srwatson $rm out/* && rmdir out 1030156283Srwatson cd .. 1031156283Srwatson rmdir conftest 1032156283Srwatson $rm conftest* 1033156283Srwatson]) 1034156283Srwatson])# AC_LIBTOOL_PROG_CC_C_O 1035156283Srwatson 1036156283Srwatson 1037156283Srwatson# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME]) 1038156283Srwatson# ----------------------------------------- 1039156283Srwatson# Check to see if we can do hard links to lock some files if needed 1040156283SrwatsonAC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], 1041156283Srwatson[AC_REQUIRE([_LT_AC_LOCK])dnl 1042156283Srwatson 1043156283Srwatsonhard_links="nottested" 1044156283Srwatsonif test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then 1045156283Srwatson # do not overwrite the value of need_locks provided by the user 1046156283Srwatson AC_MSG_CHECKING([if we can lock with hard links]) 1047156283Srwatson hard_links=yes 1048156283Srwatson $rm conftest* 1049156283Srwatson ln conftest.a conftest.b 2>/dev/null && hard_links=no 1050156283Srwatson touch conftest.a 1051156283Srwatson ln conftest.a conftest.b 2>&5 || hard_links=no 1052156283Srwatson ln conftest.a conftest.b 2>/dev/null && hard_links=no 1053156283Srwatson AC_MSG_RESULT([$hard_links]) 1054156283Srwatson if test "$hard_links" = no; then 1055156283Srwatson AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) 1056156283Srwatson need_locks=warn 1057156283Srwatson fi 1058156283Srwatsonelse 1059156283Srwatson need_locks=no 1060156283Srwatsonfi 1061156283Srwatson])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS 1062156283Srwatson 1063156283Srwatson 1064156283Srwatson# AC_LIBTOOL_OBJDIR 1065156283Srwatson# ----------------- 1066156283SrwatsonAC_DEFUN([AC_LIBTOOL_OBJDIR], 1067156283Srwatson[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 1068156283Srwatson[rm -f .libs 2>/dev/null 1069156283Srwatsonmkdir .libs 2>/dev/null 1070156283Srwatsonif test -d .libs; then 1071156283Srwatson lt_cv_objdir=.libs 1072156283Srwatsonelse 1073156283Srwatson # MS-DOS does not allow filenames that begin with a dot. 1074156283Srwatson lt_cv_objdir=_libs 1075156283Srwatsonfi 1076156283Srwatsonrmdir .libs 2>/dev/null]) 1077156283Srwatsonobjdir=$lt_cv_objdir 1078156283Srwatson])# AC_LIBTOOL_OBJDIR 1079156283Srwatson 1080156283Srwatson 1081156283Srwatson# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME]) 1082156283Srwatson# ---------------------------------------------- 1083156283Srwatson# Check hardcoding attributes. 1084156283SrwatsonAC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], 1085156283Srwatson[AC_MSG_CHECKING([how to hardcode library paths into programs]) 1086156283Srwatson_LT_AC_TAGVAR(hardcode_action, $1)= 1087156283Srwatsonif test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \ 1088156283Srwatson test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \ 1089156283Srwatson test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then 1090156283Srwatson 1091156283Srwatson # We can hardcode non-existant directories. 1092156283Srwatson if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no && 1093156283Srwatson # If the only mechanism to avoid hardcoding is shlibpath_var, we 1094156283Srwatson # have to relink, otherwise we might link with an installed library 1095156283Srwatson # when we should be linking with a yet-to-be-installed one 1096156283Srwatson ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no && 1097156283Srwatson test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then 1098156283Srwatson # Linking always hardcodes the temporary library directory. 1099156283Srwatson _LT_AC_TAGVAR(hardcode_action, $1)=relink 1100156283Srwatson else 1101156283Srwatson # We can link without hardcoding, and we can hardcode nonexisting dirs. 1102156283Srwatson _LT_AC_TAGVAR(hardcode_action, $1)=immediate 1103156283Srwatson fi 1104156283Srwatsonelse 1105156283Srwatson # We cannot hardcode anything, or else we can only hardcode existing 1106156283Srwatson # directories. 1107156283Srwatson _LT_AC_TAGVAR(hardcode_action, $1)=unsupported 1108156283Srwatsonfi 1109156283SrwatsonAC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)]) 1110156283Srwatson 1111156283Srwatsonif test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then 1112156283Srwatson # Fast installation is not supported 1113156283Srwatson enable_fast_install=no 1114156283Srwatsonelif test "$shlibpath_overrides_runpath" = yes || 1115156283Srwatson test "$enable_shared" = no; then 1116156283Srwatson # Fast installation is not necessary 1117156283Srwatson enable_fast_install=needless 1118156283Srwatsonfi 1119156283Srwatson])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH 1120156283Srwatson 1121156283Srwatson 1122156283Srwatson# AC_LIBTOOL_SYS_LIB_STRIP 1123156283Srwatson# ------------------------ 1124156283SrwatsonAC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP], 1125156283Srwatson[striplib= 1126156283Srwatsonold_striplib= 1127156283SrwatsonAC_MSG_CHECKING([whether stripping libraries is possible]) 1128156283Srwatsonif test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then 1129156283Srwatson test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" 1130156283Srwatson test -z "$striplib" && striplib="$STRIP --strip-unneeded" 1131156283Srwatson AC_MSG_RESULT([yes]) 1132156283Srwatsonelse 1133156283Srwatson# FIXME - insert some real tests, host_os isn't really good enough 1134156283Srwatson case $host_os in 1135156283Srwatson darwin*) 1136156283Srwatson if test -n "$STRIP" ; then 1137156283Srwatson striplib="$STRIP -x" 1138156283Srwatson AC_MSG_RESULT([yes]) 1139156283Srwatson else 1140156283Srwatson AC_MSG_RESULT([no]) 1141156283Srwatsonfi 1142156283Srwatson ;; 1143156283Srwatson *) 1144156283Srwatson AC_MSG_RESULT([no]) 1145156283Srwatson ;; 1146156283Srwatson esac 1147156283Srwatsonfi 1148156283Srwatson])# AC_LIBTOOL_SYS_LIB_STRIP 1149156283Srwatson 1150156283Srwatson 1151156283Srwatson# AC_LIBTOOL_SYS_DYNAMIC_LINKER 1152156283Srwatson# ----------------------------- 1153156283Srwatson# PORTME Fill in your ld.so characteristics 1154156283SrwatsonAC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER], 1155156283Srwatson[AC_MSG_CHECKING([dynamic linker characteristics]) 1156156283Srwatsonlibrary_names_spec= 1157156283Srwatsonlibname_spec='lib$name' 1158156283Srwatsonsoname_spec= 1159156283Srwatsonshrext_cmds=".so" 1160156283Srwatsonpostinstall_cmds= 1161156283Srwatsonpostuninstall_cmds= 1162156283Srwatsonfinish_cmds= 1163156283Srwatsonfinish_eval= 1164156283Srwatsonshlibpath_var= 1165156283Srwatsonshlibpath_overrides_runpath=unknown 1166156283Srwatsonversion_type=none 1167156283Srwatsondynamic_linker="$host_os ld.so" 1168156283Srwatsonsys_lib_dlsearch_path_spec="/lib /usr/lib" 1169156283Srwatsonif test "$GCC" = yes; then 1170156283Srwatson sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` 1171156283Srwatson if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then 1172156283Srwatson # if the path contains ";" then we assume it to be the separator 1173156283Srwatson # otherwise default to the standard path separator (i.e. ":") - it is 1174156283Srwatson # assumed that no part of a normal pathname contains ";" but that should 1175156283Srwatson # okay in the real world where ";" in dirpaths is itself problematic. 1176156283Srwatson sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 1177156283Srwatson else 1178156283Srwatson sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 1179156283Srwatson fi 1180156283Srwatsonelse 1181156283Srwatson sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 1182156283Srwatsonfi 1183156283Srwatsonneed_lib_prefix=unknown 1184156283Srwatsonhardcode_into_libs=no 1185156283Srwatson 1186156283Srwatson# when you set need_version to no, make sure it does not cause -set_version 1187156283Srwatson# flags to be left without arguments 1188156283Srwatsonneed_version=unknown 1189156283Srwatson 1190156283Srwatsoncase $host_os in 1191156283Srwatsonaix3*) 1192156283Srwatson version_type=linux 1193156283Srwatson library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' 1194156283Srwatson shlibpath_var=LIBPATH 1195156283Srwatson 1196156283Srwatson # AIX 3 has no versioning support, so we append a major version to the name. 1197156283Srwatson soname_spec='${libname}${release}${shared_ext}$major' 1198156283Srwatson ;; 1199156283Srwatson 1200156283Srwatsonaix4* | aix5*) 1201156283Srwatson version_type=linux 1202156283Srwatson need_lib_prefix=no 1203156283Srwatson need_version=no 1204156283Srwatson hardcode_into_libs=yes 1205156283Srwatson if test "$host_cpu" = ia64; then 1206156283Srwatson # AIX 5 supports IA64 1207156283Srwatson library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' 1208156283Srwatson shlibpath_var=LD_LIBRARY_PATH 1209156283Srwatson else 1210156283Srwatson # With GCC up to 2.95.x, collect2 would create an import file 1211156283Srwatson # for dependence libraries. The import file would start with 1212156283Srwatson # the line `#! .'. This would cause the generated library to 1213156283Srwatson # depend on `.', always an invalid library. This was fixed in 1214156283Srwatson # development snapshots of GCC prior to 3.0. 1215156283Srwatson case $host_os in 1216156283Srwatson aix4 | aix4.[[01]] | aix4.[[01]].*) 1217156283Srwatson if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 1218156283Srwatson echo ' yes ' 1219156283Srwatson echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then 1220156283Srwatson : 1221156283Srwatson else 1222156283Srwatson can_build_shared=no 1223156283Srwatson fi 1224156283Srwatson ;; 1225156283Srwatson esac 1226156283Srwatson # AIX (on Power*) has no versioning support, so currently we can not hardcode correct 1227156283Srwatson # soname into executable. Probably we can add versioning support to 1228156283Srwatson # collect2, so additional links can be useful in future. 1229156283Srwatson if test "$aix_use_runtimelinking" = yes; then 1230156283Srwatson # If using run time linking (on AIX 4.2 or later) use lib<name>.so 1231156283Srwatson # instead of lib<name>.a to let people know that these are not 1232156283Srwatson # typical AIX shared libraries. 1233156283Srwatson library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 1234156283Srwatson else 1235156283Srwatson # We preserve .a as extension for shared libraries through AIX4.2 1236156283Srwatson # and later when we are not doing run time linking. 1237156283Srwatson library_names_spec='${libname}${release}.a $libname.a' 1238156283Srwatson soname_spec='${libname}${release}${shared_ext}$major' 1239156283Srwatson fi 1240156283Srwatson shlibpath_var=LIBPATH 1241156283Srwatson fi 1242156283Srwatson ;; 1243156283Srwatson 1244156283Srwatsonamigaos*) 1245156283Srwatson library_names_spec='$libname.ixlibrary $libname.a' 1246156283Srwatson # Create ${libname}_ixlibrary.a entries in /sys/libs. 1247156283Srwatson 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' 1248156283Srwatson ;; 1249156283Srwatson 1250156283Srwatsonbeos*) 1251156283Srwatson library_names_spec='${libname}${shared_ext}' 1252156283Srwatson dynamic_linker="$host_os ld.so" 1253156283Srwatson shlibpath_var=LIBRARY_PATH 1254156283Srwatson ;; 1255156283Srwatson 1256156283Srwatsonbsdi[[45]]*) 1257156283Srwatson version_type=linux 1258156283Srwatson need_version=no 1259156283Srwatson library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 1260156283Srwatson soname_spec='${libname}${release}${shared_ext}$major' 1261156283Srwatson finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 1262156283Srwatson shlibpath_var=LD_LIBRARY_PATH 1263156283Srwatson sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 1264156283Srwatson sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 1265156283Srwatson # the default ld.so.conf also contains /usr/contrib/lib and 1266156283Srwatson # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 1267156283Srwatson # libtool to hard-code these into programs 1268156283Srwatson ;; 1269156283Srwatson 1270156283Srwatsoncygwin* | mingw* | pw32*) 1271156283Srwatson version_type=windows 1272156283Srwatson shrext_cmds=".dll" 1273156283Srwatson need_version=no 1274156283Srwatson need_lib_prefix=no 1275156283Srwatson 1276156283Srwatson case $GCC,$host_os in 1277156283Srwatson yes,cygwin* | yes,mingw* | yes,pw32*) 1278156283Srwatson library_names_spec='$libname.dll.a' 1279156283Srwatson # DLL is installed to $(libdir)/../bin by postinstall_cmds 1280156283Srwatson postinstall_cmds='base_file=`basename \${file}`~ 1281156283Srwatson dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ 1282156283Srwatson dldir=$destdir/`dirname \$dlpath`~ 1283156283Srwatson test -d \$dldir || mkdir -p \$dldir~ 1284156283Srwatson $install_prog $dir/$dlname \$dldir/$dlname~ 1285156283Srwatson chmod a+x \$dldir/$dlname' 1286156283Srwatson postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 1287156283Srwatson dlpath=$dir/\$dldll~ 1288156283Srwatson $rm \$dlpath' 1289156283Srwatson shlibpath_overrides_runpath=yes 1290156283Srwatson 1291156283Srwatson case $host_os in 1292156283Srwatson cygwin*) 1293156283Srwatson # Cygwin DLLs use 'cyg' prefix rather than 'lib' 1294156283Srwatson soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 1295156283Srwatson sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" 1296156283Srwatson ;; 1297156283Srwatson mingw*) 1298156283Srwatson # MinGW DLLs use traditional 'lib' prefix 1299156283Srwatson soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 1300156283Srwatson sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` 1301156283Srwatson if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then 1302156283Srwatson # It is most probably a Windows format PATH printed by 1303156283Srwatson # mingw gcc, but we are running on Cygwin. Gcc prints its search 1304156283Srwatson # path with ; separators, and with drive letters. We can handle the 1305156283Srwatson # drive letters (cygwin fileutils understands them), so leave them, 1306156283Srwatson # especially as we might pass files found there to a mingw objdump, 1307156283Srwatson # which wouldn't understand a cygwinified path. Ahh. 1308156283Srwatson sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 1309156283Srwatson else 1310156283Srwatson sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 1311156283Srwatson fi 1312156283Srwatson ;; 1313156283Srwatson pw32*) 1314156283Srwatson # pw32 DLLs use 'pw' prefix rather than 'lib' 1315156283Srwatson library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 1316156283Srwatson ;; 1317156283Srwatson esac 1318156283Srwatson ;; 1319156283Srwatson 1320156283Srwatson *) 1321156283Srwatson library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' 1322156283Srwatson ;; 1323156283Srwatson esac 1324156283Srwatson dynamic_linker='Win32 ld.exe' 1325156283Srwatson # FIXME: first we should search . and the directory the executable is in 1326156283Srwatson shlibpath_var=PATH 1327156283Srwatson ;; 1328156283Srwatson 1329156283Srwatsondarwin* | rhapsody*) 1330156283Srwatson dynamic_linker="$host_os dyld" 1331156283Srwatson version_type=darwin 1332156283Srwatson need_lib_prefix=no 1333156283Srwatson need_version=no 1334156283Srwatson library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' 1335156283Srwatson soname_spec='${libname}${release}${major}$shared_ext' 1336156283Srwatson shlibpath_overrides_runpath=yes 1337156283Srwatson shlibpath_var=DYLD_LIBRARY_PATH 1338156283Srwatson shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 1339156283Srwatson # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. 1340156283Srwatson if test "$GCC" = yes; then 1341156283Srwatson sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` 1342156283Srwatson else 1343156283Srwatson sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' 1344156283Srwatson fi 1345156283Srwatson sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 1346156283Srwatson ;; 1347156283Srwatson 1348156283Srwatsondgux*) 1349156283Srwatson version_type=linux 1350156283Srwatson need_lib_prefix=no 1351156283Srwatson need_version=no 1352156283Srwatson library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' 1353156283Srwatson soname_spec='${libname}${release}${shared_ext}$major' 1354156283Srwatson shlibpath_var=LD_LIBRARY_PATH 1355156283Srwatson ;; 1356156283Srwatson 1357156283Srwatsonfreebsd1*) 1358156283Srwatson dynamic_linker=no 1359156283Srwatson ;; 1360156283Srwatson 1361156283Srwatsonkfreebsd*-gnu) 1362156283Srwatson version_type=linux 1363156283Srwatson need_lib_prefix=no 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 shlibpath_var=LD_LIBRARY_PATH 1368156283Srwatson shlibpath_overrides_runpath=no 1369156283Srwatson hardcode_into_libs=yes 1370156283Srwatson dynamic_linker='GNU ld.so' 1371156283Srwatson ;; 1372156283Srwatson 1373156283Srwatsonfreebsd* | dragonfly*) 1374156283Srwatson # DragonFly does not have aout. When/if they implement a new 1375156283Srwatson # versioning mechanism, adjust this. 1376156283Srwatson if test -x /usr/bin/objformat; then 1377156283Srwatson objformat=`/usr/bin/objformat` 1378156283Srwatson else 1379156283Srwatson case $host_os in 1380156283Srwatson freebsd[[123]]*) objformat=aout ;; 1381156283Srwatson *) objformat=elf ;; 1382156283Srwatson esac 1383156283Srwatson fi 1384156283Srwatson version_type=freebsd-$objformat 1385156283Srwatson case $version_type in 1386156283Srwatson freebsd-elf*) 1387156283Srwatson library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 1388156283Srwatson need_version=no 1389156283Srwatson need_lib_prefix=no 1390156283Srwatson ;; 1391156283Srwatson freebsd-*) 1392156283Srwatson library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' 1393156283Srwatson need_version=yes 1394156283Srwatson ;; 1395156283Srwatson esac 1396156283Srwatson shlibpath_var=LD_LIBRARY_PATH 1397156283Srwatson case $host_os in 1398156283Srwatson freebsd2*) 1399156283Srwatson shlibpath_overrides_runpath=yes 1400156283Srwatson ;; 1401156283Srwatson freebsd3.[[01]]* | freebsdelf3.[[01]]*) 1402156283Srwatson shlibpath_overrides_runpath=yes 1403156283Srwatson hardcode_into_libs=yes 1404156283Srwatson ;; 1405156283Srwatson *) # from 3.2 on 1406156283Srwatson shlibpath_overrides_runpath=no 1407156283Srwatson hardcode_into_libs=yes 1408156283Srwatson ;; 1409156283Srwatson esac 1410156283Srwatson ;; 1411156283Srwatson 1412156283Srwatsongnu*) 1413156283Srwatson version_type=linux 1414156283Srwatson need_lib_prefix=no 1415156283Srwatson need_version=no 1416156283Srwatson library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 1417156283Srwatson soname_spec='${libname}${release}${shared_ext}$major' 1418156283Srwatson shlibpath_var=LD_LIBRARY_PATH 1419156283Srwatson hardcode_into_libs=yes 1420156283Srwatson ;; 1421156283Srwatson 1422156283Srwatsonhpux9* | hpux10* | hpux11*) 1423156283Srwatson # Give a soname corresponding to the major version so that dld.sl refuses to 1424156283Srwatson # link against other versions. 1425156283Srwatson version_type=sunos 1426156283Srwatson need_lib_prefix=no 1427156283Srwatson need_version=no 1428156283Srwatson case $host_cpu in 1429156283Srwatson ia64*) 1430156283Srwatson shrext_cmds='.so' 1431156283Srwatson hardcode_into_libs=yes 1432156283Srwatson dynamic_linker="$host_os dld.so" 1433156283Srwatson shlibpath_var=LD_LIBRARY_PATH 1434156283Srwatson shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 1435156283Srwatson library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 1436156283Srwatson soname_spec='${libname}${release}${shared_ext}$major' 1437156283Srwatson if test "X$HPUX_IA64_MODE" = X32; then 1438156283Srwatson sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 1439156283Srwatson else 1440156283Srwatson sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 1441156283Srwatson fi 1442156283Srwatson sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 1443156283Srwatson ;; 1444156283Srwatson hppa*64*) 1445156283Srwatson shrext_cmds='.sl' 1446156283Srwatson hardcode_into_libs=yes 1447156283Srwatson dynamic_linker="$host_os dld.sl" 1448156283Srwatson shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 1449156283Srwatson shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 1450156283Srwatson library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 1451156283Srwatson soname_spec='${libname}${release}${shared_ext}$major' 1452156283Srwatson sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 1453156283Srwatson sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 1454156283Srwatson ;; 1455156283Srwatson *) 1456156283Srwatson shrext_cmds='.sl' 1457156283Srwatson dynamic_linker="$host_os dld.sl" 1458156283Srwatson shlibpath_var=SHLIB_PATH 1459156283Srwatson shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 1460156283Srwatson library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 1461156283Srwatson soname_spec='${libname}${release}${shared_ext}$major' 1462156283Srwatson ;; 1463156283Srwatson esac 1464156283Srwatson # HP-UX runs *really* slowly unless shared libraries are mode 555. 1465156283Srwatson postinstall_cmds='chmod 555 $lib' 1466156283Srwatson ;; 1467156283Srwatson 1468156283Srwatsonirix5* | irix6* | nonstopux*) 1469156283Srwatson case $host_os in 1470156283Srwatson nonstopux*) version_type=nonstopux ;; 1471156283Srwatson *) 1472156283Srwatson if test "$lt_cv_prog_gnu_ld" = yes; then 1473156283Srwatson version_type=linux 1474156283Srwatson else 1475156283Srwatson version_type=irix 1476156283Srwatson fi ;; 1477156283Srwatson esac 1478156283Srwatson need_lib_prefix=no 1479156283Srwatson need_version=no 1480156283Srwatson soname_spec='${libname}${release}${shared_ext}$major' 1481156283Srwatson library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' 1482156283Srwatson case $host_os in 1483156283Srwatson irix5* | nonstopux*) 1484156283Srwatson libsuff= shlibsuff= 1485156283Srwatson ;; 1486156283Srwatson *) 1487156283Srwatson case $LD in # libtool.m4 will add one of these switches to LD 1488156283Srwatson *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 1489156283Srwatson libsuff= shlibsuff= libmagic=32-bit;; 1490156283Srwatson *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 1491156283Srwatson libsuff=32 shlibsuff=N32 libmagic=N32;; 1492156283Srwatson *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 1493156283Srwatson libsuff=64 shlibsuff=64 libmagic=64-bit;; 1494156283Srwatson *) libsuff= shlibsuff= libmagic=never-match;; 1495156283Srwatson esac 1496156283Srwatson ;; 1497156283Srwatson esac 1498156283Srwatson shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 1499156283Srwatson shlibpath_overrides_runpath=no 1500156283Srwatson sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" 1501156283Srwatson sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" 1502156283Srwatson hardcode_into_libs=yes 1503156283Srwatson ;; 1504156283Srwatson 1505156283Srwatson# No shared lib support for Linux oldld, aout, or coff. 1506156283Srwatsonlinux*oldld* | linux*aout* | linux*coff*) 1507156283Srwatson dynamic_linker=no 1508156283Srwatson ;; 1509156283Srwatson 1510156283Srwatson# This must be Linux ELF. 1511156283Srwatsonlinux*) 1512156283Srwatson version_type=linux 1513156283Srwatson need_lib_prefix=no 1514156283Srwatson need_version=no 1515156283Srwatson library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 1516156283Srwatson soname_spec='${libname}${release}${shared_ext}$major' 1517156283Srwatson finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 1518156283Srwatson shlibpath_var=LD_LIBRARY_PATH 1519156283Srwatson shlibpath_overrides_runpath=no 1520156283Srwatson # This implies no fast_install, which is unacceptable. 1521156283Srwatson # Some rework will be needed to allow for fast_install 1522156283Srwatson # before this can be enabled. 1523156283Srwatson hardcode_into_libs=yes 1524156283Srwatson 1525156283Srwatson # Append ld.so.conf contents to the search path 1526156283Srwatson if test -f /etc/ld.so.conf; then 1527156283Srwatson lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` 1528156283Srwatson sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" 1529156283Srwatson fi 1530156283Srwatson 1531156283Srwatson # We used to test for /lib/ld.so.1 and disable shared libraries on 1532156283Srwatson # powerpc, because MkLinux only supported shared libraries with the 1533156283Srwatson # GNU dynamic linker. Since this was broken with cross compilers, 1534156283Srwatson # most powerpc-linux boxes support dynamic linking these days and 1535156283Srwatson # people can always --disable-shared, the test was removed, and we 1536156283Srwatson # assume the GNU/Linux dynamic linker is in use. 1537156283Srwatson dynamic_linker='GNU/Linux ld.so' 1538156283Srwatson ;; 1539156283Srwatson 1540156283Srwatsonknetbsd*-gnu) 1541156283Srwatson version_type=linux 1542156283Srwatson need_lib_prefix=no 1543156283Srwatson need_version=no 1544156283Srwatson library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 1545156283Srwatson soname_spec='${libname}${release}${shared_ext}$major' 1546156283Srwatson shlibpath_var=LD_LIBRARY_PATH 1547156283Srwatson shlibpath_overrides_runpath=no 1548156283Srwatson hardcode_into_libs=yes 1549156283Srwatson dynamic_linker='GNU ld.so' 1550156283Srwatson ;; 1551156283Srwatson 1552156283Srwatsonnetbsd*) 1553156283Srwatson version_type=sunos 1554156283Srwatson need_lib_prefix=no 1555156283Srwatson need_version=no 1556156283Srwatson if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then 1557156283Srwatson library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 1558156283Srwatson finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 1559156283Srwatson dynamic_linker='NetBSD (a.out) ld.so' 1560156283Srwatson else 1561156283Srwatson library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 1562156283Srwatson soname_spec='${libname}${release}${shared_ext}$major' 1563156283Srwatson dynamic_linker='NetBSD ld.elf_so' 1564156283Srwatson fi 1565156283Srwatson shlibpath_var=LD_LIBRARY_PATH 1566156283Srwatson shlibpath_overrides_runpath=yes 1567156283Srwatson hardcode_into_libs=yes 1568156283Srwatson ;; 1569156283Srwatson 1570156283Srwatsonnewsos6) 1571156283Srwatson version_type=linux 1572156283Srwatson library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 1573156283Srwatson shlibpath_var=LD_LIBRARY_PATH 1574156283Srwatson shlibpath_overrides_runpath=yes 1575156283Srwatson ;; 1576156283Srwatson 1577156283Srwatsonnto-qnx*) 1578156283Srwatson version_type=linux 1579156283Srwatson need_lib_prefix=no 1580156283Srwatson need_version=no 1581156283Srwatson library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 1582156283Srwatson soname_spec='${libname}${release}${shared_ext}$major' 1583156283Srwatson shlibpath_var=LD_LIBRARY_PATH 1584156283Srwatson shlibpath_overrides_runpath=yes 1585156283Srwatson ;; 1586156283Srwatson 1587156283Srwatsonopenbsd*) 1588156283Srwatson version_type=sunos 1589156283Srwatson need_lib_prefix=no 1590156283Srwatson # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. 1591156283Srwatson case $host_os in 1592156283Srwatson openbsd3.3 | openbsd3.3.*) need_version=yes ;; 1593156283Srwatson *) need_version=no ;; 1594156283Srwatson esac 1595156283Srwatson library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 1596156283Srwatson finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 1597156283Srwatson shlibpath_var=LD_LIBRARY_PATH 1598156283Srwatson if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 1599156283Srwatson case $host_os in 1600156283Srwatson openbsd2.[[89]] | openbsd2.[[89]].*) 1601156283Srwatson shlibpath_overrides_runpath=no 1602156283Srwatson ;; 1603156283Srwatson *) 1604156283Srwatson shlibpath_overrides_runpath=yes 1605156283Srwatson ;; 1606156283Srwatson esac 1607156283Srwatson else 1608156283Srwatson shlibpath_overrides_runpath=yes 1609156283Srwatson fi 1610156283Srwatson ;; 1611156283Srwatson 1612156283Srwatsonos2*) 1613156283Srwatson libname_spec='$name' 1614156283Srwatson shrext_cmds=".dll" 1615156283Srwatson need_lib_prefix=no 1616156283Srwatson library_names_spec='$libname${shared_ext} $libname.a' 1617156283Srwatson dynamic_linker='OS/2 ld.exe' 1618156283Srwatson shlibpath_var=LIBPATH 1619156283Srwatson ;; 1620156283Srwatson 1621156283Srwatsonosf3* | osf4* | osf5*) 1622156283Srwatson version_type=osf 1623156283Srwatson need_lib_prefix=no 1624156283Srwatson need_version=no 1625156283Srwatson soname_spec='${libname}${release}${shared_ext}$major' 1626156283Srwatson library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 1627156283Srwatson shlibpath_var=LD_LIBRARY_PATH 1628156283Srwatson sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 1629156283Srwatson sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" 1630156283Srwatson ;; 1631156283Srwatson 1632156283Srwatsonsco3.2v5*) 1633156283Srwatson version_type=osf 1634156283Srwatson soname_spec='${libname}${release}${shared_ext}$major' 1635156283Srwatson library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 1636156283Srwatson shlibpath_var=LD_LIBRARY_PATH 1637156283Srwatson ;; 1638156283Srwatson 1639156283Srwatsonsolaris*) 1640156283Srwatson version_type=linux 1641156283Srwatson need_lib_prefix=no 1642156283Srwatson need_version=no 1643156283Srwatson library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 1644156283Srwatson soname_spec='${libname}${release}${shared_ext}$major' 1645156283Srwatson shlibpath_var=LD_LIBRARY_PATH 1646156283Srwatson shlibpath_overrides_runpath=yes 1647156283Srwatson hardcode_into_libs=yes 1648156283Srwatson # ldd complains unless libraries are executable 1649156283Srwatson postinstall_cmds='chmod +x $lib' 1650156283Srwatson ;; 1651156283Srwatson 1652156283Srwatsonsunos4*) 1653156283Srwatson version_type=sunos 1654156283Srwatson library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 1655156283Srwatson finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 1656156283Srwatson shlibpath_var=LD_LIBRARY_PATH 1657156283Srwatson shlibpath_overrides_runpath=yes 1658156283Srwatson if test "$with_gnu_ld" = yes; then 1659156283Srwatson need_lib_prefix=no 1660156283Srwatson fi 1661156283Srwatson need_version=yes 1662156283Srwatson ;; 1663156283Srwatson 1664156283Srwatsonsysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 1665156283Srwatson version_type=linux 1666156283Srwatson library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 1667156283Srwatson soname_spec='${libname}${release}${shared_ext}$major' 1668156283Srwatson shlibpath_var=LD_LIBRARY_PATH 1669156283Srwatson case $host_vendor in 1670156283Srwatson sni) 1671156283Srwatson shlibpath_overrides_runpath=no 1672156283Srwatson need_lib_prefix=no 1673156283Srwatson export_dynamic_flag_spec='${wl}-Blargedynsym' 1674156283Srwatson runpath_var=LD_RUN_PATH 1675156283Srwatson ;; 1676156283Srwatson siemens) 1677156283Srwatson need_lib_prefix=no 1678156283Srwatson ;; 1679156283Srwatson motorola) 1680156283Srwatson need_lib_prefix=no 1681156283Srwatson need_version=no 1682156283Srwatson shlibpath_overrides_runpath=no 1683156283Srwatson sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 1684156283Srwatson ;; 1685156283Srwatson esac 1686156283Srwatson ;; 1687156283Srwatson 1688156283Srwatsonsysv4*MP*) 1689156283Srwatson if test -d /usr/nec ;then 1690156283Srwatson version_type=linux 1691156283Srwatson library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' 1692156283Srwatson soname_spec='$libname${shared_ext}.$major' 1693156283Srwatson shlibpath_var=LD_LIBRARY_PATH 1694156283Srwatson fi 1695156283Srwatson ;; 1696156283Srwatson 1697156283Srwatsonuts4*) 1698156283Srwatson version_type=linux 1699156283Srwatson library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 1700156283Srwatson soname_spec='${libname}${release}${shared_ext}$major' 1701156283Srwatson shlibpath_var=LD_LIBRARY_PATH 1702156283Srwatson ;; 1703156283Srwatson 1704156283Srwatson*) 1705156283Srwatson dynamic_linker=no 1706156283Srwatson ;; 1707156283Srwatsonesac 1708156283SrwatsonAC_MSG_RESULT([$dynamic_linker]) 1709156283Srwatsontest "$dynamic_linker" = no && can_build_shared=no 1710156283Srwatson])# AC_LIBTOOL_SYS_DYNAMIC_LINKER 1711156283Srwatson 1712156283Srwatson 1713156283Srwatson# _LT_AC_TAGCONFIG 1714156283Srwatson# ---------------- 1715156283SrwatsonAC_DEFUN([_LT_AC_TAGCONFIG], 1716156283Srwatson[AC_ARG_WITH([tags], 1717156283Srwatson [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@], 1718156283Srwatson [include additional configurations @<:@automatic@:>@])], 1719156283Srwatson [tagnames="$withval"]) 1720156283Srwatson 1721156283Srwatsonif test -f "$ltmain" && test -n "$tagnames"; then 1722156283Srwatson if test ! -f "${ofile}"; then 1723156283Srwatson AC_MSG_WARN([output file `$ofile' does not exist]) 1724156283Srwatson fi 1725156283Srwatson 1726156283Srwatson if test -z "$LTCC"; then 1727156283Srwatson eval "`$SHELL ${ofile} --config | grep '^LTCC='`" 1728156283Srwatson if test -z "$LTCC"; then 1729156283Srwatson AC_MSG_WARN([output file `$ofile' does not look like a libtool script]) 1730156283Srwatson else 1731156283Srwatson AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile']) 1732156283Srwatson fi 1733156283Srwatson fi 1734156283Srwatson 1735156283Srwatson # Extract list of available tagged configurations in $ofile. 1736156283Srwatson # Note that this assumes the entire list is on one line. 1737156283Srwatson available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` 1738156283Srwatson 1739156283Srwatson lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 1740156283Srwatson for tagname in $tagnames; do 1741156283Srwatson IFS="$lt_save_ifs" 1742156283Srwatson # Check whether tagname contains only valid characters 1743156283Srwatson case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in 1744156283Srwatson "") ;; 1745156283Srwatson *) AC_MSG_ERROR([invalid tag name: $tagname]) 1746156283Srwatson ;; 1747156283Srwatson esac 1748156283Srwatson 1749156283Srwatson if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null 1750156283Srwatson then 1751156283Srwatson AC_MSG_ERROR([tag name \"$tagname\" already exists]) 1752156283Srwatson fi 1753156283Srwatson 1754156283Srwatson # Update the list of available tags. 1755156283Srwatson if test -n "$tagname"; then 1756156283Srwatson echo appending configuration tag \"$tagname\" to $ofile 1757156283Srwatson 1758156283Srwatson case $tagname in 1759156283Srwatson CXX) 1760156283Srwatson if test -n "$CXX" && ( test "X$CXX" != "Xno" && 1761156283Srwatson ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || 1762156283Srwatson (test "X$CXX" != "Xg++"))) ; then 1763156283Srwatson AC_LIBTOOL_LANG_CXX_CONFIG 1764156283Srwatson else 1765156283Srwatson tagname="" 1766156283Srwatson fi 1767156283Srwatson ;; 1768156283Srwatson 1769156283Srwatson F77) 1770156283Srwatson if test -n "$F77" && test "X$F77" != "Xno"; then 1771156283Srwatson AC_LIBTOOL_LANG_F77_CONFIG 1772156283Srwatson else 1773156283Srwatson tagname="" 1774156283Srwatson fi 1775156283Srwatson ;; 1776156283Srwatson 1777156283Srwatson GCJ) 1778156283Srwatson if test -n "$GCJ" && test "X$GCJ" != "Xno"; then 1779156283Srwatson AC_LIBTOOL_LANG_GCJ_CONFIG 1780156283Srwatson else 1781156283Srwatson tagname="" 1782156283Srwatson fi 1783156283Srwatson ;; 1784156283Srwatson 1785156283Srwatson RC) 1786156283Srwatson AC_LIBTOOL_LANG_RC_CONFIG 1787156283Srwatson ;; 1788156283Srwatson 1789156283Srwatson *) 1790156283Srwatson AC_MSG_ERROR([Unsupported tag name: $tagname]) 1791156283Srwatson ;; 1792156283Srwatson esac 1793156283Srwatson 1794156283Srwatson # Append the new tag name to the list of available tags. 1795156283Srwatson if test -n "$tagname" ; then 1796156283Srwatson available_tags="$available_tags $tagname" 1797156283Srwatson fi 1798156283Srwatson fi 1799156283Srwatson done 1800156283Srwatson IFS="$lt_save_ifs" 1801156283Srwatson 1802156283Srwatson # Now substitute the updated list of available tags. 1803156283Srwatson if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then 1804156283Srwatson mv "${ofile}T" "$ofile" 1805156283Srwatson chmod +x "$ofile" 1806156283Srwatson else 1807156283Srwatson rm -f "${ofile}T" 1808156283Srwatson AC_MSG_ERROR([unable to update list of available tagged configurations.]) 1809156283Srwatson fi 1810156283Srwatsonfi 1811156283Srwatson])# _LT_AC_TAGCONFIG 1812156283Srwatson 1813156283Srwatson 1814156283Srwatson# AC_LIBTOOL_DLOPEN 1815156283Srwatson# ----------------- 1816156283Srwatson# enable checks for dlopen support 1817156283SrwatsonAC_DEFUN([AC_LIBTOOL_DLOPEN], 1818156283Srwatson [AC_BEFORE([$0],[AC_LIBTOOL_SETUP]) 1819156283Srwatson])# AC_LIBTOOL_DLOPEN 1820156283Srwatson 1821156283Srwatson 1822156283Srwatson# AC_LIBTOOL_WIN32_DLL 1823156283Srwatson# -------------------- 1824156283Srwatson# declare package support for building win32 DLLs 1825156283SrwatsonAC_DEFUN([AC_LIBTOOL_WIN32_DLL], 1826156283Srwatson[AC_BEFORE([$0], [AC_LIBTOOL_SETUP]) 1827156283Srwatson])# AC_LIBTOOL_WIN32_DLL 1828156283Srwatson 1829156283Srwatson 1830156283Srwatson# AC_ENABLE_SHARED([DEFAULT]) 1831156283Srwatson# --------------------------- 1832156283Srwatson# implement the --enable-shared flag 1833156283Srwatson# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 1834156283SrwatsonAC_DEFUN([AC_ENABLE_SHARED], 1835156283Srwatson[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl 1836156283SrwatsonAC_ARG_ENABLE([shared], 1837156283Srwatson [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 1838156283Srwatson [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])], 1839156283Srwatson [p=${PACKAGE-default} 1840156283Srwatson case $enableval in 1841156283Srwatson yes) enable_shared=yes ;; 1842156283Srwatson no) enable_shared=no ;; 1843156283Srwatson *) 1844156283Srwatson enable_shared=no 1845156283Srwatson # Look at the argument we got. We use all the common list separators. 1846156283Srwatson lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 1847156283Srwatson for pkg in $enableval; do 1848156283Srwatson IFS="$lt_save_ifs" 1849156283Srwatson if test "X$pkg" = "X$p"; then 1850156283Srwatson enable_shared=yes 1851156283Srwatson fi 1852156283Srwatson done 1853156283Srwatson IFS="$lt_save_ifs" 1854156283Srwatson ;; 1855156283Srwatson esac], 1856156283Srwatson [enable_shared=]AC_ENABLE_SHARED_DEFAULT) 1857156283Srwatson])# AC_ENABLE_SHARED 1858156283Srwatson 1859156283Srwatson 1860156283Srwatson# AC_DISABLE_SHARED 1861156283Srwatson# ----------------- 1862156283Srwatson#- set the default shared flag to --disable-shared 1863156283SrwatsonAC_DEFUN([AC_DISABLE_SHARED], 1864156283Srwatson[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 1865156283SrwatsonAC_ENABLE_SHARED(no) 1866156283Srwatson])# AC_DISABLE_SHARED 1867156283Srwatson 1868156283Srwatson 1869156283Srwatson# AC_ENABLE_STATIC([DEFAULT]) 1870156283Srwatson# --------------------------- 1871156283Srwatson# implement the --enable-static flag 1872156283Srwatson# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 1873156283SrwatsonAC_DEFUN([AC_ENABLE_STATIC], 1874156283Srwatson[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl 1875156283SrwatsonAC_ARG_ENABLE([static], 1876156283Srwatson [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@], 1877156283Srwatson [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])], 1878156283Srwatson [p=${PACKAGE-default} 1879156283Srwatson case $enableval in 1880156283Srwatson yes) enable_static=yes ;; 1881156283Srwatson no) enable_static=no ;; 1882156283Srwatson *) 1883156283Srwatson enable_static=no 1884156283Srwatson # Look at the argument we got. We use all the common list separators. 1885156283Srwatson lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 1886156283Srwatson for pkg in $enableval; do 1887156283Srwatson IFS="$lt_save_ifs" 1888156283Srwatson if test "X$pkg" = "X$p"; then 1889156283Srwatson enable_static=yes 1890156283Srwatson fi 1891156283Srwatson done 1892156283Srwatson IFS="$lt_save_ifs" 1893156283Srwatson ;; 1894156283Srwatson esac], 1895156283Srwatson [enable_static=]AC_ENABLE_STATIC_DEFAULT) 1896156283Srwatson])# AC_ENABLE_STATIC 1897156283Srwatson 1898156283Srwatson 1899156283Srwatson# AC_DISABLE_STATIC 1900156283Srwatson# ----------------- 1901156283Srwatson# set the default static flag to --disable-static 1902156283SrwatsonAC_DEFUN([AC_DISABLE_STATIC], 1903156283Srwatson[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 1904156283SrwatsonAC_ENABLE_STATIC(no) 1905156283Srwatson])# AC_DISABLE_STATIC 1906156283Srwatson 1907156283Srwatson 1908156283Srwatson# AC_ENABLE_FAST_INSTALL([DEFAULT]) 1909156283Srwatson# --------------------------------- 1910156283Srwatson# implement the --enable-fast-install flag 1911156283Srwatson# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 1912156283SrwatsonAC_DEFUN([AC_ENABLE_FAST_INSTALL], 1913156283Srwatson[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl 1914156283SrwatsonAC_ARG_ENABLE([fast-install], 1915156283Srwatson [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 1916156283Srwatson [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 1917156283Srwatson [p=${PACKAGE-default} 1918156283Srwatson case $enableval in 1919156283Srwatson yes) enable_fast_install=yes ;; 1920156283Srwatson no) enable_fast_install=no ;; 1921156283Srwatson *) 1922156283Srwatson enable_fast_install=no 1923156283Srwatson # Look at the argument we got. We use all the common list separators. 1924156283Srwatson lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 1925156283Srwatson for pkg in $enableval; do 1926156283Srwatson IFS="$lt_save_ifs" 1927156283Srwatson if test "X$pkg" = "X$p"; then 1928156283Srwatson enable_fast_install=yes 1929156283Srwatson fi 1930156283Srwatson done 1931156283Srwatson IFS="$lt_save_ifs" 1932156283Srwatson ;; 1933156283Srwatson esac], 1934156283Srwatson [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT) 1935156283Srwatson])# AC_ENABLE_FAST_INSTALL 1936156283Srwatson 1937156283Srwatson 1938156283Srwatson# AC_DISABLE_FAST_INSTALL 1939156283Srwatson# ----------------------- 1940156283Srwatson# set the default to --disable-fast-install 1941156283SrwatsonAC_DEFUN([AC_DISABLE_FAST_INSTALL], 1942156283Srwatson[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 1943156283SrwatsonAC_ENABLE_FAST_INSTALL(no) 1944156283Srwatson])# AC_DISABLE_FAST_INSTALL 1945156283Srwatson 1946156283Srwatson 1947156283Srwatson# AC_LIBTOOL_PICMODE([MODE]) 1948156283Srwatson# -------------------------- 1949156283Srwatson# implement the --with-pic flag 1950156283Srwatson# MODE is either `yes' or `no'. If omitted, it defaults to `both'. 1951156283SrwatsonAC_DEFUN([AC_LIBTOOL_PICMODE], 1952156283Srwatson[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 1953156283Srwatsonpic_mode=ifelse($#,1,$1,default) 1954156283Srwatson])# AC_LIBTOOL_PICMODE 1955156283Srwatson 1956156283Srwatson 1957156283Srwatson# AC_PROG_EGREP 1958156283Srwatson# ------------- 1959156283Srwatson# This is predefined starting with Autoconf 2.54, so this conditional 1960156283Srwatson# definition can be removed once we require Autoconf 2.54 or later. 1961156283Srwatsonm4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP], 1962156283Srwatson[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep], 1963156283Srwatson [if echo a | (grep -E '(a|b)') >/dev/null 2>&1 1964156283Srwatson then ac_cv_prog_egrep='grep -E' 1965156283Srwatson else ac_cv_prog_egrep='egrep' 1966156283Srwatson fi]) 1967156283Srwatson EGREP=$ac_cv_prog_egrep 1968156283Srwatson AC_SUBST([EGREP]) 1969156283Srwatson])]) 1970156283Srwatson 1971156283Srwatson 1972156283Srwatson# AC_PATH_TOOL_PREFIX 1973156283Srwatson# ------------------- 1974156283Srwatson# find a file program which can recognise shared library 1975156283SrwatsonAC_DEFUN([AC_PATH_TOOL_PREFIX], 1976156283Srwatson[AC_REQUIRE([AC_PROG_EGREP])dnl 1977156283SrwatsonAC_MSG_CHECKING([for $1]) 1978156283SrwatsonAC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 1979156283Srwatson[case $MAGIC_CMD in 1980156283Srwatson[[\\/*] | ?:[\\/]*]) 1981156283Srwatson lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. 1982156283Srwatson ;; 1983156283Srwatson*) 1984156283Srwatson lt_save_MAGIC_CMD="$MAGIC_CMD" 1985156283Srwatson lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 1986156283Srwatsondnl $ac_dummy forces splitting on constant user-supplied paths. 1987156283Srwatsondnl POSIX.2 word splitting is done only on the output of word expansions, 1988156283Srwatsondnl not every word. This closes a longstanding sh security hole. 1989156283Srwatson ac_dummy="ifelse([$2], , $PATH, [$2])" 1990156283Srwatson for ac_dir in $ac_dummy; do 1991156283Srwatson IFS="$lt_save_ifs" 1992156283Srwatson test -z "$ac_dir" && ac_dir=. 1993156283Srwatson if test -f $ac_dir/$1; then 1994156283Srwatson lt_cv_path_MAGIC_CMD="$ac_dir/$1" 1995156283Srwatson if test -n "$file_magic_test_file"; then 1996156283Srwatson case $deplibs_check_method in 1997156283Srwatson "file_magic "*) 1998156283Srwatson file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 1999156283Srwatson MAGIC_CMD="$lt_cv_path_MAGIC_CMD" 2000156283Srwatson if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 2001156283Srwatson $EGREP "$file_magic_regex" > /dev/null; then 2002156283Srwatson : 2003156283Srwatson else 2004156283Srwatson cat <<EOF 1>&2 2005156283Srwatson 2006156283Srwatson*** Warning: the command libtool uses to detect shared libraries, 2007156283Srwatson*** $file_magic_cmd, produces output that libtool cannot recognize. 2008156283Srwatson*** The result is that libtool may fail to recognize shared libraries 2009156283Srwatson*** as such. This will affect the creation of libtool libraries that 2010156283Srwatson*** depend on shared libraries, but programs linked with such libtool 2011156283Srwatson*** libraries will work regardless of this problem. Nevertheless, you 2012156283Srwatson*** may want to report the problem to your system manager and/or to 2013156283Srwatson*** bug-libtool@gnu.org 2014156283Srwatson 2015156283SrwatsonEOF 2016156283Srwatson fi ;; 2017156283Srwatson esac 2018156283Srwatson fi 2019156283Srwatson break 2020156283Srwatson fi 2021156283Srwatson done 2022156283Srwatson IFS="$lt_save_ifs" 2023156283Srwatson MAGIC_CMD="$lt_save_MAGIC_CMD" 2024156283Srwatson ;; 2025156283Srwatsonesac]) 2026156283SrwatsonMAGIC_CMD="$lt_cv_path_MAGIC_CMD" 2027156283Srwatsonif test -n "$MAGIC_CMD"; then 2028156283Srwatson AC_MSG_RESULT($MAGIC_CMD) 2029156283Srwatsonelse 2030156283Srwatson AC_MSG_RESULT(no) 2031156283Srwatsonfi 2032156283Srwatson])# AC_PATH_TOOL_PREFIX 2033156283Srwatson 2034156283Srwatson 2035156283Srwatson# AC_PATH_MAGIC 2036156283Srwatson# ------------- 2037156283Srwatson# find a file program which can recognise a shared library 2038156283SrwatsonAC_DEFUN([AC_PATH_MAGIC], 2039156283Srwatson[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 2040156283Srwatsonif test -z "$lt_cv_path_MAGIC_CMD"; then 2041156283Srwatson if test -n "$ac_tool_prefix"; then 2042156283Srwatson AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 2043156283Srwatson else 2044156283Srwatson MAGIC_CMD=: 2045156283Srwatson fi 2046156283Srwatsonfi 2047156283Srwatson])# AC_PATH_MAGIC 2048156283Srwatson 2049156283Srwatson 2050156283Srwatson# AC_PROG_LD 2051156283Srwatson# ---------- 2052156283Srwatson# find the pathname to the GNU or non-GNU linker 2053156283SrwatsonAC_DEFUN([AC_PROG_LD], 2054156283Srwatson[AC_ARG_WITH([gnu-ld], 2055156283Srwatson [AC_HELP_STRING([--with-gnu-ld], 2056156283Srwatson [assume the C compiler uses GNU ld @<:@default=no@:>@])], 2057156283Srwatson [test "$withval" = no || with_gnu_ld=yes], 2058156283Srwatson [with_gnu_ld=no]) 2059156283SrwatsonAC_REQUIRE([LT_AC_PROG_SED])dnl 2060156283SrwatsonAC_REQUIRE([AC_PROG_CC])dnl 2061156283SrwatsonAC_REQUIRE([AC_CANONICAL_HOST])dnl 2062156283SrwatsonAC_REQUIRE([AC_CANONICAL_BUILD])dnl 2063156283Srwatsonac_prog=ld 2064156283Srwatsonif test "$GCC" = yes; then 2065156283Srwatson # Check if gcc -print-prog-name=ld gives a path. 2066156283Srwatson AC_MSG_CHECKING([for ld used by $CC]) 2067156283Srwatson case $host in 2068156283Srwatson *-*-mingw*) 2069156283Srwatson # gcc leaves a trailing carriage return which upsets mingw 2070156283Srwatson ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 2071156283Srwatson *) 2072156283Srwatson ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 2073156283Srwatson esac 2074156283Srwatson case $ac_prog in 2075156283Srwatson # Accept absolute paths. 2076156283Srwatson [[\\/]]* | ?:[[\\/]]*) 2077156283Srwatson re_direlt='/[[^/]][[^/]]*/\.\./' 2078156283Srwatson # Canonicalize the pathname of ld 2079156283Srwatson ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` 2080156283Srwatson while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do 2081156283Srwatson ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` 2082156283Srwatson done 2083156283Srwatson test -z "$LD" && LD="$ac_prog" 2084156283Srwatson ;; 2085156283Srwatson "") 2086156283Srwatson # If it fails, then pretend we aren't using GCC. 2087156283Srwatson ac_prog=ld 2088156283Srwatson ;; 2089156283Srwatson *) 2090156283Srwatson # If it is relative, then search for the first ld in PATH. 2091156283Srwatson with_gnu_ld=unknown 2092156283Srwatson ;; 2093156283Srwatson esac 2094156283Srwatsonelif test "$with_gnu_ld" = yes; then 2095156283Srwatson AC_MSG_CHECKING([for GNU ld]) 2096156283Srwatsonelse 2097156283Srwatson AC_MSG_CHECKING([for non-GNU ld]) 2098156283Srwatsonfi 2099156283SrwatsonAC_CACHE_VAL(lt_cv_path_LD, 2100156283Srwatson[if test -z "$LD"; then 2101156283Srwatson lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 2102156283Srwatson for ac_dir in $PATH; do 2103156283Srwatson IFS="$lt_save_ifs" 2104156283Srwatson test -z "$ac_dir" && ac_dir=. 2105156283Srwatson if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 2106156283Srwatson lt_cv_path_LD="$ac_dir/$ac_prog" 2107156283Srwatson # Check to see if the program is GNU ld. I'd rather use --version, 2108156283Srwatson # but apparently some variants of GNU ld only accept -v. 2109156283Srwatson # Break only if it was the GNU/non-GNU ld that we prefer. 2110156283Srwatson case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 2111156283Srwatson *GNU* | *'with BFD'*) 2112156283Srwatson test "$with_gnu_ld" != no && break 2113156283Srwatson ;; 2114156283Srwatson *) 2115156283Srwatson test "$with_gnu_ld" != yes && break 2116156283Srwatson ;; 2117156283Srwatson esac 2118156283Srwatson fi 2119156283Srwatson done 2120156283Srwatson IFS="$lt_save_ifs" 2121156283Srwatsonelse 2122156283Srwatson lt_cv_path_LD="$LD" # Let the user override the test with a path. 2123156283Srwatsonfi]) 2124156283SrwatsonLD="$lt_cv_path_LD" 2125156283Srwatsonif test -n "$LD"; then 2126156283Srwatson AC_MSG_RESULT($LD) 2127156283Srwatsonelse 2128156283Srwatson AC_MSG_RESULT(no) 2129156283Srwatsonfi 2130156283Srwatsontest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 2131156283SrwatsonAC_PROG_LD_GNU 2132156283Srwatson])# AC_PROG_LD 2133156283Srwatson 2134156283Srwatson 2135156283Srwatson# AC_PROG_LD_GNU 2136156283Srwatson# -------------- 2137156283SrwatsonAC_DEFUN([AC_PROG_LD_GNU], 2138156283Srwatson[AC_REQUIRE([AC_PROG_EGREP])dnl 2139156283SrwatsonAC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 2140156283Srwatson[# I'd rather use --version here, but apparently some GNU lds only accept -v. 2141156283Srwatsoncase `$LD -v 2>&1 </dev/null` in 2142156283Srwatson*GNU* | *'with BFD'*) 2143156283Srwatson lt_cv_prog_gnu_ld=yes 2144156283Srwatson ;; 2145156283Srwatson*) 2146156283Srwatson lt_cv_prog_gnu_ld=no 2147156283Srwatson ;; 2148156283Srwatsonesac]) 2149156283Srwatsonwith_gnu_ld=$lt_cv_prog_gnu_ld 2150156283Srwatson])# AC_PROG_LD_GNU 2151156283Srwatson 2152156283Srwatson 2153156283Srwatson# AC_PROG_LD_RELOAD_FLAG 2154156283Srwatson# ---------------------- 2155156283Srwatson# find reload flag for linker 2156156283Srwatson# -- PORTME Some linkers may need a different reload flag. 2157156283SrwatsonAC_DEFUN([AC_PROG_LD_RELOAD_FLAG], 2158156283Srwatson[AC_CACHE_CHECK([for $LD option to reload object files], 2159156283Srwatson lt_cv_ld_reload_flag, 2160156283Srwatson [lt_cv_ld_reload_flag='-r']) 2161156283Srwatsonreload_flag=$lt_cv_ld_reload_flag 2162156283Srwatsoncase $reload_flag in 2163156283Srwatson"" | " "*) ;; 2164156283Srwatson*) reload_flag=" $reload_flag" ;; 2165156283Srwatsonesac 2166156283Srwatsonreload_cmds='$LD$reload_flag -o $output$reload_objs' 2167156283Srwatsoncase $host_os in 2168156283Srwatson darwin*) 2169156283Srwatson if test "$GCC" = yes; then 2170156283Srwatson reload_cmds='$CC -nostdlib ${wl}-r -o $output$reload_objs' 2171156283Srwatson else 2172156283Srwatson reload_cmds='$LD$reload_flag -o $output$reload_objs' 2173156283Srwatson fi 2174156283Srwatson ;; 2175156283Srwatsonesac 2176156283Srwatson])# AC_PROG_LD_RELOAD_FLAG 2177156283Srwatson 2178156283Srwatson 2179156283Srwatson# AC_DEPLIBS_CHECK_METHOD 2180156283Srwatson# ----------------------- 2181156283Srwatson# how to check for library dependencies 2182156283Srwatson# -- PORTME fill in with the dynamic library characteristics 2183156283SrwatsonAC_DEFUN([AC_DEPLIBS_CHECK_METHOD], 2184156283Srwatson[AC_CACHE_CHECK([how to recognise dependent libraries], 2185156283Srwatsonlt_cv_deplibs_check_method, 2186156283Srwatson[lt_cv_file_magic_cmd='$MAGIC_CMD' 2187156283Srwatsonlt_cv_file_magic_test_file= 2188156283Srwatsonlt_cv_deplibs_check_method='unknown' 2189156283Srwatson# Need to set the preceding variable on all platforms that support 2190156283Srwatson# interlibrary dependencies. 2191156283Srwatson# 'none' -- dependencies not supported. 2192156283Srwatson# `unknown' -- same as none, but documents that we really don't know. 2193156283Srwatson# 'pass_all' -- all dependencies passed with no checks. 2194156283Srwatson# 'test_compile' -- check by making test program. 2195156283Srwatson# 'file_magic [[regex]]' -- check by looking for files in library path 2196156283Srwatson# which responds to the $file_magic_cmd with a given extended regex. 2197156283Srwatson# If you have `file' or equivalent on your system and you're not sure 2198156283Srwatson# whether `pass_all' will *always* work, you probably want this one. 2199156283Srwatson 2200156283Srwatsoncase $host_os in 2201156283Srwatsonaix4* | aix5*) 2202156283Srwatson lt_cv_deplibs_check_method=pass_all 2203156283Srwatson ;; 2204156283Srwatson 2205156283Srwatsonbeos*) 2206156283Srwatson lt_cv_deplibs_check_method=pass_all 2207156283Srwatson ;; 2208156283Srwatson 2209156283Srwatsonbsdi[[45]]*) 2210156283Srwatson lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 2211156283Srwatson lt_cv_file_magic_cmd='/usr/bin/file -L' 2212156283Srwatson lt_cv_file_magic_test_file=/shlib/libc.so 2213156283Srwatson ;; 2214156283Srwatson 2215156283Srwatsoncygwin*) 2216156283Srwatson # func_win32_libid is a shell function defined in ltmain.sh 2217156283Srwatson lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 2218156283Srwatson lt_cv_file_magic_cmd='func_win32_libid' 2219156283Srwatson ;; 2220156283Srwatson 2221156283Srwatsonmingw* | pw32*) 2222156283Srwatson # Base MSYS/MinGW do not provide the 'file' command needed by 2223156283Srwatson # func_win32_libid shell function, so use a weaker test based on 'objdump'. 2224156283Srwatson lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' 2225156283Srwatson lt_cv_file_magic_cmd='$OBJDUMP -f' 2226156283Srwatson ;; 2227156283Srwatson 2228156283Srwatsondarwin* | rhapsody*) 2229156283Srwatson lt_cv_deplibs_check_method=pass_all 2230156283Srwatson ;; 2231156283Srwatson 2232156283Srwatsonfreebsd* | kfreebsd*-gnu | dragonfly*) 2233156283Srwatson if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then 2234156283Srwatson case $host_cpu in 2235156283Srwatson i*86 ) 2236156283Srwatson # Not sure whether the presence of OpenBSD here was a mistake. 2237156283Srwatson # Let's accept both of them until this is cleared up. 2238156283Srwatson lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 2239156283Srwatson lt_cv_file_magic_cmd=/usr/bin/file 2240156283Srwatson lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 2241156283Srwatson ;; 2242156283Srwatson esac 2243156283Srwatson else 2244156283Srwatson lt_cv_deplibs_check_method=pass_all 2245156283Srwatson fi 2246156283Srwatson ;; 2247156283Srwatson 2248156283Srwatsongnu*) 2249156283Srwatson lt_cv_deplibs_check_method=pass_all 2250156283Srwatson ;; 2251156283Srwatson 2252156283Srwatsonhpux10.20* | hpux11*) 2253156283Srwatson lt_cv_file_magic_cmd=/usr/bin/file 2254156283Srwatson case $host_cpu in 2255156283Srwatson ia64*) 2256156283Srwatson lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 2257156283Srwatson lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 2258156283Srwatson ;; 2259156283Srwatson hppa*64*) 2260156283Srwatson [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]'] 2261156283Srwatson lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 2262156283Srwatson ;; 2263156283Srwatson *) 2264156283Srwatson lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' 2265156283Srwatson lt_cv_file_magic_test_file=/usr/lib/libc.sl 2266156283Srwatson ;; 2267156283Srwatson esac 2268156283Srwatson ;; 2269156283Srwatson 2270156283Srwatsonirix5* | irix6* | nonstopux*) 2271156283Srwatson case $LD in 2272156283Srwatson *-32|*"-32 ") libmagic=32-bit;; 2273156283Srwatson *-n32|*"-n32 ") libmagic=N32;; 2274156283Srwatson *-64|*"-64 ") libmagic=64-bit;; 2275156283Srwatson *) libmagic=never-match;; 2276156283Srwatson esac 2277156283Srwatson lt_cv_deplibs_check_method=pass_all 2278156283Srwatson ;; 2279156283Srwatson 2280156283Srwatson# This must be Linux ELF. 2281156283Srwatsonlinux*) 2282156283Srwatson lt_cv_deplibs_check_method=pass_all 2283156283Srwatson ;; 2284156283Srwatson 2285156283Srwatsonnetbsd*) 2286156283Srwatson if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then 2287156283Srwatson lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 2288156283Srwatson else 2289156283Srwatson lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 2290156283Srwatson fi 2291156283Srwatson ;; 2292156283Srwatson 2293156283Srwatsonnewos6*) 2294156283Srwatson lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 2295156283Srwatson lt_cv_file_magic_cmd=/usr/bin/file 2296156283Srwatson lt_cv_file_magic_test_file=/usr/lib/libnls.so 2297156283Srwatson ;; 2298156283Srwatson 2299156283Srwatsonnto-qnx*) 2300156283Srwatson lt_cv_deplibs_check_method=unknown 2301156283Srwatson ;; 2302156283Srwatson 2303156283Srwatsonopenbsd*) 2304156283Srwatson if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 2305156283Srwatson lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 2306156283Srwatson else 2307156283Srwatson lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 2308156283Srwatson fi 2309156283Srwatson ;; 2310156283Srwatson 2311156283Srwatsonosf3* | osf4* | osf5*) 2312156283Srwatson lt_cv_deplibs_check_method=pass_all 2313156283Srwatson ;; 2314156283Srwatson 2315156283Srwatsonsco3.2v5*) 2316156283Srwatson lt_cv_deplibs_check_method=pass_all 2317156283Srwatson ;; 2318156283Srwatson 2319156283Srwatsonsolaris*) 2320156283Srwatson lt_cv_deplibs_check_method=pass_all 2321156283Srwatson ;; 2322156283Srwatson 2323156283Srwatsonsysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 2324156283Srwatson case $host_vendor in 2325156283Srwatson motorola) 2326156283Srwatson 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]]' 2327156283Srwatson lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 2328156283Srwatson ;; 2329156283Srwatson ncr) 2330156283Srwatson lt_cv_deplibs_check_method=pass_all 2331156283Srwatson ;; 2332156283Srwatson sequent) 2333156283Srwatson lt_cv_file_magic_cmd='/bin/file' 2334156283Srwatson lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 2335156283Srwatson ;; 2336156283Srwatson sni) 2337156283Srwatson lt_cv_file_magic_cmd='/bin/file' 2338156283Srwatson lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 2339156283Srwatson lt_cv_file_magic_test_file=/lib/libc.so 2340156283Srwatson ;; 2341156283Srwatson siemens) 2342156283Srwatson lt_cv_deplibs_check_method=pass_all 2343156283Srwatson ;; 2344156283Srwatson esac 2345156283Srwatson ;; 2346156283Srwatson 2347156283Srwatsonsysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7* | sysv4*uw2*) 2348156283Srwatson lt_cv_deplibs_check_method=pass_all 2349156283Srwatson ;; 2350156283Srwatsonesac 2351156283Srwatson]) 2352156283Srwatsonfile_magic_cmd=$lt_cv_file_magic_cmd 2353156283Srwatsondeplibs_check_method=$lt_cv_deplibs_check_method 2354156283Srwatsontest -z "$deplibs_check_method" && deplibs_check_method=unknown 2355156283Srwatson])# AC_DEPLIBS_CHECK_METHOD 2356156283Srwatson 2357156283Srwatson 2358156283Srwatson# AC_PROG_NM 2359156283Srwatson# ---------- 2360156283Srwatson# find the pathname to a BSD-compatible name lister 2361156283SrwatsonAC_DEFUN([AC_PROG_NM], 2362156283Srwatson[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM, 2363156283Srwatson[if test -n "$NM"; then 2364156283Srwatson # Let the user override the test. 2365156283Srwatson lt_cv_path_NM="$NM" 2366156283Srwatsonelse 2367156283Srwatson lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 2368156283Srwatson for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do 2369156283Srwatson IFS="$lt_save_ifs" 2370156283Srwatson test -z "$ac_dir" && ac_dir=. 2371156283Srwatson tmp_nm="$ac_dir/${ac_tool_prefix}nm" 2372156283Srwatson if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then 2373156283Srwatson # Check to see if the nm accepts a BSD-compat flag. 2374156283Srwatson # Adding the `sed 1q' prevents false positives on HP-UX, which says: 2375156283Srwatson # nm: unknown option "B" ignored 2376156283Srwatson # Tru64's nm complains that /dev/null is an invalid object file 2377156283Srwatson case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in 2378156283Srwatson */dev/null* | *'Invalid file or object type'*) 2379156283Srwatson lt_cv_path_NM="$tmp_nm -B" 2380156283Srwatson break 2381156283Srwatson ;; 2382156283Srwatson *) 2383156283Srwatson case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in 2384156283Srwatson */dev/null*) 2385156283Srwatson lt_cv_path_NM="$tmp_nm -p" 2386156283Srwatson break 2387156283Srwatson ;; 2388156283Srwatson *) 2389156283Srwatson lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 2390156283Srwatson continue # so that we can try to find one that supports BSD flags 2391156283Srwatson ;; 2392156283Srwatson esac 2393156283Srwatson esac 2394156283Srwatson fi 2395156283Srwatson done 2396156283Srwatson IFS="$lt_save_ifs" 2397156283Srwatson test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm 2398156283Srwatsonfi]) 2399156283SrwatsonNM="$lt_cv_path_NM" 2400156283Srwatson])# AC_PROG_NM 2401156283Srwatson 2402156283Srwatson 2403156283Srwatson# AC_CHECK_LIBM 2404156283Srwatson# ------------- 2405156283Srwatson# check for math library 2406156283SrwatsonAC_DEFUN([AC_CHECK_LIBM], 2407156283Srwatson[AC_REQUIRE([AC_CANONICAL_HOST])dnl 2408156283SrwatsonLIBM= 2409156283Srwatsoncase $host in 2410156283Srwatson*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) 2411156283Srwatson # These system don't have libm, or don't need it 2412156283Srwatson ;; 2413156283Srwatson*-ncr-sysv4.3*) 2414156283Srwatson AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") 2415156283Srwatson AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 2416156283Srwatson ;; 2417156283Srwatson*) 2418156283Srwatson AC_CHECK_LIB(m, cos, LIBM="-lm") 2419156283Srwatson ;; 2420156283Srwatsonesac 2421156283Srwatson])# AC_CHECK_LIBM 2422156283Srwatson 2423156283Srwatson 2424156283Srwatson# AC_LIBLTDL_CONVENIENCE([DIRECTORY]) 2425156283Srwatson# ----------------------------------- 2426156283Srwatson# sets LIBLTDL to the link flags for the libltdl convenience library and 2427156283Srwatson# LTDLINCL to the include flags for the libltdl header and adds 2428156283Srwatson# --enable-ltdl-convenience to the configure arguments. Note that 2429156283Srwatson# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, 2430156283Srwatson# it is assumed to be `libltdl'. LIBLTDL will be prefixed with 2431156283Srwatson# '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/' 2432156283Srwatson# (note the single quotes!). If your package is not flat and you're not 2433156283Srwatson# using automake, define top_builddir and top_srcdir appropriately in 2434156283Srwatson# the Makefiles. 2435156283SrwatsonAC_DEFUN([AC_LIBLTDL_CONVENIENCE], 2436156283Srwatson[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 2437156283Srwatson case $enable_ltdl_convenience in 2438156283Srwatson no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; 2439156283Srwatson "") enable_ltdl_convenience=yes 2440156283Srwatson ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; 2441156283Srwatson esac 2442156283Srwatson LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la 2443156283Srwatson LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) 2444156283Srwatson # For backwards non-gettext consistent compatibility... 2445156283Srwatson INCLTDL="$LTDLINCL" 2446156283Srwatson])# AC_LIBLTDL_CONVENIENCE 2447156283Srwatson 2448156283Srwatson 2449156283Srwatson# AC_LIBLTDL_INSTALLABLE([DIRECTORY]) 2450156283Srwatson# ----------------------------------- 2451156283Srwatson# sets LIBLTDL to the link flags for the libltdl installable library and 2452156283Srwatson# LTDLINCL to the include flags for the libltdl header and adds 2453156283Srwatson# --enable-ltdl-install to the configure arguments. Note that 2454156283Srwatson# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, 2455156283Srwatson# and an installed libltdl is not found, it is assumed to be `libltdl'. 2456156283Srwatson# LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with 2457156283Srwatson# '${top_srcdir}/' (note the single quotes!). If your package is not 2458156283Srwatson# flat and you're not using automake, define top_builddir and top_srcdir 2459156283Srwatson# appropriately in the Makefiles. 2460156283Srwatson# In the future, this macro may have to be called after AC_PROG_LIBTOOL. 2461156283SrwatsonAC_DEFUN([AC_LIBLTDL_INSTALLABLE], 2462156283Srwatson[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 2463156283Srwatson AC_CHECK_LIB(ltdl, lt_dlinit, 2464156283Srwatson [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no], 2465156283Srwatson [if test x"$enable_ltdl_install" = xno; then 2466156283Srwatson AC_MSG_WARN([libltdl not installed, but installation disabled]) 2467156283Srwatson else 2468156283Srwatson enable_ltdl_install=yes 2469156283Srwatson fi 2470156283Srwatson ]) 2471156283Srwatson if test x"$enable_ltdl_install" = x"yes"; then 2472156283Srwatson ac_configure_args="$ac_configure_args --enable-ltdl-install" 2473156283Srwatson LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la 2474156283Srwatson LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) 2475156283Srwatson else 2476156283Srwatson ac_configure_args="$ac_configure_args --enable-ltdl-install=no" 2477156283Srwatson LIBLTDL="-lltdl" 2478156283Srwatson LTDLINCL= 2479156283Srwatson fi 2480156283Srwatson # For backwards non-gettext consistent compatibility... 2481156283Srwatson INCLTDL="$LTDLINCL" 2482156283Srwatson])# AC_LIBLTDL_INSTALLABLE 2483156283Srwatson 2484156283Srwatson 2485156283Srwatson# AC_LIBTOOL_CXX 2486156283Srwatson# -------------- 2487156283Srwatson# enable support for C++ libraries 2488156283SrwatsonAC_DEFUN([AC_LIBTOOL_CXX], 2489156283Srwatson[AC_REQUIRE([_LT_AC_LANG_CXX]) 2490156283Srwatson])# AC_LIBTOOL_CXX 2491156283Srwatson 2492156283Srwatson 2493156283Srwatson# _LT_AC_LANG_CXX 2494156283Srwatson# --------------- 2495156283SrwatsonAC_DEFUN([_LT_AC_LANG_CXX], 2496156283Srwatson[AC_REQUIRE([AC_PROG_CXX]) 2497156283SrwatsonAC_REQUIRE([_LT_AC_PROG_CXXCPP]) 2498156283Srwatson_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX]) 2499156283Srwatson])# _LT_AC_LANG_CXX 2500156283Srwatson 2501156283Srwatson# _LT_AC_PROG_CXXCPP 2502156283Srwatson# --------------- 2503156283SrwatsonAC_DEFUN([_LT_AC_PROG_CXXCPP], 2504156283Srwatson[ 2505156283SrwatsonAC_REQUIRE([AC_PROG_CXX]) 2506156283Srwatsonif test -n "$CXX" && ( test "X$CXX" != "Xno" && 2507156283Srwatson ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || 2508156283Srwatson (test "X$CXX" != "Xg++"))) ; then 2509156283Srwatson AC_PROG_CXXCPP 2510156283Srwatsonfi 2511156283Srwatson])# _LT_AC_PROG_CXXCPP 2512156283Srwatson 2513156283Srwatson# AC_LIBTOOL_F77 2514156283Srwatson# -------------- 2515156283Srwatson# enable support for Fortran 77 libraries 2516156283SrwatsonAC_DEFUN([AC_LIBTOOL_F77], 2517156283Srwatson[AC_REQUIRE([_LT_AC_LANG_F77]) 2518156283Srwatson])# AC_LIBTOOL_F77 2519156283Srwatson 2520156283Srwatson 2521156283Srwatson# _LT_AC_LANG_F77 2522156283Srwatson# --------------- 2523156283SrwatsonAC_DEFUN([_LT_AC_LANG_F77], 2524156283Srwatson[AC_REQUIRE([AC_PROG_F77]) 2525156283Srwatson_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77]) 2526156283Srwatson])# _LT_AC_LANG_F77 2527156283Srwatson 2528156283Srwatson 2529156283Srwatson# AC_LIBTOOL_GCJ 2530156283Srwatson# -------------- 2531156283Srwatson# enable support for GCJ libraries 2532156283SrwatsonAC_DEFUN([AC_LIBTOOL_GCJ], 2533156283Srwatson[AC_REQUIRE([_LT_AC_LANG_GCJ]) 2534156283Srwatson])# AC_LIBTOOL_GCJ 2535156283Srwatson 2536156283Srwatson 2537156283Srwatson# _LT_AC_LANG_GCJ 2538156283Srwatson# --------------- 2539156283SrwatsonAC_DEFUN([_LT_AC_LANG_GCJ], 2540156283Srwatson[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[], 2541156283Srwatson [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[], 2542156283Srwatson [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[], 2543156283Srwatson [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])], 2544156283Srwatson [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])], 2545156283Srwatson [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])]) 2546156283Srwatson_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ]) 2547156283Srwatson])# _LT_AC_LANG_GCJ 2548156283Srwatson 2549156283Srwatson 2550156283Srwatson# AC_LIBTOOL_RC 2551156283Srwatson# -------------- 2552156283Srwatson# enable support for Windows resource files 2553156283SrwatsonAC_DEFUN([AC_LIBTOOL_RC], 2554156283Srwatson[AC_REQUIRE([LT_AC_PROG_RC]) 2555156283Srwatson_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC]) 2556156283Srwatson])# AC_LIBTOOL_RC 2557156283Srwatson 2558156283Srwatson 2559156283Srwatson# AC_LIBTOOL_LANG_C_CONFIG 2560156283Srwatson# ------------------------ 2561156283Srwatson# Ensure that the configuration vars for the C compiler are 2562156283Srwatson# suitably defined. Those variables are subsequently used by 2563156283Srwatson# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 2564156283SrwatsonAC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG]) 2565156283SrwatsonAC_DEFUN([_LT_AC_LANG_C_CONFIG], 2566156283Srwatson[lt_save_CC="$CC" 2567156283SrwatsonAC_LANG_PUSH(C) 2568156283Srwatson 2569156283Srwatson# Source file extension for C test sources. 2570156283Srwatsonac_ext=c 2571156283Srwatson 2572156283Srwatson# Object file extension for compiled C test sources. 2573156283Srwatsonobjext=o 2574156283Srwatson_LT_AC_TAGVAR(objext, $1)=$objext 2575156283Srwatson 2576156283Srwatson# Code to be used in simple compile tests 2577156283Srwatsonlt_simple_compile_test_code="int some_variable = 0;\n" 2578156283Srwatson 2579156283Srwatson# Code to be used in simple link tests 2580156283Srwatsonlt_simple_link_test_code='int main(){return(0);}\n' 2581156283Srwatson 2582156283Srwatson_LT_AC_SYS_COMPILER 2583156283Srwatson 2584156283Srwatson# save warnings/boilerplate of simple test code 2585156283Srwatson_LT_COMPILER_BOILERPLATE 2586156283Srwatson_LT_LINKER_BOILERPLATE 2587156283Srwatson 2588156283Srwatson# 2589156283Srwatson# Check for any special shared library compilation flags. 2590156283Srwatson# 2591156283Srwatson_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)= 2592156283Srwatsonif test "$GCC" = no; then 2593156283Srwatson case $host_os in 2594156283Srwatson sco3.2v5*) 2595156283Srwatson _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)='-belf' 2596156283Srwatson ;; 2597156283Srwatson esac 2598156283Srwatsonfi 2599156283Srwatsonif test -n "$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)"; then 2600156283Srwatson AC_MSG_WARN([`$CC' requires `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to build shared libraries]) 2601156283Srwatson if echo "$old_CC $old_CFLAGS " | grep "[[ ]]$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)[[ ]]" >/dev/null; then : 2602156283Srwatson else 2603156283Srwatson AC_MSG_WARN([add `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to the CC or CFLAGS env variable and reconfigure]) 2604156283Srwatson _LT_AC_TAGVAR(lt_cv_prog_cc_can_build_shared, $1)=no 2605156283Srwatson fi 2606156283Srwatsonfi 2607156283Srwatson 2608156283Srwatson 2609156283Srwatson# 2610156283Srwatson# Check to make sure the static flag actually works. 2611156283Srwatson# 2612156283SrwatsonAC_LIBTOOL_LINKER_OPTION([if $compiler static flag $_LT_AC_TAGVAR(lt_prog_compiler_static, $1) works], 2613156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1), 2614156283Srwatson $_LT_AC_TAGVAR(lt_prog_compiler_static, $1), 2615156283Srwatson [], 2616156283Srwatson [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=]) 2617156283Srwatson 2618156283Srwatson 2619156283SrwatsonAC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) 2620156283SrwatsonAC_LIBTOOL_PROG_COMPILER_PIC($1) 2621156283SrwatsonAC_LIBTOOL_PROG_CC_C_O($1) 2622156283SrwatsonAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) 2623156283SrwatsonAC_LIBTOOL_PROG_LD_SHLIBS($1) 2624156283SrwatsonAC_LIBTOOL_SYS_DYNAMIC_LINKER($1) 2625156283SrwatsonAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) 2626156283SrwatsonAC_LIBTOOL_SYS_LIB_STRIP 2627156283SrwatsonAC_LIBTOOL_DLOPEN_SELF($1) 2628156283Srwatson 2629156283Srwatson# Report which librarie types wil actually be built 2630156283SrwatsonAC_MSG_CHECKING([if libtool supports shared libraries]) 2631156283SrwatsonAC_MSG_RESULT([$can_build_shared]) 2632156283Srwatson 2633156283SrwatsonAC_MSG_CHECKING([whether to build shared libraries]) 2634156283Srwatsontest "$can_build_shared" = "no" && enable_shared=no 2635156283Srwatson 2636156283Srwatson# On AIX, shared libraries and static libraries use the same namespace, and 2637156283Srwatson# are all built from PIC. 2638156283Srwatsoncase $host_os in 2639156283Srwatsonaix3*) 2640156283Srwatson test "$enable_shared" = yes && enable_static=no 2641156283Srwatson if test -n "$RANLIB"; then 2642156283Srwatson archive_cmds="$archive_cmds~\$RANLIB \$lib" 2643156283Srwatson postinstall_cmds='$RANLIB $lib' 2644156283Srwatson fi 2645156283Srwatson ;; 2646156283Srwatson 2647156283Srwatsonaix4* | aix5*) 2648156283Srwatson if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 2649156283Srwatson test "$enable_shared" = yes && enable_static=no 2650156283Srwatson fi 2651156283Srwatson ;; 2652156283Srwatsonesac 2653156283SrwatsonAC_MSG_RESULT([$enable_shared]) 2654156283Srwatson 2655156283SrwatsonAC_MSG_CHECKING([whether to build static libraries]) 2656156283Srwatson# Make sure either enable_shared or enable_static is yes. 2657156283Srwatsontest "$enable_shared" = yes || enable_static=yes 2658156283SrwatsonAC_MSG_RESULT([$enable_static]) 2659156283Srwatson 2660156283SrwatsonAC_LIBTOOL_CONFIG($1) 2661156283Srwatson 2662156283SrwatsonAC_LANG_POP 2663156283SrwatsonCC="$lt_save_CC" 2664156283Srwatson])# AC_LIBTOOL_LANG_C_CONFIG 2665156283Srwatson 2666156283Srwatson 2667156283Srwatson# AC_LIBTOOL_LANG_CXX_CONFIG 2668156283Srwatson# -------------------------- 2669156283Srwatson# Ensure that the configuration vars for the C compiler are 2670156283Srwatson# suitably defined. Those variables are subsequently used by 2671156283Srwatson# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 2672156283SrwatsonAC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)]) 2673156283SrwatsonAC_DEFUN([_LT_AC_LANG_CXX_CONFIG], 2674156283Srwatson[AC_LANG_PUSH(C++) 2675156283SrwatsonAC_REQUIRE([AC_PROG_CXX]) 2676156283SrwatsonAC_REQUIRE([_LT_AC_PROG_CXXCPP]) 2677156283Srwatson 2678156283Srwatson_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 2679156283Srwatson_LT_AC_TAGVAR(allow_undefined_flag, $1)= 2680156283Srwatson_LT_AC_TAGVAR(always_export_symbols, $1)=no 2681156283Srwatson_LT_AC_TAGVAR(archive_expsym_cmds, $1)= 2682156283Srwatson_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= 2683156283Srwatson_LT_AC_TAGVAR(hardcode_direct, $1)=no 2684156283Srwatson_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= 2685156283Srwatson_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 2686156283Srwatson_LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 2687156283Srwatson_LT_AC_TAGVAR(hardcode_minus_L, $1)=no 2688156283Srwatson_LT_AC_TAGVAR(hardcode_automatic, $1)=no 2689156283Srwatson_LT_AC_TAGVAR(module_cmds, $1)= 2690156283Srwatson_LT_AC_TAGVAR(module_expsym_cmds, $1)= 2691156283Srwatson_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown 2692156283Srwatson_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 2693156283Srwatson_LT_AC_TAGVAR(no_undefined_flag, $1)= 2694156283Srwatson_LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 2695156283Srwatson_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no 2696156283Srwatson 2697156283Srwatson# Dependencies to place before and after the object being linked: 2698156283Srwatson_LT_AC_TAGVAR(predep_objects, $1)= 2699156283Srwatson_LT_AC_TAGVAR(postdep_objects, $1)= 2700156283Srwatson_LT_AC_TAGVAR(predeps, $1)= 2701156283Srwatson_LT_AC_TAGVAR(postdeps, $1)= 2702156283Srwatson_LT_AC_TAGVAR(compiler_lib_search_path, $1)= 2703156283Srwatson 2704156283Srwatson# Source file extension for C++ test sources. 2705156283Srwatsonac_ext=cpp 2706156283Srwatson 2707156283Srwatson# Object file extension for compiled C++ test sources. 2708156283Srwatsonobjext=o 2709156283Srwatson_LT_AC_TAGVAR(objext, $1)=$objext 2710156283Srwatson 2711156283Srwatson# Code to be used in simple compile tests 2712156283Srwatsonlt_simple_compile_test_code="int some_variable = 0;\n" 2713156283Srwatson 2714156283Srwatson# Code to be used in simple link tests 2715156283Srwatsonlt_simple_link_test_code='int main(int, char *[]) { return(0); }\n' 2716156283Srwatson 2717156283Srwatson# ltmain only uses $CC for tagged configurations so make sure $CC is set. 2718156283Srwatson_LT_AC_SYS_COMPILER 2719156283Srwatson 2720156283Srwatson# save warnings/boilerplate of simple test code 2721156283Srwatson_LT_COMPILER_BOILERPLATE 2722156283Srwatson_LT_LINKER_BOILERPLATE 2723156283Srwatson 2724156283Srwatson# Allow CC to be a program name with arguments. 2725156283Srwatsonlt_save_CC=$CC 2726156283Srwatsonlt_save_LD=$LD 2727156283Srwatsonlt_save_GCC=$GCC 2728156283SrwatsonGCC=$GXX 2729156283Srwatsonlt_save_with_gnu_ld=$with_gnu_ld 2730156283Srwatsonlt_save_path_LD=$lt_cv_path_LD 2731156283Srwatsonif test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 2732156283Srwatson lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 2733156283Srwatsonelse 2734156283Srwatson unset lt_cv_prog_gnu_ld 2735156283Srwatsonfi 2736156283Srwatsonif test -n "${lt_cv_path_LDCXX+set}"; then 2737156283Srwatson lt_cv_path_LD=$lt_cv_path_LDCXX 2738156283Srwatsonelse 2739156283Srwatson unset lt_cv_path_LD 2740156283Srwatsonfi 2741156283Srwatsontest -z "${LDCXX+set}" || LD=$LDCXX 2742156283SrwatsonCC=${CXX-"c++"} 2743156283Srwatsoncompiler=$CC 2744156283Srwatson_LT_AC_TAGVAR(compiler, $1)=$CC 2745156283Srwatson_LT_CC_BASENAME([$compiler]) 2746156283Srwatson 2747156283Srwatson# We don't want -fno-exception wen compiling C++ code, so set the 2748156283Srwatson# no_builtin_flag separately 2749156283Srwatsonif test "$GXX" = yes; then 2750156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 2751156283Srwatsonelse 2752156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 2753156283Srwatsonfi 2754156283Srwatson 2755156283Srwatsonif test "$GXX" = yes; then 2756156283Srwatson # Set up default GNU C++ configuration 2757156283Srwatson 2758156283Srwatson AC_PROG_LD 2759156283Srwatson 2760156283Srwatson # Check if GNU C++ uses GNU ld as the underlying linker, since the 2761156283Srwatson # archiving commands below assume that GNU ld is being used. 2762156283Srwatson if test "$with_gnu_ld" = yes; then 2763156283Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 2764156283Srwatson _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' 2765156283Srwatson 2766156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 2767156283Srwatson _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 2768156283Srwatson 2769156283Srwatson # If archive_cmds runs LD, not CC, wlarc should be empty 2770156283Srwatson # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 2771156283Srwatson # investigate it a little bit more. (MM) 2772156283Srwatson wlarc='${wl}' 2773156283Srwatson 2774156283Srwatson # ancient GNU ld didn't support --whole-archive et. al. 2775156283Srwatson if eval "`$CC -print-prog-name=ld` --help 2>&1" | \ 2776156283Srwatson grep 'no-whole-archive' > /dev/null; then 2777156283Srwatson _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 2778156283Srwatson else 2779156283Srwatson _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 2780156283Srwatson fi 2781156283Srwatson else 2782156283Srwatson with_gnu_ld=no 2783156283Srwatson wlarc= 2784156283Srwatson 2785156283Srwatson # A generic and very simple default shared library creation 2786156283Srwatson # command for GNU C++ for the case where it uses the native 2787156283Srwatson # linker, instead of GNU ld. If possible, this setting should 2788156283Srwatson # overridden to take advantage of the native linker features on 2789156283Srwatson # the platform it is being used on. 2790156283Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 2791156283Srwatson fi 2792156283Srwatson 2793156283Srwatson # Commands to make compiler produce verbose output that lists 2794156283Srwatson # what "hidden" libraries, object files and flags are used when 2795156283Srwatson # linking a shared library. 2796156283Srwatson output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' 2797156283Srwatson 2798156283Srwatsonelse 2799156283Srwatson GXX=no 2800156283Srwatson with_gnu_ld=no 2801156283Srwatson wlarc= 2802156283Srwatsonfi 2803156283Srwatson 2804156283Srwatson# PORTME: fill in a description of your system's C++ link characteristics 2805156283SrwatsonAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 2806156283Srwatson_LT_AC_TAGVAR(ld_shlibs, $1)=yes 2807156283Srwatsoncase $host_os in 2808156283Srwatson aix3*) 2809156283Srwatson # FIXME: insert proper C++ library support 2810156283Srwatson _LT_AC_TAGVAR(ld_shlibs, $1)=no 2811156283Srwatson ;; 2812156283Srwatson aix4* | aix5*) 2813156283Srwatson if test "$host_cpu" = ia64; then 2814156283Srwatson # On IA64, the linker does run time linking by default, so we don't 2815156283Srwatson # have to do anything special. 2816156283Srwatson aix_use_runtimelinking=no 2817156283Srwatson exp_sym_flag='-Bexport' 2818156283Srwatson no_entry_flag="" 2819156283Srwatson else 2820156283Srwatson aix_use_runtimelinking=no 2821156283Srwatson 2822156283Srwatson # Test if we are trying to use run time linking or normal 2823156283Srwatson # AIX style linking. If -brtl is somewhere in LDFLAGS, we 2824156283Srwatson # need to do runtime linking. 2825156283Srwatson case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*) 2826156283Srwatson for ld_flag in $LDFLAGS; do 2827156283Srwatson case $ld_flag in 2828156283Srwatson *-brtl*) 2829156283Srwatson aix_use_runtimelinking=yes 2830156283Srwatson break 2831156283Srwatson ;; 2832156283Srwatson esac 2833156283Srwatson done 2834156283Srwatson esac 2835156283Srwatson 2836156283Srwatson exp_sym_flag='-bexport' 2837156283Srwatson no_entry_flag='-bnoentry' 2838156283Srwatson fi 2839156283Srwatson 2840156283Srwatson # When large executables or shared objects are built, AIX ld can 2841156283Srwatson # have problems creating the table of contents. If linking a library 2842156283Srwatson # or program results in "error TOC overflow" add -mminimal-toc to 2843156283Srwatson # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 2844156283Srwatson # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 2845156283Srwatson 2846156283Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='' 2847156283Srwatson _LT_AC_TAGVAR(hardcode_direct, $1)=yes 2848156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' 2849156283Srwatson _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 2850156283Srwatson 2851156283Srwatson if test "$GXX" = yes; then 2852156283Srwatson case $host_os in aix4.[[012]]|aix4.[[012]].*) 2853156283Srwatson # We only want to do this on AIX 4.2 and lower, the check 2854156283Srwatson # below for broken collect2 doesn't work under 4.3+ 2855156283Srwatson collect2name=`${CC} -print-prog-name=collect2` 2856156283Srwatson if test -f "$collect2name" && \ 2857156283Srwatson strings "$collect2name" | grep resolve_lib_name >/dev/null 2858156283Srwatson then 2859156283Srwatson # We have reworked collect2 2860156283Srwatson _LT_AC_TAGVAR(hardcode_direct, $1)=yes 2861156283Srwatson else 2862156283Srwatson # We have old collect2 2863156283Srwatson _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported 2864156283Srwatson # It fails to find uninstalled libraries when the uninstalled 2865156283Srwatson # path is not listed in the libpath. Setting hardcode_minus_L 2866156283Srwatson # to unsupported forces relinking 2867156283Srwatson _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 2868156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 2869156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 2870156283Srwatson fi 2871156283Srwatson esac 2872156283Srwatson shared_flag='-shared' 2873156283Srwatson if test "$aix_use_runtimelinking" = yes; then 2874156283Srwatson shared_flag="$shared_flag "'${wl}-G' 2875156283Srwatson fi 2876156283Srwatson else 2877156283Srwatson # not using gcc 2878156283Srwatson if test "$host_cpu" = ia64; then 2879156283Srwatson # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 2880156283Srwatson # chokes on -Wl,-G. The following line is correct: 2881156283Srwatson shared_flag='-G' 2882156283Srwatson else 2883156283Srwatson if test "$aix_use_runtimelinking" = yes; then 2884156283Srwatson shared_flag='${wl}-G' 2885156283Srwatson else 2886156283Srwatson shared_flag='${wl}-bM:SRE' 2887156283Srwatson fi 2888156283Srwatson fi 2889156283Srwatson fi 2890156283Srwatson 2891156283Srwatson # It seems that -bexpall does not export symbols beginning with 2892156283Srwatson # underscore (_), so it is better to generate a list of symbols to export. 2893156283Srwatson _LT_AC_TAGVAR(always_export_symbols, $1)=yes 2894156283Srwatson if test "$aix_use_runtimelinking" = yes; then 2895156283Srwatson # Warning - without using the other runtime loading flags (-brtl), 2896156283Srwatson # -berok will link without error, but may produce a broken library. 2897156283Srwatson _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' 2898156283Srwatson # Determine the default libpath from the value encoded in an empty executable. 2899156283Srwatson _LT_AC_SYS_LIBPATH_AIX 2900156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 2901156283Srwatson 2902156283Srwatson _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag" 2903156283Srwatson else 2904156283Srwatson if test "$host_cpu" = ia64; then 2905156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 2906156283Srwatson _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 2907156283Srwatson _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" 2908156283Srwatson else 2909156283Srwatson # Determine the default libpath from the value encoded in an empty executable. 2910156283Srwatson _LT_AC_SYS_LIBPATH_AIX 2911156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 2912156283Srwatson # Warning - without using the other run time loading flags, 2913156283Srwatson # -berok will link without error, but may produce a broken library. 2914156283Srwatson _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 2915156283Srwatson _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 2916156283Srwatson # -bexpall does not export symbols beginning with underscore (_) 2917156283Srwatson _LT_AC_TAGVAR(always_export_symbols, $1)=yes 2918156283Srwatson # Exported symbols can be pulled into shared objects from archives 2919156283Srwatson _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' ' 2920156283Srwatson _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes 2921156283Srwatson # This is similar to how AIX traditionally builds its shared libraries. 2922156283Srwatson _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' 2923156283Srwatson fi 2924156283Srwatson fi 2925156283Srwatson ;; 2926156283Srwatson chorus*) 2927156283Srwatson case $cc_basename in 2928156283Srwatson *) 2929156283Srwatson # FIXME: insert proper C++ library support 2930156283Srwatson _LT_AC_TAGVAR(ld_shlibs, $1)=no 2931156283Srwatson ;; 2932156283Srwatson esac 2933156283Srwatson ;; 2934156283Srwatson 2935156283Srwatson 2936156283Srwatson cygwin* | mingw* | pw32*) 2937156283Srwatson # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 2938156283Srwatson # as there is no search path for DLLs. 2939156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 2940156283Srwatson _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 2941156283Srwatson _LT_AC_TAGVAR(always_export_symbols, $1)=no 2942156283Srwatson _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 2943156283Srwatson 2944156283Srwatson if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then 2945156283Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' 2946156283Srwatson # If the export-symbols file already is a .def file (1st line 2947156283Srwatson # is EXPORTS), use it as is; otherwise, prepend... 2948156283Srwatson _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 2949156283Srwatson cp $export_symbols $output_objdir/$soname.def; 2950156283Srwatson else 2951156283Srwatson echo EXPORTS > $output_objdir/$soname.def; 2952156283Srwatson cat $export_symbols >> $output_objdir/$soname.def; 2953156283Srwatson fi~ 2954156283Srwatson $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' 2955156283Srwatson else 2956156283Srwatson _LT_AC_TAGVAR(ld_shlibs, $1)=no 2957156283Srwatson fi 2958156283Srwatson ;; 2959156283Srwatson darwin* | rhapsody*) 2960156283Srwatson case $host_os in 2961156283Srwatson rhapsody* | darwin1.[[012]]) 2962156283Srwatson _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' 2963156283Srwatson ;; 2964156283Srwatson *) # Darwin 1.3 on 2965156283Srwatson if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then 2966156283Srwatson _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' 2967156283Srwatson else 2968156283Srwatson case ${MACOSX_DEPLOYMENT_TARGET} in 2969156283Srwatson 10.[[012]]) 2970156283Srwatson _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' 2971156283Srwatson ;; 2972156283Srwatson 10.*) 2973156283Srwatson _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup' 2974156283Srwatson ;; 2975156283Srwatson esac 2976156283Srwatson fi 2977156283Srwatson ;; 2978156283Srwatson esac 2979156283Srwatson _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 2980156283Srwatson _LT_AC_TAGVAR(hardcode_direct, $1)=no 2981156283Srwatson _LT_AC_TAGVAR(hardcode_automatic, $1)=yes 2982156283Srwatson _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 2983156283Srwatson _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' 2984156283Srwatson _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 2985156283Srwatson 2986156283Srwatson if test "$GXX" = yes ; then 2987156283Srwatson lt_int_apple_cc_single_mod=no 2988156283Srwatson output_verbose_link_cmd='echo' 2989156283Srwatson if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then 2990156283Srwatson lt_int_apple_cc_single_mod=yes 2991156283Srwatson fi 2992156283Srwatson if test "X$lt_int_apple_cc_single_mod" = Xyes ; then 2993156283Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' 2994156283Srwatson else 2995156283Srwatson _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' 2996156283Srwatson fi 2997156283Srwatson _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' 2998156283Srwatson # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds 2999156283Srwatson if test "X$lt_int_apple_cc_single_mod" = Xyes ; then 3000156283Srwatson _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}' 3001156283Srwatson else 3002156283Srwatson _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}' 3003156283Srwatson fi 3004156283Srwatson _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}' 3005156283Srwatson else 3006156283Srwatson case $cc_basename in 3007156283Srwatson xlc*) 3008156283Srwatson output_verbose_link_cmd='echo' 3009156283Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' 3010156283Srwatson _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' 3011156283Srwatson # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds 3012156283Srwatson _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' 3013156283Srwatson _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}' 3014156283Srwatson ;; 3015156283Srwatson *) 3016156283Srwatson _LT_AC_TAGVAR(ld_shlibs, $1)=no 3017156283Srwatson ;; 3018156283Srwatson esac 3019156283Srwatson fi 3020156283Srwatson ;; 3021156283Srwatson 3022156283Srwatson dgux*) 3023156283Srwatson case $cc_basename in 3024156283Srwatson ec++*) 3025156283Srwatson # FIXME: insert proper C++ library support 3026156283Srwatson _LT_AC_TAGVAR(ld_shlibs, $1)=no 3027156283Srwatson ;; 3028156283Srwatson ghcx*) 3029156283Srwatson # Green Hills C++ Compiler 3030156283Srwatson # FIXME: insert proper C++ library support 3031156283Srwatson _LT_AC_TAGVAR(ld_shlibs, $1)=no 3032156283Srwatson ;; 3033156283Srwatson *) 3034156283Srwatson # FIXME: insert proper C++ library support 3035156283Srwatson _LT_AC_TAGVAR(ld_shlibs, $1)=no 3036156283Srwatson ;; 3037156283Srwatson esac 3038156283Srwatson ;; 3039156283Srwatson freebsd[[12]]*) 3040156283Srwatson # C++ shared libraries reported to be fairly broken before switch to ELF 3041156283Srwatson _LT_AC_TAGVAR(ld_shlibs, $1)=no 3042156283Srwatson ;; 3043156283Srwatson freebsd-elf*) 3044156283Srwatson _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 3045156283Srwatson ;; 3046156283Srwatson freebsd* | kfreebsd*-gnu | dragonfly*) 3047156283Srwatson # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 3048156283Srwatson # conventions 3049156283Srwatson _LT_AC_TAGVAR(ld_shlibs, $1)=yes 3050156283Srwatson ;; 3051156283Srwatson gnu*) 3052156283Srwatson ;; 3053156283Srwatson hpux9*) 3054156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 3055156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 3056156283Srwatson _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 3057156283Srwatson _LT_AC_TAGVAR(hardcode_direct, $1)=yes 3058156283Srwatson _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 3059156283Srwatson # but as the default 3060156283Srwatson # location of the library. 3061156283Srwatson 3062156283Srwatson case $cc_basename in 3063156283Srwatson CC*) 3064156283Srwatson # FIXME: insert proper C++ library support 3065156283Srwatson _LT_AC_TAGVAR(ld_shlibs, $1)=no 3066156283Srwatson ;; 3067156283Srwatson aCC*) 3068156283Srwatson _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' 3069156283Srwatson # Commands to make compiler produce verbose output that lists 3070156283Srwatson # what "hidden" libraries, object files and flags are used when 3071156283Srwatson # linking a shared library. 3072156283Srwatson # 3073156283Srwatson # There doesn't appear to be a way to prevent this compiler from 3074156283Srwatson # explicitly linking system object files so we need to strip them 3075156283Srwatson # from the output so that they don't get included in the library 3076156283Srwatson # dependencies. 3077156283Srwatson 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' 3078156283Srwatson ;; 3079156283Srwatson *) 3080156283Srwatson if test "$GXX" = yes; then 3081156283Srwatson _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' 3082156283Srwatson else 3083156283Srwatson # FIXME: insert proper C++ library support 3084156283Srwatson _LT_AC_TAGVAR(ld_shlibs, $1)=no 3085156283Srwatson fi 3086156283Srwatson ;; 3087156283Srwatson esac 3088156283Srwatson ;; 3089156283Srwatson hpux10*|hpux11*) 3090156283Srwatson if test $with_gnu_ld = no; then 3091156283Srwatson case $host_cpu in 3092156283Srwatson hppa*64*) 3093156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 3094156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' 3095156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 3096156283Srwatson ;; 3097156283Srwatson ia64*) 3098156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 3099156283Srwatson ;; 3100156283Srwatson *) 3101156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 3102156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 3103156283Srwatson _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 3104156283Srwatson ;; 3105156283Srwatson esac 3106156283Srwatson fi 3107156283Srwatson case $host_cpu in 3108156283Srwatson hppa*64*) 3109156283Srwatson _LT_AC_TAGVAR(hardcode_direct, $1)=no 3110156283Srwatson _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 3111156283Srwatson ;; 3112156283Srwatson ia64*) 3113156283Srwatson _LT_AC_TAGVAR(hardcode_direct, $1)=no 3114156283Srwatson _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 3115156283Srwatson _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 3116156283Srwatson # but as the default 3117156283Srwatson # location of the library. 3118156283Srwatson ;; 3119156283Srwatson *) 3120156283Srwatson _LT_AC_TAGVAR(hardcode_direct, $1)=yes 3121156283Srwatson _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 3122156283Srwatson # but as the default 3123156283Srwatson # location of the library. 3124156283Srwatson ;; 3125156283Srwatson esac 3126156283Srwatson 3127156283Srwatson case $cc_basename in 3128156283Srwatson CC*) 3129156283Srwatson # FIXME: insert proper C++ library support 3130156283Srwatson _LT_AC_TAGVAR(ld_shlibs, $1)=no 3131156283Srwatson ;; 3132156283Srwatson aCC*) 3133156283Srwatson case $host_cpu in 3134156283Srwatson hppa*64*|ia64*) 3135156283Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs' 3136156283Srwatson ;; 3137156283Srwatson *) 3138156283Srwatson _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' 3139156283Srwatson ;; 3140156283Srwatson esac 3141156283Srwatson # Commands to make compiler produce verbose output that lists 3142156283Srwatson # what "hidden" libraries, object files and flags are used when 3143156283Srwatson # linking a shared library. 3144156283Srwatson # 3145156283Srwatson # There doesn't appear to be a way to prevent this compiler from 3146156283Srwatson # explicitly linking system object files so we need to strip them 3147156283Srwatson # from the output so that they don't get included in the library 3148156283Srwatson # dependencies. 3149156283Srwatson 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' 3150156283Srwatson ;; 3151156283Srwatson *) 3152156283Srwatson if test "$GXX" = yes; then 3153156283Srwatson if test $with_gnu_ld = no; then 3154156283Srwatson case $host_cpu in 3155156283Srwatson ia64*|hppa*64*) 3156156283Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs' 3157156283Srwatson ;; 3158156283Srwatson *) 3159156283Srwatson _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' 3160156283Srwatson ;; 3161156283Srwatson esac 3162156283Srwatson fi 3163156283Srwatson else 3164156283Srwatson # FIXME: insert proper C++ library support 3165156283Srwatson _LT_AC_TAGVAR(ld_shlibs, $1)=no 3166156283Srwatson fi 3167156283Srwatson ;; 3168156283Srwatson esac 3169156283Srwatson ;; 3170156283Srwatson irix5* | irix6*) 3171156283Srwatson case $cc_basename in 3172156283Srwatson CC*) 3173156283Srwatson # SGI C++ 3174156283Srwatson _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' 3175156283Srwatson 3176156283Srwatson # Archives containing C++ object files must be created using 3177156283Srwatson # "CC -ar", where "CC" is the IRIX C++ compiler. This is 3178156283Srwatson # necessary to make sure instantiated templates are included 3179156283Srwatson # in the archive. 3180156283Srwatson _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 3181156283Srwatson ;; 3182156283Srwatson *) 3183156283Srwatson if test "$GXX" = yes; then 3184156283Srwatson if test "$with_gnu_ld" = no; then 3185156283Srwatson _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' 3186156283Srwatson else 3187156283Srwatson _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' 3188156283Srwatson fi 3189156283Srwatson fi 3190156283Srwatson _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 3191156283Srwatson ;; 3192156283Srwatson esac 3193156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 3194156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 3195156283Srwatson ;; 3196156283Srwatson linux*) 3197156283Srwatson case $cc_basename in 3198156283Srwatson KCC*) 3199156283Srwatson # Kuck and Associates, Inc. (KAI) C++ Compiler 3200156283Srwatson 3201156283Srwatson # KCC will only create a shared library if the output file 3202156283Srwatson # ends with ".so" (or ".sl" for HP-UX), so rename the library 3203156283Srwatson # to its proper name (with version) after linking. 3204156283Srwatson _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' 3205156283Srwatson _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' 3206156283Srwatson # Commands to make compiler produce verbose output that lists 3207156283Srwatson # what "hidden" libraries, object files and flags are used when 3208156283Srwatson # linking a shared library. 3209156283Srwatson # 3210156283Srwatson # There doesn't appear to be a way to prevent this compiler from 3211156283Srwatson # explicitly linking system object files so we need to strip them 3212156283Srwatson # from the output so that they don't get included in the library 3213156283Srwatson # dependencies. 3214156283Srwatson 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' 3215156283Srwatson 3216156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir' 3217156283Srwatson _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 3218156283Srwatson 3219156283Srwatson # Archives containing C++ object files must be created using 3220156283Srwatson # "CC -Bstatic", where "CC" is the KAI C++ compiler. 3221156283Srwatson _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 3222156283Srwatson ;; 3223156283Srwatson icpc*) 3224156283Srwatson # Intel C++ 3225156283Srwatson with_gnu_ld=yes 3226156283Srwatson # version 8.0 and above of icpc choke on multiply defined symbols 3227156283Srwatson # if we add $predep_objects and $postdep_objects, however 7.1 and 3228156283Srwatson # earlier do not add the objects themselves. 3229156283Srwatson case `$CC -V 2>&1` in 3230156283Srwatson *"Version 7."*) 3231156283Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 3232156283Srwatson _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' 3233156283Srwatson ;; 3234156283Srwatson *) # Version 8.0 or newer 3235156283Srwatson tmp_idyn= 3236156283Srwatson case $host_cpu in 3237156283Srwatson ia64*) tmp_idyn=' -i_dynamic';; 3238156283Srwatson esac 3239156283Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 3240156283Srwatson _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' 3241156283Srwatson ;; 3242156283Srwatson esac 3243156283Srwatson _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 3244156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 3245156283Srwatson _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 3246156283Srwatson _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 3247156283Srwatson ;; 3248156283Srwatson pgCC*) 3249156283Srwatson # Portland Group C++ compiler 3250156283Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 3251156283Srwatson _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' 3252156283Srwatson 3253156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 3254156283Srwatson _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 3255156283Srwatson _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' 3256156283Srwatson ;; 3257156283Srwatson cxx*) 3258156283Srwatson # Compaq C++ 3259156283Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 3260156283Srwatson _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' 3261156283Srwatson 3262156283Srwatson runpath_var=LD_RUN_PATH 3263156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 3264156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 3265156283Srwatson 3266156283Srwatson # Commands to make compiler produce verbose output that lists 3267156283Srwatson # what "hidden" libraries, object files and flags are used when 3268156283Srwatson # linking a shared library. 3269156283Srwatson # 3270156283Srwatson # There doesn't appear to be a way to prevent this compiler from 3271156283Srwatson # explicitly linking system object files so we need to strip them 3272156283Srwatson # from the output so that they don't get included in the library 3273156283Srwatson # dependencies. 3274156283Srwatson 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' 3275156283Srwatson ;; 3276156283Srwatson esac 3277156283Srwatson ;; 3278156283Srwatson lynxos*) 3279156283Srwatson # FIXME: insert proper C++ library support 3280156283Srwatson _LT_AC_TAGVAR(ld_shlibs, $1)=no 3281156283Srwatson ;; 3282156283Srwatson m88k*) 3283156283Srwatson # FIXME: insert proper C++ library support 3284156283Srwatson _LT_AC_TAGVAR(ld_shlibs, $1)=no 3285156283Srwatson ;; 3286156283Srwatson mvs*) 3287156283Srwatson case $cc_basename in 3288156283Srwatson cxx*) 3289156283Srwatson # FIXME: insert proper C++ library support 3290156283Srwatson _LT_AC_TAGVAR(ld_shlibs, $1)=no 3291156283Srwatson ;; 3292156283Srwatson *) 3293156283Srwatson # FIXME: insert proper C++ library support 3294156283Srwatson _LT_AC_TAGVAR(ld_shlibs, $1)=no 3295156283Srwatson ;; 3296156283Srwatson esac 3297156283Srwatson ;; 3298156283Srwatson netbsd*) 3299156283Srwatson if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then 3300156283Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 3301156283Srwatson wlarc= 3302156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 3303156283Srwatson _LT_AC_TAGVAR(hardcode_direct, $1)=yes 3304156283Srwatson _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 3305156283Srwatson fi 3306156283Srwatson # Workaround some broken pre-1.5 toolchains 3307156283Srwatson output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 3308156283Srwatson ;; 3309156283Srwatson openbsd2*) 3310156283Srwatson # C++ shared libraries are fairly broken 3311156283Srwatson _LT_AC_TAGVAR(ld_shlibs, $1)=no 3312156283Srwatson ;; 3313156283Srwatson openbsd*) 3314156283Srwatson _LT_AC_TAGVAR(hardcode_direct, $1)=yes 3315156283Srwatson _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 3316156283Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 3317156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 3318156283Srwatson if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 3319156283Srwatson _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' 3320156283Srwatson _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 3321156283Srwatson _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 3322156283Srwatson fi 3323156283Srwatson output_verbose_link_cmd='echo' 3324156283Srwatson ;; 3325156283Srwatson osf3*) 3326156283Srwatson case $cc_basename in 3327156283Srwatson KCC*) 3328156283Srwatson # Kuck and Associates, Inc. (KAI) C++ Compiler 3329156283Srwatson 3330156283Srwatson # KCC will only create a shared library if the output file 3331156283Srwatson # ends with ".so" (or ".sl" for HP-UX), so rename the library 3332156283Srwatson # to its proper name (with version) after linking. 3333156283Srwatson _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' 3334156283Srwatson 3335156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 3336156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 3337156283Srwatson 3338156283Srwatson # Archives containing C++ object files must be created using 3339156283Srwatson # "CC -Bstatic", where "CC" is the KAI C++ compiler. 3340156283Srwatson _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 3341156283Srwatson 3342156283Srwatson ;; 3343156283Srwatson RCC*) 3344156283Srwatson # Rational C++ 2.4.1 3345156283Srwatson # FIXME: insert proper C++ library support 3346156283Srwatson _LT_AC_TAGVAR(ld_shlibs, $1)=no 3347156283Srwatson ;; 3348156283Srwatson cxx*) 3349156283Srwatson _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 3350156283Srwatson _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' 3351156283Srwatson 3352156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 3353156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 3354156283Srwatson 3355156283Srwatson # Commands to make compiler produce verbose output that lists 3356156283Srwatson # what "hidden" libraries, object files and flags are used when 3357156283Srwatson # linking a shared library. 3358156283Srwatson # 3359156283Srwatson # There doesn't appear to be a way to prevent this compiler from 3360156283Srwatson # explicitly linking system object files so we need to strip them 3361156283Srwatson # from the output so that they don't get included in the library 3362156283Srwatson # dependencies. 3363156283Srwatson 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' 3364156283Srwatson ;; 3365156283Srwatson *) 3366156283Srwatson if test "$GXX" = yes && test "$with_gnu_ld" = no; then 3367156283Srwatson _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 3368156283Srwatson _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' 3369156283Srwatson 3370156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 3371156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 3372156283Srwatson 3373156283Srwatson # Commands to make compiler produce verbose output that lists 3374156283Srwatson # what "hidden" libraries, object files and flags are used when 3375156283Srwatson # linking a shared library. 3376156283Srwatson output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' 3377156283Srwatson 3378156283Srwatson else 3379156283Srwatson # FIXME: insert proper C++ library support 3380156283Srwatson _LT_AC_TAGVAR(ld_shlibs, $1)=no 3381156283Srwatson fi 3382156283Srwatson ;; 3383156283Srwatson esac 3384156283Srwatson ;; 3385156283Srwatson osf4* | osf5*) 3386156283Srwatson case $cc_basename in 3387156283Srwatson KCC*) 3388156283Srwatson # Kuck and Associates, Inc. (KAI) C++ Compiler 3389156283Srwatson 3390156283Srwatson # KCC will only create a shared library if the output file 3391156283Srwatson # ends with ".so" (or ".sl" for HP-UX), so rename the library 3392156283Srwatson # to its proper name (with version) after linking. 3393156283Srwatson _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' 3394156283Srwatson 3395156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 3396156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 3397156283Srwatson 3398156283Srwatson # Archives containing C++ object files must be created using 3399156283Srwatson # the KAI C++ compiler. 3400156283Srwatson _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' 3401156283Srwatson ;; 3402156283Srwatson RCC*) 3403156283Srwatson # Rational C++ 2.4.1 3404156283Srwatson # FIXME: insert proper C++ library support 3405156283Srwatson _LT_AC_TAGVAR(ld_shlibs, $1)=no 3406156283Srwatson ;; 3407156283Srwatson cxx*) 3408156283Srwatson _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 3409156283Srwatson _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' 3410156283Srwatson _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 3411156283Srwatson echo "-hidden">> $lib.exp~ 3412156283Srwatson $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~ 3413156283Srwatson $rm $lib.exp' 3414156283Srwatson 3415156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 3416156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 3417156283Srwatson 3418156283Srwatson # Commands to make compiler produce verbose output that lists 3419156283Srwatson # what "hidden" libraries, object files and flags are used when 3420156283Srwatson # linking a shared library. 3421156283Srwatson # 3422156283Srwatson # There doesn't appear to be a way to prevent this compiler from 3423156283Srwatson # explicitly linking system object files so we need to strip them 3424156283Srwatson # from the output so that they don't get included in the library 3425156283Srwatson # dependencies. 3426156283Srwatson 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' 3427156283Srwatson ;; 3428156283Srwatson *) 3429156283Srwatson if test "$GXX" = yes && test "$with_gnu_ld" = no; then 3430156283Srwatson _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 3431156283Srwatson _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' 3432156283Srwatson 3433156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 3434156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 3435156283Srwatson 3436156283Srwatson # Commands to make compiler produce verbose output that lists 3437156283Srwatson # what "hidden" libraries, object files and flags are used when 3438156283Srwatson # linking a shared library. 3439156283Srwatson output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' 3440156283Srwatson 3441156283Srwatson else 3442156283Srwatson # FIXME: insert proper C++ library support 3443156283Srwatson _LT_AC_TAGVAR(ld_shlibs, $1)=no 3444156283Srwatson fi 3445156283Srwatson ;; 3446156283Srwatson esac 3447156283Srwatson ;; 3448156283Srwatson psos*) 3449156283Srwatson # FIXME: insert proper C++ library support 3450156283Srwatson _LT_AC_TAGVAR(ld_shlibs, $1)=no 3451156283Srwatson ;; 3452156283Srwatson sco*) 3453156283Srwatson _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 3454156283Srwatson case $cc_basename in 3455156283Srwatson CC*) 3456156283Srwatson # FIXME: insert proper C++ library support 3457156283Srwatson _LT_AC_TAGVAR(ld_shlibs, $1)=no 3458156283Srwatson ;; 3459156283Srwatson *) 3460156283Srwatson # FIXME: insert proper C++ library support 3461156283Srwatson _LT_AC_TAGVAR(ld_shlibs, $1)=no 3462156283Srwatson ;; 3463156283Srwatson esac 3464156283Srwatson ;; 3465156283Srwatson sunos4*) 3466156283Srwatson case $cc_basename in 3467156283Srwatson CC*) 3468156283Srwatson # Sun C++ 4.x 3469156283Srwatson # FIXME: insert proper C++ library support 3470156283Srwatson _LT_AC_TAGVAR(ld_shlibs, $1)=no 3471156283Srwatson ;; 3472156283Srwatson lcc*) 3473156283Srwatson # Lucid 3474156283Srwatson # FIXME: insert proper C++ library support 3475156283Srwatson _LT_AC_TAGVAR(ld_shlibs, $1)=no 3476156283Srwatson ;; 3477156283Srwatson *) 3478156283Srwatson # FIXME: insert proper C++ library support 3479156283Srwatson _LT_AC_TAGVAR(ld_shlibs, $1)=no 3480156283Srwatson ;; 3481156283Srwatson esac 3482156283Srwatson ;; 3483156283Srwatson solaris*) 3484156283Srwatson case $cc_basename in 3485156283Srwatson CC*) 3486156283Srwatson # Sun C++ 4.2, 5.x and Centerline C++ 3487156283Srwatson _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes 3488156283Srwatson _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' 3489156283Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 3490156283Srwatson _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 3491156283Srwatson $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' 3492156283Srwatson 3493156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 3494156283Srwatson _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 3495156283Srwatson case $host_os in 3496156283Srwatson solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 3497156283Srwatson *) 3498156283Srwatson # The C++ compiler is used as linker so we must use $wl 3499156283Srwatson # flag to pass the commands to the underlying system 3500156283Srwatson # linker. We must also pass each convience library through 3501156283Srwatson # to the system linker between allextract/defaultextract. 3502156283Srwatson # The C++ compiler will combine linker options so we 3503156283Srwatson # cannot just pass the convience library names through 3504156283Srwatson # without $wl. 3505156283Srwatson # Supported since Solaris 2.6 (maybe 2.5.1?) 3506156283Srwatson _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' 3507156283Srwatson ;; 3508156283Srwatson esac 3509156283Srwatson _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 3510156283Srwatson 3511156283Srwatson output_verbose_link_cmd='echo' 3512156283Srwatson 3513156283Srwatson # Archives containing C++ object files must be created using 3514156283Srwatson # "CC -xar", where "CC" is the Sun C++ compiler. This is 3515156283Srwatson # necessary to make sure instantiated templates are included 3516156283Srwatson # in the archive. 3517156283Srwatson _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 3518156283Srwatson ;; 3519156283Srwatson gcx*) 3520156283Srwatson # Green Hills C++ Compiler 3521156283Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 3522156283Srwatson 3523156283Srwatson # The C++ compiler must be used to create the archive. 3524156283Srwatson _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 3525156283Srwatson ;; 3526156283Srwatson *) 3527156283Srwatson # GNU C++ compiler with Solaris linker 3528156283Srwatson if test "$GXX" = yes && test "$with_gnu_ld" = no; then 3529156283Srwatson _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' 3530156283Srwatson if $CC --version | grep -v '^2\.7' > /dev/null; then 3531156283Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 3532156283Srwatson _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 3533156283Srwatson $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' 3534156283Srwatson 3535156283Srwatson # Commands to make compiler produce verbose output that lists 3536156283Srwatson # what "hidden" libraries, object files and flags are used when 3537156283Srwatson # linking a shared library. 3538156283Srwatson output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" 3539156283Srwatson else 3540156283Srwatson # g++ 2.7 appears to require `-G' NOT `-shared' on this 3541156283Srwatson # platform. 3542156283Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 3543156283Srwatson _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 3544156283Srwatson $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' 3545156283Srwatson 3546156283Srwatson # Commands to make compiler produce verbose output that lists 3547156283Srwatson # what "hidden" libraries, object files and flags are used when 3548156283Srwatson # linking a shared library. 3549156283Srwatson output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" 3550156283Srwatson fi 3551156283Srwatson 3552156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' 3553156283Srwatson fi 3554156283Srwatson ;; 3555156283Srwatson esac 3556156283Srwatson ;; 3557156283Srwatson sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*) 3558156283Srwatson _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 3559156283Srwatson ;; 3560156283Srwatson tandem*) 3561156283Srwatson case $cc_basename in 3562156283Srwatson NCC*) 3563156283Srwatson # NonStop-UX NCC 3.20 3564156283Srwatson # FIXME: insert proper C++ library support 3565156283Srwatson _LT_AC_TAGVAR(ld_shlibs, $1)=no 3566156283Srwatson ;; 3567156283Srwatson *) 3568156283Srwatson # FIXME: insert proper C++ library support 3569156283Srwatson _LT_AC_TAGVAR(ld_shlibs, $1)=no 3570156283Srwatson ;; 3571156283Srwatson esac 3572156283Srwatson ;; 3573156283Srwatson vxworks*) 3574156283Srwatson # FIXME: insert proper C++ library support 3575156283Srwatson _LT_AC_TAGVAR(ld_shlibs, $1)=no 3576156283Srwatson ;; 3577156283Srwatson *) 3578156283Srwatson # FIXME: insert proper C++ library support 3579156283Srwatson _LT_AC_TAGVAR(ld_shlibs, $1)=no 3580156283Srwatson ;; 3581156283Srwatsonesac 3582156283SrwatsonAC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) 3583156283Srwatsontest "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 3584156283Srwatson 3585156283Srwatson_LT_AC_TAGVAR(GCC, $1)="$GXX" 3586156283Srwatson_LT_AC_TAGVAR(LD, $1)="$LD" 3587156283Srwatson 3588156283SrwatsonAC_LIBTOOL_POSTDEP_PREDEP($1) 3589156283SrwatsonAC_LIBTOOL_PROG_COMPILER_PIC($1) 3590156283SrwatsonAC_LIBTOOL_PROG_CC_C_O($1) 3591156283SrwatsonAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) 3592156283SrwatsonAC_LIBTOOL_PROG_LD_SHLIBS($1) 3593156283SrwatsonAC_LIBTOOL_SYS_DYNAMIC_LINKER($1) 3594156283SrwatsonAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) 3595156283SrwatsonAC_LIBTOOL_SYS_LIB_STRIP 3596156283SrwatsonAC_LIBTOOL_DLOPEN_SELF($1) 3597156283Srwatson 3598156283SrwatsonAC_LIBTOOL_CONFIG($1) 3599156283Srwatson 3600156283SrwatsonAC_LANG_POP 3601156283SrwatsonCC=$lt_save_CC 3602156283SrwatsonLDCXX=$LD 3603156283SrwatsonLD=$lt_save_LD 3604156283SrwatsonGCC=$lt_save_GCC 3605156283Srwatsonwith_gnu_ldcxx=$with_gnu_ld 3606156283Srwatsonwith_gnu_ld=$lt_save_with_gnu_ld 3607156283Srwatsonlt_cv_path_LDCXX=$lt_cv_path_LD 3608156283Srwatsonlt_cv_path_LD=$lt_save_path_LD 3609156283Srwatsonlt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 3610156283Srwatsonlt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 3611156283Srwatson])# AC_LIBTOOL_LANG_CXX_CONFIG 3612156283Srwatson 3613156283Srwatson# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME]) 3614156283Srwatson# ------------------------ 3615156283Srwatson# Figure out "hidden" library dependencies from verbose 3616156283Srwatson# compiler output when linking a shared library. 3617156283Srwatson# Parse the compiler output and extract the necessary 3618156283Srwatson# objects, libraries and library flags. 3619156283SrwatsonAC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[ 3620156283Srwatsondnl we can't use the lt_simple_compile_test_code here, 3621156283Srwatsondnl because it contains code intended for an executable, 3622156283Srwatsondnl not a library. It's possible we should let each 3623156283Srwatsondnl tag define a new lt_????_link_test_code variable, 3624156283Srwatsondnl but it's only used here... 3625156283Srwatsonifelse([$1],[],[cat > conftest.$ac_ext <<EOF 3626156283Srwatsonint a; 3627156283Srwatsonvoid foo (void) { a = 0; } 3628156283SrwatsonEOF 3629156283Srwatson],[$1],[CXX],[cat > conftest.$ac_ext <<EOF 3630156283Srwatsonclass Foo 3631156283Srwatson{ 3632156283Srwatsonpublic: 3633156283Srwatson Foo (void) { a = 0; } 3634156283Srwatsonprivate: 3635156283Srwatson int a; 3636156283Srwatson}; 3637156283SrwatsonEOF 3638156283Srwatson],[$1],[F77],[cat > conftest.$ac_ext <<EOF 3639156283Srwatson subroutine foo 3640156283Srwatson implicit none 3641156283Srwatson integer*4 a 3642156283Srwatson a=0 3643156283Srwatson return 3644156283Srwatson end 3645156283SrwatsonEOF 3646156283Srwatson],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF 3647156283Srwatsonpublic class foo { 3648156283Srwatson private int a; 3649156283Srwatson public void bar (void) { 3650156283Srwatson a = 0; 3651156283Srwatson } 3652156283Srwatson}; 3653156283SrwatsonEOF 3654156283Srwatson]) 3655156283Srwatsondnl Parse the compiler output and extract the necessary 3656156283Srwatsondnl objects, libraries and library flags. 3657156283Srwatsonif AC_TRY_EVAL(ac_compile); then 3658156283Srwatson # Parse the compiler output and extract the necessary 3659156283Srwatson # objects, libraries and library flags. 3660156283Srwatson 3661156283Srwatson # Sentinel used to keep track of whether or not we are before 3662156283Srwatson # the conftest object file. 3663156283Srwatson pre_test_object_deps_done=no 3664156283Srwatson 3665156283Srwatson # The `*' in the case matches for architectures that use `case' in 3666156283Srwatson # $output_verbose_cmd can trigger glob expansion during the loop 3667156283Srwatson # eval without this substitution. 3668156283Srwatson output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"` 3669156283Srwatson 3670156283Srwatson for p in `eval $output_verbose_link_cmd`; do 3671156283Srwatson case $p in 3672156283Srwatson 3673156283Srwatson -L* | -R* | -l*) 3674156283Srwatson # Some compilers place space between "-{L,R}" and the path. 3675156283Srwatson # Remove the space. 3676156283Srwatson if test $p = "-L" \ 3677156283Srwatson || test $p = "-R"; then 3678156283Srwatson prev=$p 3679156283Srwatson continue 3680156283Srwatson else 3681156283Srwatson prev= 3682156283Srwatson fi 3683156283Srwatson 3684156283Srwatson if test "$pre_test_object_deps_done" = no; then 3685156283Srwatson case $p in 3686156283Srwatson -L* | -R*) 3687156283Srwatson # Internal compiler library paths should come after those 3688156283Srwatson # provided the user. The postdeps already come after the 3689156283Srwatson # user supplied libs so there is no need to process them. 3690156283Srwatson if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then 3691156283Srwatson _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" 3692156283Srwatson else 3693156283Srwatson _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" 3694156283Srwatson fi 3695156283Srwatson ;; 3696156283Srwatson # The "-l" case would never come before the object being 3697156283Srwatson # linked, so don't bother handling this case. 3698156283Srwatson esac 3699156283Srwatson else 3700156283Srwatson if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then 3701156283Srwatson _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}" 3702156283Srwatson else 3703156283Srwatson _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}" 3704156283Srwatson fi 3705156283Srwatson fi 3706156283Srwatson ;; 3707156283Srwatson 3708156283Srwatson *.$objext) 3709156283Srwatson # This assumes that the test object file only shows up 3710156283Srwatson # once in the compiler output. 3711156283Srwatson if test "$p" = "conftest.$objext"; then 3712156283Srwatson pre_test_object_deps_done=yes 3713156283Srwatson continue 3714156283Srwatson fi 3715156283Srwatson 3716156283Srwatson if test "$pre_test_object_deps_done" = no; then 3717156283Srwatson if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then 3718156283Srwatson _LT_AC_TAGVAR(predep_objects, $1)="$p" 3719156283Srwatson else 3720156283Srwatson _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p" 3721156283Srwatson fi 3722156283Srwatson else 3723156283Srwatson if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then 3724156283Srwatson _LT_AC_TAGVAR(postdep_objects, $1)="$p" 3725156283Srwatson else 3726156283Srwatson _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p" 3727156283Srwatson fi 3728156283Srwatson fi 3729156283Srwatson ;; 3730156283Srwatson 3731156283Srwatson *) ;; # Ignore the rest. 3732156283Srwatson 3733156283Srwatson esac 3734156283Srwatson done 3735156283Srwatson 3736156283Srwatson # Clean up. 3737156283Srwatson rm -f a.out a.exe 3738156283Srwatsonelse 3739156283Srwatson echo "libtool.m4: error: problem compiling $1 test program" 3740156283Srwatsonfi 3741156283Srwatson 3742156283Srwatson$rm -f confest.$objext 3743156283Srwatson 3744156283Srwatson# PORTME: override above test on systems where it is broken 3745156283Srwatsonifelse([$1],[CXX], 3746156283Srwatson[case $host_os in 3747156283Srwatsonsolaris*) 3748156283Srwatson case $cc_basename in 3749156283Srwatson CC*) 3750156283Srwatson # Adding this requires a known-good setup of shared libraries for 3751156283Srwatson # Sun compiler versions before 5.6, else PIC objects from an old 3752156283Srwatson # archive will be linked into the output, leading to subtle bugs. 3753156283Srwatson _LT_AC_TAGVAR(postdeps,$1)='-lCstd -lCrun' 3754156283Srwatson ;; 3755156283Srwatson esac 3756156283Srwatsonesac 3757156283Srwatson]) 3758156283Srwatson 3759156283Srwatsoncase " $_LT_AC_TAGVAR(postdeps, $1) " in 3760156283Srwatson*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;; 3761156283Srwatsonesac 3762156283Srwatson])# AC_LIBTOOL_POSTDEP_PREDEP 3763156283Srwatson 3764156283Srwatson# AC_LIBTOOL_LANG_F77_CONFIG 3765156283Srwatson# ------------------------ 3766156283Srwatson# Ensure that the configuration vars for the C compiler are 3767156283Srwatson# suitably defined. Those variables are subsequently used by 3768156283Srwatson# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 3769156283SrwatsonAC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)]) 3770156283SrwatsonAC_DEFUN([_LT_AC_LANG_F77_CONFIG], 3771156283Srwatson[AC_REQUIRE([AC_PROG_F77]) 3772156283SrwatsonAC_LANG_PUSH(Fortran 77) 3773156283Srwatson 3774156283Srwatson_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 3775156283Srwatson_LT_AC_TAGVAR(allow_undefined_flag, $1)= 3776156283Srwatson_LT_AC_TAGVAR(always_export_symbols, $1)=no 3777156283Srwatson_LT_AC_TAGVAR(archive_expsym_cmds, $1)= 3778156283Srwatson_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= 3779156283Srwatson_LT_AC_TAGVAR(hardcode_direct, $1)=no 3780156283Srwatson_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= 3781156283Srwatson_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 3782156283Srwatson_LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 3783156283Srwatson_LT_AC_TAGVAR(hardcode_minus_L, $1)=no 3784156283Srwatson_LT_AC_TAGVAR(hardcode_automatic, $1)=no 3785156283Srwatson_LT_AC_TAGVAR(module_cmds, $1)= 3786156283Srwatson_LT_AC_TAGVAR(module_expsym_cmds, $1)= 3787156283Srwatson_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown 3788156283Srwatson_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 3789156283Srwatson_LT_AC_TAGVAR(no_undefined_flag, $1)= 3790156283Srwatson_LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 3791156283Srwatson_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no 3792156283Srwatson 3793156283Srwatson# Source file extension for f77 test sources. 3794156283Srwatsonac_ext=f 3795156283Srwatson 3796156283Srwatson# Object file extension for compiled f77 test sources. 3797156283Srwatsonobjext=o 3798156283Srwatson_LT_AC_TAGVAR(objext, $1)=$objext 3799156283Srwatson 3800156283Srwatson# Code to be used in simple compile tests 3801156283Srwatsonlt_simple_compile_test_code=" subroutine t\n return\n end\n" 3802156283Srwatson 3803156283Srwatson# Code to be used in simple link tests 3804156283Srwatsonlt_simple_link_test_code=" program t\n end\n" 3805156283Srwatson 3806156283Srwatson# ltmain only uses $CC for tagged configurations so make sure $CC is set. 3807156283Srwatson_LT_AC_SYS_COMPILER 3808156283Srwatson 3809156283Srwatson# save warnings/boilerplate of simple test code 3810156283Srwatson_LT_COMPILER_BOILERPLATE 3811156283Srwatson_LT_LINKER_BOILERPLATE 3812156283Srwatson 3813156283Srwatson# Allow CC to be a program name with arguments. 3814156283Srwatsonlt_save_CC="$CC" 3815156283SrwatsonCC=${F77-"f77"} 3816156283Srwatsoncompiler=$CC 3817156283Srwatson_LT_AC_TAGVAR(compiler, $1)=$CC 3818156283Srwatson_LT_CC_BASENAME([$compiler]) 3819156283Srwatson 3820156283SrwatsonAC_MSG_CHECKING([if libtool supports shared libraries]) 3821156283SrwatsonAC_MSG_RESULT([$can_build_shared]) 3822156283Srwatson 3823156283SrwatsonAC_MSG_CHECKING([whether to build shared libraries]) 3824156283Srwatsontest "$can_build_shared" = "no" && enable_shared=no 3825156283Srwatson 3826156283Srwatson# On AIX, shared libraries and static libraries use the same namespace, and 3827156283Srwatson# are all built from PIC. 3828156283Srwatsoncase $host_os in 3829156283Srwatsonaix3*) 3830156283Srwatson test "$enable_shared" = yes && enable_static=no 3831156283Srwatson if test -n "$RANLIB"; then 3832156283Srwatson archive_cmds="$archive_cmds~\$RANLIB \$lib" 3833156283Srwatson postinstall_cmds='$RANLIB $lib' 3834156283Srwatson fi 3835156283Srwatson ;; 3836156283Srwatsonaix4* | aix5*) 3837156283Srwatson if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 3838156283Srwatson test "$enable_shared" = yes && enable_static=no 3839156283Srwatson fi 3840156283Srwatson ;; 3841156283Srwatsonesac 3842156283SrwatsonAC_MSG_RESULT([$enable_shared]) 3843156283Srwatson 3844156283SrwatsonAC_MSG_CHECKING([whether to build static libraries]) 3845156283Srwatson# Make sure either enable_shared or enable_static is yes. 3846156283Srwatsontest "$enable_shared" = yes || enable_static=yes 3847156283SrwatsonAC_MSG_RESULT([$enable_static]) 3848156283Srwatson 3849156283Srwatsontest "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 3850156283Srwatson 3851156283Srwatson_LT_AC_TAGVAR(GCC, $1)="$G77" 3852156283Srwatson_LT_AC_TAGVAR(LD, $1)="$LD" 3853156283Srwatson 3854156283SrwatsonAC_LIBTOOL_PROG_COMPILER_PIC($1) 3855156283SrwatsonAC_LIBTOOL_PROG_CC_C_O($1) 3856156283SrwatsonAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) 3857156283SrwatsonAC_LIBTOOL_PROG_LD_SHLIBS($1) 3858156283SrwatsonAC_LIBTOOL_SYS_DYNAMIC_LINKER($1) 3859156283SrwatsonAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) 3860156283SrwatsonAC_LIBTOOL_SYS_LIB_STRIP 3861156283Srwatson 3862156283Srwatson 3863156283SrwatsonAC_LIBTOOL_CONFIG($1) 3864156283Srwatson 3865156283SrwatsonAC_LANG_POP 3866156283SrwatsonCC="$lt_save_CC" 3867156283Srwatson])# AC_LIBTOOL_LANG_F77_CONFIG 3868156283Srwatson 3869156283Srwatson 3870156283Srwatson# AC_LIBTOOL_LANG_GCJ_CONFIG 3871156283Srwatson# -------------------------- 3872156283Srwatson# Ensure that the configuration vars for the C compiler are 3873156283Srwatson# suitably defined. Those variables are subsequently used by 3874156283Srwatson# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 3875156283SrwatsonAC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)]) 3876156283SrwatsonAC_DEFUN([_LT_AC_LANG_GCJ_CONFIG], 3877156283Srwatson[AC_LANG_SAVE 3878156283Srwatson 3879156283Srwatson# Source file extension for Java test sources. 3880156283Srwatsonac_ext=java 3881156283Srwatson 3882156283Srwatson# Object file extension for compiled Java test sources. 3883156283Srwatsonobjext=o 3884156283Srwatson_LT_AC_TAGVAR(objext, $1)=$objext 3885156283Srwatson 3886156283Srwatson# Code to be used in simple compile tests 3887156283Srwatsonlt_simple_compile_test_code="class foo {}\n" 3888156283Srwatson 3889156283Srwatson# Code to be used in simple link tests 3890156283Srwatsonlt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }\n' 3891156283Srwatson 3892156283Srwatson# ltmain only uses $CC for tagged configurations so make sure $CC is set. 3893156283Srwatson_LT_AC_SYS_COMPILER 3894156283Srwatson 3895156283Srwatson# save warnings/boilerplate of simple test code 3896156283Srwatson_LT_COMPILER_BOILERPLATE 3897156283Srwatson_LT_LINKER_BOILERPLATE 3898156283Srwatson 3899156283Srwatson# Allow CC to be a program name with arguments. 3900156283Srwatsonlt_save_CC="$CC" 3901156283SrwatsonCC=${GCJ-"gcj"} 3902156283Srwatsoncompiler=$CC 3903156283Srwatson_LT_AC_TAGVAR(compiler, $1)=$CC 3904156283Srwatson_LT_CC_BASENAME([$compiler]) 3905156283Srwatson 3906156283Srwatson# GCJ did not exist at the time GCC didn't implicitly link libc in. 3907156283Srwatson_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 3908156283Srwatson 3909156283Srwatson_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 3910156283Srwatson 3911156283SrwatsonAC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) 3912156283SrwatsonAC_LIBTOOL_PROG_COMPILER_PIC($1) 3913156283SrwatsonAC_LIBTOOL_PROG_CC_C_O($1) 3914156283SrwatsonAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) 3915156283SrwatsonAC_LIBTOOL_PROG_LD_SHLIBS($1) 3916156283SrwatsonAC_LIBTOOL_SYS_DYNAMIC_LINKER($1) 3917156283SrwatsonAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) 3918156283SrwatsonAC_LIBTOOL_SYS_LIB_STRIP 3919156283SrwatsonAC_LIBTOOL_DLOPEN_SELF($1) 3920156283Srwatson 3921156283SrwatsonAC_LIBTOOL_CONFIG($1) 3922156283Srwatson 3923156283SrwatsonAC_LANG_RESTORE 3924156283SrwatsonCC="$lt_save_CC" 3925156283Srwatson])# AC_LIBTOOL_LANG_GCJ_CONFIG 3926156283Srwatson 3927156283Srwatson 3928156283Srwatson# AC_LIBTOOL_LANG_RC_CONFIG 3929156283Srwatson# -------------------------- 3930156283Srwatson# Ensure that the configuration vars for the Windows resource compiler are 3931156283Srwatson# suitably defined. Those variables are subsequently used by 3932156283Srwatson# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 3933156283SrwatsonAC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)]) 3934156283SrwatsonAC_DEFUN([_LT_AC_LANG_RC_CONFIG], 3935156283Srwatson[AC_LANG_SAVE 3936156283Srwatson 3937156283Srwatson# Source file extension for RC test sources. 3938156283Srwatsonac_ext=rc 3939156283Srwatson 3940156283Srwatson# Object file extension for compiled RC test sources. 3941156283Srwatsonobjext=o 3942156283Srwatson_LT_AC_TAGVAR(objext, $1)=$objext 3943156283Srwatson 3944156283Srwatson# Code to be used in simple compile tests 3945156283Srwatsonlt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n' 3946156283Srwatson 3947156283Srwatson# Code to be used in simple link tests 3948156283Srwatsonlt_simple_link_test_code="$lt_simple_compile_test_code" 3949156283Srwatson 3950156283Srwatson# ltmain only uses $CC for tagged configurations so make sure $CC is set. 3951156283Srwatson_LT_AC_SYS_COMPILER 3952156283Srwatson 3953156283Srwatson# save warnings/boilerplate of simple test code 3954156283Srwatson_LT_COMPILER_BOILERPLATE 3955156283Srwatson_LT_LINKER_BOILERPLATE 3956156283Srwatson 3957156283Srwatson# Allow CC to be a program name with arguments. 3958156283Srwatsonlt_save_CC="$CC" 3959156283SrwatsonCC=${RC-"windres"} 3960156283Srwatsoncompiler=$CC 3961156283Srwatson_LT_AC_TAGVAR(compiler, $1)=$CC 3962156283Srwatson_LT_CC_BASENAME([$compiler]) 3963156283Srwatson_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 3964156283Srwatson 3965156283SrwatsonAC_LIBTOOL_CONFIG($1) 3966156283Srwatson 3967156283SrwatsonAC_LANG_RESTORE 3968156283SrwatsonCC="$lt_save_CC" 3969156283Srwatson])# AC_LIBTOOL_LANG_RC_CONFIG 3970156283Srwatson 3971156283Srwatson 3972156283Srwatson# AC_LIBTOOL_CONFIG([TAGNAME]) 3973156283Srwatson# ---------------------------- 3974156283Srwatson# If TAGNAME is not passed, then create an initial libtool script 3975156283Srwatson# with a default configuration from the untagged config vars. Otherwise 3976156283Srwatson# add code to config.status for appending the configuration named by 3977156283Srwatson# TAGNAME from the matching tagged config vars. 3978156283SrwatsonAC_DEFUN([AC_LIBTOOL_CONFIG], 3979156283Srwatson[# The else clause should only fire when bootstrapping the 3980156283Srwatson# libtool distribution, otherwise you forgot to ship ltmain.sh 3981156283Srwatson# with your package, and you will get complaints that there are 3982156283Srwatson# no rules to generate ltmain.sh. 3983156283Srwatsonif test -f "$ltmain"; then 3984156283Srwatson # See if we are running on zsh, and set the options which allow our commands through 3985156283Srwatson # without removal of \ escapes. 3986156283Srwatson if test -n "${ZSH_VERSION+set}" ; then 3987156283Srwatson setopt NO_GLOB_SUBST 3988156283Srwatson fi 3989156283Srwatson # Now quote all the things that may contain metacharacters while being 3990156283Srwatson # careful not to overquote the AC_SUBSTed values. We take copies of the 3991156283Srwatson # variables and quote the copies for generation of the libtool script. 3992156283Srwatson for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \ 3993156283Srwatson SED SHELL STRIP \ 3994156283Srwatson libname_spec library_names_spec soname_spec extract_expsyms_cmds \ 3995156283Srwatson old_striplib striplib file_magic_cmd finish_cmds finish_eval \ 3996156283Srwatson deplibs_check_method reload_flag reload_cmds need_locks \ 3997156283Srwatson lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ 3998156283Srwatson lt_cv_sys_global_symbol_to_c_name_address \ 3999156283Srwatson sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ 4000156283Srwatson old_postinstall_cmds old_postuninstall_cmds \ 4001156283Srwatson _LT_AC_TAGVAR(compiler, $1) \ 4002156283Srwatson _LT_AC_TAGVAR(CC, $1) \ 4003156283Srwatson _LT_AC_TAGVAR(LD, $1) \ 4004156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \ 4005156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \ 4006156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \ 4007156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \ 4008156283Srwatson _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \ 4009156283Srwatson _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \ 4010156283Srwatson _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \ 4011156283Srwatson _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \ 4012156283Srwatson _LT_AC_TAGVAR(old_archive_cmds, $1) \ 4013156283Srwatson _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \ 4014156283Srwatson _LT_AC_TAGVAR(predep_objects, $1) \ 4015156283Srwatson _LT_AC_TAGVAR(postdep_objects, $1) \ 4016156283Srwatson _LT_AC_TAGVAR(predeps, $1) \ 4017156283Srwatson _LT_AC_TAGVAR(postdeps, $1) \ 4018156283Srwatson _LT_AC_TAGVAR(compiler_lib_search_path, $1) \ 4019156283Srwatson _LT_AC_TAGVAR(archive_cmds, $1) \ 4020156283Srwatson _LT_AC_TAGVAR(archive_expsym_cmds, $1) \ 4021156283Srwatson _LT_AC_TAGVAR(postinstall_cmds, $1) \ 4022156283Srwatson _LT_AC_TAGVAR(postuninstall_cmds, $1) \ 4023156283Srwatson _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \ 4024156283Srwatson _LT_AC_TAGVAR(allow_undefined_flag, $1) \ 4025156283Srwatson _LT_AC_TAGVAR(no_undefined_flag, $1) \ 4026156283Srwatson _LT_AC_TAGVAR(export_symbols_cmds, $1) \ 4027156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \ 4028156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \ 4029156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \ 4030156283Srwatson _LT_AC_TAGVAR(hardcode_automatic, $1) \ 4031156283Srwatson _LT_AC_TAGVAR(module_cmds, $1) \ 4032156283Srwatson _LT_AC_TAGVAR(module_expsym_cmds, $1) \ 4033156283Srwatson _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \ 4034156283Srwatson _LT_AC_TAGVAR(exclude_expsyms, $1) \ 4035156283Srwatson _LT_AC_TAGVAR(include_expsyms, $1); do 4036156283Srwatson 4037156283Srwatson case $var in 4038156283Srwatson _LT_AC_TAGVAR(old_archive_cmds, $1) | \ 4039156283Srwatson _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \ 4040156283Srwatson _LT_AC_TAGVAR(archive_cmds, $1) | \ 4041156283Srwatson _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \ 4042156283Srwatson _LT_AC_TAGVAR(module_cmds, $1) | \ 4043156283Srwatson _LT_AC_TAGVAR(module_expsym_cmds, $1) | \ 4044156283Srwatson _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \ 4045156283Srwatson _LT_AC_TAGVAR(export_symbols_cmds, $1) | \ 4046156283Srwatson extract_expsyms_cmds | reload_cmds | finish_cmds | \ 4047156283Srwatson postinstall_cmds | postuninstall_cmds | \ 4048156283Srwatson old_postinstall_cmds | old_postuninstall_cmds | \ 4049156283Srwatson sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) 4050156283Srwatson # Double-quote double-evaled strings. 4051156283Srwatson eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" 4052156283Srwatson ;; 4053156283Srwatson *) 4054156283Srwatson eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" 4055156283Srwatson ;; 4056156283Srwatson esac 4057156283Srwatson done 4058156283Srwatson 4059156283Srwatson case $lt_echo in 4060156283Srwatson *'\[$]0 --fallback-echo"') 4061156283Srwatson lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'` 4062156283Srwatson ;; 4063156283Srwatson esac 4064156283Srwatson 4065156283Srwatsonifelse([$1], [], 4066156283Srwatson [cfgfile="${ofile}T" 4067156283Srwatson trap "$rm \"$cfgfile\"; exit 1" 1 2 15 4068156283Srwatson $rm -f "$cfgfile" 4069156283Srwatson AC_MSG_NOTICE([creating $ofile])], 4070156283Srwatson [cfgfile="$ofile"]) 4071156283Srwatson 4072156283Srwatson cat <<__EOF__ >> "$cfgfile" 4073156283Srwatsonifelse([$1], [], 4074156283Srwatson[#! $SHELL 4075156283Srwatson 4076156283Srwatson# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. 4077156283Srwatson# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) 4078156283Srwatson# NOTE: Changes made to this file will be lost: look at ltmain.sh. 4079156283Srwatson# 4080156283Srwatson# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 4081156283Srwatson# Free Software Foundation, Inc. 4082156283Srwatson# 4083156283Srwatson# This file is part of GNU Libtool: 4084156283Srwatson# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 4085156283Srwatson# 4086156283Srwatson# This program is free software; you can redistribute it and/or modify 4087156283Srwatson# it under the terms of the GNU General Public License as published by 4088156283Srwatson# the Free Software Foundation; either version 2 of the License, or 4089156283Srwatson# (at your option) any later version. 4090156283Srwatson# 4091156283Srwatson# This program is distributed in the hope that it will be useful, but 4092156283Srwatson# WITHOUT ANY WARRANTY; without even the implied warranty of 4093156283Srwatson# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 4094156283Srwatson# General Public License for more details. 4095156283Srwatson# 4096156283Srwatson# You should have received a copy of the GNU General Public License 4097156283Srwatson# along with this program; if not, write to the Free Software 4098156283Srwatson# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 4099156283Srwatson# 4100156283Srwatson# As a special exception to the GNU General Public License, if you 4101156283Srwatson# distribute this file as part of a program that contains a 4102156283Srwatson# configuration script generated by Autoconf, you may include it under 4103156283Srwatson# the same distribution terms that you use for the rest of that program. 4104156283Srwatson 4105156283Srwatson# A sed program that does not truncate output. 4106156283SrwatsonSED=$lt_SED 4107156283Srwatson 4108156283Srwatson# Sed that helps us avoid accidentally triggering echo(1) options like -n. 4109156283SrwatsonXsed="$SED -e 1s/^X//" 4110156283Srwatson 4111156283Srwatson# The HP-UX ksh and POSIX shell print the target directory to stdout 4112156283Srwatson# if CDPATH is set. 4113156283Srwatson(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 4114156283Srwatson 4115156283Srwatson# The names of the tagged configurations supported by this script. 4116156283Srwatsonavailable_tags= 4117156283Srwatson 4118156283Srwatson# ### BEGIN LIBTOOL CONFIG], 4119156283Srwatson[# ### BEGIN LIBTOOL TAG CONFIG: $tagname]) 4120156283Srwatson 4121156283Srwatson# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 4122156283Srwatson 4123156283Srwatson# Shell to use when invoking shell scripts. 4124156283SrwatsonSHELL=$lt_SHELL 4125156283Srwatson 4126156283Srwatson# Whether or not to build shared libraries. 4127156283Srwatsonbuild_libtool_libs=$enable_shared 4128156283Srwatson 4129156283Srwatson# Whether or not to build static libraries. 4130156283Srwatsonbuild_old_libs=$enable_static 4131156283Srwatson 4132156283Srwatson# Whether or not to add -lc for building shared libraries. 4133156283Srwatsonbuild_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1) 4134156283Srwatson 4135156283Srwatson# Whether or not to disallow shared libs when runtime libs are static 4136156283Srwatsonallow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) 4137156283Srwatson 4138156283Srwatson# Whether or not to optimize for fast installation. 4139156283Srwatsonfast_install=$enable_fast_install 4140156283Srwatson 4141156283Srwatson# The host system. 4142156283Srwatsonhost_alias=$host_alias 4143156283Srwatsonhost=$host 4144156283Srwatsonhost_os=$host_os 4145156283Srwatson 4146156283Srwatson# The build system. 4147156283Srwatsonbuild_alias=$build_alias 4148156283Srwatsonbuild=$build 4149156283Srwatsonbuild_os=$build_os 4150156283Srwatson 4151156283Srwatson# An echo program that does not interpret backslashes. 4152156283Srwatsonecho=$lt_echo 4153156283Srwatson 4154156283Srwatson# The archiver. 4155156283SrwatsonAR=$lt_AR 4156156283SrwatsonAR_FLAGS=$lt_AR_FLAGS 4157156283Srwatson 4158156283Srwatson# A C compiler. 4159156283SrwatsonLTCC=$lt_LTCC 4160156283Srwatson 4161156283Srwatson# A language-specific compiler. 4162156283SrwatsonCC=$lt_[]_LT_AC_TAGVAR(compiler, $1) 4163156283Srwatson 4164156283Srwatson# Is the compiler the GNU C compiler? 4165156283Srwatsonwith_gcc=$_LT_AC_TAGVAR(GCC, $1) 4166156283Srwatson 4167156283Srwatson# An ERE matcher. 4168156283SrwatsonEGREP=$lt_EGREP 4169156283Srwatson 4170156283Srwatson# The linker used to build libraries. 4171156283SrwatsonLD=$lt_[]_LT_AC_TAGVAR(LD, $1) 4172156283Srwatson 4173156283Srwatson# Whether we need hard or soft links. 4174156283SrwatsonLN_S=$lt_LN_S 4175156283Srwatson 4176156283Srwatson# A BSD-compatible nm program. 4177156283SrwatsonNM=$lt_NM 4178156283Srwatson 4179156283Srwatson# A symbol stripping program 4180156283SrwatsonSTRIP=$lt_STRIP 4181156283Srwatson 4182156283Srwatson# Used to examine libraries when file_magic_cmd begins "file" 4183156283SrwatsonMAGIC_CMD=$MAGIC_CMD 4184156283Srwatson 4185156283Srwatson# Used on cygwin: DLL creation program. 4186156283SrwatsonDLLTOOL="$DLLTOOL" 4187156283Srwatson 4188156283Srwatson# Used on cygwin: object dumper. 4189156283SrwatsonOBJDUMP="$OBJDUMP" 4190156283Srwatson 4191156283Srwatson# Used on cygwin: assembler. 4192156283SrwatsonAS="$AS" 4193156283Srwatson 4194156283Srwatson# The name of the directory that contains temporary libtool files. 4195156283Srwatsonobjdir=$objdir 4196156283Srwatson 4197156283Srwatson# How to create reloadable object files. 4198156283Srwatsonreload_flag=$lt_reload_flag 4199156283Srwatsonreload_cmds=$lt_reload_cmds 4200156283Srwatson 4201156283Srwatson# How to pass a linker flag through the compiler. 4202156283Srwatsonwl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) 4203156283Srwatson 4204156283Srwatson# Object file suffix (normally "o"). 4205156283Srwatsonobjext="$ac_objext" 4206156283Srwatson 4207156283Srwatson# Old archive suffix (normally "a"). 4208156283Srwatsonlibext="$libext" 4209156283Srwatson 4210156283Srwatson# Shared library suffix (normally ".so"). 4211156283Srwatsonshrext_cmds='$shrext_cmds' 4212156283Srwatson 4213156283Srwatson# Executable file suffix (normally ""). 4214156283Srwatsonexeext="$exeext" 4215156283Srwatson 4216156283Srwatson# Additional compiler flags for building library objects. 4217156283Srwatsonpic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) 4218156283Srwatsonpic_mode=$pic_mode 4219156283Srwatson 4220156283Srwatson# What is the maximum length of a command? 4221156283Srwatsonmax_cmd_len=$lt_cv_sys_max_cmd_len 4222156283Srwatson 4223156283Srwatson# Does compiler simultaneously support -c and -o options? 4224156283Srwatsoncompiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) 4225156283Srwatson 4226156283Srwatson# Must we lock files when doing compilation? 4227156283Srwatsonneed_locks=$lt_need_locks 4228156283Srwatson 4229156283Srwatson# Do we need the lib prefix for modules? 4230156283Srwatsonneed_lib_prefix=$need_lib_prefix 4231156283Srwatson 4232156283Srwatson# Do we need a version for libraries? 4233156283Srwatsonneed_version=$need_version 4234156283Srwatson 4235156283Srwatson# Whether dlopen is supported. 4236156283Srwatsondlopen_support=$enable_dlopen 4237156283Srwatson 4238156283Srwatson# Whether dlopen of programs is supported. 4239156283Srwatsondlopen_self=$enable_dlopen_self 4240156283Srwatson 4241156283Srwatson# Whether dlopen of statically linked programs is supported. 4242156283Srwatsondlopen_self_static=$enable_dlopen_self_static 4243156283Srwatson 4244156283Srwatson# Compiler flag to prevent dynamic linking. 4245156283Srwatsonlink_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1) 4246156283Srwatson 4247156283Srwatson# Compiler flag to turn off builtin functions. 4248156283Srwatsonno_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) 4249156283Srwatson 4250156283Srwatson# Compiler flag to allow reflexive dlopens. 4251156283Srwatsonexport_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1) 4252156283Srwatson 4253156283Srwatson# Compiler flag to generate shared objects directly from archives. 4254156283Srwatsonwhole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1) 4255156283Srwatson 4256156283Srwatson# Compiler flag to generate thread-safe objects. 4257156283Srwatsonthread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1) 4258156283Srwatson 4259156283Srwatson# Library versioning type. 4260156283Srwatsonversion_type=$version_type 4261156283Srwatson 4262156283Srwatson# Format of library name prefix. 4263156283Srwatsonlibname_spec=$lt_libname_spec 4264156283Srwatson 4265156283Srwatson# List of archive names. First name is the real one, the rest are links. 4266156283Srwatson# The last name is the one that the linker finds with -lNAME. 4267156283Srwatsonlibrary_names_spec=$lt_library_names_spec 4268156283Srwatson 4269156283Srwatson# The coded name of the library, if different from the real name. 4270156283Srwatsonsoname_spec=$lt_soname_spec 4271156283Srwatson 4272156283Srwatson# Commands used to build and install an old-style archive. 4273156283SrwatsonRANLIB=$lt_RANLIB 4274156283Srwatsonold_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1) 4275156283Srwatsonold_postinstall_cmds=$lt_old_postinstall_cmds 4276156283Srwatsonold_postuninstall_cmds=$lt_old_postuninstall_cmds 4277156283Srwatson 4278156283Srwatson# Create an old-style archive from a shared archive. 4279156283Srwatsonold_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1) 4280156283Srwatson 4281156283Srwatson# Create a temporary old-style archive to link instead of a shared archive. 4282156283Srwatsonold_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) 4283156283Srwatson 4284156283Srwatson# Commands used to build and install a shared archive. 4285156283Srwatsonarchive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1) 4286156283Srwatsonarchive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1) 4287156283Srwatsonpostinstall_cmds=$lt_postinstall_cmds 4288156283Srwatsonpostuninstall_cmds=$lt_postuninstall_cmds 4289156283Srwatson 4290156283Srwatson# Commands used to build a loadable module (assumed same as above if empty) 4291156283Srwatsonmodule_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1) 4292156283Srwatsonmodule_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1) 4293156283Srwatson 4294156283Srwatson# Commands to strip libraries. 4295156283Srwatsonold_striplib=$lt_old_striplib 4296156283Srwatsonstriplib=$lt_striplib 4297156283Srwatson 4298156283Srwatson# Dependencies to place before the objects being linked to create a 4299156283Srwatson# shared library. 4300156283Srwatsonpredep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1) 4301156283Srwatson 4302156283Srwatson# Dependencies to place after the objects being linked to create a 4303156283Srwatson# shared library. 4304156283Srwatsonpostdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1) 4305156283Srwatson 4306156283Srwatson# Dependencies to place before the objects being linked to create a 4307156283Srwatson# shared library. 4308156283Srwatsonpredeps=$lt_[]_LT_AC_TAGVAR(predeps, $1) 4309156283Srwatson 4310156283Srwatson# Dependencies to place after the objects being linked to create a 4311156283Srwatson# shared library. 4312156283Srwatsonpostdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1) 4313156283Srwatson 4314156283Srwatson# The library search path used internally by the compiler when linking 4315156283Srwatson# a shared library. 4316156283Srwatsoncompiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1) 4317156283Srwatson 4318156283Srwatson# Method to check whether dependent libraries are shared objects. 4319156283Srwatsondeplibs_check_method=$lt_deplibs_check_method 4320156283Srwatson 4321156283Srwatson# Command to use when deplibs_check_method == file_magic. 4322156283Srwatsonfile_magic_cmd=$lt_file_magic_cmd 4323156283Srwatson 4324156283Srwatson# Flag that allows shared libraries with undefined symbols to be built. 4325156283Srwatsonallow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1) 4326156283Srwatson 4327156283Srwatson# Flag that forces no undefined symbols. 4328156283Srwatsonno_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1) 4329156283Srwatson 4330156283Srwatson# Commands used to finish a libtool library installation in a directory. 4331156283Srwatsonfinish_cmds=$lt_finish_cmds 4332156283Srwatson 4333156283Srwatson# Same as above, but a single script fragment to be evaled but not shown. 4334156283Srwatsonfinish_eval=$lt_finish_eval 4335156283Srwatson 4336156283Srwatson# Take the output of nm and produce a listing of raw symbols and C names. 4337156283Srwatsonglobal_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe 4338156283Srwatson 4339156283Srwatson# Transform the output of nm in a proper C declaration 4340156283Srwatsonglobal_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl 4341156283Srwatson 4342156283Srwatson# Transform the output of nm in a C name address pair 4343156283Srwatsonglobal_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address 4344156283Srwatson 4345156283Srwatson# This is the shared library runtime path variable. 4346156283Srwatsonrunpath_var=$runpath_var 4347156283Srwatson 4348156283Srwatson# This is the shared library path variable. 4349156283Srwatsonshlibpath_var=$shlibpath_var 4350156283Srwatson 4351156283Srwatson# Is shlibpath searched before the hard-coded library search path? 4352156283Srwatsonshlibpath_overrides_runpath=$shlibpath_overrides_runpath 4353156283Srwatson 4354156283Srwatson# How to hardcode a shared library path into an executable. 4355156283Srwatsonhardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1) 4356156283Srwatson 4357156283Srwatson# Whether we should hardcode library paths into libraries. 4358156283Srwatsonhardcode_into_libs=$hardcode_into_libs 4359156283Srwatson 4360156283Srwatson# Flag to hardcode \$libdir into a binary during linking. 4361156283Srwatson# This must work even if \$libdir does not exist. 4362156283Srwatsonhardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) 4363156283Srwatson 4364156283Srwatson# If ld is used when linking, flag to hardcode \$libdir into 4365156283Srwatson# a binary during linking. This must work even if \$libdir does 4366156283Srwatson# not exist. 4367156283Srwatsonhardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) 4368156283Srwatson 4369156283Srwatson# Whether we need a single -rpath flag with a separated argument. 4370156283Srwatsonhardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1) 4371156283Srwatson 4372156283Srwatson# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the 4373156283Srwatson# resulting binary. 4374156283Srwatsonhardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1) 4375156283Srwatson 4376156283Srwatson# Set to yes if using the -LDIR flag during linking hardcodes DIR into the 4377156283Srwatson# resulting binary. 4378156283Srwatsonhardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1) 4379156283Srwatson 4380156283Srwatson# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into 4381156283Srwatson# the resulting binary. 4382156283Srwatsonhardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1) 4383156283Srwatson 4384156283Srwatson# Set to yes if building a shared library automatically hardcodes DIR into the library 4385156283Srwatson# and all subsequent libraries and executables linked against it. 4386156283Srwatsonhardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1) 4387156283Srwatson 4388156283Srwatson# Variables whose values should be saved in libtool wrapper scripts and 4389156283Srwatson# restored at relink time. 4390156283Srwatsonvariables_saved_for_relink="$variables_saved_for_relink" 4391156283Srwatson 4392156283Srwatson# Whether libtool must link a program against all its dependency libraries. 4393156283Srwatsonlink_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1) 4394156283Srwatson 4395156283Srwatson# Compile-time system search path for libraries 4396156283Srwatsonsys_lib_search_path_spec=$lt_sys_lib_search_path_spec 4397156283Srwatson 4398156283Srwatson# Run-time system search path for libraries 4399156283Srwatsonsys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec 4400156283Srwatson 4401156283Srwatson# Fix the shell variable \$srcfile for the compiler. 4402156283Srwatsonfix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)" 4403156283Srwatson 4404156283Srwatson# Set to yes if exported symbols are required. 4405156283Srwatsonalways_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1) 4406156283Srwatson 4407156283Srwatson# The commands to list exported symbols. 4408156283Srwatsonexport_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1) 4409156283Srwatson 4410156283Srwatson# The commands to extract the exported symbol list from a shared archive. 4411156283Srwatsonextract_expsyms_cmds=$lt_extract_expsyms_cmds 4412156283Srwatson 4413156283Srwatson# Symbols that should not be listed in the preloaded symbols. 4414156283Srwatsonexclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1) 4415156283Srwatson 4416156283Srwatson# Symbols that must always be exported. 4417156283Srwatsoninclude_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1) 4418156283Srwatson 4419156283Srwatsonifelse([$1],[], 4420156283Srwatson[# ### END LIBTOOL CONFIG], 4421156283Srwatson[# ### END LIBTOOL TAG CONFIG: $tagname]) 4422156283Srwatson 4423156283Srwatson__EOF__ 4424156283Srwatson 4425156283Srwatsonifelse([$1],[], [ 4426156283Srwatson case $host_os in 4427156283Srwatson aix3*) 4428156283Srwatson cat <<\EOF >> "$cfgfile" 4429156283Srwatson 4430156283Srwatson# AIX sometimes has problems with the GCC collect2 program. For some 4431156283Srwatson# reason, if we set the COLLECT_NAMES environment variable, the problems 4432156283Srwatson# vanish in a puff of smoke. 4433156283Srwatsonif test "X${COLLECT_NAMES+set}" != Xset; then 4434156283Srwatson COLLECT_NAMES= 4435156283Srwatson export COLLECT_NAMES 4436156283Srwatsonfi 4437156283SrwatsonEOF 4438156283Srwatson ;; 4439156283Srwatson esac 4440156283Srwatson 4441156283Srwatson # We use sed instead of cat because bash on DJGPP gets confused if 4442156283Srwatson # if finds mixed CR/LF and LF-only lines. Since sed operates in 4443156283Srwatson # text mode, it properly converts lines to CR/LF. This bash problem 4444156283Srwatson # is reportedly fixed, but why not run on old versions too? 4445156283Srwatson sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1) 4446156283Srwatson 4447156283Srwatson mv -f "$cfgfile" "$ofile" || \ 4448156283Srwatson (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 4449156283Srwatson chmod +x "$ofile" 4450156283Srwatson]) 4451156283Srwatsonelse 4452156283Srwatson # If there is no Makefile yet, we rely on a make rule to execute 4453156283Srwatson # `config.status --recheck' to rerun these tests and create the 4454156283Srwatson # libtool script then. 4455156283Srwatson ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` 4456156283Srwatson if test -f "$ltmain_in"; then 4457156283Srwatson test -f Makefile && make "$ltmain" 4458156283Srwatson fi 4459156283Srwatsonfi 4460156283Srwatson])# AC_LIBTOOL_CONFIG 4461156283Srwatson 4462156283Srwatson 4463156283Srwatson# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME]) 4464156283Srwatson# ------------------------------------------- 4465156283SrwatsonAC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], 4466156283Srwatson[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl 4467156283Srwatson 4468156283Srwatson_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 4469156283Srwatson 4470156283Srwatsonif test "$GCC" = yes; then 4471156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 4472156283Srwatson 4473156283Srwatson AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 4474156283Srwatson lt_cv_prog_compiler_rtti_exceptions, 4475156283Srwatson [-fno-rtti -fno-exceptions], [], 4476156283Srwatson [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 4477156283Srwatsonfi 4478156283Srwatson])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI 4479156283Srwatson 4480156283Srwatson 4481156283Srwatson# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE 4482156283Srwatson# --------------------------------- 4483156283SrwatsonAC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], 4484156283Srwatson[AC_REQUIRE([AC_CANONICAL_HOST]) 4485156283SrwatsonAC_REQUIRE([AC_PROG_NM]) 4486156283SrwatsonAC_REQUIRE([AC_OBJEXT]) 4487156283Srwatson# Check for command to grab the raw symbol name followed by C symbol from nm. 4488156283SrwatsonAC_MSG_CHECKING([command to parse $NM output from $compiler object]) 4489156283SrwatsonAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 4490156283Srwatson[ 4491156283Srwatson# These are sane defaults that work on at least a few old systems. 4492156283Srwatson# [They come from Ultrix. What could be older than Ultrix?!! ;)] 4493156283Srwatson 4494156283Srwatson# Character class describing NM global symbol codes. 4495156283Srwatsonsymcode='[[BCDEGRST]]' 4496156283Srwatson 4497156283Srwatson# Regexp to match symbols that can be accessed directly from C. 4498156283Srwatsonsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 4499156283Srwatson 4500156283Srwatson# Transform an extracted symbol line into a proper C declaration 4501156283Srwatsonlt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'" 4502156283Srwatson 4503156283Srwatson# Transform an extracted symbol line into symbol name and symbol address 4504156283Srwatsonlt_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'" 4505156283Srwatson 4506156283Srwatson# Define system-specific variables. 4507156283Srwatsoncase $host_os in 4508156283Srwatsonaix*) 4509156283Srwatson symcode='[[BCDT]]' 4510156283Srwatson ;; 4511156283Srwatsoncygwin* | mingw* | pw32*) 4512156283Srwatson symcode='[[ABCDGISTW]]' 4513156283Srwatson ;; 4514156283Srwatsonhpux*) # Its linker distinguishes data from code symbols 4515156283Srwatson if test "$host_cpu" = ia64; then 4516156283Srwatson symcode='[[ABCDEGRST]]' 4517156283Srwatson fi 4518156283Srwatson lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 4519156283Srwatson 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'" 4520156283Srwatson ;; 4521156283Srwatsonlinux*) 4522156283Srwatson if test "$host_cpu" = ia64; then 4523156283Srwatson symcode='[[ABCDGIRSTW]]' 4524156283Srwatson lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 4525156283Srwatson 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'" 4526156283Srwatson fi 4527156283Srwatson ;; 4528156283Srwatsonirix* | nonstopux*) 4529156283Srwatson symcode='[[BCDEGRST]]' 4530156283Srwatson ;; 4531156283Srwatsonosf*) 4532156283Srwatson symcode='[[BCDEGQRST]]' 4533156283Srwatson ;; 4534156283Srwatsonsolaris* | sysv5*) 4535156283Srwatson symcode='[[BDRT]]' 4536156283Srwatson ;; 4537156283Srwatsonsysv4) 4538156283Srwatson symcode='[[DFNSTU]]' 4539156283Srwatson ;; 4540156283Srwatsonesac 4541156283Srwatson 4542156283Srwatson# Handle CRLF in mingw tool chain 4543156283Srwatsonopt_cr= 4544156283Srwatsoncase $build_os in 4545156283Srwatsonmingw*) 4546156283Srwatson opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp 4547156283Srwatson ;; 4548156283Srwatsonesac 4549156283Srwatson 4550156283Srwatson# If we're using GNU nm, then use its standard symbol codes. 4551156283Srwatsoncase `$NM -V 2>&1` in 4552156283Srwatson*GNU* | *'with BFD'*) 4553156283Srwatson symcode='[[ABCDGIRSTW]]' ;; 4554156283Srwatsonesac 4555156283Srwatson 4556156283Srwatson# Try without a prefix undercore, then with it. 4557156283Srwatsonfor ac_symprfx in "" "_"; do 4558156283Srwatson 4559156283Srwatson # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 4560156283Srwatson symxfrm="\\1 $ac_symprfx\\2 \\2" 4561156283Srwatson 4562156283Srwatson # Write the raw and C identifiers. 4563156283Srwatson lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 4564156283Srwatson 4565156283Srwatson # Check to see that the pipe works correctly. 4566156283Srwatson pipe_works=no 4567156283Srwatson 4568156283Srwatson rm -f conftest* 4569156283Srwatson cat > conftest.$ac_ext <<EOF 4570156283Srwatson#ifdef __cplusplus 4571156283Srwatsonextern "C" { 4572156283Srwatson#endif 4573156283Srwatsonchar nm_test_var; 4574156283Srwatsonvoid nm_test_func(){} 4575156283Srwatson#ifdef __cplusplus 4576156283Srwatson} 4577156283Srwatson#endif 4578156283Srwatsonint main(){nm_test_var='a';nm_test_func();return(0);} 4579156283SrwatsonEOF 4580156283Srwatson 4581156283Srwatson if AC_TRY_EVAL(ac_compile); then 4582156283Srwatson # Now try to grab the symbols. 4583156283Srwatson nlist=conftest.nm 4584156283Srwatson if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then 4585156283Srwatson # Try sorting and uniquifying the output. 4586156283Srwatson if sort "$nlist" | uniq > "$nlist"T; then 4587156283Srwatson mv -f "$nlist"T "$nlist" 4588156283Srwatson else 4589156283Srwatson rm -f "$nlist"T 4590156283Srwatson fi 4591156283Srwatson 4592156283Srwatson # Make sure that we snagged all the symbols we need. 4593156283Srwatson if grep ' nm_test_var$' "$nlist" >/dev/null; then 4594156283Srwatson if grep ' nm_test_func$' "$nlist" >/dev/null; then 4595156283Srwatson cat <<EOF > conftest.$ac_ext 4596156283Srwatson#ifdef __cplusplus 4597156283Srwatsonextern "C" { 4598156283Srwatson#endif 4599156283Srwatson 4600156283SrwatsonEOF 4601156283Srwatson # Now generate the symbol file. 4602156283Srwatson eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' 4603156283Srwatson 4604156283Srwatson cat <<EOF >> conftest.$ac_ext 4605156283Srwatson#if defined (__STDC__) && __STDC__ 4606156283Srwatson# define lt_ptr_t void * 4607156283Srwatson#else 4608156283Srwatson# define lt_ptr_t char * 4609156283Srwatson# define const 4610156283Srwatson#endif 4611156283Srwatson 4612156283Srwatson/* The mapping between symbol names and symbols. */ 4613156283Srwatsonconst struct { 4614156283Srwatson const char *name; 4615156283Srwatson lt_ptr_t address; 4616156283Srwatson} 4617156283Srwatsonlt_preloaded_symbols[[]] = 4618156283Srwatson{ 4619156283SrwatsonEOF 4620156283Srwatson $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext 4621156283Srwatson cat <<\EOF >> conftest.$ac_ext 4622156283Srwatson {0, (lt_ptr_t) 0} 4623156283Srwatson}; 4624156283Srwatson 4625156283Srwatson#ifdef __cplusplus 4626156283Srwatson} 4627156283Srwatson#endif 4628156283SrwatsonEOF 4629156283Srwatson # Now try linking the two files. 4630156283Srwatson mv conftest.$ac_objext conftstm.$ac_objext 4631156283Srwatson lt_save_LIBS="$LIBS" 4632156283Srwatson lt_save_CFLAGS="$CFLAGS" 4633156283Srwatson LIBS="conftstm.$ac_objext" 4634156283Srwatson CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 4635156283Srwatson if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then 4636156283Srwatson pipe_works=yes 4637156283Srwatson fi 4638156283Srwatson LIBS="$lt_save_LIBS" 4639156283Srwatson CFLAGS="$lt_save_CFLAGS" 4640156283Srwatson else 4641156283Srwatson echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 4642156283Srwatson fi 4643156283Srwatson else 4644156283Srwatson echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 4645156283Srwatson fi 4646156283Srwatson else 4647156283Srwatson echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 4648156283Srwatson fi 4649156283Srwatson else 4650156283Srwatson echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 4651156283Srwatson cat conftest.$ac_ext >&5 4652156283Srwatson fi 4653156283Srwatson rm -f conftest* conftst* 4654156283Srwatson 4655156283Srwatson # Do not use the global_symbol_pipe unless it works. 4656156283Srwatson if test "$pipe_works" = yes; then 4657156283Srwatson break 4658156283Srwatson else 4659156283Srwatson lt_cv_sys_global_symbol_pipe= 4660156283Srwatson fi 4661156283Srwatsondone 4662156283Srwatson]) 4663156283Srwatsonif test -z "$lt_cv_sys_global_symbol_pipe"; then 4664156283Srwatson lt_cv_sys_global_symbol_to_cdecl= 4665156283Srwatsonfi 4666156283Srwatsonif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 4667156283Srwatson AC_MSG_RESULT(failed) 4668156283Srwatsonelse 4669156283Srwatson AC_MSG_RESULT(ok) 4670156283Srwatsonfi 4671156283Srwatson]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE 4672156283Srwatson 4673156283Srwatson 4674156283Srwatson# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME]) 4675156283Srwatson# --------------------------------------- 4676156283SrwatsonAC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC], 4677156283Srwatson[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)= 4678156283Srwatson_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 4679156283Srwatson_LT_AC_TAGVAR(lt_prog_compiler_static, $1)= 4680156283Srwatson 4681156283SrwatsonAC_MSG_CHECKING([for $compiler option to produce PIC]) 4682156283Srwatson ifelse([$1],[CXX],[ 4683156283Srwatson # C++ specific cases for pic, static, wl, etc. 4684156283Srwatson if test "$GXX" = yes; then 4685156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4686156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' 4687156283Srwatson 4688156283Srwatson case $host_os in 4689156283Srwatson aix*) 4690156283Srwatson # All AIX code is PIC. 4691156283Srwatson if test "$host_cpu" = ia64; then 4692156283Srwatson # AIX 5 now supports IA64 processor 4693156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4694156283Srwatson fi 4695156283Srwatson ;; 4696156283Srwatson amigaos*) 4697156283Srwatson # FIXME: we need at least 68020 code to build shared libraries, but 4698156283Srwatson # adding the `-m68020' flag to GCC prevents building anything better, 4699156283Srwatson # like `-m68040'. 4700156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 4701156283Srwatson ;; 4702156283Srwatson beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 4703156283Srwatson # PIC is the default for these OSes. 4704156283Srwatson ;; 4705156283Srwatson mingw* | os2* | pw32*) 4706156283Srwatson # This hack is so that the source file can tell whether it is being 4707156283Srwatson # built for inclusion in a dll (and should export symbols for example). 4708156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' 4709156283Srwatson ;; 4710156283Srwatson darwin* | rhapsody*) 4711156283Srwatson # PIC is the default on this platform 4712156283Srwatson # Common symbols not allowed in MH_DYLIB files 4713156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 4714156283Srwatson ;; 4715156283Srwatson *djgpp*) 4716156283Srwatson # DJGPP does not support shared libraries at all 4717156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 4718156283Srwatson ;; 4719156283Srwatson sysv4*MP*) 4720156283Srwatson if test -d /usr/nec; then 4721156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 4722156283Srwatson fi 4723156283Srwatson ;; 4724156283Srwatson hpux*) 4725156283Srwatson # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 4726156283Srwatson # not for PA HP-UX. 4727156283Srwatson case $host_cpu in 4728156283Srwatson hppa*64*|ia64*) 4729156283Srwatson ;; 4730156283Srwatson *) 4731156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4732156283Srwatson ;; 4733156283Srwatson esac 4734156283Srwatson ;; 4735156283Srwatson *) 4736156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4737156283Srwatson ;; 4738156283Srwatson esac 4739156283Srwatson else 4740156283Srwatson case $host_os in 4741156283Srwatson aix4* | aix5*) 4742156283Srwatson # All AIX code is PIC. 4743156283Srwatson if test "$host_cpu" = ia64; then 4744156283Srwatson # AIX 5 now supports IA64 processor 4745156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4746156283Srwatson else 4747156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 4748156283Srwatson fi 4749156283Srwatson ;; 4750156283Srwatson chorus*) 4751156283Srwatson case $cc_basename in 4752156283Srwatson cxch68*) 4753156283Srwatson # Green Hills C++ Compiler 4754156283Srwatson # _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" 4755156283Srwatson ;; 4756156283Srwatson esac 4757156283Srwatson ;; 4758156283Srwatson darwin*) 4759156283Srwatson # PIC is the default on this platform 4760156283Srwatson # Common symbols not allowed in MH_DYLIB files 4761156283Srwatson case $cc_basename in 4762156283Srwatson xlc*) 4763156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' 4764156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4765156283Srwatson ;; 4766156283Srwatson esac 4767156283Srwatson ;; 4768156283Srwatson dgux*) 4769156283Srwatson case $cc_basename in 4770156283Srwatson ec++*) 4771156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4772156283Srwatson ;; 4773156283Srwatson ghcx*) 4774156283Srwatson # Green Hills C++ Compiler 4775156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4776156283Srwatson ;; 4777156283Srwatson *) 4778156283Srwatson ;; 4779156283Srwatson esac 4780156283Srwatson ;; 4781156283Srwatson freebsd* | kfreebsd*-gnu | dragonfly*) 4782156283Srwatson # FreeBSD uses GNU C++ 4783156283Srwatson ;; 4784156283Srwatson hpux9* | hpux10* | hpux11*) 4785156283Srwatson case $cc_basename in 4786156283Srwatson CC*) 4787156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4788156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive" 4789156283Srwatson if test "$host_cpu" != ia64; then 4790156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 4791156283Srwatson fi 4792156283Srwatson ;; 4793156283Srwatson aCC*) 4794156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4795156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive" 4796156283Srwatson case $host_cpu in 4797156283Srwatson hppa*64*|ia64*) 4798156283Srwatson # +Z the default 4799156283Srwatson ;; 4800156283Srwatson *) 4801156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 4802156283Srwatson ;; 4803156283Srwatson esac 4804156283Srwatson ;; 4805156283Srwatson *) 4806156283Srwatson ;; 4807156283Srwatson esac 4808156283Srwatson ;; 4809156283Srwatson irix5* | irix6* | nonstopux*) 4810156283Srwatson case $cc_basename in 4811156283Srwatson CC*) 4812156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4813156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4814156283Srwatson # CC pic flag -KPIC is the default. 4815156283Srwatson ;; 4816156283Srwatson *) 4817156283Srwatson ;; 4818156283Srwatson esac 4819156283Srwatson ;; 4820156283Srwatson linux*) 4821156283Srwatson case $cc_basename in 4822156283Srwatson KCC*) 4823156283Srwatson # KAI C++ Compiler 4824156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 4825156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4826156283Srwatson ;; 4827156283Srwatson icpc* | ecpc*) 4828156283Srwatson # Intel C++ 4829156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4830156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4831156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' 4832156283Srwatson ;; 4833156283Srwatson pgCC*) 4834156283Srwatson # Portland Group C++ compiler. 4835156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4836156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 4837156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4838156283Srwatson ;; 4839156283Srwatson cxx*) 4840156283Srwatson # Compaq C++ 4841156283Srwatson # Make sure the PIC flag is empty. It appears that all Alpha 4842156283Srwatson # Linux and Compaq Tru64 Unix objects are PIC. 4843156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 4844156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4845156283Srwatson ;; 4846156283Srwatson *) 4847156283Srwatson ;; 4848156283Srwatson esac 4849156283Srwatson ;; 4850156283Srwatson lynxos*) 4851156283Srwatson ;; 4852156283Srwatson m88k*) 4853156283Srwatson ;; 4854156283Srwatson mvs*) 4855156283Srwatson case $cc_basename in 4856156283Srwatson cxx*) 4857156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 4858156283Srwatson ;; 4859156283Srwatson *) 4860156283Srwatson ;; 4861156283Srwatson esac 4862156283Srwatson ;; 4863156283Srwatson netbsd*) 4864156283Srwatson ;; 4865156283Srwatson osf3* | osf4* | osf5*) 4866156283Srwatson case $cc_basename in 4867156283Srwatson KCC*) 4868156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 4869156283Srwatson ;; 4870156283Srwatson RCC*) 4871156283Srwatson # Rational C++ 2.4.1 4872156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4873156283Srwatson ;; 4874156283Srwatson cxx*) 4875156283Srwatson # Digital/Compaq C++ 4876156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4877156283Srwatson # Make sure the PIC flag is empty. It appears that all Alpha 4878156283Srwatson # Linux and Compaq Tru64 Unix objects are PIC. 4879156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 4880156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4881156283Srwatson ;; 4882156283Srwatson *) 4883156283Srwatson ;; 4884156283Srwatson esac 4885156283Srwatson ;; 4886156283Srwatson psos*) 4887156283Srwatson ;; 4888156283Srwatson sco*) 4889156283Srwatson case $cc_basename in 4890156283Srwatson CC*) 4891156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4892156283Srwatson ;; 4893156283Srwatson *) 4894156283Srwatson ;; 4895156283Srwatson esac 4896156283Srwatson ;; 4897156283Srwatson solaris*) 4898156283Srwatson case $cc_basename in 4899156283Srwatson CC*) 4900156283Srwatson # Sun C++ 4.2, 5.x and Centerline C++ 4901156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4902156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4903156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 4904156283Srwatson ;; 4905156283Srwatson gcx*) 4906156283Srwatson # Green Hills C++ Compiler 4907156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 4908156283Srwatson ;; 4909156283Srwatson *) 4910156283Srwatson ;; 4911156283Srwatson esac 4912156283Srwatson ;; 4913156283Srwatson sunos4*) 4914156283Srwatson case $cc_basename in 4915156283Srwatson CC*) 4916156283Srwatson # Sun C++ 4.x 4917156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4918156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4919156283Srwatson ;; 4920156283Srwatson lcc*) 4921156283Srwatson # Lucid 4922156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4923156283Srwatson ;; 4924156283Srwatson *) 4925156283Srwatson ;; 4926156283Srwatson esac 4927156283Srwatson ;; 4928156283Srwatson tandem*) 4929156283Srwatson case $cc_basename in 4930156283Srwatson NCC*) 4931156283Srwatson # NonStop-UX NCC 3.20 4932156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4933156283Srwatson ;; 4934156283Srwatson *) 4935156283Srwatson ;; 4936156283Srwatson esac 4937156283Srwatson ;; 4938156283Srwatson unixware*) 4939156283Srwatson ;; 4940156283Srwatson vxworks*) 4941156283Srwatson ;; 4942156283Srwatson *) 4943156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4944156283Srwatson ;; 4945156283Srwatson esac 4946156283Srwatson fi 4947156283Srwatson], 4948156283Srwatson[ 4949156283Srwatson if test "$GCC" = yes; then 4950156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4951156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' 4952156283Srwatson 4953156283Srwatson case $host_os in 4954156283Srwatson aix*) 4955156283Srwatson # All AIX code is PIC. 4956156283Srwatson if test "$host_cpu" = ia64; then 4957156283Srwatson # AIX 5 now supports IA64 processor 4958156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4959156283Srwatson fi 4960156283Srwatson ;; 4961156283Srwatson 4962156283Srwatson amigaos*) 4963156283Srwatson # FIXME: we need at least 68020 code to build shared libraries, but 4964156283Srwatson # adding the `-m68020' flag to GCC prevents building anything better, 4965156283Srwatson # like `-m68040'. 4966156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 4967156283Srwatson ;; 4968156283Srwatson 4969156283Srwatson beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 4970156283Srwatson # PIC is the default for these OSes. 4971156283Srwatson ;; 4972156283Srwatson 4973156283Srwatson mingw* | pw32* | os2*) 4974156283Srwatson # This hack is so that the source file can tell whether it is being 4975156283Srwatson # built for inclusion in a dll (and should export symbols for example). 4976156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' 4977156283Srwatson ;; 4978156283Srwatson 4979156283Srwatson darwin* | rhapsody*) 4980156283Srwatson # PIC is the default on this platform 4981156283Srwatson # Common symbols not allowed in MH_DYLIB files 4982156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 4983156283Srwatson ;; 4984156283Srwatson 4985156283Srwatson msdosdjgpp*) 4986156283Srwatson # Just because we use GCC doesn't mean we suddenly get shared libraries 4987156283Srwatson # on systems that don't support them. 4988156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4989156283Srwatson enable_shared=no 4990156283Srwatson ;; 4991156283Srwatson 4992156283Srwatson sysv4*MP*) 4993156283Srwatson if test -d /usr/nec; then 4994156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 4995156283Srwatson fi 4996156283Srwatson ;; 4997156283Srwatson 4998156283Srwatson hpux*) 4999156283Srwatson # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 5000156283Srwatson # not for PA HP-UX. 5001156283Srwatson case $host_cpu in 5002156283Srwatson hppa*64*|ia64*) 5003156283Srwatson # +Z the default 5004156283Srwatson ;; 5005156283Srwatson *) 5006156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5007156283Srwatson ;; 5008156283Srwatson esac 5009156283Srwatson ;; 5010156283Srwatson 5011156283Srwatson *) 5012156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5013156283Srwatson ;; 5014156283Srwatson esac 5015156283Srwatson else 5016156283Srwatson # PORTME Check for flag to pass linker flags through the system compiler. 5017156283Srwatson case $host_os in 5018156283Srwatson aix*) 5019156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5020156283Srwatson if test "$host_cpu" = ia64; then 5021156283Srwatson # AIX 5 now supports IA64 processor 5022156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5023156283Srwatson else 5024156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 5025156283Srwatson fi 5026156283Srwatson ;; 5027156283Srwatson darwin*) 5028156283Srwatson # PIC is the default on this platform 5029156283Srwatson # Common symbols not allowed in MH_DYLIB files 5030156283Srwatson case $cc_basename in 5031156283Srwatson xlc*) 5032156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' 5033156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5034156283Srwatson ;; 5035156283Srwatson esac 5036156283Srwatson ;; 5037156283Srwatson 5038156283Srwatson mingw* | pw32* | os2*) 5039156283Srwatson # This hack is so that the source file can tell whether it is being 5040156283Srwatson # built for inclusion in a dll (and should export symbols for example). 5041156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' 5042156283Srwatson ;; 5043156283Srwatson 5044156283Srwatson hpux9* | hpux10* | hpux11*) 5045156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5046156283Srwatson # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 5047156283Srwatson # not for PA HP-UX. 5048156283Srwatson case $host_cpu in 5049156283Srwatson hppa*64*|ia64*) 5050156283Srwatson # +Z the default 5051156283Srwatson ;; 5052156283Srwatson *) 5053156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 5054156283Srwatson ;; 5055156283Srwatson esac 5056156283Srwatson # Is there a better lt_prog_compiler_static that works with the bundled CC? 5057156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 5058156283Srwatson ;; 5059156283Srwatson 5060156283Srwatson irix5* | irix6* | nonstopux*) 5061156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5062156283Srwatson # PIC (with -KPIC) is the default. 5063156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5064156283Srwatson ;; 5065156283Srwatson 5066156283Srwatson newsos6) 5067156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5068156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5069156283Srwatson ;; 5070156283Srwatson 5071156283Srwatson linux*) 5072156283Srwatson case $cc_basename in 5073156283Srwatson icc* | ecc*) 5074156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5075156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5076156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' 5077156283Srwatson ;; 5078156283Srwatson pgcc* | pgf77* | pgf90* | pgf95*) 5079156283Srwatson # Portland Group compilers (*not* the Pentium gcc compiler, 5080156283Srwatson # which looks to be a dead project) 5081156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5082156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 5083156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5084156283Srwatson ;; 5085156283Srwatson ccc*) 5086156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5087156283Srwatson # All Alpha code is PIC. 5088156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5089156283Srwatson ;; 5090156283Srwatson esac 5091156283Srwatson ;; 5092156283Srwatson 5093156283Srwatson osf3* | osf4* | osf5*) 5094156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5095156283Srwatson # All OSF/1 code is PIC. 5096156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5097156283Srwatson ;; 5098156283Srwatson 5099156283Srwatson sco3.2v5*) 5100156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kpic' 5101156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-dn' 5102156283Srwatson ;; 5103156283Srwatson 5104156283Srwatson solaris*) 5105156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5106156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5107156283Srwatson case $cc_basename in 5108156283Srwatson f77* | f90* | f95*) 5109156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 5110156283Srwatson *) 5111156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 5112156283Srwatson esac 5113156283Srwatson ;; 5114156283Srwatson 5115156283Srwatson sunos4*) 5116156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 5117156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 5118156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5119156283Srwatson ;; 5120156283Srwatson 5121156283Srwatson sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 5122156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5123156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5124156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5125156283Srwatson ;; 5126156283Srwatson 5127156283Srwatson sysv4*MP*) 5128156283Srwatson if test -d /usr/nec ;then 5129156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 5130156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5131156283Srwatson fi 5132156283Srwatson ;; 5133156283Srwatson 5134156283Srwatson unicos*) 5135156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5136156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 5137156283Srwatson ;; 5138156283Srwatson 5139156283Srwatson uts4*) 5140156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 5141156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5142156283Srwatson ;; 5143156283Srwatson 5144156283Srwatson *) 5145156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 5146156283Srwatson ;; 5147156283Srwatson esac 5148156283Srwatson fi 5149156283Srwatson]) 5150156283SrwatsonAC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)]) 5151156283Srwatson 5152156283Srwatson# 5153156283Srwatson# Check to make sure the PIC flag actually works. 5154156283Srwatson# 5155156283Srwatsonif test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then 5156156283Srwatson AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works], 5157156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1), 5158156283Srwatson [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [], 5159156283Srwatson [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in 5160156283Srwatson "" | " "*) ;; 5161156283Srwatson *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;; 5162156283Srwatson esac], 5163156283Srwatson [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 5164156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 5165156283Srwatsonfi 5166156283Srwatsoncase $host_os in 5167156283Srwatson # For platforms which do not support PIC, -DPIC is meaningless: 5168156283Srwatson *djgpp*) 5169156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 5170156283Srwatson ;; 5171156283Srwatson *) 5172156283Srwatson _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])" 5173156283Srwatson ;; 5174156283Srwatsonesac 5175156283Srwatson]) 5176156283Srwatson 5177156283Srwatson 5178156283Srwatson# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME]) 5179156283Srwatson# ------------------------------------ 5180156283Srwatson# See if the linker supports building shared libraries. 5181156283SrwatsonAC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS], 5182156283Srwatson[AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 5183156283Srwatsonifelse([$1],[CXX],[ 5184156283Srwatson _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 5185156283Srwatson case $host_os in 5186156283Srwatson aix4* | aix5*) 5187156283Srwatson # If we're using GNU nm, then we don't want the "-C" option. 5188156283Srwatson # -C means demangle to AIX nm, but means don't demangle with GNU nm 5189156283Srwatson if $NM -V 2>&1 | grep 'GNU' > /dev/null; then 5190156283Srwatson _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' 5191156283Srwatson else 5192156283Srwatson _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' 5193156283Srwatson fi 5194156283Srwatson ;; 5195156283Srwatson pw32*) 5196156283Srwatson _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" 5197156283Srwatson ;; 5198156283Srwatson cygwin* | mingw*) 5199156283Srwatson _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' 5200156283Srwatson ;; 5201156283Srwatson *) 5202156283Srwatson _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 5203156283Srwatson ;; 5204156283Srwatson esac 5205156283Srwatson],[ 5206156283Srwatson runpath_var= 5207156283Srwatson _LT_AC_TAGVAR(allow_undefined_flag, $1)= 5208156283Srwatson _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no 5209156283Srwatson _LT_AC_TAGVAR(archive_cmds, $1)= 5210156283Srwatson _LT_AC_TAGVAR(archive_expsym_cmds, $1)= 5211156283Srwatson _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)= 5212156283Srwatson _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)= 5213156283Srwatson _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= 5214156283Srwatson _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 5215156283Srwatson _LT_AC_TAGVAR(thread_safe_flag_spec, $1)= 5216156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= 5217156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 5218156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 5219156283Srwatson _LT_AC_TAGVAR(hardcode_direct, $1)=no 5220156283Srwatson _LT_AC_TAGVAR(hardcode_minus_L, $1)=no 5221156283Srwatson _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 5222156283Srwatson _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown 5223156283Srwatson _LT_AC_TAGVAR(hardcode_automatic, $1)=no 5224156283Srwatson _LT_AC_TAGVAR(module_cmds, $1)= 5225156283Srwatson _LT_AC_TAGVAR(module_expsym_cmds, $1)= 5226156283Srwatson _LT_AC_TAGVAR(always_export_symbols, $1)=no 5227156283Srwatson _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 5228156283Srwatson # include_expsyms should be a list of space-separated symbols to be *always* 5229156283Srwatson # included in the symbol list 5230156283Srwatson _LT_AC_TAGVAR(include_expsyms, $1)= 5231156283Srwatson # exclude_expsyms can be an extended regexp of symbols to exclude 5232156283Srwatson # it will be wrapped by ` (' and `)$', so one must not match beginning or 5233156283Srwatson # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', 5234156283Srwatson # as well as any symbol that contains `d'. 5235156283Srwatson _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_" 5236156283Srwatson # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 5237156283Srwatson # platforms (ab)use it in PIC code, but their linkers get confused if 5238156283Srwatson # the symbol is explicitly referenced. Since portable code cannot 5239156283Srwatson # rely on this symbol name, it's probably fine to never include it in 5240156283Srwatson # preloaded symbol tables. 5241156283Srwatson extract_expsyms_cmds= 5242156283Srwatson # Just being paranoid about ensuring that cc_basename is set. 5243156283Srwatson _LT_CC_BASENAME([$compiler]) 5244156283Srwatson case $host_os in 5245156283Srwatson cygwin* | mingw* | pw32*) 5246156283Srwatson # FIXME: the MSVC++ port hasn't been tested in a loooong time 5247156283Srwatson # When not using gcc, we currently assume that we are using 5248156283Srwatson # Microsoft Visual C++. 5249156283Srwatson if test "$GCC" != yes; then 5250156283Srwatson with_gnu_ld=no 5251156283Srwatson fi 5252156283Srwatson ;; 5253156283Srwatson openbsd*) 5254156283Srwatson with_gnu_ld=no 5255156283Srwatson ;; 5256156283Srwatson esac 5257156283Srwatson 5258156283Srwatson _LT_AC_TAGVAR(ld_shlibs, $1)=yes 5259156283Srwatson if test "$with_gnu_ld" = yes; then 5260156283Srwatson # If archive_cmds runs LD, not CC, wlarc should be empty 5261156283Srwatson wlarc='${wl}' 5262156283Srwatson 5263156283Srwatson # Set some defaults for GNU ld with shared library support. These 5264156283Srwatson # are reset later if shared libraries are not supported. Putting them 5265156283Srwatson # here allows them to be overridden if necessary. 5266156283Srwatson runpath_var=LD_RUN_PATH 5267156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 5268156283Srwatson _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 5269156283Srwatson # ancient GNU ld didn't support --whole-archive et. al. 5270156283Srwatson if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then 5271156283Srwatson _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 5272156283Srwatson else 5273156283Srwatson _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 5274156283Srwatson fi 5275156283Srwatson supports_anon_versioning=no 5276156283Srwatson case `$LD -v 2>/dev/null` in 5277156283Srwatson *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 5278156283Srwatson *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 5279156283Srwatson *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 5280156283Srwatson *\ 2.11.*) ;; # other 2.11 versions 5281156283Srwatson *) supports_anon_versioning=yes ;; 5282156283Srwatson esac 5283156283Srwatson 5284156283Srwatson # See if GNU ld supports shared libraries. 5285156283Srwatson case $host_os in 5286156283Srwatson aix3* | aix4* | aix5*) 5287156283Srwatson # On AIX/PPC, the GNU linker is very broken 5288156283Srwatson if test "$host_cpu" != ia64; then 5289156283Srwatson _LT_AC_TAGVAR(ld_shlibs, $1)=no 5290156283Srwatson cat <<EOF 1>&2 5291156283Srwatson 5292156283Srwatson*** Warning: the GNU linker, at least up to release 2.9.1, is reported 5293156283Srwatson*** to be unable to reliably create shared libraries on AIX. 5294156283Srwatson*** Therefore, libtool is disabling shared libraries support. If you 5295156283Srwatson*** really care for shared libraries, you may want to modify your PATH 5296156283Srwatson*** so that a non-GNU linker is found, and then restart. 5297156283Srwatson 5298156283SrwatsonEOF 5299156283Srwatson fi 5300156283Srwatson ;; 5301156283Srwatson 5302156283Srwatson amigaos*) 5303156283Srwatson _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)' 5304156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5305156283Srwatson _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 5306156283Srwatson 5307156283Srwatson # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports 5308156283Srwatson # that the semantics of dynamic libraries on AmigaOS, at least up 5309156283Srwatson # to version 4, is to share data among multiple programs linked 5310156283Srwatson # with the same dynamic library. Since this doesn't match the 5311156283Srwatson # behavior of shared libraries on other platforms, we can't use 5312156283Srwatson # them. 5313156283Srwatson _LT_AC_TAGVAR(ld_shlibs, $1)=no 5314156283Srwatson ;; 5315156283Srwatson 5316156283Srwatson beos*) 5317156283Srwatson if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 5318156283Srwatson _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 5319156283Srwatson # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 5320156283Srwatson # support --undefined. This deserves some investigation. FIXME 5321156283Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5322156283Srwatson else 5323156283Srwatson _LT_AC_TAGVAR(ld_shlibs, $1)=no 5324156283Srwatson fi 5325156283Srwatson ;; 5326156283Srwatson 5327156283Srwatson cygwin* | mingw* | pw32*) 5328156283Srwatson # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 5329156283Srwatson # as there is no search path for DLLs. 5330156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5331156283Srwatson _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 5332156283Srwatson _LT_AC_TAGVAR(always_export_symbols, $1)=no 5333156283Srwatson _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5334156283Srwatson _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols' 5335156283Srwatson 5336156283Srwatson if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then 5337156283Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' 5338156283Srwatson # If the export-symbols file already is a .def file (1st line 5339156283Srwatson # is EXPORTS), use it as is; otherwise, prepend... 5340156283Srwatson _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 5341156283Srwatson cp $export_symbols $output_objdir/$soname.def; 5342156283Srwatson else 5343156283Srwatson echo EXPORTS > $output_objdir/$soname.def; 5344156283Srwatson cat $export_symbols >> $output_objdir/$soname.def; 5345156283Srwatson fi~ 5346156283Srwatson $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' 5347156283Srwatson else 5348156283Srwatson _LT_AC_TAGVAR(ld_shlibs, $1)=no 5349156283Srwatson fi 5350156283Srwatson ;; 5351156283Srwatson 5352156283Srwatson linux*) 5353156283Srwatson if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 5354156283Srwatson tmp_addflag= 5355156283Srwatson case $cc_basename,$host_cpu in 5356156283Srwatson pgcc*) # Portland Group C compiler 5357156283Srwatson _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' 5358156283Srwatson tmp_addflag=' $pic_flag' 5359156283Srwatson ;; 5360156283Srwatson pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers 5361156283Srwatson _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' 5362156283Srwatson tmp_addflag=' $pic_flag -Mnomain' ;; 5363156283Srwatson ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 5364156283Srwatson tmp_addflag=' -i_dynamic' ;; 5365156283Srwatson efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 5366156283Srwatson tmp_addflag=' -i_dynamic -nofor_main' ;; 5367156283Srwatson ifc* | ifort*) # Intel Fortran compiler 5368156283Srwatson tmp_addflag=' -nofor_main' ;; 5369156283Srwatson esac 5370156283Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5371156283Srwatson 5372156283Srwatson if test $supports_anon_versioning = yes; then 5373156283Srwatson _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~ 5374156283Srwatson cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 5375156283Srwatson $echo "local: *; };" >> $output_objdir/$libname.ver~ 5376156283Srwatson $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 5377156283Srwatson fi 5378156283Srwatson else 5379156283Srwatson _LT_AC_TAGVAR(ld_shlibs, $1)=no 5380156283Srwatson fi 5381156283Srwatson ;; 5382156283Srwatson 5383156283Srwatson netbsd*) 5384156283Srwatson if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then 5385156283Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 5386156283Srwatson wlarc= 5387156283Srwatson else 5388156283Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5389156283Srwatson _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' 5390156283Srwatson fi 5391156283Srwatson ;; 5392156283Srwatson 5393156283Srwatson solaris* | sysv5*) 5394156283Srwatson if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then 5395156283Srwatson _LT_AC_TAGVAR(ld_shlibs, $1)=no 5396156283Srwatson cat <<EOF 1>&2 5397156283Srwatson 5398156283Srwatson*** Warning: The releases 2.8.* of the GNU linker cannot reliably 5399156283Srwatson*** create shared libraries on Solaris systems. Therefore, libtool 5400156283Srwatson*** is disabling shared libraries support. We urge you to upgrade GNU 5401156283Srwatson*** binutils to release 2.9.1 or newer. Another option is to modify 5402156283Srwatson*** your PATH or compiler configuration so that the native linker is 5403156283Srwatson*** used, and then restart. 5404156283Srwatson 5405156283SrwatsonEOF 5406156283Srwatson elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 5407156283Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5408156283Srwatson _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' 5409156283Srwatson else 5410156283Srwatson _LT_AC_TAGVAR(ld_shlibs, $1)=no 5411156283Srwatson fi 5412156283Srwatson ;; 5413156283Srwatson 5414156283Srwatson sunos4*) 5415156283Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 5416156283Srwatson wlarc= 5417156283Srwatson _LT_AC_TAGVAR(hardcode_direct, $1)=yes 5418156283Srwatson _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 5419156283Srwatson ;; 5420156283Srwatson 5421156283Srwatson *) 5422156283Srwatson if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 5423156283Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5424156283Srwatson _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' 5425156283Srwatson else 5426156283Srwatson _LT_AC_TAGVAR(ld_shlibs, $1)=no 5427156283Srwatson fi 5428156283Srwatson ;; 5429156283Srwatson esac 5430156283Srwatson 5431156283Srwatson if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then 5432156283Srwatson runpath_var= 5433156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= 5434156283Srwatson _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= 5435156283Srwatson _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 5436156283Srwatson fi 5437156283Srwatson else 5438156283Srwatson # PORTME fill in a description of your system's linker (not GNU ld) 5439156283Srwatson case $host_os in 5440156283Srwatson aix3*) 5441156283Srwatson _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 5442156283Srwatson _LT_AC_TAGVAR(always_export_symbols, $1)=yes 5443156283Srwatson _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' 5444156283Srwatson # Note: this linker hardcodes the directories in LIBPATH if there 5445156283Srwatson # are no directories specified by -L. 5446156283Srwatson _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 5447156283Srwatson if test "$GCC" = yes && test -z "$link_static_flag"; then 5448156283Srwatson # Neither direct hardcoding nor static linking is supported with a 5449156283Srwatson # broken collect2. 5450156283Srwatson _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported 5451156283Srwatson fi 5452156283Srwatson ;; 5453156283Srwatson 5454156283Srwatson aix4* | aix5*) 5455156283Srwatson if test "$host_cpu" = ia64; then 5456156283Srwatson # On IA64, the linker does run time linking by default, so we don't 5457156283Srwatson # have to do anything special. 5458156283Srwatson aix_use_runtimelinking=no 5459156283Srwatson exp_sym_flag='-Bexport' 5460156283Srwatson no_entry_flag="" 5461156283Srwatson else 5462156283Srwatson # If we're using GNU nm, then we don't want the "-C" option. 5463156283Srwatson # -C means demangle to AIX nm, but means don't demangle with GNU nm 5464156283Srwatson if $NM -V 2>&1 | grep 'GNU' > /dev/null; then 5465156283Srwatson _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' 5466156283Srwatson else 5467156283Srwatson _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' 5468156283Srwatson fi 5469156283Srwatson aix_use_runtimelinking=no 5470156283Srwatson 5471156283Srwatson # Test if we are trying to use run time linking or normal 5472156283Srwatson # AIX style linking. If -brtl is somewhere in LDFLAGS, we 5473156283Srwatson # need to do runtime linking. 5474156283Srwatson case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*) 5475156283Srwatson for ld_flag in $LDFLAGS; do 5476156283Srwatson if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then 5477156283Srwatson aix_use_runtimelinking=yes 5478156283Srwatson break 5479156283Srwatson fi 5480156283Srwatson done 5481156283Srwatson esac 5482156283Srwatson 5483156283Srwatson exp_sym_flag='-bexport' 5484156283Srwatson no_entry_flag='-bnoentry' 5485156283Srwatson fi 5486156283Srwatson 5487156283Srwatson # When large executables or shared objects are built, AIX ld can 5488156283Srwatson # have problems creating the table of contents. If linking a library 5489156283Srwatson # or program results in "error TOC overflow" add -mminimal-toc to 5490156283Srwatson # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 5491156283Srwatson # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 5492156283Srwatson 5493156283Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='' 5494156283Srwatson _LT_AC_TAGVAR(hardcode_direct, $1)=yes 5495156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' 5496156283Srwatson _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 5497156283Srwatson 5498156283Srwatson if test "$GCC" = yes; then 5499156283Srwatson case $host_os in aix4.[[012]]|aix4.[[012]].*) 5500156283Srwatson # We only want to do this on AIX 4.2 and lower, the check 5501156283Srwatson # below for broken collect2 doesn't work under 4.3+ 5502156283Srwatson collect2name=`${CC} -print-prog-name=collect2` 5503156283Srwatson if test -f "$collect2name" && \ 5504156283Srwatson strings "$collect2name" | grep resolve_lib_name >/dev/null 5505156283Srwatson then 5506156283Srwatson # We have reworked collect2 5507156283Srwatson _LT_AC_TAGVAR(hardcode_direct, $1)=yes 5508156283Srwatson else 5509156283Srwatson # We have old collect2 5510156283Srwatson _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported 5511156283Srwatson # It fails to find uninstalled libraries when the uninstalled 5512156283Srwatson # path is not listed in the libpath. Setting hardcode_minus_L 5513156283Srwatson # to unsupported forces relinking 5514156283Srwatson _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 5515156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5516156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 5517156283Srwatson fi 5518156283Srwatson esac 5519156283Srwatson shared_flag='-shared' 5520156283Srwatson if test "$aix_use_runtimelinking" = yes; then 5521156283Srwatson shared_flag="$shared_flag "'${wl}-G' 5522156283Srwatson fi 5523156283Srwatson else 5524156283Srwatson # not using gcc 5525156283Srwatson if test "$host_cpu" = ia64; then 5526156283Srwatson # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 5527156283Srwatson # chokes on -Wl,-G. The following line is correct: 5528156283Srwatson shared_flag='-G' 5529156283Srwatson else 5530156283Srwatson if test "$aix_use_runtimelinking" = yes; then 5531156283Srwatson shared_flag='${wl}-G' 5532156283Srwatson else 5533156283Srwatson shared_flag='${wl}-bM:SRE' 5534156283Srwatson fi 5535156283Srwatson fi 5536156283Srwatson fi 5537156283Srwatson 5538156283Srwatson # It seems that -bexpall does not export symbols beginning with 5539156283Srwatson # underscore (_), so it is better to generate a list of symbols to export. 5540156283Srwatson _LT_AC_TAGVAR(always_export_symbols, $1)=yes 5541156283Srwatson if test "$aix_use_runtimelinking" = yes; then 5542156283Srwatson # Warning - without using the other runtime loading flags (-brtl), 5543156283Srwatson # -berok will link without error, but may produce a broken library. 5544156283Srwatson _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' 5545156283Srwatson # Determine the default libpath from the value encoded in an empty executable. 5546156283Srwatson _LT_AC_SYS_LIBPATH_AIX 5547156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 5548156283Srwatson _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag" 5549156283Srwatson else 5550156283Srwatson if test "$host_cpu" = ia64; then 5551156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 5552156283Srwatson _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 5553156283Srwatson _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" 5554156283Srwatson else 5555156283Srwatson # Determine the default libpath from the value encoded in an empty executable. 5556156283Srwatson _LT_AC_SYS_LIBPATH_AIX 5557156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 5558156283Srwatson # Warning - without using the other run time loading flags, 5559156283Srwatson # -berok will link without error, but may produce a broken library. 5560156283Srwatson _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 5561156283Srwatson _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 5562156283Srwatson # -bexpall does not export symbols beginning with underscore (_) 5563156283Srwatson _LT_AC_TAGVAR(always_export_symbols, $1)=yes 5564156283Srwatson # Exported symbols can be pulled into shared objects from archives 5565156283Srwatson _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' ' 5566156283Srwatson _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes 5567156283Srwatson # This is similar to how AIX traditionally builds its shared libraries. 5568156283Srwatson _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' 5569156283Srwatson fi 5570156283Srwatson fi 5571156283Srwatson ;; 5572156283Srwatson 5573156283Srwatson amigaos*) 5574156283Srwatson _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)' 5575156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5576156283Srwatson _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 5577156283Srwatson # see comment about different semantics on the GNU ld section 5578156283Srwatson _LT_AC_TAGVAR(ld_shlibs, $1)=no 5579156283Srwatson ;; 5580156283Srwatson 5581156283Srwatson bsdi[[45]]*) 5582156283Srwatson _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 5583156283Srwatson ;; 5584156283Srwatson 5585156283Srwatson cygwin* | mingw* | pw32*) 5586156283Srwatson # When not using gcc, we currently assume that we are using 5587156283Srwatson # Microsoft Visual C++. 5588156283Srwatson # hardcode_libdir_flag_spec is actually meaningless, as there is 5589156283Srwatson # no search path for DLLs. 5590156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 5591156283Srwatson _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 5592156283Srwatson # Tell ltmain to make .lib files, not .a files. 5593156283Srwatson libext=lib 5594156283Srwatson # Tell ltmain to make .dll files, not .so files. 5595156283Srwatson shrext_cmds=".dll" 5596156283Srwatson # FIXME: Setting linknames here is a bad hack. 5597156283Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' 5598156283Srwatson # The linker will automatically build a .lib file if we build a DLL. 5599156283Srwatson _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true' 5600156283Srwatson # FIXME: Should let the user specify the lib program. 5601156283Srwatson _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs' 5602156283Srwatson _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' 5603156283Srwatson _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5604156283Srwatson ;; 5605156283Srwatson 5606156283Srwatson darwin* | rhapsody*) 5607156283Srwatson case $host_os in 5608156283Srwatson rhapsody* | darwin1.[[012]]) 5609156283Srwatson _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' 5610156283Srwatson ;; 5611156283Srwatson *) # Darwin 1.3 on 5612156283Srwatson if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then 5613156283Srwatson _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' 5614156283Srwatson else 5615156283Srwatson case ${MACOSX_DEPLOYMENT_TARGET} in 5616156283Srwatson 10.[[012]]) 5617156283Srwatson _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' 5618156283Srwatson ;; 5619156283Srwatson 10.*) 5620156283Srwatson _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup' 5621156283Srwatson ;; 5622156283Srwatson esac 5623156283Srwatson fi 5624156283Srwatson ;; 5625156283Srwatson esac 5626156283Srwatson _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 5627156283Srwatson _LT_AC_TAGVAR(hardcode_direct, $1)=no 5628156283Srwatson _LT_AC_TAGVAR(hardcode_automatic, $1)=yes 5629156283Srwatson _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 5630156283Srwatson _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' 5631156283Srwatson _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 5632156283Srwatson if test "$GCC" = yes ; then 5633156283Srwatson output_verbose_link_cmd='echo' 5634156283Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' 5635156283Srwatson _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' 5636156283Srwatson # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds 5637156283Srwatson _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}' 5638156283Srwatson _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}' 5639156283Srwatson else 5640156283Srwatson case $cc_basename in 5641156283Srwatson xlc*) 5642156283Srwatson output_verbose_link_cmd='echo' 5643156283Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' 5644156283Srwatson _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' 5645156283Srwatson # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds 5646156283Srwatson _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' 5647156283Srwatson _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}' 5648156283Srwatson ;; 5649156283Srwatson *) 5650156283Srwatson _LT_AC_TAGVAR(ld_shlibs, $1)=no 5651156283Srwatson ;; 5652156283Srwatson esac 5653156283Srwatson fi 5654156283Srwatson ;; 5655156283Srwatson 5656156283Srwatson dgux*) 5657156283Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5658156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5659156283Srwatson _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 5660156283Srwatson ;; 5661156283Srwatson 5662156283Srwatson freebsd1*) 5663156283Srwatson _LT_AC_TAGVAR(ld_shlibs, $1)=no 5664156283Srwatson ;; 5665156283Srwatson 5666156283Srwatson # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 5667156283Srwatson # support. Future versions do this automatically, but an explicit c++rt0.o 5668156283Srwatson # does not break anything, and helps significantly (at the cost of a little 5669156283Srwatson # extra space). 5670156283Srwatson freebsd2.2*) 5671156283Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 5672156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5673156283Srwatson _LT_AC_TAGVAR(hardcode_direct, $1)=yes 5674156283Srwatson _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 5675156283Srwatson ;; 5676156283Srwatson 5677156283Srwatson # Unfortunately, older versions of FreeBSD 2 do not have this feature. 5678156283Srwatson freebsd2*) 5679156283Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 5680156283Srwatson _LT_AC_TAGVAR(hardcode_direct, $1)=yes 5681156283Srwatson _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 5682156283Srwatson _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 5683156283Srwatson ;; 5684156283Srwatson 5685156283Srwatson # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 5686156283Srwatson freebsd* | kfreebsd*-gnu | dragonfly*) 5687156283Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' 5688156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5689156283Srwatson _LT_AC_TAGVAR(hardcode_direct, $1)=yes 5690156283Srwatson _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 5691156283Srwatson ;; 5692156283Srwatson 5693156283Srwatson hpux9*) 5694156283Srwatson if test "$GCC" = yes; then 5695156283Srwatson _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' 5696156283Srwatson else 5697156283Srwatson _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' 5698156283Srwatson fi 5699156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 5700156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 5701156283Srwatson _LT_AC_TAGVAR(hardcode_direct, $1)=yes 5702156283Srwatson 5703156283Srwatson # hardcode_minus_L: Not really in the search PATH, 5704156283Srwatson # but as the default location of the library. 5705156283Srwatson _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 5706156283Srwatson _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 5707156283Srwatson ;; 5708156283Srwatson 5709156283Srwatson hpux10* | hpux11*) 5710156283Srwatson if test "$GCC" = yes -a "$with_gnu_ld" = no; then 5711156283Srwatson case $host_cpu in 5712156283Srwatson hppa*64*|ia64*) 5713156283Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 5714156283Srwatson ;; 5715156283Srwatson *) 5716156283Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 5717156283Srwatson ;; 5718156283Srwatson esac 5719156283Srwatson else 5720156283Srwatson case $host_cpu in 5721156283Srwatson hppa*64*|ia64*) 5722156283Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags' 5723156283Srwatson ;; 5724156283Srwatson *) 5725156283Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 5726156283Srwatson ;; 5727156283Srwatson esac 5728156283Srwatson fi 5729156283Srwatson if test "$with_gnu_ld" = no; then 5730156283Srwatson case $host_cpu in 5731156283Srwatson hppa*64*) 5732156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 5733156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' 5734156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 5735156283Srwatson _LT_AC_TAGVAR(hardcode_direct, $1)=no 5736156283Srwatson _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 5737156283Srwatson ;; 5738156283Srwatson ia64*) 5739156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5740156283Srwatson _LT_AC_TAGVAR(hardcode_direct, $1)=no 5741156283Srwatson _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 5742156283Srwatson 5743156283Srwatson # hardcode_minus_L: Not really in the search PATH, 5744156283Srwatson # but as the default location of the library. 5745156283Srwatson _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 5746156283Srwatson ;; 5747156283Srwatson *) 5748156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 5749156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 5750156283Srwatson _LT_AC_TAGVAR(hardcode_direct, $1)=yes 5751156283Srwatson _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 5752156283Srwatson 5753156283Srwatson # hardcode_minus_L: Not really in the search PATH, 5754156283Srwatson # but as the default location of the library. 5755156283Srwatson _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 5756156283Srwatson ;; 5757156283Srwatson esac 5758156283Srwatson fi 5759156283Srwatson ;; 5760156283Srwatson 5761156283Srwatson irix5* | irix6* | nonstopux*) 5762156283Srwatson if test "$GCC" = yes; then 5763156283Srwatson _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' 5764156283Srwatson else 5765156283Srwatson _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' 5766156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' 5767156283Srwatson fi 5768156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 5769156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 5770156283Srwatson _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 5771156283Srwatson ;; 5772156283Srwatson 5773156283Srwatson netbsd*) 5774156283Srwatson if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then 5775156283Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 5776156283Srwatson else 5777156283Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 5778156283Srwatson fi 5779156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5780156283Srwatson _LT_AC_TAGVAR(hardcode_direct, $1)=yes 5781156283Srwatson _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 5782156283Srwatson ;; 5783156283Srwatson 5784156283Srwatson newsos6) 5785156283Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5786156283Srwatson _LT_AC_TAGVAR(hardcode_direct, $1)=yes 5787156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 5788156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 5789156283Srwatson _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 5790156283Srwatson ;; 5791156283Srwatson 5792156283Srwatson openbsd*) 5793156283Srwatson _LT_AC_TAGVAR(hardcode_direct, $1)=yes 5794156283Srwatson _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 5795156283Srwatson if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 5796156283Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 5797156283Srwatson _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' 5798156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 5799156283Srwatson _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 5800156283Srwatson else 5801156283Srwatson case $host_os in 5802156283Srwatson openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) 5803156283Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 5804156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5805156283Srwatson ;; 5806156283Srwatson *) 5807156283Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 5808156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 5809156283Srwatson ;; 5810156283Srwatson esac 5811156283Srwatson fi 5812156283Srwatson ;; 5813156283Srwatson 5814156283Srwatson os2*) 5815156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5816156283Srwatson _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 5817156283Srwatson _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 5818156283Srwatson _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' 5819156283Srwatson _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' 5820156283Srwatson ;; 5821156283Srwatson 5822156283Srwatson osf3*) 5823156283Srwatson if test "$GCC" = yes; then 5824156283Srwatson _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 5825156283Srwatson _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' 5826156283Srwatson else 5827156283Srwatson _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 5828156283Srwatson _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' 5829156283Srwatson fi 5830156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 5831156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 5832156283Srwatson ;; 5833156283Srwatson 5834156283Srwatson osf4* | osf5*) # as osf3* with the addition of -msym flag 5835156283Srwatson if test "$GCC" = yes; then 5836156283Srwatson _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 5837156283Srwatson _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' 5838156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 5839156283Srwatson else 5840156283Srwatson _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 5841156283Srwatson _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' 5842156283Srwatson _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~ 5843156283Srwatson $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' 5844156283Srwatson 5845156283Srwatson # Both c and cxx compiler support -rpath directly 5846156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 5847156283Srwatson fi 5848156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 5849156283Srwatson ;; 5850156283Srwatson 5851156283Srwatson sco3.2v5*) 5852156283Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5853156283Srwatson _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 5854156283Srwatson _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 5855156283Srwatson runpath_var=LD_RUN_PATH 5856156283Srwatson hardcode_runpath_var=yes 5857156283Srwatson ;; 5858156283Srwatson 5859156283Srwatson solaris*) 5860156283Srwatson _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text' 5861156283Srwatson if test "$GCC" = yes; then 5862156283Srwatson wlarc='${wl}' 5863156283Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 5864156283Srwatson _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 5865156283Srwatson $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' 5866156283Srwatson else 5867156283Srwatson wlarc='' 5868156283Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' 5869156283Srwatson _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 5870156283Srwatson $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' 5871156283Srwatson fi 5872156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5873156283Srwatson _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 5874156283Srwatson case $host_os in 5875156283Srwatson solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 5876156283Srwatson *) 5877156283Srwatson # The compiler driver will combine linker options so we 5878156283Srwatson # cannot just pass the convience library names through 5879156283Srwatson # without $wl, iff we do not link with $LD. 5880156283Srwatson # Luckily, gcc supports the same syntax we need for Sun Studio. 5881156283Srwatson # Supported since Solaris 2.6 (maybe 2.5.1?) 5882156283Srwatson case $wlarc in 5883156283Srwatson '') 5884156283Srwatson _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; 5885156283Srwatson *) 5886156283Srwatson _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;; 5887156283Srwatson esac ;; 5888156283Srwatson esac 5889156283Srwatson _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 5890156283Srwatson ;; 5891156283Srwatson 5892156283Srwatson sunos4*) 5893156283Srwatson if test "x$host_vendor" = xsequent; then 5894156283Srwatson # Use $CC to link under sequent, because it throws in some extra .o 5895156283Srwatson # files that make .init and .fini sections work. 5896156283Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' 5897156283Srwatson else 5898156283Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 5899156283Srwatson fi 5900156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5901156283Srwatson _LT_AC_TAGVAR(hardcode_direct, $1)=yes 5902156283Srwatson _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 5903156283Srwatson _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 5904156283Srwatson ;; 5905156283Srwatson 5906156283Srwatson sysv4) 5907156283Srwatson case $host_vendor in 5908156283Srwatson sni) 5909156283Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5910156283Srwatson _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 5911156283Srwatson ;; 5912156283Srwatson siemens) 5913156283Srwatson ## LD is ld it makes a PLAMLIB 5914156283Srwatson ## CC just makes a GrossModule. 5915156283Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 5916156283Srwatson _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 5917156283Srwatson _LT_AC_TAGVAR(hardcode_direct, $1)=no 5918156283Srwatson ;; 5919156283Srwatson motorola) 5920156283Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5921156283Srwatson _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 5922156283Srwatson ;; 5923156283Srwatson esac 5924156283Srwatson runpath_var='LD_RUN_PATH' 5925156283Srwatson _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 5926156283Srwatson ;; 5927156283Srwatson 5928156283Srwatson sysv4.3*) 5929156283Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5930156283Srwatson _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 5931156283Srwatson _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 5932156283Srwatson ;; 5933156283Srwatson 5934156283Srwatson sysv4*MP*) 5935156283Srwatson if test -d /usr/nec; then 5936156283Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5937156283Srwatson _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 5938156283Srwatson runpath_var=LD_RUN_PATH 5939156283Srwatson hardcode_runpath_var=yes 5940156283Srwatson _LT_AC_TAGVAR(ld_shlibs, $1)=yes 5941156283Srwatson fi 5942156283Srwatson ;; 5943156283Srwatson 5944156283Srwatson sysv4.2uw2*) 5945156283Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 5946156283Srwatson _LT_AC_TAGVAR(hardcode_direct, $1)=yes 5947156283Srwatson _LT_AC_TAGVAR(hardcode_minus_L, $1)=no 5948156283Srwatson _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 5949156283Srwatson hardcode_runpath_var=yes 5950156283Srwatson runpath_var=LD_RUN_PATH 5951156283Srwatson ;; 5952156283Srwatson 5953156283Srwatson sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*) 5954156283Srwatson _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z ${wl}text' 5955156283Srwatson if test "$GCC" = yes; then 5956156283Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 5957156283Srwatson else 5958156283Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 5959156283Srwatson fi 5960156283Srwatson runpath_var='LD_RUN_PATH' 5961156283Srwatson _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 5962156283Srwatson ;; 5963156283Srwatson 5964156283Srwatson sysv5*) 5965156283Srwatson _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text' 5966156283Srwatson # $CC -shared without GNU ld will not create a library from C++ 5967156283Srwatson # object files and a static libstdc++, better avoid it by now 5968156283Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' 5969156283Srwatson _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 5970156283Srwatson $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' 5971156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= 5972156283Srwatson _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 5973156283Srwatson runpath_var='LD_RUN_PATH' 5974156283Srwatson ;; 5975156283Srwatson 5976156283Srwatson uts4*) 5977156283Srwatson _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5978156283Srwatson _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5979156283Srwatson _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 5980156283Srwatson ;; 5981156283Srwatson 5982156283Srwatson *) 5983156283Srwatson _LT_AC_TAGVAR(ld_shlibs, $1)=no 5984156283Srwatson ;; 5985156283Srwatson esac 5986156283Srwatson fi 5987156283Srwatson]) 5988156283SrwatsonAC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) 5989156283Srwatsontest "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 5990156283Srwatson 5991156283Srwatsonvariables_saved_for_relink="PATH $shlibpath_var $runpath_var" 5992156283Srwatsonif test "$GCC" = yes; then 5993156283Srwatson variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 5994156283Srwatsonfi 5995156283Srwatson 5996156283Srwatson# 5997156283Srwatson# Do we need to explicitly link libc? 5998156283Srwatson# 5999156283Srwatsoncase "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in 6000156283Srwatsonx|xyes) 6001156283Srwatson # Assume -lc should be added 6002156283Srwatson _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes 6003156283Srwatson 6004156283Srwatson if test "$enable_shared" = yes && test "$GCC" = yes; then 6005156283Srwatson case $_LT_AC_TAGVAR(archive_cmds, $1) in 6006156283Srwatson *'~'*) 6007156283Srwatson # FIXME: we may have to deal with multi-command sequences. 6008156283Srwatson ;; 6009156283Srwatson '$CC '*) 6010156283Srwatson # Test whether the compiler implicitly links with -lc since on some 6011156283Srwatson # systems, -lgcc has to come before -lc. If gcc already passes -lc 6012156283Srwatson # to ld, don't add -lc before -lgcc. 6013156283Srwatson AC_MSG_CHECKING([whether -lc should be explicitly linked in]) 6014156283Srwatson $rm conftest* 6015156283Srwatson printf "$lt_simple_compile_test_code" > conftest.$ac_ext 6016156283Srwatson 6017156283Srwatson if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 6018156283Srwatson soname=conftest 6019156283Srwatson lib=conftest 6020156283Srwatson libobjs=conftest.$ac_objext 6021156283Srwatson deplibs= 6022156283Srwatson wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) 6023156283Srwatson compiler_flags=-v 6024156283Srwatson linker_flags=-v 6025156283Srwatson verstring= 6026156283Srwatson output_objdir=. 6027156283Srwatson libname=conftest 6028156283Srwatson lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1) 6029156283Srwatson _LT_AC_TAGVAR(allow_undefined_flag, $1)= 6030156283Srwatson if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 6031156283Srwatson then 6032156283Srwatson _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 6033156283Srwatson else 6034156283Srwatson _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes 6035156283Srwatson fi 6036156283Srwatson _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 6037156283Srwatson else 6038156283Srwatson cat conftest.err 1>&5 6039156283Srwatson fi 6040156283Srwatson $rm conftest* 6041156283Srwatson AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)]) 6042156283Srwatson ;; 6043156283Srwatson esac 6044156283Srwatson fi 6045156283Srwatson ;; 6046156283Srwatsonesac 6047156283Srwatson])# AC_LIBTOOL_PROG_LD_SHLIBS 6048156283Srwatson 6049156283Srwatson 6050156283Srwatson# _LT_AC_FILE_LTDLL_C 6051156283Srwatson# ------------------- 6052156283Srwatson# Be careful that the start marker always follows a newline. 6053156283SrwatsonAC_DEFUN([_LT_AC_FILE_LTDLL_C], [ 6054156283Srwatson# /* ltdll.c starts here */ 6055156283Srwatson# #define WIN32_LEAN_AND_MEAN 6056156283Srwatson# #include <windows.h> 6057156283Srwatson# #undef WIN32_LEAN_AND_MEAN 6058156283Srwatson# #include <stdio.h> 6059156283Srwatson# 6060156283Srwatson# #ifndef __CYGWIN__ 6061156283Srwatson# # ifdef __CYGWIN32__ 6062156283Srwatson# # define __CYGWIN__ __CYGWIN32__ 6063156283Srwatson# # endif 6064156283Srwatson# #endif 6065156283Srwatson# 6066156283Srwatson# #ifdef __cplusplus 6067156283Srwatson# extern "C" { 6068156283Srwatson# #endif 6069156283Srwatson# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved); 6070156283Srwatson# #ifdef __cplusplus 6071156283Srwatson# } 6072156283Srwatson# #endif 6073156283Srwatson# 6074156283Srwatson# #ifdef __CYGWIN__ 6075156283Srwatson# #include <cygwin/cygwin_dll.h> 6076156283Srwatson# DECLARE_CYGWIN_DLL( DllMain ); 6077156283Srwatson# #endif 6078156283Srwatson# HINSTANCE __hDllInstance_base; 6079156283Srwatson# 6080156283Srwatson# BOOL APIENTRY 6081156283Srwatson# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved) 6082156283Srwatson# { 6083156283Srwatson# __hDllInstance_base = hInst; 6084156283Srwatson# return TRUE; 6085156283Srwatson# } 6086156283Srwatson# /* ltdll.c ends here */ 6087156283Srwatson])# _LT_AC_FILE_LTDLL_C 6088156283Srwatson 6089156283Srwatson 6090156283Srwatson# _LT_AC_TAGVAR(VARNAME, [TAGNAME]) 6091156283Srwatson# --------------------------------- 6092156283SrwatsonAC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])]) 6093156283Srwatson 6094156283Srwatson 6095156283Srwatson# old names 6096156283SrwatsonAC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL]) 6097156283SrwatsonAC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 6098156283SrwatsonAC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 6099156283SrwatsonAC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 6100156283SrwatsonAC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 6101156283SrwatsonAC_DEFUN([AM_PROG_LD], [AC_PROG_LD]) 6102156283SrwatsonAC_DEFUN([AM_PROG_NM], [AC_PROG_NM]) 6103156283Srwatson 6104156283Srwatson# This is just to silence aclocal about the macro not being used 6105156283Srwatsonifelse([AC_DISABLE_FAST_INSTALL]) 6106156283Srwatson 6107156283SrwatsonAC_DEFUN([LT_AC_PROG_GCJ], 6108156283Srwatson[AC_CHECK_TOOL(GCJ, gcj, no) 6109156283Srwatson test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" 6110156283Srwatson AC_SUBST(GCJFLAGS) 6111156283Srwatson]) 6112156283Srwatson 6113156283SrwatsonAC_DEFUN([LT_AC_PROG_RC], 6114156283Srwatson[AC_CHECK_TOOL(RC, windres, no) 6115156283Srwatson]) 6116156283Srwatson 6117156283Srwatson# NOTE: This macro has been submitted for inclusion into # 6118156283Srwatson# GNU Autoconf as AC_PROG_SED. When it is available in # 6119156283Srwatson# a released version of Autoconf we should remove this # 6120156283Srwatson# macro and use it instead. # 6121156283Srwatson# LT_AC_PROG_SED 6122156283Srwatson# -------------- 6123156283Srwatson# Check for a fully-functional sed program, that truncates 6124156283Srwatson# as few characters as possible. Prefer GNU sed if found. 6125156283SrwatsonAC_DEFUN([LT_AC_PROG_SED], 6126156283Srwatson[AC_MSG_CHECKING([for a sed that does not truncate output]) 6127156283SrwatsonAC_CACHE_VAL(lt_cv_path_SED, 6128156283Srwatson[# Loop through the user's path and test for sed and gsed. 6129156283Srwatson# Then use that list of sed's as ones to test for truncation. 6130156283Srwatsonas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 6131156283Srwatsonfor as_dir in $PATH 6132156283Srwatsondo 6133156283Srwatson IFS=$as_save_IFS 6134156283Srwatson test -z "$as_dir" && as_dir=. 6135156283Srwatson for lt_ac_prog in sed gsed; do 6136156283Srwatson for ac_exec_ext in '' $ac_executable_extensions; do 6137156283Srwatson if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 6138156283Srwatson lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 6139156283Srwatson fi 6140156283Srwatson done 6141156283Srwatson done 6142156283Srwatsondone 6143156283Srwatsonlt_ac_max=0 6144156283Srwatsonlt_ac_count=0 6145156283Srwatson# Add /usr/xpg4/bin/sed as it is typically found on Solaris 6146156283Srwatson# along with /bin/sed that truncates output. 6147156283Srwatsonfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 6148156283Srwatson test ! -f $lt_ac_sed && continue 6149156283Srwatson cat /dev/null > conftest.in 6150156283Srwatson lt_ac_count=0 6151156283Srwatson echo $ECHO_N "0123456789$ECHO_C" >conftest.in 6152156283Srwatson # Check for GNU sed and select it if it is found. 6153156283Srwatson if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 6154156283Srwatson lt_cv_path_SED=$lt_ac_sed 6155156283Srwatson break 6156156283Srwatson fi 6157156283Srwatson while true; do 6158156283Srwatson cat conftest.in conftest.in >conftest.tmp 6159156283Srwatson mv conftest.tmp conftest.in 6160156283Srwatson cp conftest.in conftest.nl 6161156283Srwatson echo >>conftest.nl 6162156283Srwatson $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 6163156283Srwatson cmp -s conftest.out conftest.nl || break 6164156283Srwatson # 10000 chars as input seems more than enough 6165156283Srwatson test $lt_ac_count -gt 10 && break 6166156283Srwatson lt_ac_count=`expr $lt_ac_count + 1` 6167156283Srwatson if test $lt_ac_count -gt $lt_ac_max; then 6168156283Srwatson lt_ac_max=$lt_ac_count 6169156283Srwatson lt_cv_path_SED=$lt_ac_sed 6170156283Srwatson fi 6171156283Srwatson done 6172156283Srwatsondone 6173156283Srwatson]) 6174156283SrwatsonSED=$lt_cv_path_SED 6175156283SrwatsonAC_MSG_RESULT([$SED]) 6176156283Srwatson]) 6177156283Srwatson 6178156283Srwatson# Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc. 6179156283Srwatson# 6180156283Srwatson# This file is free software; the Free Software Foundation 6181156283Srwatson# gives unlimited permission to copy and/or distribute it, 6182156283Srwatson# with or without modifications, as long as this notice is preserved. 6183156283Srwatson 6184156283Srwatson# AM_AUTOMAKE_VERSION(VERSION) 6185156283Srwatson# ---------------------------- 6186156283Srwatson# Automake X.Y traces this macro to ensure aclocal.m4 has been 6187156283Srwatson# generated from the m4 files accompanying Automake X.Y. 6188156283SrwatsonAC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"]) 6189156283Srwatson 6190156283Srwatson# AM_SET_CURRENT_AUTOMAKE_VERSION 6191156283Srwatson# ------------------------------- 6192156283Srwatson# Call AM_AUTOMAKE_VERSION so it can be traced. 6193156283Srwatson# This function is AC_REQUIREd by AC_INIT_AUTOMAKE. 6194156283SrwatsonAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 6195156283Srwatson [AM_AUTOMAKE_VERSION([1.9.6])]) 6196156283Srwatson 6197156283Srwatson# AM_AUX_DIR_EXPAND -*- Autoconf -*- 6198156283Srwatson 6199156283Srwatson# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 6200156283Srwatson# 6201156283Srwatson# This file is free software; the Free Software Foundation 6202156283Srwatson# gives unlimited permission to copy and/or distribute it, 6203156283Srwatson# with or without modifications, as long as this notice is preserved. 6204156283Srwatson 6205156283Srwatson# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 6206156283Srwatson# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to 6207156283Srwatson# `$srcdir', `$srcdir/..', or `$srcdir/../..'. 6208156283Srwatson# 6209156283Srwatson# Of course, Automake must honor this variable whenever it calls a 6210156283Srwatson# tool from the auxiliary directory. The problem is that $srcdir (and 6211156283Srwatson# therefore $ac_aux_dir as well) can be either absolute or relative, 6212156283Srwatson# depending on how configure is run. This is pretty annoying, since 6213156283Srwatson# it makes $ac_aux_dir quite unusable in subdirectories: in the top 6214156283Srwatson# source directory, any form will work fine, but in subdirectories a 6215156283Srwatson# relative path needs to be adjusted first. 6216156283Srwatson# 6217156283Srwatson# $ac_aux_dir/missing 6218156283Srwatson# fails when called from a subdirectory if $ac_aux_dir is relative 6219156283Srwatson# $top_srcdir/$ac_aux_dir/missing 6220156283Srwatson# fails if $ac_aux_dir is absolute, 6221156283Srwatson# fails when called from a subdirectory in a VPATH build with 6222156283Srwatson# a relative $ac_aux_dir 6223156283Srwatson# 6224156283Srwatson# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 6225156283Srwatson# are both prefixed by $srcdir. In an in-source build this is usually 6226156283Srwatson# harmless because $srcdir is `.', but things will broke when you 6227156283Srwatson# start a VPATH build or use an absolute $srcdir. 6228156283Srwatson# 6229156283Srwatson# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 6230156283Srwatson# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 6231156283Srwatson# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 6232156283Srwatson# and then we would define $MISSING as 6233156283Srwatson# MISSING="\${SHELL} $am_aux_dir/missing" 6234156283Srwatson# This will work as long as MISSING is not called from configure, because 6235156283Srwatson# unfortunately $(top_srcdir) has no meaning in configure. 6236156283Srwatson# However there are other variables, like CC, which are often used in 6237156283Srwatson# configure, and could therefore not use this "fixed" $ac_aux_dir. 6238156283Srwatson# 6239156283Srwatson# Another solution, used here, is to always expand $ac_aux_dir to an 6240156283Srwatson# absolute PATH. The drawback is that using absolute paths prevent a 6241156283Srwatson# configured tree to be moved without reconfiguration. 6242156283Srwatson 6243156283SrwatsonAC_DEFUN([AM_AUX_DIR_EXPAND], 6244156283Srwatson[dnl Rely on autoconf to set up CDPATH properly. 6245156283SrwatsonAC_PREREQ([2.50])dnl 6246156283Srwatson# expand $ac_aux_dir to an absolute path 6247156283Srwatsonam_aux_dir=`cd $ac_aux_dir && pwd` 6248156283Srwatson]) 6249156283Srwatson 6250156283Srwatson# AM_CONDITIONAL -*- Autoconf -*- 6251156283Srwatson 6252156283Srwatson# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005 6253156283Srwatson# Free Software Foundation, Inc. 6254156283Srwatson# 6255156283Srwatson# This file is free software; the Free Software Foundation 6256156283Srwatson# gives unlimited permission to copy and/or distribute it, 6257156283Srwatson# with or without modifications, as long as this notice is preserved. 6258156283Srwatson 6259156283Srwatson# serial 7 6260156283Srwatson 6261156283Srwatson# AM_CONDITIONAL(NAME, SHELL-CONDITION) 6262156283Srwatson# ------------------------------------- 6263156283Srwatson# Define a conditional. 6264156283SrwatsonAC_DEFUN([AM_CONDITIONAL], 6265156283Srwatson[AC_PREREQ(2.52)dnl 6266156283Srwatson ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 6267156283Srwatson [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 6268156283SrwatsonAC_SUBST([$1_TRUE]) 6269156283SrwatsonAC_SUBST([$1_FALSE]) 6270156283Srwatsonif $2; then 6271156283Srwatson $1_TRUE= 6272156283Srwatson $1_FALSE='#' 6273156283Srwatsonelse 6274156283Srwatson $1_TRUE='#' 6275156283Srwatson $1_FALSE= 6276156283Srwatsonfi 6277156283SrwatsonAC_CONFIG_COMMANDS_PRE( 6278156283Srwatson[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 6279156283Srwatson AC_MSG_ERROR([[conditional "$1" was never defined. 6280156283SrwatsonUsually this means the macro was only invoked conditionally.]]) 6281156283Srwatsonfi])]) 6282156283Srwatson 6283156283Srwatson 6284156283Srwatson# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 6285156283Srwatson# Free Software Foundation, Inc. 6286156283Srwatson# 6287156283Srwatson# This file is free software; the Free Software Foundation 6288156283Srwatson# gives unlimited permission to copy and/or distribute it, 6289156283Srwatson# with or without modifications, as long as this notice is preserved. 6290156283Srwatson 6291156283Srwatson# serial 8 6292156283Srwatson 6293156283Srwatson# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be 6294156283Srwatson# written in clear, in which case automake, when reading aclocal.m4, 6295156283Srwatson# will think it sees a *use*, and therefore will trigger all it's 6296156283Srwatson# C support machinery. Also note that it means that autoscan, seeing 6297156283Srwatson# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 6298156283Srwatson 6299156283Srwatson 6300156283Srwatson# _AM_DEPENDENCIES(NAME) 6301156283Srwatson# ---------------------- 6302156283Srwatson# See how the compiler implements dependency checking. 6303156283Srwatson# NAME is "CC", "CXX", "GCJ", or "OBJC". 6304156283Srwatson# We try a few techniques and use that to set a single cache variable. 6305156283Srwatson# 6306156283Srwatson# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 6307156283Srwatson# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 6308156283Srwatson# dependency, and given that the user is not expected to run this macro, 6309156283Srwatson# just rely on AC_PROG_CC. 6310156283SrwatsonAC_DEFUN([_AM_DEPENDENCIES], 6311156283Srwatson[AC_REQUIRE([AM_SET_DEPDIR])dnl 6312156283SrwatsonAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 6313156283SrwatsonAC_REQUIRE([AM_MAKE_INCLUDE])dnl 6314156283SrwatsonAC_REQUIRE([AM_DEP_TRACK])dnl 6315156283Srwatson 6316156283Srwatsonifelse([$1], CC, [depcc="$CC" am_compiler_list=], 6317156283Srwatson [$1], CXX, [depcc="$CXX" am_compiler_list=], 6318156283Srwatson [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 6319156283Srwatson [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 6320156283Srwatson [depcc="$$1" am_compiler_list=]) 6321156283Srwatson 6322156283SrwatsonAC_CACHE_CHECK([dependency style of $depcc], 6323156283Srwatson [am_cv_$1_dependencies_compiler_type], 6324156283Srwatson[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 6325156283Srwatson # We make a subdir and do the tests there. Otherwise we can end up 6326156283Srwatson # making bogus files that we don't know about and never remove. For 6327156283Srwatson # instance it was reported that on HP-UX the gcc test will end up 6328156283Srwatson # making a dummy file named `D' -- because `-MD' means `put the output 6329156283Srwatson # in D'. 6330156283Srwatson mkdir conftest.dir 6331156283Srwatson # Copy depcomp to subdir because otherwise we won't find it if we're 6332156283Srwatson # using a relative directory. 6333156283Srwatson cp "$am_depcomp" conftest.dir 6334156283Srwatson cd conftest.dir 6335156283Srwatson # We will build objects and dependencies in a subdirectory because 6336156283Srwatson # it helps to detect inapplicable dependency modes. For instance 6337156283Srwatson # both Tru64's cc and ICC support -MD to output dependencies as a 6338156283Srwatson # side effect of compilation, but ICC will put the dependencies in 6339156283Srwatson # the current directory while Tru64 will put them in the object 6340156283Srwatson # directory. 6341156283Srwatson mkdir sub 6342156283Srwatson 6343156283Srwatson am_cv_$1_dependencies_compiler_type=none 6344156283Srwatson if test "$am_compiler_list" = ""; then 6345156283Srwatson am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 6346156283Srwatson fi 6347156283Srwatson for depmode in $am_compiler_list; do 6348156283Srwatson # Setup a source with many dependencies, because some compilers 6349156283Srwatson # like to wrap large dependency lists on column 80 (with \), and 6350156283Srwatson # we should not choose a depcomp mode which is confused by this. 6351156283Srwatson # 6352156283Srwatson # We need to recreate these files for each test, as the compiler may 6353156283Srwatson # overwrite some of them when testing with obscure command lines. 6354156283Srwatson # This happens at least with the AIX C compiler. 6355156283Srwatson : > sub/conftest.c 6356156283Srwatson for i in 1 2 3 4 5 6; do 6357156283Srwatson echo '#include "conftst'$i'.h"' >> sub/conftest.c 6358156283Srwatson # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with 6359156283Srwatson # Solaris 8's {/usr,}/bin/sh. 6360156283Srwatson touch sub/conftst$i.h 6361156283Srwatson done 6362156283Srwatson echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 6363156283Srwatson 6364156283Srwatson case $depmode in 6365156283Srwatson nosideeffect) 6366156283Srwatson # after this tag, mechanisms are not by side-effect, so they'll 6367156283Srwatson # only be used when explicitly requested 6368156283Srwatson if test "x$enable_dependency_tracking" = xyes; then 6369156283Srwatson continue 6370156283Srwatson else 6371156283Srwatson break 6372156283Srwatson fi 6373156283Srwatson ;; 6374156283Srwatson none) break ;; 6375156283Srwatson esac 6376156283Srwatson # We check with `-c' and `-o' for the sake of the "dashmstdout" 6377156283Srwatson # mode. It turns out that the SunPro C++ compiler does not properly 6378156283Srwatson # handle `-M -o', and we need to detect this. 6379156283Srwatson if depmode=$depmode \ 6380156283Srwatson source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ 6381156283Srwatson depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 6382156283Srwatson $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ 6383156283Srwatson >/dev/null 2>conftest.err && 6384156283Srwatson grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 6385156283Srwatson grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && 6386156283Srwatson ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 6387156283Srwatson # icc doesn't choke on unknown options, it will just issue warnings 6388156283Srwatson # or remarks (even with -Werror). So we grep stderr for any message 6389156283Srwatson # that says an option was ignored or not supported. 6390156283Srwatson # When given -MP, icc 7.0 and 7.1 complain thusly: 6391156283Srwatson # icc: Command line warning: ignoring option '-M'; no argument required 6392156283Srwatson # The diagnosis changed in icc 8.0: 6393156283Srwatson # icc: Command line remark: option '-MP' not supported 6394156283Srwatson if (grep 'ignoring option' conftest.err || 6395156283Srwatson grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 6396156283Srwatson am_cv_$1_dependencies_compiler_type=$depmode 6397156283Srwatson break 6398156283Srwatson fi 6399156283Srwatson fi 6400156283Srwatson done 6401156283Srwatson 6402156283Srwatson cd .. 6403156283Srwatson rm -rf conftest.dir 6404156283Srwatsonelse 6405156283Srwatson am_cv_$1_dependencies_compiler_type=none 6406156283Srwatsonfi 6407156283Srwatson]) 6408156283SrwatsonAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 6409156283SrwatsonAM_CONDITIONAL([am__fastdep$1], [ 6410156283Srwatson test "x$enable_dependency_tracking" != xno \ 6411156283Srwatson && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 6412156283Srwatson]) 6413156283Srwatson 6414156283Srwatson 6415156283Srwatson# AM_SET_DEPDIR 6416156283Srwatson# ------------- 6417156283Srwatson# Choose a directory name for dependency files. 6418156283Srwatson# This macro is AC_REQUIREd in _AM_DEPENDENCIES 6419156283SrwatsonAC_DEFUN([AM_SET_DEPDIR], 6420156283Srwatson[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 6421156283SrwatsonAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 6422156283Srwatson]) 6423156283Srwatson 6424156283Srwatson 6425156283Srwatson# AM_DEP_TRACK 6426156283Srwatson# ------------ 6427156283SrwatsonAC_DEFUN([AM_DEP_TRACK], 6428156283Srwatson[AC_ARG_ENABLE(dependency-tracking, 6429156283Srwatson[ --disable-dependency-tracking speeds up one-time build 6430156283Srwatson --enable-dependency-tracking do not reject slow dependency extractors]) 6431156283Srwatsonif test "x$enable_dependency_tracking" != xno; then 6432156283Srwatson am_depcomp="$ac_aux_dir/depcomp" 6433156283Srwatson AMDEPBACKSLASH='\' 6434156283Srwatsonfi 6435156283SrwatsonAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 6436156283SrwatsonAC_SUBST([AMDEPBACKSLASH]) 6437156283Srwatson]) 6438156283Srwatson 6439156283Srwatson# Generate code to set up dependency tracking. -*- Autoconf -*- 6440156283Srwatson 6441156283Srwatson# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 6442156283Srwatson# Free Software Foundation, Inc. 6443156283Srwatson# 6444156283Srwatson# This file is free software; the Free Software Foundation 6445156283Srwatson# gives unlimited permission to copy and/or distribute it, 6446156283Srwatson# with or without modifications, as long as this notice is preserved. 6447156283Srwatson 6448156283Srwatson#serial 3 6449156283Srwatson 6450156283Srwatson# _AM_OUTPUT_DEPENDENCY_COMMANDS 6451156283Srwatson# ------------------------------ 6452156283SrwatsonAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 6453156283Srwatson[for mf in $CONFIG_FILES; do 6454156283Srwatson # Strip MF so we end up with the name of the file. 6455156283Srwatson mf=`echo "$mf" | sed -e 's/:.*$//'` 6456156283Srwatson # Check whether this is an Automake generated Makefile or not. 6457156283Srwatson # We used to match only the files named `Makefile.in', but 6458156283Srwatson # some people rename them; so instead we look at the file content. 6459156283Srwatson # Grep'ing the first line is not enough: some people post-process 6460156283Srwatson # each Makefile.in and add a new line on top of each file to say so. 6461156283Srwatson # So let's grep whole file. 6462156283Srwatson if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then 6463156283Srwatson dirpart=`AS_DIRNAME("$mf")` 6464156283Srwatson else 6465156283Srwatson continue 6466156283Srwatson fi 6467156283Srwatson # Extract the definition of DEPDIR, am__include, and am__quote 6468156283Srwatson # from the Makefile without running `make'. 6469156283Srwatson DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` 6470156283Srwatson test -z "$DEPDIR" && continue 6471156283Srwatson am__include=`sed -n 's/^am__include = //p' < "$mf"` 6472156283Srwatson test -z "am__include" && continue 6473156283Srwatson am__quote=`sed -n 's/^am__quote = //p' < "$mf"` 6474156283Srwatson # When using ansi2knr, U may be empty or an underscore; expand it 6475156283Srwatson U=`sed -n 's/^U = //p' < "$mf"` 6476156283Srwatson # Find all dependency output files, they are included files with 6477156283Srwatson # $(DEPDIR) in their names. We invoke sed twice because it is the 6478156283Srwatson # simplest approach to changing $(DEPDIR) to its actual value in the 6479156283Srwatson # expansion. 6480156283Srwatson for file in `sed -n " 6481156283Srwatson s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ 6482156283Srwatson sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do 6483156283Srwatson # Make sure the directory exists. 6484156283Srwatson test -f "$dirpart/$file" && continue 6485156283Srwatson fdir=`AS_DIRNAME(["$file"])` 6486156283Srwatson AS_MKDIR_P([$dirpart/$fdir]) 6487156283Srwatson # echo "creating $dirpart/$file" 6488156283Srwatson echo '# dummy' > "$dirpart/$file" 6489156283Srwatson done 6490156283Srwatsondone 6491156283Srwatson])# _AM_OUTPUT_DEPENDENCY_COMMANDS 6492156283Srwatson 6493156283Srwatson 6494156283Srwatson# AM_OUTPUT_DEPENDENCY_COMMANDS 6495156283Srwatson# ----------------------------- 6496156283Srwatson# This macro should only be invoked once -- use via AC_REQUIRE. 6497156283Srwatson# 6498156283Srwatson# This code is only required when automatic dependency tracking 6499156283Srwatson# is enabled. FIXME. This creates each `.P' file that we will 6500156283Srwatson# need in order to bootstrap the dependency handling code. 6501156283SrwatsonAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 6502156283Srwatson[AC_CONFIG_COMMANDS([depfiles], 6503156283Srwatson [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 6504156283Srwatson [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 6505156283Srwatson]) 6506156283Srwatson 6507156283Srwatson# Do all the work for Automake. -*- Autoconf -*- 6508156283Srwatson 6509156283Srwatson# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 6510156283Srwatson# Free Software Foundation, Inc. 6511156283Srwatson# 6512156283Srwatson# This file is free software; the Free Software Foundation 6513156283Srwatson# gives unlimited permission to copy and/or distribute it, 6514156283Srwatson# with or without modifications, as long as this notice is preserved. 6515156283Srwatson 6516156283Srwatson# serial 12 6517156283Srwatson 6518156283Srwatson# This macro actually does too much. Some checks are only needed if 6519156283Srwatson# your package does certain things. But this isn't really a big deal. 6520156283Srwatson 6521156283Srwatson# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 6522156283Srwatson# AM_INIT_AUTOMAKE([OPTIONS]) 6523156283Srwatson# ----------------------------------------------- 6524156283Srwatson# The call with PACKAGE and VERSION arguments is the old style 6525156283Srwatson# call (pre autoconf-2.50), which is being phased out. PACKAGE 6526156283Srwatson# and VERSION should now be passed to AC_INIT and removed from 6527156283Srwatson# the call to AM_INIT_AUTOMAKE. 6528156283Srwatson# We support both call styles for the transition. After 6529156283Srwatson# the next Automake release, Autoconf can make the AC_INIT 6530156283Srwatson# arguments mandatory, and then we can depend on a new Autoconf 6531156283Srwatson# release and drop the old call support. 6532156283SrwatsonAC_DEFUN([AM_INIT_AUTOMAKE], 6533156283Srwatson[AC_PREREQ([2.58])dnl 6534156283Srwatsondnl Autoconf wants to disallow AM_ names. We explicitly allow 6535156283Srwatsondnl the ones we care about. 6536156283Srwatsonm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 6537156283SrwatsonAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 6538156283SrwatsonAC_REQUIRE([AC_PROG_INSTALL])dnl 6539156283Srwatson# test to see if srcdir already configured 6540156283Srwatsonif test "`cd $srcdir && pwd`" != "`pwd`" && 6541156283Srwatson test -f $srcdir/config.status; then 6542156283Srwatson AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 6543156283Srwatsonfi 6544156283Srwatson 6545156283Srwatson# test whether we have cygpath 6546156283Srwatsonif test -z "$CYGPATH_W"; then 6547156283Srwatson if (cygpath --version) >/dev/null 2>/dev/null; then 6548156283Srwatson CYGPATH_W='cygpath -w' 6549156283Srwatson else 6550156283Srwatson CYGPATH_W=echo 6551156283Srwatson fi 6552156283Srwatsonfi 6553156283SrwatsonAC_SUBST([CYGPATH_W]) 6554156283Srwatson 6555156283Srwatson# Define the identity of the package. 6556156283Srwatsondnl Distinguish between old-style and new-style calls. 6557156283Srwatsonm4_ifval([$2], 6558156283Srwatson[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 6559156283Srwatson AC_SUBST([PACKAGE], [$1])dnl 6560156283Srwatson AC_SUBST([VERSION], [$2])], 6561156283Srwatson[_AM_SET_OPTIONS([$1])dnl 6562156283Srwatson AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 6563156283Srwatson AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 6564156283Srwatson 6565156283Srwatson_AM_IF_OPTION([no-define],, 6566156283Srwatson[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) 6567156283Srwatson AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl 6568156283Srwatson 6569156283Srwatson# Some tools Automake needs. 6570156283SrwatsonAC_REQUIRE([AM_SANITY_CHECK])dnl 6571156283SrwatsonAC_REQUIRE([AC_ARG_PROGRAM])dnl 6572156283SrwatsonAM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) 6573156283SrwatsonAM_MISSING_PROG(AUTOCONF, autoconf) 6574156283SrwatsonAM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) 6575156283SrwatsonAM_MISSING_PROG(AUTOHEADER, autoheader) 6576156283SrwatsonAM_MISSING_PROG(MAKEINFO, makeinfo) 6577156283SrwatsonAM_PROG_INSTALL_SH 6578156283SrwatsonAM_PROG_INSTALL_STRIP 6579156283SrwatsonAC_REQUIRE([AM_PROG_MKDIR_P])dnl 6580156283Srwatson# We need awk for the "check" target. The system "awk" is bad on 6581156283Srwatson# some platforms. 6582156283SrwatsonAC_REQUIRE([AC_PROG_AWK])dnl 6583156283SrwatsonAC_REQUIRE([AC_PROG_MAKE_SET])dnl 6584156283SrwatsonAC_REQUIRE([AM_SET_LEADING_DOT])dnl 6585156283Srwatson_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 6586156283Srwatson [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 6587156283Srwatson [_AM_PROG_TAR([v7])])]) 6588156283Srwatson_AM_IF_OPTION([no-dependencies],, 6589156283Srwatson[AC_PROVIDE_IFELSE([AC_PROG_CC], 6590156283Srwatson [_AM_DEPENDENCIES(CC)], 6591156283Srwatson [define([AC_PROG_CC], 6592156283Srwatson defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl 6593156283SrwatsonAC_PROVIDE_IFELSE([AC_PROG_CXX], 6594156283Srwatson [_AM_DEPENDENCIES(CXX)], 6595156283Srwatson [define([AC_PROG_CXX], 6596156283Srwatson defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl 6597156283Srwatson]) 6598156283Srwatson]) 6599156283Srwatson 6600156283Srwatson 6601156283Srwatson# When config.status generates a header, we must update the stamp-h file. 6602156283Srwatson# This file resides in the same directory as the config header 6603156283Srwatson# that is generated. The stamp files are numbered to have different names. 6604156283Srwatson 6605156283Srwatson# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 6606156283Srwatson# loop where config.status creates the headers, so we can generate 6607156283Srwatson# our stamp files there. 6608156283SrwatsonAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 6609156283Srwatson[# Compute $1's index in $config_headers. 6610156283Srwatson_am_stamp_count=1 6611156283Srwatsonfor _am_header in $config_headers :; do 6612156283Srwatson case $_am_header in 6613156283Srwatson $1 | $1:* ) 6614156283Srwatson break ;; 6615156283Srwatson * ) 6616156283Srwatson _am_stamp_count=`expr $_am_stamp_count + 1` ;; 6617156283Srwatson esac 6618156283Srwatsondone 6619156283Srwatsonecho "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) 6620156283Srwatson 6621156283Srwatson# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 6622156283Srwatson# 6623156283Srwatson# This file is free software; the Free Software Foundation 6624156283Srwatson# gives unlimited permission to copy and/or distribute it, 6625156283Srwatson# with or without modifications, as long as this notice is preserved. 6626156283Srwatson 6627156283Srwatson# AM_PROG_INSTALL_SH 6628156283Srwatson# ------------------ 6629156283Srwatson# Define $install_sh. 6630156283SrwatsonAC_DEFUN([AM_PROG_INSTALL_SH], 6631156283Srwatson[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 6632156283Srwatsoninstall_sh=${install_sh-"$am_aux_dir/install-sh"} 6633156283SrwatsonAC_SUBST(install_sh)]) 6634156283Srwatson 6635156283Srwatson# Copyright (C) 2003, 2005 Free Software Foundation, Inc. 6636156283Srwatson# 6637156283Srwatson# This file is free software; the Free Software Foundation 6638156283Srwatson# gives unlimited permission to copy and/or distribute it, 6639156283Srwatson# with or without modifications, as long as this notice is preserved. 6640156283Srwatson 6641156283Srwatson# serial 2 6642156283Srwatson 6643156283Srwatson# Check whether the underlying file-system supports filenames 6644156283Srwatson# with a leading dot. For instance MS-DOS doesn't. 6645156283SrwatsonAC_DEFUN([AM_SET_LEADING_DOT], 6646156283Srwatson[rm -rf .tst 2>/dev/null 6647156283Srwatsonmkdir .tst 2>/dev/null 6648156283Srwatsonif test -d .tst; then 6649156283Srwatson am__leading_dot=. 6650156283Srwatsonelse 6651156283Srwatson am__leading_dot=_ 6652156283Srwatsonfi 6653156283Srwatsonrmdir .tst 2>/dev/null 6654156283SrwatsonAC_SUBST([am__leading_dot])]) 6655156283Srwatson 6656156283Srwatson# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- 6657156283Srwatson# From Jim Meyering 6658156283Srwatson 6659156283Srwatson# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005 6660156283Srwatson# Free Software Foundation, Inc. 6661156283Srwatson# 6662156283Srwatson# This file is free software; the Free Software Foundation 6663156283Srwatson# gives unlimited permission to copy and/or distribute it, 6664156283Srwatson# with or without modifications, as long as this notice is preserved. 6665156283Srwatson 6666156283Srwatson# serial 4 6667156283Srwatson 6668156283SrwatsonAC_DEFUN([AM_MAINTAINER_MODE], 6669156283Srwatson[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) 6670156283Srwatson dnl maintainer-mode is disabled by default 6671156283Srwatson AC_ARG_ENABLE(maintainer-mode, 6672156283Srwatson[ --enable-maintainer-mode enable make rules and dependencies not useful 6673156283Srwatson (and sometimes confusing) to the casual installer], 6674156283Srwatson USE_MAINTAINER_MODE=$enableval, 6675156283Srwatson USE_MAINTAINER_MODE=no) 6676156283Srwatson AC_MSG_RESULT([$USE_MAINTAINER_MODE]) 6677156283Srwatson AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes]) 6678156283Srwatson MAINT=$MAINTAINER_MODE_TRUE 6679156283Srwatson AC_SUBST(MAINT)dnl 6680156283Srwatson] 6681156283Srwatson) 6682156283Srwatson 6683156283SrwatsonAU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) 6684156283Srwatson 6685156283Srwatson# Check to see how 'make' treats includes. -*- Autoconf -*- 6686156283Srwatson 6687156283Srwatson# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. 6688156283Srwatson# 6689156283Srwatson# This file is free software; the Free Software Foundation 6690156283Srwatson# gives unlimited permission to copy and/or distribute it, 6691156283Srwatson# with or without modifications, as long as this notice is preserved. 6692156283Srwatson 6693156283Srwatson# serial 3 6694156283Srwatson 6695156283Srwatson# AM_MAKE_INCLUDE() 6696156283Srwatson# ----------------- 6697156283Srwatson# Check to see how make treats includes. 6698156283SrwatsonAC_DEFUN([AM_MAKE_INCLUDE], 6699156283Srwatson[am_make=${MAKE-make} 6700156283Srwatsoncat > confinc << 'END' 6701156283Srwatsonam__doit: 6702156283Srwatson @echo done 6703156283Srwatson.PHONY: am__doit 6704156283SrwatsonEND 6705156283Srwatson# If we don't find an include directive, just comment out the code. 6706156283SrwatsonAC_MSG_CHECKING([for style of include used by $am_make]) 6707156283Srwatsonam__include="#" 6708156283Srwatsonam__quote= 6709156283Srwatson_am_result=none 6710156283Srwatson# First try GNU make style include. 6711156283Srwatsonecho "include confinc" > confmf 6712156283Srwatson# We grep out `Entering directory' and `Leaving directory' 6713156283Srwatson# messages which can occur if `w' ends up in MAKEFLAGS. 6714156283Srwatson# In particular we don't look at `^make:' because GNU make might 6715156283Srwatson# be invoked under some other name (usually "gmake"), in which 6716156283Srwatson# case it prints its new name instead of `make'. 6717156283Srwatsonif test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then 6718156283Srwatson am__include=include 6719156283Srwatson am__quote= 6720156283Srwatson _am_result=GNU 6721156283Srwatsonfi 6722156283Srwatson# Now try BSD make style include. 6723156283Srwatsonif test "$am__include" = "#"; then 6724156283Srwatson echo '.include "confinc"' > confmf 6725156283Srwatson if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then 6726156283Srwatson am__include=.include 6727156283Srwatson am__quote="\"" 6728156283Srwatson _am_result=BSD 6729156283Srwatson fi 6730156283Srwatsonfi 6731156283SrwatsonAC_SUBST([am__include]) 6732156283SrwatsonAC_SUBST([am__quote]) 6733156283SrwatsonAC_MSG_RESULT([$_am_result]) 6734156283Srwatsonrm -f confinc confmf 6735156283Srwatson]) 6736156283Srwatson 6737156283Srwatson# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 6738156283Srwatson 6739156283Srwatson# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005 6740156283Srwatson# Free Software Foundation, Inc. 6741156283Srwatson# 6742156283Srwatson# This file is free software; the Free Software Foundation 6743156283Srwatson# gives unlimited permission to copy and/or distribute it, 6744156283Srwatson# with or without modifications, as long as this notice is preserved. 6745156283Srwatson 6746156283Srwatson# serial 4 6747156283Srwatson 6748156283Srwatson# AM_MISSING_PROG(NAME, PROGRAM) 6749156283Srwatson# ------------------------------ 6750156283SrwatsonAC_DEFUN([AM_MISSING_PROG], 6751156283Srwatson[AC_REQUIRE([AM_MISSING_HAS_RUN]) 6752156283Srwatson$1=${$1-"${am_missing_run}$2"} 6753156283SrwatsonAC_SUBST($1)]) 6754156283Srwatson 6755156283Srwatson 6756156283Srwatson# AM_MISSING_HAS_RUN 6757156283Srwatson# ------------------ 6758156283Srwatson# Define MISSING if not defined so far and test if it supports --run. 6759156283Srwatson# If it does, set am_missing_run to use it, otherwise, to nothing. 6760156283SrwatsonAC_DEFUN([AM_MISSING_HAS_RUN], 6761156283Srwatson[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 6762156283Srwatsontest x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" 6763156283Srwatson# Use eval to expand $SHELL 6764156283Srwatsonif eval "$MISSING --run true"; then 6765156283Srwatson am_missing_run="$MISSING --run " 6766156283Srwatsonelse 6767156283Srwatson am_missing_run= 6768156283Srwatson AC_MSG_WARN([`missing' script is too old or missing]) 6769156283Srwatsonfi 6770156283Srwatson]) 6771156283Srwatson 6772156283Srwatson# Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc. 6773156283Srwatson# 6774156283Srwatson# This file is free software; the Free Software Foundation 6775156283Srwatson# gives unlimited permission to copy and/or distribute it, 6776156283Srwatson# with or without modifications, as long as this notice is preserved. 6777156283Srwatson 6778156283Srwatson# AM_PROG_MKDIR_P 6779156283Srwatson# --------------- 6780156283Srwatson# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise. 6781156283Srwatson# 6782156283Srwatson# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories 6783156283Srwatson# created by `make install' are always world readable, even if the 6784156283Srwatson# installer happens to have an overly restrictive umask (e.g. 077). 6785156283Srwatson# This was a mistake. There are at least two reasons why we must not 6786156283Srwatson# use `-m 0755': 6787156283Srwatson# - it causes special bits like SGID to be ignored, 6788156283Srwatson# - it may be too restrictive (some setups expect 775 directories). 6789156283Srwatson# 6790156283Srwatson# Do not use -m 0755 and let people choose whatever they expect by 6791156283Srwatson# setting umask. 6792156283Srwatson# 6793156283Srwatson# We cannot accept any implementation of `mkdir' that recognizes `-p'. 6794156283Srwatson# Some implementations (such as Solaris 8's) are not thread-safe: if a 6795156283Srwatson# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c' 6796156283Srwatson# concurrently, both version can detect that a/ is missing, but only 6797156283Srwatson# one can create it and the other will error out. Consequently we 6798156283Srwatson# restrict ourselves to GNU make (using the --version option ensures 6799156283Srwatson# this.) 6800156283SrwatsonAC_DEFUN([AM_PROG_MKDIR_P], 6801156283Srwatson[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then 6802156283Srwatson # We used to keeping the `.' as first argument, in order to 6803156283Srwatson # allow $(mkdir_p) to be used without argument. As in 6804156283Srwatson # $(mkdir_p) $(somedir) 6805156283Srwatson # where $(somedir) is conditionally defined. However this is wrong 6806156283Srwatson # for two reasons: 6807156283Srwatson # 1. if the package is installed by a user who cannot write `.' 6808156283Srwatson # make install will fail, 6809156283Srwatson # 2. the above comment should most certainly read 6810156283Srwatson # $(mkdir_p) $(DESTDIR)$(somedir) 6811156283Srwatson # so it does not work when $(somedir) is undefined and 6812156283Srwatson # $(DESTDIR) is not. 6813156283Srwatson # To support the latter case, we have to write 6814156283Srwatson # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir), 6815156283Srwatson # so the `.' trick is pointless. 6816156283Srwatson mkdir_p='mkdir -p --' 6817156283Srwatsonelse 6818156283Srwatson # On NextStep and OpenStep, the `mkdir' command does not 6819156283Srwatson # recognize any option. It will interpret all options as 6820156283Srwatson # directories to create, and then abort because `.' already 6821156283Srwatson # exists. 6822156283Srwatson for d in ./-p ./--version; 6823156283Srwatson do 6824156283Srwatson test -d $d && rmdir $d 6825156283Srwatson done 6826156283Srwatson # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists. 6827156283Srwatson if test -f "$ac_aux_dir/mkinstalldirs"; then 6828156283Srwatson mkdir_p='$(mkinstalldirs)' 6829156283Srwatson else 6830156283Srwatson mkdir_p='$(install_sh) -d' 6831156283Srwatson fi 6832156283Srwatsonfi 6833156283SrwatsonAC_SUBST([mkdir_p])]) 6834156283Srwatson 6835156283Srwatson# Helper functions for option handling. -*- Autoconf -*- 6836156283Srwatson 6837156283Srwatson# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. 6838156283Srwatson# 6839156283Srwatson# This file is free software; the Free Software Foundation 6840156283Srwatson# gives unlimited permission to copy and/or distribute it, 6841156283Srwatson# with or without modifications, as long as this notice is preserved. 6842156283Srwatson 6843156283Srwatson# serial 3 6844156283Srwatson 6845156283Srwatson# _AM_MANGLE_OPTION(NAME) 6846156283Srwatson# ----------------------- 6847156283SrwatsonAC_DEFUN([_AM_MANGLE_OPTION], 6848156283Srwatson[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 6849156283Srwatson 6850156283Srwatson# _AM_SET_OPTION(NAME) 6851156283Srwatson# ------------------------------ 6852156283Srwatson# Set option NAME. Presently that only means defining a flag for this option. 6853156283SrwatsonAC_DEFUN([_AM_SET_OPTION], 6854156283Srwatson[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) 6855156283Srwatson 6856156283Srwatson# _AM_SET_OPTIONS(OPTIONS) 6857156283Srwatson# ---------------------------------- 6858156283Srwatson# OPTIONS is a space-separated list of Automake options. 6859156283SrwatsonAC_DEFUN([_AM_SET_OPTIONS], 6860156283Srwatson[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 6861156283Srwatson 6862156283Srwatson# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 6863156283Srwatson# ------------------------------------------- 6864156283Srwatson# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 6865156283SrwatsonAC_DEFUN([_AM_IF_OPTION], 6866156283Srwatson[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 6867156283Srwatson 6868156283Srwatson# Check to make sure that the build environment is sane. -*- Autoconf -*- 6869156283Srwatson 6870156283Srwatson# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 6871156283Srwatson# Free Software Foundation, Inc. 6872156283Srwatson# 6873156283Srwatson# This file is free software; the Free Software Foundation 6874156283Srwatson# gives unlimited permission to copy and/or distribute it, 6875156283Srwatson# with or without modifications, as long as this notice is preserved. 6876156283Srwatson 6877156283Srwatson# serial 4 6878156283Srwatson 6879156283Srwatson# AM_SANITY_CHECK 6880156283Srwatson# --------------- 6881156283SrwatsonAC_DEFUN([AM_SANITY_CHECK], 6882156283Srwatson[AC_MSG_CHECKING([whether build environment is sane]) 6883156283Srwatson# Just in case 6884156283Srwatsonsleep 1 6885156283Srwatsonecho timestamp > conftest.file 6886156283Srwatson# Do `set' in a subshell so we don't clobber the current shell's 6887156283Srwatson# arguments. Must try -L first in case configure is actually a 6888156283Srwatson# symlink; some systems play weird games with the mod time of symlinks 6889156283Srwatson# (eg FreeBSD returns the mod time of the symlink's containing 6890156283Srwatson# directory). 6891156283Srwatsonif ( 6892156283Srwatson set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` 6893156283Srwatson if test "$[*]" = "X"; then 6894156283Srwatson # -L didn't work. 6895156283Srwatson set X `ls -t $srcdir/configure conftest.file` 6896156283Srwatson fi 6897156283Srwatson rm -f conftest.file 6898156283Srwatson if test "$[*]" != "X $srcdir/configure conftest.file" \ 6899156283Srwatson && test "$[*]" != "X conftest.file $srcdir/configure"; then 6900156283Srwatson 6901156283Srwatson # If neither matched, then we have a broken ls. This can happen 6902156283Srwatson # if, for instance, CONFIG_SHELL is bash and it inherits a 6903156283Srwatson # broken ls alias from the environment. This has actually 6904156283Srwatson # happened. Such a system could not be considered "sane". 6905156283Srwatson AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 6906156283Srwatsonalias in your environment]) 6907156283Srwatson fi 6908156283Srwatson 6909156283Srwatson test "$[2]" = conftest.file 6910156283Srwatson ) 6911156283Srwatsonthen 6912156283Srwatson # Ok. 6913156283Srwatson : 6914156283Srwatsonelse 6915156283Srwatson AC_MSG_ERROR([newly created file is older than distributed files! 6916156283SrwatsonCheck your system clock]) 6917156283Srwatsonfi 6918156283SrwatsonAC_MSG_RESULT(yes)]) 6919156283Srwatson 6920156283Srwatson# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 6921156283Srwatson# 6922156283Srwatson# This file is free software; the Free Software Foundation 6923156283Srwatson# gives unlimited permission to copy and/or distribute it, 6924156283Srwatson# with or without modifications, as long as this notice is preserved. 6925156283Srwatson 6926156283Srwatson# AM_PROG_INSTALL_STRIP 6927156283Srwatson# --------------------- 6928156283Srwatson# One issue with vendor `install' (even GNU) is that you can't 6929156283Srwatson# specify the program used to strip binaries. This is especially 6930156283Srwatson# annoying in cross-compiling environments, where the build's strip 6931156283Srwatson# is unlikely to handle the host's binaries. 6932156283Srwatson# Fortunately install-sh will honor a STRIPPROG variable, so we 6933156283Srwatson# always use install-sh in `make install-strip', and initialize 6934156283Srwatson# STRIPPROG with the value of the STRIP variable (set by the user). 6935156283SrwatsonAC_DEFUN([AM_PROG_INSTALL_STRIP], 6936156283Srwatson[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 6937156283Srwatson# Installed binaries are usually stripped using `strip' when the user 6938156283Srwatson# run `make install-strip'. However `strip' might not be the right 6939156283Srwatson# tool to use in cross-compilation environments, therefore Automake 6940156283Srwatson# will honor the `STRIP' environment variable to overrule this program. 6941156283Srwatsondnl Don't test for $cross_compiling = yes, because it might be `maybe'. 6942156283Srwatsonif test "$cross_compiling" != no; then 6943156283Srwatson AC_CHECK_TOOL([STRIP], [strip], :) 6944156283Srwatsonfi 6945156283SrwatsonINSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" 6946156283SrwatsonAC_SUBST([INSTALL_STRIP_PROGRAM])]) 6947156283Srwatson 6948156283Srwatson# Check how to create a tarball. -*- Autoconf -*- 6949156283Srwatson 6950156283Srwatson# Copyright (C) 2004, 2005 Free Software Foundation, Inc. 6951156283Srwatson# 6952156283Srwatson# This file is free software; the Free Software Foundation 6953156283Srwatson# gives unlimited permission to copy and/or distribute it, 6954156283Srwatson# with or without modifications, as long as this notice is preserved. 6955156283Srwatson 6956156283Srwatson# serial 2 6957156283Srwatson 6958156283Srwatson# _AM_PROG_TAR(FORMAT) 6959156283Srwatson# -------------------- 6960156283Srwatson# Check how to create a tarball in format FORMAT. 6961156283Srwatson# FORMAT should be one of `v7', `ustar', or `pax'. 6962156283Srwatson# 6963156283Srwatson# Substitute a variable $(am__tar) that is a command 6964156283Srwatson# writing to stdout a FORMAT-tarball containing the directory 6965156283Srwatson# $tardir. 6966156283Srwatson# tardir=directory && $(am__tar) > result.tar 6967156283Srwatson# 6968156283Srwatson# Substitute a variable $(am__untar) that extract such 6969156283Srwatson# a tarball read from stdin. 6970156283Srwatson# $(am__untar) < result.tar 6971156283SrwatsonAC_DEFUN([_AM_PROG_TAR], 6972156283Srwatson[# Always define AMTAR for backward compatibility. 6973156283SrwatsonAM_MISSING_PROG([AMTAR], [tar]) 6974156283Srwatsonm4_if([$1], [v7], 6975156283Srwatson [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], 6976156283Srwatson [m4_case([$1], [ustar],, [pax],, 6977156283Srwatson [m4_fatal([Unknown tar format])]) 6978156283SrwatsonAC_MSG_CHECKING([how to create a $1 tar archive]) 6979156283Srwatson# Loop over all known methods to create a tar archive until one works. 6980156283Srwatson_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 6981156283Srwatson_am_tools=${am_cv_prog_tar_$1-$_am_tools} 6982156283Srwatson# Do not fold the above two line into one, because Tru64 sh and 6983156283Srwatson# Solaris sh will not grok spaces in the rhs of `-'. 6984156283Srwatsonfor _am_tool in $_am_tools 6985156283Srwatsondo 6986156283Srwatson case $_am_tool in 6987156283Srwatson gnutar) 6988156283Srwatson for _am_tar in tar gnutar gtar; 6989156283Srwatson do 6990156283Srwatson AM_RUN_LOG([$_am_tar --version]) && break 6991156283Srwatson done 6992156283Srwatson am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 6993156283Srwatson am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 6994156283Srwatson am__untar="$_am_tar -xf -" 6995156283Srwatson ;; 6996156283Srwatson plaintar) 6997156283Srwatson # Must skip GNU tar: if it does not support --format= it doesn't create 6998156283Srwatson # ustar tarball either. 6999156283Srwatson (tar --version) >/dev/null 2>&1 && continue 7000156283Srwatson am__tar='tar chf - "$$tardir"' 7001156283Srwatson am__tar_='tar chf - "$tardir"' 7002156283Srwatson am__untar='tar xf -' 7003156283Srwatson ;; 7004156283Srwatson pax) 7005156283Srwatson am__tar='pax -L -x $1 -w "$$tardir"' 7006156283Srwatson am__tar_='pax -L -x $1 -w "$tardir"' 7007156283Srwatson am__untar='pax -r' 7008156283Srwatson ;; 7009156283Srwatson cpio) 7010156283Srwatson am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 7011156283Srwatson am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 7012156283Srwatson am__untar='cpio -i -H $1 -d' 7013156283Srwatson ;; 7014156283Srwatson none) 7015156283Srwatson am__tar=false 7016156283Srwatson am__tar_=false 7017156283Srwatson am__untar=false 7018156283Srwatson ;; 7019156283Srwatson esac 7020156283Srwatson 7021156283Srwatson # If the value was cached, stop now. We just wanted to have am__tar 7022156283Srwatson # and am__untar set. 7023156283Srwatson test -n "${am_cv_prog_tar_$1}" && break 7024156283Srwatson 7025156283Srwatson # tar/untar a dummy directory, and stop if the command works 7026156283Srwatson rm -rf conftest.dir 7027156283Srwatson mkdir conftest.dir 7028156283Srwatson echo GrepMe > conftest.dir/file 7029156283Srwatson AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 7030156283Srwatson rm -rf conftest.dir 7031156283Srwatson if test -s conftest.tar; then 7032156283Srwatson AM_RUN_LOG([$am__untar <conftest.tar]) 7033156283Srwatson grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 7034156283Srwatson fi 7035156283Srwatsondone 7036156283Srwatsonrm -rf conftest.dir 7037156283Srwatson 7038156283SrwatsonAC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 7039156283SrwatsonAC_MSG_RESULT([$am_cv_prog_tar_$1])]) 7040156283SrwatsonAC_SUBST([am__tar]) 7041156283SrwatsonAC_SUBST([am__untar]) 7042156283Srwatson]) # _AM_PROG_TAR 7043156283Srwatson 7044