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