1#! /bin/sh 2 3# ltconfig - Create a system-specific libtool. 4# Copyright (C) 1996-1999 Free Software Foundation, Inc. 5# Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 6# 7# This file is free software; you can redistribute it and/or modify it 8# under the terms of the GNU General Public License as published by 9# the Free Software Foundation; either version 2 of the License, or 10# (at your option) any later version. 11# 12# This program is distributed in the hope that it will be useful, but 13# WITHOUT ANY WARRANTY; without even the implied warranty of 14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15# General Public License for more details. 16# 17# You should have received a copy of the GNU General Public License 18# along with this program; if not, write to the Free Software 19# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 20# 21# As a special exception to the GNU General Public License, if you 22# distribute this file as part of a program that contains a 23# configuration script generated by Autoconf, you may include it under 24# the same distribution terms that you use for the rest of that program. 25 26# A lot of this script is taken from autoconf-2.10. 27 28# Check that we are running under the correct shell. 29SHELL=${CONFIG_SHELL-/bin/sh} 30echo=echo 31if test "X$1" = X--no-reexec; then 32 # Discard the --no-reexec flag, and continue. 33 shift 34elif test "X$1" = X--fallback-echo; then 35 # used as fallback echo 36 shift 37 cat <<EOF 38$* 39EOF 40 exit 0 41elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then 42 # Yippee, $echo works! 43 : 44else 45 # Restart under the correct shell. 46 exec "$SHELL" "$0" --no-reexec ${1+"$@"} 47fi 48 49# Find the correct PATH separator. Usually this is `:', but 50# DJGPP uses `;' like DOS. 51if test "X${PATH_SEPARATOR+set}" != "Xset"; then 52 UNAME=${UNAME-`uname 2>/dev/null`} 53 case X$UNAME in 54 *-DOS) PATH_SEPARATOR=';' ;; 55 *) PATH_SEPARATOR=':' ;; 56 esac 57fi 58 59# The HP-UX ksh and POSIX shell print the target directory to stdout 60# if CDPATH is set. 61if test "${CDPATH+set}" = set; then CDPATH=; export CDPATH; fi 62 63if test "X${echo_test_string+set}" != "Xset"; then 64 # find a string as large as possible, as long as the shell can cope with it 65 for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do 66 # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... 67 if (echo_test_string="`eval $cmd`") 2>/dev/null && 68 echo_test_string="`eval $cmd`" && 69 (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null; then 70 break 71 fi 72 done 73fi 74 75if test "X`($echo '\t') 2>/dev/null`" != 'X\t' || 76 test "X`($echo "$echo_test_string") 2>/dev/null`" != X"$echo_test_string"; then 77 # The Solaris, AIX, and Digital Unix default echo programs unquote 78 # backslashes. This makes it impossible to quote backslashes using 79 # echo "$something" | sed 's/\\/\\\\/g' 80 # 81 # So, first we look for a working echo in the user's PATH. 82 83 IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}" 84 for dir in $PATH /usr/ucb; do 85 if test -f $dir/echo && 86 test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && 87 test "X`($dir/echo "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then 88 echo="$dir/echo" 89 break 90 fi 91 done 92 IFS="$save_ifs" 93 94 if test "X$echo" = Xecho; then 95 # We didn't find a better echo, so look for alternatives. 96 if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && 97 test "X`(print -r "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then 98 # This shell has a builtin print -r that does the trick. 99 echo='print -r' 100 elif test -f /bin/ksh && test "X$CONFIG_SHELL" != X/bin/ksh; then 101 # If we have ksh, try running ltconfig again with it. 102 ORIGINAL_CONFIG_SHELL="${CONFIG_SHELL-/bin/sh}" 103 export ORIGINAL_CONFIG_SHELL 104 CONFIG_SHELL=/bin/ksh 105 export CONFIG_SHELL 106 exec "$CONFIG_SHELL" "$0" --no-reexec ${1+"$@"} 107 else 108 # Try using printf. 109 echo='printf %s\n' 110 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && 111 test "X`($echo "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then 112 # Cool, printf works 113 : 114 elif test "X`("$ORIGINAL_CONFIG_SHELL" "$0" --fallback-echo '\t') 2>/dev/null`" = 'X\t' && 115 test "X`("$ORIGINAL_CONFIG_SHELL" "$0" --fallback-echo "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then 116 CONFIG_SHELL="$ORIGINAL_CONFIG_SHELL" 117 export CONFIG_SHELL 118 SHELL="$CONFIG_SHELL" 119 export SHELL 120 echo="$CONFIG_SHELL $0 --fallback-echo" 121 elif test "X`("$CONFIG_SHELL" "$0" --fallback-echo '\t') 2>/dev/null`" = 'X\t' && 122 test "X`("$CONFIG_SHELL" "$0" --fallback-echo "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then 123 echo="$CONFIG_SHELL $0 --fallback-echo" 124 else 125 # maybe with a smaller string... 126 prev=: 127 128 for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do 129 if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null; then 130 break 131 fi 132 prev="$cmd" 133 done 134 135 if test "$prev" != 'sed 50q "$0"'; then 136 echo_test_string=`eval $prev` 137 export echo_test_string 138 exec "${ORIGINAL_CONFIG_SHELL}" "$0" ${1+"$@"} 139 else 140 # Oops. We lost completely, so just stick with echo. 141 echo=echo 142 fi 143 fi 144 fi 145 fi 146fi 147 148# Sed substitution that helps us do robust quoting. It backslashifies 149# metacharacters that are still active within double-quoted strings. 150Xsed='sed -e s/^X//' 151sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g' 152 153# Same as above, but do not quote variable references. 154double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g' 155 156# The name of this program. 157progname=`$echo "X$0" | $Xsed -e 's%^.*/%%'` 158 159# Constants: 160PROGRAM=ltconfig 161PACKAGE=libtool 162VERSION=1.2e 163ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c 1>&5' 164ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.c $LIBS 1>&5' 165rm="rm -f" 166 167help="Try \`$progname --help' for more information." 168 169# Global variables: 170default_ofile=libtool 171can_build_shared=yes 172enable_shared=yes 173# All known linkers require a `.a' archive for static linking. 174enable_static=yes 175ltmain= 176silent= 177srcdir= 178ac_config_guess= 179ac_config_sub= 180host= 181nonopt= 182ofile="$default_ofile" 183verify_host=yes 184with_gcc=no 185with_gnu_ld=no 186need_locks=yes 187objext=o 188libext=a 189 190old_AR="$AR" 191old_CC="$CC" 192old_CFLAGS="$CFLAGS" 193old_CPPFLAGS="$CPPFLAGS" 194old_LD="$LD" 195old_LN_S="$LN_S" 196old_NM="$NM" 197old_RANLIB="$RANLIB" 198old_DLLTOOL="$DLLTOOL" 199old_AS="$AS" 200 201# Parse the command line options. 202args= 203prev= 204for option 205do 206 case "$option" in 207 -*=*) optarg=`echo "$option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; 208 *) optarg= ;; 209 esac 210 211 # If the previous option needs an argument, assign it. 212 if test -n "$prev"; then 213 eval "$prev=\$option" 214 prev= 215 continue 216 fi 217 218 case "$option" in 219 --help) cat <<EOM 220Usage: $progname [OPTION]... [HOST [LTMAIN]] 221 222Generate a system-specific libtool script. 223 224 --debug enable verbose shell tracing 225 --disable-shared do not build shared libraries 226 --disable-static do not build static libraries 227 --help display this help and exit 228 --no-verify do not verify that HOST is a valid host type 229-o, --output=FILE specify the output file [default=$default_ofile] 230 --quiet same as \`--silent' 231 --silent do not print informational messages 232 --srcdir=DIR find \`config.guess' in DIR 233 --version output version information and exit 234 --with-gcc assume that the GNU C compiler will be used 235 --with-gnu-ld assume that the C compiler uses the GNU linker 236 --disable-lock disable file locking 237 238LTMAIN is the \`ltmain.sh' shell script fragment or \`ltmain.c' program 239that provides basic libtool functionality. 240 241HOST is the canonical host system name [default=guessed]. 242EOM 243 exit 0 244 ;; 245 246 --debug) 247 echo "$progname: enabling shell trace mode" 248 set -x 249 ;; 250 251 --disable-shared) enable_shared=no ;; 252 253 --disable-static) enable_static=no ;; 254 255 --quiet | --silent) silent=yes ;; 256 257 --srcdir) prev=srcdir ;; 258 --srcdir=*) srcdir="$optarg" ;; 259 260 --no-verify) verify_host=no ;; 261 262 --output | -o) prev=ofile ;; 263 --output=*) ofile="$optarg" ;; 264 265 --version) echo "$PROGRAM (GNU $PACKAGE) $VERSION"; exit 0 ;; 266 267 --with-gcc) with_gcc=yes ;; 268 --with-gnu-ld) with_gnu_ld=yes ;; 269 270 --disable-lock) need_locks=no ;; 271 272 -*) 273 echo "$progname: unrecognized option \`$option'" 1>&2 274 echo "$help" 1>&2 275 exit 1 276 ;; 277 278 *) 279 if test -z "$ltmain"; then 280 ltmain="$option" 281 elif test -z "$host"; then 282# This generates an unnecessary warning for sparc-sun-solaris4.1.3_U1 283# if test -n "`echo $option| sed 's/[-a-z0-9.]//g'`"; then 284# echo "$progname: warning \`$option' is not a valid host type" 1>&2 285# fi 286 host="$option" 287 else 288 echo "$progname: too many arguments" 1>&2 289 echo "$help" 1>&2 290 exit 1 291 fi ;; 292 esac 293done 294 295if test -z "$ltmain"; then 296 echo "$progname: you must specify a LTMAIN file" 1>&2 297 echo "$help" 1>&2 298 exit 1 299fi 300 301if test ! -f "$ltmain"; then 302 echo "$progname: \`$ltmain' does not exist" 1>&2 303 echo "$help" 1>&2 304 exit 1 305fi 306 307# Quote any args containing shell metacharacters. 308ltconfig_args= 309for arg 310do 311 case "$arg" in 312 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) 313 ltconfig_args="$ltconfig_args '$arg'" ;; 314 *) ltconfig_args="$ltconfig_args $arg" ;; 315 esac 316done 317 318# A relevant subset of AC_INIT. 319 320# File descriptor usage: 321# 0 standard input 322# 1 file creation 323# 2 errors and warnings 324# 3 some systems may open it to /dev/tty 325# 4 used on the Kubota Titan 326# 5 compiler messages saved in config.log 327# 6 checking for... messages and results 328if test "$silent" = yes; then 329 exec 6>/dev/null 330else 331 exec 6>&1 332fi 333exec 5>>./config.log 334 335# NLS nuisances. 336# Only set LANG and LC_ALL to C if already set. 337# These must not be set unconditionally because not all systems understand 338# e.g. LANG=C (notably SCO). 339if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi 340if test "${LANG+set}" = set; then LANG=C; export LANG; fi 341 342if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then 343 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. 344 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then 345 ac_n= ac_c=' 346' ac_t=' ' 347 else 348 ac_n=-n ac_c= ac_t= 349 fi 350else 351 ac_n= ac_c='\c' ac_t= 352fi 353 354if test -z "$srcdir"; then 355 # Assume the source directory is the same one as the path to LTMAIN. 356 srcdir=`$echo "$ltmain" | $Xsed -e 's%/[^/]*$%%'` 357 test "$srcdir" = "$ltmain" && srcdir=. 358fi 359 360trap "$rm conftest*; exit 1" 1 2 15 361if test "$verify_host" = yes; then 362 # Check for config.guess and config.sub. 363 ac_aux_dir= 364 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do 365 if test -f $ac_dir/config.guess; then 366 ac_aux_dir=$ac_dir 367 break 368 fi 369 done 370 if test -z "$ac_aux_dir"; then 371 echo "$progname: cannot find config.guess in $srcdir $srcdir/.. $srcdir/../.." 1>&2 372 echo "$help" 1>&2 373 exit 1 374 fi 375 ac_config_guess=$ac_aux_dir/config.guess 376 ac_config_sub=$ac_aux_dir/config.sub 377 378 # Make sure we can run config.sub. 379 if $SHELL $ac_config_sub sun4 >/dev/null 2>&1; then : 380 else 381 echo "$progname: cannot run $ac_config_sub" 1>&2 382 echo "$help" 1>&2 383 exit 1 384 fi 385 386 echo $ac_n "checking host system type""... $ac_c" 1>&6 387 388 host_alias=$host 389 case "$host_alias" in 390 "") 391 if host_alias=`$SHELL $ac_config_guess`; then : 392 else 393 echo "$progname: cannot guess host type; you must specify one" 1>&2 394 echo "$help" 1>&2 395 exit 1 396 fi ;; 397 esac 398 host=`$SHELL $ac_config_sub $host_alias` 399 echo "$ac_t$host" 1>&6 400 401 # Make sure the host verified. 402 test -z "$host" && exit 1 403 404elif test -z "$host"; then 405 echo "$progname: you must specify a host type if you use \`--no-verify'" 1>&2 406 echo "$help" 1>&2 407 exit 1 408else 409 host_alias=$host 410fi 411 412# Transform linux* to *-*-linux-gnu*, to support old configure scripts. 413case "$host_os" in 414linux-gnu*) ;; 415linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'` 416esac 417 418host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` 419host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` 420host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` 421 422case "$host_os" in 423aix3*) 424 # AIX sometimes has problems with the GCC collect2 program. For some 425 # reason, if we set the COLLECT_NAMES environment variable, the problems 426 # vanish in a puff of smoke. 427 if test "${COLLECT_NAMES+set}" != set; then 428 COLLECT_NAMES= 429 export COLLECT_NAMES 430 fi 431 ;; 432esac 433 434# Determine commands to create old-style static archives. 435old_archive_cmds='$AR cru $oldlib$oldobjs' 436old_postinstall_cmds='chmod 644 $oldlib' 437old_postuninstall_cmds= 438 439# Set a sane default for `AR'. 440test -z "$AR" && AR=ar 441 442# If RANLIB is not set, then run the test. 443if test "${RANLIB+set}" != "set"; then 444 result=no 445 446 echo $ac_n "checking for ranlib... $ac_c" 1>&6 447 IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}" 448 for dir in $PATH; do 449 test -z "$dir" && dir=. 450 if test -f $dir/ranlib; then 451 RANLIB="ranlib" 452 result="ranlib" 453 break 454 fi 455 done 456 IFS="$save_ifs" 457 458 echo "$ac_t$result" 1>&6 459fi 460 461if test -n "$RANLIB"; then 462 old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" 463 old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds" 464fi 465 466# Set sane defaults for `DLLTOOL' and `AS', used on cygwin32. 467test -z "$DLLTOOL" && DLLTOOL=dlltool 468test -z "$AS" && AS=as 469 470# Check to see if we are using GCC. 471if test "$with_gcc" != yes || test -z "$CC"; then 472 # If CC is not set, then try to find GCC or a usable CC. 473 if test -z "$CC"; then 474 echo $ac_n "checking for gcc... $ac_c" 1>&6 475 IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}" 476 for dir in $PATH; do 477 IFS="$save_ifs" 478 test -z "$dir" && dir=. 479 if test -f $dir/gcc; then 480 CC="gcc" 481 break 482 fi 483 done 484 IFS="$save_ifs" 485 486 if test -n "$CC"; then 487 echo "$ac_t$CC" 1>&6 488 else 489 echo "$ac_t"no 1>&6 490 fi 491 fi 492 493 # Not "gcc", so try "cc", rejecting "/usr/ucb/cc". 494 if test -z "$CC"; then 495 echo $ac_n "checking for cc... $ac_c" 1>&6 496 IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}" 497 cc_rejected=no 498 for dir in $PATH; do 499 test -z "$dir" && dir=. 500 if test -f $dir/cc; then 501 if test "$dir/cc" = "/usr/ucb/cc"; then 502 cc_rejected=yes 503 continue 504 fi 505 CC="cc" 506 break 507 fi 508 done 509 IFS="$save_ifs" 510 if test $cc_rejected = yes; then 511 # We found a bogon in the path, so make sure we never use it. 512 set dummy $CC 513 shift 514 if test $# -gt 0; then 515 # We chose a different compiler from the bogus one. 516 # However, it has the same name, so the bogon will be chosen 517 # first if we set CC to just the name; use the full file name. 518 shift 519 set dummy "$dir/cc" "$@" 520 shift 521 CC="$@" 522 fi 523 fi 524 525 if test -n "$CC"; then 526 echo "$ac_t$CC" 1>&6 527 else 528 echo "$ac_t"no 1>&6 529 fi 530 531 if test -z "$CC"; then 532 echo "$progname: error: no acceptable cc found in \$PATH" 1>&2 533 exit 1 534 fi 535 fi 536 537 # Now see if the compiler is really GCC. 538 with_gcc=no 539 echo $ac_n "checking whether we are using GNU C... $ac_c" 1>&6 540 echo "$progname:540: checking whether we are using GNU C" >&5 541 542 $rm conftest.c 543 cat > conftest.c <<EOF 544#ifdef __GNUC__ 545 yes; 546#endif 547EOF 548 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo $progname:548: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then 549 with_gcc=yes 550 fi 551 $rm conftest.c 552 echo "$ac_t$with_gcc" 1>&6 553fi 554 555# Allow CC to be a program name with arguments. 556set dummy $CC 557compiler="$2" 558 559echo $ac_n "checking for object suffix... $ac_c" 1>&6 560$rm conftest* 561echo 'int i = 1;' > conftest.c 562echo "$progname:562: checking for object suffix" >& 5 563if { (eval echo $progname:563: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; }; then 564 # Append any warnings to the config.log. 565 cat conftest.err 1>&5 566 567 for ac_file in conftest.*; do 568 case $ac_file in 569 *.c) ;; 570 *) objext=`echo $ac_file | sed -e s/conftest.//` ;; 571 esac 572 done 573else 574 cat conftest.err 1>&5 575 echo "$progname: failed program was:" >&5 576 cat conftest.c >&5 577fi 578$rm conftest* 579echo "$ac_t$objext" 1>&6 580 581echo $ac_n "checking for $compiler option to produce PIC... $ac_c" 1>&6 582pic_flag= 583special_shlib_compile_flags= 584wl= 585link_static_flag= 586no_builtin_flag= 587 588if test "$with_gcc" = yes; then 589 wl='-Wl,' 590 link_static_flag='-static' 591 592 case "$host_os" in 593 beos* | irix5* | irix6* | osf3* | osf4*) 594 # PIC is the default for these OSes. 595 ;; 596 aix*) 597 # Below there is a dirty hack to force normal static linking with -ldl 598 # The problem is because libdl dynamically linked with both libc and 599 # libC (AIX C++ library), which obviously doesn't included in libraries 600 # list by gcc. This cause undefined symbols with -static flags. 601 # This hack allows C programs to be linked with "-static -ldl", but 602 # we not sure about C++ programs. 603 link_static_flag="$link_static_flag -Wl,-lC" 604 ;; 605 cygwin32* | mingw32* | os2*) 606 # We can build DLLs from non-PIC. 607 ;; 608 amigaos*) 609 # FIXME: we need at least 68020 code to build shared libraries, but 610 # adding the `-m68020' flag to GCC prevents building anything better, 611 # like `-m68040'. 612 pic_flag='-m68020 -resident32 -malways-restore-a4' 613 ;; 614 *) 615 pic_flag='-fPIC' 616 ;; 617 esac 618else 619 # PORTME Check for PIC flags for the system compiler. 620 case "$host_os" in 621 aix3* | aix4*) 622 # All AIX code is PIC. 623 link_static_flag='-bnso -bI:/lib/syscalls.exp' 624 ;; 625 626 hpux9* | hpux10* | hpux11*) 627 # Is there a better link_static_flag that works with the bundled CC? 628 wl='-Wl,' 629 link_static_flag="${wl}-a ${wl}archive" 630 pic_flag='+Z' 631 ;; 632 633 irix5* | irix6*) 634 wl='-Wl,' 635 link_static_flag='-non_shared' 636 # PIC (with -KPIC) is the default. 637 ;; 638 639 cygwin32* | mingw32* | os2*) 640 # We can build DLLs from non-PIC. 641 ;; 642 643 osf3* | osf4*) 644 # All OSF/1 code is PIC. 645 wl='-Wl,' 646 link_static_flag='-non_shared' 647 ;; 648 649 sco3.2v5*) 650 pic_flag='-Kpic' 651 link_static_flag='-dn' 652 special_shlib_compile_flags='-belf' 653 ;; 654 655 solaris*) 656 pic_flag='-KPIC' 657 link_static_flag='-Bstatic' 658 wl='-Wl,' 659 ;; 660 661 sunos4*) 662 pic_flag='-PIC' 663 link_static_flag='-Bstatic' 664 wl='-Qoption ld ' 665 ;; 666 667 sysv4.2uw2* | sysv5* | sysv4.3*) 668 pic_flag='-KPIC' 669 link_static_flag='-Bstatic' 670 wl='-Wl,' 671 ;; 672 673 uts4*) 674 pic_flag='-pic' 675 link_static_flag='-Bstatic' 676 ;; 677 678 *) 679 can_build_shared=no 680 ;; 681 esac 682fi 683 684if test -n "$pic_flag"; then 685 echo "$ac_t$pic_flag" 1>&6 686 687 # Check to make sure the pic_flag actually works. 688 echo $ac_n "checking if $compiler PIC flag $pic_flag works... $ac_c" 1>&6 689 $rm conftest* 690 echo "int some_variable = 0;" > conftest.c 691 save_CFLAGS="$CFLAGS" 692 CFLAGS="$CFLAGS $pic_flag -DPIC" 693 echo "$progname:693: checking if $compiler PIC flag $pic_flag works" >&5 694 if { (eval echo $progname:694: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.$objext; then 695 # Append any warnings to the config.log. 696 cat conftest.err 1>&5 697 698 case "$host_os" in 699 hpux9* | hpux10* | hpux11*) 700 # On HP-UX, both CC and GCC only warn that PIC is supported... then they 701 # create non-PIC objects. So, if there were any warnings, we assume that 702 # PIC is not supported. 703 if test -s conftest.err; then 704 echo "$ac_t"no 1>&6 705 can_build_shared=no 706 pic_flag= 707 else 708 echo "$ac_t"yes 1>&6 709 pic_flag=" $pic_flag" 710 fi 711 ;; 712 *) 713 echo "$ac_t"yes 1>&6 714 pic_flag=" $pic_flag" 715 ;; 716 esac 717 else 718 # Append any errors to the config.log. 719 cat conftest.err 1>&5 720 can_build_shared=no 721 pic_flag= 722 echo "$ac_t"no 1>&6 723 fi 724 CFLAGS="$save_CFLAGS" 725 $rm conftest* 726else 727 echo "$ac_t"none 1>&6 728fi 729 730# Check to see if options -o and -c are simultaneously supported by compiler 731echo $ac_n "checking if $compiler supports -c -o file.o... $ac_c" 1>&6 732$rm conftest* 733echo "int some_variable = 0;" > conftest.c 734save_CFLAGS="$CFLAGS" 735CFLAGS="$CFLAGS -c -o conftest2.o" 736echo "$progname:736: checking if $compiler supports -c -o file.o" >&5 737if { (eval echo $progname:737: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest2.o; then 738 739 # The compiler can only warn and ignore the option if not recognized 740 # So say no if there are warnings 741 if test -s conftest.err; then 742 echo "$ac_t"no 1>&6 743 compiler_c_o=no 744 else 745 echo "$ac_t"yes 1>&6 746 compiler_c_o=yes 747 fi 748else 749 # Append any errors to the config.log. 750 cat conftest.err 1>&5 751 compiler_c_o=no 752 echo "$ac_t"no 1>&6 753fi 754CFLAGS="$save_CFLAGS" 755$rm conftest* 756 757if test x"$compiler_c_o" = x"yes"; then 758 # Check to see if we can write to a .lo 759 echo $ac_n "checking if $compiler supports -c -o file.lo... $ac_c" 1>&6 760 $rm conftest* 761 echo "int some_variable = 0;" > conftest.c 762 save_CFLAGS="$CFLAGS" 763 CFLAGS="$CFLAGS -c -o conftest.lo" 764 echo "$progname:764: checking if $compiler supports -c -o file.lo" >&5 765if { (eval echo $progname:765: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.lo; then 766 767 # The compiler can only warn and ignore the option if not recognized 768 # So say no if there are warnings 769 if test -s conftest.err; then 770 echo "$ac_t"no 1>&6 771 compiler_o_lo=no 772 else 773 echo "$ac_t"yes 1>&6 774 compiler_o_lo=yes 775 fi 776 else 777 # Append any errors to the config.log. 778 cat conftest.err 1>&5 779 compiler_o_lo=no 780 echo "$ac_t"no 1>&6 781 fi 782 CFLAGS="$save_CFLAGS" 783 $rm conftest* 784else 785 compiler_o_lo=no 786fi 787 788# Check to see if we can do hard links to lock some files if needed 789hard_links="nottested" 790if test "$compiler_c_o" = no && test "$need_locks" != no; then 791 # do not overwrite the value of need_locks provided by the user 792 echo $ac_n "checking if we can lock with hard links... $ac_c" 1>&6 793 hard_links=yes 794 $rm conftest* 795 ln conftest.a conftest.b 2>/dev/null && hard_links=no 796 touch conftest.a 797 ln conftest.a conftest.b 2>&5 || hard_links=no 798 ln conftest.a conftest.b 2>/dev/null && hard_links=no 799 echo "$ac_t$hard_links" 1>&6 800 $rm conftest* 801 if test "$hard_links" = no; then 802 echo "*** WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2 803 need_locks=warn 804 fi 805else 806 need_locks=no 807fi 808 809if test "$with_gcc" = yes; then 810 # Check to see if options -fno-rtti -fno-exceptions are supported by compiler 811 echo $ac_n "checking if $compiler supports -fno-rtti -fno-exceptions ... $ac_c" 1>&6 812 $rm conftest* 813 echo "int some_variable = 0;" > conftest.c 814 save_CFLAGS="$CFLAGS" 815 CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.c" 816 echo "$progname:816: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 817 if { (eval echo $progname:817: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.o; then 818 819 # The compiler can only warn and ignore the option if not recognized 820 # So say no if there are warnings 821 if test -s conftest.err; then 822 echo "$ac_t"no 1>&6 823 compiler_rtti_exceptions=no 824 else 825 echo "$ac_t"yes 1>&6 826 compiler_rtti_exceptions=yes 827 fi 828 else 829 # Append any errors to the config.log. 830 cat conftest.err 1>&5 831 compiler_rtti_exceptions=no 832 echo "$ac_t"no 1>&6 833 fi 834 CFLAGS="$save_CFLAGS" 835 $rm conftest* 836 837 if test "$compiler_rtti_exceptions" = "yes"; then 838 no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions' 839 else 840 no_builtin_flag=' -fno-builtin' 841 fi 842 843fi 844 845# Check for any special shared library compilation flags. 846if test -n "$special_shlib_compile_flags"; then 847 echo "$progname: warning: \`$CC' requires \`$special_shlib_compile_flags' to build shared libraries" 1>&2 848 if echo "$old_CC $old_CFLAGS " | egrep -e "[ ]$special_shlib_compile_flags[ ]" >/dev/null; then : 849 else 850 echo "$progname: add \`$special_shlib_compile_flags' to the CC or CFLAGS env variable and reconfigure" 1>&2 851 can_build_shared=no 852 fi 853fi 854 855echo $ac_n "checking if $compiler static flag $link_static_flag works... $ac_c" 1>&6 856$rm conftest* 857echo 'main(){return(0);}' > conftest.c 858save_LDFLAGS="$LDFLAGS" 859LDFLAGS="$LDFLAGS $link_static_flag" 860echo "$progname:860: checking if $compiler static flag $link_static_flag works" >&5 861if { (eval echo $progname:861: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then 862 echo "$ac_t$link_static_flag" 1>&6 863else 864 echo "$ac_t"none 1>&6 865 link_static_flag= 866fi 867LDFLAGS="$save_LDFLAGS" 868$rm conftest* 869 870if test -z "$LN_S"; then 871 # Check to see if we can use ln -s, or we need hard links. 872 echo $ac_n "checking whether ln -s works... $ac_c" 1>&6 873 $rm conftestdata 874 if ln -s X conftestdata 2>/dev/null; then 875 $rm conftestdata 876 LN_S="ln -s" 877 else 878 LN_S=ln 879 fi 880 if test "$LN_S" = "ln -s"; then 881 echo "$ac_t"yes 1>&6 882 else 883 echo "$ac_t"no 1>&6 884 fi 885fi 886 887# Make sure LD is an absolute path. 888if test -z "$LD"; then 889 ac_prog=ld 890 if test "$with_gcc" = yes; then 891 # Check if gcc -print-prog-name=ld gives a path. 892 echo $ac_n "checking for ld used by GCC... $ac_c" 1>&6 893 echo "$progname:893: checking for ld used by GCC" >&5 894 ac_prog=`($CC -print-prog-name=ld) 2>&5` 895 case "$ac_prog" in 896 # Accept absolute paths. 897 /* | [A-Za-z]:/*) 898 re_direlt='/[^/][^/]*/\.\./' 899 sub_uncdrive='s%^\([A-Za-z]\):/%//\1/%' 900 # Canonicalize the path of ld 901 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do 902 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` 903 done 904 case "$host_os" in 905 cygwin*) 906 # Convert to a UNC path for cygwin 907 test -z "$LD" && LD=`echo X$ac_prog | $Xsed -e "$sub_uncdrive"` 908 ;; 909 *) 910 test -z "$LD" && LD="$ac_prog" 911 ;; 912 esac 913 ;; 914 ## 915 ## FIXME: The code fails later on if we try to use an $LD with 916 ## '\\' path separators. 917 ## 918 [A-Za-z]:[\\]*) 919 re_direlt='\\[^\\][^\\]*\\\.\.\(\\\)' 920 sub_uncdrive='s%^\([A-Za-z]\):\\%//\1/%' 921 sub_uncdir='s%\\%/%g' 922 # Canonicalize the path of ld 923 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do 924 ac_prog=`echo $ac_prog| sed "s%$re_direlt%\1%"` 925 done 926 case "$host_os" in 927 cygwin*) 928 # Convert to a UNC path for cygwin 929 test -z "$LD" && LD=`echo X$ac_prog | $Xsed -e "$sub_uncdrive" -e "$sub_uncdir"` 930 ;; 931 *) 932 test -z "$LD" && LD="$ac_prog" 933 ;; 934 esac 935 ;; 936 "") 937 # If it fails, then pretend we are not using GCC. 938 ac_prog=ld 939 ;; 940 *) 941 # If it is relative, then search for the first ld in PATH. 942 with_gnu_ld=unknown 943 ;; 944 esac 945 elif test "$with_gnu_ld" = yes; then 946 echo $ac_n "checking for GNU ld... $ac_c" 1>&6 947 echo "$progname:947: checking for GNU ld" >&5 948 else 949 echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6 950 echo "$progname:950: checking for non-GNU ld" >&5 951 fi 952 953 if test -z "$LD"; then 954 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}" 955 for ac_dir in $PATH; do 956 test -z "$ac_dir" && ac_dir=. 957 if test -f "$ac_dir/$ac_prog"; then 958 LD="$ac_dir/$ac_prog" 959 # Check to see if the program is GNU ld. I'd rather use --version, 960 # but apparently some GNU ld's only accept -v. 961 # Break only if it was the GNU/non-GNU ld that we prefer. 962 if "$LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then 963 test "$with_gnu_ld" != no && break 964 else 965 test "$with_gnu_ld" != yes && break 966 fi 967 fi 968 done 969 IFS="$ac_save_ifs" 970 fi 971 972 if test -n "$LD"; then 973 echo "$ac_t$LD" 1>&6 974 else 975 echo "$ac_t"no 1>&6 976 fi 977 978 if test -z "$LD"; then 979 echo "$progname: error: no acceptable ld found in \$PATH" 1>&2 980 exit 1 981 fi 982fi 983 984# Check to see if it really is or is not GNU ld. 985echo $ac_n "checking if the linker ($LD) is GNU ld... $ac_c" 1>&6 986# I'd rather use --version here, but apparently some GNU ld's only accept -v. 987if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then 988 with_gnu_ld=yes 989else 990 with_gnu_ld=no 991fi 992echo "$ac_t$with_gnu_ld" 1>&6 993 994# See if the linker supports building shared libraries. 995echo $ac_n "checking whether the linker ($LD) supports shared libraries... $ac_c" 1>&6 996 997allow_undefined_flag= 998no_undefined_flag= 999need_lib_prefix=yes 1000need_version=yes 1001archive_cmds= 1002archive_sym_cmds= 1003old_archive_from_new_cmds= 1004export_dynamic_flag_spec= 1005whole_archive_flag_spec= 1006hardcode_libdir_flag_spec= 1007hardcode_libdir_separator= 1008hardcode_direct=no 1009hardcode_minus_L=no 1010hardcode_shlibpath_var=unsupported 1011runpath_var= 1012 1013case "$host_os" in 1014aix3* | aix4*) 1015 # On AIX, the GNU linker works like the native linker. 1016 with_gnu_ld=no 1017 ;; 1018esac 1019 1020ld_shlibs=yes 1021if test "$with_gnu_ld" = yes; then 1022 1023 # See if GNU ld supports shared libraries. 1024 case "$host_os" in 1025 amigaos*) 1026 archive_cmds='$rm $objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $objdir/a2ixlibrary.data~$AR cru $lib $libobjs~$RANLIB $lib~(cd $objdir && a2ixlibrary -32)' 1027 hardcode_libdir_flag_spec='-L$libdir' 1028 hardcode_minus_L=yes 1029 ;; 1030 1031 sunos4*) 1032 archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs' 1033 hardcode_direct=yes 1034 hardcode_minus_L=yes 1035 hardcode_shlibpath_var=no 1036 ;; 1037 1038 beos*) 1039 if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then 1040 archive_cmds='$CC -nostart ${wl}-soname $wl$soname -o $lib $libobjs $deplibs' 1041 else 1042 ld_shlibs=no 1043 fi 1044 ;; 1045 1046 cygwin32* | mingw32*) 1047 if test "$with_gcc" = yes; then 1048 # hardcode_libdir_flag_spec is actually meaningless, as there is 1049 # no search path for DLLs. 1050 hardcode_libdir_flag_spec='-L$libdir' 1051 allow_undefined_flag=unsupported 1052 # Very, very bogus. 1053 1054 archive_cmds='rm -f $objdir/$soname-ltdll.c~ 1055 sed -e "/^# \/\* ltdll.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $0 > $objdir/$soname-ltdll.c~ 1056 (cd $objdir && $CC -c $soname-ltdll.c)~ 1057 echo EXPORTS > $objdir/$soname-def~ 1058 $DLLTOOL --export-all --output-def $objdir/$soname-def $objdir/$soname-ltdll.$objext $libobjs~ 1059 $CC -Wl,--base-file,$objdir/$soname-base -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $objdir/$soname-ltdll.$objext $libobjs $compile_dependencylibs~ 1060 $DLLTOOL --as=$AS --dllname $soname --exclude-symbol=_cygwin_dll_entry@12 --def $objdir/$soname-def --base-file $objdir/$soname-base --output-exp $objdir/$soname-exp~ 1061 $CC -Wl,--base-file,$objdir/$soname-base $objdir/$soname-exp -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $objdir/$soname-ltdll.$objext $libobjs $compile_dependencylibs~ 1062 $DLLTOOL --as=$AS --dllname $soname --exclude-symbol=_cygwin_dll_entry@12 --def $objdir/$soname-def --base-file $objdir/$soname-base --output-exp $objdir/$soname-exp~ 1063 $CC $objdir/$soname-exp -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $objdir/$soname-ltdll.$objext $libobjs $compile_dependencylibs' 1064 1065 archive_sym_cmds='rm -f $objdir/$soname-ltdll.c~ 1066 sed -e "/^# \/\* ltdll.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $0 > $objdir/$soname-ltdll.c~ 1067 (cd $objdir && $CC -c $soname-ltdll.c)~ 1068 echo EXPORTS > $objdir/$soname-def~ 1069 cat "$export_symbols" >> $objdir/$soname-def~ 1070 $CC -Wl,--base-file,$objdir/$soname-base -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $objdir/$soname-ltdll.$objext $libobjs $compile_dependencylibs~ 1071 $DLLTOOL --as=$AS --dllname $soname --exclude-symbol=_cygwin_dll_entry@12 --def $objdir/$soname-def --base-file $objdir/$soname-base --output-exp $objdir/$soname-exp~ 1072 $CC -Wl,--base-file,$objdir/$soname-base $objdir/$soname-exp -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $objdir/$soname-ltdll.$objext $libobjs $compile_dependencylibs~ 1073 $DLLTOOL --as=$AS --dllname $soname --exclude-symbol=_cygwin_dll_entry@12 --def $objdir/$soname-def --base-file $objdir/$soname-base --output-exp $objdir/$soname-exp~ 1074 $CC $objdir/$soname-exp -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $objdir/$soname-ltdll.$objext $libobjs $compile_dependencylibs' 1075 1076 old_archive_from_new_cmds='$DLLTOOL --as=$AS --dllname $soname --def $objdir/$soname-def --output-lib $objdir/$libname.a' 1077 else 1078 # When not using gcc, we currently assume that we are using 1079 # Microsoft Visual C++. 1080 with_gnu_ld=no 1081 # hardcode_libdir_flag_spec is actually meaningless, as there is 1082 # no search path for DLLs. 1083 hardcode_libdir_flag_spec=' ' 1084 allow_undefined_flag=unsupported 1085 # Tell ltmain to make .lib files, not .a files. 1086 libext=lib 1087 # FIXME: Setting linknames here is a bad hack. 1088 archive_cmds='$CC -o $lib $libobjs `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames=' 1089 # The linker will automatically build a .lib file if we build a DLL. 1090 old_archive_from_new_cmds='true' 1091 # FIXME: Should let the user specify the lib program. 1092 old_archive_cmds='lib /OUT:$oldlib$oldobjs' 1093 fix_srcfile_path='`cygpath -w $srcfile`' 1094 fi 1095 ;; 1096 1097 *) 1098 if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then 1099 archive_cmds='$CC -shared ${wl}-soname $wl$soname -o $lib $libobjs $deplibs' 1100 archive_sym_cmds='$CC -shared ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib $libobjs $deplibs' 1101 else 1102 ld_shlibs=no 1103 fi 1104 ;; 1105 esac 1106 1107 if test "$ld_shlibs" = yes && test "$with_gnu_ld" = yes; then 1108 runpath_var=LD_RUN_PATH 1109 hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir' 1110 export_dynamic_flag_spec='${wl}--export-dynamic' 1111 whole_archive_flag_spec='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 1112 fi 1113else 1114 # PORTME fill in a description of your system's linker (not GNU ld) 1115 case "$host_os" in 1116 aix3*) 1117 allow_undefined_flag=unsupported 1118 archive_cmds='$NM $libobjs | $global_symbol_pipe | sed '\''s/.* //'\' | sort | uniq' > $lib.exp~ 1119 $LD -o $objdir/$soname $libobjs $deplibs -bE:$lib.exp -T512 -H512 -bM:SRE~$AR cru $lib $objdir/$soname' 1120 archive_sym_cmds='$LD -o $objdir/$soname $libobjs $deplibs -bE:$export_symbols -T512 -H512 -bM:SRE~$AR cru $lib $objdir/$soname' 1121 # Note: this linker hardcodes the directories in LIBPATH if there 1122 # are no directories specified by -L. 1123 hardcode_minus_L=yes 1124 if test "$with_gcc" = yes && test -z "$link_static_flag"; then 1125 # Neither direct hardcoding nor static linking is supported with a 1126 # broken collect2. 1127 hardcode_direct=unsupported 1128 fi 1129 ;; 1130 1131 aix4*) 1132 allow_undefined_flag= 1133 if test "$with_gcc" = yes; then 1134 # collect2 in egcs and probably latest gcc has full support for 1135 # -shared flag, so we feel much better. 1136 archive_cmds='$CC -shared $thread_safe_flags -o $objdir/$soname $libobjs $deplibs' 1137 else 1138 archive_cmds='$NM $libobjs | $global_symbol_pipe | sed '\''s/.* //'\' | sort | uniq' > $lib.exp else cat $export_symbols > $lib.exp~ 1139 $CC -o $objdir/$soname $libobjs $deplibs ${wl}-bE:$lib.exp ${wl}-bM:SRE ${wl}-bnoentry' 1140 archive_sym_cmds='$CC -o $objdir/$soname $libobjs $deplibs ${wl}-bE:$export_symbols ${wl}-bM:SRE ${wl}-bnoentry' 1141 fi 1142 hardcode_direct=yes 1143 hardcode_minus_L=no 1144 # Though LIBPATH variable hardcodes shlibpath into executable, 1145 # it doesn't affect searching for -l* libraries; this confuses 1146 # tests in mdemo. 1147 hardcode_shlibpath_var=unsupported 1148 hardcode_libdir_flag_spec='-L$libdir' 1149 ;; 1150 1151 amigaos*) 1152 archive_cmds='$rm $objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $objdir/a2ixlibrary.data~$AR cru $lib $libobjs~$RANLIB $lib~(cd $objdir && a2ixlibrary -32)' 1153 hardcode_libdir_flag_spec='-L$libdir' 1154 hardcode_minus_L=yes 1155 ;; 1156 1157 cygwin32* | mingw32*) 1158 if test "$with_gcc" = yes; then 1159 # hardcode_libdir_flag_spec is actually meaningless, as there is 1160 # no search path for DLLs. 1161 hardcode_libdir_flag_spec='-L$libdir' 1162 allow_undefined_flag=unsupported 1163 # Very, very bogus. 1164 1165 archive_cmds='rm -f $objdir/$soname-ltdll.c~ 1166 sed -e "/^# \/\* ltdll.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $0 > $objdir/$soname-ltdll.c~ 1167 (cd $objdir && $CC -c $soname-ltdll.c)~ 1168 echo EXPORTS > $objdir/$soname-def~ 1169 $DLLTOOL --export-all --output-def $objdir/$soname-def $objdir/$soname-ltdll.$objext $libobjs~ 1170 $CC -Wl,--base-file,$objdir/$soname-base -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $objdir/$soname-ltdll.$objext $libobjs $compile_dependencylibs~ 1171 $DLLTOOL --as=$AS --dllname $soname --exclude-symbol=_cygwin_dll_entry@12 --def $objdir/$soname-def --base-file $objdir/$soname-base --output-exp $objdir/$soname-exp~ 1172 $CC -Wl,--base-file,$objdir/$soname-base $objdir/$soname-exp -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $objdir/$soname-ltdll.$objext $libobjs $compile_dependencylibs~ 1173 $DLLTOOL --as=$AS --dllname $soname --exclude-symbol=_cygwin_dll_entry@12 --def $objdir/$soname-def --base-file $objdir/$soname-base --output-exp $objdir/$soname-exp~ 1174 $CC $objdir/$soname-exp -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $objdir/$soname-ltdll.$objext $libobjs $compile_dependencylibs' 1175 1176 archive_sym_cmds='rm -f $objdir/$soname-ltdll.c~ 1177 sed -e "/^# \/\* ltdll.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $0 > $objdir/$soname-ltdll.c~ 1178 (cd $objdir && $CC -c $soname-ltdll.c)~ 1179 echo EXPORTS > $objdir/$soname-def~ 1180 cat "$export_symbols" >> $objdir/$soname-def~ 1181 $CC -Wl,--base-file,$objdir/$soname-base -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $objdir/$soname-ltdll.$objext $libobjs $compile_dependencylibs~ 1182 $DLLTOOL --as=$AS --dllname $soname --exclude-symbol=_cygwin_dll_entry@12 --def $objdir/$soname-def --base-file $objdir/$soname-base --output-exp $objdir/$soname-exp~ 1183 $CC -Wl,--base-file,$objdir/$soname-base $objdir/$soname-exp -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $objdir/$soname-ltdll.$objext $libobjs $compile_dependencylibs~ 1184 $DLLTOOL --as=$AS --dllname $soname --exclude-symbol=_cygwin_dll_entry@12 --def $objdir/$soname-def --base-file $objdir/$soname-base --output-exp $objdir/$soname-exp~ 1185 $CC $objdir/$soname-exp -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $objdir/$soname-ltdll.$objext $libobjs $compile_dependencylibs' 1186 1187 old_archive_from_new_cmds='$DLLTOOL --as=$AS --dllname $soname --def $objdir/$soname-def --output-lib $objdir/$libname.a' 1188 else 1189 # When not using gcc, we currently assume that we are using 1190 # Microsoft Visual C++. 1191 # hardcode_libdir_flag_spec is actually meaningless, as there is 1192 # no search path for DLLs. 1193 hardcode_libdir_flag_spec=' ' 1194 allow_undefined_flag=unsupported 1195 # Tell ltmain to make .lib files, not .a files. 1196 libext=lib 1197 # FIXME: Setting linknames here is a bad hack. 1198 archive_cmds='$CC -o $lib $libobjs `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames=' 1199 # The linker will automatically build a .lib file if we build a DLL. 1200 old_archive_from_new_cmds='true' 1201 # FIXME: Should let the user specify the lib program. 1202 old_archive_cmds='lib /OUT:$oldlib$oldobjs' 1203 fix_srcfile_path='`cygpath -w $srcfile`' 1204 fi 1205 ;; 1206 1207 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 1208 # support. Future versions do this automatically, but an explicit c++rt0.o 1209 # does not break anything, and helps significantly (at the cost of a little 1210 # extra space). 1211 freebsd2.2*) 1212 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs /usr/lib/c++rt0.o' 1213 hardcode_libdir_flag_spec='-R$libdir' 1214 hardcode_direct=yes 1215 hardcode_minus_L=yes 1216 hardcode_shlibpath_var=no 1217 ;; 1218 1219 # Unfortunately, older versions of FreeBSD 2 do not have this feature. 1220 freebsd2*) 1221 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs' 1222 hardcode_direct=yes 1223 hardcode_minus_L=yes 1224 hardcode_shlibpath_var=no 1225 ;; 1226 1227 # FreeBSD 3, at last, uses gcc -shared to do shared libraries. 1228 freebsd3*) 1229 archive_cmds='$CC -shared -o $lib $libobjs $deplibs' 1230 hardcode_libdir_flag_spec='-R$libdir' 1231 hardcode_direct=yes 1232 hardcode_minus_L=no 1233 hardcode_shlibpath_var=no 1234 ;; 1235 1236 hpux9*) 1237 archive_cmds='$rm $objdir/$soname~$LD -b +s +b $install_libdir -o $objdir/$soname $libobjs $deplibs~test $objdir/$soname = $lib || mv $objdir/$soname $lib' 1238 hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' 1239 hardcode_direct=yes 1240 hardcode_minus_L=yes 1241 export_dynamic_flag_spec='${wl}-E' 1242 ;; 1243 1244 hpux10* | hpux11*) 1245 archive_cmds='$LD -b +h $soname +s +b $install_libdir -o $lib $libobjs $deplibs' 1246 hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' 1247 hardcode_direct=yes 1248 hardcode_minus_L=yes 1249 export_dynamic_flag_spec='${wl}-E' 1250 ;; 1251 1252 irix5* | irix6*) 1253 if test "$with_gcc" = yes; then 1254 archive_cmds='$CC -shared -o $lib ${wl}-soname ${wl}$soname ${wl}-set_version ${wl}$verstring $libobjs $deplibs' 1255 else 1256 archive_cmds='$LD -shared -o $lib -soname $soname -set_version $verstring $libobjs $deplibs' 1257 fi 1258 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' 1259 ;; 1260 1261 netbsd*) 1262 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then 1263 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs' # a.out 1264 else 1265 archive_cmds='$LD -shared -o $lib $libobjs $deplibs' # ELF 1266 fi 1267 hardcode_libdir_flag_spec='${wl}-R$libdir' 1268 hardcode_direct=yes 1269 hardcode_shlibpath_var=no 1270 ;; 1271 1272 openbsd*) 1273 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs' 1274 hardcode_libdir_flag_spec='-R$libdir' 1275 hardcode_direct=yes 1276 hardcode_shlibpath_var=no 1277 ;; 1278 1279 os2*) 1280 hardcode_libdir_flag_spec='-L$libdir' 1281 hardcode_minus_L=yes 1282 allow_undefined_flag=unsupported 1283 archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $objdir/$libname.def~$echo DATA >> $objdir/$libname.def~$echo " SINGLE NONSHARED" >> $objdir/$libname.def~$echo EXPORTS >> $objdir/$libname.def~emxexp $libobjs >> $objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $objdir/$libname.def' 1284 old_archive_from_new_cmds='emximp -o $objdir/$libname.a $objdir/$libname.def' 1285 ;; 1286 1287 osf3* | osf4*) 1288 if test "$with_gcc" = yes; then 1289 allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' 1290 archive_cmds='$CC -shared${allow_undefined_flag} -o $lib ${wl}-soname ${wl}$soname ${wl}-set_version ${wl}$verstring $libobjs $deplibs' 1291 else 1292 allow_undefined_flag=' -expect_unresolved \*' 1293 archive_cmds='$LD -shared${allow_undefined_flag} -o $lib -soname $soname -set_version $verstring $libobjs $deplibs' 1294 fi 1295 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' 1296 hardcode_libdir_separator=: 1297 ;; 1298 1299 sco3.2v5*) 1300 archive_cmds='$LD -G -o $lib $libobjs $deplibs' 1301 hardcode_direct=yes 1302 ;; 1303 1304 solaris*) 1305 no_undefined_flag=' -z text' 1306 # $CC -shared without GNU ld will not create a library from C++ 1307 # object files and a static libstdc++, better avoid it by now 1308 archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs' 1309 archive_sym_cmds='$echo "{ global:" > $lib.exp~sed $export_symbols -e "s/.*/\1;/" >> $lib.exp~$echo "local: * }" >> $lib.exp~ 1310 $LD -G${allow_undefined_flag} -M $export_symbols -h $soname -o $lib $libobjs $deplibs~$rm $lib.exp' 1311 hardcode_libdir_flag_spec='-R$libdir' 1312 hardcode_shlibpath_var=no 1313 1314 # Solaris 2 before 2.5 hardcodes -L paths. 1315 case "$host_os" in 1316 solaris2.[0-4]*) 1317 hardcode_minus_L=yes 1318 ;; 1319 esac 1320 ;; 1321 1322 sunos4*) 1323 # Why do we need -Bstatic? To avoid inter-library dependencies, maybe... 1324 if test "$with_gcc" = yes; then 1325 archive_cmds='$CC -shared ${wl}-Bstatic -o $lib $libobjs $deplibs' 1326 else 1327 archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs' 1328 fi 1329 hardcode_libdir_flag_spec='-L$libdir' 1330 hardcode_direct=yes 1331 hardcode_minus_L=yes 1332 hardcode_shlibpath_var=no 1333 ;; 1334 1335 sysv4.3*) 1336 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs' 1337 hardcode_direct=no 1338 hardcode_minus_L=no 1339 hardcode_shlibpath_var=no 1340 export_dynamic_flag_spec='-Bexport' 1341 ;; 1342 1343 uts4*) 1344 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs' 1345 hardcode_libdir_flag_spec='-L$libdir' 1346 hardcode_direct=no 1347 hardcode_minus_L=no 1348 hardcode_shlibpath_var=no 1349 ;; 1350 1351 dgux*) 1352 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs' 1353 hardcode_libdir_flag_spec='-L$libdir' 1354 hardcode_direct=no 1355 hardcode_minus_L=no 1356 hardcode_shlibpath_var=no 1357 ;; 1358 1359 *) 1360 ld_shlibs=no 1361 can_build_shared=no 1362 ;; 1363 esac 1364fi 1365echo "$ac_t$ld_shlibs" 1>&6 1366 1367if test -z "$NM"; then 1368 echo $ac_n "checking for BSD-compatible nm... $ac_c" 1>&6 1369 case "$NM" in 1370 /* | [A-Za-z]:[/\\]*) ;; # Let the user override the test with a path. 1371 *) 1372 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}" 1373 for ac_dir in $PATH /usr/ucb /usr/ccs/bin /bin; do 1374 test -z "$ac_dir" && ac_dir=. 1375 if test -f $ac_dir/nm; then 1376 # Check to see if the nm accepts a BSD-compat flag. 1377 # Adding the `sed 1q' prevents false positives on HP-UX, which says: 1378 # nm: unknown option "B" ignored 1379 if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then 1380 NM="$ac_dir/nm -B" 1381 break 1382 elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then 1383 NM="$ac_dir/nm -p" 1384 break 1385 else 1386 NM=${NM="$ac_dir/nm"} # keep the first match, but 1387 continue # so that we can try to find one that supports BSD flags 1388 fi 1389 fi 1390 done 1391 IFS="$ac_save_ifs" 1392 test -z "$NM" && NM=nm 1393 ;; 1394 esac 1395 echo "$ac_t$NM" 1>&6 1396fi 1397 1398# Check for command to grab the raw symbol name followed by C symbol from nm. 1399echo $ac_n "checking command to parse $NM output... $ac_c" 1>&6 1400 1401# These are sane defaults that work on at least a few old systems. 1402# [They come from Ultrix. What could be older than Ultrix?!! ;)] 1403 1404# Character class describing NM global symbol codes. 1405symcode='[BCDEGRSTU]' 1406 1407# Regexp to match symbols that can be accessed directly from C. 1408sympat='\([_A-Za-z][_A-Za-z0-9]*\)' 1409 1410# Transform the above into a raw symbol and a C symbol. 1411symxfrm='\1 \1' 1412 1413# Define system-specific variables. 1414case "$host_os" in 1415aix*) 1416 symcode='[BCDTU]' 1417 ;; 1418irix*) 1419 # Cannot use undefined symbols on IRIX because inlined functions mess us up. 1420 symcode='[BCDEGRST]' 1421 ;; 1422solaris*) 1423 symcode='[BDTU]' 1424 ;; 1425esac 1426 1427# If we're using GNU nm, then use its standard symbol codes. 1428if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then 1429 symcode='[ABCDGISTUW]' 1430fi 1431 1432case "$host_os" in 1433cygwin32* | mingw32*) 1434 # We do not want undefined symbols on cygwin32. The user must 1435 # arrange to define them via -l arguments. 1436 symcode='[ABCDGISTW]' 1437 ;; 1438esac 1439 1440# Try without a prefix undercore, then with it. 1441for ac_symprfx in "" "_"; do 1442 1443 # Write the raw and C identifiers. 1444 global_symbol_pipe="sed -n -e 's/^.* $symcode $ac_symprfx$sympat$/$symxfrm/p'" 1445 1446 # Check to see that the pipe works correctly. 1447 pipe_works=no 1448 $rm conftest* 1449 cat > conftest.c <<EOF 1450#ifdef __cplusplus 1451extern "C" { 1452#endif 1453char nm_test_var; 1454void nm_test_func(){} 1455#ifdef __cplusplus 1456} 1457#endif 1458main(){nm_test_var='a';nm_test_func();return(0);} 1459EOF 1460 1461 echo "$progname:1461: checking if global_symbol_pipe works" >&5 1462 if { (eval echo $progname:1462: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } && test -s conftest.$objext; then 1463 # Now try to grab the symbols. 1464 nlist=conftest.nm 1465 if { echo "$progname:1465: eval \"$NM conftest.$objext | $global_symbol_pipe > $nlist\"" >&5; eval "$NM conftest.$objext | $global_symbol_pipe > $nlist 2>&5"; } && test -s "$nlist"; then 1466 1467 # Try sorting and uniquifying the output. 1468 if sort "$nlist" | uniq > "$nlist"T; then 1469 mv -f "$nlist"T "$nlist" 1470 else 1471 rm -f "$nlist"T 1472 fi 1473 1474 # Make sure that we snagged all the symbols we need. 1475 if egrep ' nm_test_var$' "$nlist" >/dev/null; then 1476 if egrep ' nm_test_func$' "$nlist" >/dev/null; then 1477 cat <<EOF > conftest.c 1478#ifdef __cplusplus 1479extern "C" { 1480#endif 1481 1482EOF 1483 # Now generate the symbol file. 1484 sed 's/^.* \(.*\)$/extern char \1;/' < "$nlist" >> conftest.c 1485 1486 cat <<EOF >> conftest.c 1487#if defined (__STDC__) && __STDC__ 1488# define lt_ptr_t void * 1489#else 1490# define lt_ptr_t char * 1491#endif 1492 1493/* The mapping between symbol names and symbols. */ 1494const struct { 1495 const char *name; 1496 lt_ptr_t address; 1497} 1498lt_preloaded_symbols[] = 1499{ 1500EOF 1501 sed 's/^\(.*\) \(.*\)$/ {"\1", (lt_ptr_t) \&\2},/' < "$nlist" >> conftest.c 1502 cat <<\EOF >> conftest.c 1503 {0, (lt_ptr_t) 0} 1504}; 1505 1506#ifdef __cplusplus 1507} 1508#endif 1509EOF 1510 # Now try linking the two files. 1511 mv conftest.$objext conftestm.$objext 1512 save_LIBS="$LIBS" 1513 save_CFLAGS="$CFLAGS" 1514 LIBS="conftestm.$objext" 1515 CFLAGS="$CFLAGS$no_builtin_flag" 1516 if { (eval echo $progname:1516: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then 1517 pipe_works=yes 1518 else 1519 echo "$progname: failed program was:" >&5 1520 cat conftest.c >&5 1521 fi 1522 LIBS="$save_LIBS" 1523 else 1524 echo "cannot find nm_test_func in $nlist" >&5 1525 fi 1526 else 1527 echo "cannot find nm_test_var in $nlist" >&5 1528 fi 1529 else 1530 echo "cannot run $global_symbol_pipe" >&5 1531 fi 1532 else 1533 echo "$progname: failed program was:" >&5 1534 cat conftest.c >&5 1535 fi 1536 $rm conftest* 1537 1538 # Do not use the global_symbol_pipe unless it works. 1539 if test "$pipe_works" = yes; then 1540 break 1541 else 1542 global_symbol_pipe= 1543 fi 1544done 1545echo "$ac_t$pipe_works" 1>&6 1546 1547# Check hardcoding attributes. 1548echo $ac_n "checking how to hardcode library paths into programs... $ac_c" 1>&6 1549hardcode_action= 1550if test -n "$hardcode_libdir_flag_spec" || \ 1551 test -n "$runpath_var"; then 1552 1553 # We can hardcode non-existant directories. 1554 if test "$hardcode_direct" != no && \ 1555 test "$hardcode_minus_L" != no && \ 1556 test "$hardcode_shlibpath_var" != no; then 1557 1558 # Linking always hardcodes the temporary library directory. 1559 hardcode_action=relink 1560 else 1561 # We can link without hardcoding, and we can hardcode nonexisting dirs. 1562 hardcode_action=immediate 1563 fi 1564else 1565 # We cannot hardcode anything, or else we can only hardcode existing 1566 # directories. 1567 hardcode_action=unsupported 1568fi 1569echo "$ac_t$hardcode_action" 1>&6 1570 1571 1572reload_flag= 1573reload_cmds='$LD$reload_flag -o $output$reload_objs' 1574echo $ac_n "checking for $LD option to reload object files... $ac_c" 1>&6 1575# PORTME Some linkers may need a different reload flag. 1576reload_flag='-r' 1577echo "$ac_t$reload_flag" 1>&6 1578test -n "$reload_flag" && reload_flag=" $reload_flag" 1579 1580# PORTME Fill in your ld.so characteristics 1581library_names_spec= 1582libname_spec='lib$name' 1583soname_spec= 1584postinstall_cmds= 1585postuninstall_cmds= 1586finish_cmds= 1587finish_eval= 1588shlibpath_var= 1589version_type=none 1590dynamic_linker="$host_os ld.so" 1591sys_lib_search_path="/lib /usr/lib /usr/local/lib" 1592file_magic_command= 1593deplibs_check_method='none' 1594# Need to set the preceding variable on all platforms that support 1595# interlibrary dependencies. 1596# 'none' -- dependencies not supported. 1597# 'pass_all' -- all dependencies passed with no checks. 1598# 'test_compile' -- check by making test program. 1599# 'file_regex' -- check by looking for filenames that look like the shared 1600# library in the library path. 1601# 'file_magic [regex]' -- check by looking for files in library path which 1602# responds to the $file_magic_command with a given regex. This is actually a 1603# superset of the file_regex command. If you have `file' or equivalent on 1604# your system, you'll want to use this instead. 1605# Notes: regexs are run through expr. 1606echo $ac_n "checking dynamic linker characteristics... $ac_c" 1>&6 1607case "$host_os" in 1608aix3*) 1609 version_type=linux 1610 library_names_spec='${libname}${release}.so$versuffix $libname.a' 1611 shlibpath_var=LIBPATH 1612 1613 # AIX has no versioning support, so we append a major version to the name. 1614 soname_spec='${libname}${release}.so$major' 1615 ;; 1616 1617aix4*) 1618 version_type=linux 1619 # AIX has no versioning support, so currently we can not hardcode correct 1620 # soname into executable. Probably we can add versioning support to 1621 # collect2, so additional links can be useful in future. 1622 # We preserve .a as extension for shared libraries though AIX4.2 1623 # and later linker supports .so 1624 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.a' 1625 shlibpath_var=LIBPATH 1626 deplibs_check_method=pass_all 1627 ;; 1628 1629amigaos*) 1630 library_names_spec='$libname.ixlibrary $libname.a' 1631 # Create ${libname}_ixlibrary.a entries in /sys/libs. 1632 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' 1633 ;; 1634 1635beos*) 1636 library_names_spec='${libname}.so' 1637 dynamic_linker="$host_os ld.so" 1638 shlibpath_var=LIBRARY_PATH 1639 ;; 1640 1641bsdi4*) 1642 version_type=linux 1643 library_names_spec='${libname}.so.$major ${libname}.so' 1644 soname_spec='${libname}.so' 1645 finish_cmds='PATH="$PATH:/sbin" ldconfig $libdir' 1646 shlibpath_var=LD_LIBRARY_PATH 1647 ;; 1648 1649cygwin32* | mingw32*) 1650 version_type=windows 1651 if test "$with_gcc" = yes; then 1652 library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.a' 1653 else 1654 library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.lib' 1655 fi 1656 dynamic_linker='Win32 ld.exe' 1657 deplibs_check_method='file_magic file format pei*-i386.*architecture: i386' 1658 file_magic_command='objdump -f' 1659 need_lib_prefix=no 1660 # FIXME: first we should search . and the directory the executable is in 1661 shlibpath_var=PATH 1662 ;; 1663 1664freebsd2* | freebsd3*) 1665 objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` 1666 version_type=freebsd-$objformat 1667 library_names_spec='${libname}${release}.so$versuffix $libname.so' 1668 finish_cmds='PATH="$PATH:/sbin" OBJFORMAT="$objformat" ldconfig -m $libdir' 1669 shlibpath_var=LD_LIBRARY_PATH 1670 ;; 1671 1672gnu*) 1673 version_type=linux 1674 library_names_spec='${libname}${release}.so$versuffix ${libname}.so' 1675 shlibpath_var=LD_LIBRARY_PATH 1676 ;; 1677 1678hpux9* | hpux10* | hpux11*) 1679 # Give a soname corresponding to the major version so that dld.sl refuses to 1680 # link against other versions. 1681 dynamic_linker="$host_os dld.sl" 1682 version_type=sunos 1683 shlibpath_var=SHLIB_PATH 1684 library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl' 1685 soname_spec='${libname}${release}.sl$major' 1686 # HP-UX runs *really* slowly unless shared libraries are mode 555. 1687 postinstall_cmds='chmod 555 $lib' 1688 ;; 1689 1690irix5*) 1691 version_type=osf 1692 soname_spec='${libname}${release}.so' 1693 library_names_spec='${libname}${release}.so$versuffix $libname.so' 1694 shlibpath_var=LD_LIBRARY_PATH 1695 ;; 1696 1697irix6*) 1698 version_type=osf 1699 soname_spec='${libname}${release}.so' 1700 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so' 1701 shlibpath_var=LD_LIBRARYN32_PATH 1702 ;; 1703 1704# No shared lib support for Linux oldld, aout, or coff. 1705linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*) 1706 dynamic_linker=no 1707 ;; 1708 1709# This must be Linux ELF. 1710linux-gnu*) 1711 version_type=linux 1712 need_lib_prefix=no 1713 need_version=no 1714 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' 1715 soname_spec='${libname}${release}.so$major' 1716 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 1717 shlibpath_var=LD_LIBRARY_PATH 1718 deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object' 1719 file_magic_command=file 1720 sys_lib_search_path="/lib /usr/lib /usr/local/lib `echo $LD_LIBRARY_PATH | sed -e 's/:/ /g'`" 1721 1722 if test -f /lib/ld.so.1; then 1723 dynamic_linker='GNU ld.so' 1724 else 1725 # Only the GNU ld.so supports shared libraries on MkLinux. 1726 case "$host_cpu" in 1727 powerpc*) dynamic_linker=no ;; 1728 *) dynamic_linker='Linux ld.so' ;; 1729 esac 1730 fi 1731 ;; 1732 1733netbsd*) 1734 version_type=sunos 1735 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then 1736 library_names_spec='${libname}${release}.so.$versuffix' 1737 finish_cmds='PATH="$PATH:/sbin" ldconfig -m $libdir' 1738 dynamic_linker='NetBSD (a.out) ld.so' 1739 else 1740 library_names_spec='${libname}${release}.so.$versuffix ${libname}${release}.so.$major ${libname}${release}.so' 1741 soname_spec='${libname}${release}.so.$major' 1742 dynamic_linker='NetBSD ld.elf_so' 1743 fi 1744 shlibpath_var=LD_LIBRARY_PATH 1745 ;; 1746 1747openbsd*) 1748 version_type=sunos 1749 library_names_spec='${libname}${release}.so$versuffix' 1750 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 1751 shlibpath_var=LD_LIBRARY_PATH 1752 ;; 1753 1754os2*) 1755 libname_spec='$name' 1756 need_lib_prefix=no 1757 library_names_spec='$libname.dll $libname.a' 1758 dynamic_linker='OS/2 ld.exe' 1759 shlibpath_var=LIBPATH 1760 ;; 1761 1762osf3* | osf4*) 1763 version_type=osf 1764 soname_spec='${libname}${release}.so' 1765 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so' 1766 shlibpath_var=LD_LIBRARY_PATH 1767 deplibs_check_method='pass_all' 1768 ;; 1769 1770sco3.2v5*) 1771 version_type=osf 1772 soname_spec='${libname}${release}.so$major' 1773 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' 1774 shlibpath_var=LD_LIBRARY_PATH 1775 ;; 1776 1777solaris*) 1778 version_type=linux 1779 need_lib_prefix=no 1780 need_version=no 1781 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' 1782 soname_spec='${libname}${release}.so$major' 1783 shlibpath_var=LD_LIBRARY_PATH 1784 # ldd complains unless libraries are executable 1785 postinstall_cmds='chmod +x $lib' 1786 deplibs_check_method="file_magic ELF [0-9][0-9]-bit [LM]SB dynamic lib" 1787 file_magic_command="file" 1788 sys_lib_search_path="/lib /usr/lib /usr/local/lib `echo $LD_LIBRARY_PATH | sed -e 's/:/ /g'`" 1789 ;; 1790 1791sunos4*) 1792 version_type=sunos 1793 library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix' 1794 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 1795 shlibpath_var=LD_LIBRARY_PATH 1796 ;; 1797 1798sysv4.2uw2* | sysv4.3*) 1799 version_type=linux 1800 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' 1801 soname_spec='${libname}${release}.so$major' 1802 shlibpath_var=LD_LIBRARY_PATH 1803 case "$host_vendor" in 1804 ncr) 1805 deplibs_check_method='pass_all' 1806 ;; 1807 esac 1808 ;; 1809 1810uts4*) 1811 version_type=linux 1812 library_names_spec='${libname}${release}.so.$versuffix ${libname}${release}.so.$major $libname.so' 1813 soname_spec='${libname}${release}.so.$major' 1814 shlibpath_var=LD_LIBRARY_PATH 1815 ;; 1816 1817dgux*) 1818 version_type=linux 1819 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' 1820 soname_spec='${libname}${release}.so$major' 1821 shlibpath_var=LD_LIBRARY_PATH 1822 ;; 1823 1824*) 1825 dynamic_linker=no 1826 ;; 1827esac 1828echo "$ac_t$dynamic_linker" 1>&6 1829test "$dynamic_linker" = no && can_build_shared=no 1830 1831# Report the final consequences. 1832echo "checking if libtool supports shared libraries... $can_build_shared" 1>&6 1833 1834echo $ac_n "checking whether to build shared libraries... $ac_c" 1>&6 1835test "$can_build_shared" = "no" && enable_shared=no 1836 1837# On AIX, shared libraries and static libraries use the same namespace, and 1838# are all built from PIC. 1839case "$host_os" in 1840aix3*) 1841 test "$enable_shared" = yes && enable_static=no 1842 if test -n "$RANLIB"; then 1843 archive_cmds="$archive_cmds~\$RANLIB \$lib" 1844 postinstall_cmds='$RANLIB $lib' 1845 fi 1846 ;; 1847 1848aix4*) 1849 test "$enable_shared" = yes && enable_static=no 1850 ;; 1851esac 1852 1853echo "$ac_t$enable_shared" 1>&6 1854 1855# Make sure either enable_shared or enable_static is yes. 1856test "$enable_shared" = yes || enable_static=yes 1857 1858echo "checking whether to build static libraries... $enable_static" 1>&6 1859 1860echo $ac_n "checking for objdir... $ac_c" 1>&6 1861rm -f .libs 2>/dev/null 1862mkdir .libs 2>/dev/null 1863if test -d .libs; then 1864 objdir=.libs 1865else 1866 # MS-DOS does not allow filenames that begin with a dot. 1867 objdir=_libs 1868fi 1869rmdir .libs 2>/dev/null 1870echo "$ac_t$objdir" 1>&6 1871 1872# Copy echo and quote the copy, instead of the original, because it is 1873# used later. 1874ltecho="$echo" 1875if test "X$ltecho" = "X$CONFIG_SHELL $0 --fallback-echo"; then 1876 ltecho="$CONFIG_SHELL \$0 --fallback-echo" 1877fi 1878LTSHELL="$SHELL" 1879 1880# Only quote variables if we're using ltmain.sh. 1881case "$ltmain" in 1882*.sh) 1883 # Now quote all the things that may contain metacharacters. 1884 for var in ltecho old_CC old_CFLAGS old_CPPFLAGS old_LD old_NM old_RANLIB \ 1885 old_LN_S old_DLLTOOL old_AS AR CC LD LN_S NM LTSHELL VERSION \ 1886 reload_flag reload_cmds wl \ 1887 pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \ 1888 whole_archive_flag_spec libname_spec library_names_spec soname_spec \ 1889 RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \ 1890 old_postuninstall_cmds archive_cmds archive_sym_cmds postinstall_cmds postuninstall_cmds \ 1891 file_magic_command deplibs_check_method allow_undefined_flag no_undefined_flag \ 1892 finish_cmds finish_eval global_symbol_pipe \ 1893 hardcode_libdir_flag_spec hardcode_libdir_separator sys_lib_search_path \ 1894 compiler_c_o compiler_o_lo need_locks; do 1895 1896 case "$var" in 1897 reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \ 1898 old_postinstall_cmds | old_postuninstall_cmds | \ 1899 archive_cmds | archive_sym_cmds | \ 1900 postinstall_cmds | postuninstall_cmds | \ 1901 finish_cmds | sys_lib_search_path) 1902 # Double-quote double-evaled strings. 1903 eval "$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\"\`\\\"" 1904 ;; 1905 *) 1906 eval "$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" 1907 ;; 1908 esac 1909 done 1910 1911 case "$ltecho" in 1912 *'\$0 --fallback-echo"') 1913 ltecho=`$echo "X$ltecho" | 1914 $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` 1915 ;; 1916 esac 1917 1918 trap "$rm \"$ofile\"; exit 1" 1 2 15 1919 echo "creating $ofile" 1920 $rm "$ofile" 1921 cat <<EOF > "$ofile" 1922#! $SHELL 1923 1924# `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. 1925# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION) 1926# NOTE: Changes made to this file will be lost: look at ltconfig or ltmain.sh. 1927# 1928# Copyright (C) 1996-1999 Free Software Foundation, Inc. 1929# Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 1930# 1931# This program is free software; you can redistribute it and/or modify 1932# it under the terms of the GNU General Public License as published by 1933# the Free Software Foundation; either version 2 of the License, or 1934# (at your option) any later version. 1935# 1936# This program is distributed in the hope that it will be useful, but 1937# WITHOUT ANY WARRANTY; without even the implied warranty of 1938# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1939# General Public License for more details. 1940# 1941# You should have received a copy of the GNU General Public License 1942# along with this program; if not, write to the Free Software 1943# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 1944# 1945# As a special exception to the GNU General Public License, if you 1946# distribute this file as part of a program that contains a 1947# configuration script generated by Autoconf, you may include it under 1948# the same distribution terms that you use for the rest of that program. 1949 1950# Sed that helps us avoid accidentally triggering echo(1) options like -n. 1951Xsed="sed -e s/^X//" 1952 1953# The HP-UX ksh and POSIX shell print the target directory to stdout 1954# if CDPATH is set. 1955if test "\${CDPATH+set}" = set; then CDPATH=; export CDPATH; fi 1956 1957### BEGIN LIBTOOL CONFIG 1958EOF 1959 cfgfile="$ofile" 1960 ;; 1961 1962*) 1963 # Double-quote the variables that need it (for aesthetics). 1964 for var in old_CC old_CFLAGS old_CPPFLAGS old_LD old_NM old_RANLIB \ 1965 old_LN_S old_DLLTOOL old_AS; do 1966 eval "$var=\\\"\$var\\\"" 1967 done 1968 1969 # Just create a config file. 1970 cfgfile="$ofile.cfg" 1971 trap "$rm \"$cfgfile\"; exit 1" 1 2 15 1972 echo "creating $cfgfile" 1973 $rm "$cfgfile" 1974 cat <<EOF > "$cfgfile" 1975# `$echo "$cfgfile" | sed 's%^.*/%%'` - Libtool configuration file. 1976# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION) 1977EOF 1978 ;; 1979esac 1980 1981cat <<EOF >> "$cfgfile" 1982# Libtool was configured as follows, on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 1983# 1984# CC=$old_CC CFLAGS=$old_CFLAGS CPPFLAGS=$old_CPPFLAGS \\ 1985# LD=$old_LD NM=$old_NM RANLIB=$old_RANLIB LN_S=$old_LN_S \\ 1986# DLLTOOL="$old_DLLTOOL" AS="$old_AS" \\ 1987# $0$ltconfig_args 1988# 1989# Compiler and other test output produced by $progname, useful for 1990# debugging $progname, is in ./config.log if it exists. 1991 1992# The version of $progname that generated this script. 1993LTCONFIG_VERSION=$VERSION 1994 1995# Shell to use when invoking shell scripts. 1996SHELL=$LTSHELL 1997 1998# Whether or not to build shared libraries. 1999build_libtool_libs=$enable_shared 2000 2001# Whether or not to build static libraries. 2002build_old_libs=$enable_static 2003 2004# The host system. 2005host_alias=$host_alias 2006host=$host 2007 2008# An echo program that does not interpret backslashes. 2009echo=$ltecho 2010 2011# The archiver. 2012AR=$AR 2013 2014# The default C compiler. 2015CC=$CC 2016 2017# The linker used to build libraries. 2018LD=$LD 2019 2020# Whether we need hard or soft links. 2021LN_S=$LN_S 2022 2023# A BSD-compatible nm program. 2024NM=$NM 2025 2026# Used on cygwin32: DLL creation program. 2027DLLTOOL="$DLLTOOL" 2028 2029# Used on cygwin32: assembler. 2030AS="$AS" 2031 2032# The name of the directory that contains temporary libtool files. 2033objdir=$objdir 2034 2035# How to create reloadable object files. 2036reload_flag=$reload_flag 2037reload_cmds=$reload_cmds 2038 2039# How to pass a linker flag through the compiler. 2040wl=$wl 2041 2042# Object file suffix (normally "o"). 2043objext="$objext" 2044 2045# Old archive suffix (normally "a"). 2046libext="$libext" 2047 2048# Additional compiler flags for building library objects. 2049pic_flag=$pic_flag 2050 2051# Does compiler simultaneously support -c and -o options 2052compiler_c_o=$compiler_c_o 2053 2054# Can we write directly to a .lo ? 2055compiler_o_lo=$compiler_o_lo 2056 2057# Must we lock files when doing compilation ? 2058need_locks=$need_locks 2059 2060# Do we need the lib prefix for modules? 2061need_lib_prefix=$need_lib_prefix 2062 2063# Do we need a version for libraries? 2064need_version=$need_version 2065 2066# Compiler flag to prevent dynamic linking. 2067link_static_flag=$link_static_flag 2068 2069# Compiler flag to turn off builtin functions. 2070no_builtin_flag=$no_builtin_flag 2071 2072# Compiler flag to allow reflexive dlopens. 2073export_dynamic_flag_spec=$export_dynamic_flag_spec 2074 2075# Compiler flag to generate shared objects directly from archives. 2076whole_archive_flag_spec=$whole_archive_flag_spec 2077 2078# Library versioning type. 2079version_type=$version_type 2080 2081# Format of library name prefix. 2082libname_spec=$libname_spec 2083 2084# List of archive names. First name is the real one, the rest are links. 2085# The last name is the one that the linker finds with -lNAME. 2086library_names_spec=$library_names_spec 2087 2088# The coded name of the library, if different from the real name. 2089soname_spec=$soname_spec 2090 2091# Commands used to build and install an old-style archive. 2092RANLIB=$RANLIB 2093old_archive_cmds=$old_archive_cmds 2094old_postinstall_cmds=$old_postinstall_cmds 2095old_postuninstall_cmds=$old_postuninstall_cmds 2096 2097# Create an old-style archive from a shared archive. 2098old_archive_from_new_cmds=$old_archive_from_new_cmds 2099 2100# Commands used to build and install a shared archive. 2101archive_cmds=$archive_cmds 2102archive_sym_cmds=$archive_sym_cmds 2103postinstall_cmds=$postinstall_cmds 2104postuninstall_cmds=$postuninstall_cmds 2105 2106# Method to check whether dependent libraries are shared objects. 2107deplibs_check_method=$deplibs_check_method 2108 2109# Command to use when deplibs_check_method == file_magic 2110file_magic_command=$file_magic_command 2111 2112# Flag that allows shared libraries with undefined symbols to be built. 2113allow_undefined_flag=$allow_undefined_flag 2114 2115# Flag that forces no undefined symbols. 2116no_undefined_flag=$no_undefined_flag 2117 2118# Commands used to finish a libtool library installation in a directory. 2119finish_cmds=$finish_cmds 2120 2121# Same as above, but a single script fragment to be evaled but not shown. 2122finish_eval=$finish_eval 2123 2124# Take the output of nm and produce a listing of raw symbols and C names. 2125global_symbol_pipe=$global_symbol_pipe 2126 2127# This is the shared library runtime path variable. 2128runpath_var=$runpath_var 2129 2130# This is the shared library path variable. 2131shlibpath_var=$shlibpath_var 2132 2133# How to hardcode a shared library path into an executable. 2134hardcode_action=$hardcode_action 2135 2136# Flag to hardcode \$libdir into a binary during linking. 2137# This must work even if \$libdir does not exist. 2138hardcode_libdir_flag_spec=$hardcode_libdir_flag_spec 2139 2140# Whether we need a single -rpath flag with a separated argument. 2141hardcode_libdir_separator=$hardcode_libdir_separator 2142 2143# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the 2144# resulting binary. 2145hardcode_direct=$hardcode_direct 2146 2147# Set to yes if using the -LDIR flag during linking hardcodes DIR into the 2148# resulting binary. 2149hardcode_minus_L=$hardcode_minus_L 2150 2151# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into 2152# the resulting binary. 2153hardcode_shlibpath_var=$hardcode_shlibpath_var 2154 2155# System search path for libraries 2156sys_lib_search_path=$sys_lib_search_path 2157 2158# Fix the shell variable \$srcfile for the compiler. 2159fix_srcfile_path="$fix_srcfile_path" 2160EOF 2161 2162case "$ltmain" in 2163*.sh) 2164 echo '### END LIBTOOL CONFIG' >> "$ofile" 2165 echo >> "$ofile" 2166 case "$host_os" in 2167 aix3*) 2168 cat <<\EOF >> "$ofile" 2169 2170# AIX sometimes has problems with the GCC collect2 program. For some 2171# reason, if we set the COLLECT_NAMES environment variable, the problems 2172# vanish in a puff of smoke. 2173if test "${COLLECT_NAMES+set}" != set; then 2174 COLLECT_NAMES= 2175 export COLLECT_NAMES 2176fi 2177EOF 2178 ;; 2179 esac 2180 2181 # Append the ltmain.sh script. 2182 cat "$ltmain" >> "$ofile" || (rm -f "$ofile"; exit 1) 2183 2184 chmod +x "$ofile" 2185 ;; 2186 2187*) 2188 # Compile the libtool program. 2189 echo "FIXME: would compile $ltmain" 2190 ;; 2191esac 2192exit 0 2193 2194# Local Variables: 2195# mode:shell-script 2196# sh-indentation:2 2197# End: 2198