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