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