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