/contrib/ntp/sntp/aclocal.m4
m4 | 7128 lines | 4818 code | 739 blank | 1571 comment | 0 complexity | 0d840b6b7d0cb34c6d8a65127f10125d MD5 | raw file
Large files files are truncated, but you can click here to view the full file
1# generated automatically by aclocal 1.11 -*- Autoconf -*- 2 3# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 4# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. 5# This file is free software; the Free Software Foundation 6# gives unlimited permission to copy and/or distribute it, 7# with or without modifications, as long as this notice is preserved. 8 9# This program is distributed in the hope that it will be useful, 10# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 11# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 12# PARTICULAR PURPOSE. 13 14m4_ifndef([AC_AUTOCONF_VERSION], 15 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 16m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.65],, 17[m4_warning([this file was generated for autoconf 2.65. 18You have another version of autoconf. It may work, but is not guaranteed to. 19If you have problems, you may need to regenerate the build system entirely. 20To do so, use the procedure documented by the package, typically `autoreconf'.])]) 21 22# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 23 24# serial 47 AC_PROG_LIBTOOL 25 26 27# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED) 28# ----------------------------------------------------------- 29# If this macro is not defined by Autoconf, define it here. 30m4_ifdef([AC_PROVIDE_IFELSE], 31 [], 32 [m4_define([AC_PROVIDE_IFELSE], 33 [m4_ifdef([AC_PROVIDE_$1], 34 [$2], [$3])])]) 35 36 37# AC_PROG_LIBTOOL 38# --------------- 39AC_DEFUN([AC_PROG_LIBTOOL], 40[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl 41dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX 42dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX. 43 AC_PROVIDE_IFELSE([AC_PROG_CXX], 44 [AC_LIBTOOL_CXX], 45 [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX 46 ])]) 47dnl And a similar setup for Fortran 77 support 48 AC_PROVIDE_IFELSE([AC_PROG_F77], 49 [AC_LIBTOOL_F77], 50 [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77 51])]) 52 53dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly. 54dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run 55dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both. 56 AC_PROVIDE_IFELSE([AC_PROG_GCJ], 57 [AC_LIBTOOL_GCJ], 58 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 59 [AC_LIBTOOL_GCJ], 60 [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ], 61 [AC_LIBTOOL_GCJ], 62 [ifdef([AC_PROG_GCJ], 63 [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])]) 64 ifdef([A][M_PROG_GCJ], 65 [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])]) 66 ifdef([LT_AC_PROG_GCJ], 67 [define([LT_AC_PROG_GCJ], 68 defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])]) 69])])# AC_PROG_LIBTOOL 70 71 72# _AC_PROG_LIBTOOL 73# ---------------- 74AC_DEFUN([_AC_PROG_LIBTOOL], 75[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl 76AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl 77AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl 78AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl 79 80# This can be used to rebuild libtool when needed 81LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" 82 83# Always use our own libtool. 84LIBTOOL='$(SHELL) $(top_builddir)/libtool' 85AC_SUBST(LIBTOOL)dnl 86 87# Prevent multiple expansion 88define([AC_PROG_LIBTOOL], []) 89])# _AC_PROG_LIBTOOL 90 91 92# AC_LIBTOOL_SETUP 93# ---------------- 94AC_DEFUN([AC_LIBTOOL_SETUP], 95[AC_PREREQ(2.50)dnl 96AC_REQUIRE([AC_ENABLE_SHARED])dnl 97AC_REQUIRE([AC_ENABLE_STATIC])dnl 98AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl 99AC_REQUIRE([AC_CANONICAL_HOST])dnl 100AC_REQUIRE([AC_CANONICAL_BUILD])dnl 101AC_REQUIRE([AC_PROG_CC])dnl 102AC_REQUIRE([AC_PROG_LD])dnl 103AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl 104AC_REQUIRE([AC_PROG_NM])dnl 105 106AC_REQUIRE([AC_PROG_LN_S])dnl 107AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl 108# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! 109AC_REQUIRE([AC_OBJEXT])dnl 110AC_REQUIRE([AC_EXEEXT])dnl 111dnl 112 113AC_LIBTOOL_SYS_MAX_CMD_LEN 114AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE 115AC_LIBTOOL_OBJDIR 116 117AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl 118_LT_AC_PROG_ECHO_BACKSLASH 119 120case $host_os in 121aix3*) 122 # AIX sometimes has problems with the GCC collect2 program. For some 123 # reason, if we set the COLLECT_NAMES environment variable, the problems 124 # vanish in a puff of smoke. 125 if test "X${COLLECT_NAMES+set}" != Xset; then 126 COLLECT_NAMES= 127 export COLLECT_NAMES 128 fi 129 ;; 130esac 131 132# Sed substitution that helps us do robust quoting. It backslashifies 133# metacharacters that are still active within double-quoted strings. 134Xsed='sed -e 1s/^X//' 135[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'] 136 137# Same as above, but do not quote variable references. 138[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'] 139 140# Sed substitution to delay expansion of an escaped shell variable in a 141# double_quote_subst'ed string. 142delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 143 144# Sed substitution to avoid accidental globbing in evaled expressions 145no_glob_subst='s/\*/\\\*/g' 146 147# Constants: 148rm="rm -f" 149 150# Global variables: 151default_ofile=libtool 152can_build_shared=yes 153 154# All known linkers require a `.a' archive for static linking (except MSVC, 155# which needs '.lib'). 156libext=a 157ltmain="$ac_aux_dir/ltmain.sh" 158ofile="$default_ofile" 159with_gnu_ld="$lt_cv_prog_gnu_ld" 160 161AC_CHECK_TOOL(AR, ar, false) 162AC_CHECK_TOOL(RANLIB, ranlib, :) 163AC_CHECK_TOOL(STRIP, strip, :) 164 165old_CC="$CC" 166old_CFLAGS="$CFLAGS" 167 168# Set sane defaults for various variables 169test -z "$AR" && AR=ar 170test -z "$AR_FLAGS" && AR_FLAGS=cru 171test -z "$AS" && AS=as 172test -z "$CC" && CC=cc 173test -z "$LTCC" && LTCC=$CC 174test -z "$DLLTOOL" && DLLTOOL=dlltool 175test -z "$LD" && LD=ld 176test -z "$LN_S" && LN_S="ln -s" 177test -z "$MAGIC_CMD" && MAGIC_CMD=file 178test -z "$NM" && NM=nm 179test -z "$SED" && SED=sed 180test -z "$OBJDUMP" && OBJDUMP=objdump 181test -z "$RANLIB" && RANLIB=: 182test -z "$STRIP" && STRIP=: 183test -z "$ac_objext" && ac_objext=o 184 185# Determine commands to create old-style static archives. 186old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs' 187old_postinstall_cmds='chmod 644 $oldlib' 188old_postuninstall_cmds= 189 190if test -n "$RANLIB"; then 191 case $host_os in 192 openbsd*) 193 old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds" 194 ;; 195 *) 196 old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds" 197 ;; 198 esac 199 old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" 200fi 201 202_LT_CC_BASENAME([$compiler]) 203 204# Only perform the check for file, if the check method requires it 205case $deplibs_check_method in 206file_magic*) 207 if test "$file_magic_cmd" = '$MAGIC_CMD'; then 208 AC_PATH_MAGIC 209 fi 210 ;; 211esac 212 213AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no) 214AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], 215enable_win32_dll=yes, enable_win32_dll=no) 216 217AC_ARG_ENABLE([libtool-lock], 218 [AC_HELP_STRING([--disable-libtool-lock], 219 [avoid locking (might break parallel builds)])]) 220test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes 221 222AC_ARG_WITH([pic], 223 [AC_HELP_STRING([--with-pic], 224 [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 225 [pic_mode="$withval"], 226 [pic_mode=default]) 227test -z "$pic_mode" && pic_mode=default 228 229# Use C for the default configuration in the libtool script 230tagname= 231AC_LIBTOOL_LANG_C_CONFIG 232_LT_AC_TAGCONFIG 233])# AC_LIBTOOL_SETUP 234 235 236# _LT_AC_SYS_COMPILER 237# ------------------- 238AC_DEFUN([_LT_AC_SYS_COMPILER], 239[AC_REQUIRE([AC_PROG_CC])dnl 240 241# If no C compiler was specified, use CC. 242LTCC=${LTCC-"$CC"} 243 244# Allow CC to be a program name with arguments. 245compiler=$CC 246])# _LT_AC_SYS_COMPILER 247 248 249# _LT_CC_BASENAME(CC) 250# ------------------- 251# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 252AC_DEFUN([_LT_CC_BASENAME], 253[for cc_temp in $1""; do 254 case $cc_temp in 255 compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 256 distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 257 \-*) ;; 258 *) break;; 259 esac 260done 261cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` 262]) 263 264 265# _LT_COMPILER_BOILERPLATE 266# ------------------------ 267# Check for compiler boilerplate output or warnings with 268# the simple compiler test code. 269AC_DEFUN([_LT_COMPILER_BOILERPLATE], 270[ac_outfile=conftest.$ac_objext 271printf "$lt_simple_compile_test_code" >conftest.$ac_ext 272eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err 273_lt_compiler_boilerplate=`cat conftest.err` 274$rm conftest* 275])# _LT_COMPILER_BOILERPLATE 276 277 278# _LT_LINKER_BOILERPLATE 279# ---------------------- 280# Check for linker boilerplate output or warnings with 281# the simple link test code. 282AC_DEFUN([_LT_LINKER_BOILERPLATE], 283[ac_outfile=conftest.$ac_objext 284printf "$lt_simple_link_test_code" >conftest.$ac_ext 285eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err 286_lt_linker_boilerplate=`cat conftest.err` 287$rm conftest* 288])# _LT_LINKER_BOILERPLATE 289 290 291# _LT_AC_SYS_LIBPATH_AIX 292# ---------------------- 293# Links a minimal program and checks the executable 294# for the system default hardcoded library path. In most cases, 295# this is /usr/lib:/lib, but when the MPI compilers are used 296# the location of the communication and MPI libs are included too. 297# If we don't find anything, use the default library path according 298# to the aix ld manual. 299AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX], 300[AC_LINK_IFELSE(AC_LANG_PROGRAM,[ 301aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } 302}'` 303# Check for a 64-bit object if we didn't find anything. 304if 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; } 305}'`; fi],[]) 306if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi 307])# _LT_AC_SYS_LIBPATH_AIX 308 309 310# _LT_AC_SHELL_INIT(ARG) 311# ---------------------- 312AC_DEFUN([_LT_AC_SHELL_INIT], 313[ifdef([AC_DIVERSION_NOTICE], 314 [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], 315 [AC_DIVERT_PUSH(NOTICE)]) 316$1 317AC_DIVERT_POP 318])# _LT_AC_SHELL_INIT 319 320 321# _LT_AC_PROG_ECHO_BACKSLASH 322# -------------------------- 323# Add some code to the start of the generated configure script which 324# will find an echo command which doesn't interpret backslashes. 325AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH], 326[_LT_AC_SHELL_INIT([ 327# Check that we are running under the correct shell. 328SHELL=${CONFIG_SHELL-/bin/sh} 329 330case X$ECHO in 331X*--fallback-echo) 332 # Remove one level of quotation (which was required for Make). 333 ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` 334 ;; 335esac 336 337echo=${ECHO-echo} 338if test "X[$]1" = X--no-reexec; then 339 # Discard the --no-reexec flag, and continue. 340 shift 341elif test "X[$]1" = X--fallback-echo; then 342 # Avoid inline document here, it may be left over 343 : 344elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then 345 # Yippee, $echo works! 346 : 347else 348 # Restart under the correct shell. 349 exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} 350fi 351 352if test "X[$]1" = X--fallback-echo; then 353 # used as fallback echo 354 shift 355 cat <<EOF 356[$]* 357EOF 358 exit 0 359fi 360 361# The HP-UX ksh and POSIX shell print the target directory to stdout 362# if CDPATH is set. 363(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 364 365if test -z "$ECHO"; then 366if test "X${echo_test_string+set}" != Xset; then 367# find a string as large as possible, as long as the shell can cope with it 368 for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do 369 # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... 370 if (echo_test_string=`eval $cmd`) 2>/dev/null && 371 echo_test_string=`eval $cmd` && 372 (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null 373 then 374 break 375 fi 376 done 377fi 378 379if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && 380 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && 381 test "X$echo_testing_string" = "X$echo_test_string"; then 382 : 383else 384 # The Solaris, AIX, and Digital Unix default echo programs unquote 385 # backslashes. This makes it impossible to quote backslashes using 386 # echo "$something" | sed 's/\\/\\\\/g' 387 # 388 # So, first we look for a working echo in the user's PATH. 389 390 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 391 for dir in $PATH /usr/ucb; do 392 IFS="$lt_save_ifs" 393 if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && 394 test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && 395 echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && 396 test "X$echo_testing_string" = "X$echo_test_string"; then 397 echo="$dir/echo" 398 break 399 fi 400 done 401 IFS="$lt_save_ifs" 402 403 if test "X$echo" = Xecho; then 404 # We didn't find a better echo, so look for alternatives. 405 if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && 406 echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && 407 test "X$echo_testing_string" = "X$echo_test_string"; then 408 # This shell has a builtin print -r that does the trick. 409 echo='print -r' 410 elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && 411 test "X$CONFIG_SHELL" != X/bin/ksh; then 412 # If we have ksh, try running configure again with it. 413 ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} 414 export ORIGINAL_CONFIG_SHELL 415 CONFIG_SHELL=/bin/ksh 416 export CONFIG_SHELL 417 exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} 418 else 419 # Try using printf. 420 echo='printf %s\n' 421 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && 422 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && 423 test "X$echo_testing_string" = "X$echo_test_string"; then 424 # Cool, printf works 425 : 426 elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && 427 test "X$echo_testing_string" = 'X\t' && 428 echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && 429 test "X$echo_testing_string" = "X$echo_test_string"; then 430 CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL 431 export CONFIG_SHELL 432 SHELL="$CONFIG_SHELL" 433 export SHELL 434 echo="$CONFIG_SHELL [$]0 --fallback-echo" 435 elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && 436 test "X$echo_testing_string" = 'X\t' && 437 echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && 438 test "X$echo_testing_string" = "X$echo_test_string"; then 439 echo="$CONFIG_SHELL [$]0 --fallback-echo" 440 else 441 # maybe with a smaller string... 442 prev=: 443 444 for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do 445 if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null 446 then 447 break 448 fi 449 prev="$cmd" 450 done 451 452 if test "$prev" != 'sed 50q "[$]0"'; then 453 echo_test_string=`eval $prev` 454 export echo_test_string 455 exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} 456 else 457 # Oops. We lost completely, so just stick with echo. 458 echo=echo 459 fi 460 fi 461 fi 462 fi 463fi 464fi 465 466# Copy echo and quote the copy suitably for passing to libtool from 467# the Makefile, instead of quoting the original, which is used later. 468ECHO=$echo 469if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then 470 ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" 471fi 472 473AC_SUBST(ECHO) 474])])# _LT_AC_PROG_ECHO_BACKSLASH 475 476 477# _LT_AC_LOCK 478# ----------- 479AC_DEFUN([_LT_AC_LOCK], 480[AC_ARG_ENABLE([libtool-lock], 481 [AC_HELP_STRING([--disable-libtool-lock], 482 [avoid locking (might break parallel builds)])]) 483test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes 484 485# Some flags need to be propagated to the compiler or linker for good 486# libtool support. 487case $host in 488ia64-*-hpux*) 489 # Find out which ABI we are using. 490 echo 'int i;' > conftest.$ac_ext 491 if AC_TRY_EVAL(ac_compile); then 492 case `/usr/bin/file conftest.$ac_objext` in 493 *ELF-32*) 494 HPUX_IA64_MODE="32" 495 ;; 496 *ELF-64*) 497 HPUX_IA64_MODE="64" 498 ;; 499 esac 500 fi 501 rm -rf conftest* 502 ;; 503*-*-irix6*) 504 # Find out which ABI we are using. 505 echo '[#]line __oline__ "configure"' > conftest.$ac_ext 506 if AC_TRY_EVAL(ac_compile); then 507 if test "$lt_cv_prog_gnu_ld" = yes; then 508 case `/usr/bin/file conftest.$ac_objext` in 509 *32-bit*) 510 LD="${LD-ld} -melf32bsmip" 511 ;; 512 *N32*) 513 LD="${LD-ld} -melf32bmipn32" 514 ;; 515 *64-bit*) 516 LD="${LD-ld} -melf64bmip" 517 ;; 518 esac 519 else 520 case `/usr/bin/file conftest.$ac_objext` in 521 *32-bit*) 522 LD="${LD-ld} -32" 523 ;; 524 *N32*) 525 LD="${LD-ld} -n32" 526 ;; 527 *64-bit*) 528 LD="${LD-ld} -64" 529 ;; 530 esac 531 fi 532 fi 533 rm -rf conftest* 534 ;; 535 536x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*) 537 # Find out which ABI we are using. 538 echo 'int i;' > conftest.$ac_ext 539 if AC_TRY_EVAL(ac_compile); then 540 case `/usr/bin/file conftest.o` in 541 *32-bit*) 542 case $host in 543 x86_64-*linux*) 544 LD="${LD-ld} -m elf_i386" 545 ;; 546 ppc64-*linux*|powerpc64-*linux*) 547 LD="${LD-ld} -m elf32ppclinux" 548 ;; 549 s390x-*linux*) 550 LD="${LD-ld} -m elf_s390" 551 ;; 552 sparc64-*linux*) 553 LD="${LD-ld} -m elf32_sparc" 554 ;; 555 esac 556 ;; 557 *64-bit*) 558 case $host in 559 x86_64-*linux*) 560 LD="${LD-ld} -m elf_x86_64" 561 ;; 562 ppc*-*linux*|powerpc*-*linux*) 563 LD="${LD-ld} -m elf64ppc" 564 ;; 565 s390*-*linux*) 566 LD="${LD-ld} -m elf64_s390" 567 ;; 568 sparc*-*linux*) 569 LD="${LD-ld} -m elf64_sparc" 570 ;; 571 esac 572 ;; 573 esac 574 fi 575 rm -rf conftest* 576 ;; 577 578*-*-sco3.2v5*) 579 # On SCO OpenServer 5, we need -belf to get full-featured binaries. 580 SAVE_CFLAGS="$CFLAGS" 581 CFLAGS="$CFLAGS -belf" 582 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 583 [AC_LANG_PUSH(C) 584 AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 585 AC_LANG_POP]) 586 if test x"$lt_cv_cc_needs_belf" != x"yes"; then 587 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 588 CFLAGS="$SAVE_CFLAGS" 589 fi 590 ;; 591AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], 592[*-*-cygwin* | *-*-mingw* | *-*-pw32*) 593 AC_CHECK_TOOL(DLLTOOL, dlltool, false) 594 AC_CHECK_TOOL(AS, as, false) 595 AC_CHECK_TOOL(OBJDUMP, objdump, false) 596 ;; 597 ]) 598esac 599 600need_locks="$enable_libtool_lock" 601 602])# _LT_AC_LOCK 603 604 605# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 606# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 607# ---------------------------------------------------------------- 608# Check whether the given compiler option works 609AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], 610[AC_REQUIRE([LT_AC_PROG_SED]) 611AC_CACHE_CHECK([$1], [$2], 612 [$2=no 613 ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 614 printf "$lt_simple_compile_test_code" > conftest.$ac_ext 615 lt_compiler_flag="$3" 616 # Insert the option either (1) after the last *FLAGS variable, or 617 # (2) before a word containing "conftest.", or (3) at the end. 618 # Note that $ac_compile itself does not contain backslashes and begins 619 # with a dollar sign (not a hyphen), so the echo should work correctly. 620 # The option is referenced via a variable to avoid confusing sed. 621 lt_compile=`echo "$ac_compile" | $SED \ 622 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 623 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 624 -e 's:$: $lt_compiler_flag:'` 625 (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 626 (eval "$lt_compile" 2>conftest.err) 627 ac_status=$? 628 cat conftest.err >&AS_MESSAGE_LOG_FD 629 echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 630 if (exit $ac_status) && test -s "$ac_outfile"; then 631 # The compiler can only warn and ignore the option if not recognized 632 # So say no if there are warnings other than the usual output. 633 $echo "X$_lt_compiler_boilerplate" | $Xsed >conftest.exp 634 $SED '/^$/d' conftest.err >conftest.er2 635 if test ! -s conftest.err || diff conftest.exp conftest.er2 >/dev/null; then 636 $2=yes 637 fi 638 fi 639 $rm conftest* 640]) 641 642if test x"[$]$2" = xyes; then 643 ifelse([$5], , :, [$5]) 644else 645 ifelse([$6], , :, [$6]) 646fi 647])# AC_LIBTOOL_COMPILER_OPTION 648 649 650# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 651# [ACTION-SUCCESS], [ACTION-FAILURE]) 652# ------------------------------------------------------------ 653# Check whether the given compiler option works 654AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], 655[AC_CACHE_CHECK([$1], [$2], 656 [$2=no 657 save_LDFLAGS="$LDFLAGS" 658 LDFLAGS="$LDFLAGS $3" 659 printf "$lt_simple_link_test_code" > conftest.$ac_ext 660 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 661 # The linker can only warn and ignore the option if not recognized 662 # So say no if there are warnings 663 if test -s conftest.err; then 664 # Append any errors to the config.log. 665 cat conftest.err 1>&AS_MESSAGE_LOG_FD 666 $echo "X$_lt_linker_boilerplate" | $Xsed > conftest.exp 667 $SED '/^$/d' conftest.err >conftest.er2 668 if diff conftest.exp conftest.er2 >/dev/null; then 669 $2=yes 670 fi 671 else 672 $2=yes 673 fi 674 fi 675 $rm conftest* 676 LDFLAGS="$save_LDFLAGS" 677]) 678 679if test x"[$]$2" = xyes; then 680 ifelse([$4], , :, [$4]) 681else 682 ifelse([$5], , :, [$5]) 683fi 684])# AC_LIBTOOL_LINKER_OPTION 685 686 687# AC_LIBTOOL_SYS_MAX_CMD_LEN 688# -------------------------- 689AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], 690[# find the maximum length of command line arguments 691AC_MSG_CHECKING([the maximum length of command line arguments]) 692AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 693 i=0 694 teststring="ABCD" 695 696 case $build_os in 697 msdosdjgpp*) 698 # On DJGPP, this test can blow up pretty badly due to problems in libc 699 # (any single argument exceeding 2000 bytes causes a buffer overrun 700 # during glob expansion). Even if it were fixed, the result of this 701 # check would be larger than it should be. 702 lt_cv_sys_max_cmd_len=12288; # 12K is about right 703 ;; 704 705 gnu*) 706 # Under GNU Hurd, this test is not required because there is 707 # no limit to the length of command line arguments. 708 # Libtool will interpret -1 as no limit whatsoever 709 lt_cv_sys_max_cmd_len=-1; 710 ;; 711 712 cygwin* | mingw*) 713 # On Win9x/ME, this test blows up -- it succeeds, but takes 714 # about 5 minutes as the teststring grows exponentially. 715 # Worse, since 9x/ME are not pre-emptively multitasking, 716 # you end up with a "frozen" computer, even though with patience 717 # the test eventually succeeds (with a max line length of 256k). 718 # Instead, let's just punt: use the minimum linelength reported by 719 # all of the supported platforms: 8192 (on NT/2K/XP). 720 lt_cv_sys_max_cmd_len=8192; 721 ;; 722 723 amigaos*) 724 # On AmigaOS with pdksh, this test takes hours, literally. 725 # So we just punt and use a minimum line length of 8192. 726 lt_cv_sys_max_cmd_len=8192; 727 ;; 728 729 netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) 730 # This has been around since 386BSD, at least. Likely further. 731 if test -x /sbin/sysctl; then 732 lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 733 elif test -x /usr/sbin/sysctl; then 734 lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 735 else 736 lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 737 fi 738 # And add a safety zone 739 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 740 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 741 ;; 742 osf*) 743 # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 744 # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 745 # nice to cause kernel panics so lets avoid the loop below. 746 # First set a reasonable default. 747 lt_cv_sys_max_cmd_len=16384 748 # 749 if test -x /sbin/sysconfig; then 750 case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 751 *1*) lt_cv_sys_max_cmd_len=-1 ;; 752 esac 753 fi 754 ;; 755 *) 756 # If test is not a shell built-in, we'll probably end up computing a 757 # maximum length that is only half of the actual maximum length, but 758 # we can't tell. 759 SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 760 while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \ 761 = "XX$teststring") >/dev/null 2>&1 && 762 new_result=`expr "X$teststring" : ".*" 2>&1` && 763 lt_cv_sys_max_cmd_len=$new_result && 764 test $i != 17 # 1/2 MB should be enough 765 do 766 i=`expr $i + 1` 767 teststring=$teststring$teststring 768 done 769 teststring= 770 # Add a significant safety factor because C++ compilers can tack on massive 771 # amounts of additional arguments before passing them to the linker. 772 # It appears as though 1/2 is a usable value. 773 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 774 ;; 775 esac 776]) 777if test -n $lt_cv_sys_max_cmd_len ; then 778 AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 779else 780 AC_MSG_RESULT(none) 781fi 782])# AC_LIBTOOL_SYS_MAX_CMD_LEN 783 784 785# _LT_AC_CHECK_DLFCN 786# -------------------- 787AC_DEFUN([_LT_AC_CHECK_DLFCN], 788[AC_CHECK_HEADERS(dlfcn.h)dnl 789])# _LT_AC_CHECK_DLFCN 790 791 792# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 793# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 794# ------------------------------------------------------------------ 795AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF], 796[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl 797if test "$cross_compiling" = yes; then : 798 [$4] 799else 800 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 801 lt_status=$lt_dlunknown 802 cat > conftest.$ac_ext <<EOF 803[#line __oline__ "configure" 804#include "confdefs.h" 805 806#if HAVE_DLFCN_H 807#include <dlfcn.h> 808#endif 809 810#include <stdio.h> 811 812#ifdef RTLD_GLOBAL 813# define LT_DLGLOBAL RTLD_GLOBAL 814#else 815# ifdef DL_GLOBAL 816# define LT_DLGLOBAL DL_GLOBAL 817# else 818# define LT_DLGLOBAL 0 819# endif 820#endif 821 822/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 823 find out it does not work in some platform. */ 824#ifndef LT_DLLAZY_OR_NOW 825# ifdef RTLD_LAZY 826# define LT_DLLAZY_OR_NOW RTLD_LAZY 827# else 828# ifdef DL_LAZY 829# define LT_DLLAZY_OR_NOW DL_LAZY 830# else 831# ifdef RTLD_NOW 832# define LT_DLLAZY_OR_NOW RTLD_NOW 833# else 834# ifdef DL_NOW 835# define LT_DLLAZY_OR_NOW DL_NOW 836# else 837# define LT_DLLAZY_OR_NOW 0 838# endif 839# endif 840# endif 841# endif 842#endif 843 844#ifdef __cplusplus 845extern "C" void exit (int); 846#endif 847 848void fnord() { int i=42;} 849int main () 850{ 851 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 852 int status = $lt_dlunknown; 853 854 if (self) 855 { 856 if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 857 else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 858 /* dlclose (self); */ 859 } 860 861 exit (status); 862}] 863EOF 864 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then 865 (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 866 lt_status=$? 867 case x$lt_status in 868 x$lt_dlno_uscore) $1 ;; 869 x$lt_dlneed_uscore) $2 ;; 870 x$lt_unknown|x*) $3 ;; 871 esac 872 else : 873 # compilation failed 874 $3 875 fi 876fi 877rm -fr conftest* 878])# _LT_AC_TRY_DLOPEN_SELF 879 880 881# AC_LIBTOOL_DLOPEN_SELF 882# ------------------- 883AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], 884[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl 885if test "x$enable_dlopen" != xyes; then 886 enable_dlopen=unknown 887 enable_dlopen_self=unknown 888 enable_dlopen_self_static=unknown 889else 890 lt_cv_dlopen=no 891 lt_cv_dlopen_libs= 892 893 case $host_os in 894 beos*) 895 lt_cv_dlopen="load_add_on" 896 lt_cv_dlopen_libs= 897 lt_cv_dlopen_self=yes 898 ;; 899 900 mingw* | pw32*) 901 lt_cv_dlopen="LoadLibrary" 902 lt_cv_dlopen_libs= 903 ;; 904 905 cygwin*) 906 lt_cv_dlopen="dlopen" 907 lt_cv_dlopen_libs= 908 ;; 909 910 darwin*) 911 # if libdl is installed we need to link against it 912 AC_CHECK_LIB([dl], [dlopen], 913 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ 914 lt_cv_dlopen="dyld" 915 lt_cv_dlopen_libs= 916 lt_cv_dlopen_self=yes 917 ]) 918 ;; 919 920 *) 921 AC_CHECK_FUNC([shl_load], 922 [lt_cv_dlopen="shl_load"], 923 [AC_CHECK_LIB([dld], [shl_load], 924 [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"], 925 [AC_CHECK_FUNC([dlopen], 926 [lt_cv_dlopen="dlopen"], 927 [AC_CHECK_LIB([dl], [dlopen], 928 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], 929 [AC_CHECK_LIB([svld], [dlopen], 930 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], 931 [AC_CHECK_LIB([dld], [dld_link], 932 [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"]) 933 ]) 934 ]) 935 ]) 936 ]) 937 ]) 938 ;; 939 esac 940 941 if test "x$lt_cv_dlopen" != xno; then 942 enable_dlopen=yes 943 else 944 enable_dlopen=no 945 fi 946 947 case $lt_cv_dlopen in 948 dlopen) 949 save_CPPFLAGS="$CPPFLAGS" 950 test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 951 952 save_LDFLAGS="$LDFLAGS" 953 eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 954 955 save_LIBS="$LIBS" 956 LIBS="$lt_cv_dlopen_libs $LIBS" 957 958 AC_CACHE_CHECK([whether a program can dlopen itself], 959 lt_cv_dlopen_self, [dnl 960 _LT_AC_TRY_DLOPEN_SELF( 961 lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 962 lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 963 ]) 964 965 if test "x$lt_cv_dlopen_self" = xyes; then 966 LDFLAGS="$LDFLAGS $link_static_flag" 967 AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 968 lt_cv_dlopen_self_static, [dnl 969 _LT_AC_TRY_DLOPEN_SELF( 970 lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 971 lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 972 ]) 973 fi 974 975 CPPFLAGS="$save_CPPFLAGS" 976 LDFLAGS="$save_LDFLAGS" 977 LIBS="$save_LIBS" 978 ;; 979 esac 980 981 case $lt_cv_dlopen_self in 982 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 983 *) enable_dlopen_self=unknown ;; 984 esac 985 986 case $lt_cv_dlopen_self_static in 987 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 988 *) enable_dlopen_self_static=unknown ;; 989 esac 990fi 991])# AC_LIBTOOL_DLOPEN_SELF 992 993 994# AC_LIBTOOL_PROG_CC_C_O([TAGNAME]) 995# --------------------------------- 996# Check to see if options -c and -o are simultaneously supported by compiler 997AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O], 998[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl 999AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 1000 [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 1001 [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 1002 $rm -r conftest 2>/dev/null 1003 mkdir conftest 1004 cd conftest 1005 mkdir out 1006 printf "$lt_simple_compile_test_code" > conftest.$ac_ext 1007 1008 lt_compiler_flag="-o out/conftest2.$ac_objext" 1009 # Insert the option either (1) after the last *FLAGS variable, or 1010 # (2) before a word containing "conftest.", or (3) at the end. 1011 # Note that $ac_compile itself does not contain backslashes and begins 1012 # with a dollar sign (not a hyphen), so the echo should work correctly. 1013 lt_compile=`echo "$ac_compile" | $SED \ 1014 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 1015 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 1016 -e 's:$: $lt_compiler_flag:'` 1017 (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 1018 (eval "$lt_compile" 2>out/conftest.err) 1019 ac_status=$? 1020 cat out/conftest.err >&AS_MESSAGE_LOG_FD 1021 echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 1022 if (exit $ac_status) && test -s out/conftest2.$ac_objext 1023 then 1024 # The compiler can only warn and ignore the option if not recognized 1025 # So say no if there are warnings 1026 $echo "X$_lt_compiler_boilerplate" | $Xsed > out/conftest.exp 1027 $SED '/^$/d' out/conftest.err >out/conftest.er2 1028 if test ! -s out/conftest.err || diff out/conftest.exp out/conftest.er2 >/dev/null; then 1029 _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 1030 fi 1031 fi 1032 chmod u+w . 2>&AS_MESSAGE_LOG_FD 1033 $rm conftest* 1034 # SGI C++ compiler will create directory out/ii_files/ for 1035 # template instantiation 1036 test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files 1037 $rm out/* && rmdir out 1038 cd .. 1039 rmdir conftest 1040 $rm conftest* 1041]) 1042])# AC_LIBTOOL_PROG_CC_C_O 1043 1044 1045# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME]) 1046# ----------------------------------------- 1047# Check to see if we can do hard links to lock some files if needed 1048AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], 1049[AC_REQUIRE([_LT_AC_LOCK])dnl 1050 1051hard_links="nottested" 1052if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then 1053 # do not overwrite the value of need_locks provided by the user 1054 AC_MSG_CHECKING([if we can lock with hard links]) 1055 hard_links=yes 1056 $rm conftest* 1057 ln conftest.a conftest.b 2>/dev/null && hard_links=no 1058 touch conftest.a 1059 ln conftest.a conftest.b 2>&5 || hard_links=no 1060 ln conftest.a conftest.b 2>/dev/null && hard_links=no 1061 AC_MSG_RESULT([$hard_links]) 1062 if test "$hard_links" = no; then 1063 AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) 1064 need_locks=warn 1065 fi 1066else 1067 need_locks=no 1068fi 1069])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS 1070 1071 1072# AC_LIBTOOL_OBJDIR 1073# ----------------- 1074AC_DEFUN([AC_LIBTOOL_OBJDIR], 1075[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 1076[rm -f .libs 2>/dev/null 1077mkdir .libs 2>/dev/null 1078if test -d .libs; then 1079 lt_cv_objdir=.libs 1080else 1081 # MS-DOS does not allow filenames that begin with a dot. 1082 lt_cv_objdir=_libs 1083fi 1084rmdir .libs 2>/dev/null]) 1085objdir=$lt_cv_objdir 1086])# AC_LIBTOOL_OBJDIR 1087 1088 1089# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME]) 1090# ---------------------------------------------- 1091# Check hardcoding attributes. 1092AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], 1093[AC_MSG_CHECKING([how to hardcode library paths into programs]) 1094_LT_AC_TAGVAR(hardcode_action, $1)= 1095if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \ 1096 test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \ 1097 test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then 1098 1099 # We can hardcode non-existant directories. 1100 if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no && 1101 # If the only mechanism to avoid hardcoding is shlibpath_var, we 1102 # have to relink, otherwise we might link with an installed library 1103 # when we should be linking with a yet-to-be-installed one 1104 ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no && 1105 test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then 1106 # Linking always hardcodes the temporary library directory. 1107 _LT_AC_TAGVAR(hardcode_action, $1)=relink 1108 else 1109 # We can link without hardcoding, and we can hardcode nonexisting dirs. 1110 _LT_AC_TAGVAR(hardcode_action, $1)=immediate 1111 fi 1112else 1113 # We cannot hardcode anything, or else we can only hardcode existing 1114 # directories. 1115 _LT_AC_TAGVAR(hardcode_action, $1)=unsupported 1116fi 1117AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)]) 1118 1119if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then 1120 # Fast installation is not supported 1121 enable_fast_install=no 1122elif test "$shlibpath_overrides_runpath" = yes || 1123 test "$enable_shared" = no; then 1124 # Fast installation is not necessary 1125 enable_fast_install=needless 1126fi 1127])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH 1128 1129 1130# AC_LIBTOOL_SYS_LIB_STRIP 1131# ------------------------ 1132AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP], 1133[striplib= 1134old_striplib= 1135AC_MSG_CHECKING([whether stripping libraries is possible]) 1136if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then 1137 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" 1138 test -z "$striplib" && striplib="$STRIP --strip-unneeded" 1139 AC_MSG_RESULT([yes]) 1140else 1141# FIXME - insert some real tests, host_os isn't really good enough 1142 case $host_os in 1143 darwin*) 1144 if test -n "$STRIP" ; then 1145 striplib="$STRIP -x" 1146 AC_MSG_RESULT([yes]) 1147 else 1148 AC_MSG_RESULT([no]) 1149fi 1150 ;; 1151 *) 1152 AC_MSG_RESULT([no]) 1153 ;; 1154 esac 1155fi 1156])# AC_LIBTOOL_SYS_LIB_STRIP 1157 1158 1159# AC_LIBTOOL_SYS_DYNAMIC_LINKER 1160# ----------------------------- 1161# PORTME Fill in your ld.so characteristics 1162AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER], 1163[AC_MSG_CHECKING([dynamic linker characteristics]) 1164library_names_spec= 1165libname_spec='lib$name' 1166soname_spec= 1167shrext_cmds=".so" 1168postinstall_cmds= 1169postuninstall_cmds= 1170finish_cmds= 1171finish_eval= 1172shlibpath_var= 1173shlibpath_overrides_runpath=unknown 1174version_type=none 1175dynamic_linker="$host_os ld.so" 1176sys_lib_dlsearch_path_spec="/lib /usr/lib" 1177if test "$GCC" = yes; then 1178 sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` 1179 if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then 1180 # if the path contains ";" then we assume it to be the separator 1181 # otherwise default to the standard path separator (i.e. ":") - it is 1182 # assumed that no part of a normal pathname contains ";" but that should 1183 # okay in the real world where ";" in dirpaths is itself problematic. 1184 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 1185 else 1186 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 1187 fi 1188else 1189 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 1190fi 1191need_lib_prefix=unknown 1192hardcode_into_libs=no 1193 1194# when you set need_version to no, make sure it does not cause -set_version 1195# flags to be left without arguments 1196need_version=unknown 1197 1198case $host_os in 1199aix3*) 1200 version_type=linux 1201 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' 1202 shlibpath_var=LIBPATH 1203 1204 # AIX 3 has no versioning support, so we append a major version to the name. 1205 soname_spec='${libname}${release}${shared_ext}$major' 1206 ;; 1207 1208aix4* | aix5*) 1209 version_type=linux 1210 need_lib_prefix=no 1211 need_version=no 1212 hardcode_into_libs=yes 1213 if test "$host_cpu" = ia64; then 1214 # AIX 5 supports IA64 1215 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' 1216 shlibpath_var=LD_LIBRARY_PATH 1217 else 1218 # With GCC up to 2.95.x, collect2 would create an import file 1219 # for dependence libraries. The import file would start with 1220 # the line `#! .'. This would cause the generated library to 1221 # depend on `.', always an invalid library. This was fixed in 1222 # development snapshots of GCC prior to 3.0. 1223 case $host_os in 1224 aix4 | aix4.[[01]] | aix4.[[01]].*) 1225 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 1226 echo ' yes ' 1227 echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then 1228 : 1229 else 1230 can_build_shared=no 1231 fi 1232 ;; 1233 esac 1234 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct 1235 # soname into executable. Probably we can add versioning support to 1236 # collect2, so additional links can be useful in future. 1237 if test "$aix_use_runtimelinking" = yes; then 1238 # If using run time linking (on AIX 4.2 or later) use lib<name>.so 1239 # instead of lib<name>.a to let people know that these are not 1240 # typical AIX shared libraries. 1241 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 1242 else 1243 # We preserve .a as extension for shared libraries through AIX4.2 1244 # and later when we are not doing run time linking. 1245 library_names_spec='${libname}${release}.a $libname.a' 1246 soname_spec='${libname}${release}${shared_ext}$major' 1247 fi 1248 shlibpath_var=LIBPATH 1249 fi 1250 ;; 1251 1252amigaos*) 1253 library_names_spec='$libname.ixlibrary $libname.a' 1254 # Create ${libname}_ixlibrary.a entries in /sys/libs. 1255 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' 1256 ;; 1257 1258beos*) 1259 library_names_spec='${libname}${shared_ext}' 1260 dynamic_linker="$host_os ld.so" 1261 shlibpath_var=LIBRARY_PATH 1262 ;; 1263 1264bsdi[[45]]*) 1265 version_type=linux 1266 need_version=no 1267 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 1268 soname_spec='${libname}${release}${shared_ext}$major' 1269 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 1270 shlibpath_var=LD_LIBRARY_PATH 1271 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 1272 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 1273 # the default ld.so.conf also contains /usr/contrib/lib and 1274 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 1275 # libtool to hard-code these into programs 1276 ;; 1277 1278cygwin* | mingw* | pw32*) 1279 version_type=windows 1280 shrext_cmds=".dll" 1281 need_version=no 1282 need_lib_prefix=no 1283 1284 case $GCC,$host_os in 1285 yes,cygwin* | yes,mingw* | yes,pw32*) 1286 library_names_spec='$libname.dll.a' 1287 # DLL is installed to $(libdir)/../bin by postinstall_cmds 1288 postinstall_cmds='base_file=`basename \${file}`~ 1289 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ 1290 dldir=$destdir/`dirname \$dlpath`~ 1291 test -d \$dldir || mkdir -p \$dldir~ 1292 $install_prog $dir/$dlname \$dldir/$dlname~ 1293 chmod a+x \$dldir/$dlname' 1294 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 1295 dlpath=$dir/\$dldll~ 1296 $rm \$dlpath' 1297 shlibpath_overrides_runpath=yes 1298 1299 case $host_os in 1300 cygwin*) 1301 # Cygwin DLLs use 'cyg' prefix rather than 'lib' 1302 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 1303 sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" 1304 ;; 1305 mingw*) 1306 # MinGW DLLs use traditional 'lib' prefix 1307 soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 1308 sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` 1309 if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then 1310 # It is most probably a Windows format PATH printed by 1311 # mingw gcc, but we are running on Cygwin. Gcc prints its search 1312 # path with ; separators, and with drive letters. We can handle the 1313 # drive letters (cygwin fileutils understands them), so leave them, 1314 # especially as we might pass files found there to a mingw objdump, 1315 # which wouldn't understand a cygwinified path. Ahh. 1316 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 1317 else 1318 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 1319 fi 1320 ;; 1321 pw32*) 1322 # pw32 DLLs use 'pw' prefix rather than 'lib' 1323 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 1324 ;; 1325 esac 1326 ;; 1327 1328 *) 1329 library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' 1330 ;; 1331 esac 1332 dynamic_linker='Win32 ld.exe' 1333 # FIXME: first we should search . and the directory the executable is in 1334 shlibpath_var=PATH 1335 ;; 1336 1337darwin* | rhapsody*) 1338 dynamic_linker="$host_os dyld" 1339 version_type=darwin 1340 need_lib_prefix=no 1341 need_version=no 1342 library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' 1343 soname_spec='${libname}${release}${major}$shared_ext' 1344 shlibpath_overrides_runpath=yes 1345 shlibpath_var=DYLD_LIBRARY_PATH 1346 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 1347 # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. 1348 if test "$GCC" = yes; then 1349 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"` 1350 else 1351 sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' 1352 fi 1353 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 1354 ;; 1355 1356dgux*) 1357 version_type=linux 1358 need_lib_prefix=no 1359 need_version=no 1360 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' 1361 soname_spec='${libname}${release}${shared_ext}$major' 1362 shlibpath_var=LD_LIBRARY_PATH 1363 ;; 1364 1365freebsd1*) 1366 dynamic_linker=no 1367 ;; 1368 1369kfreebsd*-gnu) 1370 version_type=linux 1371 need_lib_prefix=no 1372 need_version=no 1373 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 1374 soname_spec='${libname}${release}${shared_ext}$major' 1375 shlibpath_var=LD_LIBRARY_PATH 1376 shlibpath_overrides_runpath=no 1377 hardcode_into_libs=yes 1378 dynamic_linker='GNU ld.so' 1379 ;; 1380 1381freebsd* | dragonfly*) 1382 # DragonFly does not have aout. When/if they implement a new 1383 # versioning mechanism, adjust this. 1384 if test -x /usr/bin/objformat; then 1385 objformat=`/usr/bin/objformat` 1386 else 1387 case $host_os in 1388 freebsd[[123]]*) objformat=aout ;; 1389 *) objformat=elf ;; 1390 esac 1391 fi 1392 version_type=freebsd-$objformat 1393 case $version_type in 1394 freebsd-elf*) 1395 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 1396 need_version=no 1397 need_lib_prefix=no 1398 ;; 1399 freebsd-*) 1400 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' 1401 need_version=yes 1402 ;; 1403 esac 1404 shlibpath_var=LD_LIBRARY_PATH 1405 case $host_os in 1406 freebsd2*) 1407 shlibpath_overrides_runpath=yes 1408 ;; 1409 freebsd3.[[01]]* | freebsdelf3.[[01]]*) 1410 shlibpath_overrides_runpath=yes 1411 hardcode_into_libs=yes 1412 ;; 1413 *) # from 3.2 on 1414 shlibpath_overrides_runpath=no 1415 hardcode_into_libs=yes 1416 ;; 1417 esac 1418 ;; 1419 1420gnu*) 1421 version_type=linux 1422 need_lib_prefix=no 1423 need_version=no 1424 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 1425 soname_spec='${libname}${release}${shared_ext}$major' 1426 shlibpath_var=LD_LIBRARY_PATH 1427 hardcode_into_libs=yes 1428 ;; 1429 1430hpux9* | hpux10* | hpux11*) 1431 # Give a soname corresponding to the major version so that dld.sl refuses to 1432 # link against other versions. 1433 version_type=sunos 1434 need_lib_prefix=no 1435 need_version=no 1436 case $host_cpu in 1437 ia64*) 1438 shrext_cmds='.so' 1439 hardcode_into_libs=yes 1440 dynamic_linker="$host_os dld.so" 1441 shlibpath_var=LD_LIBRARY_PATH 1442 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 1443 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 1444 soname_spec='${libname}${release}${shared_ext}$major' 1445 if test "X$HPUX_IA64_MODE" = X32; then 1446 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 1447 else 1448 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 1449 fi 1450 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 1451 ;; 1452 hppa*64*) 1453 shrext_cmds='.sl' 1454 hardcode_into_libs=yes 1455 dynamic_linker="$host_os dld.sl" 1456 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 1457 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 1458 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 1459 soname_spec='${libname}${release}${shared_ext}$major' 1460 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 1461 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 1462 ;; 1463 *) 1464 shrext_cmds='.sl' 1465 dynamic_linker="$host_os dld.sl" 1466 shlibpath_var=SHLIB_PATH 1467 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 1468 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 1469 soname_spec='${libname}${release}${shared_ext}$major' 1470 ;; 1471 esac 1472 # HP-UX runs *really* slowly unless shared libraries are mode 555. 1473 postinstall_cmds='chmod 555 $lib' 1474 ;; 1475 1476irix5* | irix6* | nonstopux*) 1477 case $host_os in 1478 nonstopux*) version_type=nonstopux ;; 1479 *) 1480 if test "$lt_cv_prog_gnu_ld" = yes; then 1481 version_type=linux 1482 else 1483 version_type=irix 1484 fi ;; 1485 esac 1486 need_lib_prefix=no 1487 need_version=no 1488 soname_spec='${libname}${release}${shared_ext}$major' 1489 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' 1490 case $host_os in 1491 irix5* | nonstopux*) 1492 libsuff= shlibsuff= 1493 ;; 1494 *) 1495 case $LD in # libtool.m4 will add one of these switches to LD 1496 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 1497 libsuff= shlibsuff= libmagic=32-bit;; 1498 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 1499 libsuff=32 shlibsuff=N32 libmagic=N32;; 1500 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 1501 libsuff=64 shlibsuff=64 libmagic=64-bit;; 1502 *) libsuff= shlibsuff= libmagic=never-match;; 1503 esac 1504 ;; 1505 esac 1506 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 1507 shlibpath_overrides_runpath=no 1508 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" 1509 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" 1510 hardcode_into_libs=yes 1511 ;; 1512 1513# No shared lib support for Linux oldld, aout, or coff. 1514linux*oldld* | linux*aout* | linux*coff*) 1515 dynamic_linker=no 1516 ;; 1517 1518# This must be Linux ELF. 1519linux*) 1520 version_type=linux 1521 need_lib_prefix=no 1522 need_version=no 1523 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 1524 soname_spec='${libname}${release}${shared_ext}$major' 1525 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 1526 shlibpath_var=LD_LIBRARY_PATH 1527 shlibpath_overrides_runpath=no 1528 # This implies no fast_install, which is unacceptable. 1529 # Some rework will be needed to allow for fast_install 1530 # before this can be enabled. 1531 hardcode_into_libs=yes 1532 1533 # Append ld.so.conf contents to the search path 1534 if test -f /etc/ld.so.conf; then 1535 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' ' '` 1536 sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" 1537 fi 1538 1539 # We used to test for /lib/ld.so.1 and disable shared libraries on 1540 # powerpc, because MkLinux only supported shared libraries with the 1541 # GNU dynamic linker. Since this was broken with cross compilers, 1542 # most powerpc-linux boxes support dynamic linking these days and 1543 # people can always --disable-shared, the test was removed, and we 1544 # a…
Large files files are truncated, but you can click here to view the full file