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