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