1# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 2## Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005 3## Free Software Foundation, Inc. 4## Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 5## 6## This file is free software; the Free Software Foundation gives 7## unlimited permission to copy and/or distribute it, with or without 8## modifications, as long as this notice is preserved. 9 10# serial 47 AC_PROG_LIBTOOL 11 12 13# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED) 14# ----------------------------------------------------------- 15# If this macro is not defined by Autoconf, define it here. 16m4_ifdef([AC_PROVIDE_IFELSE], 17 [], 18 [m4_define([AC_PROVIDE_IFELSE], 19 [m4_ifdef([AC_PROVIDE_$1], 20 [$2], [$3])])]) 21 22 23# AC_PROG_LIBTOOL 24# --------------- 25AC_DEFUN([AC_PROG_LIBTOOL], 26[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl 27dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX 28dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX. 29 AC_PROVIDE_IFELSE([AC_PROG_CXX], 30 [AC_LIBTOOL_CXX], 31 [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX 32 ])]) 33dnl And a similar setup for Fortran 77 support 34 AC_PROVIDE_IFELSE([AC_PROG_F77], 35 [AC_LIBTOOL_F77], 36 [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77 37])]) 38 39dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly. 40dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run 41dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both. 42 AC_PROVIDE_IFELSE([AC_PROG_GCJ], 43 [AC_LIBTOOL_GCJ], 44 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 45 [AC_LIBTOOL_GCJ], 46 [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ], 47 [AC_LIBTOOL_GCJ], 48 [ifdef([AC_PROG_GCJ], 49 [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])]) 50 ifdef([A][M_PROG_GCJ], 51 [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])]) 52 ifdef([LT_AC_PROG_GCJ], 53 [define([LT_AC_PROG_GCJ], 54 defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])]) 55])])# AC_PROG_LIBTOOL 56 57 58# _AC_PROG_LIBTOOL 59# ---------------- 60AC_DEFUN([_AC_PROG_LIBTOOL], 61[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl 62AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl 63AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl 64AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl 65 66# This can be used to rebuild libtool when needed 67LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" 68 69# Always use our own libtool. 70LIBTOOL='$(SHELL) $(top_builddir)/libtool' 71AC_SUBST(LIBTOOL)dnl 72 73# Prevent multiple expansion 74define([AC_PROG_LIBTOOL], []) 75])# _AC_PROG_LIBTOOL 76 77 78# AC_LIBTOOL_SETUP 79# ---------------- 80AC_DEFUN([AC_LIBTOOL_SETUP], 81[AC_PREREQ(2.50)dnl 82AC_REQUIRE([AC_ENABLE_SHARED])dnl 83AC_REQUIRE([AC_ENABLE_STATIC])dnl 84AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl 85AC_REQUIRE([AC_CANONICAL_HOST])dnl 86AC_REQUIRE([AC_CANONICAL_BUILD])dnl 87AC_REQUIRE([AC_PROG_CC])dnl 88AC_REQUIRE([AC_PROG_LD])dnl 89AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl 90AC_REQUIRE([AC_PROG_NM])dnl 91 92AC_REQUIRE([AC_PROG_LN_S])dnl 93AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl 94# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! 95AC_REQUIRE([AC_OBJEXT])dnl 96AC_REQUIRE([AC_EXEEXT])dnl 97dnl 98 99AC_LIBTOOL_SYS_MAX_CMD_LEN 100AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE 101AC_LIBTOOL_OBJDIR 102 103AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl 104_LT_AC_PROG_ECHO_BACKSLASH 105 106case $host_os in 107aix3*) 108 # AIX sometimes has problems with the GCC collect2 program. For some 109 # reason, if we set the COLLECT_NAMES environment variable, the problems 110 # vanish in a puff of smoke. 111 if test "X${COLLECT_NAMES+set}" != Xset; then 112 COLLECT_NAMES= 113 export COLLECT_NAMES 114 fi 115 ;; 116esac 117 118# Sed substitution that helps us do robust quoting. It backslashifies 119# metacharacters that are still active within double-quoted strings. 120Xsed='sed -e 1s/^X//' 121[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'] 122 123# Same as above, but do not quote variable references. 124[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'] 125 126# Sed substitution to delay expansion of an escaped shell variable in a 127# double_quote_subst'ed string. 128delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 129 130# Sed substitution to avoid accidental globbing in evaled expressions 131no_glob_subst='s/\*/\\\*/g' 132 133# Constants: 134rm="rm -f" 135 136# Global variables: 137default_ofile=libtool 138can_build_shared=yes 139 140# All known linkers require a `.a' archive for static linking (except MSVC, 141# which needs '.lib'). 142libext=a 143ltmain="$ac_aux_dir/ltmain.sh" 144ofile="$default_ofile" 145with_gnu_ld="$lt_cv_prog_gnu_ld" 146 147AC_CHECK_TOOL(AR, ar, false) 148AC_CHECK_TOOL(RANLIB, ranlib, :) 149AC_CHECK_TOOL(STRIP, strip, :) 150 151old_CC="$CC" 152old_CFLAGS="$CFLAGS" 153 154# Set sane defaults for various variables 155test -z "$AR" && AR=ar 156test -z "$AR_FLAGS" && AR_FLAGS=cru 157test -z "$AS" && AS=as 158test -z "$CC" && CC=cc 159test -z "$LTCC" && LTCC=$CC 160test -z "$DLLTOOL" && DLLTOOL=dlltool 161test -z "$LD" && LD=ld 162test -z "$LN_S" && LN_S="ln -s" 163test -z "$MAGIC_CMD" && MAGIC_CMD=file 164test -z "$NM" && NM=nm 165test -z "$SED" && SED=sed 166test -z "$OBJDUMP" && OBJDUMP=objdump 167test -z "$RANLIB" && RANLIB=: 168test -z "$STRIP" && STRIP=: 169test -z "$ac_objext" && ac_objext=o 170 171# Determine commands to create old-style static archives. 172old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs' 173old_postinstall_cmds='chmod 644 $oldlib' 174old_postuninstall_cmds= 175 176if test -n "$RANLIB"; then 177 case $host_os in 178 openbsd*) 179 old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds" 180 ;; 181 *) 182 old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds" 183 ;; 184 esac 185 old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" 186fi 187 188_LT_CC_BASENAME([$compiler]) 189 190# Only perform the check for file, if the check method requires it 191case $deplibs_check_method in 192file_magic*) 193 if test "$file_magic_cmd" = '$MAGIC_CMD'; then 194 AC_PATH_MAGIC 195 fi 196 ;; 197esac 198 199AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no) 200AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], 201enable_win32_dll=yes, enable_win32_dll=no) 202 203AC_ARG_ENABLE([libtool-lock], 204 [AC_HELP_STRING([--disable-libtool-lock], 205 [avoid locking (might break parallel builds)])]) 206test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes 207 208AC_ARG_WITH([pic], 209 [AC_HELP_STRING([--with-pic], 210 [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 211 [pic_mode="$withval"], 212 [pic_mode=default]) 213test -z "$pic_mode" && pic_mode=default 214 215# Use C for the default configuration in the libtool script 216tagname= 217AC_LIBTOOL_LANG_C_CONFIG 218_LT_AC_TAGCONFIG 219])# AC_LIBTOOL_SETUP 220 221 222# _LT_AC_SYS_COMPILER 223# ------------------- 224AC_DEFUN([_LT_AC_SYS_COMPILER], 225[AC_REQUIRE([AC_PROG_CC])dnl 226 227# If no C compiler was specified, use CC. 228LTCC=${LTCC-"$CC"} 229 230# Allow CC to be a program name with arguments. 231compiler=$CC 232])# _LT_AC_SYS_COMPILER 233 234 235# _LT_CC_BASENAME(CC) 236# ------------------- 237# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 238AC_DEFUN([_LT_CC_BASENAME], 239[for cc_temp in $1""; do 240 case $cc_temp in 241 compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 242 distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 243 \-*) ;; 244 *) break;; 245 esac 246done 247cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` 248]) 249 250 251# _LT_COMPILER_BOILERPLATE 252# ------------------------ 253# Check for compiler boilerplate output or warnings with 254# the simple compiler test code. 255AC_DEFUN([_LT_COMPILER_BOILERPLATE], 256[ac_outfile=conftest.$ac_objext 257printf "$lt_simple_compile_test_code" >conftest.$ac_ext 258eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err 259_lt_compiler_boilerplate=`cat conftest.err` 260$rm conftest* 261])# _LT_COMPILER_BOILERPLATE 262 263 264# _LT_LINKER_BOILERPLATE 265# ---------------------- 266# Check for linker boilerplate output or warnings with 267# the simple link test code. 268AC_DEFUN([_LT_LINKER_BOILERPLATE], 269[ac_outfile=conftest.$ac_objext 270printf "$lt_simple_link_test_code" >conftest.$ac_ext 271eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err 272_lt_linker_boilerplate=`cat conftest.err` 273$rm conftest* 274])# _LT_LINKER_BOILERPLATE 275 276 277# _LT_AC_SYS_LIBPATH_AIX 278# ---------------------- 279# Links a minimal program and checks the executable 280# for the system default hardcoded library path. In most cases, 281# this is /usr/lib:/lib, but when the MPI compilers are used 282# the location of the communication and MPI libs are included too. 283# If we don't find anything, use the default library path according 284# to the aix ld manual. 285AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX], 286[AC_LINK_IFELSE(AC_LANG_PROGRAM,[ 287aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } 288}'` 289# Check for a 64-bit object if we didn't find anything. 290if 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; } 291}'`; fi],[]) 292if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi 293])# _LT_AC_SYS_LIBPATH_AIX 294 295 296# _LT_AC_SHELL_INIT(ARG) 297# ---------------------- 298AC_DEFUN([_LT_AC_SHELL_INIT], 299[ifdef([AC_DIVERSION_NOTICE], 300 [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], 301 [AC_DIVERT_PUSH(NOTICE)]) 302$1 303AC_DIVERT_POP 304])# _LT_AC_SHELL_INIT 305 306 307# _LT_AC_PROG_ECHO_BACKSLASH 308# -------------------------- 309# Add some code to the start of the generated configure script which 310# will find an echo command which doesn't interpret backslashes. 311AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH], 312[_LT_AC_SHELL_INIT([ 313# Check that we are running under the correct shell. 314SHELL=${CONFIG_SHELL-/bin/sh} 315 316case X$ECHO in 317X*--fallback-echo) 318 # Remove one level of quotation (which was required for Make). 319 ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` 320 ;; 321esac 322 323echo=${ECHO-echo} 324if test "X[$]1" = X--no-reexec; then 325 # Discard the --no-reexec flag, and continue. 326 shift 327elif test "X[$]1" = X--fallback-echo; then 328 # Avoid inline document here, it may be left over 329 : 330elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then 331 # Yippee, $echo works! 332 : 333else 334 # Restart under the correct shell. 335 exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} 336fi 337 338if test "X[$]1" = X--fallback-echo; then 339 # used as fallback echo 340 shift 341 cat <<EOF 342[$]* 343EOF 344 exit 0 345fi 346 347# The HP-UX ksh and POSIX shell print the target directory to stdout 348# if CDPATH is set. 349(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 350 351if test -z "$ECHO"; then 352if test "X${echo_test_string+set}" != Xset; then 353# find a string as large as possible, as long as the shell can cope with it 354 for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do 355 # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... 356 if (echo_test_string=`eval $cmd`) 2>/dev/null && 357 echo_test_string=`eval $cmd` && 358 (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null 359 then 360 break 361 fi 362 done 363fi 364 365if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && 366 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && 367 test "X$echo_testing_string" = "X$echo_test_string"; then 368 : 369else 370 # The Solaris, AIX, and Digital Unix default echo programs unquote 371 # backslashes. This makes it impossible to quote backslashes using 372 # echo "$something" | sed 's/\\/\\\\/g' 373 # 374 # So, first we look for a working echo in the user's PATH. 375 376 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 377 for dir in $PATH /usr/ucb; do 378 IFS="$lt_save_ifs" 379 if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && 380 test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && 381 echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && 382 test "X$echo_testing_string" = "X$echo_test_string"; then 383 echo="$dir/echo" 384 break 385 fi 386 done 387 IFS="$lt_save_ifs" 388 389 if test "X$echo" = Xecho; then 390 # We didn't find a better echo, so look for alternatives. 391 if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && 392 echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && 393 test "X$echo_testing_string" = "X$echo_test_string"; then 394 # This shell has a builtin print -r that does the trick. 395 echo='print -r' 396 elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && 397 test "X$CONFIG_SHELL" != X/bin/ksh; then 398 # If we have ksh, try running configure again with it. 399 ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} 400 export ORIGINAL_CONFIG_SHELL 401 CONFIG_SHELL=/bin/ksh 402 export CONFIG_SHELL 403 exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} 404 else 405 # Try using printf. 406 echo='printf %s\n' 407 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && 408 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && 409 test "X$echo_testing_string" = "X$echo_test_string"; then 410 # Cool, printf works 411 : 412 elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && 413 test "X$echo_testing_string" = 'X\t' && 414 echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && 415 test "X$echo_testing_string" = "X$echo_test_string"; then 416 CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL 417 export CONFIG_SHELL 418 SHELL="$CONFIG_SHELL" 419 export SHELL 420 echo="$CONFIG_SHELL [$]0 --fallback-echo" 421 elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && 422 test "X$echo_testing_string" = 'X\t' && 423 echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && 424 test "X$echo_testing_string" = "X$echo_test_string"; then 425 echo="$CONFIG_SHELL [$]0 --fallback-echo" 426 else 427 # maybe with a smaller string... 428 prev=: 429 430 for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do 431 if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null 432 then 433 break 434 fi 435 prev="$cmd" 436 done 437 438 if test "$prev" != 'sed 50q "[$]0"'; then 439 echo_test_string=`eval $prev` 440 export echo_test_string 441 exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} 442 else 443 # Oops. We lost completely, so just stick with echo. 444 echo=echo 445 fi 446 fi 447 fi 448 fi 449fi 450fi 451 452# Copy echo and quote the copy suitably for passing to libtool from 453# the Makefile, instead of quoting the original, which is used later. 454ECHO=$echo 455if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then 456 ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" 457fi 458 459AC_SUBST(ECHO) 460])])# _LT_AC_PROG_ECHO_BACKSLASH 461 462 463# _LT_AC_LOCK 464# ----------- 465AC_DEFUN([_LT_AC_LOCK], 466[AC_ARG_ENABLE([libtool-lock], 467 [AC_HELP_STRING([--disable-libtool-lock], 468 [avoid locking (might break parallel builds)])]) 469test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes 470 471# Some flags need to be propagated to the compiler or linker for good 472# libtool support. 473case $host in 474ia64-*-hpux*) 475 # Find out which ABI we are using. 476 echo 'int i;' > conftest.$ac_ext 477 if AC_TRY_EVAL(ac_compile); then 478 case `/usr/bin/file conftest.$ac_objext` in 479 *ELF-32*) 480 HPUX_IA64_MODE="32" 481 ;; 482 *ELF-64*) 483 HPUX_IA64_MODE="64" 484 ;; 485 esac 486 fi 487 rm -rf conftest* 488 ;; 489*-*-irix6*) 490 # Find out which ABI we are using. 491 echo '[#]line __oline__ "configure"' > conftest.$ac_ext 492 if AC_TRY_EVAL(ac_compile); then 493 if test "$lt_cv_prog_gnu_ld" = yes; then 494 case `/usr/bin/file conftest.$ac_objext` in 495 *32-bit*) 496 LD="${LD-ld} -melf32bsmip" 497 ;; 498 *N32*) 499 LD="${LD-ld} -melf32bmipn32" 500 ;; 501 *64-bit*) 502 LD="${LD-ld} -melf64bmip" 503 ;; 504 esac 505 else 506 case `/usr/bin/file conftest.$ac_objext` in 507 *32-bit*) 508 LD="${LD-ld} -32" 509 ;; 510 *N32*) 511 LD="${LD-ld} -n32" 512 ;; 513 *64-bit*) 514 LD="${LD-ld} -64" 515 ;; 516 esac 517 fi 518 fi 519 rm -rf conftest* 520 ;; 521 522x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*) 523 # Find out which ABI we are using. 524 echo 'int i;' > conftest.$ac_ext 525 if AC_TRY_EVAL(ac_compile); then 526 case `/usr/bin/file conftest.o` in 527 *32-bit*) 528 case $host in 529 x86_64-*linux*) 530 LD="${LD-ld} -m elf_i386" 531 ;; 532 ppc64-*linux*|powerpc64-*linux*) 533 LD="${LD-ld} -m elf32ppclinux" 534 ;; 535 s390x-*linux*) 536 LD="${LD-ld} -m elf_s390" 537 ;; 538 sparc64-*linux*) 539 LD="${LD-ld} -m elf32_sparc" 540 ;; 541 esac 542 ;; 543 *64-bit*) 544 case $host in 545 x86_64-*linux*) 546 LD="${LD-ld} -m elf_x86_64" 547 ;; 548 ppc*-*linux*|powerpc*-*linux*) 549 LD="${LD-ld} -m elf64ppc" 550 ;; 551 s390*-*linux*) 552 LD="${LD-ld} -m elf64_s390" 553 ;; 554 sparc*-*linux*) 555 LD="${LD-ld} -m elf64_sparc" 556 ;; 557 esac 558 ;; 559 esac 560 fi 561 rm -rf conftest* 562 ;; 563 564*-*-sco3.2v5*) 565 # On SCO OpenServer 5, we need -belf to get full-featured binaries. 566 SAVE_CFLAGS="$CFLAGS" 567 CFLAGS="$CFLAGS -belf" 568 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 569 [AC_LANG_PUSH(C) 570 AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 571 AC_LANG_POP]) 572 if test x"$lt_cv_cc_needs_belf" != x"yes"; then 573 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 574 CFLAGS="$SAVE_CFLAGS" 575 fi 576 ;; 577AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], 578[*-*-cygwin* | *-*-mingw* | *-*-pw32*) 579 AC_CHECK_TOOL(DLLTOOL, dlltool, false) 580 AC_CHECK_TOOL(AS, as, false) 581 AC_CHECK_TOOL(OBJDUMP, objdump, false) 582 ;; 583 ]) 584esac 585 586need_locks="$enable_libtool_lock" 587 588])# _LT_AC_LOCK 589 590 591# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 592# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 593# ---------------------------------------------------------------- 594# Check whether the given compiler option works 595AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], 596[AC_REQUIRE([LT_AC_PROG_SED]) 597AC_CACHE_CHECK([$1], [$2], 598 [$2=no 599 ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 600 printf "$lt_simple_compile_test_code" > conftest.$ac_ext 601 lt_compiler_flag="$3" 602 # Insert the option either (1) after the last *FLAGS variable, or 603 # (2) before a word containing "conftest.", or (3) at the end. 604 # Note that $ac_compile itself does not contain backslashes and begins 605 # with a dollar sign (not a hyphen), so the echo should work correctly. 606 # The option is referenced via a variable to avoid confusing sed. 607 lt_compile=`echo "$ac_compile" | $SED \ 608 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 609 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 610 -e 's:$: $lt_compiler_flag:'` 611 (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 612 (eval "$lt_compile" 2>conftest.err) 613 ac_status=$? 614 cat conftest.err >&AS_MESSAGE_LOG_FD 615 echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 616 if (exit $ac_status) && test -s "$ac_outfile"; then 617 # The compiler can only warn and ignore the option if not recognized 618 # So say no if there are warnings other than the usual output. 619 $echo "X$_lt_compiler_boilerplate" | $Xsed >conftest.exp 620 $SED '/^$/d' conftest.err >conftest.er2 621 if test ! -s conftest.err || diff conftest.exp conftest.er2 >/dev/null; then 622 $2=yes 623 fi 624 fi 625 $rm conftest* 626]) 627 628if test x"[$]$2" = xyes; then 629 ifelse([$5], , :, [$5]) 630else 631 ifelse([$6], , :, [$6]) 632fi 633])# AC_LIBTOOL_COMPILER_OPTION 634 635 636# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 637# [ACTION-SUCCESS], [ACTION-FAILURE]) 638# ------------------------------------------------------------ 639# Check whether the given compiler option works 640AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], 641[AC_CACHE_CHECK([$1], [$2], 642 [$2=no 643 save_LDFLAGS="$LDFLAGS" 644 LDFLAGS="$LDFLAGS $3" 645 printf "$lt_simple_link_test_code" > conftest.$ac_ext 646 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 647 # The linker can only warn and ignore the option if not recognized 648 # So say no if there are warnings 649 if test -s conftest.err; then 650 # Append any errors to the config.log. 651 cat conftest.err 1>&AS_MESSAGE_LOG_FD 652 $echo "X$_lt_linker_boilerplate" | $Xsed > conftest.exp 653 $SED '/^$/d' conftest.err >conftest.er2 654 if diff conftest.exp conftest.er2 >/dev/null; then 655 $2=yes 656 fi 657 else 658 $2=yes 659 fi 660 fi 661 $rm conftest* 662 LDFLAGS="$save_LDFLAGS" 663]) 664 665if test x"[$]$2" = xyes; then 666 ifelse([$4], , :, [$4]) 667else 668 ifelse([$5], , :, [$5]) 669fi 670])# AC_LIBTOOL_LINKER_OPTION 671 672 673# AC_LIBTOOL_SYS_MAX_CMD_LEN 674# -------------------------- 675AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], 676[# find the maximum length of command line arguments 677AC_MSG_CHECKING([the maximum length of command line arguments]) 678AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 679 i=0 680 teststring="ABCD" 681 682 case $build_os in 683 msdosdjgpp*) 684 # On DJGPP, this test can blow up pretty badly due to problems in libc 685 # (any single argument exceeding 2000 bytes causes a buffer overrun 686 # during glob expansion). Even if it were fixed, the result of this 687 # check would be larger than it should be. 688 lt_cv_sys_max_cmd_len=12288; # 12K is about right 689 ;; 690 691 gnu*) 692 # Under GNU Hurd, this test is not required because there is 693 # no limit to the length of command line arguments. 694 # Libtool will interpret -1 as no limit whatsoever 695 lt_cv_sys_max_cmd_len=-1; 696 ;; 697 698 cygwin* | mingw*) 699 # On Win9x/ME, this test blows up -- it succeeds, but takes 700 # about 5 minutes as the teststring grows exponentially. 701 # Worse, since 9x/ME are not pre-emptively multitasking, 702 # you end up with a "frozen" computer, even though with patience 703 # the test eventually succeeds (with a max line length of 256k). 704 # Instead, let's just punt: use the minimum linelength reported by 705 # all of the supported platforms: 8192 (on NT/2K/XP). 706 lt_cv_sys_max_cmd_len=8192; 707 ;; 708 709 amigaos*) 710 # On AmigaOS with pdksh, this test takes hours, literally. 711 # So we just punt and use a minimum line length of 8192. 712 lt_cv_sys_max_cmd_len=8192; 713 ;; 714 715 netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) 716 # This has been around since 386BSD, at least. Likely further. 717 if test -x /sbin/sysctl; then 718 lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 719 elif test -x /usr/sbin/sysctl; then 720 lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 721 else 722 lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 723 fi 724 # And add a safety zone 725 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 726 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 727 ;; 728 osf*) 729 # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 730 # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 731 # nice to cause kernel panics so lets avoid the loop below. 732 # First set a reasonable default. 733 lt_cv_sys_max_cmd_len=16384 734 # 735 if test -x /sbin/sysconfig; then 736 case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 737 *1*) lt_cv_sys_max_cmd_len=-1 ;; 738 esac 739 fi 740 ;; 741 *) 742 # If test is not a shell built-in, we'll probably end up computing a 743 # maximum length that is only half of the actual maximum length, but 744 # we can't tell. 745 SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 746 while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \ 747 = "XX$teststring") >/dev/null 2>&1 && 748 new_result=`expr "X$teststring" : ".*" 2>&1` && 749 lt_cv_sys_max_cmd_len=$new_result && 750 test $i != 17 # 1/2 MB should be enough 751 do 752 i=`expr $i + 1` 753 teststring=$teststring$teststring 754 done 755 teststring= 756 # Add a significant safety factor because C++ compilers can tack on massive 757 # amounts of additional arguments before passing them to the linker. 758 # It appears as though 1/2 is a usable value. 759 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 760 ;; 761 esac 762]) 763if test -n $lt_cv_sys_max_cmd_len ; then 764 AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 765else 766 AC_MSG_RESULT(none) 767fi 768])# AC_LIBTOOL_SYS_MAX_CMD_LEN 769 770 771# _LT_AC_CHECK_DLFCN 772# -------------------- 773AC_DEFUN([_LT_AC_CHECK_DLFCN], 774[AC_CHECK_HEADERS(dlfcn.h)dnl 775])# _LT_AC_CHECK_DLFCN 776 777 778# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 779# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 780# ------------------------------------------------------------------ 781AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF], 782[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl 783if test "$cross_compiling" = yes; then : 784 [$4] 785else 786 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 787 lt_status=$lt_dlunknown 788 cat > conftest.$ac_ext <<EOF 789[#line __oline__ "configure" 790#include "confdefs.h" 791 792#if HAVE_DLFCN_H 793#include <dlfcn.h> 794#endif 795 796#include <stdio.h> 797 798#ifdef RTLD_GLOBAL 799# define LT_DLGLOBAL RTLD_GLOBAL 800#else 801# ifdef DL_GLOBAL 802# define LT_DLGLOBAL DL_GLOBAL 803# else 804# define LT_DLGLOBAL 0 805# endif 806#endif 807 808/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 809 find out it does not work in some platform. */ 810#ifndef LT_DLLAZY_OR_NOW 811# ifdef RTLD_LAZY 812# define LT_DLLAZY_OR_NOW RTLD_LAZY 813# else 814# ifdef DL_LAZY 815# define LT_DLLAZY_OR_NOW DL_LAZY 816# else 817# ifdef RTLD_NOW 818# define LT_DLLAZY_OR_NOW RTLD_NOW 819# else 820# ifdef DL_NOW 821# define LT_DLLAZY_OR_NOW DL_NOW 822# else 823# define LT_DLLAZY_OR_NOW 0 824# endif 825# endif 826# endif 827# endif 828#endif 829 830#ifdef __cplusplus 831extern "C" void exit (int); 832#endif 833 834void fnord() { int i=42;} 835int main () 836{ 837 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 838 int status = $lt_dlunknown; 839 840 if (self) 841 { 842 if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 843 else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 844 /* dlclose (self); */ 845 } 846 847 exit (status); 848}] 849EOF 850 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then 851 (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 852 lt_status=$? 853 case x$lt_status in 854 x$lt_dlno_uscore) $1 ;; 855 x$lt_dlneed_uscore) $2 ;; 856 x$lt_unknown|x*) $3 ;; 857 esac 858 else : 859 # compilation failed 860 $3 861 fi 862fi 863rm -fr conftest* 864])# _LT_AC_TRY_DLOPEN_SELF 865 866 867# AC_LIBTOOL_DLOPEN_SELF 868# ------------------- 869AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], 870[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl 871if test "x$enable_dlopen" != xyes; then 872 enable_dlopen=unknown 873 enable_dlopen_self=unknown 874 enable_dlopen_self_static=unknown 875else 876 lt_cv_dlopen=no 877 lt_cv_dlopen_libs= 878 879 case $host_os in 880 beos*) 881 lt_cv_dlopen="load_add_on" 882 lt_cv_dlopen_libs= 883 lt_cv_dlopen_self=yes 884 ;; 885 886 mingw* | pw32*) 887 lt_cv_dlopen="LoadLibrary" 888 lt_cv_dlopen_libs= 889 ;; 890 891 cygwin*) 892 lt_cv_dlopen="dlopen" 893 lt_cv_dlopen_libs= 894 ;; 895 896 darwin*) 897 # if libdl is installed we need to link against it 898 AC_CHECK_LIB([dl], [dlopen], 899 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ 900 lt_cv_dlopen="dyld" 901 lt_cv_dlopen_libs= 902 lt_cv_dlopen_self=yes 903 ]) 904 ;; 905 906 haiku*) 907 lt_cv_dlopen="load_add_on" 908 lt_cv_dlopen_libs= 909 lt_cv_dlopen_self=yes 910 ;; 911 912 *) 913 AC_CHECK_FUNC([shl_load], 914 [lt_cv_dlopen="shl_load"], 915 [AC_CHECK_LIB([dld], [shl_load], 916 [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"], 917 [AC_CHECK_FUNC([dlopen], 918 [lt_cv_dlopen="dlopen"], 919 [AC_CHECK_LIB([dl], [dlopen], 920 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], 921 [AC_CHECK_LIB([svld], [dlopen], 922 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], 923 [AC_CHECK_LIB([dld], [dld_link], 924 [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"]) 925 ]) 926 ]) 927 ]) 928 ]) 929 ]) 930 ;; 931 esac 932 933 if test "x$lt_cv_dlopen" != xno; then 934 enable_dlopen=yes 935 else 936 enable_dlopen=no 937 fi 938 939 case $lt_cv_dlopen in 940 dlopen) 941 save_CPPFLAGS="$CPPFLAGS" 942 test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 943 944 save_LDFLAGS="$LDFLAGS" 945 eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 946 947 save_LIBS="$LIBS" 948 LIBS="$lt_cv_dlopen_libs $LIBS" 949 950 AC_CACHE_CHECK([whether a program can dlopen itself], 951 lt_cv_dlopen_self, [dnl 952 _LT_AC_TRY_DLOPEN_SELF( 953 lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 954 lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 955 ]) 956 957 if test "x$lt_cv_dlopen_self" = xyes; then 958 LDFLAGS="$LDFLAGS $link_static_flag" 959 AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 960 lt_cv_dlopen_self_static, [dnl 961 _LT_AC_TRY_DLOPEN_SELF( 962 lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 963 lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 964 ]) 965 fi 966 967 CPPFLAGS="$save_CPPFLAGS" 968 LDFLAGS="$save_LDFLAGS" 969 LIBS="$save_LIBS" 970 ;; 971 esac 972 973 case $lt_cv_dlopen_self in 974 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 975 *) enable_dlopen_self=unknown ;; 976 esac 977 978 case $lt_cv_dlopen_self_static in 979 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 980 *) enable_dlopen_self_static=unknown ;; 981 esac 982fi 983])# AC_LIBTOOL_DLOPEN_SELF 984 985 986# AC_LIBTOOL_PROG_CC_C_O([TAGNAME]) 987# --------------------------------- 988# Check to see if options -c and -o are simultaneously supported by compiler 989AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O], 990[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl 991AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 992 [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 993 [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 994 $rm -r conftest 2>/dev/null 995 mkdir conftest 996 cd conftest 997 mkdir out 998 printf "$lt_simple_compile_test_code" > conftest.$ac_ext 999 1000 lt_compiler_flag="-o out/conftest2.$ac_objext" 1001 # Insert the option either (1) after the last *FLAGS variable, or 1002 # (2) before a word containing "conftest.", or (3) at the end. 1003 # Note that $ac_compile itself does not contain backslashes and begins 1004 # with a dollar sign (not a hyphen), so the echo should work correctly. 1005 lt_compile=`echo "$ac_compile" | $SED \ 1006 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 1007 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 1008 -e 's:$: $lt_compiler_flag:'` 1009 (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 1010 (eval "$lt_compile" 2>out/conftest.err) 1011 ac_status=$? 1012 cat out/conftest.err >&AS_MESSAGE_LOG_FD 1013 echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 1014 if (exit $ac_status) && test -s out/conftest2.$ac_objext 1015 then 1016 # The compiler can only warn and ignore the option if not recognized 1017 # So say no if there are warnings 1018 $echo "X$_lt_compiler_boilerplate" | $Xsed > out/conftest.exp 1019 $SED '/^$/d' out/conftest.err >out/conftest.er2 1020 if test ! -s out/conftest.err || diff out/conftest.exp out/conftest.er2 >/dev/null; then 1021 _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 1022 fi 1023 fi 1024 chmod u+w . 2>&AS_MESSAGE_LOG_FD 1025 $rm conftest* 1026 # SGI C++ compiler will create directory out/ii_files/ for 1027 # template instantiation 1028 test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files 1029 $rm out/* && rmdir out 1030 cd .. 1031 rmdir conftest 1032 $rm conftest* 1033]) 1034])# AC_LIBTOOL_PROG_CC_C_O 1035 1036 1037# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME]) 1038# ----------------------------------------- 1039# Check to see if we can do hard links to lock some files if needed 1040AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], 1041[AC_REQUIRE([_LT_AC_LOCK])dnl 1042 1043hard_links="nottested" 1044if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then 1045 # do not overwrite the value of need_locks provided by the user 1046 AC_MSG_CHECKING([if we can lock with hard links]) 1047 hard_links=yes 1048 $rm conftest* 1049 ln conftest.a conftest.b 2>/dev/null && hard_links=no 1050 touch conftest.a 1051 ln conftest.a conftest.b 2>&5 || hard_links=no 1052 ln conftest.a conftest.b 2>/dev/null && hard_links=no 1053 AC_MSG_RESULT([$hard_links]) 1054 if test "$hard_links" = no; then 1055 AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) 1056 need_locks=warn 1057 fi 1058else 1059 need_locks=no 1060fi 1061])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS 1062 1063 1064# AC_LIBTOOL_OBJDIR 1065# ----------------- 1066AC_DEFUN([AC_LIBTOOL_OBJDIR], 1067[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 1068[rm -f .libs 2>/dev/null 1069mkdir .libs 2>/dev/null 1070if test -d .libs; then 1071 lt_cv_objdir=.libs 1072else 1073 # MS-DOS does not allow filenames that begin with a dot. 1074 lt_cv_objdir=_libs 1075fi 1076rmdir .libs 2>/dev/null]) 1077objdir=$lt_cv_objdir 1078])# AC_LIBTOOL_OBJDIR 1079 1080 1081# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME]) 1082# ---------------------------------------------- 1083# Check hardcoding attributes. 1084AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], 1085[AC_MSG_CHECKING([how to hardcode library paths into programs]) 1086_LT_AC_TAGVAR(hardcode_action, $1)= 1087if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \ 1088 test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \ 1089 test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then 1090 1091 # We can hardcode non-existant directories. 1092 if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no && 1093 # If the only mechanism to avoid hardcoding is shlibpath_var, we 1094 # have to relink, otherwise we might link with an installed library 1095 # when we should be linking with a yet-to-be-installed one 1096 ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no && 1097 test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then 1098 # Linking always hardcodes the temporary library directory. 1099 _LT_AC_TAGVAR(hardcode_action, $1)=relink 1100 else 1101 # We can link without hardcoding, and we can hardcode nonexisting dirs. 1102 _LT_AC_TAGVAR(hardcode_action, $1)=immediate 1103 fi 1104else 1105 # We cannot hardcode anything, or else we can only hardcode existing 1106 # directories. 1107 _LT_AC_TAGVAR(hardcode_action, $1)=unsupported 1108fi 1109AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)]) 1110 1111if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then 1112 # Fast installation is not supported 1113 enable_fast_install=no 1114elif test "$shlibpath_overrides_runpath" = yes || 1115 test "$enable_shared" = no; then 1116 # Fast installation is not necessary 1117 enable_fast_install=needless 1118fi 1119])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH 1120 1121 1122# AC_LIBTOOL_SYS_LIB_STRIP 1123# ------------------------ 1124AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP], 1125[striplib= 1126old_striplib= 1127AC_MSG_CHECKING([whether stripping libraries is possible]) 1128if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then 1129 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" 1130 test -z "$striplib" && striplib="$STRIP --strip-unneeded" 1131 AC_MSG_RESULT([yes]) 1132else 1133# FIXME - insert some real tests, host_os isn't really good enough 1134 case $host_os in 1135 darwin*) 1136 if test -n "$STRIP" ; then 1137 striplib="$STRIP -x" 1138 AC_MSG_RESULT([yes]) 1139 else 1140 AC_MSG_RESULT([no]) 1141fi 1142 ;; 1143 *) 1144 AC_MSG_RESULT([no]) 1145 ;; 1146 esac 1147fi 1148])# AC_LIBTOOL_SYS_LIB_STRIP 1149 1150 1151# AC_LIBTOOL_SYS_DYNAMIC_LINKER 1152# ----------------------------- 1153# PORTME Fill in your ld.so characteristics 1154AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER], 1155[AC_MSG_CHECKING([dynamic linker characteristics]) 1156library_names_spec= 1157libname_spec='lib$name' 1158soname_spec= 1159shrext_cmds=".so" 1160postinstall_cmds= 1161postuninstall_cmds= 1162finish_cmds= 1163finish_eval= 1164shlibpath_var= 1165shlibpath_overrides_runpath=unknown 1166version_type=none 1167dynamic_linker="$host_os ld.so" 1168sys_lib_dlsearch_path_spec="/lib /usr/lib" 1169if test "$GCC" = yes; then 1170 sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` 1171 if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then 1172 # if the path contains ";" then we assume it to be the separator 1173 # otherwise default to the standard path separator (i.e. ":") - it is 1174 # assumed that no part of a normal pathname contains ";" but that should 1175 # okay in the real world where ";" in dirpaths is itself problematic. 1176 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 1177 else 1178 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 1179 fi 1180else 1181 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 1182fi 1183need_lib_prefix=unknown 1184hardcode_into_libs=no 1185 1186# when you set need_version to no, make sure it does not cause -set_version 1187# flags to be left without arguments 1188need_version=unknown 1189 1190case $host_os in 1191aix3*) 1192 version_type=linux 1193 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' 1194 shlibpath_var=LIBPATH 1195 1196 # AIX 3 has no versioning support, so we append a major version to the name. 1197 soname_spec='${libname}${release}${shared_ext}$major' 1198 ;; 1199 1200aix4* | aix5*) 1201 version_type=linux 1202 need_lib_prefix=no 1203 need_version=no 1204 hardcode_into_libs=yes 1205 if test "$host_cpu" = ia64; then 1206 # AIX 5 supports IA64 1207 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' 1208 shlibpath_var=LD_LIBRARY_PATH 1209 else 1210 # With GCC up to 2.95.x, collect2 would create an import file 1211 # for dependence libraries. The import file would start with 1212 # the line `#! .'. This would cause the generated library to 1213 # depend on `.', always an invalid library. This was fixed in 1214 # development snapshots of GCC prior to 3.0. 1215 case $host_os in 1216 aix4 | aix4.[[01]] | aix4.[[01]].*) 1217 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 1218 echo ' yes ' 1219 echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then 1220 : 1221 else 1222 can_build_shared=no 1223 fi 1224 ;; 1225 esac 1226 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct 1227 # soname into executable. Probably we can add versioning support to 1228 # collect2, so additional links can be useful in future. 1229 if test "$aix_use_runtimelinking" = yes; then 1230 # If using run time linking (on AIX 4.2 or later) use lib<name>.so 1231 # instead of lib<name>.a to let people know that these are not 1232 # typical AIX shared libraries. 1233 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 1234 else 1235 # We preserve .a as extension for shared libraries through AIX4.2 1236 # and later when we are not doing run time linking. 1237 library_names_spec='${libname}${release}.a $libname.a' 1238 soname_spec='${libname}${release}${shared_ext}$major' 1239 fi 1240 shlibpath_var=LIBPATH 1241 fi 1242 ;; 1243 1244amigaos*) 1245 library_names_spec='$libname.ixlibrary $libname.a' 1246 # Create ${libname}_ixlibrary.a entries in /sys/libs. 1247 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' 1248 ;; 1249 1250beos*) 1251 library_names_spec='${libname}${shared_ext}' 1252 dynamic_linker="$host_os ld.so" 1253 shlibpath_var=LIBRARY_PATH 1254 ;; 1255 1256bsdi[[45]]*) 1257 version_type=linux 1258 need_version=no 1259 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 1260 soname_spec='${libname}${release}${shared_ext}$major' 1261 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 1262 shlibpath_var=LD_LIBRARY_PATH 1263 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 1264 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 1265 # the default ld.so.conf also contains /usr/contrib/lib and 1266 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 1267 # libtool to hard-code these into programs 1268 ;; 1269 1270cygwin* | mingw* | pw32*) 1271 version_type=windows 1272 shrext_cmds=".dll" 1273 need_version=no 1274 need_lib_prefix=no 1275 1276 case $GCC,$host_os in 1277 yes,cygwin* | yes,mingw* | yes,pw32*) 1278 library_names_spec='$libname.dll.a' 1279 # DLL is installed to $(libdir)/../bin by postinstall_cmds 1280 postinstall_cmds='base_file=`basename \${file}`~ 1281 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ 1282 dldir=$destdir/`dirname \$dlpath`~ 1283 test -d \$dldir || mkdir -p \$dldir~ 1284 $install_prog $dir/$dlname \$dldir/$dlname~ 1285 chmod a+x \$dldir/$dlname' 1286 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 1287 dlpath=$dir/\$dldll~ 1288 $rm \$dlpath' 1289 shlibpath_overrides_runpath=yes 1290 1291 case $host_os in 1292 cygwin*) 1293 # Cygwin DLLs use 'cyg' prefix rather than 'lib' 1294 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 1295 sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" 1296 ;; 1297 mingw*) 1298 # MinGW DLLs use traditional 'lib' prefix 1299 soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 1300 sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` 1301 if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then 1302 # It is most probably a Windows format PATH printed by 1303 # mingw gcc, but we are running on Cygwin. Gcc prints its search 1304 # path with ; separators, and with drive letters. We can handle the 1305 # drive letters (cygwin fileutils understands them), so leave them, 1306 # especially as we might pass files found there to a mingw objdump, 1307 # which wouldn't understand a cygwinified path. Ahh. 1308 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 1309 else 1310 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 1311 fi 1312 ;; 1313 pw32*) 1314 # pw32 DLLs use 'pw' prefix rather than 'lib' 1315 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 1316 ;; 1317 esac 1318 ;; 1319 1320 *) 1321 library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' 1322 ;; 1323 esac 1324 dynamic_linker='Win32 ld.exe' 1325 # FIXME: first we should search . and the directory the executable is in 1326 shlibpath_var=PATH 1327 ;; 1328 1329darwin* | rhapsody*) 1330 dynamic_linker="$host_os dyld" 1331 version_type=darwin 1332 need_lib_prefix=no 1333 need_version=no 1334 library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' 1335 soname_spec='${libname}${release}${major}$shared_ext' 1336 shlibpath_overrides_runpath=yes 1337 shlibpath_var=DYLD_LIBRARY_PATH 1338 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 1339 # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. 1340 if test "$GCC" = yes; then 1341 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"` 1342 else 1343 sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' 1344 fi 1345 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 1346 ;; 1347 1348dgux*) 1349 version_type=linux 1350 need_lib_prefix=no 1351 need_version=no 1352 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' 1353 soname_spec='${libname}${release}${shared_ext}$major' 1354 shlibpath_var=LD_LIBRARY_PATH 1355 ;; 1356 1357freebsd1*) 1358 dynamic_linker=no 1359 ;; 1360 1361haiku*) 1362 library_names_spec='${libname}${shared_ext}' 1363 dynamic_linker="$host_os ld.so" 1364 shlibpath_var=LIBRARY_PATH 1365 ;; 1366 1367kfreebsd*-gnu) 1368 version_type=linux 1369 need_lib_prefix=no 1370 need_version=no 1371 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 1372 soname_spec='${libname}${release}${shared_ext}$major' 1373 shlibpath_var=LD_LIBRARY_PATH 1374 shlibpath_overrides_runpath=no 1375 hardcode_into_libs=yes 1376 dynamic_linker='GNU ld.so' 1377 ;; 1378 1379freebsd* | dragonfly*) 1380 # DragonFly does not have aout. When/if they implement a new 1381 # versioning mechanism, adjust this. 1382 if test -x /usr/bin/objformat; then 1383 objformat=`/usr/bin/objformat` 1384 else 1385 case $host_os in 1386 freebsd[[123]]*) objformat=aout ;; 1387 *) objformat=elf ;; 1388 esac 1389 fi 1390 version_type=freebsd-$objformat 1391 case $version_type in 1392 freebsd-elf*) 1393 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 1394 need_version=no 1395 need_lib_prefix=no 1396 ;; 1397 freebsd-*) 1398 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' 1399 need_version=yes 1400 ;; 1401 esac 1402 shlibpath_var=LD_LIBRARY_PATH 1403 case $host_os in 1404 freebsd2*) 1405 shlibpath_overrides_runpath=yes 1406 ;; 1407 freebsd3.[[01]]* | freebsdelf3.[[01]]*) 1408 shlibpath_overrides_runpath=yes 1409 hardcode_into_libs=yes 1410 ;; 1411 *) # from 3.2 on 1412 shlibpath_overrides_runpath=no 1413 hardcode_into_libs=yes 1414 ;; 1415 esac 1416 ;; 1417 1418gnu*) 1419 version_type=linux 1420 need_lib_prefix=no 1421 need_version=no 1422 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 1423 soname_spec='${libname}${release}${shared_ext}$major' 1424 shlibpath_var=LD_LIBRARY_PATH 1425 hardcode_into_libs=yes 1426 ;; 1427 1428hpux9* | hpux10* | hpux11*) 1429 # Give a soname corresponding to the major version so that dld.sl refuses to 1430 # link against other versions. 1431 version_type=sunos 1432 need_lib_prefix=no 1433 need_version=no 1434 case $host_cpu in 1435 ia64*) 1436 shrext_cmds='.so' 1437 hardcode_into_libs=yes 1438 dynamic_linker="$host_os dld.so" 1439 shlibpath_var=LD_LIBRARY_PATH 1440 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 1441 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 1442 soname_spec='${libname}${release}${shared_ext}$major' 1443 if test "X$HPUX_IA64_MODE" = X32; then 1444 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 1445 else 1446 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 1447 fi 1448 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 1449 ;; 1450 hppa*64*) 1451 shrext_cmds='.sl' 1452 hardcode_into_libs=yes 1453 dynamic_linker="$host_os dld.sl" 1454 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 1455 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 1456 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 1457 soname_spec='${libname}${release}${shared_ext}$major' 1458 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 1459 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 1460 ;; 1461 *) 1462 shrext_cmds='.sl' 1463 dynamic_linker="$host_os dld.sl" 1464 shlibpath_var=SHLIB_PATH 1465 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 1466 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 1467 soname_spec='${libname}${release}${shared_ext}$major' 1468 ;; 1469 esac 1470 # HP-UX runs *really* slowly unless shared libraries are mode 555. 1471 postinstall_cmds='chmod 555 $lib' 1472 ;; 1473 1474irix5* | irix6* | nonstopux*) 1475 case $host_os in 1476 nonstopux*) version_type=nonstopux ;; 1477 *) 1478 if test "$lt_cv_prog_gnu_ld" = yes; then 1479 version_type=linux 1480 else 1481 version_type=irix 1482 fi ;; 1483 esac 1484 need_lib_prefix=no 1485 need_version=no 1486 soname_spec='${libname}${release}${shared_ext}$major' 1487 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' 1488 case $host_os in 1489 irix5* | nonstopux*) 1490 libsuff= shlibsuff= 1491 ;; 1492 *) 1493 case $LD in # libtool.m4 will add one of these switches to LD 1494 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 1495 libsuff= shlibsuff= libmagic=32-bit;; 1496 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 1497 libsuff=32 shlibsuff=N32 libmagic=N32;; 1498 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 1499 libsuff=64 shlibsuff=64 libmagic=64-bit;; 1500 *) libsuff= shlibsuff= libmagic=never-match;; 1501 esac 1502 ;; 1503 esac 1504 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 1505 shlibpath_overrides_runpath=no 1506 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" 1507 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" 1508 hardcode_into_libs=yes 1509 ;; 1510 1511# No shared lib support for Linux oldld, aout, or coff. 1512linux*oldld* | linux*aout* | linux*coff*) 1513 dynamic_linker=no 1514 ;; 1515 1516# This must be Linux ELF. 1517linux*) 1518 version_type=linux 1519 need_lib_prefix=no 1520 need_version=no 1521 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 1522 soname_spec='${libname}${release}${shared_ext}$major' 1523 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 1524 shlibpath_var=LD_LIBRARY_PATH 1525 shlibpath_overrides_runpath=no 1526 # This implies no fast_install, which is unacceptable. 1527 # Some rework will be needed to allow for fast_install 1528 # before this can be enabled. 1529 hardcode_into_libs=yes 1530 1531 # Append ld.so.conf contents to the search path 1532 if test -f /etc/ld.so.conf; then 1533 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' ' '` 1534 sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" 1535 fi 1536 1537 # We used to test for /lib/ld.so.1 and disable shared libraries on 1538 # powerpc, because MkLinux only supported shared libraries with the 1539 # GNU dynamic linker. Since this was broken with cross compilers, 1540 # most powerpc-linux boxes support dynamic linking these days and 1541 # people can always --disable-shared, the test was removed, and we 1542 # assume the GNU/Linux dynamic linker is in use. 1543 dynamic_linker='GNU/Linux ld.so' 1544 ;; 1545 1546knetbsd*-gnu) 1547 version_type=linux 1548 need_lib_prefix=no 1549 need_version=no 1550 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 1551 soname_spec='${libname}${release}${shared_ext}$major' 1552 shlibpath_var=LD_LIBRARY_PATH 1553 shlibpath_overrides_runpath=no 1554 hardcode_into_libs=yes 1555 dynamic_linker='GNU ld.so' 1556 ;; 1557 1558netbsd*) 1559 version_type=sunos 1560 need_lib_prefix=no 1561 need_version=no 1562 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then 1563 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 1564 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 1565 dynamic_linker='NetBSD (a.out) ld.so' 1566 else 1567 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 1568 soname_spec='${libname}${release}${shared_ext}$major' 1569 dynamic_linker='NetBSD ld.elf_so' 1570 fi 1571 shlibpath_var=LD_LIBRARY_PATH 1572 shlibpath_overrides_runpath=yes 1573 hardcode_into_libs=yes 1574 ;; 1575 1576newsos6) 1577 version_type=linux 1578 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 1579 shlibpath_var=LD_LIBRARY_PATH 1580 shlibpath_overrides_runpath=yes 1581 ;; 1582 1583nto-qnx*) 1584 version_type=linux 1585 need_lib_prefix=no 1586 need_version=no 1587 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 1588 soname_spec='${libname}${release}${shared_ext}$major' 1589 shlibpath_var=LD_LIBRARY_PATH 1590 shlibpath_overrides_runpath=yes 1591 ;; 1592 1593openbsd*) 1594 version_type=sunos 1595 need_lib_prefix=no 1596 # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. 1597 case $host_os in 1598 openbsd3.3 | openbsd3.3.*) need_version=yes ;; 1599 *) need_version=no ;; 1600 esac 1601 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 1602 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 1603 shlibpath_var=LD_LIBRARY_PATH 1604 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 1605 case $host_os in 1606 openbsd2.[[89]] | openbsd2.[[89]].*) 1607 shlibpath_overrides_runpath=no 1608 ;; 1609 *) 1610 shlibpath_overrides_runpath=yes 1611 ;; 1612 esac 1613 else 1614 shlibpath_overrides_runpath=yes 1615 fi 1616 ;; 1617 1618os2*) 1619 libname_spec='$name' 1620 shrext_cmds=".dll" 1621 need_lib_prefix=no 1622 library_names_spec='$libname${shared_ext} $libname.a' 1623 dynamic_linker='OS/2 ld.exe' 1624 shlibpath_var=LIBPATH 1625 ;; 1626 1627osf3* | osf4* | osf5*) 1628 version_type=osf 1629 need_lib_prefix=no 1630 need_version=no 1631 soname_spec='${libname}${release}${shared_ext}$major' 1632 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 1633 shlibpath_var=LD_LIBRARY_PATH 1634 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 1635 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" 1636 ;; 1637 1638sco3.2v5*) 1639 version_type=osf 1640 soname_spec='${libname}${release}${shared_ext}$major' 1641 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 1642 shlibpath_var=LD_LIBRARY_PATH 1643 ;; 1644 1645solaris*) 1646 version_type=linux 1647 need_lib_prefix=no 1648 need_version=no 1649 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 1650 soname_spec='${libname}${release}${shared_ext}$major' 1651 shlibpath_var=LD_LIBRARY_PATH 1652 shlibpath_overrides_runpath=yes 1653 hardcode_into_libs=yes 1654 # ldd complains unless libraries are executable 1655 postinstall_cmds='chmod +x $lib' 1656 ;; 1657 1658sunos4*) 1659 version_type=sunos 1660 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 1661 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 1662 shlibpath_var=LD_LIBRARY_PATH 1663 shlibpath_overrides_runpath=yes 1664 if test "$with_gnu_ld" = yes; then 1665 need_lib_prefix=no 1666 fi 1667 need_version=yes 1668 ;; 1669 1670sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 1671 version_type=linux 1672 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 1673 soname_spec='${libname}${release}${shared_ext}$major' 1674 shlibpath_var=LD_LIBRARY_PATH 1675 case $host_vendor in 1676 sni) 1677 shlibpath_overrides_runpath=no 1678 need_lib_prefix=no 1679 export_dynamic_flag_spec='${wl}-Blargedynsym' 1680 runpath_var=LD_RUN_PATH 1681 ;; 1682 siemens) 1683 need_lib_prefix=no 1684 ;; 1685 motorola) 1686 need_lib_prefix=no 1687 need_version=no 1688 shlibpath_overrides_runpath=no 1689 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 1690 ;; 1691 esac 1692 ;; 1693 1694sysv4*MP*) 1695 if test -d /usr/nec ;then 1696 version_type=linux 1697 library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' 1698 soname_spec='$libname${shared_ext}.$major' 1699 shlibpath_var=LD_LIBRARY_PATH 1700 fi 1701 ;; 1702 1703uts4*) 1704 version_type=linux 1705 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 1706 soname_spec='${libname}${release}${shared_ext}$major' 1707 shlibpath_var=LD_LIBRARY_PATH 1708 ;; 1709 1710*) 1711 dynamic_linker=no 1712 ;; 1713esac 1714AC_MSG_RESULT([$dynamic_linker]) 1715test "$dynamic_linker" = no && can_build_shared=no 1716])# AC_LIBTOOL_SYS_DYNAMIC_LINKER 1717 1718 1719# _LT_AC_TAGCONFIG 1720# ---------------- 1721AC_DEFUN([_LT_AC_TAGCONFIG], 1722[AC_ARG_WITH([tags], 1723 [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@], 1724 [include additional configurations @<:@automatic@:>@])], 1725 [tagnames="$withval"]) 1726 1727if test -f "$ltmain" && test -n "$tagnames"; then 1728 if test ! -f "${ofile}"; then 1729 AC_MSG_WARN([output file `$ofile' does not exist]) 1730 fi 1731 1732 if test -z "$LTCC"; then 1733 eval "`$SHELL ${ofile} --config | grep '^LTCC='`" 1734 if test -z "$LTCC"; then 1735 AC_MSG_WARN([output file `$ofile' does not look like a libtool script]) 1736 else 1737 AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile']) 1738 fi 1739 fi 1740 1741 # Extract list of available tagged configurations in $ofile. 1742 # Note that this assumes the entire list is on one line. 1743 available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` 1744 1745 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 1746 for tagname in $tagnames; do 1747 IFS="$lt_save_ifs" 1748 # Check whether tagname contains only valid characters 1749 case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in 1750 "") ;; 1751 *) AC_MSG_ERROR([invalid tag name: $tagname]) 1752 ;; 1753 esac 1754 1755 if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null 1756 then 1757 AC_MSG_ERROR([tag name \"$tagname\" already exists]) 1758 fi 1759 1760 # Update the list of available tags. 1761 if test -n "$tagname"; then 1762 echo appending configuration tag \"$tagname\" to $ofile 1763 1764 case $tagname in 1765 CXX) 1766 if test -n "$CXX" && ( test "X$CXX" != "Xno" && 1767 ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || 1768 (test "X$CXX" != "Xg++"))) ; then 1769 AC_LIBTOOL_LANG_CXX_CONFIG 1770 else 1771 tagname="" 1772 fi 1773 ;; 1774 1775 F77) 1776 if test -n "$F77" && test "X$F77" != "Xno"; then 1777 AC_LIBTOOL_LANG_F77_CONFIG 1778 else 1779 tagname="" 1780 fi 1781 ;; 1782 1783 GCJ) 1784 if test -n "$GCJ" && test "X$GCJ" != "Xno"; then 1785 AC_LIBTOOL_LANG_GCJ_CONFIG 1786 else 1787 tagname="" 1788 fi 1789 ;; 1790 1791 RC) 1792 AC_LIBTOOL_LANG_RC_CONFIG 1793 ;; 1794 1795 *) 1796 AC_MSG_ERROR([Unsupported tag name: $tagname]) 1797 ;; 1798 esac 1799 1800 # Append the new tag name to the list of available tags. 1801 if test -n "$tagname" ; then 1802 available_tags="$available_tags $tagname" 1803 fi 1804 fi 1805 done 1806 IFS="$lt_save_ifs" 1807 1808 # Now substitute the updated list of available tags. 1809 if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then 1810 mv "${ofile}T" "$ofile" 1811 chmod +x "$ofile" 1812 else 1813 rm -f "${ofile}T" 1814 AC_MSG_ERROR([unable to update list of available tagged configurations.]) 1815 fi 1816fi 1817])# _LT_AC_TAGCONFIG 1818 1819 1820# AC_LIBTOOL_DLOPEN 1821# ----------------- 1822# enable checks for dlopen support 1823AC_DEFUN([AC_LIBTOOL_DLOPEN], 1824 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP]) 1825])# AC_LIBTOOL_DLOPEN 1826 1827 1828# AC_LIBTOOL_WIN32_DLL 1829# -------------------- 1830# declare package support for building win32 DLLs 1831AC_DEFUN([AC_LIBTOOL_WIN32_DLL], 1832[AC_BEFORE([$0], [AC_LIBTOOL_SETUP]) 1833])# AC_LIBTOOL_WIN32_DLL 1834 1835 1836# AC_ENABLE_SHARED([DEFAULT]) 1837# --------------------------- 1838# implement the --enable-shared flag 1839# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 1840AC_DEFUN([AC_ENABLE_SHARED], 1841[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl 1842AC_ARG_ENABLE([shared], 1843 [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 1844 [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])], 1845 [p=${PACKAGE-default} 1846 case $enableval in 1847 yes) enable_shared=yes ;; 1848 no) enable_shared=no ;; 1849 *) 1850 enable_shared=no 1851 # Look at the argument we got. We use all the common list separators. 1852 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 1853 for pkg in $enableval; do 1854 IFS="$lt_save_ifs" 1855 if test "X$pkg" = "X$p"; then 1856 enable_shared=yes 1857 fi 1858 done 1859 IFS="$lt_save_ifs" 1860 ;; 1861 esac], 1862 [enable_shared=]AC_ENABLE_SHARED_DEFAULT) 1863])# AC_ENABLE_SHARED 1864 1865 1866# AC_DISABLE_SHARED 1867# ----------------- 1868#- set the default shared flag to --disable-shared 1869AC_DEFUN([AC_DISABLE_SHARED], 1870[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 1871AC_ENABLE_SHARED(no) 1872])# AC_DISABLE_SHARED 1873 1874 1875# AC_ENABLE_STATIC([DEFAULT]) 1876# --------------------------- 1877# implement the --enable-static flag 1878# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 1879AC_DEFUN([AC_ENABLE_STATIC], 1880[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl 1881AC_ARG_ENABLE([static], 1882 [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@], 1883 [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])], 1884 [p=${PACKAGE-default} 1885 case $enableval in 1886 yes) enable_static=yes ;; 1887 no) enable_static=no ;; 1888 *) 1889 enable_static=no 1890 # Look at the argument we got. We use all the common list separators. 1891 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 1892 for pkg in $enableval; do 1893 IFS="$lt_save_ifs" 1894 if test "X$pkg" = "X$p"; then 1895 enable_static=yes 1896 fi 1897 done 1898 IFS="$lt_save_ifs" 1899 ;; 1900 esac], 1901 [enable_static=]AC_ENABLE_STATIC_DEFAULT) 1902])# AC_ENABLE_STATIC 1903 1904 1905# AC_DISABLE_STATIC 1906# ----------------- 1907# set the default static flag to --disable-static 1908AC_DEFUN([AC_DISABLE_STATIC], 1909[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 1910AC_ENABLE_STATIC(no) 1911])# AC_DISABLE_STATIC 1912 1913 1914# AC_ENABLE_FAST_INSTALL([DEFAULT]) 1915# --------------------------------- 1916# implement the --enable-fast-install flag 1917# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 1918AC_DEFUN([AC_ENABLE_FAST_INSTALL], 1919[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl 1920AC_ARG_ENABLE([fast-install], 1921 [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 1922 [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 1923 [p=${PACKAGE-default} 1924 case $enableval in 1925 yes) enable_fast_install=yes ;; 1926 no) enable_fast_install=no ;; 1927 *) 1928 enable_fast_install=no 1929 # Look at the argument we got. We use all the common list separators. 1930 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 1931 for pkg in $enableval; do 1932 IFS="$lt_save_ifs" 1933 if test "X$pkg" = "X$p"; then 1934 enable_fast_install=yes 1935 fi 1936 done 1937 IFS="$lt_save_ifs" 1938 ;; 1939 esac], 1940 [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT) 1941])# AC_ENABLE_FAST_INSTALL 1942 1943 1944# AC_DISABLE_FAST_INSTALL 1945# ----------------------- 1946# set the default to --disable-fast-install 1947AC_DEFUN([AC_DISABLE_FAST_INSTALL], 1948[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 1949AC_ENABLE_FAST_INSTALL(no) 1950])# AC_DISABLE_FAST_INSTALL 1951 1952 1953# AC_LIBTOOL_PICMODE([MODE]) 1954# -------------------------- 1955# implement the --with-pic flag 1956# MODE is either `yes' or `no'. If omitted, it defaults to `both'. 1957AC_DEFUN([AC_LIBTOOL_PICMODE], 1958[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 1959pic_mode=ifelse($#,1,$1,default) 1960])# AC_LIBTOOL_PICMODE 1961 1962 1963# AC_PROG_EGREP 1964# ------------- 1965# This is predefined starting with Autoconf 2.54, so this conditional 1966# definition can be removed once we require Autoconf 2.54 or later. 1967m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP], 1968[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep], 1969 [if echo a | (grep -E '(a|b)') >/dev/null 2>&1 1970 then ac_cv_prog_egrep='grep -E' 1971 else ac_cv_prog_egrep='egrep' 1972 fi]) 1973 EGREP=$ac_cv_prog_egrep 1974 AC_SUBST([EGREP]) 1975])]) 1976 1977 1978# AC_PATH_TOOL_PREFIX 1979# ------------------- 1980# find a file program which can recognise shared library 1981AC_DEFUN([AC_PATH_TOOL_PREFIX], 1982[AC_REQUIRE([AC_PROG_EGREP])dnl 1983AC_MSG_CHECKING([for $1]) 1984AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 1985[case $MAGIC_CMD in 1986[[\\/*] | ?:[\\/]*]) 1987 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. 1988 ;; 1989*) 1990 lt_save_MAGIC_CMD="$MAGIC_CMD" 1991 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 1992dnl $ac_dummy forces splitting on constant user-supplied paths. 1993dnl POSIX.2 word splitting is done only on the output of word expansions, 1994dnl not every word. This closes a longstanding sh security hole. 1995 ac_dummy="ifelse([$2], , $PATH, [$2])" 1996 for ac_dir in $ac_dummy; do 1997 IFS="$lt_save_ifs" 1998 test -z "$ac_dir" && ac_dir=. 1999 if test -f $ac_dir/$1; then 2000 lt_cv_path_MAGIC_CMD="$ac_dir/$1" 2001 if test -n "$file_magic_test_file"; then 2002 case $deplibs_check_method in 2003 "file_magic "*) 2004 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 2005 MAGIC_CMD="$lt_cv_path_MAGIC_CMD" 2006 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 2007 $EGREP "$file_magic_regex" > /dev/null; then 2008 : 2009 else 2010 cat <<EOF 1>&2 2011 2012*** Warning: the command libtool uses to detect shared libraries, 2013*** $file_magic_cmd, produces output that libtool cannot recognize. 2014*** The result is that libtool may fail to recognize shared libraries 2015*** as such. This will affect the creation of libtool libraries that 2016*** depend on shared libraries, but programs linked with such libtool 2017*** libraries will work regardless of this problem. Nevertheless, you 2018*** may want to report the problem to your system manager and/or to 2019*** bug-libtool@gnu.org 2020 2021EOF 2022 fi ;; 2023 esac 2024 fi 2025 break 2026 fi 2027 done 2028 IFS="$lt_save_ifs" 2029 MAGIC_CMD="$lt_save_MAGIC_CMD" 2030 ;; 2031esac]) 2032MAGIC_CMD="$lt_cv_path_MAGIC_CMD" 2033if test -n "$MAGIC_CMD"; then 2034 AC_MSG_RESULT($MAGIC_CMD) 2035else 2036 AC_MSG_RESULT(no) 2037fi 2038])# AC_PATH_TOOL_PREFIX 2039 2040 2041# AC_PATH_MAGIC 2042# ------------- 2043# find a file program which can recognise a shared library 2044AC_DEFUN([AC_PATH_MAGIC], 2045[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 2046if test -z "$lt_cv_path_MAGIC_CMD"; then 2047 if test -n "$ac_tool_prefix"; then 2048 AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 2049 else 2050 MAGIC_CMD=: 2051 fi 2052fi 2053])# AC_PATH_MAGIC 2054 2055 2056# AC_PROG_LD 2057# ---------- 2058# find the pathname to the GNU or non-GNU linker 2059AC_DEFUN([AC_PROG_LD], 2060[AC_ARG_WITH([gnu-ld], 2061 [AC_HELP_STRING([--with-gnu-ld], 2062 [assume the C compiler uses GNU ld @<:@default=no@:>@])], 2063 [test "$withval" = no || with_gnu_ld=yes], 2064 [with_gnu_ld=no]) 2065AC_REQUIRE([LT_AC_PROG_SED])dnl 2066AC_REQUIRE([AC_PROG_CC])dnl 2067AC_REQUIRE([AC_CANONICAL_HOST])dnl 2068AC_REQUIRE([AC_CANONICAL_BUILD])dnl 2069ac_prog=ld 2070if test "$GCC" = yes; then 2071 # Check if gcc -print-prog-name=ld gives a path. 2072 AC_MSG_CHECKING([for ld used by $CC]) 2073 case $host in 2074 *-*-mingw*) 2075 # gcc leaves a trailing carriage return which upsets mingw 2076 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 2077 *) 2078 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 2079 esac 2080 case $ac_prog in 2081 # Accept absolute paths. 2082 [[\\/]]* | ?:[[\\/]]*) 2083 re_direlt='/[[^/]][[^/]]*/\.\./' 2084 # Canonicalize the pathname of ld 2085 ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` 2086 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do 2087 ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` 2088 done 2089 test -z "$LD" && LD="$ac_prog" 2090 ;; 2091 "") 2092 # If it fails, then pretend we aren't using GCC. 2093 ac_prog=ld 2094 ;; 2095 *) 2096 # If it is relative, then search for the first ld in PATH. 2097 with_gnu_ld=unknown 2098 ;; 2099 esac 2100elif test "$with_gnu_ld" = yes; then 2101 AC_MSG_CHECKING([for GNU ld]) 2102else 2103 AC_MSG_CHECKING([for non-GNU ld]) 2104fi 2105AC_CACHE_VAL(lt_cv_path_LD, 2106[if test -z "$LD"; then 2107 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 2108 for ac_dir in $PATH; do 2109 IFS="$lt_save_ifs" 2110 test -z "$ac_dir" && ac_dir=. 2111 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 2112 lt_cv_path_LD="$ac_dir/$ac_prog" 2113 # Check to see if the program is GNU ld. I'd rather use --version, 2114 # but apparently some variants of GNU ld only accept -v. 2115 # Break only if it was the GNU/non-GNU ld that we prefer. 2116 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 2117 *GNU* | *'with BFD'*) 2118 test "$with_gnu_ld" != no && break 2119 ;; 2120 *) 2121 test "$with_gnu_ld" != yes && break 2122 ;; 2123 esac 2124 fi 2125 done 2126 IFS="$lt_save_ifs" 2127else 2128 lt_cv_path_LD="$LD" # Let the user override the test with a path. 2129fi]) 2130LD="$lt_cv_path_LD" 2131if test -n "$LD"; then 2132 AC_MSG_RESULT($LD) 2133else 2134 AC_MSG_RESULT(no) 2135fi 2136test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 2137AC_PROG_LD_GNU 2138])# AC_PROG_LD 2139 2140 2141# AC_PROG_LD_GNU 2142# -------------- 2143AC_DEFUN([AC_PROG_LD_GNU], 2144[AC_REQUIRE([AC_PROG_EGREP])dnl 2145AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 2146[# I'd rather use --version here, but apparently some GNU lds only accept -v. 2147case `$LD -v 2>&1 </dev/null` in 2148*GNU* | *'with BFD'*) 2149 lt_cv_prog_gnu_ld=yes 2150 ;; 2151*) 2152 lt_cv_prog_gnu_ld=no 2153 ;; 2154esac]) 2155with_gnu_ld=$lt_cv_prog_gnu_ld 2156])# AC_PROG_LD_GNU 2157 2158 2159# AC_PROG_LD_RELOAD_FLAG 2160# ---------------------- 2161# find reload flag for linker 2162# -- PORTME Some linkers may need a different reload flag. 2163AC_DEFUN([AC_PROG_LD_RELOAD_FLAG], 2164[AC_CACHE_CHECK([for $LD option to reload object files], 2165 lt_cv_ld_reload_flag, 2166 [lt_cv_ld_reload_flag='-r']) 2167reload_flag=$lt_cv_ld_reload_flag 2168case $reload_flag in 2169"" | " "*) ;; 2170*) reload_flag=" $reload_flag" ;; 2171esac 2172reload_cmds='$LD$reload_flag -o $output$reload_objs' 2173case $host_os in 2174 darwin*) 2175 if test "$GCC" = yes; then 2176 reload_cmds='$CC -nostdlib ${wl}-r -o $output$reload_objs' 2177 else 2178 reload_cmds='$LD$reload_flag -o $output$reload_objs' 2179 fi 2180 ;; 2181esac 2182])# AC_PROG_LD_RELOAD_FLAG 2183 2184 2185# AC_DEPLIBS_CHECK_METHOD 2186# ----------------------- 2187# how to check for library dependencies 2188# -- PORTME fill in with the dynamic library characteristics 2189AC_DEFUN([AC_DEPLIBS_CHECK_METHOD], 2190[AC_CACHE_CHECK([how to recognise dependent libraries], 2191lt_cv_deplibs_check_method, 2192[lt_cv_file_magic_cmd='$MAGIC_CMD' 2193lt_cv_file_magic_test_file= 2194lt_cv_deplibs_check_method='unknown' 2195# Need to set the preceding variable on all platforms that support 2196# interlibrary dependencies. 2197# 'none' -- dependencies not supported. 2198# `unknown' -- same as none, but documents that we really don't know. 2199# 'pass_all' -- all dependencies passed with no checks. 2200# 'test_compile' -- check by making test program. 2201# 'file_magic [[regex]]' -- check by looking for files in library path 2202# which responds to the $file_magic_cmd with a given extended regex. 2203# If you have `file' or equivalent on your system and you're not sure 2204# whether `pass_all' will *always* work, you probably want this one. 2205 2206case $host_os in 2207aix4* | aix5*) 2208 lt_cv_deplibs_check_method=pass_all 2209 ;; 2210 2211beos*) 2212 lt_cv_deplibs_check_method=pass_all 2213 ;; 2214 2215bsdi[[45]]*) 2216 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 2217 lt_cv_file_magic_cmd='/usr/bin/file -L' 2218 lt_cv_file_magic_test_file=/shlib/libc.so 2219 ;; 2220 2221cygwin*) 2222 # func_win32_libid is a shell function defined in ltmain.sh 2223 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 2224 lt_cv_file_magic_cmd='func_win32_libid' 2225 ;; 2226 2227mingw* | pw32*) 2228 # Base MSYS/MinGW do not provide the 'file' command needed by 2229 # func_win32_libid shell function, so use a weaker test based on 'objdump'. 2230 lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' 2231 lt_cv_file_magic_cmd='$OBJDUMP -f' 2232 ;; 2233 2234darwin* | rhapsody*) 2235 lt_cv_deplibs_check_method=pass_all 2236 ;; 2237 2238freebsd* | kfreebsd*-gnu | dragonfly*) 2239 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then 2240 case $host_cpu in 2241 i*86 ) 2242 # Not sure whether the presence of OpenBSD here was a mistake. 2243 # Let's accept both of them until this is cleared up. 2244 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 2245 lt_cv_file_magic_cmd=/usr/bin/file 2246 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 2247 ;; 2248 esac 2249 else 2250 lt_cv_deplibs_check_method=pass_all 2251 fi 2252 ;; 2253 2254gnu*) 2255 lt_cv_deplibs_check_method=pass_all 2256 ;; 2257 2258haiku*) 2259 lt_cv_deplibs_check_method=pass_all 2260 ;; 2261 2262hpux10.20* | hpux11*) 2263 lt_cv_file_magic_cmd=/usr/bin/file 2264 case $host_cpu in 2265 ia64*) 2266 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 2267 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 2268 ;; 2269 hppa*64*) 2270 [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]'] 2271 lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 2272 ;; 2273 *) 2274 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' 2275 lt_cv_file_magic_test_file=/usr/lib/libc.sl 2276 ;; 2277 esac 2278 ;; 2279 2280irix5* | irix6* | nonstopux*) 2281 case $LD in 2282 *-32|*"-32 ") libmagic=32-bit;; 2283 *-n32|*"-n32 ") libmagic=N32;; 2284 *-64|*"-64 ") libmagic=64-bit;; 2285 *) libmagic=never-match;; 2286 esac 2287 lt_cv_deplibs_check_method=pass_all 2288 ;; 2289 2290# This must be Linux ELF. 2291linux*) 2292 lt_cv_deplibs_check_method=pass_all 2293 ;; 2294 2295netbsd*) 2296 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then 2297 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 2298 else 2299 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 2300 fi 2301 ;; 2302 2303newos6*) 2304 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 2305 lt_cv_file_magic_cmd=/usr/bin/file 2306 lt_cv_file_magic_test_file=/usr/lib/libnls.so 2307 ;; 2308 2309nto-qnx*) 2310 lt_cv_deplibs_check_method=unknown 2311 ;; 2312 2313openbsd*) 2314 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 2315 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 2316 else 2317 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 2318 fi 2319 ;; 2320 2321osf3* | osf4* | osf5*) 2322 lt_cv_deplibs_check_method=pass_all 2323 ;; 2324 2325sco3.2v5*) 2326 lt_cv_deplibs_check_method=pass_all 2327 ;; 2328 2329solaris*) 2330 lt_cv_deplibs_check_method=pass_all 2331 ;; 2332 2333sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 2334 case $host_vendor in 2335 motorola) 2336 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]]' 2337 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 2338 ;; 2339 ncr) 2340 lt_cv_deplibs_check_method=pass_all 2341 ;; 2342 sequent) 2343 lt_cv_file_magic_cmd='/bin/file' 2344 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 2345 ;; 2346 sni) 2347 lt_cv_file_magic_cmd='/bin/file' 2348 lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 2349 lt_cv_file_magic_test_file=/lib/libc.so 2350 ;; 2351 siemens) 2352 lt_cv_deplibs_check_method=pass_all 2353 ;; 2354 esac 2355 ;; 2356 2357sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7* | sysv4*uw2*) 2358 lt_cv_deplibs_check_method=pass_all 2359 ;; 2360esac 2361]) 2362file_magic_cmd=$lt_cv_file_magic_cmd 2363deplibs_check_method=$lt_cv_deplibs_check_method 2364test -z "$deplibs_check_method" && deplibs_check_method=unknown 2365])# AC_DEPLIBS_CHECK_METHOD 2366 2367 2368# AC_PROG_NM 2369# ---------- 2370# find the pathname to a BSD-compatible name lister 2371AC_DEFUN([AC_PROG_NM], 2372[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM, 2373[if test -n "$NM"; then 2374 # Let the user override the test. 2375 lt_cv_path_NM="$NM" 2376else 2377 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 2378 for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do 2379 IFS="$lt_save_ifs" 2380 test -z "$ac_dir" && ac_dir=. 2381 tmp_nm="$ac_dir/${ac_tool_prefix}nm" 2382 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then 2383 # Check to see if the nm accepts a BSD-compat flag. 2384 # Adding the `sed 1q' prevents false positives on HP-UX, which says: 2385 # nm: unknown option "B" ignored 2386 # Tru64's nm complains that /dev/null is an invalid object file 2387 case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in 2388 */dev/null* | *'Invalid file or object type'*) 2389 lt_cv_path_NM="$tmp_nm -B" 2390 break 2391 ;; 2392 *) 2393 case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in 2394 */dev/null*) 2395 lt_cv_path_NM="$tmp_nm -p" 2396 break 2397 ;; 2398 *) 2399 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 2400 continue # so that we can try to find one that supports BSD flags 2401 ;; 2402 esac 2403 esac 2404 fi 2405 done 2406 IFS="$lt_save_ifs" 2407 test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm 2408fi]) 2409NM="$lt_cv_path_NM" 2410])# AC_PROG_NM 2411 2412 2413# AC_CHECK_LIBM 2414# ------------- 2415# check for math library 2416AC_DEFUN([AC_CHECK_LIBM], 2417[AC_REQUIRE([AC_CANONICAL_HOST])dnl 2418LIBM= 2419case $host in 2420*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin* | *-*-haiku*) 2421 # These system don't have libm, or don't need it 2422 ;; 2423*-ncr-sysv4.3*) 2424 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") 2425 AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 2426 ;; 2427*) 2428 AC_CHECK_LIB(m, cos, LIBM="-lm") 2429 ;; 2430esac 2431])# AC_CHECK_LIBM 2432 2433 2434# AC_LIBLTDL_CONVENIENCE([DIRECTORY]) 2435# ----------------------------------- 2436# sets LIBLTDL to the link flags for the libltdl convenience library and 2437# LTDLINCL to the include flags for the libltdl header and adds 2438# --enable-ltdl-convenience to the configure arguments. Note that 2439# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, 2440# it is assumed to be `libltdl'. LIBLTDL will be prefixed with 2441# '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/' 2442# (note the single quotes!). If your package is not flat and you're not 2443# using automake, define top_builddir and top_srcdir appropriately in 2444# the Makefiles. 2445AC_DEFUN([AC_LIBLTDL_CONVENIENCE], 2446[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 2447 case $enable_ltdl_convenience in 2448 no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; 2449 "") enable_ltdl_convenience=yes 2450 ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; 2451 esac 2452 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la 2453 LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) 2454 # For backwards non-gettext consistent compatibility... 2455 INCLTDL="$LTDLINCL" 2456])# AC_LIBLTDL_CONVENIENCE 2457 2458 2459# AC_LIBLTDL_INSTALLABLE([DIRECTORY]) 2460# ----------------------------------- 2461# sets LIBLTDL to the link flags for the libltdl installable library and 2462# LTDLINCL to the include flags for the libltdl header and adds 2463# --enable-ltdl-install to the configure arguments. Note that 2464# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, 2465# and an installed libltdl is not found, it is assumed to be `libltdl'. 2466# LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with 2467# '${top_srcdir}/' (note the single quotes!). If your package is not 2468# flat and you're not using automake, define top_builddir and top_srcdir 2469# appropriately in the Makefiles. 2470# In the future, this macro may have to be called after AC_PROG_LIBTOOL. 2471AC_DEFUN([AC_LIBLTDL_INSTALLABLE], 2472[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 2473 AC_CHECK_LIB(ltdl, lt_dlinit, 2474 [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no], 2475 [if test x"$enable_ltdl_install" = xno; then 2476 AC_MSG_WARN([libltdl not installed, but installation disabled]) 2477 else 2478 enable_ltdl_install=yes 2479 fi 2480 ]) 2481 if test x"$enable_ltdl_install" = x"yes"; then 2482 ac_configure_args="$ac_configure_args --enable-ltdl-install" 2483 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la 2484 LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) 2485 else 2486 ac_configure_args="$ac_configure_args --enable-ltdl-install=no" 2487 LIBLTDL="-lltdl" 2488 LTDLINCL= 2489 fi 2490 # For backwards non-gettext consistent compatibility... 2491 INCLTDL="$LTDLINCL" 2492])# AC_LIBLTDL_INSTALLABLE 2493 2494 2495# AC_LIBTOOL_CXX 2496# -------------- 2497# enable support for C++ libraries 2498AC_DEFUN([AC_LIBTOOL_CXX], 2499[AC_REQUIRE([_LT_AC_LANG_CXX]) 2500])# AC_LIBTOOL_CXX 2501 2502 2503# _LT_AC_LANG_CXX 2504# --------------- 2505AC_DEFUN([_LT_AC_LANG_CXX], 2506[AC_REQUIRE([AC_PROG_CXX]) 2507AC_REQUIRE([_LT_AC_PROG_CXXCPP]) 2508_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX]) 2509])# _LT_AC_LANG_CXX 2510 2511# _LT_AC_PROG_CXXCPP 2512# --------------- 2513AC_DEFUN([_LT_AC_PROG_CXXCPP], 2514[ 2515AC_REQUIRE([AC_PROG_CXX]) 2516if test -n "$CXX" && ( test "X$CXX" != "Xno" && 2517 ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || 2518 (test "X$CXX" != "Xg++"))) ; then 2519 AC_PROG_CXXCPP 2520fi 2521])# _LT_AC_PROG_CXXCPP 2522 2523# AC_LIBTOOL_F77 2524# -------------- 2525# enable support for Fortran 77 libraries 2526AC_DEFUN([AC_LIBTOOL_F77], 2527[AC_REQUIRE([_LT_AC_LANG_F77]) 2528])# AC_LIBTOOL_F77 2529 2530 2531# _LT_AC_LANG_F77 2532# --------------- 2533AC_DEFUN([_LT_AC_LANG_F77], 2534[AC_REQUIRE([AC_PROG_F77]) 2535_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77]) 2536])# _LT_AC_LANG_F77 2537 2538 2539# AC_LIBTOOL_GCJ 2540# -------------- 2541# enable support for GCJ libraries 2542AC_DEFUN([AC_LIBTOOL_GCJ], 2543[AC_REQUIRE([_LT_AC_LANG_GCJ]) 2544])# AC_LIBTOOL_GCJ 2545 2546 2547# _LT_AC_LANG_GCJ 2548# --------------- 2549AC_DEFUN([_LT_AC_LANG_GCJ], 2550[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[], 2551 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[], 2552 [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[], 2553 [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])], 2554 [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])], 2555 [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])]) 2556_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ]) 2557])# _LT_AC_LANG_GCJ 2558 2559 2560# AC_LIBTOOL_RC 2561# -------------- 2562# enable support for Windows resource files 2563AC_DEFUN([AC_LIBTOOL_RC], 2564[AC_REQUIRE([LT_AC_PROG_RC]) 2565_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC]) 2566])# AC_LIBTOOL_RC 2567 2568 2569# AC_LIBTOOL_LANG_C_CONFIG 2570# ------------------------ 2571# Ensure that the configuration vars for the C compiler are 2572# suitably defined. Those variables are subsequently used by 2573# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 2574AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG]) 2575AC_DEFUN([_LT_AC_LANG_C_CONFIG], 2576[lt_save_CC="$CC" 2577AC_LANG_PUSH(C) 2578 2579# Source file extension for C test sources. 2580ac_ext=c 2581 2582# Object file extension for compiled C test sources. 2583objext=o 2584_LT_AC_TAGVAR(objext, $1)=$objext 2585 2586# Code to be used in simple compile tests 2587lt_simple_compile_test_code="int some_variable = 0;\n" 2588 2589# Code to be used in simple link tests 2590lt_simple_link_test_code='int main(){return(0);}\n' 2591 2592_LT_AC_SYS_COMPILER 2593 2594# save warnings/boilerplate of simple test code 2595_LT_COMPILER_BOILERPLATE 2596_LT_LINKER_BOILERPLATE 2597 2598# 2599# Check for any special shared library compilation flags. 2600# 2601_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)= 2602if test "$GCC" = no; then 2603 case $host_os in 2604 sco3.2v5*) 2605 _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)='-belf' 2606 ;; 2607 esac 2608fi 2609if test -n "$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)"; then 2610 AC_MSG_WARN([`$CC' requires `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to build shared libraries]) 2611 if echo "$old_CC $old_CFLAGS " | grep "[[ ]]$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)[[ ]]" >/dev/null; then : 2612 else 2613 AC_MSG_WARN([add `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to the CC or CFLAGS env variable and reconfigure]) 2614 _LT_AC_TAGVAR(lt_cv_prog_cc_can_build_shared, $1)=no 2615 fi 2616fi 2617 2618 2619# 2620# Check to make sure the static flag actually works. 2621# 2622AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $_LT_AC_TAGVAR(lt_prog_compiler_static, $1) works], 2623 _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1), 2624 $_LT_AC_TAGVAR(lt_prog_compiler_static, $1), 2625 [], 2626 [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=]) 2627 2628 2629## CAVEAT EMPTOR: 2630## There is no encapsulation within the following macros, do not change 2631## the running order or otherwise move them around unless you know exactly 2632## what you are doing... 2633AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) 2634AC_LIBTOOL_PROG_COMPILER_PIC($1) 2635AC_LIBTOOL_PROG_CC_C_O($1) 2636AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) 2637AC_LIBTOOL_PROG_LD_SHLIBS($1) 2638AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) 2639AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) 2640AC_LIBTOOL_SYS_LIB_STRIP 2641AC_LIBTOOL_DLOPEN_SELF($1) 2642 2643# Report which librarie types wil actually be built 2644AC_MSG_CHECKING([if libtool supports shared libraries]) 2645AC_MSG_RESULT([$can_build_shared]) 2646 2647AC_MSG_CHECKING([whether to build shared libraries]) 2648test "$can_build_shared" = "no" && enable_shared=no 2649 2650# On AIX, shared libraries and static libraries use the same namespace, and 2651# are all built from PIC. 2652case $host_os in 2653aix3*) 2654 test "$enable_shared" = yes && enable_static=no 2655 if test -n "$RANLIB"; then 2656 archive_cmds="$archive_cmds~\$RANLIB \$lib" 2657 postinstall_cmds='$RANLIB $lib' 2658 fi 2659 ;; 2660 2661aix4* | aix5*) 2662 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 2663 test "$enable_shared" = yes && enable_static=no 2664 fi 2665 ;; 2666esac 2667AC_MSG_RESULT([$enable_shared]) 2668 2669AC_MSG_CHECKING([whether to build static libraries]) 2670# Make sure either enable_shared or enable_static is yes. 2671test "$enable_shared" = yes || enable_static=yes 2672AC_MSG_RESULT([$enable_static]) 2673 2674AC_LIBTOOL_CONFIG($1) 2675 2676AC_LANG_POP 2677CC="$lt_save_CC" 2678])# AC_LIBTOOL_LANG_C_CONFIG 2679 2680 2681# AC_LIBTOOL_LANG_CXX_CONFIG 2682# -------------------------- 2683# Ensure that the configuration vars for the C compiler are 2684# suitably defined. Those variables are subsequently used by 2685# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 2686AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)]) 2687AC_DEFUN([_LT_AC_LANG_CXX_CONFIG], 2688[AC_LANG_PUSH(C++) 2689AC_REQUIRE([AC_PROG_CXX]) 2690AC_REQUIRE([_LT_AC_PROG_CXXCPP]) 2691 2692_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 2693_LT_AC_TAGVAR(allow_undefined_flag, $1)= 2694_LT_AC_TAGVAR(always_export_symbols, $1)=no 2695_LT_AC_TAGVAR(archive_expsym_cmds, $1)= 2696_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= 2697_LT_AC_TAGVAR(hardcode_direct, $1)=no 2698_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= 2699_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 2700_LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 2701_LT_AC_TAGVAR(hardcode_minus_L, $1)=no 2702_LT_AC_TAGVAR(hardcode_automatic, $1)=no 2703_LT_AC_TAGVAR(module_cmds, $1)= 2704_LT_AC_TAGVAR(module_expsym_cmds, $1)= 2705_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown 2706_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 2707_LT_AC_TAGVAR(no_undefined_flag, $1)= 2708_LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 2709_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no 2710 2711# Dependencies to place before and after the object being linked: 2712_LT_AC_TAGVAR(predep_objects, $1)= 2713_LT_AC_TAGVAR(postdep_objects, $1)= 2714_LT_AC_TAGVAR(predeps, $1)= 2715_LT_AC_TAGVAR(postdeps, $1)= 2716_LT_AC_TAGVAR(compiler_lib_search_path, $1)= 2717 2718# Source file extension for C++ test sources. 2719ac_ext=cpp 2720 2721# Object file extension for compiled C++ test sources. 2722objext=o 2723_LT_AC_TAGVAR(objext, $1)=$objext 2724 2725# Code to be used in simple compile tests 2726lt_simple_compile_test_code="int some_variable = 0;\n" 2727 2728# Code to be used in simple link tests 2729lt_simple_link_test_code='int main(int, char *[]) { return(0); }\n' 2730 2731# ltmain only uses $CC for tagged configurations so make sure $CC is set. 2732_LT_AC_SYS_COMPILER 2733 2734# save warnings/boilerplate of simple test code 2735_LT_COMPILER_BOILERPLATE 2736_LT_LINKER_BOILERPLATE 2737 2738# Allow CC to be a program name with arguments. 2739lt_save_CC=$CC 2740lt_save_LD=$LD 2741lt_save_GCC=$GCC 2742GCC=$GXX 2743lt_save_with_gnu_ld=$with_gnu_ld 2744lt_save_path_LD=$lt_cv_path_LD 2745if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 2746 lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 2747else 2748 unset lt_cv_prog_gnu_ld 2749fi 2750if test -n "${lt_cv_path_LDCXX+set}"; then 2751 lt_cv_path_LD=$lt_cv_path_LDCXX 2752else 2753 unset lt_cv_path_LD 2754fi 2755test -z "${LDCXX+set}" || LD=$LDCXX 2756CC=${CXX-"c++"} 2757compiler=$CC 2758_LT_AC_TAGVAR(compiler, $1)=$CC 2759_LT_CC_BASENAME([$compiler]) 2760 2761# We don't want -fno-exception wen compiling C++ code, so set the 2762# no_builtin_flag separately 2763if test "$GXX" = yes; then 2764 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 2765else 2766 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 2767fi 2768 2769if test "$GXX" = yes; then 2770 # Set up default GNU C++ configuration 2771 2772 AC_PROG_LD 2773 2774 # Check if GNU C++ uses GNU ld as the underlying linker, since the 2775 # archiving commands below assume that GNU ld is being used. 2776 if test "$with_gnu_ld" = yes; then 2777 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 2778 _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' 2779 2780 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 2781 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 2782 2783 # If archive_cmds runs LD, not CC, wlarc should be empty 2784 # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 2785 # investigate it a little bit more. (MM) 2786 wlarc='${wl}' 2787 2788 # ancient GNU ld didn't support --whole-archive et. al. 2789 if eval "`$CC -print-prog-name=ld` --help 2>&1" | \ 2790 grep 'no-whole-archive' > /dev/null; then 2791 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 2792 else 2793 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 2794 fi 2795 else 2796 with_gnu_ld=no 2797 wlarc= 2798 2799 # A generic and very simple default shared library creation 2800 # command for GNU C++ for the case where it uses the native 2801 # linker, instead of GNU ld. If possible, this setting should 2802 # overridden to take advantage of the native linker features on 2803 # the platform it is being used on. 2804 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 2805 fi 2806 2807 # Commands to make compiler produce verbose output that lists 2808 # what "hidden" libraries, object files and flags are used when 2809 # linking a shared library. 2810 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' 2811 2812else 2813 GXX=no 2814 with_gnu_ld=no 2815 wlarc= 2816fi 2817 2818# PORTME: fill in a description of your system's C++ link characteristics 2819AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 2820_LT_AC_TAGVAR(ld_shlibs, $1)=yes 2821case $host_os in 2822 aix3*) 2823 # FIXME: insert proper C++ library support 2824 _LT_AC_TAGVAR(ld_shlibs, $1)=no 2825 ;; 2826 aix4* | aix5*) 2827 if test "$host_cpu" = ia64; then 2828 # On IA64, the linker does run time linking by default, so we don't 2829 # have to do anything special. 2830 aix_use_runtimelinking=no 2831 exp_sym_flag='-Bexport' 2832 no_entry_flag="" 2833 else 2834 aix_use_runtimelinking=no 2835 2836 # Test if we are trying to use run time linking or normal 2837 # AIX style linking. If -brtl is somewhere in LDFLAGS, we 2838 # need to do runtime linking. 2839 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*) 2840 for ld_flag in $LDFLAGS; do 2841 case $ld_flag in 2842 *-brtl*) 2843 aix_use_runtimelinking=yes 2844 break 2845 ;; 2846 esac 2847 done 2848 esac 2849 2850 exp_sym_flag='-bexport' 2851 no_entry_flag='-bnoentry' 2852 fi 2853 2854 # When large executables or shared objects are built, AIX ld can 2855 # have problems creating the table of contents. If linking a library 2856 # or program results in "error TOC overflow" add -mminimal-toc to 2857 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 2858 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 2859 2860 _LT_AC_TAGVAR(archive_cmds, $1)='' 2861 _LT_AC_TAGVAR(hardcode_direct, $1)=yes 2862 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' 2863 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 2864 2865 if test "$GXX" = yes; then 2866 case $host_os in aix4.[[012]]|aix4.[[012]].*) 2867 # We only want to do this on AIX 4.2 and lower, the check 2868 # below for broken collect2 doesn't work under 4.3+ 2869 collect2name=`${CC} -print-prog-name=collect2` 2870 if test -f "$collect2name" && \ 2871 strings "$collect2name" | grep resolve_lib_name >/dev/null 2872 then 2873 # We have reworked collect2 2874 _LT_AC_TAGVAR(hardcode_direct, $1)=yes 2875 else 2876 # We have old collect2 2877 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported 2878 # It fails to find uninstalled libraries when the uninstalled 2879 # path is not listed in the libpath. Setting hardcode_minus_L 2880 # to unsupported forces relinking 2881 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 2882 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 2883 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 2884 fi 2885 esac 2886 shared_flag='-shared' 2887 if test "$aix_use_runtimelinking" = yes; then 2888 shared_flag="$shared_flag "'${wl}-G' 2889 fi 2890 else 2891 # not using gcc 2892 if test "$host_cpu" = ia64; then 2893 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 2894 # chokes on -Wl,-G. The following line is correct: 2895 shared_flag='-G' 2896 else 2897 if test "$aix_use_runtimelinking" = yes; then 2898 shared_flag='${wl}-G' 2899 else 2900 shared_flag='${wl}-bM:SRE' 2901 fi 2902 fi 2903 fi 2904 2905 # It seems that -bexpall does not export symbols beginning with 2906 # underscore (_), so it is better to generate a list of symbols to export. 2907 _LT_AC_TAGVAR(always_export_symbols, $1)=yes 2908 if test "$aix_use_runtimelinking" = yes; then 2909 # Warning - without using the other runtime loading flags (-brtl), 2910 # -berok will link without error, but may produce a broken library. 2911 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' 2912 # Determine the default libpath from the value encoded in an empty executable. 2913 _LT_AC_SYS_LIBPATH_AIX 2914 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 2915 2916 _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" 2917 else 2918 if test "$host_cpu" = ia64; then 2919 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 2920 _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 2921 _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" 2922 else 2923 # Determine the default libpath from the value encoded in an empty executable. 2924 _LT_AC_SYS_LIBPATH_AIX 2925 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 2926 # Warning - without using the other run time loading flags, 2927 # -berok will link without error, but may produce a broken library. 2928 _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 2929 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 2930 # -bexpall does not export symbols beginning with underscore (_) 2931 _LT_AC_TAGVAR(always_export_symbols, $1)=yes 2932 # Exported symbols can be pulled into shared objects from archives 2933 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' ' 2934 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes 2935 # This is similar to how AIX traditionally builds its shared libraries. 2936 _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' 2937 fi 2938 fi 2939 ;; 2940 chorus*) 2941 case $cc_basename in 2942 *) 2943 # FIXME: insert proper C++ library support 2944 _LT_AC_TAGVAR(ld_shlibs, $1)=no 2945 ;; 2946 esac 2947 ;; 2948 2949 2950 cygwin* | mingw* | pw32*) 2951 # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 2952 # as there is no search path for DLLs. 2953 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 2954 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 2955 _LT_AC_TAGVAR(always_export_symbols, $1)=no 2956 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 2957 2958 if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then 2959 _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' 2960 # If the export-symbols file already is a .def file (1st line 2961 # is EXPORTS), use it as is; otherwise, prepend... 2962 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 2963 cp $export_symbols $output_objdir/$soname.def; 2964 else 2965 echo EXPORTS > $output_objdir/$soname.def; 2966 cat $export_symbols >> $output_objdir/$soname.def; 2967 fi~ 2968 $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' 2969 else 2970 _LT_AC_TAGVAR(ld_shlibs, $1)=no 2971 fi 2972 ;; 2973 darwin* | rhapsody*) 2974 case $host_os in 2975 rhapsody* | darwin1.[[012]]) 2976 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' 2977 ;; 2978 *) # Darwin 1.3 on 2979 if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then 2980 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' 2981 else 2982 case ${MACOSX_DEPLOYMENT_TARGET} in 2983 10.[[012]]) 2984 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' 2985 ;; 2986 10.*) 2987 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup' 2988 ;; 2989 esac 2990 fi 2991 ;; 2992 esac 2993 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 2994 _LT_AC_TAGVAR(hardcode_direct, $1)=no 2995 _LT_AC_TAGVAR(hardcode_automatic, $1)=yes 2996 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 2997 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' 2998 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 2999 3000 if test "$GXX" = yes ; then 3001 lt_int_apple_cc_single_mod=no 3002 output_verbose_link_cmd='echo' 3003 if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then 3004 lt_int_apple_cc_single_mod=yes 3005 fi 3006 if test "X$lt_int_apple_cc_single_mod" = Xyes ; then 3007 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' 3008 else 3009 _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' 3010 fi 3011 _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' 3012 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds 3013 if test "X$lt_int_apple_cc_single_mod" = Xyes ; then 3014 _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}' 3015 else 3016 _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}' 3017 fi 3018 _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}' 3019 else 3020 case $cc_basename in 3021 xlc*) 3022 output_verbose_link_cmd='echo' 3023 _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' 3024 _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' 3025 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds 3026 _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}' 3027 _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}' 3028 ;; 3029 *) 3030 _LT_AC_TAGVAR(ld_shlibs, $1)=no 3031 ;; 3032 esac 3033 fi 3034 ;; 3035 3036 dgux*) 3037 case $cc_basename in 3038 ec++*) 3039 # FIXME: insert proper C++ library support 3040 _LT_AC_TAGVAR(ld_shlibs, $1)=no 3041 ;; 3042 ghcx*) 3043 # Green Hills C++ Compiler 3044 # FIXME: insert proper C++ library support 3045 _LT_AC_TAGVAR(ld_shlibs, $1)=no 3046 ;; 3047 *) 3048 # FIXME: insert proper C++ library support 3049 _LT_AC_TAGVAR(ld_shlibs, $1)=no 3050 ;; 3051 esac 3052 ;; 3053 freebsd[[12]]*) 3054 # C++ shared libraries reported to be fairly broken before switch to ELF 3055 _LT_AC_TAGVAR(ld_shlibs, $1)=no 3056 ;; 3057 freebsd-elf*) 3058 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 3059 ;; 3060 freebsd* | kfreebsd*-gnu | dragonfly*) 3061 # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 3062 # conventions 3063 _LT_AC_TAGVAR(ld_shlibs, $1)=yes 3064 ;; 3065 gnu*) 3066 ;; 3067 hpux9*) 3068 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 3069 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 3070 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 3071 _LT_AC_TAGVAR(hardcode_direct, $1)=yes 3072 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 3073 # but as the default 3074 # location of the library. 3075 3076 case $cc_basename in 3077 CC*) 3078 # FIXME: insert proper C++ library support 3079 _LT_AC_TAGVAR(ld_shlibs, $1)=no 3080 ;; 3081 aCC*) 3082 _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' 3083 # Commands to make compiler produce verbose output that lists 3084 # what "hidden" libraries, object files and flags are used when 3085 # linking a shared library. 3086 # 3087 # There doesn't appear to be a way to prevent this compiler from 3088 # explicitly linking system object files so we need to strip them 3089 # from the output so that they don't get included in the library 3090 # dependencies. 3091 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' 3092 ;; 3093 *) 3094 if test "$GXX" = yes; then 3095 _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' 3096 else 3097 # FIXME: insert proper C++ library support 3098 _LT_AC_TAGVAR(ld_shlibs, $1)=no 3099 fi 3100 ;; 3101 esac 3102 ;; 3103 hpux10*|hpux11*) 3104 if test $with_gnu_ld = no; then 3105 case $host_cpu in 3106 hppa*64*) 3107 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 3108 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' 3109 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 3110 ;; 3111 ia64*) 3112 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 3113 ;; 3114 *) 3115 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 3116 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 3117 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 3118 ;; 3119 esac 3120 fi 3121 case $host_cpu in 3122 hppa*64*) 3123 _LT_AC_TAGVAR(hardcode_direct, $1)=no 3124 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 3125 ;; 3126 ia64*) 3127 _LT_AC_TAGVAR(hardcode_direct, $1)=no 3128 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 3129 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 3130 # but as the default 3131 # location of the library. 3132 ;; 3133 *) 3134 _LT_AC_TAGVAR(hardcode_direct, $1)=yes 3135 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 3136 # but as the default 3137 # location of the library. 3138 ;; 3139 esac 3140 3141 case $cc_basename in 3142 CC*) 3143 # FIXME: insert proper C++ library support 3144 _LT_AC_TAGVAR(ld_shlibs, $1)=no 3145 ;; 3146 aCC*) 3147 case $host_cpu in 3148 hppa*64*|ia64*) 3149 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs' 3150 ;; 3151 *) 3152 _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' 3153 ;; 3154 esac 3155 # Commands to make compiler produce verbose output that lists 3156 # what "hidden" libraries, object files and flags are used when 3157 # linking a shared library. 3158 # 3159 # There doesn't appear to be a way to prevent this compiler from 3160 # explicitly linking system object files so we need to strip them 3161 # from the output so that they don't get included in the library 3162 # dependencies. 3163 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' 3164 ;; 3165 *) 3166 if test "$GXX" = yes; then 3167 if test $with_gnu_ld = no; then 3168 case $host_cpu in 3169 ia64*|hppa*64*) 3170 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs' 3171 ;; 3172 *) 3173 _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' 3174 ;; 3175 esac 3176 fi 3177 else 3178 # FIXME: insert proper C++ library support 3179 _LT_AC_TAGVAR(ld_shlibs, $1)=no 3180 fi 3181 ;; 3182 esac 3183 ;; 3184 irix5* | irix6*) 3185 case $cc_basename in 3186 CC*) 3187 # SGI C++ 3188 _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' 3189 3190 # Archives containing C++ object files must be created using 3191 # "CC -ar", where "CC" is the IRIX C++ compiler. This is 3192 # necessary to make sure instantiated templates are included 3193 # in the archive. 3194 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 3195 ;; 3196 *) 3197 if test "$GXX" = yes; then 3198 if test "$with_gnu_ld" = no; then 3199 _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' 3200 else 3201 _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' 3202 fi 3203 fi 3204 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 3205 ;; 3206 esac 3207 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 3208 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 3209 ;; 3210 linux*) 3211 case $cc_basename in 3212 KCC*) 3213 # Kuck and Associates, Inc. (KAI) C++ Compiler 3214 3215 # KCC will only create a shared library if the output file 3216 # ends with ".so" (or ".sl" for HP-UX), so rename the library 3217 # to its proper name (with version) after linking. 3218 _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' 3219 _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' 3220 # Commands to make compiler produce verbose output that lists 3221 # what "hidden" libraries, object files and flags are used when 3222 # linking a shared library. 3223 # 3224 # There doesn't appear to be a way to prevent this compiler from 3225 # explicitly linking system object files so we need to strip them 3226 # from the output so that they don't get included in the library 3227 # dependencies. 3228 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' 3229 3230 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir' 3231 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 3232 3233 # Archives containing C++ object files must be created using 3234 # "CC -Bstatic", where "CC" is the KAI C++ compiler. 3235 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 3236 ;; 3237 icpc*) 3238 # Intel C++ 3239 with_gnu_ld=yes 3240 # version 8.0 and above of icpc choke on multiply defined symbols 3241 # if we add $predep_objects and $postdep_objects, however 7.1 and 3242 # earlier do not add the objects themselves. 3243 case `$CC -V 2>&1` in 3244 *"Version 7."*) 3245 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 3246 _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' 3247 ;; 3248 *) # Version 8.0 or newer 3249 tmp_idyn= 3250 case $host_cpu in 3251 ia64*) tmp_idyn=' -i_dynamic';; 3252 esac 3253 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 3254 _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' 3255 ;; 3256 esac 3257 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 3258 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 3259 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 3260 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 3261 ;; 3262 pgCC*) 3263 # Portland Group C++ compiler 3264 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 3265 _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' 3266 3267 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 3268 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 3269 _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' 3270 ;; 3271 cxx*) 3272 # Compaq C++ 3273 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 3274 _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' 3275 3276 runpath_var=LD_RUN_PATH 3277 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 3278 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 3279 3280 # Commands to make compiler produce verbose output that lists 3281 # what "hidden" libraries, object files and flags are used when 3282 # linking a shared library. 3283 # 3284 # There doesn't appear to be a way to prevent this compiler from 3285 # explicitly linking system object files so we need to strip them 3286 # from the output so that they don't get included in the library 3287 # dependencies. 3288 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' 3289 ;; 3290 esac 3291 ;; 3292 lynxos*) 3293 # FIXME: insert proper C++ library support 3294 _LT_AC_TAGVAR(ld_shlibs, $1)=no 3295 ;; 3296 m88k*) 3297 # FIXME: insert proper C++ library support 3298 _LT_AC_TAGVAR(ld_shlibs, $1)=no 3299 ;; 3300 mvs*) 3301 case $cc_basename in 3302 cxx*) 3303 # FIXME: insert proper C++ library support 3304 _LT_AC_TAGVAR(ld_shlibs, $1)=no 3305 ;; 3306 *) 3307 # FIXME: insert proper C++ library support 3308 _LT_AC_TAGVAR(ld_shlibs, $1)=no 3309 ;; 3310 esac 3311 ;; 3312 netbsd*) 3313 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then 3314 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 3315 wlarc= 3316 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 3317 _LT_AC_TAGVAR(hardcode_direct, $1)=yes 3318 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 3319 fi 3320 # Workaround some broken pre-1.5 toolchains 3321 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 3322 ;; 3323 openbsd2*) 3324 # C++ shared libraries are fairly broken 3325 _LT_AC_TAGVAR(ld_shlibs, $1)=no 3326 ;; 3327 openbsd*) 3328 _LT_AC_TAGVAR(hardcode_direct, $1)=yes 3329 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 3330 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 3331 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 3332 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 3333 _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' 3334 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 3335 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 3336 fi 3337 output_verbose_link_cmd='echo' 3338 ;; 3339 osf3*) 3340 case $cc_basename in 3341 KCC*) 3342 # Kuck and Associates, Inc. (KAI) C++ Compiler 3343 3344 # KCC will only create a shared library if the output file 3345 # ends with ".so" (or ".sl" for HP-UX), so rename the library 3346 # to its proper name (with version) after linking. 3347 _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' 3348 3349 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 3350 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 3351 3352 # Archives containing C++ object files must be created using 3353 # "CC -Bstatic", where "CC" is the KAI C++ compiler. 3354 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 3355 3356 ;; 3357 RCC*) 3358 # Rational C++ 2.4.1 3359 # FIXME: insert proper C++ library support 3360 _LT_AC_TAGVAR(ld_shlibs, $1)=no 3361 ;; 3362 cxx*) 3363 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 3364 _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' 3365 3366 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 3367 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 3368 3369 # Commands to make compiler produce verbose output that lists 3370 # what "hidden" libraries, object files and flags are used when 3371 # linking a shared library. 3372 # 3373 # There doesn't appear to be a way to prevent this compiler from 3374 # explicitly linking system object files so we need to strip them 3375 # from the output so that they don't get included in the library 3376 # dependencies. 3377 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' 3378 ;; 3379 *) 3380 if test "$GXX" = yes && test "$with_gnu_ld" = no; then 3381 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 3382 _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' 3383 3384 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 3385 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 3386 3387 # Commands to make compiler produce verbose output that lists 3388 # what "hidden" libraries, object files and flags are used when 3389 # linking a shared library. 3390 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' 3391 3392 else 3393 # FIXME: insert proper C++ library support 3394 _LT_AC_TAGVAR(ld_shlibs, $1)=no 3395 fi 3396 ;; 3397 esac 3398 ;; 3399 osf4* | osf5*) 3400 case $cc_basename in 3401 KCC*) 3402 # Kuck and Associates, Inc. (KAI) C++ Compiler 3403 3404 # KCC will only create a shared library if the output file 3405 # ends with ".so" (or ".sl" for HP-UX), so rename the library 3406 # to its proper name (with version) after linking. 3407 _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' 3408 3409 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 3410 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 3411 3412 # Archives containing C++ object files must be created using 3413 # the KAI C++ compiler. 3414 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' 3415 ;; 3416 RCC*) 3417 # Rational C++ 2.4.1 3418 # FIXME: insert proper C++ library support 3419 _LT_AC_TAGVAR(ld_shlibs, $1)=no 3420 ;; 3421 cxx*) 3422 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 3423 _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' 3424 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 3425 echo "-hidden">> $lib.exp~ 3426 $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~ 3427 $rm $lib.exp' 3428 3429 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 3430 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 3431 3432 # Commands to make compiler produce verbose output that lists 3433 # what "hidden" libraries, object files and flags are used when 3434 # linking a shared library. 3435 # 3436 # There doesn't appear to be a way to prevent this compiler from 3437 # explicitly linking system object files so we need to strip them 3438 # from the output so that they don't get included in the library 3439 # dependencies. 3440 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' 3441 ;; 3442 *) 3443 if test "$GXX" = yes && test "$with_gnu_ld" = no; then 3444 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 3445 _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' 3446 3447 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 3448 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 3449 3450 # Commands to make compiler produce verbose output that lists 3451 # what "hidden" libraries, object files and flags are used when 3452 # linking a shared library. 3453 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' 3454 3455 else 3456 # FIXME: insert proper C++ library support 3457 _LT_AC_TAGVAR(ld_shlibs, $1)=no 3458 fi 3459 ;; 3460 esac 3461 ;; 3462 psos*) 3463 # FIXME: insert proper C++ library support 3464 _LT_AC_TAGVAR(ld_shlibs, $1)=no 3465 ;; 3466 sco*) 3467 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 3468 case $cc_basename in 3469 CC*) 3470 # FIXME: insert proper C++ library support 3471 _LT_AC_TAGVAR(ld_shlibs, $1)=no 3472 ;; 3473 *) 3474 # FIXME: insert proper C++ library support 3475 _LT_AC_TAGVAR(ld_shlibs, $1)=no 3476 ;; 3477 esac 3478 ;; 3479 sunos4*) 3480 case $cc_basename in 3481 CC*) 3482 # Sun C++ 4.x 3483 # FIXME: insert proper C++ library support 3484 _LT_AC_TAGVAR(ld_shlibs, $1)=no 3485 ;; 3486 lcc*) 3487 # Lucid 3488 # FIXME: insert proper C++ library support 3489 _LT_AC_TAGVAR(ld_shlibs, $1)=no 3490 ;; 3491 *) 3492 # FIXME: insert proper C++ library support 3493 _LT_AC_TAGVAR(ld_shlibs, $1)=no 3494 ;; 3495 esac 3496 ;; 3497 solaris*) 3498 case $cc_basename in 3499 CC*) 3500 # Sun C++ 4.2, 5.x and Centerline C++ 3501 _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes 3502 _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' 3503 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 3504 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 3505 $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' 3506 3507 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 3508 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 3509 case $host_os in 3510 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 3511 *) 3512 # The C++ compiler is used as linker so we must use $wl 3513 # flag to pass the commands to the underlying system 3514 # linker. We must also pass each convience library through 3515 # to the system linker between allextract/defaultextract. 3516 # The C++ compiler will combine linker options so we 3517 # cannot just pass the convience library names through 3518 # without $wl. 3519 # Supported since Solaris 2.6 (maybe 2.5.1?) 3520 _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' 3521 ;; 3522 esac 3523 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 3524 3525 output_verbose_link_cmd='echo' 3526 3527 # Archives containing C++ object files must be created using 3528 # "CC -xar", where "CC" is the Sun C++ compiler. This is 3529 # necessary to make sure instantiated templates are included 3530 # in the archive. 3531 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 3532 ;; 3533 gcx*) 3534 # Green Hills C++ Compiler 3535 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 3536 3537 # The C++ compiler must be used to create the archive. 3538 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 3539 ;; 3540 *) 3541 # GNU C++ compiler with Solaris linker 3542 if test "$GXX" = yes && test "$with_gnu_ld" = no; then 3543 _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' 3544 if $CC --version | grep -v '^2\.7' > /dev/null; then 3545 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 3546 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 3547 $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' 3548 3549 # Commands to make compiler produce verbose output that lists 3550 # what "hidden" libraries, object files and flags are used when 3551 # linking a shared library. 3552 output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" 3553 else 3554 # g++ 2.7 appears to require `-G' NOT `-shared' on this 3555 # platform. 3556 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 3557 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 3558 $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' 3559 3560 # Commands to make compiler produce verbose output that lists 3561 # what "hidden" libraries, object files and flags are used when 3562 # linking a shared library. 3563 output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" 3564 fi 3565 3566 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' 3567 fi 3568 ;; 3569 esac 3570 ;; 3571 sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*) 3572 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 3573 ;; 3574 tandem*) 3575 case $cc_basename in 3576 NCC*) 3577 # NonStop-UX NCC 3.20 3578 # FIXME: insert proper C++ library support 3579 _LT_AC_TAGVAR(ld_shlibs, $1)=no 3580 ;; 3581 *) 3582 # FIXME: insert proper C++ library support 3583 _LT_AC_TAGVAR(ld_shlibs, $1)=no 3584 ;; 3585 esac 3586 ;; 3587 vxworks*) 3588 # FIXME: insert proper C++ library support 3589 _LT_AC_TAGVAR(ld_shlibs, $1)=no 3590 ;; 3591 *) 3592 # FIXME: insert proper C++ library support 3593 _LT_AC_TAGVAR(ld_shlibs, $1)=no 3594 ;; 3595esac 3596AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) 3597test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 3598 3599_LT_AC_TAGVAR(GCC, $1)="$GXX" 3600_LT_AC_TAGVAR(LD, $1)="$LD" 3601 3602## CAVEAT EMPTOR: 3603## There is no encapsulation within the following macros, do not change 3604## the running order or otherwise move them around unless you know exactly 3605## what you are doing... 3606AC_LIBTOOL_POSTDEP_PREDEP($1) 3607AC_LIBTOOL_PROG_COMPILER_PIC($1) 3608AC_LIBTOOL_PROG_CC_C_O($1) 3609AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) 3610AC_LIBTOOL_PROG_LD_SHLIBS($1) 3611AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) 3612AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) 3613AC_LIBTOOL_SYS_LIB_STRIP 3614AC_LIBTOOL_DLOPEN_SELF($1) 3615 3616AC_LIBTOOL_CONFIG($1) 3617 3618AC_LANG_POP 3619CC=$lt_save_CC 3620LDCXX=$LD 3621LD=$lt_save_LD 3622GCC=$lt_save_GCC 3623with_gnu_ldcxx=$with_gnu_ld 3624with_gnu_ld=$lt_save_with_gnu_ld 3625lt_cv_path_LDCXX=$lt_cv_path_LD 3626lt_cv_path_LD=$lt_save_path_LD 3627lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 3628lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 3629])# AC_LIBTOOL_LANG_CXX_CONFIG 3630 3631# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME]) 3632# ------------------------ 3633# Figure out "hidden" library dependencies from verbose 3634# compiler output when linking a shared library. 3635# Parse the compiler output and extract the necessary 3636# objects, libraries and library flags. 3637AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[ 3638dnl we can't use the lt_simple_compile_test_code here, 3639dnl because it contains code intended for an executable, 3640dnl not a library. It's possible we should let each 3641dnl tag define a new lt_????_link_test_code variable, 3642dnl but it's only used here... 3643ifelse([$1],[],[cat > conftest.$ac_ext <<EOF 3644int a; 3645void foo (void) { a = 0; } 3646EOF 3647],[$1],[CXX],[cat > conftest.$ac_ext <<EOF 3648class Foo 3649{ 3650public: 3651 Foo (void) { a = 0; } 3652private: 3653 int a; 3654}; 3655EOF 3656],[$1],[F77],[cat > conftest.$ac_ext <<EOF 3657 subroutine foo 3658 implicit none 3659 integer*4 a 3660 a=0 3661 return 3662 end 3663EOF 3664],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF 3665public class foo { 3666 private int a; 3667 public void bar (void) { 3668 a = 0; 3669 } 3670}; 3671EOF 3672]) 3673dnl Parse the compiler output and extract the necessary 3674dnl objects, libraries and library flags. 3675if AC_TRY_EVAL(ac_compile); then 3676 # Parse the compiler output and extract the necessary 3677 # objects, libraries and library flags. 3678 3679 # Sentinel used to keep track of whether or not we are before 3680 # the conftest object file. 3681 pre_test_object_deps_done=no 3682 3683 # The `*' in the case matches for architectures that use `case' in 3684 # $output_verbose_cmd can trigger glob expansion during the loop 3685 # eval without this substitution. 3686 output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"` 3687 3688 for p in `eval $output_verbose_link_cmd`; do 3689 case $p in 3690 3691 -L* | -R* | -l*) 3692 # Some compilers place space between "-{L,R}" and the path. 3693 # Remove the space. 3694 if test $p = "-L" \ 3695 || test $p = "-R"; then 3696 prev=$p 3697 continue 3698 else 3699 prev= 3700 fi 3701 3702 if test "$pre_test_object_deps_done" = no; then 3703 case $p in 3704 -L* | -R*) 3705 # Internal compiler library paths should come after those 3706 # provided the user. The postdeps already come after the 3707 # user supplied libs so there is no need to process them. 3708 if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then 3709 _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" 3710 else 3711 _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" 3712 fi 3713 ;; 3714 # The "-l" case would never come before the object being 3715 # linked, so don't bother handling this case. 3716 esac 3717 else 3718 if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then 3719 _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}" 3720 else 3721 _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}" 3722 fi 3723 fi 3724 ;; 3725 3726 *.$objext) 3727 # This assumes that the test object file only shows up 3728 # once in the compiler output. 3729 if test "$p" = "conftest.$objext"; then 3730 pre_test_object_deps_done=yes 3731 continue 3732 fi 3733 3734 if test "$pre_test_object_deps_done" = no; then 3735 if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then 3736 _LT_AC_TAGVAR(predep_objects, $1)="$p" 3737 else 3738 _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p" 3739 fi 3740 else 3741 if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then 3742 _LT_AC_TAGVAR(postdep_objects, $1)="$p" 3743 else 3744 _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p" 3745 fi 3746 fi 3747 ;; 3748 3749 *) ;; # Ignore the rest. 3750 3751 esac 3752 done 3753 3754 # Clean up. 3755 rm -f a.out a.exe 3756else 3757 echo "libtool.m4: error: problem compiling $1 test program" 3758fi 3759 3760$rm -f confest.$objext 3761 3762# PORTME: override above test on systems where it is broken 3763ifelse([$1],[CXX], 3764[case $host_os in 3765solaris*) 3766 case $cc_basename in 3767 CC*) 3768 # Adding this requires a known-good setup of shared libraries for 3769 # Sun compiler versions before 5.6, else PIC objects from an old 3770 # archive will be linked into the output, leading to subtle bugs. 3771 _LT_AC_TAGVAR(postdeps,$1)='-lCstd -lCrun' 3772 ;; 3773 esac 3774esac 3775]) 3776 3777case " $_LT_AC_TAGVAR(postdeps, $1) " in 3778*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;; 3779esac 3780])# AC_LIBTOOL_POSTDEP_PREDEP 3781 3782# AC_LIBTOOL_LANG_F77_CONFIG 3783# ------------------------ 3784# Ensure that the configuration vars for the C compiler are 3785# suitably defined. Those variables are subsequently used by 3786# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 3787AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)]) 3788AC_DEFUN([_LT_AC_LANG_F77_CONFIG], 3789[AC_REQUIRE([AC_PROG_F77]) 3790AC_LANG_PUSH(Fortran 77) 3791 3792_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 3793_LT_AC_TAGVAR(allow_undefined_flag, $1)= 3794_LT_AC_TAGVAR(always_export_symbols, $1)=no 3795_LT_AC_TAGVAR(archive_expsym_cmds, $1)= 3796_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= 3797_LT_AC_TAGVAR(hardcode_direct, $1)=no 3798_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= 3799_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 3800_LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 3801_LT_AC_TAGVAR(hardcode_minus_L, $1)=no 3802_LT_AC_TAGVAR(hardcode_automatic, $1)=no 3803_LT_AC_TAGVAR(module_cmds, $1)= 3804_LT_AC_TAGVAR(module_expsym_cmds, $1)= 3805_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown 3806_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 3807_LT_AC_TAGVAR(no_undefined_flag, $1)= 3808_LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 3809_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no 3810 3811# Source file extension for f77 test sources. 3812ac_ext=f 3813 3814# Object file extension for compiled f77 test sources. 3815objext=o 3816_LT_AC_TAGVAR(objext, $1)=$objext 3817 3818# Code to be used in simple compile tests 3819lt_simple_compile_test_code=" subroutine t\n return\n end\n" 3820 3821# Code to be used in simple link tests 3822lt_simple_link_test_code=" program t\n end\n" 3823 3824# ltmain only uses $CC for tagged configurations so make sure $CC is set. 3825_LT_AC_SYS_COMPILER 3826 3827# save warnings/boilerplate of simple test code 3828_LT_COMPILER_BOILERPLATE 3829_LT_LINKER_BOILERPLATE 3830 3831# Allow CC to be a program name with arguments. 3832lt_save_CC="$CC" 3833CC=${F77-"f77"} 3834compiler=$CC 3835_LT_AC_TAGVAR(compiler, $1)=$CC 3836_LT_CC_BASENAME([$compiler]) 3837 3838AC_MSG_CHECKING([if libtool supports shared libraries]) 3839AC_MSG_RESULT([$can_build_shared]) 3840 3841AC_MSG_CHECKING([whether to build shared libraries]) 3842test "$can_build_shared" = "no" && enable_shared=no 3843 3844# On AIX, shared libraries and static libraries use the same namespace, and 3845# are all built from PIC. 3846case $host_os in 3847aix3*) 3848 test "$enable_shared" = yes && enable_static=no 3849 if test -n "$RANLIB"; then 3850 archive_cmds="$archive_cmds~\$RANLIB \$lib" 3851 postinstall_cmds='$RANLIB $lib' 3852 fi 3853 ;; 3854aix4* | aix5*) 3855 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 3856 test "$enable_shared" = yes && enable_static=no 3857 fi 3858 ;; 3859esac 3860AC_MSG_RESULT([$enable_shared]) 3861 3862AC_MSG_CHECKING([whether to build static libraries]) 3863# Make sure either enable_shared or enable_static is yes. 3864test "$enable_shared" = yes || enable_static=yes 3865AC_MSG_RESULT([$enable_static]) 3866 3867test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 3868 3869_LT_AC_TAGVAR(GCC, $1)="$G77" 3870_LT_AC_TAGVAR(LD, $1)="$LD" 3871 3872AC_LIBTOOL_PROG_COMPILER_PIC($1) 3873AC_LIBTOOL_PROG_CC_C_O($1) 3874AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) 3875AC_LIBTOOL_PROG_LD_SHLIBS($1) 3876AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) 3877AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) 3878AC_LIBTOOL_SYS_LIB_STRIP 3879 3880 3881AC_LIBTOOL_CONFIG($1) 3882 3883AC_LANG_POP 3884CC="$lt_save_CC" 3885])# AC_LIBTOOL_LANG_F77_CONFIG 3886 3887 3888# AC_LIBTOOL_LANG_GCJ_CONFIG 3889# -------------------------- 3890# Ensure that the configuration vars for the C compiler are 3891# suitably defined. Those variables are subsequently used by 3892# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 3893AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)]) 3894AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG], 3895[AC_LANG_SAVE 3896 3897# Source file extension for Java test sources. 3898ac_ext=java 3899 3900# Object file extension for compiled Java test sources. 3901objext=o 3902_LT_AC_TAGVAR(objext, $1)=$objext 3903 3904# Code to be used in simple compile tests 3905lt_simple_compile_test_code="class foo {}\n" 3906 3907# Code to be used in simple link tests 3908lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }\n' 3909 3910# ltmain only uses $CC for tagged configurations so make sure $CC is set. 3911_LT_AC_SYS_COMPILER 3912 3913# save warnings/boilerplate of simple test code 3914_LT_COMPILER_BOILERPLATE 3915_LT_LINKER_BOILERPLATE 3916 3917# Allow CC to be a program name with arguments. 3918lt_save_CC="$CC" 3919CC=${GCJ-"gcj"} 3920compiler=$CC 3921_LT_AC_TAGVAR(compiler, $1)=$CC 3922_LT_CC_BASENAME([$compiler]) 3923 3924# GCJ did not exist at the time GCC didn't implicitly link libc in. 3925_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 3926 3927_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 3928 3929## CAVEAT EMPTOR: 3930## There is no encapsulation within the following macros, do not change 3931## the running order or otherwise move them around unless you know exactly 3932## what you are doing... 3933AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) 3934AC_LIBTOOL_PROG_COMPILER_PIC($1) 3935AC_LIBTOOL_PROG_CC_C_O($1) 3936AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) 3937AC_LIBTOOL_PROG_LD_SHLIBS($1) 3938AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) 3939AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) 3940AC_LIBTOOL_SYS_LIB_STRIP 3941AC_LIBTOOL_DLOPEN_SELF($1) 3942 3943AC_LIBTOOL_CONFIG($1) 3944 3945AC_LANG_RESTORE 3946CC="$lt_save_CC" 3947])# AC_LIBTOOL_LANG_GCJ_CONFIG 3948 3949 3950# AC_LIBTOOL_LANG_RC_CONFIG 3951# -------------------------- 3952# Ensure that the configuration vars for the Windows resource compiler are 3953# suitably defined. Those variables are subsequently used by 3954# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 3955AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)]) 3956AC_DEFUN([_LT_AC_LANG_RC_CONFIG], 3957[AC_LANG_SAVE 3958 3959# Source file extension for RC test sources. 3960ac_ext=rc 3961 3962# Object file extension for compiled RC test sources. 3963objext=o 3964_LT_AC_TAGVAR(objext, $1)=$objext 3965 3966# Code to be used in simple compile tests 3967lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n' 3968 3969# Code to be used in simple link tests 3970lt_simple_link_test_code="$lt_simple_compile_test_code" 3971 3972# ltmain only uses $CC for tagged configurations so make sure $CC is set. 3973_LT_AC_SYS_COMPILER 3974 3975# save warnings/boilerplate of simple test code 3976_LT_COMPILER_BOILERPLATE 3977_LT_LINKER_BOILERPLATE 3978 3979# Allow CC to be a program name with arguments. 3980lt_save_CC="$CC" 3981CC=${RC-"windres"} 3982compiler=$CC 3983_LT_AC_TAGVAR(compiler, $1)=$CC 3984_LT_CC_BASENAME([$compiler]) 3985_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 3986 3987AC_LIBTOOL_CONFIG($1) 3988 3989AC_LANG_RESTORE 3990CC="$lt_save_CC" 3991])# AC_LIBTOOL_LANG_RC_CONFIG 3992 3993 3994# AC_LIBTOOL_CONFIG([TAGNAME]) 3995# ---------------------------- 3996# If TAGNAME is not passed, then create an initial libtool script 3997# with a default configuration from the untagged config vars. Otherwise 3998# add code to config.status for appending the configuration named by 3999# TAGNAME from the matching tagged config vars. 4000AC_DEFUN([AC_LIBTOOL_CONFIG], 4001[# The else clause should only fire when bootstrapping the 4002# libtool distribution, otherwise you forgot to ship ltmain.sh 4003# with your package, and you will get complaints that there are 4004# no rules to generate ltmain.sh. 4005if test -f "$ltmain"; then 4006 # See if we are running on zsh, and set the options which allow our commands through 4007 # without removal of \ escapes. 4008 if test -n "${ZSH_VERSION+set}" ; then 4009 setopt NO_GLOB_SUBST 4010 fi 4011 # Now quote all the things that may contain metacharacters while being 4012 # careful not to overquote the AC_SUBSTed values. We take copies of the 4013 # variables and quote the copies for generation of the libtool script. 4014 for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \ 4015 SED SHELL STRIP \ 4016 libname_spec library_names_spec soname_spec extract_expsyms_cmds \ 4017 old_striplib striplib file_magic_cmd finish_cmds finish_eval \ 4018 deplibs_check_method reload_flag reload_cmds need_locks \ 4019 lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ 4020 lt_cv_sys_global_symbol_to_c_name_address \ 4021 sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ 4022 old_postinstall_cmds old_postuninstall_cmds \ 4023 _LT_AC_TAGVAR(compiler, $1) \ 4024 _LT_AC_TAGVAR(CC, $1) \ 4025 _LT_AC_TAGVAR(LD, $1) \ 4026 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \ 4027 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \ 4028 _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \ 4029 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \ 4030 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \ 4031 _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \ 4032 _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \ 4033 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \ 4034 _LT_AC_TAGVAR(old_archive_cmds, $1) \ 4035 _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \ 4036 _LT_AC_TAGVAR(predep_objects, $1) \ 4037 _LT_AC_TAGVAR(postdep_objects, $1) \ 4038 _LT_AC_TAGVAR(predeps, $1) \ 4039 _LT_AC_TAGVAR(postdeps, $1) \ 4040 _LT_AC_TAGVAR(compiler_lib_search_path, $1) \ 4041 _LT_AC_TAGVAR(archive_cmds, $1) \ 4042 _LT_AC_TAGVAR(archive_expsym_cmds, $1) \ 4043 _LT_AC_TAGVAR(postinstall_cmds, $1) \ 4044 _LT_AC_TAGVAR(postuninstall_cmds, $1) \ 4045 _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \ 4046 _LT_AC_TAGVAR(allow_undefined_flag, $1) \ 4047 _LT_AC_TAGVAR(no_undefined_flag, $1) \ 4048 _LT_AC_TAGVAR(export_symbols_cmds, $1) \ 4049 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \ 4050 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \ 4051 _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \ 4052 _LT_AC_TAGVAR(hardcode_automatic, $1) \ 4053 _LT_AC_TAGVAR(module_cmds, $1) \ 4054 _LT_AC_TAGVAR(module_expsym_cmds, $1) \ 4055 _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \ 4056 _LT_AC_TAGVAR(exclude_expsyms, $1) \ 4057 _LT_AC_TAGVAR(include_expsyms, $1); do 4058 4059 case $var in 4060 _LT_AC_TAGVAR(old_archive_cmds, $1) | \ 4061 _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \ 4062 _LT_AC_TAGVAR(archive_cmds, $1) | \ 4063 _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \ 4064 _LT_AC_TAGVAR(module_cmds, $1) | \ 4065 _LT_AC_TAGVAR(module_expsym_cmds, $1) | \ 4066 _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \ 4067 _LT_AC_TAGVAR(export_symbols_cmds, $1) | \ 4068 extract_expsyms_cmds | reload_cmds | finish_cmds | \ 4069 postinstall_cmds | postuninstall_cmds | \ 4070 old_postinstall_cmds | old_postuninstall_cmds | \ 4071 sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) 4072 # Double-quote double-evaled strings. 4073 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" 4074 ;; 4075 *) 4076 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" 4077 ;; 4078 esac 4079 done 4080 4081 case $lt_echo in 4082 *'\[$]0 --fallback-echo"') 4083 lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'` 4084 ;; 4085 esac 4086 4087ifelse([$1], [], 4088 [cfgfile="${ofile}T" 4089 trap "$rm \"$cfgfile\"; exit 1" 1 2 15 4090 $rm -f "$cfgfile" 4091 AC_MSG_NOTICE([creating $ofile])], 4092 [cfgfile="$ofile"]) 4093 4094 cat <<__EOF__ >> "$cfgfile" 4095ifelse([$1], [], 4096[#! $SHELL 4097 4098# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. 4099# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) 4100# NOTE: Changes made to this file will be lost: look at ltmain.sh. 4101# 4102# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 4103# Free Software Foundation, Inc. 4104# 4105# This file is part of GNU Libtool: 4106# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 4107# 4108# This program is free software; you can redistribute it and/or modify 4109# it under the terms of the GNU General Public License as published by 4110# the Free Software Foundation; either version 2 of the License, or 4111# (at your option) any later version. 4112# 4113# This program is distributed in the hope that it will be useful, but 4114# WITHOUT ANY WARRANTY; without even the implied warranty of 4115# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 4116# General Public License for more details. 4117# 4118# You should have received a copy of the GNU General Public License 4119# along with this program; if not, write to the Free Software 4120# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 4121# 4122# As a special exception to the GNU General Public License, if you 4123# distribute this file as part of a program that contains a 4124# configuration script generated by Autoconf, you may include it under 4125# the same distribution terms that you use for the rest of that program. 4126 4127# A sed program that does not truncate output. 4128SED=$lt_SED 4129 4130# Sed that helps us avoid accidentally triggering echo(1) options like -n. 4131Xsed="$SED -e 1s/^X//" 4132 4133# The HP-UX ksh and POSIX shell print the target directory to stdout 4134# if CDPATH is set. 4135(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 4136 4137# The names of the tagged configurations supported by this script. 4138available_tags= 4139 4140# ### BEGIN LIBTOOL CONFIG], 4141[# ### BEGIN LIBTOOL TAG CONFIG: $tagname]) 4142 4143# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 4144 4145# Shell to use when invoking shell scripts. 4146SHELL=$lt_SHELL 4147 4148# Whether or not to build shared libraries. 4149build_libtool_libs=$enable_shared 4150 4151# Whether or not to build static libraries. 4152build_old_libs=$enable_static 4153 4154# Whether or not to add -lc for building shared libraries. 4155build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1) 4156 4157# Whether or not to disallow shared libs when runtime libs are static 4158allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) 4159 4160# Whether or not to optimize for fast installation. 4161fast_install=$enable_fast_install 4162 4163# The host system. 4164host_alias=$host_alias 4165host=$host 4166host_os=$host_os 4167 4168# The build system. 4169build_alias=$build_alias 4170build=$build 4171build_os=$build_os 4172 4173# An echo program that does not interpret backslashes. 4174echo=$lt_echo 4175 4176# The archiver. 4177AR=$lt_AR 4178AR_FLAGS=$lt_AR_FLAGS 4179 4180# A C compiler. 4181LTCC=$lt_LTCC 4182 4183# A language-specific compiler. 4184CC=$lt_[]_LT_AC_TAGVAR(compiler, $1) 4185 4186# Is the compiler the GNU C compiler? 4187with_gcc=$_LT_AC_TAGVAR(GCC, $1) 4188 4189# An ERE matcher. 4190EGREP=$lt_EGREP 4191 4192# The linker used to build libraries. 4193LD=$lt_[]_LT_AC_TAGVAR(LD, $1) 4194 4195# Whether we need hard or soft links. 4196LN_S=$lt_LN_S 4197 4198# A BSD-compatible nm program. 4199NM=$lt_NM 4200 4201# A symbol stripping program 4202STRIP=$lt_STRIP 4203 4204# Used to examine libraries when file_magic_cmd begins "file" 4205MAGIC_CMD=$MAGIC_CMD 4206 4207# Used on cygwin: DLL creation program. 4208DLLTOOL="$DLLTOOL" 4209 4210# Used on cygwin: object dumper. 4211OBJDUMP="$OBJDUMP" 4212 4213# Used on cygwin: assembler. 4214AS="$AS" 4215 4216# The name of the directory that contains temporary libtool files. 4217objdir=$objdir 4218 4219# How to create reloadable object files. 4220reload_flag=$lt_reload_flag 4221reload_cmds=$lt_reload_cmds 4222 4223# How to pass a linker flag through the compiler. 4224wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) 4225 4226# Object file suffix (normally "o"). 4227objext="$ac_objext" 4228 4229# Old archive suffix (normally "a"). 4230libext="$libext" 4231 4232# Shared library suffix (normally ".so"). 4233shrext_cmds='$shrext_cmds' 4234 4235# Executable file suffix (normally ""). 4236exeext="$exeext" 4237 4238# Additional compiler flags for building library objects. 4239pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) 4240pic_mode=$pic_mode 4241 4242# What is the maximum length of a command? 4243max_cmd_len=$lt_cv_sys_max_cmd_len 4244 4245# Does compiler simultaneously support -c and -o options? 4246compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) 4247 4248# Must we lock files when doing compilation? 4249need_locks=$lt_need_locks 4250 4251# Do we need the lib prefix for modules? 4252need_lib_prefix=$need_lib_prefix 4253 4254# Do we need a version for libraries? 4255need_version=$need_version 4256 4257# Whether dlopen is supported. 4258dlopen_support=$enable_dlopen 4259 4260# Whether dlopen of programs is supported. 4261dlopen_self=$enable_dlopen_self 4262 4263# Whether dlopen of statically linked programs is supported. 4264dlopen_self_static=$enable_dlopen_self_static 4265 4266# Compiler flag to prevent dynamic linking. 4267link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1) 4268 4269# Compiler flag to turn off builtin functions. 4270no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) 4271 4272# Compiler flag to allow reflexive dlopens. 4273export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1) 4274 4275# Compiler flag to generate shared objects directly from archives. 4276whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1) 4277 4278# Compiler flag to generate thread-safe objects. 4279thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1) 4280 4281# Library versioning type. 4282version_type=$version_type 4283 4284# Format of library name prefix. 4285libname_spec=$lt_libname_spec 4286 4287# List of archive names. First name is the real one, the rest are links. 4288# The last name is the one that the linker finds with -lNAME. 4289library_names_spec=$lt_library_names_spec 4290 4291# The coded name of the library, if different from the real name. 4292soname_spec=$lt_soname_spec 4293 4294# Commands used to build and install an old-style archive. 4295RANLIB=$lt_RANLIB 4296old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1) 4297old_postinstall_cmds=$lt_old_postinstall_cmds 4298old_postuninstall_cmds=$lt_old_postuninstall_cmds 4299 4300# Create an old-style archive from a shared archive. 4301old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1) 4302 4303# Create a temporary old-style archive to link instead of a shared archive. 4304old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) 4305 4306# Commands used to build and install a shared archive. 4307archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1) 4308archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1) 4309postinstall_cmds=$lt_postinstall_cmds 4310postuninstall_cmds=$lt_postuninstall_cmds 4311 4312# Commands used to build a loadable module (assumed same as above if empty) 4313module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1) 4314module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1) 4315 4316# Commands to strip libraries. 4317old_striplib=$lt_old_striplib 4318striplib=$lt_striplib 4319 4320# Dependencies to place before the objects being linked to create a 4321# shared library. 4322predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1) 4323 4324# Dependencies to place after the objects being linked to create a 4325# shared library. 4326postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1) 4327 4328# Dependencies to place before the objects being linked to create a 4329# shared library. 4330predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1) 4331 4332# Dependencies to place after the objects being linked to create a 4333# shared library. 4334postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1) 4335 4336# The library search path used internally by the compiler when linking 4337# a shared library. 4338compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1) 4339 4340# Method to check whether dependent libraries are shared objects. 4341deplibs_check_method=$lt_deplibs_check_method 4342 4343# Command to use when deplibs_check_method == file_magic. 4344file_magic_cmd=$lt_file_magic_cmd 4345 4346# Flag that allows shared libraries with undefined symbols to be built. 4347allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1) 4348 4349# Flag that forces no undefined symbols. 4350no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1) 4351 4352# Commands used to finish a libtool library installation in a directory. 4353finish_cmds=$lt_finish_cmds 4354 4355# Same as above, but a single script fragment to be evaled but not shown. 4356finish_eval=$lt_finish_eval 4357 4358# Take the output of nm and produce a listing of raw symbols and C names. 4359global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe 4360 4361# Transform the output of nm in a proper C declaration 4362global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl 4363 4364# Transform the output of nm in a C name address pair 4365global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address 4366 4367# This is the shared library runtime path variable. 4368runpath_var=$runpath_var 4369 4370# This is the shared library path variable. 4371shlibpath_var=$shlibpath_var 4372 4373# Is shlibpath searched before the hard-coded library search path? 4374shlibpath_overrides_runpath=$shlibpath_overrides_runpath 4375 4376# How to hardcode a shared library path into an executable. 4377hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1) 4378 4379# Whether we should hardcode library paths into libraries. 4380hardcode_into_libs=$hardcode_into_libs 4381 4382# Flag to hardcode \$libdir into a binary during linking. 4383# This must work even if \$libdir does not exist. 4384hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) 4385 4386# If ld is used when linking, flag to hardcode \$libdir into 4387# a binary during linking. This must work even if \$libdir does 4388# not exist. 4389hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) 4390 4391# Whether we need a single -rpath flag with a separated argument. 4392hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1) 4393 4394# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the 4395# resulting binary. 4396hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1) 4397 4398# Set to yes if using the -LDIR flag during linking hardcodes DIR into the 4399# resulting binary. 4400hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1) 4401 4402# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into 4403# the resulting binary. 4404hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1) 4405 4406# Set to yes if building a shared library automatically hardcodes DIR into the library 4407# and all subsequent libraries and executables linked against it. 4408hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1) 4409 4410# Variables whose values should be saved in libtool wrapper scripts and 4411# restored at relink time. 4412variables_saved_for_relink="$variables_saved_for_relink" 4413 4414# Whether libtool must link a program against all its dependency libraries. 4415link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1) 4416 4417# Compile-time system search path for libraries 4418sys_lib_search_path_spec=$lt_sys_lib_search_path_spec 4419 4420# Run-time system search path for libraries 4421sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec 4422 4423# Fix the shell variable \$srcfile for the compiler. 4424fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)" 4425 4426# Set to yes if exported symbols are required. 4427always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1) 4428 4429# The commands to list exported symbols. 4430export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1) 4431 4432# The commands to extract the exported symbol list from a shared archive. 4433extract_expsyms_cmds=$lt_extract_expsyms_cmds 4434 4435# Symbols that should not be listed in the preloaded symbols. 4436exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1) 4437 4438# Symbols that must always be exported. 4439include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1) 4440 4441ifelse([$1],[], 4442[# ### END LIBTOOL CONFIG], 4443[# ### END LIBTOOL TAG CONFIG: $tagname]) 4444 4445__EOF__ 4446 4447ifelse([$1],[], [ 4448 case $host_os in 4449 aix3*) 4450 cat <<\EOF >> "$cfgfile" 4451 4452# AIX sometimes has problems with the GCC collect2 program. For some 4453# reason, if we set the COLLECT_NAMES environment variable, the problems 4454# vanish in a puff of smoke. 4455if test "X${COLLECT_NAMES+set}" != Xset; then 4456 COLLECT_NAMES= 4457 export COLLECT_NAMES 4458fi 4459EOF 4460 ;; 4461 esac 4462 4463 # We use sed instead of cat because bash on DJGPP gets confused if 4464 # if finds mixed CR/LF and LF-only lines. Since sed operates in 4465 # text mode, it properly converts lines to CR/LF. This bash problem 4466 # is reportedly fixed, but why not run on old versions too? 4467 sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1) 4468 4469 mv -f "$cfgfile" "$ofile" || \ 4470 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 4471 chmod +x "$ofile" 4472]) 4473else 4474 # If there is no Makefile yet, we rely on a make rule to execute 4475 # `config.status --recheck' to rerun these tests and create the 4476 # libtool script then. 4477 ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` 4478 if test -f "$ltmain_in"; then 4479 test -f Makefile && make "$ltmain" 4480 fi 4481fi 4482])# AC_LIBTOOL_CONFIG 4483 4484 4485# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME]) 4486# ------------------------------------------- 4487AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], 4488[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl 4489 4490_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 4491 4492if test "$GCC" = yes; then 4493 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 4494 4495 AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 4496 lt_cv_prog_compiler_rtti_exceptions, 4497 [-fno-rtti -fno-exceptions], [], 4498 [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 4499fi 4500])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI 4501 4502 4503# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE 4504# --------------------------------- 4505AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], 4506[AC_REQUIRE([AC_CANONICAL_HOST]) 4507AC_REQUIRE([AC_PROG_NM]) 4508AC_REQUIRE([AC_OBJEXT]) 4509# Check for command to grab the raw symbol name followed by C symbol from nm. 4510AC_MSG_CHECKING([command to parse $NM output from $compiler object]) 4511AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 4512[ 4513# These are sane defaults that work on at least a few old systems. 4514# [They come from Ultrix. What could be older than Ultrix?!! ;)] 4515 4516# Character class describing NM global symbol codes. 4517symcode='[[BCDEGRST]]' 4518 4519# Regexp to match symbols that can be accessed directly from C. 4520sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 4521 4522# Transform an extracted symbol line into a proper C declaration 4523lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'" 4524 4525# Transform an extracted symbol line into symbol name and symbol address 4526lt_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'" 4527 4528# Define system-specific variables. 4529case $host_os in 4530aix*) 4531 symcode='[[BCDT]]' 4532 ;; 4533cygwin* | mingw* | pw32*) 4534 symcode='[[ABCDGISTW]]' 4535 ;; 4536hpux*) # Its linker distinguishes data from code symbols 4537 if test "$host_cpu" = ia64; then 4538 symcode='[[ABCDEGRST]]' 4539 fi 4540 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 4541 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'" 4542 ;; 4543linux*) 4544 if test "$host_cpu" = ia64; then 4545 symcode='[[ABCDGIRSTW]]' 4546 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 4547 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'" 4548 fi 4549 ;; 4550irix* | nonstopux*) 4551 symcode='[[BCDEGRST]]' 4552 ;; 4553osf*) 4554 symcode='[[BCDEGQRST]]' 4555 ;; 4556solaris* | sysv5*) 4557 symcode='[[BDRT]]' 4558 ;; 4559sysv4) 4560 symcode='[[DFNSTU]]' 4561 ;; 4562esac 4563 4564# Handle CRLF in mingw tool chain 4565opt_cr= 4566case $build_os in 4567mingw*) 4568 opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp 4569 ;; 4570esac 4571 4572# If we're using GNU nm, then use its standard symbol codes. 4573case `$NM -V 2>&1` in 4574*GNU* | *'with BFD'*) 4575 symcode='[[ABCDGIRSTW]]' ;; 4576esac 4577 4578# Try without a prefix undercore, then with it. 4579for ac_symprfx in "" "_"; do 4580 4581 # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 4582 symxfrm="\\1 $ac_symprfx\\2 \\2" 4583 4584 # Write the raw and C identifiers. 4585 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 4586 4587 # Check to see that the pipe works correctly. 4588 pipe_works=no 4589 4590 rm -f conftest* 4591 cat > conftest.$ac_ext <<EOF 4592#ifdef __cplusplus 4593extern "C" { 4594#endif 4595char nm_test_var; 4596void nm_test_func(){} 4597#ifdef __cplusplus 4598} 4599#endif 4600int main(){nm_test_var='a';nm_test_func();return(0);} 4601EOF 4602 4603 if AC_TRY_EVAL(ac_compile); then 4604 # Now try to grab the symbols. 4605 nlist=conftest.nm 4606 if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then 4607 # Try sorting and uniquifying the output. 4608 if sort "$nlist" | uniq > "$nlist"T; then 4609 mv -f "$nlist"T "$nlist" 4610 else 4611 rm -f "$nlist"T 4612 fi 4613 4614 # Make sure that we snagged all the symbols we need. 4615 if grep ' nm_test_var$' "$nlist" >/dev/null; then 4616 if grep ' nm_test_func$' "$nlist" >/dev/null; then 4617 cat <<EOF > conftest.$ac_ext 4618#ifdef __cplusplus 4619extern "C" { 4620#endif 4621 4622EOF 4623 # Now generate the symbol file. 4624 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' 4625 4626 cat <<EOF >> conftest.$ac_ext 4627#if defined (__STDC__) && __STDC__ 4628# define lt_ptr_t void * 4629#else 4630# define lt_ptr_t char * 4631# define const 4632#endif 4633 4634/* The mapping between symbol names and symbols. */ 4635const struct { 4636 const char *name; 4637 lt_ptr_t address; 4638} 4639lt_preloaded_symbols[[]] = 4640{ 4641EOF 4642 $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext 4643 cat <<\EOF >> conftest.$ac_ext 4644 {0, (lt_ptr_t) 0} 4645}; 4646 4647#ifdef __cplusplus 4648} 4649#endif 4650EOF 4651 # Now try linking the two files. 4652 mv conftest.$ac_objext conftstm.$ac_objext 4653 lt_save_LIBS="$LIBS" 4654 lt_save_CFLAGS="$CFLAGS" 4655 LIBS="conftstm.$ac_objext" 4656 CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 4657 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then 4658 pipe_works=yes 4659 fi 4660 LIBS="$lt_save_LIBS" 4661 CFLAGS="$lt_save_CFLAGS" 4662 else 4663 echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 4664 fi 4665 else 4666 echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 4667 fi 4668 else 4669 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 4670 fi 4671 else 4672 echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 4673 cat conftest.$ac_ext >&5 4674 fi 4675 rm -f conftest* conftst* 4676 4677 # Do not use the global_symbol_pipe unless it works. 4678 if test "$pipe_works" = yes; then 4679 break 4680 else 4681 lt_cv_sys_global_symbol_pipe= 4682 fi 4683done 4684]) 4685if test -z "$lt_cv_sys_global_symbol_pipe"; then 4686 lt_cv_sys_global_symbol_to_cdecl= 4687fi 4688if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 4689 AC_MSG_RESULT(failed) 4690else 4691 AC_MSG_RESULT(ok) 4692fi 4693]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE 4694 4695 4696# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME]) 4697# --------------------------------------- 4698AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC], 4699[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)= 4700_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 4701_LT_AC_TAGVAR(lt_prog_compiler_static, $1)= 4702 4703AC_MSG_CHECKING([for $compiler option to produce PIC]) 4704 ifelse([$1],[CXX],[ 4705 # C++ specific cases for pic, static, wl, etc. 4706 if test "$GXX" = yes; then 4707 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4708 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' 4709 4710 case $host_os in 4711 aix*) 4712 # All AIX code is PIC. 4713 if test "$host_cpu" = ia64; then 4714 # AIX 5 now supports IA64 processor 4715 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4716 fi 4717 ;; 4718 amigaos*) 4719 # FIXME: we need at least 68020 code to build shared libraries, but 4720 # adding the `-m68020' flag to GCC prevents building anything better, 4721 # like `-m68040'. 4722 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 4723 ;; 4724 beos* | cygwin* | haiku* | irix5* | irix6* | nonstopux* | osf3* | osf4* \ 4725 | osf5*) 4726 # PIC is the default for these OSes. 4727 ;; 4728 mingw* | os2* | pw32*) 4729 # This hack is so that the source file can tell whether it is being 4730 # built for inclusion in a dll (and should export symbols for example). 4731 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' 4732 ;; 4733 darwin* | rhapsody*) 4734 # PIC is the default on this platform 4735 # Common symbols not allowed in MH_DYLIB files 4736 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 4737 ;; 4738 *djgpp*) 4739 # DJGPP does not support shared libraries at all 4740 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 4741 ;; 4742 sysv4*MP*) 4743 if test -d /usr/nec; then 4744 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 4745 fi 4746 ;; 4747 hpux*) 4748 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 4749 # not for PA HP-UX. 4750 case $host_cpu in 4751 hppa*64*|ia64*) 4752 ;; 4753 *) 4754 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4755 ;; 4756 esac 4757 ;; 4758 *) 4759 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4760 ;; 4761 esac 4762 else 4763 case $host_os in 4764 aix4* | aix5*) 4765 # All AIX code is PIC. 4766 if test "$host_cpu" = ia64; then 4767 # AIX 5 now supports IA64 processor 4768 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4769 else 4770 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 4771 fi 4772 ;; 4773 chorus*) 4774 case $cc_basename in 4775 cxch68*) 4776 # Green Hills C++ Compiler 4777 # _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" 4778 ;; 4779 esac 4780 ;; 4781 darwin*) 4782 # PIC is the default on this platform 4783 # Common symbols not allowed in MH_DYLIB files 4784 case $cc_basename in 4785 xlc*) 4786 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' 4787 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4788 ;; 4789 esac 4790 ;; 4791 dgux*) 4792 case $cc_basename in 4793 ec++*) 4794 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4795 ;; 4796 ghcx*) 4797 # Green Hills C++ Compiler 4798 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4799 ;; 4800 *) 4801 ;; 4802 esac 4803 ;; 4804 freebsd* | kfreebsd*-gnu | dragonfly*) 4805 # FreeBSD uses GNU C++ 4806 ;; 4807 hpux9* | hpux10* | hpux11*) 4808 case $cc_basename in 4809 CC*) 4810 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4811 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive" 4812 if test "$host_cpu" != ia64; then 4813 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 4814 fi 4815 ;; 4816 aCC*) 4817 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4818 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive" 4819 case $host_cpu in 4820 hppa*64*|ia64*) 4821 # +Z the default 4822 ;; 4823 *) 4824 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 4825 ;; 4826 esac 4827 ;; 4828 *) 4829 ;; 4830 esac 4831 ;; 4832 irix5* | irix6* | nonstopux*) 4833 case $cc_basename in 4834 CC*) 4835 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4836 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4837 # CC pic flag -KPIC is the default. 4838 ;; 4839 *) 4840 ;; 4841 esac 4842 ;; 4843 linux*) 4844 case $cc_basename in 4845 KCC*) 4846 # KAI C++ Compiler 4847 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 4848 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4849 ;; 4850 icpc* | ecpc*) 4851 # Intel C++ 4852 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4853 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4854 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' 4855 ;; 4856 pgCC*) 4857 # Portland Group C++ compiler. 4858 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4859 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 4860 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4861 ;; 4862 cxx*) 4863 # Compaq C++ 4864 # Make sure the PIC flag is empty. It appears that all Alpha 4865 # Linux and Compaq Tru64 Unix objects are PIC. 4866 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 4867 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4868 ;; 4869 *) 4870 ;; 4871 esac 4872 ;; 4873 lynxos*) 4874 ;; 4875 m88k*) 4876 ;; 4877 mvs*) 4878 case $cc_basename in 4879 cxx*) 4880 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 4881 ;; 4882 *) 4883 ;; 4884 esac 4885 ;; 4886 netbsd*) 4887 ;; 4888 osf3* | osf4* | osf5*) 4889 case $cc_basename in 4890 KCC*) 4891 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 4892 ;; 4893 RCC*) 4894 # Rational C++ 2.4.1 4895 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4896 ;; 4897 cxx*) 4898 # Digital/Compaq C++ 4899 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4900 # Make sure the PIC flag is empty. It appears that all Alpha 4901 # Linux and Compaq Tru64 Unix objects are PIC. 4902 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 4903 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4904 ;; 4905 *) 4906 ;; 4907 esac 4908 ;; 4909 psos*) 4910 ;; 4911 sco*) 4912 case $cc_basename in 4913 CC*) 4914 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4915 ;; 4916 *) 4917 ;; 4918 esac 4919 ;; 4920 solaris*) 4921 case $cc_basename in 4922 CC*) 4923 # Sun C++ 4.2, 5.x and Centerline C++ 4924 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4925 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4926 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 4927 ;; 4928 gcx*) 4929 # Green Hills C++ Compiler 4930 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 4931 ;; 4932 *) 4933 ;; 4934 esac 4935 ;; 4936 sunos4*) 4937 case $cc_basename in 4938 CC*) 4939 # Sun C++ 4.x 4940 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4941 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4942 ;; 4943 lcc*) 4944 # Lucid 4945 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4946 ;; 4947 *) 4948 ;; 4949 esac 4950 ;; 4951 tandem*) 4952 case $cc_basename in 4953 NCC*) 4954 # NonStop-UX NCC 3.20 4955 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4956 ;; 4957 *) 4958 ;; 4959 esac 4960 ;; 4961 unixware*) 4962 ;; 4963 vxworks*) 4964 ;; 4965 *) 4966 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4967 ;; 4968 esac 4969 fi 4970], 4971[ 4972 if test "$GCC" = yes; then 4973 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4974 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' 4975 4976 case $host_os in 4977 aix*) 4978 # All AIX code is PIC. 4979 if test "$host_cpu" = ia64; then 4980 # AIX 5 now supports IA64 processor 4981 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4982 fi 4983 ;; 4984 4985 amigaos*) 4986 # FIXME: we need at least 68020 code to build shared libraries, but 4987 # adding the `-m68020' flag to GCC prevents building anything better, 4988 # like `-m68040'. 4989 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 4990 ;; 4991 4992 beos* | cygwin* | haiku* | irix5* | irix6* | nonstopux* | osf3* | osf4* \ 4993 | osf5*) 4994 # PIC is the default for these OSes. 4995 ;; 4996 4997 mingw* | pw32* | os2*) 4998 # This hack is so that the source file can tell whether it is being 4999 # built for inclusion in a dll (and should export symbols for example). 5000 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' 5001 ;; 5002 5003 darwin* | rhapsody*) 5004 # PIC is the default on this platform 5005 # Common symbols not allowed in MH_DYLIB files 5006 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 5007 ;; 5008 5009 msdosdjgpp*) 5010 # Just because we use GCC doesn't mean we suddenly get shared libraries 5011 # on systems that don't support them. 5012 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 5013 enable_shared=no 5014 ;; 5015 5016 sysv4*MP*) 5017 if test -d /usr/nec; then 5018 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 5019 fi 5020 ;; 5021 5022 hpux*) 5023 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 5024 # not for PA HP-UX. 5025 case $host_cpu in 5026 hppa*64*|ia64*) 5027 # +Z the default 5028 ;; 5029 *) 5030 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5031 ;; 5032 esac 5033 ;; 5034 5035 *) 5036 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5037 ;; 5038 esac 5039 else 5040 # PORTME Check for flag to pass linker flags through the system compiler. 5041 case $host_os in 5042 aix*) 5043 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5044 if test "$host_cpu" = ia64; then 5045 # AIX 5 now supports IA64 processor 5046 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5047 else 5048 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 5049 fi 5050 ;; 5051 darwin*) 5052 # PIC is the default on this platform 5053 # Common symbols not allowed in MH_DYLIB files 5054 case $cc_basename in 5055 xlc*) 5056 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' 5057 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5058 ;; 5059 esac 5060 ;; 5061 5062 mingw* | pw32* | os2*) 5063 # This hack is so that the source file can tell whether it is being 5064 # built for inclusion in a dll (and should export symbols for example). 5065 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' 5066 ;; 5067 5068 hpux9* | hpux10* | hpux11*) 5069 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5070 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 5071 # not for PA HP-UX. 5072 case $host_cpu in 5073 hppa*64*|ia64*) 5074 # +Z the default 5075 ;; 5076 *) 5077 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 5078 ;; 5079 esac 5080 # Is there a better lt_prog_compiler_static that works with the bundled CC? 5081 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 5082 ;; 5083 5084 irix5* | irix6* | nonstopux*) 5085 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5086 # PIC (with -KPIC) is the default. 5087 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5088 ;; 5089 5090 newsos6) 5091 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5092 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5093 ;; 5094 5095 linux*) 5096 case $cc_basename in 5097 icc* | ecc*) 5098 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5099 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5100 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' 5101 ;; 5102 pgcc* | pgf77* | pgf90* | pgf95*) 5103 # Portland Group compilers (*not* the Pentium gcc compiler, 5104 # which looks to be a dead project) 5105 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5106 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 5107 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5108 ;; 5109 ccc*) 5110 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5111 # All Alpha code is PIC. 5112 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5113 ;; 5114 esac 5115 ;; 5116 5117 osf3* | osf4* | osf5*) 5118 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5119 # All OSF/1 code is PIC. 5120 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5121 ;; 5122 5123 sco3.2v5*) 5124 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kpic' 5125 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-dn' 5126 ;; 5127 5128 solaris*) 5129 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5130 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5131 case $cc_basename in 5132 f77* | f90* | f95*) 5133 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 5134 *) 5135 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 5136 esac 5137 ;; 5138 5139 sunos4*) 5140 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 5141 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 5142 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5143 ;; 5144 5145 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 5146 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5147 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5148 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5149 ;; 5150 5151 sysv4*MP*) 5152 if test -d /usr/nec ;then 5153 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 5154 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5155 fi 5156 ;; 5157 5158 unicos*) 5159 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5160 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 5161 ;; 5162 5163 uts4*) 5164 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 5165 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5166 ;; 5167 5168 *) 5169 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 5170 ;; 5171 esac 5172 fi 5173]) 5174AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)]) 5175 5176# 5177# Check to make sure the PIC flag actually works. 5178# 5179if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then 5180 AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works], 5181 _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1), 5182 [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [], 5183 [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in 5184 "" | " "*) ;; 5185 *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;; 5186 esac], 5187 [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 5188 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 5189fi 5190case $host_os in 5191 # For platforms which do not support PIC, -DPIC is meaningless: 5192 *djgpp*) 5193 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 5194 ;; 5195 *) 5196 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])" 5197 ;; 5198esac 5199]) 5200 5201 5202# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME]) 5203# ------------------------------------ 5204# See if the linker supports building shared libraries. 5205AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS], 5206[AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 5207ifelse([$1],[CXX],[ 5208 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 5209 case $host_os in 5210 aix4* | aix5*) 5211 # If we're using GNU nm, then we don't want the "-C" option. 5212 # -C means demangle to AIX nm, but means don't demangle with GNU nm 5213 if $NM -V 2>&1 | grep 'GNU' > /dev/null; then 5214 _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' 5215 else 5216 _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' 5217 fi 5218 ;; 5219 pw32*) 5220 _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" 5221 ;; 5222 cygwin* | mingw*) 5223 _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' 5224 ;; 5225 *) 5226 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 5227 ;; 5228 esac 5229],[ 5230 runpath_var= 5231 _LT_AC_TAGVAR(allow_undefined_flag, $1)= 5232 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no 5233 _LT_AC_TAGVAR(archive_cmds, $1)= 5234 _LT_AC_TAGVAR(archive_expsym_cmds, $1)= 5235 _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)= 5236 _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)= 5237 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= 5238 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 5239 _LT_AC_TAGVAR(thread_safe_flag_spec, $1)= 5240 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= 5241 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 5242 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 5243 _LT_AC_TAGVAR(hardcode_direct, $1)=no 5244 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no 5245 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 5246 _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown 5247 _LT_AC_TAGVAR(hardcode_automatic, $1)=no 5248 _LT_AC_TAGVAR(module_cmds, $1)= 5249 _LT_AC_TAGVAR(module_expsym_cmds, $1)= 5250 _LT_AC_TAGVAR(always_export_symbols, $1)=no 5251 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 5252 # include_expsyms should be a list of space-separated symbols to be *always* 5253 # included in the symbol list 5254 _LT_AC_TAGVAR(include_expsyms, $1)= 5255 # exclude_expsyms can be an extended regexp of symbols to exclude 5256 # it will be wrapped by ` (' and `)$', so one must not match beginning or 5257 # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', 5258 # as well as any symbol that contains `d'. 5259 _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_" 5260 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 5261 # platforms (ab)use it in PIC code, but their linkers get confused if 5262 # the symbol is explicitly referenced. Since portable code cannot 5263 # rely on this symbol name, it's probably fine to never include it in 5264 # preloaded symbol tables. 5265 extract_expsyms_cmds= 5266 # Just being paranoid about ensuring that cc_basename is set. 5267 _LT_CC_BASENAME([$compiler]) 5268 case $host_os in 5269 cygwin* | mingw* | pw32*) 5270 # FIXME: the MSVC++ port hasn't been tested in a loooong time 5271 # When not using gcc, we currently assume that we are using 5272 # Microsoft Visual C++. 5273 if test "$GCC" != yes; then 5274 with_gnu_ld=no 5275 fi 5276 ;; 5277 openbsd*) 5278 with_gnu_ld=no 5279 ;; 5280 esac 5281 5282 _LT_AC_TAGVAR(ld_shlibs, $1)=yes 5283 if test "$with_gnu_ld" = yes; then 5284 # If archive_cmds runs LD, not CC, wlarc should be empty 5285 wlarc='${wl}' 5286 5287 # Set some defaults for GNU ld with shared library support. These 5288 # are reset later if shared libraries are not supported. Putting them 5289 # here allows them to be overridden if necessary. 5290 runpath_var=LD_RUN_PATH 5291 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 5292 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 5293 # ancient GNU ld didn't support --whole-archive et. al. 5294 if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then 5295 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 5296 else 5297 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 5298 fi 5299 supports_anon_versioning=no 5300 case `$LD -v 2>/dev/null` in 5301 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 5302 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 5303 *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 5304 *\ 2.11.*) ;; # other 2.11 versions 5305 *) supports_anon_versioning=yes ;; 5306 esac 5307 5308 # See if GNU ld supports shared libraries. 5309 case $host_os in 5310 aix3* | aix4* | aix5*) 5311 # On AIX/PPC, the GNU linker is very broken 5312 if test "$host_cpu" != ia64; then 5313 _LT_AC_TAGVAR(ld_shlibs, $1)=no 5314 cat <<EOF 1>&2 5315 5316*** Warning: the GNU linker, at least up to release 2.9.1, is reported 5317*** to be unable to reliably create shared libraries on AIX. 5318*** Therefore, libtool is disabling shared libraries support. If you 5319*** really care for shared libraries, you may want to modify your PATH 5320*** so that a non-GNU linker is found, and then restart. 5321 5322EOF 5323 fi 5324 ;; 5325 5326 amigaos*) 5327 _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)' 5328 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5329 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 5330 5331 # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports 5332 # that the semantics of dynamic libraries on AmigaOS, at least up 5333 # to version 4, is to share data among multiple programs linked 5334 # with the same dynamic library. Since this doesn't match the 5335 # behavior of shared libraries on other platforms, we can't use 5336 # them. 5337 _LT_AC_TAGVAR(ld_shlibs, $1)=no 5338 ;; 5339 5340 beos*) 5341 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 5342 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 5343 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 5344 # support --undefined. This deserves some investigation. FIXME 5345 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5346 else 5347 _LT_AC_TAGVAR(ld_shlibs, $1)=no 5348 fi 5349 ;; 5350 5351 cygwin* | mingw* | pw32*) 5352 # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 5353 # as there is no search path for DLLs. 5354 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5355 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 5356 _LT_AC_TAGVAR(always_export_symbols, $1)=no 5357 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5358 _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' 5359 5360 if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then 5361 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' 5362 # If the export-symbols file already is a .def file (1st line 5363 # is EXPORTS), use it as is; otherwise, prepend... 5364 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 5365 cp $export_symbols $output_objdir/$soname.def; 5366 else 5367 echo EXPORTS > $output_objdir/$soname.def; 5368 cat $export_symbols >> $output_objdir/$soname.def; 5369 fi~ 5370 $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' 5371 else 5372 _LT_AC_TAGVAR(ld_shlibs, $1)=no 5373 fi 5374 ;; 5375 5376 haiku*) 5377 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 5378 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5379 ;; 5380 5381 linux*) 5382 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 5383 tmp_addflag= 5384 case $cc_basename,$host_cpu in 5385 pgcc*) # Portland Group C compiler 5386 _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' 5387 tmp_addflag=' $pic_flag' 5388 ;; 5389 pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers 5390 _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' 5391 tmp_addflag=' $pic_flag -Mnomain' ;; 5392 ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 5393 tmp_addflag=' -i_dynamic' ;; 5394 efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 5395 tmp_addflag=' -i_dynamic -nofor_main' ;; 5396 ifc* | ifort*) # Intel Fortran compiler 5397 tmp_addflag=' -nofor_main' ;; 5398 esac 5399 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5400 5401 if test $supports_anon_versioning = yes; then 5402 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~ 5403 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 5404 $echo "local: *; };" >> $output_objdir/$libname.ver~ 5405 $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 5406 fi 5407 else 5408 _LT_AC_TAGVAR(ld_shlibs, $1)=no 5409 fi 5410 ;; 5411 5412 netbsd*) 5413 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then 5414 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 5415 wlarc= 5416 else 5417 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5418 _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' 5419 fi 5420 ;; 5421 5422 solaris* | sysv5*) 5423 if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then 5424 _LT_AC_TAGVAR(ld_shlibs, $1)=no 5425 cat <<EOF 1>&2 5426 5427*** Warning: The releases 2.8.* of the GNU linker cannot reliably 5428*** create shared libraries on Solaris systems. Therefore, libtool 5429*** is disabling shared libraries support. We urge you to upgrade GNU 5430*** binutils to release 2.9.1 or newer. Another option is to modify 5431*** your PATH or compiler configuration so that the native linker is 5432*** used, and then restart. 5433 5434EOF 5435 elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 5436 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5437 _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' 5438 else 5439 _LT_AC_TAGVAR(ld_shlibs, $1)=no 5440 fi 5441 ;; 5442 5443 sunos4*) 5444 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 5445 wlarc= 5446 _LT_AC_TAGVAR(hardcode_direct, $1)=yes 5447 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 5448 ;; 5449 5450 *) 5451 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 5452 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5453 _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' 5454 else 5455 _LT_AC_TAGVAR(ld_shlibs, $1)=no 5456 fi 5457 ;; 5458 esac 5459 5460 if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then 5461 runpath_var= 5462 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= 5463 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= 5464 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 5465 fi 5466 else 5467 # PORTME fill in a description of your system's linker (not GNU ld) 5468 case $host_os in 5469 aix3*) 5470 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 5471 _LT_AC_TAGVAR(always_export_symbols, $1)=yes 5472 _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' 5473 # Note: this linker hardcodes the directories in LIBPATH if there 5474 # are no directories specified by -L. 5475 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 5476 if test "$GCC" = yes && test -z "$link_static_flag"; then 5477 # Neither direct hardcoding nor static linking is supported with a 5478 # broken collect2. 5479 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported 5480 fi 5481 ;; 5482 5483 aix4* | aix5*) 5484 if test "$host_cpu" = ia64; then 5485 # On IA64, the linker does run time linking by default, so we don't 5486 # have to do anything special. 5487 aix_use_runtimelinking=no 5488 exp_sym_flag='-Bexport' 5489 no_entry_flag="" 5490 else 5491 # If we're using GNU nm, then we don't want the "-C" option. 5492 # -C means demangle to AIX nm, but means don't demangle with GNU nm 5493 if $NM -V 2>&1 | grep 'GNU' > /dev/null; then 5494 _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' 5495 else 5496 _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' 5497 fi 5498 aix_use_runtimelinking=no 5499 5500 # Test if we are trying to use run time linking or normal 5501 # AIX style linking. If -brtl is somewhere in LDFLAGS, we 5502 # need to do runtime linking. 5503 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*) 5504 for ld_flag in $LDFLAGS; do 5505 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then 5506 aix_use_runtimelinking=yes 5507 break 5508 fi 5509 done 5510 esac 5511 5512 exp_sym_flag='-bexport' 5513 no_entry_flag='-bnoentry' 5514 fi 5515 5516 # When large executables or shared objects are built, AIX ld can 5517 # have problems creating the table of contents. If linking a library 5518 # or program results in "error TOC overflow" add -mminimal-toc to 5519 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 5520 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 5521 5522 _LT_AC_TAGVAR(archive_cmds, $1)='' 5523 _LT_AC_TAGVAR(hardcode_direct, $1)=yes 5524 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' 5525 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 5526 5527 if test "$GCC" = yes; then 5528 case $host_os in aix4.[[012]]|aix4.[[012]].*) 5529 # We only want to do this on AIX 4.2 and lower, the check 5530 # below for broken collect2 doesn't work under 4.3+ 5531 collect2name=`${CC} -print-prog-name=collect2` 5532 if test -f "$collect2name" && \ 5533 strings "$collect2name" | grep resolve_lib_name >/dev/null 5534 then 5535 # We have reworked collect2 5536 _LT_AC_TAGVAR(hardcode_direct, $1)=yes 5537 else 5538 # We have old collect2 5539 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported 5540 # It fails to find uninstalled libraries when the uninstalled 5541 # path is not listed in the libpath. Setting hardcode_minus_L 5542 # to unsupported forces relinking 5543 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 5544 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5545 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 5546 fi 5547 esac 5548 shared_flag='-shared' 5549 if test "$aix_use_runtimelinking" = yes; then 5550 shared_flag="$shared_flag "'${wl}-G' 5551 fi 5552 else 5553 # not using gcc 5554 if test "$host_cpu" = ia64; then 5555 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 5556 # chokes on -Wl,-G. The following line is correct: 5557 shared_flag='-G' 5558 else 5559 if test "$aix_use_runtimelinking" = yes; then 5560 shared_flag='${wl}-G' 5561 else 5562 shared_flag='${wl}-bM:SRE' 5563 fi 5564 fi 5565 fi 5566 5567 # It seems that -bexpall does not export symbols beginning with 5568 # underscore (_), so it is better to generate a list of symbols to export. 5569 _LT_AC_TAGVAR(always_export_symbols, $1)=yes 5570 if test "$aix_use_runtimelinking" = yes; then 5571 # Warning - without using the other runtime loading flags (-brtl), 5572 # -berok will link without error, but may produce a broken library. 5573 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' 5574 # Determine the default libpath from the value encoded in an empty executable. 5575 _LT_AC_SYS_LIBPATH_AIX 5576 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 5577 _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" 5578 else 5579 if test "$host_cpu" = ia64; then 5580 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 5581 _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 5582 _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" 5583 else 5584 # Determine the default libpath from the value encoded in an empty executable. 5585 _LT_AC_SYS_LIBPATH_AIX 5586 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 5587 # Warning - without using the other run time loading flags, 5588 # -berok will link without error, but may produce a broken library. 5589 _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 5590 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 5591 # -bexpall does not export symbols beginning with underscore (_) 5592 _LT_AC_TAGVAR(always_export_symbols, $1)=yes 5593 # Exported symbols can be pulled into shared objects from archives 5594 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' ' 5595 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes 5596 # This is similar to how AIX traditionally builds its shared libraries. 5597 _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' 5598 fi 5599 fi 5600 ;; 5601 5602 amigaos*) 5603 _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)' 5604 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5605 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 5606 # see comment about different semantics on the GNU ld section 5607 _LT_AC_TAGVAR(ld_shlibs, $1)=no 5608 ;; 5609 5610 bsdi[[45]]*) 5611 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 5612 ;; 5613 5614 cygwin* | mingw* | pw32*) 5615 # When not using gcc, we currently assume that we are using 5616 # Microsoft Visual C++. 5617 # hardcode_libdir_flag_spec is actually meaningless, as there is 5618 # no search path for DLLs. 5619 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 5620 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 5621 # Tell ltmain to make .lib files, not .a files. 5622 libext=lib 5623 # Tell ltmain to make .dll files, not .so files. 5624 shrext_cmds=".dll" 5625 # FIXME: Setting linknames here is a bad hack. 5626 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' 5627 # The linker will automatically build a .lib file if we build a DLL. 5628 _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true' 5629 # FIXME: Should let the user specify the lib program. 5630 _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs' 5631 _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' 5632 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5633 ;; 5634 5635 darwin* | rhapsody*) 5636 case $host_os in 5637 rhapsody* | darwin1.[[012]]) 5638 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' 5639 ;; 5640 *) # Darwin 1.3 on 5641 if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then 5642 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' 5643 else 5644 case ${MACOSX_DEPLOYMENT_TARGET} in 5645 10.[[012]]) 5646 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' 5647 ;; 5648 10.*) 5649 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup' 5650 ;; 5651 esac 5652 fi 5653 ;; 5654 esac 5655 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 5656 _LT_AC_TAGVAR(hardcode_direct, $1)=no 5657 _LT_AC_TAGVAR(hardcode_automatic, $1)=yes 5658 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 5659 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' 5660 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 5661 if test "$GCC" = yes ; then 5662 output_verbose_link_cmd='echo' 5663 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' 5664 _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' 5665 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds 5666 _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}' 5667 _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}' 5668 else 5669 case $cc_basename in 5670 xlc*) 5671 output_verbose_link_cmd='echo' 5672 _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' 5673 _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' 5674 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds 5675 _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}' 5676 _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}' 5677 ;; 5678 *) 5679 _LT_AC_TAGVAR(ld_shlibs, $1)=no 5680 ;; 5681 esac 5682 fi 5683 ;; 5684 5685 dgux*) 5686 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5687 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5688 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 5689 ;; 5690 5691 freebsd1*) 5692 _LT_AC_TAGVAR(ld_shlibs, $1)=no 5693 ;; 5694 5695 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 5696 # support. Future versions do this automatically, but an explicit c++rt0.o 5697 # does not break anything, and helps significantly (at the cost of a little 5698 # extra space). 5699 freebsd2.2*) 5700 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 5701 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5702 _LT_AC_TAGVAR(hardcode_direct, $1)=yes 5703 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 5704 ;; 5705 5706 # Unfortunately, older versions of FreeBSD 2 do not have this feature. 5707 freebsd2*) 5708 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 5709 _LT_AC_TAGVAR(hardcode_direct, $1)=yes 5710 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 5711 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 5712 ;; 5713 5714 # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 5715 freebsd* | kfreebsd*-gnu | dragonfly*) 5716 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' 5717 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5718 _LT_AC_TAGVAR(hardcode_direct, $1)=yes 5719 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 5720 ;; 5721 5722 hpux9*) 5723 if test "$GCC" = yes; then 5724 _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' 5725 else 5726 _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' 5727 fi 5728 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 5729 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 5730 _LT_AC_TAGVAR(hardcode_direct, $1)=yes 5731 5732 # hardcode_minus_L: Not really in the search PATH, 5733 # but as the default location of the library. 5734 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 5735 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 5736 ;; 5737 5738 hpux10* | hpux11*) 5739 if test "$GCC" = yes -a "$with_gnu_ld" = no; then 5740 case $host_cpu in 5741 hppa*64*|ia64*) 5742 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 5743 ;; 5744 *) 5745 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 5746 ;; 5747 esac 5748 else 5749 case $host_cpu in 5750 hppa*64*|ia64*) 5751 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags' 5752 ;; 5753 *) 5754 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 5755 ;; 5756 esac 5757 fi 5758 if test "$with_gnu_ld" = no; then 5759 case $host_cpu in 5760 hppa*64*) 5761 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 5762 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' 5763 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 5764 _LT_AC_TAGVAR(hardcode_direct, $1)=no 5765 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 5766 ;; 5767 ia64*) 5768 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5769 _LT_AC_TAGVAR(hardcode_direct, $1)=no 5770 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 5771 5772 # hardcode_minus_L: Not really in the search PATH, 5773 # but as the default location of the library. 5774 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 5775 ;; 5776 *) 5777 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 5778 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 5779 _LT_AC_TAGVAR(hardcode_direct, $1)=yes 5780 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 5781 5782 # hardcode_minus_L: Not really in the search PATH, 5783 # but as the default location of the library. 5784 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 5785 ;; 5786 esac 5787 fi 5788 ;; 5789 5790 irix5* | irix6* | nonstopux*) 5791 if test "$GCC" = yes; then 5792 _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' 5793 else 5794 _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' 5795 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' 5796 fi 5797 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 5798 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 5799 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 5800 ;; 5801 5802 netbsd*) 5803 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then 5804 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 5805 else 5806 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 5807 fi 5808 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5809 _LT_AC_TAGVAR(hardcode_direct, $1)=yes 5810 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 5811 ;; 5812 5813 newsos6) 5814 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5815 _LT_AC_TAGVAR(hardcode_direct, $1)=yes 5816 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 5817 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 5818 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 5819 ;; 5820 5821 openbsd*) 5822 _LT_AC_TAGVAR(hardcode_direct, $1)=yes 5823 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 5824 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 5825 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 5826 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' 5827 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 5828 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 5829 else 5830 case $host_os in 5831 openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) 5832 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 5833 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5834 ;; 5835 *) 5836 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 5837 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 5838 ;; 5839 esac 5840 fi 5841 ;; 5842 5843 os2*) 5844 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5845 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 5846 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 5847 _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' 5848 _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' 5849 ;; 5850 5851 osf3*) 5852 if test "$GCC" = yes; then 5853 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 5854 _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' 5855 else 5856 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 5857 _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' 5858 fi 5859 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 5860 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 5861 ;; 5862 5863 osf4* | osf5*) # as osf3* with the addition of -msym flag 5864 if test "$GCC" = yes; then 5865 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 5866 _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' 5867 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 5868 else 5869 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 5870 _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' 5871 _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~ 5872 $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' 5873 5874 # Both c and cxx compiler support -rpath directly 5875 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 5876 fi 5877 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 5878 ;; 5879 5880 sco3.2v5*) 5881 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5882 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 5883 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 5884 runpath_var=LD_RUN_PATH 5885 hardcode_runpath_var=yes 5886 ;; 5887 5888 solaris*) 5889 _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text' 5890 if test "$GCC" = yes; then 5891 wlarc='${wl}' 5892 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 5893 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 5894 $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' 5895 else 5896 wlarc='' 5897 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' 5898 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 5899 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' 5900 fi 5901 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5902 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 5903 case $host_os in 5904 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 5905 *) 5906 # The compiler driver will combine linker options so we 5907 # cannot just pass the convience library names through 5908 # without $wl, iff we do not link with $LD. 5909 # Luckily, gcc supports the same syntax we need for Sun Studio. 5910 # Supported since Solaris 2.6 (maybe 2.5.1?) 5911 case $wlarc in 5912 '') 5913 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; 5914 *) 5915 _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' ;; 5916 esac ;; 5917 esac 5918 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 5919 ;; 5920 5921 sunos4*) 5922 if test "x$host_vendor" = xsequent; then 5923 # Use $CC to link under sequent, because it throws in some extra .o 5924 # files that make .init and .fini sections work. 5925 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' 5926 else 5927 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 5928 fi 5929 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5930 _LT_AC_TAGVAR(hardcode_direct, $1)=yes 5931 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 5932 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 5933 ;; 5934 5935 sysv4) 5936 case $host_vendor in 5937 sni) 5938 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5939 _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 5940 ;; 5941 siemens) 5942 ## LD is ld it makes a PLAMLIB 5943 ## CC just makes a GrossModule. 5944 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 5945 _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 5946 _LT_AC_TAGVAR(hardcode_direct, $1)=no 5947 ;; 5948 motorola) 5949 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5950 _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 5951 ;; 5952 esac 5953 runpath_var='LD_RUN_PATH' 5954 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 5955 ;; 5956 5957 sysv4.3*) 5958 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5959 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 5960 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 5961 ;; 5962 5963 sysv4*MP*) 5964 if test -d /usr/nec; then 5965 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5966 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 5967 runpath_var=LD_RUN_PATH 5968 hardcode_runpath_var=yes 5969 _LT_AC_TAGVAR(ld_shlibs, $1)=yes 5970 fi 5971 ;; 5972 5973 sysv4.2uw2*) 5974 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 5975 _LT_AC_TAGVAR(hardcode_direct, $1)=yes 5976 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no 5977 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 5978 hardcode_runpath_var=yes 5979 runpath_var=LD_RUN_PATH 5980 ;; 5981 5982 sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*) 5983 _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z ${wl}text' 5984 if test "$GCC" = yes; then 5985 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 5986 else 5987 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 5988 fi 5989 runpath_var='LD_RUN_PATH' 5990 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 5991 ;; 5992 5993 sysv5*) 5994 _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text' 5995 # $CC -shared without GNU ld will not create a library from C++ 5996 # object files and a static libstdc++, better avoid it by now 5997 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' 5998 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 5999 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' 6000 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= 6001 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6002 runpath_var='LD_RUN_PATH' 6003 ;; 6004 6005 uts4*) 6006 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6007 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6008 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6009 ;; 6010 6011 *) 6012 _LT_AC_TAGVAR(ld_shlibs, $1)=no 6013 ;; 6014 esac 6015 fi 6016]) 6017AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) 6018test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 6019 6020variables_saved_for_relink="PATH $shlibpath_var $runpath_var" 6021if test "$GCC" = yes; then 6022 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 6023fi 6024 6025# 6026# Do we need to explicitly link libc? 6027# 6028case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in 6029x|xyes) 6030 # Assume -lc should be added 6031 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes 6032 6033 if test "$enable_shared" = yes && test "$GCC" = yes; then 6034 case $_LT_AC_TAGVAR(archive_cmds, $1) in 6035 *'~'*) 6036 # FIXME: we may have to deal with multi-command sequences. 6037 ;; 6038 '$CC '*) 6039 # Test whether the compiler implicitly links with -lc since on some 6040 # systems, -lgcc has to come before -lc. If gcc already passes -lc 6041 # to ld, don't add -lc before -lgcc. 6042 AC_MSG_CHECKING([whether -lc should be explicitly linked in]) 6043 $rm conftest* 6044 printf "$lt_simple_compile_test_code" > conftest.$ac_ext 6045 6046 if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 6047 soname=conftest 6048 lib=conftest 6049 libobjs=conftest.$ac_objext 6050 deplibs= 6051 wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) 6052 compiler_flags=-v 6053 linker_flags=-v 6054 verstring= 6055 output_objdir=. 6056 libname=conftest 6057 lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1) 6058 _LT_AC_TAGVAR(allow_undefined_flag, $1)= 6059 if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 6060 then 6061 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 6062 else 6063 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes 6064 fi 6065 _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 6066 else 6067 cat conftest.err 1>&5 6068 fi 6069 $rm conftest* 6070 AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)]) 6071 ;; 6072 esac 6073 fi 6074 ;; 6075esac 6076])# AC_LIBTOOL_PROG_LD_SHLIBS 6077 6078 6079# _LT_AC_FILE_LTDLL_C 6080# ------------------- 6081# Be careful that the start marker always follows a newline. 6082AC_DEFUN([_LT_AC_FILE_LTDLL_C], [ 6083# /* ltdll.c starts here */ 6084# #define WIN32_LEAN_AND_MEAN 6085# #include <windows.h> 6086# #undef WIN32_LEAN_AND_MEAN 6087# #include <stdio.h> 6088# 6089# #ifndef __CYGWIN__ 6090# # ifdef __CYGWIN32__ 6091# # define __CYGWIN__ __CYGWIN32__ 6092# # endif 6093# #endif 6094# 6095# #ifdef __cplusplus 6096# extern "C" { 6097# #endif 6098# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved); 6099# #ifdef __cplusplus 6100# } 6101# #endif 6102# 6103# #ifdef __CYGWIN__ 6104# #include <cygwin/cygwin_dll.h> 6105# DECLARE_CYGWIN_DLL( DllMain ); 6106# #endif 6107# HINSTANCE __hDllInstance_base; 6108# 6109# BOOL APIENTRY 6110# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved) 6111# { 6112# __hDllInstance_base = hInst; 6113# return TRUE; 6114# } 6115# /* ltdll.c ends here */ 6116])# _LT_AC_FILE_LTDLL_C 6117 6118 6119# _LT_AC_TAGVAR(VARNAME, [TAGNAME]) 6120# --------------------------------- 6121AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])]) 6122 6123 6124# old names 6125AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL]) 6126AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 6127AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 6128AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 6129AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 6130AC_DEFUN([AM_PROG_LD], [AC_PROG_LD]) 6131AC_DEFUN([AM_PROG_NM], [AC_PROG_NM]) 6132 6133# This is just to silence aclocal about the macro not being used 6134ifelse([AC_DISABLE_FAST_INSTALL]) 6135 6136AC_DEFUN([LT_AC_PROG_GCJ], 6137[AC_CHECK_TOOL(GCJ, gcj, no) 6138 test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" 6139 AC_SUBST(GCJFLAGS) 6140]) 6141 6142AC_DEFUN([LT_AC_PROG_RC], 6143[AC_CHECK_TOOL(RC, windres, no) 6144]) 6145 6146############################################################ 6147# NOTE: This macro has been submitted for inclusion into # 6148# GNU Autoconf as AC_PROG_SED. When it is available in # 6149# a released version of Autoconf we should remove this # 6150# macro and use it instead. # 6151############################################################ 6152# LT_AC_PROG_SED 6153# -------------- 6154# Check for a fully-functional sed program, that truncates 6155# as few characters as possible. Prefer GNU sed if found. 6156AC_DEFUN([LT_AC_PROG_SED], 6157[AC_MSG_CHECKING([for a sed that does not truncate output]) 6158AC_CACHE_VAL(lt_cv_path_SED, 6159[# Loop through the user's path and test for sed and gsed. 6160# Then use that list of sed's as ones to test for truncation. 6161as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 6162for as_dir in $PATH 6163do 6164 IFS=$as_save_IFS 6165 test -z "$as_dir" && as_dir=. 6166 for lt_ac_prog in sed gsed; do 6167 for ac_exec_ext in '' $ac_executable_extensions; do 6168 if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 6169 lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 6170 fi 6171 done 6172 done 6173done 6174lt_ac_max=0 6175lt_ac_count=0 6176# Add /usr/xpg4/bin/sed as it is typically found on Solaris 6177# along with /bin/sed that truncates output. 6178for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 6179 test ! -f $lt_ac_sed && continue 6180 cat /dev/null > conftest.in 6181 lt_ac_count=0 6182 echo $ECHO_N "0123456789$ECHO_C" >conftest.in 6183 # Check for GNU sed and select it if it is found. 6184 if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 6185 lt_cv_path_SED=$lt_ac_sed 6186 break 6187 fi 6188 while true; do 6189 cat conftest.in conftest.in >conftest.tmp 6190 mv conftest.tmp conftest.in 6191 cp conftest.in conftest.nl 6192 echo >>conftest.nl 6193 $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 6194 cmp -s conftest.out conftest.nl || break 6195 # 10000 chars as input seems more than enough 6196 test $lt_ac_count -gt 10 && break 6197 lt_ac_count=`expr $lt_ac_count + 1` 6198 if test $lt_ac_count -gt $lt_ac_max; then 6199 lt_ac_max=$lt_ac_count 6200 lt_cv_path_SED=$lt_ac_sed 6201 fi 6202 done 6203done 6204]) 6205SED=$lt_cv_path_SED 6206AC_MSG_RESULT([$SED]) 6207]) 6208