1#! /bin/sh 2 3# libtoolT - Provide generalized library-building support services. 4# Generated automatically by (GNU ) 5# NOTE: Changes made to this file will be lost: look at ltmain.sh. 6# 7# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 8# Free Software Foundation, Inc. 9# 10# This file is part of GNU Libtool: 11# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 12# 13# This program is free software; you can redistribute it and/or modify 14# it under the terms of the GNU General Public License as published by 15# the Free Software Foundation; either version 2 of the License, or 16# (at your option) any later version. 17# 18# This program is distributed in the hope that it will be useful, but 19# WITHOUT ANY WARRANTY; without even the implied warranty of 20# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 21# General Public License for more details. 22# 23# You should have received a copy of the GNU General Public License 24# along with this program; if not, write to the Free Software 25# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 26# USA. 27# 28# As a special exception to the GNU General Public License, if you 29# distribute this file as part of a program that contains a 30# configuration script generated by Autoconf, you may include it under 31# the same distribution terms that you use for the rest of that program. 32 33# A sed program that does not truncate output. 34SED="/bin/sed" 35 36# Sed that helps us avoid accidentally triggering echo(1) options like -n. 37Xsed="/bin/sed -e s/^X//" 38 39# The HP-UX ksh and POSIX shell print the target directory to stdout 40# if CDPATH is set. 41(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 42 43# The names of the tagged configurations supported by this script. 44available_tags=" CXX F77" 45 46# ### BEGIN LIBTOOL CONFIG 47 48# Libtool was configured on host localhost.localdomain: 49 50# Shell to use when invoking shell scripts. 51SHELL="/bin/sh" 52 53# Whether or not to build shared libraries. 54build_libtool_libs=yes 55 56# Whether or not to build static libraries. 57build_old_libs=yes 58 59# Whether or not to add -lc for building shared libraries. 60build_libtool_need_lc=no 61 62# Whether or not to disallow shared libs when runtime libs are static 63allow_libtool_libs_with_static_runtimes=no 64 65# Whether or not to optimize for fast installation. 66fast_install=yes 67 68# The host system. 69host_alias=arm-linux 70host=arm-unknown-linux-gnu 71 72# An echo program that does not interpret backslashes. 73echo="echo" 74 75# The archiver. 76AR="arm-brcm-linux-uclibcgnueabi-ar" 77AR_FLAGS="cru" 78 79# A C compiler. 80LTCC="arm-brcm-linux-uclibcgnueabi-gcc" 81 82# A language-specific compiler. 83CC="arm-brcm-linux-uclibcgnueabi-gcc" 84 85# Is the compiler the GNU C compiler? 86with_gcc=yes 87 88# An ERE matcher. 89EGREP="grep -E" 90 91# The linker used to build libraries. 92LD="arm-brcm-linux-uclibcgnueabi-ld" 93 94# Whether we need hard or soft links. 95LN_S="ln -s" 96 97# A BSD-compatible nm program. 98NM="arm-brcm-linux-uclibcgnueabi-nm" 99 100# A symbol stripping program 101STRIP="arm-brcm-linux-uclibcgnueabi-strip" 102 103# Used to examine libraries when file_magic_cmd begins "file" 104MAGIC_CMD=file 105 106# Used on cygwin: DLL creation program. 107DLLTOOL="dlltool" 108 109# Used on cygwin: object dumper. 110OBJDUMP="arm-brcm-linux-uclibcgnueabi-objdump" 111 112# Used on cygwin: assembler. 113AS="arm-brcm-linux-uclibcgnueabi-as" 114 115# The name of the directory that contains temporary libtool files. 116objdir=.libs 117 118# How to create reloadable object files. 119reload_flag=" -r" 120reload_cmds="\$LD\$reload_flag -o \$output\$reload_objs" 121 122# How to pass a linker flag through the compiler. 123wl="-Wl," 124 125# Object file suffix (normally "o"). 126objext="o" 127 128# Old archive suffix (normally "a"). 129libext="a" 130 131# Shared library suffix (normally ".so"). 132shrext_cmds='.so' 133 134# Executable file suffix (normally ""). 135exeext="" 136 137# Additional compiler flags for building library objects. 138pic_flag=" -fPIC -DPIC" 139pic_mode=default 140 141# What is the maximum length of a command? 142max_cmd_len=32768 143 144# Does compiler simultaneously support -c and -o options? 145compiler_c_o="yes" 146 147# Must we lock files when doing compilation ? 148need_locks="no" 149 150# Do we need the lib prefix for modules? 151need_lib_prefix=no 152 153# Do we need a version for libraries? 154need_version=no 155 156# Whether dlopen is supported. 157dlopen_support=unknown 158 159# Whether dlopen of programs is supported. 160dlopen_self=unknown 161 162# Whether dlopen of statically linked programs is supported. 163dlopen_self_static=unknown 164 165# Compiler flag to prevent dynamic linking. 166link_static_flag="-static" 167 168# Compiler flag to turn off builtin functions. 169no_builtin_flag=" -fno-builtin" 170 171# Compiler flag to allow reflexive dlopens. 172export_dynamic_flag_spec="\${wl}--export-dynamic" 173 174# Compiler flag to generate shared objects directly from archives. 175whole_archive_flag_spec="\${wl}--whole-archive\$convenience \${wl}--no-whole-archive" 176 177# Compiler flag to generate thread-safe objects. 178thread_safe_flag_spec="" 179 180# Library versioning type. 181version_type=linux 182 183# Format of library name prefix. 184libname_spec="lib\$name" 185 186# List of archive names. First name is the real one, the rest are links. 187# The last name is the one that the linker finds with -lNAME. 188library_names_spec="\${libname}\${release}\${shared_ext}\$versuffix \${libname}\${release}\${shared_ext}\$major \$libname\${shared_ext}" 189 190# The coded name of the library, if different from the real name. 191soname_spec="\${libname}\${release}\${shared_ext}\$major" 192 193# Commands used to build and install an old-style archive. 194RANLIB="arm-brcm-linux-uclibcgnueabi-ranlib" 195old_archive_cmds="\$AR \$AR_FLAGS \$oldlib\$oldobjs\$old_deplibs~\$RANLIB \$oldlib" 196old_postinstall_cmds="\$RANLIB \$oldlib~chmod 644 \$oldlib" 197old_postuninstall_cmds="" 198 199# Create an old-style archive from a shared archive. 200old_archive_from_new_cmds="" 201 202# Create a temporary old-style archive to link instead of a shared archive. 203old_archive_from_expsyms_cmds="" 204 205# Commands used to build and install a shared archive. 206archive_cmds="\$CC -shared \$libobjs \$deplibs \$compiler_flags \${wl}-soname \$wl\$soname -o \$lib" 207archive_expsym_cmds="\$echo \\\"{ global:\\\" > \$output_objdir/\$libname.ver~ 208cat \$export_symbols | sed -e \\\"s/\\\\(.*\\\\)/\\\\1;/\\\" >> \$output_objdir/\$libname.ver~ 209\$echo \\\"local: *; };\\\" >> \$output_objdir/\$libname.ver~ 210 \$CC -shared \$libobjs \$deplibs \$compiler_flags \${wl}-soname \$wl\$soname \${wl}-version-script \${wl}\$output_objdir/\$libname.ver -o \$lib" 211postinstall_cmds="" 212postuninstall_cmds="" 213 214# Commands used to build a loadable module (assumed same as above if empty) 215module_cmds="" 216module_expsym_cmds="" 217 218# Commands to strip libraries. 219old_striplib="arm-brcm-linux-uclibcgnueabi-strip --strip-debug" 220striplib="arm-brcm-linux-uclibcgnueabi-strip --strip-unneeded" 221 222# Dependencies to place before the objects being linked to create a 223# shared library. 224predep_objects="" 225 226# Dependencies to place after the objects being linked to create a 227# shared library. 228postdep_objects="" 229 230# Dependencies to place before the objects being linked to create a 231# shared library. 232predeps="" 233 234# Dependencies to place after the objects being linked to create a 235# shared library. 236postdeps="" 237 238# The library search path used internally by the compiler when linking 239# a shared library. 240compiler_lib_search_path="" 241 242# Method to check whether dependent libraries are shared objects. 243deplibs_check_method="pass_all" 244 245# Command to use when deplibs_check_method == file_magic. 246file_magic_cmd="\$MAGIC_CMD" 247 248# Flag that allows shared libraries with undefined symbols to be built. 249allow_undefined_flag="" 250 251# Flag that forces no undefined symbols. 252no_undefined_flag="" 253 254# Commands used to finish a libtool library installation in a directory. 255finish_cmds="PATH=\\\"\\\$PATH:/sbin\\\" ldconfig -n \$libdir" 256 257# Same as above, but a single script fragment to be evaled but not shown. 258finish_eval="" 259 260# Take the output of nm and produce a listing of raw symbols and C names. 261global_symbol_pipe="sed -n -e 's/^.*[ ]\\([ABCDGIRSTW][ABCDGIRSTW]*\\)[ ][ ]*\\(\\)\\([_A-Za-z][_A-Za-z0-9]*\\)\$/\\1 \\2\\3 \\3/p'" 262 263# Transform the output of nm in a proper C declaration 264global_symbol_to_cdecl="sed -n -e 's/^. .* \\(.*\\)\$/extern int \\1;/p'" 265 266# Transform the output of nm in a C name address pair 267global_symbol_to_c_name_address="sed -n -e 's/^: \\([^ ]*\\) \$/ {\\\"\\1\\\", (lt_ptr) 0},/p' -e 's/^[BCDEGRST] \\([^ ]*\\) \\([^ ]*\\)\$/ {\"\\2\", (lt_ptr) \\&\\2},/p'" 268 269# This is the shared library runtime path variable. 270runpath_var=LD_RUN_PATH 271 272# This is the shared library path variable. 273shlibpath_var=LD_LIBRARY_PATH 274 275# Is shlibpath searched before the hard-coded library search path? 276shlibpath_overrides_runpath=no 277 278# How to hardcode a shared library path into an executable. 279hardcode_action=immediate 280 281# Whether we should hardcode library paths into libraries. 282hardcode_into_libs=yes 283 284# Flag to hardcode $libdir into a binary during linking. 285# This must work even if $libdir does not exist. 286hardcode_libdir_flag_spec="\${wl}--rpath \${wl}\$libdir" 287 288# If ld is used when linking, flag to hardcode $libdir into 289# a binary during linking. This must work even if $libdir does 290# not exist. 291hardcode_libdir_flag_spec_ld="" 292 293# Whether we need a single -rpath flag with a separated argument. 294hardcode_libdir_separator="" 295 296# Set to yes if using DIR/libNAME during linking hardcodes DIR into the 297# resulting binary. 298hardcode_direct=no 299 300# Set to yes if using the -LDIR flag during linking hardcodes DIR into the 301# resulting binary. 302hardcode_minus_L=no 303 304# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into 305# the resulting binary. 306hardcode_shlibpath_var=unsupported 307 308# Set to yes if building a shared library automatically hardcodes DIR into the library 309# and all subsequent libraries and executables linked against it. 310hardcode_automatic=no 311 312# Variables whose values should be saved in libtool wrapper scripts and 313# restored at relink time. 314variables_saved_for_relink="PATH LD_RUN_PATH GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 315 316# Whether libtool must link a program against all its dependency libraries. 317link_all_deplibs=unknown 318 319# Compile-time system search path for libraries 320sys_lib_search_path_spec=" /projects/hnd/tools/linux/hndtools-arm-linux-2.6.36-uclibc-4.5.3/lib/gcc/arm-brcm-linux-uclibcgnueabi/4.5.3/ /projects/hnd/tools/linux/hndtools-arm-linux-2.6.36-uclibc-4.5.3/lib/gcc/arm-brcm-linux-uclibcgnueabi/4.5.3/../../../../arm-brcm-linux-uclibcgnueabi/lib/arm-brcm-linux-uclibcgnueabi/4.5.3/ /projects/hnd/tools/linux/hndtools-arm-linux-2.6.36-uclibc-4.5.3/lib/gcc/arm-brcm-linux-uclibcgnueabi/4.5.3/../../../../arm-brcm-linux-uclibcgnueabi/lib/ /projects/hnd/tools/linux/hndtools-arm-linux-2.6.36-uclibc-4.5.3/arm-brcm-linux-uclibcgnueabi/sysroot/lib/arm-brcm-linux-uclibcgnueabi/4.5.3/ /projects/hnd/tools/linux/hndtools-arm-linux-2.6.36-uclibc-4.5.3/arm-brcm-linux-uclibcgnueabi/sysroot/lib/ /projects/hnd/tools/linux/hndtools-arm-linux-2.6.36-uclibc-4.5.3/arm-brcm-linux-uclibcgnueabi/sysroot/usr/lib/arm-brcm-linux-uclibcgnueabi/4.5.3/ /projects/hnd/tools/linux/hndtools-arm-linux-2.6.36-uclibc-4.5.3/arm-brcm-linux-uclibcgnueabi/sysroot/usr/lib/" 321 322# Run-time system search path for libraries 323sys_lib_dlsearch_path_spec="/lib /usr/lib include ld.so.conf.d/*.conf " 324 325# Fix the shell variable $srcfile for the compiler. 326fix_srcfile_path="" 327 328# Set to yes if exported symbols are required. 329always_export_symbols=no 330 331# The commands to list exported symbols. 332export_symbols_cmds="\$NM \$libobjs \$convenience | \$global_symbol_pipe | \$SED 's/.* //' | sort | uniq > \$export_symbols" 333 334# The commands to extract the exported symbol list from a shared archive. 335extract_expsyms_cmds="" 336 337# Symbols that should not be listed in the preloaded symbols. 338exclude_expsyms="_GLOBAL_OFFSET_TABLE_" 339 340# Symbols that must always be exported. 341include_expsyms="" 342 343# ### END LIBTOOL CONFIG 344 345# ltmain.sh - Provide generalized library-building support services. 346# NOTE: Changing this file will not affect anything until you rerun configure. 347# 348# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004 349# Free Software Foundation, Inc. 350# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 351# 352# This program is free software; you can redistribute it and/or modify 353# it under the terms of the GNU General Public License as published by 354# the Free Software Foundation; either version 2 of the License, or 355# (at your option) any later version. 356# 357# This program is distributed in the hope that it will be useful, but 358# WITHOUT ANY WARRANTY; without even the implied warranty of 359# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 360# General Public License for more details. 361# 362# You should have received a copy of the GNU General Public License 363# along with this program; if not, write to the Free Software 364# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 365# USA. 366# 367# As a special exception to the GNU General Public License, if you 368# distribute this file as part of a program that contains a 369# configuration script generated by Autoconf, you may include it under 370# the same distribution terms that you use for the rest of that program. 371 372basename="s,^.*/,,g" 373 374# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh 375# is ksh but when the shell is invoked as "sh" and the current value of 376# the _XPG environment variable is not equal to 1 (one), the special 377# positional parameter $0, within a function call, is the name of the 378# function. 379progpath="$0" 380 381# The name of this program: 382progname=`echo "$progpath" | $SED $basename` 383modename="$progname" 384 385# Global variables: 386EXIT_SUCCESS=0 387EXIT_FAILURE=1 388 389PROGRAM=ltmain.sh 390PACKAGE=libtool 391VERSION=1.5.10 392TIMESTAMP=" (1.1220.2.130 2004/09/19 12:13:49)" 393 394# See if we are running on zsh, and set the options which allow our 395# commands through without removal of \ escapes. 396if test -n "${ZSH_VERSION+set}" ; then 397 setopt NO_GLOB_SUBST 398fi 399 400# Check that we have a working $echo. 401if test "X$1" = X--no-reexec; then 402 # Discard the --no-reexec flag, and continue. 403 shift 404elif test "X$1" = X--fallback-echo; then 405 # Avoid inline document here, it may be left over 406 : 407elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then 408 # Yippee, $echo works! 409 : 410else 411 # Restart under the correct shell, and then maybe $echo will work. 412 exec $SHELL "$progpath" --no-reexec ${1+"$@"} 413fi 414 415if test "X$1" = X--fallback-echo; then 416 # used as fallback echo 417 shift 418 cat <<EOF 419$* 420EOF 421 exit $EXIT_SUCCESS 422fi 423 424default_mode= 425help="Try \`$progname --help' for more information." 426magic="%%%MAGIC variable%%%" 427mkdir="mkdir" 428mv="mv -f" 429rm="rm -f" 430 431# Sed substitution that helps us do robust quoting. It backslashifies 432# metacharacters that are still active within double-quoted strings. 433Xsed="${SED}"' -e 1s/^X//' 434sed_quote_subst='s/\([\\`\\"$\\\\]\)/\\\1/g' 435# test EBCDIC or ASCII 436case `echo A|tr A '\301'` in 437 A) # EBCDIC based system 438 SP2NL="tr '\100' '\n'" 439 NL2SP="tr '\r\n' '\100\100'" 440 ;; 441 *) # Assume ASCII based system 442 SP2NL="tr '\040' '\012'" 443 NL2SP="tr '\015\012' '\040\040'" 444 ;; 445esac 446 447# NLS nuisances. 448# Only set LANG and LC_ALL to C if already set. 449# These must not be set unconditionally because not all systems understand 450# e.g. LANG=C (notably SCO). 451# We save the old values to restore during execute mode. 452if test "${LC_ALL+set}" = set; then 453 save_LC_ALL="$LC_ALL"; LC_ALL=C; export LC_ALL 454fi 455if test "${LANG+set}" = set; then 456 save_LANG="$LANG"; LANG=C; export LANG 457fi 458 459# Make sure IFS has a sensible default 460: ${IFS=" 461"} 462 463if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then 464 $echo "$modename: not configured to build any kind of library" 1>&2 465 $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 466 exit $EXIT_FAILURE 467fi 468 469# Global variables. 470mode=$default_mode 471nonopt= 472prev= 473prevopt= 474run= 475show="$echo" 476show_help= 477execute_dlfiles= 478lo2o="s/\\.lo\$/.${objext}/" 479o2lo="s/\\.${objext}\$/.lo/" 480 481##################################### 482# Shell function definitions: 483# This seems to be the best place for them 484 485# func_win32_libid arg 486# return the library type of file 'arg' 487# 488# Need a lot of goo to handle *both* DLLs and import libs 489# Has to be a shell function in order to 'eat' the argument 490# that is supplied when $file_magic_command is called. 491func_win32_libid () { 492 win32_libid_type="unknown" 493 win32_fileres=`file -L $1 2>/dev/null` 494 case $win32_fileres in 495 *ar\ archive\ import\ library*) # definitely import 496 win32_libid_type="x86 archive import" 497 ;; 498 *ar\ archive*) # could be an import, or static 499 if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \ 500 $EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then 501 win32_nmres=`eval $NM -f posix -A $1 | \ 502 sed -n -e '1,100{/ I /{x;/import/!{s/^/import/;h;p;};x;};}'` 503 if test "X$win32_nmres" = "Ximport" ; then 504 win32_libid_type="x86 archive import" 505 else 506 win32_libid_type="x86 archive static" 507 fi 508 fi 509 ;; 510 *DLL*) 511 win32_libid_type="x86 DLL" 512 ;; 513 *executable*) # but shell scripts are "executable" too... 514 case $win32_fileres in 515 *MS\ Windows\ PE\ Intel*) 516 win32_libid_type="x86 DLL" 517 ;; 518 esac 519 ;; 520 esac 521 $echo $win32_libid_type 522} 523 524 525# func_infer_tag arg 526# Infer tagged configuration to use if any are available and 527# if one wasn't chosen via the "--tag" command line option. 528# Only attempt this if the compiler in the base compile 529# command doesn't match the default compiler. 530# arg is usually of the form 'gcc ...' 531func_infer_tag () { 532 if test -n "$available_tags" && test -z "$tagname"; then 533 CC_quoted= 534 for arg in $CC; do 535 case $arg in 536 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") 537 arg="\"$arg\"" 538 ;; 539 esac 540 CC_quoted="$CC_quoted $arg" 541 done 542 case $@ in 543 # Blanks in the command may have been stripped by the calling shell, 544 # but not from the CC environment variable when configure was run. 545 " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) ;; 546 # Blanks at the start of $base_compile will cause this to fail 547 # if we don't check for them as well. 548 *) 549 for z in $available_tags; do 550 if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then 551 # Evaluate the configuration. 552 eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" 553 CC_quoted= 554 for arg in $CC; do 555 # Double-quote args containing other shell metacharacters. 556 case $arg in 557 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") 558 arg="\"$arg\"" 559 ;; 560 esac 561 CC_quoted="$CC_quoted $arg" 562 done 563 case "$@ " in 564 " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) 565 # The compiler in the base compile command matches 566 # the one in the tagged configuration. 567 # Assume this is the tagged configuration we want. 568 tagname=$z 569 break 570 ;; 571 esac 572 fi 573 done 574 # If $tagname still isn't set, then no tagged configuration 575 # was found and let the user know that the "--tag" command 576 # line option must be used. 577 if test -z "$tagname"; then 578 $echo "$modename: unable to infer tagged configuration" 579 $echo "$modename: specify a tag with \`--tag'" 1>&2 580 exit $EXIT_FAILURE 581# else 582# $echo "$modename: using $tagname tagged configuration" 583 fi 584 ;; 585 esac 586 fi 587} 588 589 590# func_extract_archives gentop oldlib ... 591func_extract_archives () { 592 my_gentop="$1"; shift 593 my_oldlibs=${1+"$@"} 594 my_oldobjs="" 595 my_xlib="" 596 my_xabs="" 597 my_xdir="" 598 my_status="" 599 600 $show "${rm}r $my_gentop" 601 $run ${rm}r "$my_gentop" 602 $show "$mkdir $my_gentop" 603 $run $mkdir "$my_gentop" 604 my_status=$? 605 if test "$my_status" -ne 0 && test ! -d "$my_gentop"; then 606 exit $my_status 607 fi 608 609 for my_xlib in $my_oldlibs; do 610 # Extract the objects. 611 case $my_xlib in 612 [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;; 613 *) my_xabs=`pwd`"/$my_xlib" ;; 614 esac 615 my_xlib=`$echo "X$my_xlib" | $Xsed -e 's%^.*/%%'` 616 my_xdir="$my_gentop/$my_xlib" 617 618 $show "${rm}r $my_xdir" 619 $run ${rm}r "$my_xdir" 620 $show "$mkdir $my_xdir" 621 $run $mkdir "$my_xdir" 622 status=$? 623 if test "$status" -ne 0 && test ! -d "$my_xdir"; then 624 exit $status 625 fi 626 case $host in 627 *-darwin*) 628 $show "Extracting $my_xabs" 629 # Do not bother doing anything if just a dry run 630 if test -z "$run"; then 631 darwin_orig_dir=`pwd` 632 cd $my_xdir || exit $? 633 darwin_archive=$my_xabs 634 darwin_curdir=`pwd` 635 darwin_base_archive=`basename $darwin_archive` 636 darwin_arches=`lipo -info "$darwin_archive" 2>/dev/null | $EGREP Architectures 2>/dev/null` 637 if test -n "$darwin_arches"; then 638 darwin_arches=`echo "$darwin_arches" | $SED -e 's/.*are://'` 639 darwin_arch= 640 $show "$darwin_base_archive has multiple architectures $darwin_arches" 641 for darwin_arch in $darwin_arches ; do 642 mkdir -p "unfat-$$/${darwin_base_archive}-${darwin_arch}" 643 lipo -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}" 644 # Remove the table of contents from the thin files. 645 $AR -d "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" __.SYMDEF 2>/dev/null || true 646 $AR -d "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" __.SYMDEF\ SORTED 2>/dev/null || true 647 cd "unfat-$$/${darwin_base_archive}-${darwin_arch}" 648 $AR -xo "${darwin_base_archive}" 649 rm "${darwin_base_archive}" 650 cd "$darwin_curdir" 651 done # $darwin_arches 652 ## Okay now we have a bunch of thin objects, gotta fatten them up :) 653 darwin_filelist=`find unfat-$$ -type f | xargs basename | sort -u | $NL2SP` 654 darwin_file= 655 darwin_files= 656 for darwin_file in $darwin_filelist; do 657 darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP` 658 lipo -create -output "$darwin_file" $darwin_files 659 done # $darwin_filelist 660 rm -rf unfat-$$ 661 cd "$darwin_orig_dir" 662 else 663 cd $darwin_orig_dir 664 (cd $my_xdir && $AR x $my_xabs) || exit $? 665 fi # $darwin_arches 666 fi # $run 667 ;; 668 *) 669 # We will extract separately just the conflicting names and we will 670 # no longer touch any unique names. It is faster to leave these 671 # extract automatically by $AR in one run. 672 $show "(cd $my_xdir && $AR x $my_xabs)" 673 $run eval "(cd \$my_xdir && $AR x \$my_xabs)" || exit $? 674 if ($AR t "$my_xabs" | sort | sort -uc >/dev/null 2>&1); then 675 : 676 else 677 $echo "$modename: warning: object name conflicts; renaming object files" 1>&2 678 $echo "$modename: warning: to ensure that they will not overwrite" 1>&2 679 $AR t "$my_xabs" | sort | uniq -cd | while read -r count name 680 do 681 i=1 682 while test "$i" -le "$count" 683 do 684 # Put our $i before any first dot (extension) 685 # Never overwrite any file 686 name_to="$name" 687 while test "X$name_to" = "X$name" || test -f "$my_xdir/$name_to" 688 do 689 name_to=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"` 690 done 691 $show "(cd $my_xdir && $AR xN $i $my_xabs '$name' && $mv '$name' '$name_to')" 692 $run eval "(cd \$my_xdir && $AR xN $i \$my_xabs '$name' && $mv '$name' '$name_to')" || exit $? 693 i=`expr $i + 1` 694 done 695 done 696 fi 697 ;; 698 esac 699 my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP` 700 done 701 702 func_extract_archives_result="$my_oldobjs" 703} 704# End of Shell function definitions 705##################################### 706 707# Darwin sucks 708eval std_shrext=\"$shrext_cmds\" 709 710# Parse our command line options once, thoroughly. 711while test "$#" -gt 0 712do 713 arg="$1" 714 shift 715 716 case $arg in 717 -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;; 718 *) optarg= ;; 719 esac 720 721 # If the previous option needs an argument, assign it. 722 if test -n "$prev"; then 723 case $prev in 724 execute_dlfiles) 725 execute_dlfiles="$execute_dlfiles $arg" 726 ;; 727 tag) 728 tagname="$arg" 729 preserve_args="${preserve_args}=$arg" 730 731 # Check whether tagname contains only valid characters 732 case $tagname in 733 *[!-_A-Za-z0-9,/]*) 734 $echo "$progname: invalid tag name: $tagname" 1>&2 735 exit $EXIT_FAILURE 736 ;; 737 esac 738 739 case $tagname in 740 CC) 741 # Don't test for the "default" C tag, as we know, it's there, but 742 # not specially marked. 743 ;; 744 *) 745 if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$progpath" > /dev/null; then 746 taglist="$taglist $tagname" 747 # Evaluate the configuration. 748 eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^# ### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $progpath`" 749 else 750 $echo "$progname: ignoring unknown tag $tagname" 1>&2 751 fi 752 ;; 753 esac 754 ;; 755 *) 756 eval "$prev=\$arg" 757 ;; 758 esac 759 760 prev= 761 prevopt= 762 continue 763 fi 764 765 # Have we seen a non-optional argument yet? 766 case $arg in 767 --help) 768 show_help=yes 769 ;; 770 771 --version) 772 $echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP" 773 $echo 774 $echo "Copyright (C) 2003 Free Software Foundation, Inc." 775 $echo "This is free software; see the source for copying conditions. There is NO" 776 $echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." 777 exit $EXIT_SUCCESS 778 ;; 779 780 --config) 781 ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $progpath 782 # Now print the configurations for the tags. 783 for tagname in $taglist; do 784 ${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$progpath" 785 done 786 exit $EXIT_SUCCESS 787 ;; 788 789 --debug) 790 $echo "$progname: enabling shell trace mode" 791 set -x 792 preserve_args="$preserve_args $arg" 793 ;; 794 795 --dry-run | -n) 796 run=: 797 ;; 798 799 --features) 800 $echo "host: $host" 801 if test "$build_libtool_libs" = yes; then 802 $echo "enable shared libraries" 803 else 804 $echo "disable shared libraries" 805 fi 806 if test "$build_old_libs" = yes; then 807 $echo "enable static libraries" 808 else 809 $echo "disable static libraries" 810 fi 811 exit $EXIT_SUCCESS 812 ;; 813 814 --finish) mode="finish" ;; 815 816 --mode) prevopt="--mode" prev=mode ;; 817 --mode=*) mode="$optarg" ;; 818 819 --preserve-dup-deps) duplicate_deps="yes" ;; 820 821 --quiet | --silent) 822 show=: 823 preserve_args="$preserve_args $arg" 824 ;; 825 826 --tag) prevopt="--tag" prev=tag ;; 827 --tag=*) 828 set tag "$optarg" ${1+"$@"} 829 shift 830 prev=tag 831 preserve_args="$preserve_args --tag" 832 ;; 833 834 -dlopen) 835 prevopt="-dlopen" 836 prev=execute_dlfiles 837 ;; 838 839 -*) 840 $echo "$modename: unrecognized option \`$arg'" 1>&2 841 $echo "$help" 1>&2 842 exit $EXIT_FAILURE 843 ;; 844 845 *) 846 nonopt="$arg" 847 break 848 ;; 849 esac 850done 851 852if test -n "$prevopt"; then 853 $echo "$modename: option \`$prevopt' requires an argument" 1>&2 854 $echo "$help" 1>&2 855 exit $EXIT_FAILURE 856fi 857 858# If this variable is set in any of the actions, the command in it 859# will be execed at the end. This prevents here-documents from being 860# left over by shells. 861exec_cmd= 862 863if test -z "$show_help"; then 864 865 # Infer the operation mode. 866 if test -z "$mode"; then 867 $echo "*** Warning: inferring the mode of operation is deprecated." 1>&2 868 $echo "*** Future versions of Libtool will require -mode=MODE be specified." 1>&2 869 case $nonopt in 870 *cc | cc* | *++ | gcc* | *-gcc* | g++* | xlc*) 871 mode=link 872 for arg 873 do 874 case $arg in 875 -c) 876 mode=compile 877 break 878 ;; 879 esac 880 done 881 ;; 882 *db | *dbx | *strace | *truss) 883 mode=execute 884 ;; 885 *install*|cp|mv) 886 mode=install 887 ;; 888 *rm) 889 mode=uninstall 890 ;; 891 *) 892 # If we have no mode, but dlfiles were specified, then do execute mode. 893 test -n "$execute_dlfiles" && mode=execute 894 895 # Just use the default operation mode. 896 if test -z "$mode"; then 897 if test -n "$nonopt"; then 898 $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2 899 else 900 $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2 901 fi 902 fi 903 ;; 904 esac 905 fi 906 907 # Only execute mode is allowed to have -dlopen flags. 908 if test -n "$execute_dlfiles" && test "$mode" != execute; then 909 $echo "$modename: unrecognized option \`-dlopen'" 1>&2 910 $echo "$help" 1>&2 911 exit $EXIT_FAILURE 912 fi 913 914 # Change the help message to a mode-specific one. 915 generic_help="$help" 916 help="Try \`$modename --help --mode=$mode' for more information." 917 918 # These modes are in order of execution frequency so that they run quickly. 919 case $mode in 920 # libtool compile mode 921 compile) 922 modename="$modename: compile" 923 # Get the compilation command and the source file. 924 base_compile= 925 srcfile="$nonopt" # always keep a non-empty value in "srcfile" 926 suppress_opt=yes 927 suppress_output= 928 arg_mode=normal 929 libobj= 930 later= 931 932 for arg 933 do 934 case "$arg_mode" in 935 arg ) 936 # do not "continue". Instead, add this to base_compile 937 lastarg="$arg" 938 arg_mode=normal 939 ;; 940 941 target ) 942 libobj="$arg" 943 arg_mode=normal 944 continue 945 ;; 946 947 normal ) 948 # Accept any command-line options. 949 case $arg in 950 -o) 951 if test -n "$libobj" ; then 952 $echo "$modename: you cannot specify \`-o' more than once" 1>&2 953 exit $EXIT_FAILURE 954 fi 955 arg_mode=target 956 continue 957 ;; 958 959 -static | -prefer-pic | -prefer-non-pic) 960 later="$later $arg" 961 continue 962 ;; 963 964 -no-suppress) 965 suppress_opt=no 966 continue 967 ;; 968 969 -Xcompiler) 970 arg_mode=arg # the next one goes into the "base_compile" arg list 971 continue # The current "srcfile" will either be retained or 972 ;; # replaced later. I would guess that would be a bug. 973 974 -Wc,*) 975 args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"` 976 lastarg= 977 save_ifs="$IFS"; IFS=',' 978 for arg in $args; do 979 IFS="$save_ifs" 980 981 # Double-quote args containing other shell metacharacters. 982 # Many Bourne shells cannot handle close brackets correctly 983 # in scan sets, so we specify it separately. 984 case $arg in 985 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") 986 arg="\"$arg\"" 987 ;; 988 esac 989 lastarg="$lastarg $arg" 990 done 991 IFS="$save_ifs" 992 lastarg=`$echo "X$lastarg" | $Xsed -e "s/^ //"` 993 994 # Add the arguments to base_compile. 995 base_compile="$base_compile $lastarg" 996 continue 997 ;; 998 999 * ) 1000 # Accept the current argument as the source file. 1001 # The previous "srcfile" becomes the current argument. 1002 # 1003 lastarg="$srcfile" 1004 srcfile="$arg" 1005 ;; 1006 esac # case $arg 1007 ;; 1008 esac # case $arg_mode 1009 1010 # Aesthetically quote the previous argument. 1011 lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"` 1012 1013 case $lastarg in 1014 # Double-quote args containing other shell metacharacters. 1015 # Many Bourne shells cannot handle close brackets correctly 1016 # in scan sets, so we specify it separately. 1017 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") 1018 lastarg="\"$lastarg\"" 1019 ;; 1020 esac 1021 1022 base_compile="$base_compile $lastarg" 1023 done # for arg 1024 1025 case $arg_mode in 1026 arg) 1027 $echo "$modename: you must specify an argument for -Xcompile" 1028 exit $EXIT_FAILURE 1029 ;; 1030 target) 1031 $echo "$modename: you must specify a target with \`-o'" 1>&2 1032 exit $EXIT_FAILURE 1033 ;; 1034 *) 1035 # Get the name of the library object. 1036 [ -z "$libobj" ] && libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'` 1037 ;; 1038 esac 1039 1040 # Recognize several different file suffixes. 1041 # If the user specifies -o file.o, it is replaced with file.lo 1042 xform='[cCFSifmso]' 1043 case $libobj in 1044 *.ada) xform=ada ;; 1045 *.adb) xform=adb ;; 1046 *.ads) xform=ads ;; 1047 *.asm) xform=asm ;; 1048 *.c++) xform=c++ ;; 1049 *.cc) xform=cc ;; 1050 *.ii) xform=ii ;; 1051 *.class) xform=class ;; 1052 *.cpp) xform=cpp ;; 1053 *.cxx) xform=cxx ;; 1054 *.f90) xform=f90 ;; 1055 *.for) xform=for ;; 1056 *.java) xform=java ;; 1057 esac 1058 1059 libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"` 1060 1061 case $libobj in 1062 *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;; 1063 *) 1064 $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2 1065 exit $EXIT_FAILURE 1066 ;; 1067 esac 1068 1069 func_infer_tag $base_compile 1070 1071 for arg in $later; do 1072 case $arg in 1073 -static) 1074 build_old_libs=yes 1075 continue 1076 ;; 1077 1078 -prefer-pic) 1079 pic_mode=yes 1080 continue 1081 ;; 1082 1083 -prefer-non-pic) 1084 pic_mode=no 1085 continue 1086 ;; 1087 esac 1088 done 1089 1090 objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'` 1091 xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'` 1092 if test "X$xdir" = "X$obj"; then 1093 xdir= 1094 else 1095 xdir=$xdir/ 1096 fi 1097 lobj=${xdir}$objdir/$objname 1098 1099 if test -z "$base_compile"; then 1100 $echo "$modename: you must specify a compilation command" 1>&2 1101 $echo "$help" 1>&2 1102 exit $EXIT_FAILURE 1103 fi 1104 1105 # Delete any leftover library objects. 1106 if test "$build_old_libs" = yes; then 1107 removelist="$obj $lobj $libobj ${libobj}T" 1108 else 1109 removelist="$lobj $libobj ${libobj}T" 1110 fi 1111 1112 $run $rm $removelist 1113 trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15 1114 1115 # On Cygwin there's no "real" PIC flag so we must build both object types 1116 case $host_os in 1117 cygwin* | mingw* | pw32* | os2*) 1118 pic_mode=default 1119 ;; 1120 esac 1121 if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then 1122 # non-PIC code in shared libraries is not supported 1123 pic_mode=default 1124 fi 1125 1126 # Calculate the filename of the output object if compiler does 1127 # not support -o with -c 1128 if test "$compiler_c_o" = no; then 1129 output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext} 1130 lockfile="$output_obj.lock" 1131 removelist="$removelist $output_obj $lockfile" 1132 trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15 1133 else 1134 output_obj= 1135 need_locks=no 1136 lockfile= 1137 fi 1138 1139 # Lock this critical section if it is needed 1140 # We use this script file to make the link, it avoids creating a new file 1141 if test "$need_locks" = yes; then 1142 until $run ln "$progpath" "$lockfile" 2>/dev/null; do 1143 $show "Waiting for $lockfile to be removed" 1144 sleep 2 1145 done 1146 elif test "$need_locks" = warn; then 1147 if test -f "$lockfile"; then 1148 $echo "\ 1149*** ERROR, $lockfile exists and contains: 1150`cat $lockfile 2>/dev/null` 1151 1152This indicates that another process is trying to use the same 1153temporary object file, and libtool could not work around it because 1154your compiler does not support \`-c' and \`-o' together. If you 1155repeat this compilation, it may succeed, by chance, but you had better 1156avoid parallel builds (make -j) in this platform, or get a better 1157compiler." 1158 1159 $run $rm $removelist 1160 exit $EXIT_FAILURE 1161 fi 1162 $echo $srcfile > "$lockfile" 1163 fi 1164 1165 if test -n "$fix_srcfile_path"; then 1166 eval srcfile=\"$fix_srcfile_path\" 1167 fi 1168 1169 $run $rm "$libobj" "${libobj}T" 1170 1171 # Create a libtool object file (analogous to a ".la" file), 1172 # but don't create it if we're doing a dry run. 1173 test -z "$run" && cat > ${libobj}T <<EOF 1174# $libobj - a libtool object file 1175# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP 1176# 1177# Please DO NOT delete this file! 1178# It is necessary for linking the library. 1179 1180# Name of the PIC object. 1181EOF 1182 1183 # Only build a PIC object if we are building libtool libraries. 1184 if test "$build_libtool_libs" = yes; then 1185 # Without this assignment, base_compile gets emptied. 1186 fbsd_hideous_sh_bug=$base_compile 1187 1188 if test "$pic_mode" != no; then 1189 command="$base_compile $srcfile $pic_flag" 1190 else 1191 # Don't build PIC code 1192 command="$base_compile $srcfile" 1193 fi 1194 1195 if test ! -d "${xdir}$objdir"; then 1196 $show "$mkdir ${xdir}$objdir" 1197 $run $mkdir ${xdir}$objdir 1198 status=$? 1199 if test "$status" -ne 0 && test ! -d "${xdir}$objdir"; then 1200 exit $status 1201 fi 1202 $show "chmod 777 ${xdir}$objdir" 1203 $run chmod 777 ${xdir}$objdir 1204 fi 1205 1206 if test -z "$output_obj"; then 1207 # Place PIC objects in $objdir 1208 command="$command -o $lobj" 1209 fi 1210 1211 $run $rm "$lobj" "$output_obj" 1212 1213 $show "$command" 1214 if $run eval "$command"; then : 1215 else 1216 test -n "$output_obj" && $run $rm $removelist 1217 exit $EXIT_FAILURE 1218 fi 1219 1220 if test "$need_locks" = warn && 1221 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then 1222 $echo "\ 1223*** ERROR, $lockfile contains: 1224`cat $lockfile 2>/dev/null` 1225 1226but it should contain: 1227$srcfile 1228 1229This indicates that another process is trying to use the same 1230temporary object file, and libtool could not work around it because 1231your compiler does not support \`-c' and \`-o' together. If you 1232repeat this compilation, it may succeed, by chance, but you had better 1233avoid parallel builds (make -j) in this platform, or get a better 1234compiler." 1235 1236 $run $rm $removelist 1237 exit $EXIT_FAILURE 1238 fi 1239 1240 # Just move the object if needed, then go on to compile the next one 1241 if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then 1242 $show "$mv $output_obj $lobj" 1243 if $run $mv $output_obj $lobj; then : 1244 else 1245 error=$? 1246 $run $rm $removelist 1247 exit $error 1248 fi 1249 fi 1250 1251 # Append the name of the PIC object to the libtool object file. 1252 test -z "$run" && cat >> ${libobj}T <<EOF 1253pic_object='$objdir/$objname' 1254 1255EOF 1256 1257 # Allow error messages only from the first compilation. 1258 if test "$suppress_opt" = yes; then 1259 suppress_output=' >/dev/null 2>&1' 1260 fi 1261 else 1262 # No PIC object so indicate it doesn't exist in the libtool 1263 # object file. 1264 test -z "$run" && cat >> ${libobj}T <<EOF 1265pic_object=none 1266 1267EOF 1268 fi 1269 1270 # Only build a position-dependent object if we build old libraries. 1271 if test "$build_old_libs" = yes; then 1272 if test "$pic_mode" != yes; then 1273 # Don't build PIC code 1274 command="$base_compile $srcfile" 1275 else 1276 command="$base_compile $srcfile $pic_flag" 1277 fi 1278 if test "$compiler_c_o" = yes; then 1279 command="$command -o $obj" 1280 fi 1281 1282 # Suppress compiler output if we already did a PIC compilation. 1283 command="$command$suppress_output" 1284 $run $rm "$obj" "$output_obj" 1285 $show "$command" 1286 if $run eval "$command"; then : 1287 else 1288 $run $rm $removelist 1289 exit $EXIT_FAILURE 1290 fi 1291 1292 if test "$need_locks" = warn && 1293 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then 1294 $echo "\ 1295*** ERROR, $lockfile contains: 1296`cat $lockfile 2>/dev/null` 1297 1298but it should contain: 1299$srcfile 1300 1301This indicates that another process is trying to use the same 1302temporary object file, and libtool could not work around it because 1303your compiler does not support \`-c' and \`-o' together. If you 1304repeat this compilation, it may succeed, by chance, but you had better 1305avoid parallel builds (make -j) in this platform, or get a better 1306compiler." 1307 1308 $run $rm $removelist 1309 exit $EXIT_FAILURE 1310 fi 1311 1312 # Just move the object if needed 1313 if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then 1314 $show "$mv $output_obj $obj" 1315 if $run $mv $output_obj $obj; then : 1316 else 1317 error=$? 1318 $run $rm $removelist 1319 exit $error 1320 fi 1321 fi 1322 1323 # Append the name of the non-PIC object the libtool object file. 1324 # Only append if the libtool object file exists. 1325 test -z "$run" && cat >> ${libobj}T <<EOF 1326# Name of the non-PIC object. 1327non_pic_object='$objname' 1328 1329EOF 1330 else 1331 # Append the name of the non-PIC object the libtool object file. 1332 # Only append if the libtool object file exists. 1333 test -z "$run" && cat >> ${libobj}T <<EOF 1334# Name of the non-PIC object. 1335non_pic_object=none 1336 1337EOF 1338 fi 1339 1340 $run $mv "${libobj}T" "${libobj}" 1341 1342 # Unlock the critical section if it was locked 1343 if test "$need_locks" != no; then 1344 $run $rm "$lockfile" 1345 fi 1346 1347 exit $EXIT_SUCCESS 1348 ;; 1349 1350 # libtool link mode 1351 link | relink) 1352 modename="$modename: link" 1353 case $host in 1354 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) 1355 # It is impossible to link a dll without this setting, and 1356 # we shouldn't force the makefile maintainer to figure out 1357 # which system we are compiling for in order to pass an extra 1358 # flag for every libtool invocation. 1359 # allow_undefined=no 1360 1361 # FIXME: Unfortunately, there are problems with the above when trying 1362 # to make a dll which has undefined symbols, in which case not 1363 # even a static library is built. For now, we need to specify 1364 # -no-undefined on the libtool link line when we can be certain 1365 # that all symbols are satisfied, otherwise we get a static library. 1366 allow_undefined=yes 1367 ;; 1368 *) 1369 allow_undefined=yes 1370 ;; 1371 esac 1372 libtool_args="$nonopt" 1373 base_compile="$nonopt $@" 1374 compile_command="$nonopt" 1375 finalize_command="$nonopt" 1376 1377 compile_rpath= 1378 finalize_rpath= 1379 compile_shlibpath= 1380 finalize_shlibpath= 1381 convenience= 1382 old_convenience= 1383 deplibs= 1384 old_deplibs= 1385 compiler_flags= 1386 linker_flags= 1387 dllsearchpath= 1388 lib_search_path=`pwd` 1389 inst_prefix_dir= 1390 1391 avoid_version=no 1392 dlfiles= 1393 dlprefiles= 1394 dlself=no 1395 export_dynamic=no 1396 export_symbols= 1397 export_symbols_regex= 1398 generated= 1399 libobjs= 1400 ltlibs= 1401 module=no 1402 no_install=no 1403 objs= 1404 non_pic_objects= 1405 precious_files_regex= 1406 prefer_static_libs=no 1407 preload=no 1408 prev= 1409 prevarg= 1410 release= 1411 rpath= 1412 xrpath= 1413 perm_rpath= 1414 temp_rpath= 1415 thread_safe=no 1416 vinfo= 1417 vinfo_number=no 1418 1419 func_infer_tag $base_compile 1420 1421 # We need to know -static, to get the right output filenames. 1422 for arg 1423 do 1424 case $arg in 1425 -all-static | -static) 1426 if test "X$arg" = "X-all-static"; then 1427 if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then 1428 $echo "$modename: warning: complete static linking is impossible in this configuration" 1>&2 1429 fi 1430 if test -n "$link_static_flag"; then 1431 dlopen_self=$dlopen_self_static 1432 fi 1433 else 1434 if test -z "$pic_flag" && test -n "$link_static_flag"; then 1435 dlopen_self=$dlopen_self_static 1436 fi 1437 fi 1438 build_libtool_libs=no 1439 build_old_libs=yes 1440 prefer_static_libs=yes 1441 break 1442 ;; 1443 esac 1444 done 1445 1446 # See if our shared archives depend on static archives. 1447 test -n "$old_archive_from_new_cmds" && build_old_libs=yes 1448 1449 # Go through the arguments, transforming them on the way. 1450 while test "$#" -gt 0; do 1451 arg="$1" 1452 shift 1453 case $arg in 1454 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") 1455 qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test 1456 ;; 1457 *) qarg=$arg ;; 1458 esac 1459 libtool_args="$libtool_args $qarg" 1460 1461 # If the previous option needs an argument, assign it. 1462 if test -n "$prev"; then 1463 case $prev in 1464 output) 1465 compile_command="$compile_command @OUTPUT@" 1466 finalize_command="$finalize_command @OUTPUT@" 1467 ;; 1468 esac 1469 1470 case $prev in 1471 dlfiles|dlprefiles) 1472 if test "$preload" = no; then 1473 # Add the symbol object into the linking commands. 1474 compile_command="$compile_command @SYMFILE@" 1475 finalize_command="$finalize_command @SYMFILE@" 1476 preload=yes 1477 fi 1478 case $arg in 1479 *.la | *.lo) ;; # We handle these cases below. 1480 force) 1481 if test "$dlself" = no; then 1482 dlself=needless 1483 export_dynamic=yes 1484 fi 1485 prev= 1486 continue 1487 ;; 1488 self) 1489 if test "$prev" = dlprefiles; then 1490 dlself=yes 1491 elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then 1492 dlself=yes 1493 else 1494 dlself=needless 1495 export_dynamic=yes 1496 fi 1497 prev= 1498 continue 1499 ;; 1500 *) 1501 if test "$prev" = dlfiles; then 1502 dlfiles="$dlfiles $arg" 1503 else 1504 dlprefiles="$dlprefiles $arg" 1505 fi 1506 prev= 1507 continue 1508 ;; 1509 esac 1510 ;; 1511 expsyms) 1512 export_symbols="$arg" 1513 if test ! -f "$arg"; then 1514 $echo "$modename: symbol file \`$arg' does not exist" 1515 exit $EXIT_FAILURE 1516 fi 1517 prev= 1518 continue 1519 ;; 1520 expsyms_regex) 1521 export_symbols_regex="$arg" 1522 prev= 1523 continue 1524 ;; 1525 inst_prefix) 1526 inst_prefix_dir="$arg" 1527 prev= 1528 continue 1529 ;; 1530 precious_regex) 1531 precious_files_regex="$arg" 1532 prev= 1533 continue 1534 ;; 1535 release) 1536 release="-$arg" 1537 prev= 1538 continue 1539 ;; 1540 objectlist) 1541 if test -f "$arg"; then 1542 save_arg=$arg 1543 moreargs= 1544 for fil in `cat $save_arg` 1545 do 1546# moreargs="$moreargs $fil" 1547 arg=$fil 1548 # A libtool-controlled object. 1549 1550 # Check to see that this really is a libtool object. 1551 if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then 1552 pic_object= 1553 non_pic_object= 1554 1555 # Read the .lo file 1556 # If there is no directory component, then add one. 1557 case $arg in 1558 */* | *\\*) . $arg ;; 1559 *) . ./$arg ;; 1560 esac 1561 1562 if test -z "$pic_object" || \ 1563 test -z "$non_pic_object" || 1564 test "$pic_object" = none && \ 1565 test "$non_pic_object" = none; then 1566 $echo "$modename: cannot find name of object for \`$arg'" 1>&2 1567 exit $EXIT_FAILURE 1568 fi 1569 1570 # Extract subdirectory from the argument. 1571 xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` 1572 if test "X$xdir" = "X$arg"; then 1573 xdir= 1574 else 1575 xdir="$xdir/" 1576 fi 1577 1578 if test "$pic_object" != none; then 1579 # Prepend the subdirectory the object is found in. 1580 pic_object="$xdir$pic_object" 1581 1582 if test "$prev" = dlfiles; then 1583 if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then 1584 dlfiles="$dlfiles $pic_object" 1585 prev= 1586 continue 1587 else 1588 # If libtool objects are unsupported, then we need to preload. 1589 prev=dlprefiles 1590 fi 1591 fi 1592 1593 # CHECK ME: I think I busted this. -Ossama 1594 if test "$prev" = dlprefiles; then 1595 # Preload the old-style object. 1596 dlprefiles="$dlprefiles $pic_object" 1597 prev= 1598 fi 1599 1600 # A PIC object. 1601 libobjs="$libobjs $pic_object" 1602 arg="$pic_object" 1603 fi 1604 1605 # Non-PIC object. 1606 if test "$non_pic_object" != none; then 1607 # Prepend the subdirectory the object is found in. 1608 non_pic_object="$xdir$non_pic_object" 1609 1610 # A standard non-PIC object 1611 non_pic_objects="$non_pic_objects $non_pic_object" 1612 if test -z "$pic_object" || test "$pic_object" = none ; then 1613 arg="$non_pic_object" 1614 fi 1615 fi 1616 else 1617 # Only an error if not doing a dry-run. 1618 if test -z "$run"; then 1619 $echo "$modename: \`$arg' is not a valid libtool object" 1>&2 1620 exit $EXIT_FAILURE 1621 else 1622 # Dry-run case. 1623 1624 # Extract subdirectory from the argument. 1625 xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` 1626 if test "X$xdir" = "X$arg"; then 1627 xdir= 1628 else 1629 xdir="$xdir/" 1630 fi 1631 1632 pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"` 1633 non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"` 1634 libobjs="$libobjs $pic_object" 1635 non_pic_objects="$non_pic_objects $non_pic_object" 1636 fi 1637 fi 1638 done 1639 else 1640 $echo "$modename: link input file \`$save_arg' does not exist" 1641 exit $EXIT_FAILURE 1642 fi 1643 arg=$save_arg 1644 prev= 1645 continue 1646 ;; 1647 rpath | xrpath) 1648 # We need an absolute path. 1649 case $arg in 1650 [\\/]* | [A-Za-z]:[\\/]*) ;; 1651 *) 1652 $echo "$modename: only absolute run-paths are allowed" 1>&2 1653 exit $EXIT_FAILURE 1654 ;; 1655 esac 1656 if test "$prev" = rpath; then 1657 case "$rpath " in 1658 *" $arg "*) ;; 1659 *) rpath="$rpath $arg" ;; 1660 esac 1661 else 1662 case "$xrpath " in 1663 *" $arg "*) ;; 1664 *) xrpath="$xrpath $arg" ;; 1665 esac 1666 fi 1667 prev= 1668 continue 1669 ;; 1670 xcompiler) 1671 compiler_flags="$compiler_flags $qarg" 1672 prev= 1673 compile_command="$compile_command $qarg" 1674 finalize_command="$finalize_command $qarg" 1675 continue 1676 ;; 1677 xlinker) 1678 linker_flags="$linker_flags $qarg" 1679 compiler_flags="$compiler_flags $wl$qarg" 1680 prev= 1681 compile_command="$compile_command $wl$qarg" 1682 finalize_command="$finalize_command $wl$qarg" 1683 continue 1684 ;; 1685 xcclinker) 1686 linker_flags="$linker_flags $qarg" 1687 compiler_flags="$compiler_flags $qarg" 1688 prev= 1689 compile_command="$compile_command $qarg" 1690 finalize_command="$finalize_command $qarg" 1691 continue 1692 ;; 1693 shrext) 1694 shrext_cmds="$arg" 1695 prev= 1696 continue 1697 ;; 1698 *) 1699 eval "$prev=\"\$arg\"" 1700 prev= 1701 continue 1702 ;; 1703 esac 1704 fi # test -n "$prev" 1705 1706 prevarg="$arg" 1707 1708 case $arg in 1709 -all-static) 1710 if test -n "$link_static_flag"; then 1711 compile_command="$compile_command $link_static_flag" 1712 finalize_command="$finalize_command $link_static_flag" 1713 fi 1714 continue 1715 ;; 1716 1717 -allow-undefined) 1718 # FIXME: remove this flag sometime in the future. 1719 $echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2 1720 continue 1721 ;; 1722 1723 -avoid-version) 1724 avoid_version=yes 1725 continue 1726 ;; 1727 1728 -dlopen) 1729 prev=dlfiles 1730 continue 1731 ;; 1732 1733 -dlpreopen) 1734 prev=dlprefiles 1735 continue 1736 ;; 1737 1738 -export-dynamic) 1739 export_dynamic=yes 1740 continue 1741 ;; 1742 1743 -export-symbols | -export-symbols-regex) 1744 if test -n "$export_symbols" || test -n "$export_symbols_regex"; then 1745 $echo "$modename: more than one -exported-symbols argument is not allowed" 1746 exit $EXIT_FAILURE 1747 fi 1748 if test "X$arg" = "X-export-symbols"; then 1749 prev=expsyms 1750 else 1751 prev=expsyms_regex 1752 fi 1753 continue 1754 ;; 1755 1756 -inst-prefix-dir) 1757 prev=inst_prefix 1758 continue 1759 ;; 1760 1761 # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* 1762 # so, if we see these flags be careful not to treat them like -L 1763 -L[A-Z][A-Z]*:*) 1764 case $with_gcc/$host in 1765 no/*-*-irix* | /*-*-irix*) 1766 compile_command="$compile_command $arg" 1767 finalize_command="$finalize_command $arg" 1768 ;; 1769 esac 1770 continue 1771 ;; 1772 1773 -L*) 1774 dir=`$echo "X$arg" | $Xsed -e 's/^-L//'` 1775 # We need an absolute path. 1776 case $dir in 1777 [\\/]* | [A-Za-z]:[\\/]*) ;; 1778 *) 1779 absdir=`cd "$dir" && pwd` 1780 if test -z "$absdir"; then 1781 $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2 1782 exit $EXIT_FAILURE 1783 fi 1784 dir="$absdir" 1785 ;; 1786 esac 1787 case "$deplibs " in 1788 *" -L$dir "*) ;; 1789 *) 1790 deplibs="$deplibs -L$dir" 1791 lib_search_path="$lib_search_path $dir" 1792 ;; 1793 esac 1794 case $host in 1795 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) 1796 case :$dllsearchpath: in 1797 *":$dir:"*) ;; 1798 *) dllsearchpath="$dllsearchpath:$dir";; 1799 esac 1800 ;; 1801 esac 1802 continue 1803 ;; 1804 1805 -l*) 1806 if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then 1807 case $host in 1808 *-*-cygwin* | *-*-pw32* | *-*-beos*) 1809 # These systems don't actually have a C or math library (as such) 1810 continue 1811 ;; 1812 *-*-mingw* | *-*-os2*) 1813 # These systems don't actually have a C library (as such) 1814 test "X$arg" = "X-lc" && continue 1815 ;; 1816 *-*-openbsd* | *-*-freebsd*) 1817 # Do not include libc due to us having libc/libc_r. 1818 test "X$arg" = "X-lc" && continue 1819 ;; 1820 *-*-rhapsody* | *-*-darwin1.[012]) 1821 # Rhapsody C and math libraries are in the System framework 1822 deplibs="$deplibs -framework System" 1823 continue 1824 esac 1825 elif test "X$arg" = "X-lc_r"; then 1826 case $host in 1827 *-*-openbsd* | *-*-freebsd*) 1828 # Do not include libc_r directly, use -pthread flag. 1829 continue 1830 ;; 1831 esac 1832 fi 1833 deplibs="$deplibs $arg" 1834 continue 1835 ;; 1836 1837 -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe) 1838 deplibs="$deplibs $arg" 1839 continue 1840 ;; 1841 1842 -module) 1843 module=yes 1844 continue 1845 ;; 1846 1847 # gcc -m* arguments should be passed to the linker via $compiler_flags 1848 # in order to pass architecture information to the linker 1849 # (e.g. 32 vs 64-bit). This may also be accomplished via -Wl,-mfoo 1850 # but this is not reliable with gcc because gcc may use -mfoo to 1851 # select a different linker, different libraries, etc, while 1852 # -Wl,-mfoo simply passes -mfoo to the linker. 1853 -m*) 1854 # Unknown arguments in both finalize_command and compile_command need 1855 # to be aesthetically quoted because they are evaled later. 1856 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` 1857 case $arg in 1858 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") 1859 arg="\"$arg\"" 1860 ;; 1861 esac 1862 compile_command="$compile_command $arg" 1863 finalize_command="$finalize_command $arg" 1864 if test "$with_gcc" = "yes" ; then 1865 compiler_flags="$compiler_flags $arg" 1866 fi 1867 continue 1868 ;; 1869 1870 -shrext) 1871 prev=shrext 1872 continue 1873 ;; 1874 1875 -no-fast-install) 1876 fast_install=no 1877 continue 1878 ;; 1879 1880 -no-install) 1881 case $host in 1882 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) 1883 # The PATH hackery in wrapper scripts is required on Windows 1884 # in order for the loader to find any dlls it needs. 1885 $echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2 1886 $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2 1887 fast_install=no 1888 ;; 1889 *) no_install=yes ;; 1890 esac 1891 continue 1892 ;; 1893 1894 -no-undefined) 1895 allow_undefined=no 1896 continue 1897 ;; 1898 1899 -objectlist) 1900 prev=objectlist 1901 continue 1902 ;; 1903 1904 -o) prev=output ;; 1905 1906 -precious-files-regex) 1907 prev=precious_regex 1908 continue 1909 ;; 1910 1911 -release) 1912 prev=release 1913 continue 1914 ;; 1915 1916 -rpath) 1917 prev=rpath 1918 continue 1919 ;; 1920 1921 -R) 1922 prev=xrpath 1923 continue 1924 ;; 1925 1926 -R*) 1927 dir=`$echo "X$arg" | $Xsed -e 's/^-R//'` 1928 # We need an absolute path. 1929 case $dir in 1930 [\\/]* | [A-Za-z]:[\\/]*) ;; 1931 *) 1932 $echo "$modename: only absolute run-paths are allowed" 1>&2 1933 exit $EXIT_FAILURE 1934 ;; 1935 esac 1936 case "$xrpath " in 1937 *" $dir "*) ;; 1938 *) xrpath="$xrpath $dir" ;; 1939 esac 1940 continue 1941 ;; 1942 1943 -static) 1944 # The effects of -static are defined in a previous loop. 1945 # We used to do the same as -all-static on platforms that 1946 # didn't have a PIC flag, but the assumption that the effects 1947 # would be equivalent was wrong. It would break on at least 1948 # Digital Unix and AIX. 1949 continue 1950 ;; 1951 1952 -thread-safe) 1953 thread_safe=yes 1954 continue 1955 ;; 1956 1957 -version-info) 1958 prev=vinfo 1959 continue 1960 ;; 1961 -version-number) 1962 prev=vinfo 1963 vinfo_number=yes 1964 continue 1965 ;; 1966 1967 -Wc,*) 1968 args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'` 1969 arg= 1970 save_ifs="$IFS"; IFS=',' 1971 for flag in $args; do 1972 IFS="$save_ifs" 1973 case $flag in 1974 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") 1975 flag="\"$flag\"" 1976 ;; 1977 esac 1978 arg="$arg $wl$flag" 1979 compiler_flags="$compiler_flags $flag" 1980 done 1981 IFS="$save_ifs" 1982 arg=`$echo "X$arg" | $Xsed -e "s/^ //"` 1983 ;; 1984 1985 -Wl,*) 1986 args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'` 1987 arg= 1988 save_ifs="$IFS"; IFS=',' 1989 for flag in $args; do 1990 IFS="$save_ifs" 1991 case $flag in 1992 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") 1993 flag="\"$flag\"" 1994 ;; 1995 esac 1996 arg="$arg $wl$flag" 1997 compiler_flags="$compiler_flags $wl$flag" 1998 linker_flags="$linker_flags $flag" 1999 done 2000 IFS="$save_ifs" 2001 arg=`$echo "X$arg" | $Xsed -e "s/^ //"` 2002 ;; 2003 2004 -Xcompiler) 2005 prev=xcompiler 2006 continue 2007 ;; 2008 2009 -Xlinker) 2010 prev=xlinker 2011 continue 2012 ;; 2013 2014 -XCClinker) 2015 prev=xcclinker 2016 continue 2017 ;; 2018 2019 # Some other compiler flag. 2020 -* | +*) 2021 # Unknown arguments in both finalize_command and compile_command need 2022 # to be aesthetically quoted because they are evaled later. 2023 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` 2024 case $arg in 2025 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") 2026 arg="\"$arg\"" 2027 ;; 2028 esac 2029 ;; 2030 2031 *.$objext) 2032 # A standard object. 2033 objs="$objs $arg" 2034 ;; 2035 2036 *.lo) 2037 # A libtool-controlled object. 2038 2039 # Check to see that this really is a libtool object. 2040 if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then 2041 pic_object= 2042 non_pic_object= 2043 2044 # Read the .lo file 2045 # If there is no directory component, then add one. 2046 case $arg in 2047 */* | *\\*) . $arg ;; 2048 *) . ./$arg ;; 2049 esac 2050 2051 if test -z "$pic_object" || \ 2052 test -z "$non_pic_object" || 2053 test "$pic_object" = none && \ 2054 test "$non_pic_object" = none; then 2055 $echo "$modename: cannot find name of object for \`$arg'" 1>&2 2056 exit $EXIT_FAILURE 2057 fi 2058 2059 # Extract subdirectory from the argument. 2060 xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` 2061 if test "X$xdir" = "X$arg"; then 2062 xdir= 2063 else 2064 xdir="$xdir/" 2065 fi 2066 2067 if test "$pic_object" != none; then 2068 # Prepend the subdirectory the object is found in. 2069 pic_object="$xdir$pic_object" 2070 2071 if test "$prev" = dlfiles; then 2072 if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then 2073 dlfiles="$dlfiles $pic_object" 2074 prev= 2075 continue 2076 else 2077 # If libtool objects are unsupported, then we need to preload. 2078 prev=dlprefiles 2079 fi 2080 fi 2081 2082 # CHECK ME: I think I busted this. -Ossama 2083 if test "$prev" = dlprefiles; then 2084 # Preload the old-style object. 2085 dlprefiles="$dlprefiles $pic_object" 2086 prev= 2087 fi 2088 2089 # A PIC object. 2090 libobjs="$libobjs $pic_object" 2091 arg="$pic_object" 2092 fi 2093 2094 # Non-PIC object. 2095 if test "$non_pic_object" != none; then 2096 # Prepend the subdirectory the object is found in. 2097 non_pic_object="$xdir$non_pic_object" 2098 2099 # A standard non-PIC object 2100 non_pic_objects="$non_pic_objects $non_pic_object" 2101 if test -z "$pic_object" || test "$pic_object" = none ; then 2102 arg="$non_pic_object" 2103 fi 2104 fi 2105 else 2106 # Only an error if not doing a dry-run. 2107 if test -z "$run"; then 2108 $echo "$modename: \`$arg' is not a valid libtool object" 1>&2 2109 exit $EXIT_FAILURE 2110 else 2111 # Dry-run case. 2112 2113 # Extract subdirectory from the argument. 2114 xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` 2115 if test "X$xdir" = "X$arg"; then 2116 xdir= 2117 else 2118 xdir="$xdir/" 2119 fi 2120 2121 pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"` 2122 non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"` 2123 libobjs="$libobjs $pic_object" 2124 non_pic_objects="$non_pic_objects $non_pic_object" 2125 fi 2126 fi 2127 ;; 2128 2129 *.$libext) 2130 # An archive. 2131 deplibs="$deplibs $arg" 2132 old_deplibs="$old_deplibs $arg" 2133 continue 2134 ;; 2135 2136 *.la) 2137 # A libtool-controlled library. 2138 2139 if test "$prev" = dlfiles; then 2140 # This library was specified with -dlopen. 2141 dlfiles="$dlfiles $arg" 2142 prev= 2143 elif test "$prev" = dlprefiles; then 2144 # The library was specified with -dlpreopen. 2145 dlprefiles="$dlprefiles $arg" 2146 prev= 2147 else 2148 deplibs="$deplibs $arg" 2149 fi 2150 continue 2151 ;; 2152 2153 # Some other compiler argument. 2154 *) 2155 # Unknown arguments in both finalize_command and compile_command need 2156 # to be aesthetically quoted because they are evaled later. 2157 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` 2158 case $arg in 2159 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") 2160 arg="\"$arg\"" 2161 ;; 2162 esac 2163 ;; 2164 esac # arg 2165 2166 # Now actually substitute the argument into the commands. 2167 if test -n "$arg"; then 2168 compile_command="$compile_command $arg" 2169 finalize_command="$finalize_command $arg" 2170 fi 2171 done # argument parsing loop 2172 2173 if test -n "$prev"; then 2174 $echo "$modename: the \`$prevarg' option requires an argument" 1>&2 2175 $echo "$help" 1>&2 2176 exit $EXIT_FAILURE 2177 fi 2178 2179 if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then 2180 eval arg=\"$export_dynamic_flag_spec\" 2181 compile_command="$compile_command $arg" 2182 finalize_command="$finalize_command $arg" 2183 fi 2184 2185 oldlibs= 2186 # calculate the name of the file, without its directory 2187 outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'` 2188 libobjs_save="$libobjs" 2189 2190 if test -n "$shlibpath_var"; then 2191 # get the directories listed in $shlibpath_var 2192 eval shlib_search_path=\`\$echo \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\` 2193 else 2194 shlib_search_path= 2195 fi 2196 eval sys_lib_search_path=\"$sys_lib_search_path_spec\" 2197 eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" 2198 2199 output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'` 2200 if test "X$output_objdir" = "X$output"; then 2201 output_objdir="$objdir" 2202 else 2203 output_objdir="$output_objdir/$objdir" 2204 fi 2205 # Create the object directory. 2206 if test ! -d "$output_objdir"; then 2207 $show "$mkdir $output_objdir" 2208 $run $mkdir $output_objdir 2209 status=$? 2210 if test "$status" -ne 0 && test ! -d "$output_objdir"; then 2211 exit $status 2212 fi 2213 $show "chmod 777 $output_objdir" 2214 $run chmod 777 $output_objdir 2215 fi 2216 2217 # Determine the type of output 2218 case $output in 2219 "") 2220 $echo "$modename: you must specify an output file" 1>&2 2221 $echo "$help" 1>&2 2222 exit $EXIT_FAILURE 2223 ;; 2224 *.$libext) linkmode=oldlib ;; 2225 *.lo | *.$objext) linkmode=obj ;; 2226 *.la) linkmode=lib ;; 2227 *) linkmode=prog ;; # Anything else should be a program. 2228 esac 2229 2230 case $host in 2231 *cygwin* | *mingw* | *pw32*) 2232 # don't eliminate duplications in $postdeps and $predeps 2233 duplicate_compiler_generated_deps=yes 2234 ;; 2235 *) 2236 duplicate_compiler_generated_deps=$duplicate_deps 2237 ;; 2238 esac 2239 specialdeplibs= 2240 2241 libs= 2242 # Find all interdependent deplibs by searching for libraries 2243 # that are linked more than once (e.g. -la -lb -la) 2244 for deplib in $deplibs; do 2245 if test "X$duplicate_deps" = "Xyes" ; then 2246 case "$libs " in 2247 *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; 2248 esac 2249 fi 2250 libs="$libs $deplib" 2251 done 2252 2253 if test "$linkmode" = lib; then 2254 libs="$predeps $libs $compiler_lib_search_path $postdeps" 2255 2256 # Compute libraries that are listed more than once in $predeps 2257 # $postdeps and mark them as special (i.e., whose duplicates are 2258 # not to be eliminated). 2259 pre_post_deps= 2260 if test "X$duplicate_compiler_generated_deps" = "Xyes" ; then 2261 for pre_post_dep in $predeps $postdeps; do 2262 case "$pre_post_deps " in 2263 *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;; 2264 esac 2265 pre_post_deps="$pre_post_deps $pre_post_dep" 2266 done 2267 fi 2268 pre_post_deps= 2269 fi 2270 2271 deplibs= 2272 newdependency_libs= 2273 newlib_search_path= 2274 need_relink=no # whether we're linking any uninstalled libtool libraries 2275 notinst_deplibs= # not-installed libtool libraries 2276 notinst_path= # paths that contain not-installed libtool libraries 2277 case $linkmode in 2278 lib) 2279 passes="conv link" 2280 for file in $dlfiles $dlprefiles; do 2281 case $file in 2282 *.la) ;; 2283 *) 2284 $echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2 2285 exit $EXIT_FAILURE 2286 ;; 2287 esac 2288 done 2289 ;; 2290 prog) 2291 compile_deplibs= 2292 finalize_deplibs= 2293 alldeplibs=no 2294 newdlfiles= 2295 newdlprefiles= 2296 passes="conv scan dlopen dlpreopen link" 2297 ;; 2298 *) passes="conv" 2299 ;; 2300 esac 2301 for pass in $passes; do 2302 if test "$linkmode,$pass" = "lib,link" || 2303 test "$linkmode,$pass" = "prog,scan"; then 2304 libs="$deplibs" 2305 deplibs= 2306 fi 2307 if test "$linkmode" = prog; then 2308 case $pass in 2309 dlopen) libs="$dlfiles" ;; 2310 dlpreopen) libs="$dlprefiles" ;; 2311 link) libs="$deplibs %DEPLIBS% $dependency_libs" ;; 2312 esac 2313 fi 2314 if test "$pass" = dlopen; then 2315 # Collect dlpreopened libraries 2316 save_deplibs="$deplibs" 2317 deplibs= 2318 fi 2319 for deplib in $libs; do 2320 lib= 2321 found=no 2322 case $deplib in 2323 -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe) 2324 if test "$linkmode,$pass" = "prog,link"; then 2325 compile_deplibs="$deplib $compile_deplibs" 2326 finalize_deplibs="$deplib $finalize_deplibs" 2327 else 2328 deplibs="$deplib $deplibs" 2329 fi 2330 continue 2331 ;; 2332 -l*) 2333 if test "$linkmode" != lib && test "$linkmode" != prog; then 2334 $echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2 2335 continue 2336 fi 2337 if test "$pass" = conv; then 2338 deplibs="$deplib $deplibs" 2339 continue 2340 fi 2341 name=`$echo "X$deplib" | $Xsed -e 's/^-l//'` 2342 for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do 2343 for search_ext in .la $std_shrext .so .a; do 2344 # Search the libtool library 2345 lib="$searchdir/lib${name}${search_ext}" 2346 if test -f "$lib"; then 2347 if test "$search_ext" = ".la"; then 2348 found=yes 2349 else 2350 found=no 2351 fi 2352 break 2 2353 fi 2354 done 2355 done 2356 if test "$found" != yes; then 2357 # deplib doesn't seem to be a libtool library 2358 if test "$linkmode,$pass" = "prog,link"; then 2359 compile_deplibs="$deplib $compile_deplibs" 2360 finalize_deplibs="$deplib $finalize_deplibs" 2361 else 2362 deplibs="$deplib $deplibs" 2363 test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" 2364 fi 2365 continue 2366 else # deplib is a libtool library 2367 # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, 2368 # We need to do some special things here, and not later. 2369 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then 2370 case " $predeps $postdeps " in 2371 *" $deplib "*) 2372 if (${SED} -e '2q' $lib | 2373 grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then 2374 library_names= 2375 old_library= 2376 case $lib in 2377 */* | *\\*) . $lib ;; 2378 *) . ./$lib ;; 2379 esac 2380 for l in $old_library $library_names; do 2381 ll="$l" 2382 done 2383 if test "X$ll" = "X$old_library" ; then # only static version available 2384 found=no 2385 ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'` 2386 test "X$ladir" = "X$lib" && ladir="." 2387 lib=$ladir/$old_library 2388 if test "$linkmode,$pass" = "prog,link"; then 2389 compile_deplibs="$deplib $compile_deplibs" 2390 finalize_deplibs="$deplib $finalize_deplibs" 2391 else 2392 deplibs="$deplib $deplibs" 2393 test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" 2394 fi 2395 continue 2396 fi 2397 fi 2398 ;; 2399 *) ;; 2400 esac 2401 fi 2402 fi 2403 ;; # -l 2404 -L*) 2405 case $linkmode in 2406 lib) 2407 deplibs="$deplib $deplibs" 2408 test "$pass" = conv && continue 2409 newdependency_libs="$deplib $newdependency_libs" 2410 newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` 2411 ;; 2412 prog) 2413 if test "$pass" = conv; then 2414 deplibs="$deplib $deplibs" 2415 continue 2416 fi 2417 if test "$pass" = scan; then 2418 deplibs="$deplib $deplibs" 2419 else 2420 compile_deplibs="$deplib $compile_deplibs" 2421 finalize_deplibs="$deplib $finalize_deplibs" 2422 fi 2423 newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` 2424 ;; 2425 *) 2426 $echo "$modename: warning: \`-L' is ignored for archives/objects" 1>&2 2427 ;; 2428 esac # linkmode 2429 continue 2430 ;; # -L 2431 -R*) 2432 if test "$pass" = link; then 2433 dir=`$echo "X$deplib" | $Xsed -e 's/^-R//'` 2434 # Make sure the xrpath contains only unique directories. 2435 case "$xrpath " in 2436 *" $dir "*) ;; 2437 *) xrpath="$xrpath $dir" ;; 2438 esac 2439 fi 2440 deplibs="$deplib $deplibs" 2441 continue 2442 ;; 2443 *.la) lib="$deplib" ;; 2444 *.$libext) 2445 if test "$pass" = conv; then 2446 deplibs="$deplib $deplibs" 2447 continue 2448 fi 2449 case $linkmode in 2450 lib) 2451 valid_a_lib=no 2452 case $deplibs_check_method in 2453 match_pattern*) 2454 set dummy $deplibs_check_method 2455 match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"` 2456 if eval $echo \"$deplib\" 2>/dev/null \ 2457 | $SED 10q \ 2458 | $EGREP "$match_pattern_regex" > /dev/null; then 2459 valid_a_lib=yes 2460 fi 2461 ;; 2462 pass_all) 2463 valid_a_lib=yes 2464 ;; 2465 esac 2466 if test "$valid_a_lib" != yes; then 2467 $echo 2468 $echo "*** Warning: Trying to link with static lib archive $deplib." 2469 $echo "*** I have the capability to make that library automatically link in when" 2470 $echo "*** you link to this library. But I can only do this if you have a" 2471 $echo "*** shared version of the library, which you do not appear to have" 2472 $echo "*** because the file extensions .$libext of this argument makes me believe" 2473 $echo "*** that it is just a static archive that I should not used here." 2474 else 2475 $echo 2476 $echo "*** Warning: Linking the shared library $output against the" 2477 $echo "*** static library $deplib is not portable!" 2478 deplibs="$deplib $deplibs" 2479 fi 2480 continue 2481 ;; 2482 prog) 2483 if test "$pass" != link; then 2484 deplibs="$deplib $deplibs" 2485 else 2486 compile_deplibs="$deplib $compile_deplibs" 2487 finalize_deplibs="$deplib $finalize_deplibs" 2488 fi 2489 continue 2490 ;; 2491 esac # linkmode 2492 ;; # *.$libext 2493 *.lo | *.$objext) 2494 if test "$pass" = conv; then 2495 deplibs="$deplib $deplibs" 2496 elif test "$linkmode" = prog; then 2497 if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then 2498 # If there is no dlopen support or we're linking statically, 2499 # we need to preload. 2500 newdlprefiles="$newdlprefiles $deplib" 2501 compile_deplibs="$deplib $compile_deplibs" 2502 finalize_deplibs="$deplib $finalize_deplibs" 2503 else 2504 newdlfiles="$newdlfiles $deplib" 2505 fi 2506 fi 2507 continue 2508 ;; 2509 %DEPLIBS%) 2510 alldeplibs=yes 2511 continue 2512 ;; 2513 esac # case $deplib 2514 if test "$found" = yes || test -f "$lib"; then : 2515 else 2516 $echo "$modename: cannot find the library \`$lib'" 1>&2 2517 exit $EXIT_FAILURE 2518 fi 2519 2520 # Check to see that this really is a libtool archive. 2521 if (${SED} -e '2q' $lib | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : 2522 else 2523 $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 2524 exit $EXIT_FAILURE 2525 fi 2526 2527 ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'` 2528 test "X$ladir" = "X$lib" && ladir="." 2529 2530 dlname= 2531 dlopen= 2532 dlpreopen= 2533 libdir= 2534 library_names= 2535 old_library= 2536 # If the library was installed with an old release of libtool, 2537 # it will not redefine variables installed, or shouldnotlink 2538 installed=yes 2539 shouldnotlink=no 2540 2541 # Read the .la file 2542 case $lib in 2543 */* | *\\*) . $lib ;; 2544 *) . ./$lib ;; 2545 esac 2546 2547 if test "$linkmode,$pass" = "lib,link" || 2548 test "$linkmode,$pass" = "prog,scan" || 2549 { test "$linkmode" != prog && test "$linkmode" != lib; }; then 2550 test -n "$dlopen" && dlfiles="$dlfiles $dlopen" 2551 test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen" 2552 fi 2553 2554 if test "$pass" = conv; then 2555 # Only check for convenience libraries 2556 deplibs="$lib $deplibs" 2557 if test -z "$libdir"; then 2558 if test -z "$old_library"; then 2559 $echo "$modename: cannot find name of link library for \`$lib'" 1>&2 2560 exit $EXIT_FAILURE 2561 fi 2562 # It is a libtool convenience library, so add in its objects. 2563 convenience="$convenience $ladir/$objdir/$old_library" 2564 old_convenience="$old_convenience $ladir/$objdir/$old_library" 2565 tmp_libs= 2566 for deplib in $dependency_libs; do 2567 deplibs="$deplib $deplibs" 2568 if test "X$duplicate_deps" = "Xyes" ; then 2569 case "$tmp_libs " in 2570 *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; 2571 esac 2572 fi 2573 tmp_libs="$tmp_libs $deplib" 2574 done 2575 elif test "$linkmode" != prog && test "$linkmode" != lib; then 2576 $echo "$modename: \`$lib' is not a convenience library" 1>&2 2577 exit $EXIT_FAILURE 2578 fi 2579 continue 2580 fi # $pass = conv 2581 2582 2583 # Get the name of the library we link against. 2584 linklib= 2585 for l in $old_library $library_names; do 2586 linklib="$l" 2587 done 2588 if test -z "$linklib"; then 2589 $echo "$modename: cannot find name of link library for \`$lib'" 1>&2 2590 exit $EXIT_FAILURE 2591 fi 2592 2593 # This library was specified with -dlopen. 2594 if test "$pass" = dlopen; then 2595 if test -z "$libdir"; then 2596 $echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2 2597 exit $EXIT_FAILURE 2598 fi 2599 if test -z "$dlname" || 2600 test "$dlopen_support" != yes || 2601 test "$build_libtool_libs" = no; then 2602 # If there is no dlname, no dlopen support or we're linking 2603 # statically, we need to preload. We also need to preload any 2604 # dependent libraries so libltdl's deplib preloader doesn't 2605 # bomb out in the load deplibs phase. 2606 dlprefiles="$dlprefiles $lib $dependency_libs" 2607 else 2608 newdlfiles="$newdlfiles $lib" 2609 fi 2610 continue 2611 fi # $pass = dlopen 2612 2613 # We need an absolute path. 2614 case $ladir in 2615 [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;; 2616 *) 2617 abs_ladir=`cd "$ladir" && pwd` 2618 if test -z "$abs_ladir"; then 2619 $echo "$modename: warning: cannot determine absolute directory name of \`$ladir'" 1>&2 2620 $echo "$modename: passing it literally to the linker, although it might fail" 1>&2 2621 abs_ladir="$ladir" 2622 fi 2623 ;; 2624 esac 2625 laname=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` 2626 2627 # Find the relevant object directory and library name. 2628 if test "X$installed" = Xyes; then 2629 if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then 2630 $echo "$modename: warning: library \`$lib' was moved." 1>&2 2631 dir="$ladir" 2632 absdir="$abs_ladir" 2633 libdir="$abs_ladir" 2634 else 2635 dir="$libdir" 2636 absdir="$libdir" 2637 fi 2638 else 2639 if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then 2640 dir="$ladir" 2641 absdir="$abs_ladir" 2642 # Remove this search path later 2643 notinst_path="$notinst_path $abs_ladir" 2644 else 2645 dir="$ladir/$objdir" 2646 absdir="$abs_ladir/$objdir" 2647 # Remove this search path later 2648 notinst_path="$notinst_path $abs_ladir" 2649 fi 2650 fi # $installed = yes 2651 name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` 2652 2653 # This library was specified with -dlpreopen. 2654 if test "$pass" = dlpreopen; then 2655 if test -z "$libdir"; then 2656 $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2 2657 exit $EXIT_FAILURE 2658 fi 2659 # Prefer using a static library (so that no silly _DYNAMIC symbols 2660 # are required to link). 2661 if test -n "$old_library"; then 2662 newdlprefiles="$newdlprefiles $dir/$old_library" 2663 # Otherwise, use the dlname, so that lt_dlopen finds it. 2664 elif test -n "$dlname"; then 2665 newdlprefiles="$newdlprefiles $dir/$dlname" 2666 else 2667 newdlprefiles="$newdlprefiles $dir/$linklib" 2668 fi 2669 fi # $pass = dlpreopen 2670 2671 if test -z "$libdir"; then 2672 # Link the convenience library 2673 if test "$linkmode" = lib; then 2674 deplibs="$dir/$old_library $deplibs" 2675 elif test "$linkmode,$pass" = "prog,link"; then 2676 compile_deplibs="$dir/$old_library $compile_deplibs" 2677 finalize_deplibs="$dir/$old_library $finalize_deplibs" 2678 else 2679 deplibs="$lib $deplibs" # used for prog,scan pass 2680 fi 2681 continue 2682 fi 2683 2684 2685 if test "$linkmode" = prog && test "$pass" != link; then 2686 newlib_search_path="$newlib_search_path $ladir" 2687 deplibs="$lib $deplibs" 2688 2689 linkalldeplibs=no 2690 if test "$link_all_deplibs" != no || test -z "$library_names" || 2691 test "$build_libtool_libs" = no; then 2692 linkalldeplibs=yes 2693 fi 2694 2695 tmp_libs= 2696 for deplib in $dependency_libs; do 2697 case $deplib in 2698 -L*) newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test 2699 esac 2700 # Need to link against all dependency_libs? 2701 if test "$linkalldeplibs" = yes; then 2702 deplibs="$deplib $deplibs" 2703 else 2704 # Need to hardcode shared library paths 2705 # or/and link against static libraries 2706 newdependency_libs="$deplib $newdependency_libs" 2707 fi 2708 if test "X$duplicate_deps" = "Xyes" ; then 2709 case "$tmp_libs " in 2710 *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; 2711 esac 2712 fi 2713 tmp_libs="$tmp_libs $deplib" 2714 done # for deplib 2715 continue 2716 fi # $linkmode = prog... 2717 2718 if test "$linkmode,$pass" = "prog,link"; then 2719 if test -n "$library_names" && 2720 { test "$prefer_static_libs" = no || test -z "$old_library"; }; then 2721 # We need to hardcode the library path 2722 if test -n "$shlibpath_var"; then 2723 # Make sure the rpath contains only unique directories. 2724 case "$temp_rpath " in 2725 *" $dir "*) ;; 2726 *" $absdir "*) ;; 2727 *) temp_rpath="$temp_rpath $dir" ;; 2728 esac 2729 fi 2730 2731 # Hardcode the library path. 2732 # Skip directories that are in the system default run-time 2733 # search path. 2734 case " $sys_lib_dlsearch_path " in 2735 *" $absdir "*) ;; 2736 *) 2737 case "$compile_rpath " in 2738 *" $absdir "*) ;; 2739 *) compile_rpath="$compile_rpath $absdir" 2740 esac 2741 ;; 2742 esac 2743 case " $sys_lib_dlsearch_path " in 2744 *" $libdir "*) ;; 2745 *) 2746 case "$finalize_rpath " in 2747 *" $libdir "*) ;; 2748 *) finalize_rpath="$finalize_rpath $libdir" 2749 esac 2750 ;; 2751 esac 2752 fi # $linkmode,$pass = prog,link... 2753 2754 if test "$alldeplibs" = yes && 2755 { test "$deplibs_check_method" = pass_all || 2756 { test "$build_libtool_libs" = yes && 2757 test -n "$library_names"; }; }; then 2758 # We only need to search for static libraries 2759 continue 2760 fi 2761 fi 2762 2763 link_static=no # Whether the deplib will be linked statically 2764 if test -n "$library_names" && 2765 { test "$prefer_static_libs" = no || test -z "$old_library"; }; then 2766 if test "$installed" = no; then 2767 notinst_deplibs="$notinst_deplibs $lib" 2768 need_relink=yes 2769 fi 2770 # This is a shared library 2771 2772 # Warn about portability, can't link against -module's on 2773 # some systems (darwin) 2774 if test "$shouldnotlink" = yes && test "$pass" = link ; then 2775 $echo 2776 if test "$linkmode" = prog; then 2777 $echo "*** Warning: Linking the executable $output against the loadable module" 2778 else 2779 $echo "*** Warning: Linking the shared library $output against the loadable module" 2780 fi 2781 $echo "*** $linklib is not portable!" 2782 fi 2783 if test "$linkmode" = lib && 2784 test "$hardcode_into_libs" = yes; then 2785 # Hardcode the library path. 2786 # Skip directories that are in the system default run-time 2787 # search path. 2788 case " $sys_lib_dlsearch_path " in 2789 *" $absdir "*) ;; 2790 *) 2791 case "$compile_rpath " in 2792 *" $absdir "*) ;; 2793 *) compile_rpath="$compile_rpath $absdir" 2794 esac 2795 ;; 2796 esac 2797 case " $sys_lib_dlsearch_path " in 2798 *" $libdir "*) ;; 2799 *) 2800 case "$finalize_rpath " in 2801 *" $libdir "*) ;; 2802 *) finalize_rpath="$finalize_rpath $libdir" 2803 esac 2804 ;; 2805 esac 2806 fi 2807 2808 if test -n "$old_archive_from_expsyms_cmds"; then 2809 # figure out the soname 2810 set dummy $library_names 2811 realname="$2" 2812 shift; shift 2813 libname=`eval \\$echo \"$libname_spec\"` 2814 # use dlname if we got it. it's perfectly good, no? 2815 if test -n "$dlname"; then 2816 soname="$dlname" 2817 elif test -n "$soname_spec"; then 2818 # bleh windows 2819 case $host in 2820 *cygwin* | mingw*) 2821 major=`expr $current - $age` 2822 versuffix="-$major" 2823 ;; 2824 esac 2825 eval soname=\"$soname_spec\" 2826 else 2827 soname="$realname" 2828 fi 2829 2830 # Make a new name for the extract_expsyms_cmds to use 2831 soroot="$soname" 2832 soname=`$echo $soroot | ${SED} -e 's/^.*\///'` 2833 newlib="libimp-`$echo $soname | ${SED} 's/^lib//;s/\.dll$//'`.a" 2834 2835 # If the library has no export list, then create one now 2836 if test -f "$output_objdir/$soname-def"; then : 2837 else 2838 $show "extracting exported symbol list from \`$soname'" 2839 save_ifs="$IFS"; IFS='~' 2840 cmds=$extract_expsyms_cmds 2841 for cmd in $cmds; do 2842 IFS="$save_ifs" 2843 eval cmd=\"$cmd\" 2844 $show "$cmd" 2845 $run eval "$cmd" || exit $? 2846 done 2847 IFS="$save_ifs" 2848 fi 2849 2850 # Create $newlib 2851 if test -f "$output_objdir/$newlib"; then :; else 2852 $show "generating import library for \`$soname'" 2853 save_ifs="$IFS"; IFS='~' 2854 cmds=$old_archive_from_expsyms_cmds 2855 for cmd in $cmds; do 2856 IFS="$save_ifs" 2857 eval cmd=\"$cmd\" 2858 $show "$cmd" 2859 $run eval "$cmd" || exit $? 2860 done 2861 IFS="$save_ifs" 2862 fi 2863 # make sure the library variables are pointing to the new library 2864 dir=$output_objdir 2865 linklib=$newlib 2866 fi # test -n "$old_archive_from_expsyms_cmds" 2867 2868 if test "$linkmode" = prog || test "$mode" != relink; then 2869 add_shlibpath= 2870 add_dir= 2871 add= 2872 lib_linked=yes 2873 case $hardcode_action in 2874 immediate | unsupported) 2875 if test "$hardcode_direct" = no; then 2876 add="$dir/$linklib" 2877 case $host in 2878 *-*-sco3.2v5* ) add_dir="-L$dir" ;; 2879 *-*-darwin* ) 2880 # if the lib is a module then we can not link against 2881 # it, someone is ignoring the new warnings I added 2882 if /usr/bin/file -L $add 2> /dev/null | $EGREP "bundle" >/dev/null ; then 2883 $echo "** Warning, lib $linklib is a module, not a shared library" 2884 if test -z "$old_library" ; then 2885 $echo 2886 $echo "** And there doesn't seem to be a static archive available" 2887 $echo "** The link will probably fail, sorry" 2888 else 2889 add="$dir/$old_library" 2890 fi 2891 fi 2892 esac 2893 elif test "$hardcode_minus_L" = no; then 2894 case $host in 2895 *-*-sunos*) add_shlibpath="$dir" ;; 2896 esac 2897 add_dir="-L$dir" 2898 add="-l$name" 2899 elif test "$hardcode_shlibpath_var" = no; then 2900 add_shlibpath="$dir" 2901 add="-l$name" 2902 else 2903 lib_linked=no 2904 fi 2905 ;; 2906 relink) 2907 if test "$hardcode_direct" = yes; then 2908 add="$dir/$linklib" 2909 elif test "$hardcode_minus_L" = yes; then 2910 add_dir="-L$dir" 2911 # Try looking first in the location we're being installed to. 2912 if test -n "$inst_prefix_dir"; then 2913 case "$libdir" in 2914 [\\/]*) 2915 add_dir="$add_dir -L$inst_prefix_dir$libdir" 2916 ;; 2917 esac 2918 fi 2919 add="-l$name" 2920 elif test "$hardcode_shlibpath_var" = yes; then 2921 add_shlibpath="$dir" 2922 add="-l$name" 2923 else 2924 lib_linked=no 2925 fi 2926 ;; 2927 *) lib_linked=no ;; 2928 esac 2929 2930 if test "$lib_linked" != yes; then 2931 $echo "$modename: configuration error: unsupported hardcode properties" 2932 exit $EXIT_FAILURE 2933 fi 2934 2935 if test -n "$add_shlibpath"; then 2936 case :$compile_shlibpath: in 2937 *":$add_shlibpath:"*) ;; 2938 *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;; 2939 esac 2940 fi 2941 if test "$linkmode" = prog; then 2942 test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" 2943 test -n "$add" && compile_deplibs="$add $compile_deplibs" 2944 else 2945 test -n "$add_dir" && deplibs="$add_dir $deplibs" 2946 test -n "$add" && deplibs="$add $deplibs" 2947 if test "$hardcode_direct" != yes && \ 2948 test "$hardcode_minus_L" != yes && \ 2949 test "$hardcode_shlibpath_var" = yes; then 2950 case :$finalize_shlibpath: in 2951 *":$libdir:"*) ;; 2952 *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; 2953 esac 2954 fi 2955 fi 2956 fi 2957 2958 if test "$linkmode" = prog || test "$mode" = relink; then 2959 add_shlibpath= 2960 add_dir= 2961 add= 2962 # Finalize command for both is simple: just hardcode it. 2963 if test "$hardcode_direct" = yes; then 2964 add="$libdir/$linklib" 2965 elif test "$hardcode_minus_L" = yes; then 2966 add_dir="-L$libdir" 2967 add="-l$name" 2968 elif test "$hardcode_shlibpath_var" = yes; then 2969 case :$finalize_shlibpath: in 2970 *":$libdir:"*) ;; 2971 *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; 2972 esac 2973 add="-l$name" 2974 elif test "$hardcode_automatic" = yes; then 2975 if test -n "$inst_prefix_dir" && 2976 test -f "$inst_prefix_dir$libdir/$linklib" ; then 2977 add="$inst_prefix_dir$libdir/$linklib" 2978 else 2979 add="$libdir/$linklib" 2980 fi 2981 else 2982 # We cannot seem to hardcode it, guess we'll fake it. 2983 add_dir="-L$libdir" 2984 # Try looking first in the location we're being installed to. 2985 if test -n "$inst_prefix_dir"; then 2986 case "$libdir" in 2987 [\\/]*) 2988 add_dir="$add_dir -L$inst_prefix_dir$libdir" 2989 ;; 2990 esac 2991 fi 2992 add="-l$name" 2993 fi 2994 2995 if test "$linkmode" = prog; then 2996 test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" 2997 test -n "$add" && finalize_deplibs="$add $finalize_deplibs" 2998 else 2999 test -n "$add_dir" && deplibs="$add_dir $deplibs" 3000 test -n "$add" && deplibs="$add $deplibs" 3001 fi 3002 fi 3003 elif test "$linkmode" = prog; then 3004 # Here we assume that one of hardcode_direct or hardcode_minus_L 3005 # is not unsupported. This is valid on all known static and 3006 # shared platforms. 3007 if test "$hardcode_direct" != unsupported; then 3008 test -n "$old_library" && linklib="$old_library" 3009 compile_deplibs="$dir/$linklib $compile_deplibs" 3010 finalize_deplibs="$dir/$linklib $finalize_deplibs" 3011 else 3012 compile_deplibs="-l$name -L$dir $compile_deplibs" 3013 finalize_deplibs="-l$name -L$dir $finalize_deplibs" 3014 fi 3015 elif test "$build_libtool_libs" = yes; then 3016 # Not a shared library 3017 if test "$deplibs_check_method" != pass_all; then 3018 # We're trying link a shared library against a static one 3019 # but the system doesn't support it. 3020 3021 # Just print a warning and add the library to dependency_libs so 3022 # that the program can be linked against the static library. 3023 $echo 3024 $echo "*** Warning: This system can not link to static lib archive $lib." 3025 $echo "*** I have the capability to make that library automatically link in when" 3026 $echo "*** you link to this library. But I can only do this if you have a" 3027 $echo "*** shared version of the library, which you do not appear to have." 3028 if test "$module" = yes; then 3029 $echo "*** But as you try to build a module library, libtool will still create " 3030 $echo "*** a static module, that should work as long as the dlopening application" 3031 $echo "*** is linked with the -dlopen flag to resolve symbols at runtime." 3032 if test -z "$global_symbol_pipe"; then 3033 $echo 3034 $echo "*** However, this would only work if libtool was able to extract symbol" 3035 $echo "*** lists from a program, using \`nm' or equivalent, but libtool could" 3036 $echo "*** not find such a program. So, this module is probably useless." 3037 $echo "*** \`nm' from GNU binutils and a full rebuild may help." 3038 fi 3039 if test "$build_old_libs" = no; then 3040 build_libtool_libs=module 3041 build_old_libs=yes 3042 else 3043 build_libtool_libs=no 3044 fi 3045 fi 3046 else 3047 convenience="$convenience $dir/$old_library" 3048 old_convenience="$old_convenience $dir/$old_library" 3049 deplibs="$dir/$old_library $deplibs" 3050 link_static=yes 3051 fi 3052 fi # link shared/static library? 3053 3054 if test "$linkmode" = lib; then 3055 if test -n "$dependency_libs" && 3056 { test "$hardcode_into_libs" != yes || 3057 test "$build_old_libs" = yes || 3058 test "$link_static" = yes; }; then 3059 # Extract -R from dependency_libs 3060 temp_deplibs= 3061 for libdir in $dependency_libs; do 3062 case $libdir in 3063 -R*) temp_xrpath=`$echo "X$libdir" | $Xsed -e 's/^-R//'` 3064 case " $xrpath " in 3065 *" $temp_xrpath "*) ;; 3066 *) xrpath="$xrpath $temp_xrpath";; 3067 esac;; 3068 *) temp_deplibs="$temp_deplibs $libdir";; 3069 esac 3070 done 3071 dependency_libs="$temp_deplibs" 3072 fi 3073 3074 newlib_search_path="$newlib_search_path $absdir" 3075 # Link against this library 3076 test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs" 3077 # ... and its dependency_libs 3078 tmp_libs= 3079 for deplib in $dependency_libs; do 3080 newdependency_libs="$deplib $newdependency_libs" 3081 if test "X$duplicate_deps" = "Xyes" ; then 3082 case "$tmp_libs " in 3083 *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; 3084 esac 3085 fi 3086 tmp_libs="$tmp_libs $deplib" 3087 done 3088 3089 if test "$link_all_deplibs" != no; then 3090 # Add the search paths of all dependency libraries 3091 for deplib in $dependency_libs; do 3092 case $deplib in 3093 -L*) path="$deplib" ;; 3094 *.la) 3095 dir=`$echo "X$deplib" | $Xsed -e 's%/[^/]*$%%'` 3096 test "X$dir" = "X$deplib" && dir="." 3097 # We need an absolute path. 3098 case $dir in 3099 [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; 3100 *) 3101 absdir=`cd "$dir" && pwd` 3102 if test -z "$absdir"; then 3103 $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2 3104 absdir="$dir" 3105 fi 3106 ;; 3107 esac 3108 if grep "^installed=no" $deplib > /dev/null; then 3109 path="$absdir/$objdir" 3110 else 3111 eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` 3112 if test -z "$libdir"; then 3113 $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 3114 exit $EXIT_FAILURE 3115 fi 3116 if test "$absdir" != "$libdir"; then 3117 $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2 3118 fi 3119 path="$absdir" 3120 fi 3121 depdepl= 3122 case $host in 3123 *-*-darwin*) 3124 # we do not want to link against static libs, 3125 # but need to link against shared 3126 eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` 3127 if test -n "$deplibrary_names" ; then 3128 for tmp in $deplibrary_names ; do 3129 depdepl=$tmp 3130 done 3131 if test -f "$path/$depdepl" ; then 3132 depdepl="$path/$depdepl" 3133 fi 3134 # do not add paths which are already there 3135 case " $newlib_search_path " in 3136 *" $path "*) ;; 3137 *) newlib_search_path="$newlib_search_path $path";; 3138 esac 3139 fi 3140 path="" 3141 ;; 3142 *) 3143 path="-L$path" 3144 ;; 3145 esac 3146 ;; 3147 -l*) 3148 case $host in 3149 *-*-darwin*) 3150 # Again, we only want to link against shared libraries 3151 eval tmp_libs=`$echo "X$deplib" | $Xsed -e "s,^\-l,,"` 3152 for tmp in $newlib_search_path ; do 3153 if test -f "$tmp/lib$tmp_libs.dylib" ; then 3154 eval depdepl="$tmp/lib$tmp_libs.dylib" 3155 break 3156 fi 3157 done 3158 path="" 3159 ;; 3160 *) continue ;; 3161 esac 3162 ;; 3163 *) continue ;; 3164 esac 3165 case " $deplibs " in 3166 *" $depdepl "*) ;; 3167 *) deplibs="$depdepl $deplibs" ;; 3168 esac 3169 case " $deplibs " in 3170 *" $path "*) ;; 3171 *) deplibs="$deplibs $path" ;; 3172 esac 3173 done 3174 fi # link_all_deplibs != no 3175 fi # linkmode = lib 3176 done # for deplib in $libs 3177 dependency_libs="$newdependency_libs" 3178 if test "$pass" = dlpreopen; then 3179 # Link the dlpreopened libraries before other libraries 3180 for deplib in $save_deplibs; do 3181 deplibs="$deplib $deplibs" 3182 done 3183 fi 3184 if test "$pass" != dlopen; then 3185 if test "$pass" != conv; then 3186 # Make sure lib_search_path contains only unique directories. 3187 lib_search_path= 3188 for dir in $newlib_search_path; do 3189 case "$lib_search_path " in 3190 *" $dir "*) ;; 3191 *) lib_search_path="$lib_search_path $dir" ;; 3192 esac 3193 done 3194 newlib_search_path= 3195 fi 3196 3197 if test "$linkmode,$pass" != "prog,link"; then 3198 vars="deplibs" 3199 else 3200 vars="compile_deplibs finalize_deplibs" 3201 fi 3202 for var in $vars dependency_libs; do 3203 # Add libraries to $var in reverse order 3204 eval tmp_libs=\"\$$var\" 3205 new_libs= 3206 for deplib in $tmp_libs; do 3207 # FIXME: Pedantically, this is the right thing to do, so 3208 # that some nasty dependency loop isn't accidentally 3209 # broken: 3210 #new_libs="$deplib $new_libs" 3211 # Pragmatically, this seems to cause very few problems in 3212 # practice: 3213 case $deplib in 3214 -L*) new_libs="$deplib $new_libs" ;; 3215 -R*) ;; 3216 *) 3217 # And here is the reason: when a library appears more 3218 # than once as an explicit dependence of a library, or 3219 # is implicitly linked in more than once by the 3220 # compiler, it is considered special, and multiple 3221 # occurrences thereof are not removed. Compare this 3222 # with having the same library being listed as a 3223 # dependency of multiple other libraries: in this case, 3224 # we know (pedantically, we assume) the library does not 3225 # need to be listed more than once, so we keep only the 3226 # last copy. This is not always right, but it is rare 3227 # enough that we require users that really mean to play 3228 # such unportable linking tricks to link the library 3229 # using -Wl,-lname, so that libtool does not consider it 3230 # for duplicate removal. 3231 case " $specialdeplibs " in 3232 *" $deplib "*) new_libs="$deplib $new_libs" ;; 3233 *) 3234 case " $new_libs " in 3235 *" $deplib "*) ;; 3236 *) new_libs="$deplib $new_libs" ;; 3237 esac 3238 ;; 3239 esac 3240 ;; 3241 esac 3242 done 3243 tmp_libs= 3244 for deplib in $new_libs; do 3245 case $deplib in 3246 -L*) 3247 case " $tmp_libs " in 3248 *" $deplib "*) ;; 3249 *) tmp_libs="$tmp_libs $deplib" ;; 3250 esac 3251 ;; 3252 *) tmp_libs="$tmp_libs $deplib" ;; 3253 esac 3254 done 3255 eval $var=\"$tmp_libs\" 3256 done # for var 3257 fi 3258 # Last step: remove runtime libs from dependency_libs 3259 # (they stay in deplibs) 3260 tmp_libs= 3261 for i in $dependency_libs ; do 3262 case " $predeps $postdeps $compiler_lib_search_path " in 3263 *" $i "*) 3264 i="" 3265 ;; 3266 esac 3267 if test -n "$i" ; then 3268 tmp_libs="$tmp_libs $i" 3269 fi 3270 done 3271 dependency_libs=$tmp_libs 3272 done # for pass 3273 if test "$linkmode" = prog; then 3274 dlfiles="$newdlfiles" 3275 dlprefiles="$newdlprefiles" 3276 fi 3277 3278 case $linkmode in 3279 oldlib) 3280 if test -n "$deplibs"; then 3281 $echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2 3282 fi 3283 3284 if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then 3285 $echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2 3286 fi 3287 3288 if test -n "$rpath"; then 3289 $echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2 3290 fi 3291 3292 if test -n "$xrpath"; then 3293 $echo "$modename: warning: \`-R' is ignored for archives" 1>&2 3294 fi 3295 3296 if test -n "$vinfo"; then 3297 $echo "$modename: warning: \`-version-info/-version-number' is ignored for archives" 1>&2 3298 fi 3299 3300 if test -n "$release"; then 3301 $echo "$modename: warning: \`-release' is ignored for archives" 1>&2 3302 fi 3303 3304 if test -n "$export_symbols" || test -n "$export_symbols_regex"; then 3305 $echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2 3306 fi 3307 3308 # Now set the variables for building old libraries. 3309 build_libtool_libs=no 3310 oldlibs="$output" 3311 objs="$objs$old_deplibs" 3312 ;; 3313 3314 lib) 3315 # Make sure we only generate libraries of the form `libNAME.la'. 3316 case $outputname in 3317 lib*) 3318 name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` 3319 eval shared_ext=\"$shrext_cmds\" 3320 eval libname=\"$libname_spec\" 3321 ;; 3322 *) 3323 if test "$module" = no; then 3324 $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2 3325 $echo "$help" 1>&2 3326 exit $EXIT_FAILURE 3327 fi 3328 if test "$need_lib_prefix" != no; then 3329 # Add the "lib" prefix for modules if required 3330 name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` 3331 eval shared_ext=\"$shrext_cmds\" 3332 eval libname=\"$libname_spec\" 3333 else 3334 libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` 3335 fi 3336 ;; 3337 esac 3338 3339 if test -n "$objs"; then 3340 if test "$deplibs_check_method" != pass_all; then 3341 $echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1 3342 exit $EXIT_FAILURE 3343 else 3344 $echo 3345 $echo "*** Warning: Linking the shared library $output against the non-libtool" 3346 $echo "*** objects $objs is not portable!" 3347 libobjs="$libobjs $objs" 3348 fi 3349 fi 3350 3351 if test "$dlself" != no; then 3352 $echo "$modename: warning: \`-dlopen self' is ignored for libtool libraries" 1>&2 3353 fi 3354 3355 set dummy $rpath 3356 if test "$#" -gt 2; then 3357 $echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2 3358 fi 3359 install_libdir="$2" 3360 3361 oldlibs= 3362 if test -z "$rpath"; then 3363 if test "$build_libtool_libs" = yes; then 3364 # Building a libtool convenience library. 3365 # Some compilers have problems with a `.al' extension so 3366 # convenience libraries should have the same extension an 3367 # archive normally would. 3368 oldlibs="$output_objdir/$libname.$libext $oldlibs" 3369 build_libtool_libs=convenience 3370 build_old_libs=yes 3371 fi 3372 3373 if test -n "$vinfo"; then 3374 $echo "$modename: warning: \`-version-info/-version-number' is ignored for convenience libraries" 1>&2 3375 fi 3376 3377 if test -n "$release"; then 3378 $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2 3379 fi 3380 else 3381 3382 # Parse the version information argument. 3383 save_ifs="$IFS"; IFS=':' 3384 set dummy $vinfo 0 0 0 3385 IFS="$save_ifs" 3386 3387 if test -n "$8"; then 3388 $echo "$modename: too many parameters to \`-version-info'" 1>&2 3389 $echo "$help" 1>&2 3390 exit $EXIT_FAILURE 3391 fi 3392 3393 # convert absolute version numbers to libtool ages 3394 # this retains compatibility with .la files and attempts 3395 # to make the code below a bit more comprehensible 3396 3397 case $vinfo_number in 3398 yes) 3399 number_major="$2" 3400 number_minor="$3" 3401 number_revision="$4" 3402 # 3403 # There are really only two kinds -- those that 3404 # use the current revision as the major version 3405 # and those that subtract age and use age as 3406 # a minor version. But, then there is irix 3407 # which has an extra 1 added just for fun 3408 # 3409 case $version_type in 3410 darwin|linux|osf|windows) 3411 current=`expr $number_major + $number_minor` 3412 age="$number_minor" 3413 revision="$number_revision" 3414 ;; 3415 freebsd-aout|freebsd-elf|sunos) 3416 current="$number_major" 3417 revision="$number_minor" 3418 age="0" 3419 ;; 3420 irix|nonstopux) 3421 current=`expr $number_major + $number_minor - 1` 3422 age="$number_minor" 3423 revision="$number_minor" 3424 ;; 3425 esac 3426 ;; 3427 no) 3428 current="$2" 3429 revision="$3" 3430 age="$4" 3431 ;; 3432 esac 3433 3434 # Check that each of the things are valid numbers. 3435 case $current in 3436 0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;; 3437 *) 3438 $echo "$modename: CURRENT \`$current' is not a nonnegative integer" 1>&2 3439 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 3440 exit $EXIT_FAILURE 3441 ;; 3442 esac 3443 3444 case $revision in 3445 0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;; 3446 *) 3447 $echo "$modename: REVISION \`$revision' is not a nonnegative integer" 1>&2 3448 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 3449 exit $EXIT_FAILURE 3450 ;; 3451 esac 3452 3453 case $age in 3454 0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;; 3455 *) 3456 $echo "$modename: AGE \`$age' is not a nonnegative integer" 1>&2 3457 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 3458 exit $EXIT_FAILURE 3459 ;; 3460 esac 3461 3462 if test "$age" -gt "$current"; then 3463 $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2 3464 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 3465 exit $EXIT_FAILURE 3466 fi 3467 3468 # Calculate the version variables. 3469 major= 3470 versuffix= 3471 verstring= 3472 case $version_type in 3473 none) ;; 3474 3475 darwin) 3476 # Like Linux, but with the current version available in 3477 # verstring for coding it into the library header 3478 major=.`expr $current - $age` 3479 versuffix="$major.$age.$revision" 3480 # Darwin ld doesn't like 0 for these options... 3481 minor_current=`expr $current + 1` 3482 verstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" 3483 ;; 3484 3485 freebsd-aout) 3486 major=".$current" 3487 versuffix=".$current.$revision"; 3488 ;; 3489 3490 freebsd-elf) 3491 major=".$current" 3492 versuffix=".$current"; 3493 ;; 3494 3495 irix | nonstopux) 3496 major=`expr $current - $age + 1` 3497 3498 case $version_type in 3499 nonstopux) verstring_prefix=nonstopux ;; 3500 *) verstring_prefix=sgi ;; 3501 esac 3502 verstring="$verstring_prefix$major.$revision" 3503 3504 # Add in all the interfaces that we are compatible with. 3505 loop=$revision 3506 while test "$loop" -ne 0; do 3507 iface=`expr $revision - $loop` 3508 loop=`expr $loop - 1` 3509 verstring="$verstring_prefix$major.$iface:$verstring" 3510 done 3511 3512 # Before this point, $major must not contain `.'. 3513 major=.$major 3514 versuffix="$major.$revision" 3515 ;; 3516 3517 linux) 3518 major=.`expr $current - $age` 3519 versuffix="$major.$age.$revision" 3520 ;; 3521 3522 osf) 3523 major=.`expr $current - $age` 3524 versuffix=".$current.$age.$revision" 3525 verstring="$current.$age.$revision" 3526 3527 # Add in all the interfaces that we are compatible with. 3528 loop=$age 3529 while test "$loop" -ne 0; do 3530 iface=`expr $current - $loop` 3531 loop=`expr $loop - 1` 3532 verstring="$verstring:${iface}.0" 3533 done 3534 3535 # Make executables depend on our current version. 3536 verstring="$verstring:${current}.0" 3537 ;; 3538 3539 sunos) 3540 major=".$current" 3541 versuffix=".$current.$revision" 3542 ;; 3543 3544 windows) 3545 # Use '-' rather than '.', since we only want one 3546 # extension on DOS 8.3 filesystems. 3547 major=`expr $current - $age` 3548 versuffix="-$major" 3549 ;; 3550 3551 *) 3552 $echo "$modename: unknown library version type \`$version_type'" 1>&2 3553 $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 3554 exit $EXIT_FAILURE 3555 ;; 3556 esac 3557 3558 # Clear the version info if we defaulted, and they specified a release. 3559 if test -z "$vinfo" && test -n "$release"; then 3560 major= 3561 case $version_type in 3562 darwin) 3563 # we can't check for "0.0" in archive_cmds due to quoting 3564 # problems, so we reset it completely 3565 verstring= 3566 ;; 3567 *) 3568 verstring="0.0" 3569 ;; 3570 esac 3571 if test "$need_version" = no; then 3572 versuffix= 3573 else 3574 versuffix=".0.0" 3575 fi 3576 fi 3577 3578 # Remove version info from name if versioning should be avoided 3579 if test "$avoid_version" = yes && test "$need_version" = no; then 3580 major= 3581 versuffix= 3582 verstring="" 3583 fi 3584 3585 # Check to see if the archive will have undefined symbols. 3586 if test "$allow_undefined" = yes; then 3587 if test "$allow_undefined_flag" = unsupported; then 3588 $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2 3589 build_libtool_libs=no 3590 build_old_libs=yes 3591 fi 3592 else 3593 # Don't allow undefined symbols. 3594 allow_undefined_flag="$no_undefined_flag" 3595 fi 3596 fi 3597 3598 if test "$mode" != relink; then 3599 # Remove our outputs, but don't remove object files since they 3600 # may have been created when compiling PIC objects. 3601 removelist= 3602 tempremovelist=`$echo "$output_objdir/*"` 3603 for p in $tempremovelist; do 3604 case $p in 3605 *.$objext) 3606 ;; 3607 $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*) 3608 if test "X$precious_files_regex" != "X"; then 3609 if echo $p | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 3610 then 3611 continue 3612 fi 3613 fi 3614 removelist="$removelist $p" 3615 ;; 3616 *) ;; 3617 esac 3618 done 3619 if test -n "$removelist"; then 3620 $show "${rm}r $removelist" 3621 $run ${rm}r $removelist 3622 fi 3623 fi 3624 3625 # Now set the variables for building old libraries. 3626 if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then 3627 oldlibs="$oldlibs $output_objdir/$libname.$libext" 3628 3629 # Transform .lo files to .o files. 3630 oldobjs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP` 3631 fi 3632 3633 # Eliminate all temporary directories. 3634 for path in $notinst_path; do 3635 lib_search_path=`$echo "$lib_search_path " | ${SED} -e 's% $path % %g'` 3636 deplibs=`$echo "$deplibs " | ${SED} -e 's% -L$path % %g'` 3637 dependency_libs=`$echo "$dependency_libs " | ${SED} -e 's% -L$path % %g'` 3638 done 3639 3640 if test -n "$xrpath"; then 3641 # If the user specified any rpath flags, then add them. 3642 temp_xrpath= 3643 for libdir in $xrpath; do 3644 temp_xrpath="$temp_xrpath -R$libdir" 3645 case "$finalize_rpath " in 3646 *" $libdir "*) ;; 3647 *) finalize_rpath="$finalize_rpath $libdir" ;; 3648 esac 3649 done 3650 if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then 3651 dependency_libs="$temp_xrpath $dependency_libs" 3652 fi 3653 fi 3654 3655 # Make sure dlfiles contains only unique files that won't be dlpreopened 3656 old_dlfiles="$dlfiles" 3657 dlfiles= 3658 for lib in $old_dlfiles; do 3659 case " $dlprefiles $dlfiles " in 3660 *" $lib "*) ;; 3661 *) dlfiles="$dlfiles $lib" ;; 3662 esac 3663 done 3664 3665 # Make sure dlprefiles contains only unique files 3666 old_dlprefiles="$dlprefiles" 3667 dlprefiles= 3668 for lib in $old_dlprefiles; do 3669 case "$dlprefiles " in 3670 *" $lib "*) ;; 3671 *) dlprefiles="$dlprefiles $lib" ;; 3672 esac 3673 done 3674 3675 if test "$build_libtool_libs" = yes; then 3676 if test -n "$rpath"; then 3677 case $host in 3678 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos*) 3679 # these systems don't actually have a c library (as such)! 3680 ;; 3681 *-*-rhapsody* | *-*-darwin1.[012]) 3682 # Rhapsody C library is in the System framework 3683 deplibs="$deplibs -framework System" 3684 ;; 3685 *-*-netbsd*) 3686 # Don't link with libc until the a.out ld.so is fixed. 3687 ;; 3688 *-*-openbsd* | *-*-freebsd*) 3689 # Do not include libc due to us having libc/libc_r. 3690 test "X$arg" = "X-lc" && continue 3691 ;; 3692 *) 3693 # Add libc to deplibs on all other systems if necessary. 3694 if test "$build_libtool_need_lc" = "yes"; then 3695 deplibs="$deplibs -lc" 3696 fi 3697 ;; 3698 esac 3699 fi 3700 3701 # Transform deplibs into only deplibs that can be linked in shared. 3702 name_save=$name 3703 libname_save=$libname 3704 release_save=$release 3705 versuffix_save=$versuffix 3706 major_save=$major 3707 # I'm not sure if I'm treating the release correctly. I think 3708 # release should show up in the -l (ie -lgmp5) so we don't want to 3709 # add it in twice. Is that correct? 3710 release="" 3711 versuffix="" 3712 major="" 3713 newdeplibs= 3714 droppeddeps=no 3715 case $deplibs_check_method in 3716 pass_all) 3717 # Don't check for shared/static. Everything works. 3718 # This might be a little naive. We might want to check 3719 # whether the library exists or not. But this is on 3720 # osf3 & osf4 and I'm not really sure... Just 3721 # implementing what was already the behavior. 3722 newdeplibs=$deplibs 3723 ;; 3724 test_compile) 3725 # This code stresses the "libraries are programs" paradigm to its 3726 # limits. Maybe even breaks it. We compile a program, linking it 3727 # against the deplibs as a proxy for the library. Then we can check 3728 # whether they linked in statically or dynamically with ldd. 3729 $rm conftest.c 3730 cat > conftest.c <<EOF 3731 int main() { return 0; } 3732EOF 3733 $rm conftest 3734 $LTCC -o conftest conftest.c $deplibs 3735 if test "$?" -eq 0 ; then 3736 ldd_output=`ldd conftest` 3737 for i in $deplibs; do 3738 name="`expr $i : '-l\(.*\)'`" 3739 # If $name is empty we are operating on a -L argument. 3740 if test "$name" != "" && test "$name" -ne "0"; then 3741 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then 3742 case " $predeps $postdeps " in 3743 *" $i "*) 3744 newdeplibs="$newdeplibs $i" 3745 i="" 3746 ;; 3747 esac 3748 fi 3749 if test -n "$i" ; then 3750 libname=`eval \\$echo \"$libname_spec\"` 3751 deplib_matches=`eval \\$echo \"$library_names_spec\"` 3752 set dummy $deplib_matches 3753 deplib_match=$2 3754 if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then 3755 newdeplibs="$newdeplibs $i" 3756 else 3757 droppeddeps=yes 3758 $echo 3759 $echo "*** Warning: dynamic linker does not accept needed library $i." 3760 $echo "*** I have the capability to make that library automatically link in when" 3761 $echo "*** you link to this library. But I can only do this if you have a" 3762 $echo "*** shared version of the library, which I believe you do not have" 3763 $echo "*** because a test_compile did reveal that the linker did not use it for" 3764 $echo "*** its dynamic dependency list that programs get resolved with at runtime." 3765 fi 3766 fi 3767 else 3768 newdeplibs="$newdeplibs $i" 3769 fi 3770 done 3771 else 3772 # Error occurred in the first compile. Let's try to salvage 3773 # the situation: Compile a separate program for each library. 3774 for i in $deplibs; do 3775 name="`expr $i : '-l\(.*\)'`" 3776 # If $name is empty we are operating on a -L argument. 3777 if test "$name" != "" && test "$name" != "0"; then 3778 $rm conftest 3779 $LTCC -o conftest conftest.c $i 3780 # Did it work? 3781 if test "$?" -eq 0 ; then 3782 ldd_output=`ldd conftest` 3783 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then 3784 case " $predeps $postdeps " in 3785 *" $i "*) 3786 newdeplibs="$newdeplibs $i" 3787 i="" 3788 ;; 3789 esac 3790 fi 3791 if test -n "$i" ; then 3792 libname=`eval \\$echo \"$libname_spec\"` 3793 deplib_matches=`eval \\$echo \"$library_names_spec\"` 3794 set dummy $deplib_matches 3795 deplib_match=$2 3796 if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then 3797 newdeplibs="$newdeplibs $i" 3798 else 3799 droppeddeps=yes 3800 $echo 3801 $echo "*** Warning: dynamic linker does not accept needed library $i." 3802 $echo "*** I have the capability to make that library automatically link in when" 3803 $echo "*** you link to this library. But I can only do this if you have a" 3804 $echo "*** shared version of the library, which you do not appear to have" 3805 $echo "*** because a test_compile did reveal that the linker did not use this one" 3806 $echo "*** as a dynamic dependency that programs can get resolved with at runtime." 3807 fi 3808 fi 3809 else 3810 droppeddeps=yes 3811 $echo 3812 $echo "*** Warning! Library $i is needed by this library but I was not able to" 3813 $echo "*** make it link in! You will probably need to install it or some" 3814 $echo "*** library that it depends on before this library will be fully" 3815 $echo "*** functional. Installing it before continuing would be even better." 3816 fi 3817 else 3818 newdeplibs="$newdeplibs $i" 3819 fi 3820 done 3821 fi 3822 ;; 3823 file_magic*) 3824 set dummy $deplibs_check_method 3825 file_magic_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"` 3826 for a_deplib in $deplibs; do 3827 name="`expr $a_deplib : '-l\(.*\)'`" 3828 # If $name is empty we are operating on a -L argument. 3829 if test "$name" != "" && test "$name" != "0"; then 3830 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then 3831 case " $predeps $postdeps " in 3832 *" $a_deplib "*) 3833 newdeplibs="$newdeplibs $a_deplib" 3834 a_deplib="" 3835 ;; 3836 esac 3837 fi 3838 if test -n "$a_deplib" ; then 3839 libname=`eval \\$echo \"$libname_spec\"` 3840 for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do 3841 potential_libs=`ls $i/$libname[.-]* 2>/dev/null` 3842 for potent_lib in $potential_libs; do 3843 # Follow soft links. 3844 if ls -lLd "$potent_lib" 2>/dev/null \ 3845 | grep " -> " >/dev/null; then 3846 continue 3847 fi 3848 # The statement above tries to avoid entering an 3849 # endless loop below, in case of cyclic links. 3850 # We might still enter an endless loop, since a link 3851 # loop can be closed while we follow links, 3852 # but so what? 3853 potlib="$potent_lib" 3854 while test -h "$potlib" 2>/dev/null; do 3855 potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'` 3856 case $potliblink in 3857 [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; 3858 *) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";; 3859 esac 3860 done 3861 if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \ 3862 | ${SED} 10q \ 3863 | $EGREP "$file_magic_regex" > /dev/null; then 3864 newdeplibs="$newdeplibs $a_deplib" 3865 a_deplib="" 3866 break 2 3867 fi 3868 done 3869 done 3870 fi 3871 if test -n "$a_deplib" ; then 3872 droppeddeps=yes 3873 $echo 3874 $echo "*** Warning: linker path does not have real file for library $a_deplib." 3875 $echo "*** I have the capability to make that library automatically link in when" 3876 $echo "*** you link to this library. But I can only do this if you have a" 3877 $echo "*** shared version of the library, which you do not appear to have" 3878 $echo "*** because I did check the linker path looking for a file starting" 3879 if test -z "$potlib" ; then 3880 $echo "*** with $libname but no candidates were found. (...for file magic test)" 3881 else 3882 $echo "*** with $libname and none of the candidates passed a file format test" 3883 $echo "*** using a file magic. Last file checked: $potlib" 3884 fi 3885 fi 3886 else 3887 # Add a -L argument. 3888 newdeplibs="$newdeplibs $a_deplib" 3889 fi 3890 done # Gone through all deplibs. 3891 ;; 3892 match_pattern*) 3893 set dummy $deplibs_check_method 3894 match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"` 3895 for a_deplib in $deplibs; do 3896 name="`expr $a_deplib : '-l\(.*\)'`" 3897 # If $name is empty we are operating on a -L argument. 3898 if test -n "$name" && test "$name" != "0"; then 3899 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then 3900 case " $predeps $postdeps " in 3901 *" $a_deplib "*) 3902 newdeplibs="$newdeplibs $a_deplib" 3903 a_deplib="" 3904 ;; 3905 esac 3906 fi 3907 if test -n "$a_deplib" ; then 3908 libname=`eval \\$echo \"$libname_spec\"` 3909 for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do 3910 potential_libs=`ls $i/$libname[.-]* 2>/dev/null` 3911 for potent_lib in $potential_libs; do 3912 potlib="$potent_lib" # see symlink-check above in file_magic test 3913 if eval $echo \"$potent_lib\" 2>/dev/null \ 3914 | ${SED} 10q \ 3915 | $EGREP "$match_pattern_regex" > /dev/null; then 3916 newdeplibs="$newdeplibs $a_deplib" 3917 a_deplib="" 3918 break 2 3919 fi 3920 done 3921 done 3922 fi 3923 if test -n "$a_deplib" ; then 3924 droppeddeps=yes 3925 $echo 3926 $echo "*** Warning: linker path does not have real file for library $a_deplib." 3927 $echo "*** I have the capability to make that library automatically link in when" 3928 $echo "*** you link to this library. But I can only do this if you have a" 3929 $echo "*** shared version of the library, which you do not appear to have" 3930 $echo "*** because I did check the linker path looking for a file starting" 3931 if test -z "$potlib" ; then 3932 $echo "*** with $libname but no candidates were found. (...for regex pattern test)" 3933 else 3934 $echo "*** with $libname and none of the candidates passed a file format test" 3935 $echo "*** using a regex pattern. Last file checked: $potlib" 3936 fi 3937 fi 3938 else 3939 # Add a -L argument. 3940 newdeplibs="$newdeplibs $a_deplib" 3941 fi 3942 done # Gone through all deplibs. 3943 ;; 3944 none | unknown | *) 3945 newdeplibs="" 3946 tmp_deplibs=`$echo "X $deplibs" | $Xsed -e 's/ -lc$//' \ 3947 -e 's/ -[LR][^ ]*//g'` 3948 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then 3949 for i in $predeps $postdeps ; do 3950 # can't use Xsed below, because $i might contain '/' 3951 tmp_deplibs=`$echo "X $tmp_deplibs" | ${SED} -e "1s,^X,," -e "s,$i,,"` 3952 done 3953 fi 3954 if $echo "X $tmp_deplibs" | $Xsed -e 's/[ ]//g' \ 3955 | grep . >/dev/null; then 3956 $echo 3957 if test "X$deplibs_check_method" = "Xnone"; then 3958 $echo "*** Warning: inter-library dependencies are not supported in this platform." 3959 else 3960 $echo "*** Warning: inter-library dependencies are not known to be supported." 3961 fi 3962 $echo "*** All declared inter-library dependencies are being dropped." 3963 droppeddeps=yes 3964 fi 3965 ;; 3966 esac 3967 versuffix=$versuffix_save 3968 major=$major_save 3969 release=$release_save 3970 libname=$libname_save 3971 name=$name_save 3972 3973 case $host in 3974 *-*-rhapsody* | *-*-darwin1.[012]) 3975 # On Rhapsody replace the C library is the System framework 3976 newdeplibs=`$echo "X $newdeplibs" | $Xsed -e 's/ -lc / -framework System /'` 3977 ;; 3978 esac 3979 3980 if test "$droppeddeps" = yes; then 3981 if test "$module" = yes; then 3982 $echo 3983 $echo "*** Warning: libtool could not satisfy all declared inter-library" 3984 $echo "*** dependencies of module $libname. Therefore, libtool will create" 3985 $echo "*** a static module, that should work as long as the dlopening" 3986 $echo "*** application is linked with the -dlopen flag." 3987 if test -z "$global_symbol_pipe"; then 3988 $echo 3989 $echo "*** However, this would only work if libtool was able to extract symbol" 3990 $echo "*** lists from a program, using \`nm' or equivalent, but libtool could" 3991 $echo "*** not find such a program. So, this module is probably useless." 3992 $echo "*** \`nm' from GNU binutils and a full rebuild may help." 3993 fi 3994 if test "$build_old_libs" = no; then 3995 oldlibs="$output_objdir/$libname.$libext" 3996 build_libtool_libs=module 3997 build_old_libs=yes 3998 else 3999 build_libtool_libs=no 4000 fi 4001 else 4002 $echo "*** The inter-library dependencies that have been dropped here will be" 4003 $echo "*** automatically added whenever a program is linked with this library" 4004 $echo "*** or is declared to -dlopen it." 4005 4006 if test "$allow_undefined" = no; then 4007 $echo 4008 $echo "*** Since this library must not contain undefined symbols," 4009 $echo "*** because either the platform does not support them or" 4010 $echo "*** it was explicitly requested with -no-undefined," 4011 $echo "*** libtool will only create a static version of it." 4012 if test "$build_old_libs" = no; then 4013 oldlibs="$output_objdir/$libname.$libext" 4014 build_libtool_libs=module 4015 build_old_libs=yes 4016 else 4017 build_libtool_libs=no 4018 fi 4019 fi 4020 fi 4021 fi 4022 # Done checking deplibs! 4023 deplibs=$newdeplibs 4024 fi 4025 4026 # All the library-specific variables (install_libdir is set above). 4027 library_names= 4028 old_library= 4029 dlname= 4030 4031 # Test again, we may have decided not to build it any more 4032 if test "$build_libtool_libs" = yes; then 4033 if test "$hardcode_into_libs" = yes; then 4034 # Hardcode the library paths 4035 hardcode_libdirs= 4036 dep_rpath= 4037 rpath="$finalize_rpath" 4038 test "$mode" != relink && rpath="$compile_rpath$rpath" 4039 for libdir in $rpath; do 4040 if test -n "$hardcode_libdir_flag_spec"; then 4041 if test -n "$hardcode_libdir_separator"; then 4042 if test -z "$hardcode_libdirs"; then 4043 hardcode_libdirs="$libdir" 4044 else 4045 # Just accumulate the unique libdirs. 4046 case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in 4047 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) 4048 ;; 4049 *) 4050 hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" 4051 ;; 4052 esac 4053 fi 4054 else 4055 eval flag=\"$hardcode_libdir_flag_spec\" 4056 dep_rpath="$dep_rpath $flag" 4057 fi 4058 elif test -n "$runpath_var"; then 4059 case "$perm_rpath " in 4060 *" $libdir "*) ;; 4061 *) perm_rpath="$perm_rpath $libdir" ;; 4062 esac 4063 fi 4064 done 4065 # Substitute the hardcoded libdirs into the rpath. 4066 if test -n "$hardcode_libdir_separator" && 4067 test -n "$hardcode_libdirs"; then 4068 libdir="$hardcode_libdirs" 4069 if test -n "$hardcode_libdir_flag_spec_ld"; then 4070 eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" 4071 else 4072 eval dep_rpath=\"$hardcode_libdir_flag_spec\" 4073 fi 4074 fi 4075 if test -n "$runpath_var" && test -n "$perm_rpath"; then 4076 # We should set the runpath_var. 4077 rpath= 4078 for dir in $perm_rpath; do 4079 rpath="$rpath$dir:" 4080 done 4081 eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" 4082 fi 4083 test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" 4084 fi 4085 4086 shlibpath="$finalize_shlibpath" 4087 test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath" 4088 if test -n "$shlibpath"; then 4089 eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" 4090 fi 4091 4092 # Get the real and link names of the library. 4093 eval shared_ext=\"$shrext_cmds\" 4094 eval library_names=\"$library_names_spec\" 4095 set dummy $library_names 4096 realname="$2" 4097 shift; shift 4098 4099 if test -n "$soname_spec"; then 4100 eval soname=\"$soname_spec\" 4101 else 4102 soname="$realname" 4103 fi 4104 if test -z "$dlname"; then 4105 dlname=$soname 4106 fi 4107 4108 lib="$output_objdir/$realname" 4109 for link 4110 do 4111 linknames="$linknames $link" 4112 done 4113 4114 # Use standard objects if they are pic 4115 test -z "$pic_flag" && libobjs=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` 4116 4117 # Prepare the list of exported symbols 4118 if test -z "$export_symbols"; then 4119 if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then 4120 $show "generating symbol list for \`$libname.la'" 4121 export_symbols="$output_objdir/$libname.exp" 4122 $run $rm $export_symbols 4123 cmds=$export_symbols_cmds 4124 save_ifs="$IFS"; IFS='~' 4125 for cmd in $cmds; do 4126 IFS="$save_ifs" 4127 eval cmd=\"$cmd\" 4128 if len=`expr "X$cmd" : ".*"` && 4129 test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then 4130 $show "$cmd" 4131 $run eval "$cmd" || exit $? 4132 skipped_export=false 4133 else 4134 # The command line is too long to execute in one step. 4135 $show "using reloadable object file for export list..." 4136 skipped_export=: 4137 fi 4138 done 4139 IFS="$save_ifs" 4140 if test -n "$export_symbols_regex"; then 4141 $show "$EGREP -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\"" 4142 $run eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' 4143 $show "$mv \"${export_symbols}T\" \"$export_symbols\"" 4144 $run eval '$mv "${export_symbols}T" "$export_symbols"' 4145 fi 4146 fi 4147 fi 4148 4149 if test -n "$export_symbols" && test -n "$include_expsyms"; then 4150 $run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"' 4151 fi 4152 4153 tmp_deplibs= 4154 for test_deplib in $deplibs; do 4155 case " $convenience " in 4156 *" $test_deplib "*) ;; 4157 *) 4158 tmp_deplibs="$tmp_deplibs $test_deplib" 4159 ;; 4160 esac 4161 done 4162 deplibs="$tmp_deplibs" 4163 4164 if test -n "$convenience"; then 4165 if test -n "$whole_archive_flag_spec"; then 4166 save_libobjs=$libobjs 4167 eval libobjs=\"\$libobjs $whole_archive_flag_spec\" 4168 else 4169 gentop="$output_objdir/${outputname}x" 4170 generated="$generated $gentop" 4171 4172 func_extract_archives $gentop $convenience 4173 libobjs="$libobjs $func_extract_archives_result" 4174 fi 4175 fi 4176 4177 if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then 4178 eval flag=\"$thread_safe_flag_spec\" 4179 linker_flags="$linker_flags $flag" 4180 fi 4181 4182 # Make a backup of the uninstalled library when relinking 4183 if test "$mode" = relink; then 4184 $run eval '(cd $output_objdir && $rm ${realname}U && $mv $realname ${realname}U)' || exit $? 4185 fi 4186 4187 # Do each of the archive commands. 4188 if test "$module" = yes && test -n "$module_cmds" ; then 4189 if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then 4190 eval test_cmds=\"$module_expsym_cmds\" 4191 cmds=$module_expsym_cmds 4192 else 4193 eval test_cmds=\"$module_cmds\" 4194 cmds=$module_cmds 4195 fi 4196 else 4197 if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then 4198 eval test_cmds=\"$archive_expsym_cmds\" 4199 cmds=$archive_expsym_cmds 4200 else 4201 eval test_cmds=\"$archive_cmds\" 4202 cmds=$archive_cmds 4203 fi 4204 fi 4205 4206 if test "X$skipped_export" != "X:" && len=`expr "X$test_cmds" : ".*"` && 4207 test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then 4208 : 4209 else 4210 # The command line is too long to link in one step, link piecewise. 4211 $echo "creating reloadable object files..." 4212 4213 # Save the value of $output and $libobjs because we want to 4214 # use them later. If we have whole_archive_flag_spec, we 4215 # want to use save_libobjs as it was before 4216 # whole_archive_flag_spec was expanded, because we can't 4217 # assume the linker understands whole_archive_flag_spec. 4218 # This may have to be revisited, in case too many 4219 # convenience libraries get linked in and end up exceeding 4220 # the spec. 4221 if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then 4222 save_libobjs=$libobjs 4223 fi 4224 save_output=$output 4225 4226 # Clear the reloadable object creation command queue and 4227 # initialize k to one. 4228 test_cmds= 4229 concat_cmds= 4230 objlist= 4231 delfiles= 4232 last_robj= 4233 k=1 4234 output=$output_objdir/$save_output-${k}.$objext 4235 # Loop over the list of objects to be linked. 4236 for obj in $save_libobjs 4237 do 4238 eval test_cmds=\"$reload_cmds $objlist $last_robj\" 4239 if test "X$objlist" = X || 4240 { len=`expr "X$test_cmds" : ".*"` && 4241 test "$len" -le "$max_cmd_len"; }; then 4242 objlist="$objlist $obj" 4243 else 4244 # The command $test_cmds is almost too long, add a 4245 # command to the queue. 4246 if test "$k" -eq 1 ; then 4247 # The first file doesn't have a previous command to add. 4248 eval concat_cmds=\"$reload_cmds $objlist $last_robj\" 4249 else 4250 # All subsequent reloadable object files will link in 4251 # the last one created. 4252 eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj\" 4253 fi 4254 last_robj=$output_objdir/$save_output-${k}.$objext 4255 k=`expr $k + 1` 4256 output=$output_objdir/$save_output-${k}.$objext 4257 objlist=$obj 4258 len=1 4259 fi 4260 done 4261 # Handle the remaining objects by creating one last 4262 # reloadable object file. All subsequent reloadable object 4263 # files will link in the last one created. 4264 test -z "$concat_cmds" || concat_cmds=$concat_cmds~ 4265 eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\" 4266 4267 if ${skipped_export-false}; then 4268 $show "generating symbol list for \`$libname.la'" 4269 export_symbols="$output_objdir/$libname.exp" 4270 $run $rm $export_symbols 4271 libobjs=$output 4272 # Append the command to create the export file. 4273 eval concat_cmds=\"\$concat_cmds~$export_symbols_cmds\" 4274 fi 4275 4276 # Set up a command to remove the reloadale object files 4277 # after they are used. 4278 i=0 4279 while test "$i" -lt "$k" 4280 do 4281 i=`expr $i + 1` 4282 delfiles="$delfiles $output_objdir/$save_output-${i}.$objext" 4283 done 4284 4285 $echo "creating a temporary reloadable object file: $output" 4286 4287 # Loop through the commands generated above and execute them. 4288 save_ifs="$IFS"; IFS='~' 4289 for cmd in $concat_cmds; do 4290 IFS="$save_ifs" 4291 $show "$cmd" 4292 $run eval "$cmd" || exit $? 4293 done 4294 IFS="$save_ifs" 4295 4296 libobjs=$output 4297 # Restore the value of output. 4298 output=$save_output 4299 4300 if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then 4301 eval libobjs=\"\$libobjs $whole_archive_flag_spec\" 4302 fi 4303 # Expand the library linking commands again to reset the 4304 # value of $libobjs for piecewise linking. 4305 4306 # Do each of the archive commands. 4307 if test "$module" = yes && test -n "$module_cmds" ; then 4308 if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then 4309 cmds=$module_expsym_cmds 4310 else 4311 cmds=$module_cmds 4312 fi 4313 else 4314 if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then 4315 cmds=$archive_expsym_cmds 4316 else 4317 cmds=$archive_cmds 4318 fi 4319 fi 4320 4321 # Append the command to remove the reloadable object files 4322 # to the just-reset $cmds. 4323 eval cmds=\"\$cmds~\$rm $delfiles\" 4324 fi 4325 save_ifs="$IFS"; IFS='~' 4326 for cmd in $cmds; do 4327 IFS="$save_ifs" 4328 eval cmd=\"$cmd\" 4329 $show "$cmd" 4330 $run eval "$cmd" || exit $? 4331 done 4332 IFS="$save_ifs" 4333 4334 # Restore the uninstalled library and exit 4335 if test "$mode" = relink; then 4336 $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' || exit $? 4337 exit $EXIT_SUCCESS 4338 fi 4339 4340 # Create links to the real library. 4341 for linkname in $linknames; do 4342 if test "$realname" != "$linkname"; then 4343 $show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)" 4344 $run eval '(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)' || exit $? 4345 fi 4346 done 4347 4348 # If -module or -export-dynamic was specified, set the dlname. 4349 if test "$module" = yes || test "$export_dynamic" = yes; then 4350 # On all known operating systems, these are identical. 4351 dlname="$soname" 4352 fi 4353 fi 4354 ;; 4355 4356 obj) 4357 if test -n "$deplibs"; then 4358 $echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2 4359 fi 4360 4361 if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then 4362 $echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2 4363 fi 4364 4365 if test -n "$rpath"; then 4366 $echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2 4367 fi 4368 4369 if test -n "$xrpath"; then 4370 $echo "$modename: warning: \`-R' is ignored for objects" 1>&2 4371 fi 4372 4373 if test -n "$vinfo"; then 4374 $echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2 4375 fi 4376 4377 if test -n "$release"; then 4378 $echo "$modename: warning: \`-release' is ignored for objects" 1>&2 4379 fi 4380 4381 case $output in 4382 *.lo) 4383 if test -n "$objs$old_deplibs"; then 4384 $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2 4385 exit $EXIT_FAILURE 4386 fi 4387 libobj="$output" 4388 obj=`$echo "X$output" | $Xsed -e "$lo2o"` 4389 ;; 4390 *) 4391 libobj= 4392 obj="$output" 4393 ;; 4394 esac 4395 4396 # Delete the old objects. 4397 $run $rm $obj $libobj 4398 4399 # Objects from convenience libraries. This assumes 4400 # single-version convenience libraries. Whenever we create 4401 # different ones for PIC/non-PIC, this we'll have to duplicate 4402 # the extraction. 4403 reload_conv_objs= 4404 gentop= 4405 # reload_cmds runs $LD directly, so let us get rid of 4406 # -Wl from whole_archive_flag_spec 4407 wl= 4408 4409 if test -n "$convenience"; then 4410 if test -n "$whole_archive_flag_spec"; then 4411 eval reload_conv_objs=\"\$reload_objs $whole_archive_flag_spec\" 4412 else 4413 gentop="$output_objdir/${obj}x" 4414 generated="$generated $gentop" 4415 4416 func_extract_archives $gentop $convenience 4417 reload_conv_objs="$reload_objs $func_extract_archives_result" 4418 fi 4419 fi 4420 4421 # Create the old-style object. 4422 reload_objs="$objs$old_deplibs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test 4423 4424 output="$obj" 4425 cmds=$reload_cmds 4426 save_ifs="$IFS"; IFS='~' 4427 for cmd in $cmds; do 4428 IFS="$save_ifs" 4429 eval cmd=\"$cmd\" 4430 $show "$cmd" 4431 $run eval "$cmd" || exit $? 4432 done 4433 IFS="$save_ifs" 4434 4435 # Exit if we aren't doing a library object file. 4436 if test -z "$libobj"; then 4437 if test -n "$gentop"; then 4438 $show "${rm}r $gentop" 4439 $run ${rm}r $gentop 4440 fi 4441 4442 exit $EXIT_SUCCESS 4443 fi 4444 4445 if test "$build_libtool_libs" != yes; then 4446 if test -n "$gentop"; then 4447 $show "${rm}r $gentop" 4448 $run ${rm}r $gentop 4449 fi 4450 4451 # Create an invalid libtool object if no PIC, so that we don't 4452 # accidentally link it into a program. 4453 # $show "echo timestamp > $libobj" 4454 # $run eval "echo timestamp > $libobj" || exit $? 4455 exit $EXIT_SUCCESS 4456 fi 4457 4458 if test -n "$pic_flag" || test "$pic_mode" != default; then 4459 # Only do commands if we really have different PIC objects. 4460 reload_objs="$libobjs $reload_conv_objs" 4461 output="$libobj" 4462 cmds=$reload_cmds 4463 save_ifs="$IFS"; IFS='~' 4464 for cmd in $cmds; do 4465 IFS="$save_ifs" 4466 eval cmd=\"$cmd\" 4467 $show "$cmd" 4468 $run eval "$cmd" || exit $? 4469 done 4470 IFS="$save_ifs" 4471 fi 4472 4473 if test -n "$gentop"; then 4474 $show "${rm}r $gentop" 4475 $run ${rm}r $gentop 4476 fi 4477 4478 exit $EXIT_SUCCESS 4479 ;; 4480 4481 prog) 4482 case $host in 4483 *cygwin*) output=`$echo $output | ${SED} -e 's,.exe$,,;s,$,.exe,'` ;; 4484 esac 4485 if test -n "$vinfo"; then 4486 $echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2 4487 fi 4488 4489 if test -n "$release"; then 4490 $echo "$modename: warning: \`-release' is ignored for programs" 1>&2 4491 fi 4492 4493 if test "$preload" = yes; then 4494 if test "$dlopen_support" = unknown && test "$dlopen_self" = unknown && 4495 test "$dlopen_self_static" = unknown; then 4496 $echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support." 4497 fi 4498 fi 4499 4500 case $host in 4501 *-*-rhapsody* | *-*-darwin1.[012]) 4502 # On Rhapsody replace the C library is the System framework 4503 compile_deplibs=`$echo "X $compile_deplibs" | $Xsed -e 's/ -lc / -framework System /'` 4504 finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'` 4505 ;; 4506 esac 4507 4508 case $host in 4509 *darwin*) 4510 # Don't allow lazy linking, it breaks C++ global constructors 4511 if test "$tagname" = CXX ; then 4512 compile_command="$compile_command ${wl}-bind_at_load" 4513 finalize_command="$finalize_command ${wl}-bind_at_load" 4514 fi 4515 ;; 4516 esac 4517 4518 compile_command="$compile_command $compile_deplibs" 4519 finalize_command="$finalize_command $finalize_deplibs" 4520 4521 if test -n "$rpath$xrpath"; then 4522 # If the user specified any rpath flags, then add them. 4523 for libdir in $rpath $xrpath; do 4524 # This is the magic to use -rpath. 4525 case "$finalize_rpath " in 4526 *" $libdir "*) ;; 4527 *) finalize_rpath="$finalize_rpath $libdir" ;; 4528 esac 4529 done 4530 fi 4531 4532 # Now hardcode the library paths 4533 rpath= 4534 hardcode_libdirs= 4535 for libdir in $compile_rpath $finalize_rpath; do 4536 if test -n "$hardcode_libdir_flag_spec"; then 4537 if test -n "$hardcode_libdir_separator"; then 4538 if test -z "$hardcode_libdirs"; then 4539 hardcode_libdirs="$libdir" 4540 else 4541 # Just accumulate the unique libdirs. 4542 case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in 4543 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) 4544 ;; 4545 *) 4546 hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" 4547 ;; 4548 esac 4549 fi 4550 else 4551 eval flag=\"$hardcode_libdir_flag_spec\" 4552 rpath="$rpath $flag" 4553 fi 4554 elif test -n "$runpath_var"; then 4555 case "$perm_rpath " in 4556 *" $libdir "*) ;; 4557 *) perm_rpath="$perm_rpath $libdir" ;; 4558 esac 4559 fi 4560 case $host in 4561 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) 4562 case :$dllsearchpath: in 4563 *":$libdir:"*) ;; 4564 *) dllsearchpath="$dllsearchpath:$libdir";; 4565 esac 4566 ;; 4567 esac 4568 done 4569 # Substitute the hardcoded libdirs into the rpath. 4570 if test -n "$hardcode_libdir_separator" && 4571 test -n "$hardcode_libdirs"; then 4572 libdir="$hardcode_libdirs" 4573 eval rpath=\" $hardcode_libdir_flag_spec\" 4574 fi 4575 compile_rpath="$rpath" 4576 4577 rpath= 4578 hardcode_libdirs= 4579 for libdir in $finalize_rpath; do 4580 if test -n "$hardcode_libdir_flag_spec"; then 4581 if test -n "$hardcode_libdir_separator"; then 4582 if test -z "$hardcode_libdirs"; then 4583 hardcode_libdirs="$libdir" 4584 else 4585 # Just accumulate the unique libdirs. 4586 case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in 4587 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) 4588 ;; 4589 *) 4590 hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" 4591 ;; 4592 esac 4593 fi 4594 else 4595 eval flag=\"$hardcode_libdir_flag_spec\" 4596 rpath="$rpath $flag" 4597 fi 4598 elif test -n "$runpath_var"; then 4599 case "$finalize_perm_rpath " in 4600 *" $libdir "*) ;; 4601 *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;; 4602 esac 4603 fi 4604 done 4605 # Substitute the hardcoded libdirs into the rpath. 4606 if test -n "$hardcode_libdir_separator" && 4607 test -n "$hardcode_libdirs"; then 4608 libdir="$hardcode_libdirs" 4609 eval rpath=\" $hardcode_libdir_flag_spec\" 4610 fi 4611 finalize_rpath="$rpath" 4612 4613 if test -n "$libobjs" && test "$build_old_libs" = yes; then 4614 # Transform all the library objects into standard objects. 4615 compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` 4616 finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` 4617 fi 4618 4619 dlsyms= 4620 if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then 4621 if test -n "$NM" && test -n "$global_symbol_pipe"; then 4622 dlsyms="${outputname}S.c" 4623 else 4624 $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2 4625 fi 4626 fi 4627 4628 if test -n "$dlsyms"; then 4629 case $dlsyms in 4630 "") ;; 4631 *.c) 4632 # Discover the nlist of each of the dlfiles. 4633 nlist="$output_objdir/${outputname}.nm" 4634 4635 $show "$rm $nlist ${nlist}S ${nlist}T" 4636 $run $rm "$nlist" "${nlist}S" "${nlist}T" 4637 4638 # Parse the name list into a source file. 4639 $show "creating $output_objdir/$dlsyms" 4640 4641 test -z "$run" && $echo > "$output_objdir/$dlsyms" "\ 4642/* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */ 4643/* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */ 4644 4645#ifdef __cplusplus 4646extern \"C\" { 4647#endif 4648 4649/* Prevent the only kind of declaration conflicts we can make. */ 4650#define lt_preloaded_symbols some_other_symbol 4651 4652/* External symbol declarations for the compiler. */\ 4653" 4654 4655 if test "$dlself" = yes; then 4656 $show "generating symbol list for \`$output'" 4657 4658 test -z "$run" && $echo ': @PROGRAM@ ' > "$nlist" 4659 4660 # Add our own program objects to the symbol list. 4661 progfiles=`$echo "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` 4662 for arg in $progfiles; do 4663 $show "extracting global C symbols from \`$arg'" 4664 $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" 4665 done 4666 4667 if test -n "$exclude_expsyms"; then 4668 $run eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' 4669 $run eval '$mv "$nlist"T "$nlist"' 4670 fi 4671 4672 if test -n "$export_symbols_regex"; then 4673 $run eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' 4674 $run eval '$mv "$nlist"T "$nlist"' 4675 fi 4676 4677 # Prepare the list of exported symbols 4678 if test -z "$export_symbols"; then 4679 export_symbols="$output_objdir/$output.exp" 4680 $run $rm $export_symbols 4681 $run eval "${SED} -n -e '/^: @PROGRAM@$/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' 4682 else 4683 $run eval "${SED} -e 's/\([][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$output.exp"' 4684 $run eval 'grep -f "$output_objdir/$output.exp" < "$nlist" > "$nlist"T' 4685 $run eval 'mv "$nlist"T "$nlist"' 4686 fi 4687 fi 4688 4689 for arg in $dlprefiles; do 4690 $show "extracting global C symbols from \`$arg'" 4691 name=`$echo "$arg" | ${SED} -e 's%^.*/%%'` 4692 $run eval '$echo ": $name " >> "$nlist"' 4693 $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" 4694 done 4695 4696 if test -z "$run"; then 4697 # Make sure we have at least an empty file. 4698 test -f "$nlist" || : > "$nlist" 4699 4700 if test -n "$exclude_expsyms"; then 4701 $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T 4702 $mv "$nlist"T "$nlist" 4703 fi 4704 4705 # Try sorting and uniquifying the output. 4706 if grep -v "^: " < "$nlist" | 4707 if sort -k 3 </dev/null >/dev/null 2>&1; then 4708 sort -k 3 4709 else 4710 sort +2 4711 fi | 4712 uniq > "$nlist"S; then 4713 : 4714 else 4715 grep -v "^: " < "$nlist" > "$nlist"S 4716 fi 4717 4718 if test -f "$nlist"S; then 4719 eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$dlsyms"' 4720 else 4721 $echo '/* NONE */' >> "$output_objdir/$dlsyms" 4722 fi 4723 4724 $echo >> "$output_objdir/$dlsyms" "\ 4725 4726#undef lt_preloaded_symbols 4727 4728#if defined (__STDC__) && __STDC__ 4729# define lt_ptr void * 4730#else 4731# define lt_ptr char * 4732# define const 4733#endif 4734 4735/* The mapping between symbol names and symbols. */ 4736const struct { 4737 const char *name; 4738 lt_ptr address; 4739} 4740lt_preloaded_symbols[] = 4741{\ 4742" 4743 4744 eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$dlsyms" 4745 4746 $echo >> "$output_objdir/$dlsyms" "\ 4747 {0, (lt_ptr) 0} 4748}; 4749 4750/* This works around a problem in FreeBSD linker */ 4751#ifdef FREEBSD_WORKAROUND 4752static const void *lt_preloaded_setup() { 4753 return lt_preloaded_symbols; 4754} 4755#endif 4756 4757#ifdef __cplusplus 4758} 4759#endif\ 4760" 4761 fi 4762 4763 pic_flag_for_symtable= 4764 case $host in 4765 # compiling the symbol table file with pic_flag works around 4766 # a FreeBSD bug that causes programs to crash when -lm is 4767 # linked before any other PIC object. But we must not use 4768 # pic_flag when linking with -static. The problem exists in 4769 # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. 4770 *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) 4771 case "$compile_command " in 4772 *" -static "*) ;; 4773 *) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND";; 4774 esac;; 4775 *-*-hpux*) 4776 case "$compile_command " in 4777 *" -static "*) ;; 4778 *) pic_flag_for_symtable=" $pic_flag";; 4779 esac 4780 esac 4781 4782 # Now compile the dynamic symbol file. 4783 $show "(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")" 4784 $run eval '(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $? 4785 4786 # Clean up the generated files. 4787 $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T" 4788 $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T" 4789 4790 # Transform the symbol file into the correct name. 4791 compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` 4792 finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` 4793 ;; 4794 *) 4795 $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2 4796 exit $EXIT_FAILURE 4797 ;; 4798 esac 4799 else 4800 # We keep going just in case the user didn't refer to 4801 # lt_preloaded_symbols. The linker will fail if global_symbol_pipe 4802 # really was required. 4803 4804 # Nullify the symbol file. 4805 compile_command=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"` 4806 finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"` 4807 fi 4808 4809 if test "$need_relink" = no || test "$build_libtool_libs" != yes; then 4810 # Replace the output file specification. 4811 compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` 4812 link_command="$compile_command$compile_rpath" 4813 4814 # We have no uninstalled library dependencies, so finalize right now. 4815 $show "$link_command" 4816 $run eval "$link_command" 4817 status=$? 4818 4819 # Delete the generated files. 4820 if test -n "$dlsyms"; then 4821 $show "$rm $output_objdir/${outputname}S.${objext}" 4822 $run $rm "$output_objdir/${outputname}S.${objext}" 4823 fi 4824 4825 exit $status 4826 fi 4827 4828 if test -n "$shlibpath_var"; then 4829 # We should set the shlibpath_var 4830 rpath= 4831 for dir in $temp_rpath; do 4832 case $dir in 4833 [\\/]* | [A-Za-z]:[\\/]*) 4834 # Absolute path. 4835 rpath="$rpath$dir:" 4836 ;; 4837 *) 4838 # Relative path: add a thisdir entry. 4839 rpath="$rpath\$thisdir/$dir:" 4840 ;; 4841 esac 4842 done 4843 temp_rpath="$rpath" 4844 fi 4845 4846 if test -n "$compile_shlibpath$finalize_shlibpath"; then 4847 compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" 4848 fi 4849 if test -n "$finalize_shlibpath"; then 4850 finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" 4851 fi 4852 4853 compile_var= 4854 finalize_var= 4855 if test -n "$runpath_var"; then 4856 if test -n "$perm_rpath"; then 4857 # We should set the runpath_var. 4858 rpath= 4859 for dir in $perm_rpath; do 4860 rpath="$rpath$dir:" 4861 done 4862 compile_var="$runpath_var=\"$rpath\$$runpath_var\" " 4863 fi 4864 if test -n "$finalize_perm_rpath"; then 4865 # We should set the runpath_var. 4866 rpath= 4867 for dir in $finalize_perm_rpath; do 4868 rpath="$rpath$dir:" 4869 done 4870 finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " 4871 fi 4872 fi 4873 4874 if test "$no_install" = yes; then 4875 # We don't need to create a wrapper script. 4876 link_command="$compile_var$compile_command$compile_rpath" 4877 # Replace the output file specification. 4878 link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` 4879 # Delete the old output file. 4880 $run $rm $output 4881 # Link the executable and exit 4882 $show "$link_command" 4883 $run eval "$link_command" || exit $? 4884 exit $EXIT_SUCCESS 4885 fi 4886 4887 if test "$hardcode_action" = relink; then 4888 # Fast installation is not supported 4889 link_command="$compile_var$compile_command$compile_rpath" 4890 relink_command="$finalize_var$finalize_command$finalize_rpath" 4891 4892 $echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2 4893 $echo "$modename: \`$output' will be relinked during installation" 1>&2 4894 else 4895 if test "$fast_install" != no; then 4896 link_command="$finalize_var$compile_command$finalize_rpath" 4897 if test "$fast_install" = yes; then 4898 relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'` 4899 else 4900 # fast_install is set to needless 4901 relink_command= 4902 fi 4903 else 4904 link_command="$compile_var$compile_command$compile_rpath" 4905 relink_command="$finalize_var$finalize_command$finalize_rpath" 4906 fi 4907 fi 4908 4909 # Replace the output file specification. 4910 link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` 4911 4912 # Delete the old output files. 4913 $run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname 4914 4915 $show "$link_command" 4916 $run eval "$link_command" || exit $? 4917 4918 # Now create the wrapper script. 4919 $show "creating $output" 4920 4921 # Quote the relink command for shipping. 4922 if test -n "$relink_command"; then 4923 # Preserve any variables that may affect compiler behavior 4924 for var in $variables_saved_for_relink; do 4925 if eval test -z \"\${$var+set}\"; then 4926 relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command" 4927 elif eval var_value=\$$var; test -z "$var_value"; then 4928 relink_command="$var=; export $var; $relink_command" 4929 else 4930 var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"` 4931 relink_command="$var=\"$var_value\"; export $var; $relink_command" 4932 fi 4933 done 4934 relink_command="(cd `pwd`; $relink_command)" 4935 relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"` 4936 fi 4937 4938 # Quote $echo for shipping. 4939 if test "X$echo" = "X$SHELL $progpath --fallback-echo"; then 4940 case $progpath in 4941 [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";; 4942 *) qecho="$SHELL `pwd`/$progpath --fallback-echo";; 4943 esac 4944 qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"` 4945 else 4946 qecho=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"` 4947 fi 4948 4949 # Only actually do things if our run command is non-null. 4950 if test -z "$run"; then 4951 # win32 will think the script is a binary if it has 4952 # a .exe suffix, so we strip it off here. 4953 case $output in 4954 *.exe) output=`$echo $output|${SED} 's,.exe$,,'` ;; 4955 esac 4956 # test for cygwin because mv fails w/o .exe extensions 4957 case $host in 4958 *cygwin*) 4959 exeext=.exe 4960 outputname=`$echo $outputname|${SED} 's,.exe$,,'` ;; 4961 *) exeext= ;; 4962 esac 4963 case $host in 4964 *cygwin* | *mingw* ) 4965 cwrappersource=`$echo ${objdir}/lt-${output}.c` 4966 cwrapper=`$echo ${output}.exe` 4967 $rm $cwrappersource $cwrapper 4968 trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 4969 4970 cat > $cwrappersource <<EOF 4971 4972/* $cwrappersource - temporary wrapper executable for $objdir/$outputname 4973 Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP 4974 4975 The $output program cannot be directly executed until all the libtool 4976 libraries that it depends on are installed. 4977 4978 This wrapper executable should never be moved out of the build directory. 4979 If it is, it will not operate correctly. 4980 4981 Currently, it simply execs the wrapper *script* "/bin/sh $output", 4982 but could eventually absorb all of the scripts functionality and 4983 exec $objdir/$outputname directly. 4984*/ 4985EOF 4986 cat >> $cwrappersource<<"EOF" 4987#include <stdio.h> 4988#include <stdlib.h> 4989#include <string.h> 4990#include <ctype.h> 4991#include <unistd.h> 4992#include <malloc.h> 4993#include <stdarg.h> 4994#include <assert.h> 4995 4996#if defined(PATH_MAX) 4997# define LT_PATHMAX PATH_MAX 4998#elif defined(MAXPATHLEN) 4999# define LT_PATHMAX MAXPATHLEN 5000#else 5001# define LT_PATHMAX 1024 5002#endif 5003 5004#ifndef DIR_SEPARATOR 5005#define DIR_SEPARATOR '/' 5006#endif 5007 5008#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \ 5009 defined (__OS2__) 5010#define HAVE_DOS_BASED_FILE_SYSTEM 5011#ifndef DIR_SEPARATOR_2 5012#define DIR_SEPARATOR_2 '\\' 5013#endif 5014#endif 5015 5016#ifndef DIR_SEPARATOR_2 5017# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) 5018#else /* DIR_SEPARATOR_2 */ 5019# define IS_DIR_SEPARATOR(ch) \ 5020 (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) 5021#endif /* DIR_SEPARATOR_2 */ 5022 5023#define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) 5024#define XFREE(stale) do { \ 5025 if (stale) { free ((void *) stale); stale = 0; } \ 5026} while (0) 5027 5028const char *program_name = NULL; 5029 5030void * xmalloc (size_t num); 5031char * xstrdup (const char *string); 5032char * basename (const char *name); 5033char * fnqualify(const char *path); 5034char * strendzap(char *str, const char *pat); 5035void lt_fatal (const char *message, ...); 5036 5037int 5038main (int argc, char *argv[]) 5039{ 5040 char **newargz; 5041 int i; 5042 5043 program_name = (char *) xstrdup ((char *) basename (argv[0])); 5044 newargz = XMALLOC(char *, argc+2); 5045EOF 5046 5047 cat >> $cwrappersource <<EOF 5048 newargz[0] = "$SHELL"; 5049EOF 5050 5051 cat >> $cwrappersource <<"EOF" 5052 newargz[1] = fnqualify(argv[0]); 5053 /* we know the script has the same name, without the .exe */ 5054 /* so make sure newargz[1] doesn't end in .exe */ 5055 strendzap(newargz[1],".exe"); 5056 for (i = 1; i < argc; i++) 5057 newargz[i+1] = xstrdup(argv[i]); 5058 newargz[argc+1] = NULL; 5059EOF 5060 5061 cat >> $cwrappersource <<EOF 5062 execv("$SHELL",newargz); 5063EOF 5064 5065 cat >> $cwrappersource <<"EOF" 5066 return 127; 5067} 5068 5069void * 5070xmalloc (size_t num) 5071{ 5072 void * p = (void *) malloc (num); 5073 if (!p) 5074 lt_fatal ("Memory exhausted"); 5075 5076 return p; 5077} 5078 5079char * 5080xstrdup (const char *string) 5081{ 5082 return string ? strcpy ((char *) xmalloc (strlen (string) + 1), string) : NULL 5083; 5084} 5085 5086char * 5087basename (const char *name) 5088{ 5089 const char *base; 5090 5091#if defined (HAVE_DOS_BASED_FILE_SYSTEM) 5092 /* Skip over the disk name in MSDOS pathnames. */ 5093 if (isalpha (name[0]) && name[1] == ':') 5094 name += 2; 5095#endif 5096 5097 for (base = name; *name; name++) 5098 if (IS_DIR_SEPARATOR (*name)) 5099 base = name + 1; 5100 return (char *) base; 5101} 5102 5103char * 5104fnqualify(const char *path) 5105{ 5106 size_t size; 5107 char *p; 5108 char tmp[LT_PATHMAX + 1]; 5109 5110 assert(path != NULL); 5111 5112 /* Is it qualified already? */ 5113#if defined (HAVE_DOS_BASED_FILE_SYSTEM) 5114 if (isalpha (path[0]) && path[1] == ':') 5115 return xstrdup (path); 5116#endif 5117 if (IS_DIR_SEPARATOR (path[0])) 5118 return xstrdup (path); 5119 5120 /* prepend the current directory */ 5121 /* doesn't handle '~' */ 5122 if (getcwd (tmp, LT_PATHMAX) == NULL) 5123 lt_fatal ("getcwd failed"); 5124 size = strlen(tmp) + 1 + strlen(path) + 1; /* +2 for '/' and '\0' */ 5125 p = XMALLOC(char, size); 5126 sprintf(p, "%s%c%s", tmp, DIR_SEPARATOR, path); 5127 return p; 5128} 5129 5130char * 5131strendzap(char *str, const char *pat) 5132{ 5133 size_t len, patlen; 5134 5135 assert(str != NULL); 5136 assert(pat != NULL); 5137 5138 len = strlen(str); 5139 patlen = strlen(pat); 5140 5141 if (patlen <= len) 5142 { 5143 str += len - patlen; 5144 if (strcmp(str, pat) == 0) 5145 *str = '\0'; 5146 } 5147 return str; 5148} 5149 5150static void 5151lt_error_core (int exit_status, const char * mode, 5152 const char * message, va_list ap) 5153{ 5154 fprintf (stderr, "%s: %s: ", program_name, mode); 5155 vfprintf (stderr, message, ap); 5156 fprintf (stderr, ".\n"); 5157 5158 if (exit_status >= 0) 5159 exit (exit_status); 5160} 5161 5162void 5163lt_fatal (const char *message, ...) 5164{ 5165 va_list ap; 5166 va_start (ap, message); 5167 lt_error_core (EXIT_FAILURE, "FATAL", message, ap); 5168 va_end (ap); 5169} 5170EOF 5171 # we should really use a build-platform specific compiler 5172 # here, but OTOH, the wrappers (shell script and this C one) 5173 # are only useful if you want to execute the "real" binary. 5174 # Since the "real" binary is built for $host, then this 5175 # wrapper might as well be built for $host, too. 5176 $run $LTCC -s -o $cwrapper $cwrappersource 5177 ;; 5178 esac 5179 $rm $output 5180 trap "$rm $output; exit $EXIT_FAILURE" 1 2 15 5181 5182 $echo > $output "\ 5183#! $SHELL 5184 5185# $output - temporary wrapper script for $objdir/$outputname 5186# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP 5187# 5188# The $output program cannot be directly executed until all the libtool 5189# libraries that it depends on are installed. 5190# 5191# This wrapper script should never be moved out of the build directory. 5192# If it is, it will not operate correctly. 5193 5194# Sed substitution that helps us do robust quoting. It backslashifies 5195# metacharacters that are still active within double-quoted strings. 5196Xsed='${SED} -e 1s/^X//' 5197sed_quote_subst='$sed_quote_subst' 5198 5199# The HP-UX ksh and POSIX shell print the target directory to stdout 5200# if CDPATH is set. 5201(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 5202 5203relink_command=\"$relink_command\" 5204 5205# This environment variable determines our operation mode. 5206if test \"\$libtool_install_magic\" = \"$magic\"; then 5207 # install mode needs the following variable: 5208 notinst_deplibs='$notinst_deplibs' 5209else 5210 # When we are sourced in execute mode, \$file and \$echo are already set. 5211 if test \"\$libtool_execute_magic\" != \"$magic\"; then 5212 echo=\"$qecho\" 5213 file=\"\$0\" 5214 # Make sure echo works. 5215 if test \"X\$1\" = X--no-reexec; then 5216 # Discard the --no-reexec flag, and continue. 5217 shift 5218 elif test \"X\`(\$echo '\t') 2>/dev/null\`\" = 'X\t'; then 5219 # Yippee, \$echo works! 5220 : 5221 else 5222 # Restart under the correct shell, and then maybe \$echo will work. 5223 exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"} 5224 fi 5225 fi\ 5226" 5227 $echo >> $output "\ 5228 5229 # Find the directory that this script lives in. 5230 thisdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\` 5231 test \"x\$thisdir\" = \"x\$file\" && thisdir=. 5232 5233 # Follow symbolic links until we get to the real thisdir. 5234 file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\` 5235 while test -n \"\$file\"; do 5236 destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\` 5237 5238 # If there was a directory component, then change thisdir. 5239 if test \"x\$destdir\" != \"x\$file\"; then 5240 case \"\$destdir\" in 5241 [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;; 5242 *) thisdir=\"\$thisdir/\$destdir\" ;; 5243 esac 5244 fi 5245 5246 file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\` 5247 file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\` 5248 done 5249 5250 # Try to get the absolute directory name. 5251 absdir=\`cd \"\$thisdir\" && pwd\` 5252 test -n \"\$absdir\" && thisdir=\"\$absdir\" 5253" 5254 5255 if test "$fast_install" = yes; then 5256 $echo >> $output "\ 5257 program=lt-'$outputname'$exeext 5258 progdir=\"\$thisdir/$objdir\" 5259 5260 if test ! -f \"\$progdir/\$program\" || \\ 5261 { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\ 5262 test \"X\$file\" != \"X\$progdir/\$program\"; }; then 5263 5264 file=\"\$\$-\$program\" 5265 5266 if test ! -d \"\$progdir\"; then 5267 $mkdir \"\$progdir\" 5268 else 5269 $rm \"\$progdir/\$file\" 5270 fi" 5271 5272 $echo >> $output "\ 5273 5274 # relink executable if necessary 5275 if test -n \"\$relink_command\"; then 5276 if relink_command_output=\`eval \$relink_command 2>&1\`; then : 5277 else 5278 $echo \"\$relink_command_output\" >&2 5279 $rm \"\$progdir/\$file\" 5280 exit $EXIT_FAILURE 5281 fi 5282 fi 5283 5284 $mv \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || 5285 { $rm \"\$progdir/\$program\"; 5286 $mv \"\$progdir/\$file\" \"\$progdir/\$program\"; } 5287 $rm \"\$progdir/\$file\" 5288 fi" 5289 else 5290 $echo >> $output "\ 5291 program='$outputname' 5292 progdir=\"\$thisdir/$objdir\" 5293" 5294 fi 5295 5296 $echo >> $output "\ 5297 5298 if test -f \"\$progdir/\$program\"; then" 5299 5300 # Export our shlibpath_var if we have one. 5301 if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then 5302 $echo >> $output "\ 5303 # Add our own library path to $shlibpath_var 5304 $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" 5305 5306 # Some systems cannot cope with colon-terminated $shlibpath_var 5307 # The second colon is a workaround for a bug in BeOS R4 sed 5308 $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\` 5309 5310 export $shlibpath_var 5311" 5312 fi 5313 5314 # fixup the dll searchpath if we need to. 5315 if test -n "$dllsearchpath"; then 5316 $echo >> $output "\ 5317 # Add the dll search path components to the executable PATH 5318 PATH=$dllsearchpath:\$PATH 5319" 5320 fi 5321 5322 $echo >> $output "\ 5323 if test \"\$libtool_execute_magic\" != \"$magic\"; then 5324 # Run the actual program with our arguments. 5325" 5326 case $host in 5327 # Backslashes separate directories on plain windows 5328 *-*-mingw | *-*-os2*) 5329 $echo >> $output "\ 5330 exec \$progdir\\\\\$program \${1+\"\$@\"} 5331" 5332 ;; 5333 5334 *) 5335 $echo >> $output "\ 5336 exec \$progdir/\$program \${1+\"\$@\"} 5337" 5338 ;; 5339 esac 5340 $echo >> $output "\ 5341 \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\" 5342 exit $EXIT_FAILURE 5343 fi 5344 else 5345 # The program doesn't exist. 5346 \$echo \"\$0: error: \$progdir/\$program does not exist\" 1>&2 5347 \$echo \"This script is just a wrapper for \$program.\" 1>&2 5348 $echo \"See the $PACKAGE documentation for more information.\" 1>&2 5349 exit $EXIT_FAILURE 5350 fi 5351fi\ 5352" 5353 chmod +x $output 5354 fi 5355 exit $EXIT_SUCCESS 5356 ;; 5357 esac 5358 5359 # See if we need to build an old-fashioned archive. 5360 for oldlib in $oldlibs; do 5361 5362 if test "$build_libtool_libs" = convenience; then 5363 oldobjs="$libobjs_save" 5364 addlibs="$convenience" 5365 build_libtool_libs=no 5366 else 5367 if test "$build_libtool_libs" = module; then 5368 oldobjs="$libobjs_save" 5369 build_libtool_libs=no 5370 else 5371 oldobjs="$old_deplibs $non_pic_objects" 5372 fi 5373 addlibs="$old_convenience" 5374 fi 5375 5376 if test -n "$addlibs"; then 5377 gentop="$output_objdir/${outputname}x" 5378 generated="$generated $gentop" 5379 5380 func_extract_archives $gentop $addlibs 5381 oldobjs="$oldobjs $func_extract_archives_result" 5382 fi 5383 5384 # Do each command in the archive commands. 5385 if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then 5386 cmds=$old_archive_from_new_cmds 5387 else 5388 eval cmds=\"$old_archive_cmds\" 5389 5390 if len=`expr "X$cmds" : ".*"` && 5391 test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then 5392 cmds=$old_archive_cmds 5393 else 5394 # the command line is too long to link in one step, link in parts 5395 $echo "using piecewise archive linking..." 5396 save_RANLIB=$RANLIB 5397 RANLIB=: 5398 objlist= 5399 concat_cmds= 5400 save_oldobjs=$oldobjs 5401 # GNU ar 2.10+ was changed to match POSIX; thus no paths are 5402 # encoded into archives. This makes 'ar r' malfunction in 5403 # this piecewise linking case whenever conflicting object 5404 # names appear in distinct ar calls; check, warn and compensate. 5405 if (for obj in $save_oldobjs 5406 do 5407 $echo "X$obj" | $Xsed -e 's%^.*/%%' 5408 done | sort | sort -uc >/dev/null 2>&1); then 5409 : 5410 else 5411 $echo "$modename: warning: object name conflicts; overriding AR_FLAGS to 'cq'" 1>&2 5412 $echo "$modename: warning: to ensure that POSIX-compatible ar will work" 1>&2 5413 AR_FLAGS=cq 5414 fi 5415 # Is there a better way of finding the last object in the list? 5416 for obj in $save_oldobjs 5417 do 5418 last_oldobj=$obj 5419 done 5420 for obj in $save_oldobjs 5421 do 5422 oldobjs="$objlist $obj" 5423 objlist="$objlist $obj" 5424 eval test_cmds=\"$old_archive_cmds\" 5425 if len=`expr "X$test_cmds" : ".*"` && 5426 test "$len" -le "$max_cmd_len"; then 5427 : 5428 else 5429 # the above command should be used before it gets too long 5430 oldobjs=$objlist 5431 if test "$obj" = "$last_oldobj" ; then 5432 RANLIB=$save_RANLIB 5433 fi 5434 test -z "$concat_cmds" || concat_cmds=$concat_cmds~ 5435 eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" 5436 objlist= 5437 fi 5438 done 5439 RANLIB=$save_RANLIB 5440 oldobjs=$objlist 5441 if test "X$oldobjs" = "X" ; then 5442 eval cmds=\"\$concat_cmds\" 5443 else 5444 eval cmds=\"\$concat_cmds~\$old_archive_cmds\" 5445 fi 5446 fi 5447 fi 5448 save_ifs="$IFS"; IFS='~' 5449 for cmd in $cmds; do 5450 eval cmd=\"$cmd\" 5451 IFS="$save_ifs" 5452 $show "$cmd" 5453 $run eval "$cmd" || exit $? 5454 done 5455 IFS="$save_ifs" 5456 done 5457 5458 if test -n "$generated"; then 5459 $show "${rm}r$generated" 5460 $run ${rm}r$generated 5461 fi 5462 5463 # Now create the libtool archive. 5464 case $output in 5465 *.la) 5466 old_library= 5467 test "$build_old_libs" = yes && old_library="$libname.$libext" 5468 $show "creating $output" 5469 5470 # Preserve any variables that may affect compiler behavior 5471 for var in $variables_saved_for_relink; do 5472 if eval test -z \"\${$var+set}\"; then 5473 relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command" 5474 elif eval var_value=\$$var; test -z "$var_value"; then 5475 relink_command="$var=; export $var; $relink_command" 5476 else 5477 var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"` 5478 relink_command="$var=\"$var_value\"; export $var; $relink_command" 5479 fi 5480 done 5481 # Quote the link command for shipping. 5482 relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" 5483 relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"` 5484 if test "$hardcode_automatic" = yes ; then 5485 relink_command= 5486 fi 5487 5488 5489 # Only create the output if not a dry run. 5490 if test -z "$run"; then 5491 for installed in no yes; do 5492 if test "$installed" = yes; then 5493 if test -z "$install_libdir"; then 5494 break 5495 fi 5496 output="$output_objdir/$outputname"i 5497 # Replace all uninstalled libtool libraries with the installed ones 5498 newdependency_libs= 5499 for deplib in $dependency_libs; do 5500 case $deplib in 5501 *.la) 5502 name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'` 5503 eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` 5504 if test -z "$libdir"; then 5505 $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 5506 exit $EXIT_FAILURE 5507 fi 5508 newdependency_libs="$newdependency_libs $libdir/$name" 5509 ;; 5510 *) newdependency_libs="$newdependency_libs $deplib" ;; 5511 esac 5512 done 5513 dependency_libs="$newdependency_libs" 5514 newdlfiles= 5515 for lib in $dlfiles; do 5516 name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` 5517 eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` 5518 if test -z "$libdir"; then 5519 $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 5520 exit $EXIT_FAILURE 5521 fi 5522 newdlfiles="$newdlfiles $libdir/$name" 5523 done 5524 dlfiles="$newdlfiles" 5525 newdlprefiles= 5526 for lib in $dlprefiles; do 5527 name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` 5528 eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` 5529 if test -z "$libdir"; then 5530 $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 5531 exit $EXIT_FAILURE 5532 fi 5533 newdlprefiles="$newdlprefiles $libdir/$name" 5534 done 5535 dlprefiles="$newdlprefiles" 5536 else 5537 newdlfiles= 5538 for lib in $dlfiles; do 5539 case $lib in 5540 [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; 5541 *) abs=`pwd`"/$lib" ;; 5542 esac 5543 newdlfiles="$newdlfiles $abs" 5544 done 5545 dlfiles="$newdlfiles" 5546 newdlprefiles= 5547 for lib in $dlprefiles; do 5548 case $lib in 5549 [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; 5550 *) abs=`pwd`"/$lib" ;; 5551 esac 5552 newdlprefiles="$newdlprefiles $abs" 5553 done 5554 dlprefiles="$newdlprefiles" 5555 fi 5556 $rm $output 5557 # place dlname in correct position for cygwin 5558 tdlname=$dlname 5559 case $host,$output,$installed,$module,$dlname in 5560 *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;; 5561 esac 5562 $echo > $output "\ 5563# $outputname - a libtool library file 5564# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP 5565# 5566# Please DO NOT delete this file! 5567# It is necessary for linking the library. 5568 5569# The name that we can dlopen(3). 5570dlname='$tdlname' 5571 5572# Names of this library. 5573library_names='$library_names' 5574 5575# The name of the static archive. 5576old_library='$old_library' 5577 5578# Libraries that this one depends upon. 5579dependency_libs='$dependency_libs' 5580 5581# Version information for $libname. 5582current=$current 5583age=$age 5584revision=$revision 5585 5586# Is this an already installed library? 5587installed=$installed 5588 5589# Should we warn about portability when linking against -modules? 5590shouldnotlink=$module 5591 5592# Files to dlopen/dlpreopen 5593dlopen='$dlfiles' 5594dlpreopen='$dlprefiles' 5595 5596# Directory that this library needs to be installed in: 5597libdir='$install_libdir'" 5598 if test "$installed" = no && test "$need_relink" = yes; then 5599 $echo >> $output "\ 5600relink_command=\"$relink_command\"" 5601 fi 5602 done 5603 fi 5604 5605 # Do a symbolic link so that the libtool archive can be found in 5606 # LD_LIBRARY_PATH before the program is installed. 5607 $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)" 5608 $run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' || exit $? 5609 ;; 5610 esac 5611 exit $EXIT_SUCCESS 5612 ;; 5613 5614 # libtool install mode 5615 install) 5616 modename="$modename: install" 5617 5618 # There may be an optional sh(1) argument at the beginning of 5619 # install_prog (especially on Windows NT). 5620 if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || 5621 # Allow the use of GNU shtool's install command. 5622 $echo "X$nonopt" | $Xsed | grep shtool > /dev/null; then 5623 # Aesthetically quote it. 5624 arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"` 5625 case $arg in 5626 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) 5627 arg="\"$arg\"" 5628 ;; 5629 esac 5630 install_prog="$arg " 5631 arg="$1" 5632 shift 5633 else 5634 install_prog= 5635 arg="$nonopt" 5636 fi 5637 5638 # The real first argument should be the name of the installation program. 5639 # Aesthetically quote it. 5640 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` 5641 case $arg in 5642 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) 5643 arg="\"$arg\"" 5644 ;; 5645 esac 5646 install_prog="$install_prog$arg" 5647 5648 # We need to accept at least all the BSD install flags. 5649 dest= 5650 files= 5651 opts= 5652 prev= 5653 install_type= 5654 isdir=no 5655 stripme= 5656 for arg 5657 do 5658 if test -n "$dest"; then 5659 files="$files $dest" 5660 dest="$arg" 5661 continue 5662 fi 5663 5664 case $arg in 5665 -d) isdir=yes ;; 5666 -f) prev="-f" ;; 5667 -g) prev="-g" ;; 5668 -m) prev="-m" ;; 5669 -o) prev="-o" ;; 5670 -s) 5671 stripme=" -s" 5672 continue 5673 ;; 5674 -*) ;; 5675 5676 *) 5677 # If the previous option needed an argument, then skip it. 5678 if test -n "$prev"; then 5679 prev= 5680 else 5681 dest="$arg" 5682 continue 5683 fi 5684 ;; 5685 esac 5686 5687 # Aesthetically quote the argument. 5688 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` 5689 case $arg in 5690 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) 5691 arg="\"$arg\"" 5692 ;; 5693 esac 5694 install_prog="$install_prog $arg" 5695 done 5696 5697 if test -z "$install_prog"; then 5698 $echo "$modename: you must specify an install program" 1>&2 5699 $echo "$help" 1>&2 5700 exit $EXIT_FAILURE 5701 fi 5702 5703 if test -n "$prev"; then 5704 $echo "$modename: the \`$prev' option requires an argument" 1>&2 5705 $echo "$help" 1>&2 5706 exit $EXIT_FAILURE 5707 fi 5708 5709 if test -z "$files"; then 5710 if test -z "$dest"; then 5711 $echo "$modename: no file or destination specified" 1>&2 5712 else 5713 $echo "$modename: you must specify a destination" 1>&2 5714 fi 5715 $echo "$help" 1>&2 5716 exit $EXIT_FAILURE 5717 fi 5718 5719 # Strip any trailing slash from the destination. 5720 dest=`$echo "X$dest" | $Xsed -e 's%/$%%'` 5721 5722 # Check to see that the destination is a directory. 5723 test -d "$dest" && isdir=yes 5724 if test "$isdir" = yes; then 5725 destdir="$dest" 5726 destname= 5727 else 5728 destdir=`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'` 5729 test "X$destdir" = "X$dest" && destdir=. 5730 destname=`$echo "X$dest" | $Xsed -e 's%^.*/%%'` 5731 5732 # Not a directory, so check to see that there is only one file specified. 5733 set dummy $files 5734 if test "$#" -gt 2; then 5735 $echo "$modename: \`$dest' is not a directory" 1>&2 5736 $echo "$help" 1>&2 5737 exit $EXIT_FAILURE 5738 fi 5739 fi 5740 case $destdir in 5741 [\\/]* | [A-Za-z]:[\\/]*) ;; 5742 *) 5743 for file in $files; do 5744 case $file in 5745 *.lo) ;; 5746 *) 5747 $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2 5748 $echo "$help" 1>&2 5749 exit $EXIT_FAILURE 5750 ;; 5751 esac 5752 done 5753 ;; 5754 esac 5755 5756 # This variable tells wrapper scripts just to set variables rather 5757 # than running their programs. 5758 libtool_install_magic="$magic" 5759 5760 staticlibs= 5761 future_libdirs= 5762 current_libdirs= 5763 for file in $files; do 5764 5765 # Do each installation. 5766 case $file in 5767 *.$libext) 5768 # Do the static libraries later. 5769 staticlibs="$staticlibs $file" 5770 ;; 5771 5772 *.la) 5773 # Check to see that this really is a libtool archive. 5774 if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : 5775 else 5776 $echo "$modename: \`$file' is not a valid libtool archive" 1>&2 5777 $echo "$help" 1>&2 5778 exit $EXIT_FAILURE 5779 fi 5780 5781 library_names= 5782 old_library= 5783 relink_command= 5784 # If there is no directory component, then add one. 5785 case $file in 5786 */* | *\\*) . $file ;; 5787 *) . ./$file ;; 5788 esac 5789 5790 # Add the libdir to current_libdirs if it is the destination. 5791 if test "X$destdir" = "X$libdir"; then 5792 case "$current_libdirs " in 5793 *" $libdir "*) ;; 5794 *) current_libdirs="$current_libdirs $libdir" ;; 5795 esac 5796 else 5797 # Note the libdir as a future libdir. 5798 case "$future_libdirs " in 5799 *" $libdir "*) ;; 5800 *) future_libdirs="$future_libdirs $libdir" ;; 5801 esac 5802 fi 5803 5804 dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/ 5805 test "X$dir" = "X$file/" && dir= 5806 dir="$dir$objdir" 5807 5808 if test -n "$relink_command"; then 5809 # Determine the prefix the user has applied to our future dir. 5810 inst_prefix_dir=`$echo "$destdir" | $SED "s%$libdir\$%%"` 5811 5812 # Don't allow the user to place us outside of our expected 5813 # location b/c this prevents finding dependent libraries that 5814 # are installed to the same prefix. 5815 # At present, this check doesn't affect windows .dll's that 5816 # are installed into $libdir/../bin (currently, that works fine) 5817 # but it's something to keep an eye on. 5818 if test "$inst_prefix_dir" = "$destdir"; then 5819 $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2 5820 exit $EXIT_FAILURE 5821 fi 5822 5823 if test -n "$inst_prefix_dir"; then 5824 # Stick the inst_prefix_dir data into the link command. 5825 relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` 5826 else 5827 relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%%"` 5828 fi 5829 5830 $echo "$modename: warning: relinking \`$file'" 1>&2 5831 $show "$relink_command" 5832 if $run eval "$relink_command"; then : 5833 else 5834 $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 5835 exit $EXIT_FAILURE 5836 fi 5837 fi 5838 5839 # See the names of the shared library. 5840 set dummy $library_names 5841 if test -n "$2"; then 5842 realname="$2" 5843 shift 5844 shift 5845 5846 srcname="$realname" 5847 test -n "$relink_command" && srcname="$realname"T 5848 5849 # Install the shared library and build the symlinks. 5850 $show "$install_prog $dir/$srcname $destdir/$realname" 5851 $run eval "$install_prog $dir/$srcname $destdir/$realname" || exit $? 5852 if test -n "$stripme" && test -n "$striplib"; then 5853 $show "$striplib $destdir/$realname" 5854 $run eval "$striplib $destdir/$realname" || exit $? 5855 fi 5856 5857 if test "$#" -gt 0; then 5858 # Delete the old symlinks, and create new ones. 5859 for linkname 5860 do 5861 if test "$linkname" != "$realname"; then 5862 $show "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })" 5863 $run eval "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })" 5864 fi 5865 done 5866 fi 5867 5868 # Do each command in the postinstall commands. 5869 lib="$destdir/$realname" 5870 cmds=$postinstall_cmds 5871 save_ifs="$IFS"; IFS='~' 5872 for cmd in $cmds; do 5873 IFS="$save_ifs" 5874 eval cmd=\"$cmd\" 5875 $show "$cmd" 5876 $run eval "$cmd" || exit $? 5877 done 5878 IFS="$save_ifs" 5879 fi 5880 5881 # Install the pseudo-library for information purposes. 5882 name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` 5883 instname="$dir/$name"i 5884 $show "$install_prog $instname $destdir/$name" 5885 $run eval "$install_prog $instname $destdir/$name" || exit $? 5886 5887 # Maybe install the static library, too. 5888 test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library" 5889 ;; 5890 5891 *.lo) 5892 # Install (i.e. copy) a libtool object. 5893 5894 # Figure out destination file name, if it wasn't already specified. 5895 if test -n "$destname"; then 5896 destfile="$destdir/$destname" 5897 else 5898 destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'` 5899 destfile="$destdir/$destfile" 5900 fi 5901 5902 # Deduce the name of the destination old-style object file. 5903 case $destfile in 5904 *.lo) 5905 staticdest=`$echo "X$destfile" | $Xsed -e "$lo2o"` 5906 ;; 5907 *.$objext) 5908 staticdest="$destfile" 5909 destfile= 5910 ;; 5911 *) 5912 $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2 5913 $echo "$help" 1>&2 5914 exit $EXIT_FAILURE 5915 ;; 5916 esac 5917 5918 # Install the libtool object if requested. 5919 if test -n "$destfile"; then 5920 $show "$install_prog $file $destfile" 5921 $run eval "$install_prog $file $destfile" || exit $? 5922 fi 5923 5924 # Install the old object if enabled. 5925 if test "$build_old_libs" = yes; then 5926 # Deduce the name of the old-style object file. 5927 staticobj=`$echo "X$file" | $Xsed -e "$lo2o"` 5928 5929 $show "$install_prog $staticobj $staticdest" 5930 $run eval "$install_prog \$staticobj \$staticdest" || exit $? 5931 fi 5932 exit $EXIT_SUCCESS 5933 ;; 5934 5935 *) 5936 # Figure out destination file name, if it wasn't already specified. 5937 if test -n "$destname"; then 5938 destfile="$destdir/$destname" 5939 else 5940 destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'` 5941 destfile="$destdir/$destfile" 5942 fi 5943 5944 # If the file is missing, and there is a .exe on the end, strip it 5945 # because it is most likely a libtool script we actually want to 5946 # install 5947 stripped_ext="" 5948 case $file in 5949 *.exe) 5950 if test ! -f "$file"; then 5951 file=`$echo $file|${SED} 's,.exe$,,'` 5952 stripped_ext=".exe" 5953 fi 5954 ;; 5955 esac 5956 5957 # Do a test to see if this is really a libtool program. 5958 case $host in 5959 *cygwin*|*mingw*) 5960 wrapper=`$echo $file | ${SED} -e 's,.exe$,,'` 5961 ;; 5962 *) 5963 wrapper=$file 5964 ;; 5965 esac 5966 if (${SED} -e '4q' $wrapper | grep "^# Generated by .*$PACKAGE")>/dev/null 2>&1; then 5967 notinst_deplibs= 5968 relink_command= 5969 5970 # To insure that "foo" is sourced, and not "foo.exe", 5971 # finese the cygwin/MSYS system by explicitly sourcing "foo." 5972 # which disallows the automatic-append-.exe behavior. 5973 case $build in 5974 *cygwin* | *mingw*) wrapperdot=${wrapper}. ;; 5975 *) wrapperdot=${wrapper} ;; 5976 esac 5977 # If there is no directory component, then add one. 5978 case $file in 5979 */* | *\\*) . ${wrapperdot} ;; 5980 *) . ./${wrapperdot} ;; 5981 esac 5982 5983 # Check the variables that should have been set. 5984 if test -z "$notinst_deplibs"; then 5985 $echo "$modename: invalid libtool wrapper script \`$wrapper'" 1>&2 5986 exit $EXIT_FAILURE 5987 fi 5988 5989 finalize=yes 5990 for lib in $notinst_deplibs; do 5991 # Check to see that each library is installed. 5992 libdir= 5993 if test -f "$lib"; then 5994 # If there is no directory component, then add one. 5995 case $lib in 5996 */* | *\\*) . $lib ;; 5997 *) . ./$lib ;; 5998 esac 5999 fi 6000 libfile="$libdir/"`$echo "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test 6001 if test -n "$libdir" && test ! -f "$libfile"; then 6002 $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2 6003 finalize=no 6004 fi 6005 done 6006 6007 relink_command= 6008 # To insure that "foo" is sourced, and not "foo.exe", 6009 # finese the cygwin/MSYS system by explicitly sourcing "foo." 6010 # which disallows the automatic-append-.exe behavior. 6011 case $build in 6012 *cygwin* | *mingw*) wrapperdot=${wrapper}. ;; 6013 *) wrapperdot=${wrapper} ;; 6014 esac 6015 # If there is no directory component, then add one. 6016 case $file in 6017 */* | *\\*) . ${wrapperdot} ;; 6018 *) . ./${wrapperdot} ;; 6019 esac 6020 6021 outputname= 6022 if test "$fast_install" = no && test -n "$relink_command"; then 6023 if test "$finalize" = yes && test -z "$run"; then 6024 tmpdir="/tmp" 6025 test -n "$TMPDIR" && tmpdir="$TMPDIR" 6026 tmpdir="$tmpdir/libtool-$$" 6027 save_umask=`umask` 6028 umask 0077 6029 if $mkdir "$tmpdir"; then 6030 umask $save_umask 6031 else 6032 umask $save_umask 6033 $echo "$modename: error: cannot create temporary directory \`$tmpdir'" 1>&2 6034 continue 6035 fi 6036 file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'` 6037 outputname="$tmpdir/$file" 6038 # Replace the output file specification. 6039 relink_command=`$echo "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'` 6040 6041 $show "$relink_command" 6042 if $run eval "$relink_command"; then : 6043 else 6044 $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 6045 ${rm}r "$tmpdir" 6046 continue 6047 fi 6048 file="$outputname" 6049 else 6050 $echo "$modename: warning: cannot relink \`$file'" 1>&2 6051 fi 6052 else 6053 # Install the binary that we compiled earlier. 6054 file=`$echo "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"` 6055 fi 6056 fi 6057 6058 # remove .exe since cygwin /usr/bin/install will append another 6059 # one anyways 6060 case $install_prog,$host in 6061 */usr/bin/install*,*cygwin*) 6062 case $file:$destfile in 6063 *.exe:*.exe) 6064 # this is ok 6065 ;; 6066 *.exe:*) 6067 destfile=$destfile.exe 6068 ;; 6069 *:*.exe) 6070 destfile=`$echo $destfile | ${SED} -e 's,.exe$,,'` 6071 ;; 6072 esac 6073 ;; 6074 esac 6075 $show "$install_prog$stripme $file $destfile" 6076 $run eval "$install_prog\$stripme \$file \$destfile" || exit $? 6077 test -n "$outputname" && ${rm}r "$tmpdir" 6078 ;; 6079 esac 6080 done 6081 6082 for file in $staticlibs; do 6083 name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` 6084 6085 # Set up the ranlib parameters. 6086 oldlib="$destdir/$name" 6087 6088 $show "$install_prog $file $oldlib" 6089 $run eval "$install_prog \$file \$oldlib" || exit $? 6090 6091 if test -n "$stripme" && test -n "$old_striplib"; then 6092 $show "$old_striplib $oldlib" 6093 $run eval "$old_striplib $oldlib" || exit $? 6094 fi 6095 6096 # Do each command in the postinstall commands. 6097 cmds=$old_postinstall_cmds 6098 save_ifs="$IFS"; IFS='~' 6099 for cmd in $cmds; do 6100 IFS="$save_ifs" 6101 eval cmd=\"$cmd\" 6102 $show "$cmd" 6103 $run eval "$cmd" || exit $? 6104 done 6105 IFS="$save_ifs" 6106 done 6107 6108 if test -n "$future_libdirs"; then 6109 $echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2 6110 fi 6111 6112 if test -n "$current_libdirs"; then 6113 # Maybe just do a dry run. 6114 test -n "$run" && current_libdirs=" -n$current_libdirs" 6115 exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' 6116 else 6117 exit $EXIT_SUCCESS 6118 fi 6119 ;; 6120 6121 # libtool finish mode 6122 finish) 6123 modename="$modename: finish" 6124 libdirs="$nonopt" 6125 admincmds= 6126 6127 if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then 6128 for dir 6129 do 6130 libdirs="$libdirs $dir" 6131 done 6132 6133 for libdir in $libdirs; do 6134 if test -n "$finish_cmds"; then 6135 # Do each command in the finish commands. 6136 cmds=$finish_cmds 6137 save_ifs="$IFS"; IFS='~' 6138 for cmd in $cmds; do 6139 IFS="$save_ifs" 6140 eval cmd=\"$cmd\" 6141 $show "$cmd" 6142 $run eval "$cmd" || admincmds="$admincmds 6143 $cmd" 6144 done 6145 IFS="$save_ifs" 6146 fi 6147 if test -n "$finish_eval"; then 6148 # Do the single finish_eval. 6149 eval cmds=\"$finish_eval\" 6150 $run eval "$cmds" || admincmds="$admincmds 6151 $cmds" 6152 fi 6153 done 6154 fi 6155 6156 # Exit here if they wanted silent mode. 6157 test "$show" = : && exit $EXIT_SUCCESS 6158 6159 $echo "----------------------------------------------------------------------" 6160 $echo "Libraries have been installed in:" 6161 for libdir in $libdirs; do 6162 $echo " $libdir" 6163 done 6164 $echo 6165 $echo "If you ever happen to want to link against installed libraries" 6166 $echo "in a given directory, LIBDIR, you must either use libtool, and" 6167 $echo "specify the full pathname of the library, or use the \`-LLIBDIR'" 6168 $echo "flag during linking and do at least one of the following:" 6169 if test -n "$shlibpath_var"; then 6170 $echo " - add LIBDIR to the \`$shlibpath_var' environment variable" 6171 $echo " during execution" 6172 fi 6173 if test -n "$runpath_var"; then 6174 $echo " - add LIBDIR to the \`$runpath_var' environment variable" 6175 $echo " during linking" 6176 fi 6177 if test -n "$hardcode_libdir_flag_spec"; then 6178 libdir=LIBDIR 6179 eval flag=\"$hardcode_libdir_flag_spec\" 6180 6181 $echo " - use the \`$flag' linker flag" 6182 fi 6183 if test -n "$admincmds"; then 6184 $echo " - have your system administrator run these commands:$admincmds" 6185 fi 6186 if test -f /etc/ld.so.conf; then 6187 $echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" 6188 fi 6189 $echo 6190 $echo "See any operating system documentation about shared libraries for" 6191 $echo "more information, such as the ld(1) and ld.so(8) manual pages." 6192 $echo "----------------------------------------------------------------------" 6193 exit $EXIT_SUCCESS 6194 ;; 6195 6196 # libtool execute mode 6197 execute) 6198 modename="$modename: execute" 6199 6200 # The first argument is the command name. 6201 cmd="$nonopt" 6202 if test -z "$cmd"; then 6203 $echo "$modename: you must specify a COMMAND" 1>&2 6204 $echo "$help" 6205 exit $EXIT_FAILURE 6206 fi 6207 6208 # Handle -dlopen flags immediately. 6209 for file in $execute_dlfiles; do 6210 if test ! -f "$file"; then 6211 $echo "$modename: \`$file' is not a file" 1>&2 6212 $echo "$help" 1>&2 6213 exit $EXIT_FAILURE 6214 fi 6215 6216 dir= 6217 case $file in 6218 *.la) 6219 # Check to see that this really is a libtool archive. 6220 if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : 6221 else 6222 $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 6223 $echo "$help" 1>&2 6224 exit $EXIT_FAILURE 6225 fi 6226 6227 # Read the libtool library. 6228 dlname= 6229 library_names= 6230 6231 # If there is no directory component, then add one. 6232 case $file in 6233 */* | *\\*) . $file ;; 6234 *) . ./$file ;; 6235 esac 6236 6237 # Skip this library if it cannot be dlopened. 6238 if test -z "$dlname"; then 6239 # Warn if it was a shared library. 6240 test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'" 6241 continue 6242 fi 6243 6244 dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` 6245 test "X$dir" = "X$file" && dir=. 6246 6247 if test -f "$dir/$objdir/$dlname"; then 6248 dir="$dir/$objdir" 6249 else 6250 $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2 6251 exit $EXIT_FAILURE 6252 fi 6253 ;; 6254 6255 *.lo) 6256 # Just add the directory containing the .lo file. 6257 dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` 6258 test "X$dir" = "X$file" && dir=. 6259 ;; 6260 6261 *) 6262 $echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2 6263 continue 6264 ;; 6265 esac 6266 6267 # Get the absolute pathname. 6268 absdir=`cd "$dir" && pwd` 6269 test -n "$absdir" && dir="$absdir" 6270 6271 # Now add the directory to shlibpath_var. 6272 if eval "test -z \"\$$shlibpath_var\""; then 6273 eval "$shlibpath_var=\"\$dir\"" 6274 else 6275 eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" 6276 fi 6277 done 6278 6279 # This variable tells wrapper scripts just to set shlibpath_var 6280 # rather than running their programs. 6281 libtool_execute_magic="$magic" 6282 6283 # Check if any of the arguments is a wrapper script. 6284 args= 6285 for file 6286 do 6287 case $file in 6288 -*) ;; 6289 *) 6290 # Do a test to see if this is really a libtool program. 6291 if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then 6292 # If there is no directory component, then add one. 6293 case $file in 6294 */* | *\\*) . $file ;; 6295 *) . ./$file ;; 6296 esac 6297 6298 # Transform arg to wrapped name. 6299 file="$progdir/$program" 6300 fi 6301 ;; 6302 esac 6303 # Quote arguments (to preserve shell metacharacters). 6304 file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"` 6305 args="$args \"$file\"" 6306 done 6307 6308 if test -z "$run"; then 6309 if test -n "$shlibpath_var"; then 6310 # Export the shlibpath_var. 6311 eval "export $shlibpath_var" 6312 fi 6313 6314 # Restore saved environment variables 6315 if test "${save_LC_ALL+set}" = set; then 6316 LC_ALL="$save_LC_ALL"; export LC_ALL 6317 fi 6318 if test "${save_LANG+set}" = set; then 6319 LANG="$save_LANG"; export LANG 6320 fi 6321 6322 # Now prepare to actually exec the command. 6323 exec_cmd="\$cmd$args" 6324 else 6325 # Display what would be done. 6326 if test -n "$shlibpath_var"; then 6327 eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\"" 6328 $echo "export $shlibpath_var" 6329 fi 6330 $echo "$cmd$args" 6331 exit $EXIT_SUCCESS 6332 fi 6333 ;; 6334 6335 # libtool clean and uninstall mode 6336 clean | uninstall) 6337 modename="$modename: $mode" 6338 rm="$nonopt" 6339 files= 6340 rmforce= 6341 exit_status=0 6342 6343 # This variable tells wrapper scripts just to set variables rather 6344 # than running their programs. 6345 libtool_install_magic="$magic" 6346 6347 for arg 6348 do 6349 case $arg in 6350 -f) rm="$rm $arg"; rmforce=yes ;; 6351 -*) rm="$rm $arg" ;; 6352 *) files="$files $arg" ;; 6353 esac 6354 done 6355 6356 if test -z "$rm"; then 6357 $echo "$modename: you must specify an RM program" 1>&2 6358 $echo "$help" 1>&2 6359 exit $EXIT_FAILURE 6360 fi 6361 6362 rmdirs= 6363 6364 origobjdir="$objdir" 6365 for file in $files; do 6366 dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` 6367 if test "X$dir" = "X$file"; then 6368 dir=. 6369 objdir="$origobjdir" 6370 else 6371 objdir="$dir/$origobjdir" 6372 fi 6373 name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` 6374 test "$mode" = uninstall && objdir="$dir" 6375 6376 # Remember objdir for removal later, being careful to avoid duplicates 6377 if test "$mode" = clean; then 6378 case " $rmdirs " in 6379 *" $objdir "*) ;; 6380 *) rmdirs="$rmdirs $objdir" ;; 6381 esac 6382 fi 6383 6384 # Don't error if the file doesn't exist and rm -f was used. 6385 if (test -L "$file") >/dev/null 2>&1 \ 6386 || (test -h "$file") >/dev/null 2>&1 \ 6387 || test -f "$file"; then 6388 : 6389 elif test -d "$file"; then 6390 exit_status=1 6391 continue 6392 elif test "$rmforce" = yes; then 6393 continue 6394 fi 6395 6396 rmfiles="$file" 6397 6398 case $name in 6399 *.la) 6400 # Possibly a libtool archive, so verify it. 6401 if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then 6402 . $dir/$name 6403 6404 # Delete the libtool libraries and symlinks. 6405 for n in $library_names; do 6406 rmfiles="$rmfiles $objdir/$n" 6407 done 6408 test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library" 6409 test "$mode" = clean && rmfiles="$rmfiles $objdir/$name $objdir/${name}i" 6410 6411 if test "$mode" = uninstall; then 6412 if test -n "$library_names"; then 6413 # Do each command in the postuninstall commands. 6414 cmds=$postuninstall_cmds 6415 save_ifs="$IFS"; IFS='~' 6416 for cmd in $cmds; do 6417 IFS="$save_ifs" 6418 eval cmd=\"$cmd\" 6419 $show "$cmd" 6420 $run eval "$cmd" 6421 if test "$?" -ne 0 && test "$rmforce" != yes; then 6422 exit_status=1 6423 fi 6424 done 6425 IFS="$save_ifs" 6426 fi 6427 6428 if test -n "$old_library"; then 6429 # Do each command in the old_postuninstall commands. 6430 cmds=$old_postuninstall_cmds 6431 save_ifs="$IFS"; IFS='~' 6432 for cmd in $cmds; do 6433 IFS="$save_ifs" 6434 eval cmd=\"$cmd\" 6435 $show "$cmd" 6436 $run eval "$cmd" 6437 if test "$?" -ne 0 && test "$rmforce" != yes; then 6438 exit_status=1 6439 fi 6440 done 6441 IFS="$save_ifs" 6442 fi 6443 # FIXME: should reinstall the best remaining shared library. 6444 fi 6445 fi 6446 ;; 6447 6448 *.lo) 6449 # Possibly a libtool object, so verify it. 6450 if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then 6451 6452 # Read the .lo file 6453 . $dir/$name 6454 6455 # Add PIC object to the list of files to remove. 6456 if test -n "$pic_object" \ 6457 && test "$pic_object" != none; then 6458 rmfiles="$rmfiles $dir/$pic_object" 6459 fi 6460 6461 # Add non-PIC object to the list of files to remove. 6462 if test -n "$non_pic_object" \ 6463 && test "$non_pic_object" != none; then 6464 rmfiles="$rmfiles $dir/$non_pic_object" 6465 fi 6466 fi 6467 ;; 6468 6469 *) 6470 if test "$mode" = clean ; then 6471 noexename=$name 6472 case $file in 6473 *.exe) 6474 file=`$echo $file|${SED} 's,.exe$,,'` 6475 noexename=`$echo $name|${SED} 's,.exe$,,'` 6476 # $file with .exe has already been added to rmfiles, 6477 # add $file without .exe 6478 rmfiles="$rmfiles $file" 6479 ;; 6480 esac 6481 # Do a test to see if this is a libtool program. 6482 if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then 6483 relink_command= 6484 . $dir/$noexename 6485 6486 # note $name still contains .exe if it was in $file originally 6487 # as does the version of $file that was added into $rmfiles 6488 rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}" 6489 if test "$fast_install" = yes && test -n "$relink_command"; then 6490 rmfiles="$rmfiles $objdir/lt-$name" 6491 fi 6492 if test "X$noexename" != "X$name" ; then 6493 rmfiles="$rmfiles $objdir/lt-${noexename}.c" 6494 fi 6495 fi 6496 fi 6497 ;; 6498 esac 6499 $show "$rm $rmfiles" 6500 $run $rm $rmfiles || exit_status=1 6501 done 6502 objdir="$origobjdir" 6503 6504 # Try to remove the ${objdir}s in the directories where we deleted files 6505 for dir in $rmdirs; do 6506 if test -d "$dir"; then 6507 $show "rmdir $dir" 6508 $run rmdir $dir >/dev/null 2>&1 6509 fi 6510 done 6511 6512 exit $exit_status 6513 ;; 6514 6515 "") 6516 $echo "$modename: you must specify a MODE" 1>&2 6517 $echo "$generic_help" 1>&2 6518 exit $EXIT_FAILURE 6519 ;; 6520 esac 6521 6522 if test -z "$exec_cmd"; then 6523 $echo "$modename: invalid operation mode \`$mode'" 1>&2 6524 $echo "$generic_help" 1>&2 6525 exit $EXIT_FAILURE 6526 fi 6527fi # test -z "$show_help" 6528 6529if test -n "$exec_cmd"; then 6530 eval exec $exec_cmd 6531 exit $EXIT_FAILURE 6532fi 6533 6534# We need to display help for each of the modes. 6535case $mode in 6536"") $echo \ 6537"Usage: $modename [OPTION]... [MODE-ARG]... 6538 6539Provide generalized library-building support services. 6540 6541 --config show all configuration variables 6542 --debug enable verbose shell tracing 6543-n, --dry-run display commands without modifying any files 6544 --features display basic configuration information and exit 6545 --finish same as \`--mode=finish' 6546 --help display this help message and exit 6547 --mode=MODE use operation mode MODE [default=inferred from MODE-ARGS] 6548 --quiet same as \`--silent' 6549 --silent don't print informational messages 6550 --tag=TAG use configuration variables from tag TAG 6551 --version print version information 6552 6553MODE must be one of the following: 6554 6555 clean remove files from the build directory 6556 compile compile a source file into a libtool object 6557 execute automatically set library path, then run a program 6558 finish complete the installation of libtool libraries 6559 install install libraries or executables 6560 link create a library or an executable 6561 uninstall remove libraries from an installed directory 6562 6563MODE-ARGS vary depending on the MODE. Try \`$modename --help --mode=MODE' for 6564a more detailed description of MODE. 6565 6566Report bugs to <bug-libtool@gnu.org>." 6567 exit $EXIT_SUCCESS 6568 ;; 6569 6570clean) 6571 $echo \ 6572"Usage: $modename [OPTION]... --mode=clean RM [RM-OPTION]... FILE... 6573 6574Remove files from the build directory. 6575 6576RM is the name of the program to use to delete files associated with each FILE 6577(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed 6578to RM. 6579 6580If FILE is a libtool library, object or program, all the files associated 6581with it are deleted. Otherwise, only FILE itself is deleted using RM." 6582 ;; 6583 6584compile) 6585 $echo \ 6586"Usage: $modename [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE 6587 6588Compile a source file into a libtool library object. 6589 6590This mode accepts the following additional options: 6591 6592 -o OUTPUT-FILE set the output file name to OUTPUT-FILE 6593 -prefer-pic try to building PIC objects only 6594 -prefer-non-pic try to building non-PIC objects only 6595 -static always build a \`.o' file suitable for static linking 6596 6597COMPILE-COMMAND is a command to be used in creating a \`standard' object file 6598from the given SOURCEFILE. 6599 6600The output file name is determined by removing the directory component from 6601SOURCEFILE, then substituting the C source code suffix \`.c' with the 6602library object suffix, \`.lo'." 6603 ;; 6604 6605execute) 6606 $echo \ 6607"Usage: $modename [OPTION]... --mode=execute COMMAND [ARGS]... 6608 6609Automatically set library path, then run a program. 6610 6611This mode accepts the following additional options: 6612 6613 -dlopen FILE add the directory containing FILE to the library path 6614 6615This mode sets the library path environment variable according to \`-dlopen' 6616flags. 6617 6618If any of the ARGS are libtool executable wrappers, then they are translated 6619into their corresponding uninstalled binary, and any of their required library 6620directories are added to the library path. 6621 6622Then, COMMAND is executed, with ARGS as arguments." 6623 ;; 6624 6625finish) 6626 $echo \ 6627"Usage: $modename [OPTION]... --mode=finish [LIBDIR]... 6628 6629Complete the installation of libtool libraries. 6630 6631Each LIBDIR is a directory that contains libtool libraries. 6632 6633The commands that this mode executes may require superuser privileges. Use 6634the \`--dry-run' option if you just want to see what would be executed." 6635 ;; 6636 6637install) 6638 $echo \ 6639"Usage: $modename [OPTION]... --mode=install INSTALL-COMMAND... 6640 6641Install executables or libraries. 6642 6643INSTALL-COMMAND is the installation command. The first component should be 6644either the \`install' or \`cp' program. 6645 6646The rest of the components are interpreted as arguments to that command (only 6647BSD-compatible install options are recognized)." 6648 ;; 6649 6650link) 6651 $echo \ 6652"Usage: $modename [OPTION]... --mode=link LINK-COMMAND... 6653 6654Link object files or libraries together to form another library, or to 6655create an executable program. 6656 6657LINK-COMMAND is a command using the C compiler that you would use to create 6658a program from several object files. 6659 6660The following components of LINK-COMMAND are treated specially: 6661 6662 -all-static do not do any dynamic linking at all 6663 -avoid-version do not add a version suffix if possible 6664 -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime 6665 -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols 6666 -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) 6667 -export-symbols SYMFILE 6668 try to export only the symbols listed in SYMFILE 6669 -export-symbols-regex REGEX 6670 try to export only the symbols matching REGEX 6671 -LLIBDIR search LIBDIR for required installed libraries 6672 -lNAME OUTPUT-FILE requires the installed library libNAME 6673 -module build a library that can dlopened 6674 -no-fast-install disable the fast-install mode 6675 -no-install link a not-installable executable 6676 -no-undefined declare that a library does not refer to external symbols 6677 -o OUTPUT-FILE create OUTPUT-FILE from the specified objects 6678 -objectlist FILE Use a list of object files found in FILE to specify objects 6679 -precious-files-regex REGEX 6680 don't remove output files matching REGEX 6681 -release RELEASE specify package release information 6682 -rpath LIBDIR the created library will eventually be installed in LIBDIR 6683 -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries 6684 -static do not do any dynamic linking of libtool libraries 6685 -version-info CURRENT[:REVISION[:AGE]] 6686 specify library version info [each variable defaults to 0] 6687 6688All other options (arguments beginning with \`-') are ignored. 6689 6690Every other argument is treated as a filename. Files ending in \`.la' are 6691treated as uninstalled libtool libraries, other files are standard or library 6692object files. 6693 6694If the OUTPUT-FILE ends in \`.la', then a libtool library is created, 6695only library objects (\`.lo' files) may be specified, and \`-rpath' is 6696required, except when creating a convenience library. 6697 6698If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created 6699using \`ar' and \`ranlib', or on Windows using \`lib'. 6700 6701If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file 6702is created, otherwise an executable program is created." 6703 ;; 6704 6705uninstall) 6706 $echo \ 6707"Usage: $modename [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... 6708 6709Remove libraries from an installation directory. 6710 6711RM is the name of the program to use to delete files associated with each FILE 6712(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed 6713to RM. 6714 6715If FILE is a libtool library, all the files associated with it are deleted. 6716Otherwise, only FILE itself is deleted using RM." 6717 ;; 6718 6719*) 6720 $echo "$modename: invalid operation mode \`$mode'" 1>&2 6721 $echo "$help" 1>&2 6722 exit $EXIT_FAILURE 6723 ;; 6724esac 6725 6726$echo 6727$echo "Try \`$modename --help' for more information about other modes." 6728 6729exit $EXIT_SUCCESS 6730 6731# The TAGs below are defined such that we never get into a situation 6732# in which we disable both kinds of libraries. Given conflicting 6733# choices, we go for a static library, that is the most portable, 6734# since we can't tell whether shared libraries were disabled because 6735# the user asked for that or because the platform doesn't support 6736# them. This is particularly important on AIX, because we don't 6737# support having both static and shared libraries enabled at the same 6738# time on that platform, so we default to a shared-only configuration. 6739# If a disable-shared tag is given, we'll fallback to a static-only 6740# configuration. But we'll never go from static-only to shared-only. 6741 6742# ### BEGIN LIBTOOL TAG CONFIG: disable-shared 6743build_libtool_libs=no 6744build_old_libs=yes 6745# ### END LIBTOOL TAG CONFIG: disable-shared 6746 6747# ### BEGIN LIBTOOL TAG CONFIG: disable-static 6748build_old_libs=`case $build_libtool_libs in yes) $echo no;; *) $echo yes;; esac` 6749# ### END LIBTOOL TAG CONFIG: disable-static 6750 6751# Local Variables: 6752# mode:shell-script 6753# sh-indentation:2 6754# End: 6755# ### BEGIN LIBTOOL TAG CONFIG: CXX 6756 6757# Libtool was configured on host localhost.localdomain: 6758 6759# Shell to use when invoking shell scripts. 6760SHELL="/bin/sh" 6761 6762# Whether or not to build shared libraries. 6763build_libtool_libs=yes 6764 6765# Whether or not to build static libraries. 6766build_old_libs=yes 6767 6768# Whether or not to add -lc for building shared libraries. 6769build_libtool_need_lc=no 6770 6771# Whether or not to disallow shared libs when runtime libs are static 6772allow_libtool_libs_with_static_runtimes=no 6773 6774# Whether or not to optimize for fast installation. 6775fast_install=yes 6776 6777# The host system. 6778host_alias=arm-linux 6779host=arm-unknown-linux-gnu 6780 6781# An echo program that does not interpret backslashes. 6782echo="echo" 6783 6784# The archiver. 6785AR="arm-brcm-linux-uclibcgnueabi-ar" 6786AR_FLAGS="cru" 6787 6788# A C compiler. 6789LTCC="arm-brcm-linux-uclibcgnueabi-gcc" 6790 6791# A language-specific compiler. 6792CC="g++" 6793 6794# Is the compiler the GNU C compiler? 6795with_gcc=yes 6796 6797# An ERE matcher. 6798EGREP="grep -E" 6799 6800# The linker used to build libraries. 6801LD="arm-brcm-linux-uclibcgnueabi-ld" 6802 6803# Whether we need hard or soft links. 6804LN_S="ln -s" 6805 6806# A BSD-compatible nm program. 6807NM="arm-brcm-linux-uclibcgnueabi-nm" 6808 6809# A symbol stripping program 6810STRIP="arm-brcm-linux-uclibcgnueabi-strip" 6811 6812# Used to examine libraries when file_magic_cmd begins "file" 6813MAGIC_CMD=file 6814 6815# Used on cygwin: DLL creation program. 6816DLLTOOL="dlltool" 6817 6818# Used on cygwin: object dumper. 6819OBJDUMP="arm-brcm-linux-uclibcgnueabi-objdump" 6820 6821# Used on cygwin: assembler. 6822AS="arm-brcm-linux-uclibcgnueabi-as" 6823 6824# The name of the directory that contains temporary libtool files. 6825objdir=.libs 6826 6827# How to create reloadable object files. 6828reload_flag=" -r" 6829reload_cmds="\$LD\$reload_flag -o \$output\$reload_objs" 6830 6831# How to pass a linker flag through the compiler. 6832wl="-Wl," 6833 6834# Object file suffix (normally "o"). 6835objext="o" 6836 6837# Old archive suffix (normally "a"). 6838libext="a" 6839 6840# Shared library suffix (normally ".so"). 6841shrext_cmds='.so' 6842 6843# Executable file suffix (normally ""). 6844exeext="" 6845 6846# Additional compiler flags for building library objects. 6847pic_flag=" -fPIC -DPIC" 6848pic_mode=default 6849 6850# What is the maximum length of a command? 6851max_cmd_len=32768 6852 6853# Does compiler simultaneously support -c and -o options? 6854compiler_c_o="yes" 6855 6856# Must we lock files when doing compilation ? 6857need_locks="no" 6858 6859# Do we need the lib prefix for modules? 6860need_lib_prefix=no 6861 6862# Do we need a version for libraries? 6863need_version=no 6864 6865# Whether dlopen is supported. 6866dlopen_support=unknown 6867 6868# Whether dlopen of programs is supported. 6869dlopen_self=unknown 6870 6871# Whether dlopen of statically linked programs is supported. 6872dlopen_self_static=unknown 6873 6874# Compiler flag to prevent dynamic linking. 6875link_static_flag="-static" 6876 6877# Compiler flag to turn off builtin functions. 6878no_builtin_flag=" -fno-builtin" 6879 6880# Compiler flag to allow reflexive dlopens. 6881export_dynamic_flag_spec="\${wl}--export-dynamic" 6882 6883# Compiler flag to generate shared objects directly from archives. 6884whole_archive_flag_spec="\${wl}--whole-archive\$convenience \${wl}--no-whole-archive" 6885 6886# Compiler flag to generate thread-safe objects. 6887thread_safe_flag_spec="" 6888 6889# Library versioning type. 6890version_type=linux 6891 6892# Format of library name prefix. 6893libname_spec="lib\$name" 6894 6895# List of archive names. First name is the real one, the rest are links. 6896# The last name is the one that the linker finds with -lNAME. 6897library_names_spec="\${libname}\${release}\${shared_ext}\$versuffix \${libname}\${release}\${shared_ext}\$major \$libname\${shared_ext}" 6898 6899# The coded name of the library, if different from the real name. 6900soname_spec="\${libname}\${release}\${shared_ext}\$major" 6901 6902# Commands used to build and install an old-style archive. 6903RANLIB="arm-brcm-linux-uclibcgnueabi-ranlib" 6904old_archive_cmds="\$AR \$AR_FLAGS \$oldlib\$oldobjs\$old_deplibs~\$RANLIB \$oldlib" 6905old_postinstall_cmds="\$RANLIB \$oldlib~chmod 644 \$oldlib" 6906old_postuninstall_cmds="" 6907 6908# Create an old-style archive from a shared archive. 6909old_archive_from_new_cmds="" 6910 6911# Create a temporary old-style archive to link instead of a shared archive. 6912old_archive_from_expsyms_cmds="" 6913 6914# Commands used to build and install a shared archive. 6915archive_cmds="\$CC -shared -nostdlib \$predep_objects \$libobjs \$deplibs \$postdep_objects \$compiler_flags \${wl}-soname \$wl\$soname -o \$lib" 6916archive_expsym_cmds="\$CC -shared -nostdlib \$predep_objects \$libobjs \$deplibs \$postdep_objects \$compiler_flags \${wl}-soname \$wl\$soname \${wl}-retain-symbols-file \$wl\$export_symbols -o \$lib" 6917postinstall_cmds="" 6918postuninstall_cmds="" 6919 6920# Commands used to build a loadable module (assumed same as above if empty) 6921module_cmds="" 6922module_expsym_cmds="" 6923 6924# Commands to strip libraries. 6925old_striplib="arm-brcm-linux-uclibcgnueabi-strip --strip-debug" 6926striplib="arm-brcm-linux-uclibcgnueabi-strip --strip-unneeded" 6927 6928# Dependencies to place before the objects being linked to create a 6929# shared library. 6930predep_objects="/usr/lib/gcc/i386-redhat-linux/4.3.2/../../../crti.o /usr/lib/gcc/i386-redhat-linux/4.3.2/crtbeginS.o" 6931 6932# Dependencies to place after the objects being linked to create a 6933# shared library. 6934postdep_objects="/usr/lib/gcc/i386-redhat-linux/4.3.2/crtendS.o /usr/lib/gcc/i386-redhat-linux/4.3.2/../../../crtn.o" 6935 6936# Dependencies to place before the objects being linked to create a 6937# shared library. 6938predeps="" 6939 6940# Dependencies to place after the objects being linked to create a 6941# shared library. 6942postdeps="-lstdc++ -lm -lgcc_s -lc -lgcc_s" 6943 6944# The library search path used internally by the compiler when linking 6945# a shared library. 6946compiler_lib_search_path="-L/usr/lib/gcc/i386-redhat-linux/4.3.2 -L/usr/lib/gcc/i386-redhat-linux/4.3.2 -L/usr/lib/gcc/i386-redhat-linux/4.3.2/../../.." 6947 6948# Method to check whether dependent libraries are shared objects. 6949deplibs_check_method="pass_all" 6950 6951# Command to use when deplibs_check_method == file_magic. 6952file_magic_cmd="\$MAGIC_CMD" 6953 6954# Flag that allows shared libraries with undefined symbols to be built. 6955allow_undefined_flag="" 6956 6957# Flag that forces no undefined symbols. 6958no_undefined_flag="" 6959 6960# Commands used to finish a libtool library installation in a directory. 6961finish_cmds="PATH=\\\"\\\$PATH:/sbin\\\" ldconfig -n \$libdir" 6962 6963# Same as above, but a single script fragment to be evaled but not shown. 6964finish_eval="" 6965 6966# Take the output of nm and produce a listing of raw symbols and C names. 6967global_symbol_pipe="sed -n -e 's/^.*[ ]\\([ABCDGIRSTW][ABCDGIRSTW]*\\)[ ][ ]*\\(\\)\\([_A-Za-z][_A-Za-z0-9]*\\)\$/\\1 \\2\\3 \\3/p'" 6968 6969# Transform the output of nm in a proper C declaration 6970global_symbol_to_cdecl="sed -n -e 's/^. .* \\(.*\\)\$/extern int \\1;/p'" 6971 6972# Transform the output of nm in a C name address pair 6973global_symbol_to_c_name_address="sed -n -e 's/^: \\([^ ]*\\) \$/ {\\\"\\1\\\", (lt_ptr) 0},/p' -e 's/^[BCDEGRST] \\([^ ]*\\) \\([^ ]*\\)\$/ {\"\\2\", (lt_ptr) \\&\\2},/p'" 6974 6975# This is the shared library runtime path variable. 6976runpath_var=LD_RUN_PATH 6977 6978# This is the shared library path variable. 6979shlibpath_var=LD_LIBRARY_PATH 6980 6981# Is shlibpath searched before the hard-coded library search path? 6982shlibpath_overrides_runpath=no 6983 6984# How to hardcode a shared library path into an executable. 6985hardcode_action=immediate 6986 6987# Whether we should hardcode library paths into libraries. 6988hardcode_into_libs=yes 6989 6990# Flag to hardcode $libdir into a binary during linking. 6991# This must work even if $libdir does not exist. 6992hardcode_libdir_flag_spec="\${wl}--rpath \${wl}\$libdir" 6993 6994# If ld is used when linking, flag to hardcode $libdir into 6995# a binary during linking. This must work even if $libdir does 6996# not exist. 6997hardcode_libdir_flag_spec_ld="" 6998 6999# Whether we need a single -rpath flag with a separated argument. 7000hardcode_libdir_separator="" 7001 7002# Set to yes if using DIR/libNAME during linking hardcodes DIR into the 7003# resulting binary. 7004hardcode_direct=no 7005 7006# Set to yes if using the -LDIR flag during linking hardcodes DIR into the 7007# resulting binary. 7008hardcode_minus_L=no 7009 7010# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into 7011# the resulting binary. 7012hardcode_shlibpath_var= 7013 7014# Set to yes if building a shared library automatically hardcodes DIR into the library 7015# and all subsequent libraries and executables linked against it. 7016hardcode_automatic=no 7017 7018# Variables whose values should be saved in libtool wrapper scripts and 7019# restored at relink time. 7020variables_saved_for_relink="PATH LD_LIBRARY_PATH LD_RUN_PATH GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 7021 7022# Whether libtool must link a program against all its dependency libraries. 7023link_all_deplibs=unknown 7024 7025# Compile-time system search path for libraries 7026sys_lib_search_path_spec=" /usr/lib/gcc/i386-redhat-linux/4.3.2/ /usr/lib/gcc/i386-redhat-linux/4.3.2/ /usr/lib/gcc/i386-redhat-linux/4.3.2/../../../../i386-redhat-linux/lib/i386-redhat-linux/4.3.2/ /usr/lib/gcc/i386-redhat-linux/4.3.2/../../../../i386-redhat-linux/lib/ /usr/lib/gcc/i386-redhat-linux/4.3.2/../../../i386-redhat-linux/4.3.2/ /usr/lib/gcc/i386-redhat-linux/4.3.2/../../../ /lib/i386-redhat-linux/4.3.2/ /lib/ /usr/lib/i386-redhat-linux/4.3.2/ /usr/lib/" 7027 7028# Run-time system search path for libraries 7029sys_lib_dlsearch_path_spec="/lib /usr/lib include ld.so.conf.d/*.conf " 7030 7031# Fix the shell variable $srcfile for the compiler. 7032fix_srcfile_path="" 7033 7034# Set to yes if exported symbols are required. 7035always_export_symbols=no 7036 7037# The commands to list exported symbols. 7038export_symbols_cmds="\$NM \$libobjs \$convenience | \$global_symbol_pipe | \$SED 's/.* //' | sort | uniq > \$export_symbols" 7039 7040# The commands to extract the exported symbol list from a shared archive. 7041extract_expsyms_cmds="" 7042 7043# Symbols that should not be listed in the preloaded symbols. 7044exclude_expsyms="" 7045 7046# Symbols that must always be exported. 7047include_expsyms="" 7048 7049# ### END LIBTOOL TAG CONFIG: CXX 7050 7051# ### BEGIN LIBTOOL TAG CONFIG: F77 7052 7053# Libtool was configured on host localhost.localdomain: 7054 7055# Shell to use when invoking shell scripts. 7056SHELL="/bin/sh" 7057 7058# Whether or not to build shared libraries. 7059build_libtool_libs=yes 7060 7061# Whether or not to build static libraries. 7062build_old_libs=yes 7063 7064# Whether or not to add -lc for building shared libraries. 7065build_libtool_need_lc=no 7066 7067# Whether or not to disallow shared libs when runtime libs are static 7068allow_libtool_libs_with_static_runtimes=no 7069 7070# Whether or not to optimize for fast installation. 7071fast_install=yes 7072 7073# The host system. 7074host_alias=arm-linux 7075host=arm-unknown-linux-gnu 7076 7077# An echo program that does not interpret backslashes. 7078echo="echo" 7079 7080# The archiver. 7081AR="arm-brcm-linux-uclibcgnueabi-ar" 7082AR_FLAGS="cru" 7083 7084# A C compiler. 7085LTCC="arm-brcm-linux-uclibcgnueabi-gcc" 7086 7087# A language-specific compiler. 7088CC="f95" 7089 7090# Is the compiler the GNU C compiler? 7091with_gcc=yes 7092 7093# An ERE matcher. 7094EGREP="grep -E" 7095 7096# The linker used to build libraries. 7097LD="arm-brcm-linux-uclibcgnueabi-ld" 7098 7099# Whether we need hard or soft links. 7100LN_S="ln -s" 7101 7102# A BSD-compatible nm program. 7103NM="arm-brcm-linux-uclibcgnueabi-nm" 7104 7105# A symbol stripping program 7106STRIP="arm-brcm-linux-uclibcgnueabi-strip" 7107 7108# Used to examine libraries when file_magic_cmd begins "file" 7109MAGIC_CMD=file 7110 7111# Used on cygwin: DLL creation program. 7112DLLTOOL="dlltool" 7113 7114# Used on cygwin: object dumper. 7115OBJDUMP="arm-brcm-linux-uclibcgnueabi-objdump" 7116 7117# Used on cygwin: assembler. 7118AS="arm-brcm-linux-uclibcgnueabi-as" 7119 7120# The name of the directory that contains temporary libtool files. 7121objdir=.libs 7122 7123# How to create reloadable object files. 7124reload_flag=" -r" 7125reload_cmds="\$LD\$reload_flag -o \$output\$reload_objs" 7126 7127# How to pass a linker flag through the compiler. 7128wl="-Wl," 7129 7130# Object file suffix (normally "o"). 7131objext="o" 7132 7133# Old archive suffix (normally "a"). 7134libext="a" 7135 7136# Shared library suffix (normally ".so"). 7137shrext_cmds='.so' 7138 7139# Executable file suffix (normally ""). 7140exeext="" 7141 7142# Additional compiler flags for building library objects. 7143pic_flag=" -fPIC" 7144pic_mode=default 7145 7146# What is the maximum length of a command? 7147max_cmd_len=32768 7148 7149# Does compiler simultaneously support -c and -o options? 7150compiler_c_o="yes" 7151 7152# Must we lock files when doing compilation ? 7153need_locks="no" 7154 7155# Do we need the lib prefix for modules? 7156need_lib_prefix=no 7157 7158# Do we need a version for libraries? 7159need_version=no 7160 7161# Whether dlopen is supported. 7162dlopen_support=unknown 7163 7164# Whether dlopen of programs is supported. 7165dlopen_self=unknown 7166 7167# Whether dlopen of statically linked programs is supported. 7168dlopen_self_static=unknown 7169 7170# Compiler flag to prevent dynamic linking. 7171link_static_flag="-static" 7172 7173# Compiler flag to turn off builtin functions. 7174no_builtin_flag="" 7175 7176# Compiler flag to allow reflexive dlopens. 7177export_dynamic_flag_spec="\${wl}--export-dynamic" 7178 7179# Compiler flag to generate shared objects directly from archives. 7180whole_archive_flag_spec="\${wl}--whole-archive\$convenience \${wl}--no-whole-archive" 7181 7182# Compiler flag to generate thread-safe objects. 7183thread_safe_flag_spec="" 7184 7185# Library versioning type. 7186version_type=linux 7187 7188# Format of library name prefix. 7189libname_spec="lib\$name" 7190 7191# List of archive names. First name is the real one, the rest are links. 7192# The last name is the one that the linker finds with -lNAME. 7193library_names_spec="\${libname}\${release}\${shared_ext}\$versuffix \${libname}\${release}\${shared_ext}\$major \$libname\${shared_ext}" 7194 7195# The coded name of the library, if different from the real name. 7196soname_spec="\${libname}\${release}\${shared_ext}\$major" 7197 7198# Commands used to build and install an old-style archive. 7199RANLIB="arm-brcm-linux-uclibcgnueabi-ranlib" 7200old_archive_cmds="\$AR \$AR_FLAGS \$oldlib\$oldobjs\$old_deplibs~\$RANLIB \$oldlib" 7201old_postinstall_cmds="\$RANLIB \$oldlib~chmod 644 \$oldlib" 7202old_postuninstall_cmds="" 7203 7204# Create an old-style archive from a shared archive. 7205old_archive_from_new_cmds="" 7206 7207# Create a temporary old-style archive to link instead of a shared archive. 7208old_archive_from_expsyms_cmds="" 7209 7210# Commands used to build and install a shared archive. 7211archive_cmds="\$CC -shared \$libobjs \$deplibs \$compiler_flags \${wl}-soname \$wl\$soname -o \$lib" 7212archive_expsym_cmds="\$echo \\\"{ global:\\\" > \$output_objdir/\$libname.ver~ 7213cat \$export_symbols | sed -e \\\"s/\\\\(.*\\\\)/\\\\1;/\\\" >> \$output_objdir/\$libname.ver~ 7214\$echo \\\"local: *; };\\\" >> \$output_objdir/\$libname.ver~ 7215 \$CC -shared \$libobjs \$deplibs \$compiler_flags \${wl}-soname \$wl\$soname \${wl}-version-script \${wl}\$output_objdir/\$libname.ver -o \$lib" 7216postinstall_cmds="" 7217postuninstall_cmds="" 7218 7219# Commands used to build a loadable module (assumed same as above if empty) 7220module_cmds="" 7221module_expsym_cmds="" 7222 7223# Commands to strip libraries. 7224old_striplib="arm-brcm-linux-uclibcgnueabi-strip --strip-debug" 7225striplib="arm-brcm-linux-uclibcgnueabi-strip --strip-unneeded" 7226 7227# Dependencies to place before the objects being linked to create a 7228# shared library. 7229predep_objects="" 7230 7231# Dependencies to place after the objects being linked to create a 7232# shared library. 7233postdep_objects="" 7234 7235# Dependencies to place before the objects being linked to create a 7236# shared library. 7237predeps="" 7238 7239# Dependencies to place after the objects being linked to create a 7240# shared library. 7241postdeps="" 7242 7243# The library search path used internally by the compiler when linking 7244# a shared library. 7245compiler_lib_search_path="" 7246 7247# Method to check whether dependent libraries are shared objects. 7248deplibs_check_method="pass_all" 7249 7250# Command to use when deplibs_check_method == file_magic. 7251file_magic_cmd="\$MAGIC_CMD" 7252 7253# Flag that allows shared libraries with undefined symbols to be built. 7254allow_undefined_flag="" 7255 7256# Flag that forces no undefined symbols. 7257no_undefined_flag="" 7258 7259# Commands used to finish a libtool library installation in a directory. 7260finish_cmds="PATH=\\\"\\\$PATH:/sbin\\\" ldconfig -n \$libdir" 7261 7262# Same as above, but a single script fragment to be evaled but not shown. 7263finish_eval="" 7264 7265# Take the output of nm and produce a listing of raw symbols and C names. 7266global_symbol_pipe="sed -n -e 's/^.*[ ]\\([ABCDGIRSTW][ABCDGIRSTW]*\\)[ ][ ]*\\(\\)\\([_A-Za-z][_A-Za-z0-9]*\\)\$/\\1 \\2\\3 \\3/p'" 7267 7268# Transform the output of nm in a proper C declaration 7269global_symbol_to_cdecl="sed -n -e 's/^. .* \\(.*\\)\$/extern int \\1;/p'" 7270 7271# Transform the output of nm in a C name address pair 7272global_symbol_to_c_name_address="sed -n -e 's/^: \\([^ ]*\\) \$/ {\\\"\\1\\\", (lt_ptr) 0},/p' -e 's/^[BCDEGRST] \\([^ ]*\\) \\([^ ]*\\)\$/ {\"\\2\", (lt_ptr) \\&\\2},/p'" 7273 7274# This is the shared library runtime path variable. 7275runpath_var=LD_RUN_PATH 7276 7277# This is the shared library path variable. 7278shlibpath_var=LD_LIBRARY_PATH 7279 7280# Is shlibpath searched before the hard-coded library search path? 7281shlibpath_overrides_runpath=no 7282 7283# How to hardcode a shared library path into an executable. 7284hardcode_action=immediate 7285 7286# Whether we should hardcode library paths into libraries. 7287hardcode_into_libs=yes 7288 7289# Flag to hardcode $libdir into a binary during linking. 7290# This must work even if $libdir does not exist. 7291hardcode_libdir_flag_spec="\${wl}--rpath \${wl}\$libdir" 7292 7293# If ld is used when linking, flag to hardcode $libdir into 7294# a binary during linking. This must work even if $libdir does 7295# not exist. 7296hardcode_libdir_flag_spec_ld="" 7297 7298# Whether we need a single -rpath flag with a separated argument. 7299hardcode_libdir_separator="" 7300 7301# Set to yes if using DIR/libNAME during linking hardcodes DIR into the 7302# resulting binary. 7303hardcode_direct=no 7304 7305# Set to yes if using the -LDIR flag during linking hardcodes DIR into the 7306# resulting binary. 7307hardcode_minus_L=no 7308 7309# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into 7310# the resulting binary. 7311hardcode_shlibpath_var=unsupported 7312 7313# Set to yes if building a shared library automatically hardcodes DIR into the library 7314# and all subsequent libraries and executables linked against it. 7315hardcode_automatic=no 7316 7317# Variables whose values should be saved in libtool wrapper scripts and 7318# restored at relink time. 7319variables_saved_for_relink="PATH LD_LIBRARY_PATH LD_RUN_PATH GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 7320 7321# Whether libtool must link a program against all its dependency libraries. 7322link_all_deplibs=unknown 7323 7324# Compile-time system search path for libraries 7325sys_lib_search_path_spec=" /usr/lib/gcc/i386-redhat-linux/4.3.2/ /usr/lib/gcc/i386-redhat-linux/4.3.2/ /usr/lib/gcc/i386-redhat-linux/4.3.2/../../../../i386-redhat-linux/lib/i386-redhat-linux/4.3.2/ /usr/lib/gcc/i386-redhat-linux/4.3.2/../../../../i386-redhat-linux/lib/ /usr/lib/gcc/i386-redhat-linux/4.3.2/../../../i386-redhat-linux/4.3.2/ /usr/lib/gcc/i386-redhat-linux/4.3.2/../../../ /lib/i386-redhat-linux/4.3.2/ /lib/ /usr/lib/i386-redhat-linux/4.3.2/ /usr/lib/" 7326 7327# Run-time system search path for libraries 7328sys_lib_dlsearch_path_spec="/lib /usr/lib include ld.so.conf.d/*.conf " 7329 7330# Fix the shell variable $srcfile for the compiler. 7331fix_srcfile_path="" 7332 7333# Set to yes if exported symbols are required. 7334always_export_symbols=no 7335 7336# The commands to list exported symbols. 7337export_symbols_cmds="\$NM \$libobjs \$convenience | \$global_symbol_pipe | \$SED 's/.* //' | sort | uniq > \$export_symbols" 7338 7339# The commands to extract the exported symbol list from a shared archive. 7340extract_expsyms_cmds="" 7341 7342# Symbols that should not be listed in the preloaded symbols. 7343exclude_expsyms="_GLOBAL_OFFSET_TABLE_" 7344 7345# Symbols that must always be exported. 7346include_expsyms="" 7347 7348# ### END LIBTOOL TAG CONFIG: F77 7349 7350