3 # libtoolT - Provide generalized library-building support services.
4 # Generated automatically by (GNU simgrid 3.3-cvs)
5 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
7 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
8 # Free Software Foundation, Inc.
10 # This file is part of GNU Libtool:
11 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
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.
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.
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, USA.
27 # As a special exception to the GNU General Public License, if you
28 # distribute this file as part of a program that contains a
29 # configuration script generated by Autoconf, you may include it under
30 # the same distribution terms that you use for the rest of that program.
32 # A sed program that does not truncate output.
35 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
36 Xsed="/usr/bin/sed -e 1s/^X//"
38 # The HP-UX ksh and POSIX shell print the target directory to stdout
40 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
42 # The names of the tagged configurations supported by this script.
43 available_tags=" CXX GCJ"
45 # ### BEGIN LIBTOOL CONFIG
47 # Libtool was configured on host laserbeak:
49 # Shell to use when invoking shell scripts.
52 # Whether or not to build shared libraries.
53 build_libtool_libs=yes
55 # Whether or not to build static libraries.
58 # Whether or not to add -lc for building shared libraries.
59 build_libtool_need_lc=no
61 # Whether or not to disallow shared libs when runtime libs are static
62 allow_libtool_libs_with_static_runtimes=no
64 # Whether or not to optimize for fast installation.
69 host=i686-pc-linux-gnu
74 build=i686-pc-linux-gnu
77 # An echo program that does not interpret backslashes.
87 # LTCC compiler flags.
90 # A language-specific compiler.
93 # Is the compiler the GNU C compiler?
99 # The linker used to build libraries.
100 LD="/usr/i686-pc-linux-gnu/bin/ld"
102 # Whether we need hard or soft links.
105 # A BSD-compatible nm program.
108 # A symbol stripping program
111 # Used to examine libraries when file_magic_cmd begins "file"
114 # Used on cygwin: DLL creation program.
117 # Used on cygwin: object dumper.
120 # Used on cygwin: assembler.
123 # The name of the directory that contains temporary libtool files.
126 # How to create reloadable object files.
128 reload_cmds="\$LD\$reload_flag -o \$output\$reload_objs"
130 # How to pass a linker flag through the compiler.
133 # Object file suffix (normally "o").
136 # Old archive suffix (normally "a").
139 # Shared library suffix (normally ".so").
142 # Executable file suffix (normally "").
145 # Additional compiler flags for building library objects.
146 pic_flag=" -fPIC -DPIC"
149 # What is the maximum length of a command?
152 # Does compiler simultaneously support -c and -o options?
155 # Must we lock files when doing compilation?
158 # Do we need the lib prefix for modules?
161 # Do we need a version for libraries?
164 # Whether dlopen is supported.
165 dlopen_support=unknown
167 # Whether dlopen of programs is supported.
170 # Whether dlopen of statically linked programs is supported.
171 dlopen_self_static=unknown
173 # Compiler flag to prevent dynamic linking.
174 link_static_flag="-static"
176 # Compiler flag to turn off builtin functions.
177 no_builtin_flag=" -fno-builtin"
179 # Compiler flag to allow reflexive dlopens.
180 export_dynamic_flag_spec="\${wl}--export-dynamic"
182 # Compiler flag to generate shared objects directly from archives.
183 whole_archive_flag_spec="\${wl}--whole-archive\$convenience \${wl}--no-whole-archive"
185 # Compiler flag to generate thread-safe objects.
186 thread_safe_flag_spec=""
188 # Library versioning type.
191 # Format of library name prefix.
192 libname_spec="lib\$name"
194 # List of archive names. First name is the real one, the rest are links.
195 # The last name is the one that the linker finds with -lNAME.
196 library_names_spec="\${libname}\${release}\${shared_ext}\$versuffix \${libname}\${release}\${shared_ext}\$major \$libname\${shared_ext}"
198 # The coded name of the library, if different from the real name.
199 soname_spec="\${libname}\${release}\${shared_ext}\$major"
201 # Commands used to build and install an old-style archive.
203 old_archive_cmds="\$AR \$AR_FLAGS \$oldlib\$oldobjs~\$RANLIB \$oldlib"
204 old_postinstall_cmds="chmod 644 \$oldlib~\$RANLIB \$oldlib"
205 old_postuninstall_cmds=""
207 # Create an old-style archive from a shared archive.
208 old_archive_from_new_cmds=""
210 # Create a temporary old-style archive to link instead of a shared archive.
211 old_archive_from_expsyms_cmds=""
213 # Commands used to build and install a shared archive.
214 archive_cmds="\$CC -shared \$libobjs \$deplibs \$compiler_flags \${wl}-soname \$wl\$soname -o \$lib"
215 archive_expsym_cmds="\$echo \\\"{ global:\\\" > \$output_objdir/\$libname.ver~
216 cat \$export_symbols | sed -e \\\"s/\\\\(.*\\\\)/\\\\1;/\\\" >> \$output_objdir/\$libname.ver~
217 \$echo \\\"local: *; };\\\" >> \$output_objdir/\$libname.ver~
218 \$CC -shared \$libobjs \$deplibs \$compiler_flags \${wl}-soname \$wl\$soname \${wl}-version-script \${wl}\$output_objdir/\$libname.ver -o \$lib"
220 postuninstall_cmds=""
222 # Commands used to build a loadable module (assumed same as above if empty)
224 module_expsym_cmds=""
226 # Commands to strip libraries.
227 old_striplib="strip --strip-debug"
228 striplib="strip --strip-unneeded"
230 # Dependencies to place before the objects being linked to create a
234 # Dependencies to place after the objects being linked to create a
238 # Dependencies to place before the objects being linked to create a
242 # Dependencies to place after the objects being linked to create a
246 # The library search path used internally by the compiler when linking
248 compiler_lib_search_path=""
250 # Method to check whether dependent libraries are shared objects.
251 deplibs_check_method="pass_all"
253 # Command to use when deplibs_check_method == file_magic.
254 file_magic_cmd="\$MAGIC_CMD"
256 # Flag that allows shared libraries with undefined symbols to be built.
257 allow_undefined_flag=""
259 # Flag that forces no undefined symbols.
262 # Commands used to finish a libtool library installation in a directory.
263 finish_cmds="PATH=\\\"\\\$PATH:/sbin\\\" ldconfig -n \$libdir"
265 # Same as above, but a single script fragment to be evaled but not shown.
268 # Take the output of nm and produce a listing of raw symbols and C names.
269 global_symbol_pipe="sed -n -e 's/^.*[ ]\\([ABCDGIRSTW][ABCDGIRSTW]*\\)[ ][ ]*\\([_A-Za-z][_A-Za-z0-9]*\\)\$/\\1 \\2 \\2/p'"
271 # Transform the output of nm in a proper C declaration
272 global_symbol_to_cdecl="sed -n -e 's/^. .* \\(.*\\)\$/extern int \\1;/p'"
274 # Transform the output of nm in a C name address pair
275 global_symbol_to_c_name_address="sed -n -e 's/^: \\([^ ]*\\) \$/ {\\\"\\1\\\", (lt_ptr) 0},/p' -e 's/^[BCDEGRST] \\([^ ]*\\) \\([^ ]*\\)\$/ {\"\\2\", (lt_ptr) \\&\\2},/p'"
277 # This is the shared library runtime path variable.
278 runpath_var=LD_RUN_PATH
280 # This is the shared library path variable.
281 shlibpath_var=LD_LIBRARY_PATH
283 # Is shlibpath searched before the hard-coded library search path?
284 shlibpath_overrides_runpath=no
286 # How to hardcode a shared library path into an executable.
287 hardcode_action=immediate
289 # Whether we should hardcode library paths into libraries.
290 hardcode_into_libs=yes
292 # Flag to hardcode $libdir into a binary during linking.
293 # This must work even if $libdir does not exist.
294 hardcode_libdir_flag_spec="\${wl}--rpath \${wl}\$libdir"
296 # If ld is used when linking, flag to hardcode $libdir into
297 # a binary during linking. This must work even if $libdir does
299 hardcode_libdir_flag_spec_ld=""
301 # Whether we need a single -rpath flag with a separated argument.
302 hardcode_libdir_separator=""
304 # Set to yes if using DIR/libNAME during linking hardcodes DIR into the
308 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
312 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
313 # the resulting binary.
314 hardcode_shlibpath_var=unsupported
316 # Set to yes if building a shared library automatically hardcodes DIR into the library
317 # and all subsequent libraries and executables linked against it.
318 hardcode_automatic=no
320 # Variables whose values should be saved in libtool wrapper scripts and
321 # restored at relink time.
322 variables_saved_for_relink="PATH LD_LIBRARY_PATH LD_RUN_PATH GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
324 # Whether libtool must link a program against all its dependency libraries.
325 link_all_deplibs=unknown
327 # Compile-time system search path for libraries
328 sys_lib_search_path_spec="/usr/lib/gcc/i686-pc-linux-gnu/4.1.2 /usr/i686-pc-linux-gnu/lib /usr/lib /lib"
330 # Run-time system search path for libraries
331 sys_lib_dlsearch_path_spec="/lib /usr/lib /usr/local/lib //usr//lib/opengl/xorg-x11/lib /usr/i686-pc-linux-gnu/lib /usr/lib/gcc/i686-pc-linux-gnu/4.1.1 /usr/lib/gcc/i686-pc-linux-gnu/4.1.2 /usr/lib/gcc/i686-pc-linux-gnu/4.2.0 /usr/lib/nspr /usr/lib/nss /usr/lib/lesstif-2.1 /usr/lib/openmotif-2.2 /usr/lib/qt4 /usr/kde/3.5/lib /usr/qt/3/lib /usr/games/lib /usr/lib/fltk-1.1 /usr/lib/libstdc++-v3/ "
333 # Fix the shell variable $srcfile for the compiler.
336 # Set to yes if exported symbols are required.
337 always_export_symbols=no
339 # The commands to list exported symbols.
340 export_symbols_cmds="\$NM \$libobjs \$convenience | \$global_symbol_pipe | \$SED 's/.* //' | sort | uniq > \$export_symbols"
342 # The commands to extract the exported symbol list from a shared archive.
343 extract_expsyms_cmds=""
345 # Symbols that should not be listed in the preloaded symbols.
346 exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
348 # Symbols that must always be exported.
351 # ### END LIBTOOL CONFIG
353 # ltmain.sh - Provide generalized library-building support services.
354 # NOTE: Changing this file will not affect anything until you rerun configure.
356 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006,
357 # 2007 Free Software Foundation, Inc.
358 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
360 # This program is free software; you can redistribute it and/or modify
361 # it under the terms of the GNU General Public License as published by
362 # the Free Software Foundation; either version 2 of the License, or
363 # (at your option) any later version.
365 # This program is distributed in the hope that it will be useful, but
366 # WITHOUT ANY WARRANTY; without even the implied warranty of
367 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
368 # General Public License for more details.
370 # You should have received a copy of the GNU General Public License
371 # along with this program; if not, write to the Free Software
372 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
374 # As a special exception to the GNU General Public License, if you
375 # distribute this file as part of a program that contains a
376 # configuration script generated by Autoconf, you may include it under
377 # the same distribution terms that you use for the rest of that program.
381 # Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
382 # is ksh but when the shell is invoked as "sh" and the current value of
383 # the _XPG environment variable is not equal to 1 (one), the special
384 # positional parameter $0, within a function call, is the name of the
388 # The name of this program:
389 progname=`echo "$progpath" | $SED $basename`
399 TIMESTAMP=" (1.1220.2.456 2007/06/24 02:25:32)"
401 # Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE).
402 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
405 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
406 # is contrary to our usage. Disable this feature.
407 alias -g '${1+"$@"}'='"$@"'
410 case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
412 BIN_SH=xpg4; export BIN_SH # for Tru64
413 DUALCASE=1; export DUALCASE # for MKS sh
415 # Check that we have a working $echo.
416 if test "X$1" = X--no-reexec; then
417 # Discard the --no-reexec flag, and continue.
419 elif test "X$1" = X--fallback-echo; then
420 # Avoid inline document here, it may be left over
422 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
423 # Yippee, $echo works!
426 # Restart under the correct shell, and then maybe $echo will work.
427 exec $SHELL "$progpath" --no-reexec ${1+"$@"}
430 if test "X$1" = X--fallback-echo; then
431 # used as fallback echo
440 help="Try \`$progname --help' for more information."
441 magic="%%%MAGIC variable%%%"
446 # Sed substitution that helps us do robust quoting. It backslashifies
447 # metacharacters that are still active within double-quoted strings.
448 Xsed="${SED}"' -e 1s/^X//'
449 sed_quote_subst='s/\([\\`\\"$\\\\]\)/\\\1/g'
450 # test EBCDIC or ASCII
451 case `echo X|tr X '\101'` in
452 A) # ASCII based system
453 # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
455 NL2SP='tr \015\012 \040\040'
457 *) # EBCDIC based system
459 NL2SP='tr \r\n \100\100'
464 # Only set LANG and LC_ALL to C if already set.
465 # These must not be set unconditionally because not all systems understand
466 # e.g. LANG=C (notably SCO).
467 # We save the old values to restore during execute mode.
468 for lt_var in LANG LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
470 eval "if test \"\${$lt_var+set}\" = set; then
471 save_$lt_var=\$$lt_var
477 # Make sure IFS has a sensible default
482 if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
483 $echo "$modename: not configured to build any kind of library" 1>&2
484 $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
499 lo2o="s/\\.lo\$/.${objext}/"
500 o2lo="s/\\.${objext}\$/.lo/"
504 #####################################
505 # Shell function definitions:
506 # This seems to be the best place for them
508 # func_mktempdir [string]
509 # Make a temporary directory that won't clash with other running
510 # libtool processes, and avoids race conditions if possible. If
511 # given, STRING is the basename for that directory.
514 my_template="${TMPDIR-/tmp}/${1-$progname}"
516 if test "$run" = ":"; then
517 # Return a directory name, but don't create it in dry-run mode
518 my_tmpdir="${my_template}-$$"
521 # If mktemp works, use that first and foremost
522 my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null`
524 if test ! -d "$my_tmpdir"; then
525 # Failing that, at least try and use $RANDOM to avoid a race
526 my_tmpdir="${my_template}-${RANDOM-0}$$"
528 save_mktempdir_umask=`umask`
531 umask $save_mktempdir_umask
534 # If we're not in dry-run mode, bomb out on failure
535 test -d "$my_tmpdir" || {
536 $echo "cannot create temporary directory \`$my_tmpdir'" 1>&2
541 $echo "X$my_tmpdir" | $Xsed
545 # func_win32_libid arg
546 # return the library type of file 'arg'
548 # Need a lot of goo to handle *both* DLLs and import libs
549 # Has to be a shell function in order to 'eat' the argument
550 # that is supplied when $file_magic_command is called.
553 win32_libid_type="unknown"
554 win32_fileres=`file -L $1 2>/dev/null`
555 case $win32_fileres in
556 *ar\ archive\ import\ library*) # definitely import
557 win32_libid_type="x86 archive import"
559 *ar\ archive*) # could be an import, or static
560 if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \
561 $EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then
562 win32_nmres=`eval $NM -f posix -A $1 | \
571 import*) win32_libid_type="x86 archive import";;
572 *) win32_libid_type="x86 archive static";;
577 win32_libid_type="x86 DLL"
579 *executable*) # but shell scripts are "executable" too...
580 case $win32_fileres in
581 *MS\ Windows\ PE\ Intel*)
582 win32_libid_type="x86 DLL"
587 $echo $win32_libid_type
592 # Infer tagged configuration to use if any are available and
593 # if one wasn't chosen via the "--tag" command line option.
594 # Only attempt this if the compiler in the base compile
595 # command doesn't match the default compiler.
596 # arg is usually of the form 'gcc ...'
599 if test -n "$available_tags" && test -z "$tagname"; then
603 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
607 CC_quoted="$CC_quoted $arg"
610 # Blanks in the command may have been stripped by the calling shell,
611 # but not from the CC environment variable when configure was run.
612 " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) ;;
613 # Blanks at the start of $base_compile will cause this to fail
614 # if we don't check for them as well.
616 for z in $available_tags; do
617 if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then
618 # Evaluate the configuration.
619 eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`"
622 # Double-quote args containing other shell metacharacters.
624 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
628 CC_quoted="$CC_quoted $arg"
630 # user sometimes does CC=<HOST>-gcc so we need to match that to 'gcc'
631 trimedcc=`echo ${CC} | $SED -e "s/${host}-//g"`
632 # and sometimes libtool has CC=<HOST>-gcc but user does CC=gcc
633 extendcc=${host}-${CC}
634 # and sometimes libtool has CC=<OLDHOST>-gcc but user has CC=<NEWHOST>-gcc
635 # (Gentoo-specific hack because we always export $CHOST)
636 mungedcc=${CHOST-${host}}-${trimedcc}
638 "cc "* | " cc "* | "${host}-cc "* | " ${host}-cc "*|\
639 "gcc "* | " gcc "* | "${host}-gcc "* | " ${host}-gcc "*)
642 "$trimedcc "* | " $trimedcc "* | "`$echo $trimedcc` "* | " `$echo $trimedcc` "*|\
643 "$extendcc "* | " $extendcc "* | "`$echo $extendcc` "* | " `$echo $extendcc` "*|\
644 "$mungedcc "* | " $mungedcc "* | "`$echo $mungedcc` "* | " `$echo $mungedcc` "*|\
645 " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*)
646 # The compiler in the base compile command matches
647 # the one in the tagged configuration.
648 # Assume this is the tagged configuration we want.
655 # If $tagname still isn't set, then no tagged configuration
656 # was found and let the user know that the "--tag" command
657 # line option must be used.
658 if test -z "$tagname"; then
659 $echo "$modename: unable to infer tagged configuration"
660 $echo "$modename: specify a tag with \`--tag'" 1>&2
663 # $echo "$modename: using $tagname tagged configuration"
671 # func_extract_an_archive dir oldlib
672 func_extract_an_archive ()
674 f_ex_an_ar_dir="$1"; shift
675 f_ex_an_ar_oldlib="$1"
677 $show "(cd $f_ex_an_ar_dir && $AR x $f_ex_an_ar_oldlib)"
678 $run eval "(cd \$f_ex_an_ar_dir && $AR x \$f_ex_an_ar_oldlib)" || exit $?
679 if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then
682 $echo "$modename: ERROR: object name conflicts: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" 1>&2
687 # func_extract_archives gentop oldlib ...
688 func_extract_archives ()
690 my_gentop="$1"; shift
698 $show "${rm}r $my_gentop"
699 $run ${rm}r "$my_gentop"
700 $show "$mkdir $my_gentop"
701 $run $mkdir "$my_gentop"
703 if test "$my_status" -ne 0 && test ! -d "$my_gentop"; then
707 for my_xlib in $my_oldlibs; do
708 # Extract the objects.
710 [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;;
711 *) my_xabs=`pwd`"/$my_xlib" ;;
713 my_xlib=`$echo "X$my_xlib" | $Xsed -e 's%^.*/%%'`
716 case " $extracted_archives " in
718 extracted_serial=`expr $extracted_serial + 1`
719 my_xlib_u=lt$extracted_serial-$my_xlib ;;
723 extracted_archives="$extracted_archives $my_xlib_u"
724 my_xdir="$my_gentop/$my_xlib_u"
726 $show "${rm}r $my_xdir"
727 $run ${rm}r "$my_xdir"
728 $show "$mkdir $my_xdir"
729 $run $mkdir "$my_xdir"
731 if test "$exit_status" -ne 0 && test ! -d "$my_xdir"; then
736 $show "Extracting $my_xabs"
737 # Do not bother doing anything if just a dry run
738 if test -z "$run"; then
739 darwin_orig_dir=`pwd`
740 cd $my_xdir || exit $?
741 darwin_archive=$my_xabs
743 darwin_base_archive=`$echo "X$darwin_archive" | $Xsed -e 's%^.*/%%'`
744 darwin_arches=`lipo -info "$darwin_archive" 2>/dev/null | $EGREP Architectures 2>/dev/null`
745 if test -n "$darwin_arches"; then
746 darwin_arches=`echo "$darwin_arches" | $SED -e 's/.*are://'`
748 $show "$darwin_base_archive has multiple architectures $darwin_arches"
749 for darwin_arch in $darwin_arches ; do
750 mkdir -p "unfat-$$/${darwin_base_archive}-${darwin_arch}"
751 lipo -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}"
752 cd "unfat-$$/${darwin_base_archive}-${darwin_arch}"
753 func_extract_an_archive "`pwd`" "${darwin_base_archive}"
755 $rm "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}"
756 done # $darwin_arches
757 ## Okay now we have a bunch of thin objects, gotta fatten them up :)
758 darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print| xargs basename | sort -u | $NL2SP`
761 for darwin_file in $darwin_filelist; do
762 darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP`
763 lipo -create -output "$darwin_file" $darwin_files
764 done # $darwin_filelist
766 cd "$darwin_orig_dir"
768 cd "$darwin_orig_dir"
769 func_extract_an_archive "$my_xdir" "$my_xabs"
774 func_extract_an_archive "$my_xdir" "$my_xabs"
777 my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
779 func_extract_archives_result="$my_oldobjs"
781 # End of Shell function definitions
782 #####################################
785 eval std_shrext=\"$shrext_cmds\"
789 # Parse our command line options once, thoroughly.
790 while test "$#" -gt 0
796 -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;;
800 # If the previous option needs an argument, assign it.
801 if test -n "$prev"; then
804 execute_dlfiles="$execute_dlfiles $arg"
808 preserve_args="${preserve_args}=$arg"
810 # Check whether tagname contains only valid characters
813 $echo "$progname: invalid tag name: $tagname" 1>&2
820 # Don't test for the "default" C tag, as we know, it's there, but
821 # not specially marked.
824 if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$progpath" > /dev/null; then
825 taglist="$taglist $tagname"
826 # Evaluate the configuration.
827 eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^# ### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $progpath`"
829 $echo "$progname: ignoring unknown tag $tagname" 1>&2
844 # Have we seen a non-optional argument yet?
852 $PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP
854 Copyright (C) 2007 Free Software Foundation, Inc.
855 This is free software; see the source for copying conditions. There is NO
856 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
861 ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $progpath
862 # Now print the configurations for the tags.
863 for tagname in $taglist; do
864 ${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$progpath"
870 $echo "$progname: enabling shell trace mode"
872 preserve_args="$preserve_args $arg"
881 if test "$build_libtool_libs" = yes; then
882 $echo "enable shared libraries"
884 $echo "disable shared libraries"
886 if test "$build_old_libs" = yes; then
887 $echo "enable static libraries"
889 $echo "disable static libraries"
894 --finish) mode="finish" ;;
896 --mode) prevopt="--mode" prev=mode ;;
897 --mode=*) mode="$optarg" ;;
899 --preserve-dup-deps) duplicate_deps="yes" ;;
903 preserve_args="$preserve_args $arg"
909 preserve_args="$preserve_args --tag"
912 set tag "$optarg" ${1+"$@"}
915 preserve_args="$preserve_args --tag"
924 $echo "$modename: unrecognized option \`$arg'" 1>&2
936 if test -n "$prevopt"; then
937 $echo "$modename: option \`$prevopt' requires an argument" 1>&2
942 case $disable_libs in
946 build_libtool_libs=no
950 build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac`
954 # If this variable is set in any of the actions, the command in it
955 # will be execed at the end. This prevents here-documents from being
956 # left over by shells.
959 if test -z "$show_help"; then
961 # Infer the operation mode.
962 if test -z "$mode"; then
963 $echo "*** Warning: inferring the mode of operation is deprecated." 1>&2
964 $echo "*** Future versions of Libtool will require --mode=MODE be specified." 1>&2
966 *cc | cc* | *++ | gcc* | *-gcc* | g++* | xlc*)
978 *db | *dbx | *strace | *truss)
988 # If we have no mode, but dlfiles were specified, then do execute mode.
989 test -n "$execute_dlfiles" && mode=execute
991 # Just use the default operation mode.
992 if test -z "$mode"; then
993 if test -n "$nonopt"; then
994 $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2
996 $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2
1003 # Only execute mode is allowed to have -dlopen flags.
1004 if test -n "$execute_dlfiles" && test "$mode" != execute; then
1005 $echo "$modename: unrecognized option \`-dlopen'" 1>&2
1010 # Change the help message to a mode-specific one.
1011 generic_help="$help"
1012 help="Try \`$modename --help --mode=$mode' for more information."
1014 # These modes are in order of execution frequency so that they run quickly.
1016 # libtool compile mode
1018 modename="$modename: compile"
1019 # Get the compilation command and the source file.
1021 srcfile="$nonopt" # always keep a non-empty value in "srcfile"
1032 # do not "continue". Instead, add this to base_compile
1044 # Accept any command-line options.
1047 if test -n "$libobj" ; then
1048 $echo "$modename: you cannot specify \`-o' more than once" 1>&2
1055 -static | -prefer-pic | -prefer-non-pic)
1066 arg_mode=arg # the next one goes into the "base_compile" arg list
1067 continue # The current "srcfile" will either be retained or
1068 ;; # replaced later. I would guess that would be a bug.
1071 args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"`
1073 save_ifs="$IFS"; IFS=','
1074 for arg in $args; do
1077 # Double-quote args containing other shell metacharacters.
1078 # Many Bourne shells cannot handle close brackets correctly
1079 # in scan sets, so we specify it separately.
1081 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
1085 lastarg="$lastarg $arg"
1088 lastarg=`$echo "X$lastarg" | $Xsed -e "s/^ //"`
1090 # Add the arguments to base_compile.
1091 base_compile="$base_compile $lastarg"
1096 # Accept the current argument as the source file.
1097 # The previous "srcfile" becomes the current argument.
1104 esac # case $arg_mode
1106 # Aesthetically quote the previous argument.
1107 lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"`
1110 # Double-quote args containing other shell metacharacters.
1111 # Many Bourne shells cannot handle close brackets correctly
1112 # in scan sets, and some SunOS ksh mistreat backslash-escaping
1113 # in scan sets (worked around with variable expansion),
1114 # and furthermore cannot handle '|' '&' '(' ')' in scan sets
1115 # at all, so we specify them separately.
1116 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
1117 lastarg="\"$lastarg\""
1121 base_compile="$base_compile $lastarg"
1126 $echo "$modename: you must specify an argument for -Xcompile"
1130 $echo "$modename: you must specify a target with \`-o'" 1>&2
1134 # Get the name of the library object.
1135 [ -z "$libobj" ] && libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'`
1139 # Recognize several different file suffixes.
1140 # If the user specifies -o file.o, it is replaced with file.lo
1150 *.class) xform=class ;;
1153 *.[fF][09]?) xform=[fF][09]. ;;
1155 *.java) xform=java ;;
1159 libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"`
1162 *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;;
1164 $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2
1169 func_infer_tag $base_compile
1171 for arg in $later; do
1190 qlibobj=`$echo "X$libobj" | $Xsed -e "$sed_quote_subst"`
1192 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
1193 qlibobj="\"$qlibobj\"" ;;
1195 test "X$libobj" != "X$qlibobj" \
1196 && $echo "X$libobj" | grep '[]~#^*{};<>?"'"'"' &()|`$[]' \
1197 && $echo "$modename: libobj name \`$libobj' may not contain shell special characters."
1198 objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
1199 xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'`
1200 if test "X$xdir" = "X$obj"; then
1205 lobj=${xdir}$objdir/$objname
1207 if test -z "$base_compile"; then
1208 $echo "$modename: you must specify a compilation command" 1>&2
1213 # Delete any leftover library objects.
1214 if test "$build_old_libs" = yes; then
1215 removelist="$obj $lobj $libobj ${libobj}T"
1217 removelist="$lobj $libobj ${libobj}T"
1220 $run $rm $removelist
1221 trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15
1223 # On Cygwin there's no "real" PIC flag so we must build both object types
1225 cygwin* | mingw* | pw32* | os2*)
1229 if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then
1230 # non-PIC code in shared libraries is not supported
1234 # Calculate the filename of the output object if compiler does
1235 # not support -o with -c
1236 if test "$compiler_c_o" = no; then
1237 output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext}
1238 lockfile="$output_obj.lock"
1239 removelist="$removelist $output_obj $lockfile"
1240 trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15
1247 # Lock this critical section if it is needed
1248 # We use this script file to make the link, it avoids creating a new file
1249 if test "$need_locks" = yes; then
1250 until $run ln "$srcfile" "$lockfile" 2>/dev/null; do
1251 $show "Waiting for $lockfile to be removed"
1254 elif test "$need_locks" = warn; then
1255 if test -f "$lockfile"; then
1257 *** ERROR, $lockfile exists and contains:
1258 `cat $lockfile 2>/dev/null`
1260 This indicates that another process is trying to use the same
1261 temporary object file, and libtool could not work around it because
1262 your compiler does not support \`-c' and \`-o' together. If you
1263 repeat this compilation, it may succeed, by chance, but you had better
1264 avoid parallel builds (make -j) in this platform, or get a better
1267 $run $rm $removelist
1270 $echo "$srcfile" > "$lockfile"
1273 if test -n "$fix_srcfile_path"; then
1274 eval srcfile=\"$fix_srcfile_path\"
1276 qsrcfile=`$echo "X$srcfile" | $Xsed -e "$sed_quote_subst"`
1278 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
1279 qsrcfile="\"$qsrcfile\"" ;;
1282 $run $rm "$libobj" "${libobj}T"
1284 # Create a libtool object file (analogous to a ".la" file),
1285 # but don't create it if we're doing a dry run.
1286 test -z "$run" && cat > ${libobj}T <<EOF
1287 # $libobj - a libtool object file
1288 # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
1290 # Please DO NOT delete this file!
1291 # It is necessary for linking the library.
1293 # Name of the PIC object.
1296 # Only build a PIC object if we are building libtool libraries.
1297 if test "$build_libtool_libs" = yes; then
1298 # Without this assignment, base_compile gets emptied.
1299 fbsd_hideous_sh_bug=$base_compile
1301 if test "$pic_mode" != no; then
1302 command="$base_compile $qsrcfile $pic_flag"
1304 # Don't build PIC code
1305 command="$base_compile $qsrcfile"
1308 if test ! -d "${xdir}$objdir"; then
1309 $show "$mkdir ${xdir}$objdir"
1310 $run $mkdir ${xdir}$objdir
1312 if test "$exit_status" -ne 0 && test ! -d "${xdir}$objdir"; then
1317 if test -z "$output_obj"; then
1318 # Place PIC objects in $objdir
1319 command="$command -o $lobj"
1322 $run $rm "$lobj" "$output_obj"
1325 if $run eval "$command"; then :
1327 test -n "$output_obj" && $run $rm $removelist
1331 if test "$need_locks" = warn &&
1332 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
1334 *** ERROR, $lockfile contains:
1335 `cat $lockfile 2>/dev/null`
1337 but it should contain:
1340 This indicates that another process is trying to use the same
1341 temporary object file, and libtool could not work around it because
1342 your compiler does not support \`-c' and \`-o' together. If you
1343 repeat this compilation, it may succeed, by chance, but you had better
1344 avoid parallel builds (make -j) in this platform, or get a better
1347 $run $rm $removelist
1351 # Just move the object if needed, then go on to compile the next one
1352 if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then
1353 $show "$mv $output_obj $lobj"
1354 if $run $mv $output_obj $lobj; then :
1357 $run $rm $removelist
1362 # Append the name of the PIC object to the libtool object file.
1363 test -z "$run" && cat >> ${libobj}T <<EOF
1364 pic_object='$objdir/$objname'
1368 # Allow error messages only from the first compilation.
1369 if test "$suppress_opt" = yes; then
1370 suppress_output=' >/dev/null 2>&1'
1373 # No PIC object so indicate it doesn't exist in the libtool
1375 test -z "$run" && cat >> ${libobj}T <<EOF
1381 # Only build a position-dependent object if we build old libraries.
1382 if test "$build_old_libs" = yes; then
1383 if test "$pic_mode" != yes; then
1384 # Don't build PIC code
1385 command="$base_compile $qsrcfile"
1387 command="$base_compile $qsrcfile $pic_flag"
1389 if test "$compiler_c_o" = yes; then
1390 command="$command -o $obj"
1393 # Suppress compiler output if we already did a PIC compilation.
1394 command="$command$suppress_output"
1395 $run $rm "$obj" "$output_obj"
1397 if $run eval "$command"; then :
1399 $run $rm $removelist
1403 if test "$need_locks" = warn &&
1404 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
1406 *** ERROR, $lockfile contains:
1407 `cat $lockfile 2>/dev/null`
1409 but it should contain:
1412 This indicates that another process is trying to use the same
1413 temporary object file, and libtool could not work around it because
1414 your compiler does not support \`-c' and \`-o' together. If you
1415 repeat this compilation, it may succeed, by chance, but you had better
1416 avoid parallel builds (make -j) in this platform, or get a better
1419 $run $rm $removelist
1423 # Just move the object if needed
1424 if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then
1425 $show "$mv $output_obj $obj"
1426 if $run $mv $output_obj $obj; then :
1429 $run $rm $removelist
1434 # Append the name of the non-PIC object the libtool object file.
1435 # Only append if the libtool object file exists.
1436 test -z "$run" && cat >> ${libobj}T <<EOF
1437 # Name of the non-PIC object.
1438 non_pic_object='$objname'
1442 # Append the name of the non-PIC object the libtool object file.
1443 # Only append if the libtool object file exists.
1444 test -z "$run" && cat >> ${libobj}T <<EOF
1445 # Name of the non-PIC object.
1451 $run $mv "${libobj}T" "${libobj}"
1453 # Unlock the critical section if it was locked
1454 if test "$need_locks" != no; then
1455 $run $rm "$lockfile"
1463 modename="$modename: link"
1465 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
1466 # It is impossible to link a dll without this setting, and
1467 # we shouldn't force the makefile maintainer to figure out
1468 # which system we are compiling for in order to pass an extra
1469 # flag for every libtool invocation.
1470 # allow_undefined=no
1472 # FIXME: Unfortunately, there are problems with the above when trying
1473 # to make a dll which has undefined symbols, in which case not
1474 # even a static library is built. For now, we need to specify
1475 # -no-undefined on the libtool link line when we can be certain
1476 # that all symbols are satisfied, otherwise we get a static library.
1483 libtool_args="$nonopt"
1484 base_compile="$nonopt $@"
1485 compile_command="$nonopt"
1486 finalize_command="$nonopt"
1499 lib_search_path=`pwd`
1508 export_symbols_regex=
1516 notinst_path= # paths that contain not-installed libtool libraries
1517 precious_files_regex=
1518 prefer_static_libs=no
1531 func_infer_tag $base_compile
1533 # We need to know -static, to get the right output filenames.
1537 -all-static | -static | -static-libtool-libs)
1540 if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
1541 $echo "$modename: warning: complete static linking is impossible in this configuration" 1>&2
1543 if test -n "$link_static_flag"; then
1544 dlopen_self=$dlopen_self_static
1546 prefer_static_libs=yes
1549 if test -z "$pic_flag" && test -n "$link_static_flag"; then
1550 dlopen_self=$dlopen_self_static
1552 prefer_static_libs=built
1554 -static-libtool-libs)
1555 if test -z "$pic_flag" && test -n "$link_static_flag"; then
1556 dlopen_self=$dlopen_self_static
1558 prefer_static_libs=yes
1561 build_libtool_libs=no
1568 # See if our shared archives depend on static archives.
1569 test -n "$old_archive_from_new_cmds" && build_old_libs=yes
1571 # Go through the arguments, transforming them on the way.
1572 while test "$#" -gt 0; do
1576 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
1577 qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test
1581 libtool_args="$libtool_args $qarg"
1583 # If the previous option needs an argument, assign it.
1584 if test -n "$prev"; then
1587 compile_command="$compile_command @OUTPUT@"
1588 finalize_command="$finalize_command @OUTPUT@"
1594 if test "$preload" = no; then
1595 # Add the symbol object into the linking commands.
1596 compile_command="$compile_command @SYMFILE@"
1597 finalize_command="$finalize_command @SYMFILE@"
1601 *.la | *.lo) ;; # We handle these cases below.
1603 if test "$dlself" = no; then
1611 if test "$prev" = dlprefiles; then
1613 elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then
1623 if test "$prev" = dlfiles; then
1624 dlfiles="$dlfiles $arg"
1626 dlprefiles="$dlprefiles $arg"
1634 export_symbols="$arg"
1635 if test ! -f "$arg"; then
1636 $echo "$modename: symbol file \`$arg' does not exist"
1643 export_symbols_regex="$arg"
1648 inst_prefix_dir="$arg"
1653 precious_files_regex="$arg"
1663 if test -f "$arg"; then
1666 for fil in `cat $save_arg`
1668 # moreargs="$moreargs $fil"
1670 # A libtool-controlled object.
1672 # Check to see that this really is a libtool object.
1673 if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
1678 # If there is no directory component, then add one.
1680 */* | *\\*) . $arg ;;
1684 if test -z "$pic_object" || \
1685 test -z "$non_pic_object" ||
1686 test "$pic_object" = none && \
1687 test "$non_pic_object" = none; then
1688 $echo "$modename: cannot find name of object for \`$arg'" 1>&2
1692 # Extract subdirectory from the argument.
1693 xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
1694 if test "X$xdir" = "X$arg"; then
1700 if test "$pic_object" != none; then
1701 # Prepend the subdirectory the object is found in.
1702 pic_object="$xdir$pic_object"
1704 if test "$prev" = dlfiles; then
1705 if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
1706 dlfiles="$dlfiles $pic_object"
1710 # If libtool objects are unsupported, then we need to preload.
1715 # CHECK ME: I think I busted this. -Ossama
1716 if test "$prev" = dlprefiles; then
1717 # Preload the old-style object.
1718 dlprefiles="$dlprefiles $pic_object"
1723 libobjs="$libobjs $pic_object"
1728 if test "$non_pic_object" != none; then
1729 # Prepend the subdirectory the object is found in.
1730 non_pic_object="$xdir$non_pic_object"
1732 # A standard non-PIC object
1733 non_pic_objects="$non_pic_objects $non_pic_object"
1734 if test -z "$pic_object" || test "$pic_object" = none ; then
1735 arg="$non_pic_object"
1738 # If the PIC object exists, use it instead.
1739 # $xdir was prepended to $pic_object above.
1740 non_pic_object="$pic_object"
1741 non_pic_objects="$non_pic_objects $non_pic_object"
1744 # Only an error if not doing a dry-run.
1745 if test -z "$run"; then
1746 $echo "$modename: \`$arg' is not a valid libtool object" 1>&2
1751 # Extract subdirectory from the argument.
1752 xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
1753 if test "X$xdir" = "X$arg"; then
1759 pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"`
1760 non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"`
1761 libobjs="$libobjs $pic_object"
1762 non_pic_objects="$non_pic_objects $non_pic_object"
1767 $echo "$modename: link input file \`$save_arg' does not exist"
1775 # We need an absolute path.
1777 [\\/]* | [A-Za-z]:[\\/]*) ;;
1779 $echo "$modename: only absolute run-paths are allowed" 1>&2
1783 if test "$prev" = rpath; then
1786 *) rpath="$rpath $arg" ;;
1791 *) xrpath="$xrpath $arg" ;;
1798 compiler_flags="$compiler_flags $qarg"
1800 compile_command="$compile_command $qarg"
1801 finalize_command="$finalize_command $qarg"
1805 linker_flags="$linker_flags $qarg"
1806 compiler_flags="$compiler_flags $wl$qarg"
1808 compile_command="$compile_command $wl$qarg"
1809 finalize_command="$finalize_command $wl$qarg"
1813 linker_flags="$linker_flags $qarg"
1814 compiler_flags="$compiler_flags $qarg"
1816 compile_command="$compile_command $qarg"
1817 finalize_command="$finalize_command $qarg"
1825 darwin_framework|darwin_framework_skip)
1826 test "$prev" = "darwin_framework" && compiler_flags="$compiler_flags $arg"
1827 compile_command="$compile_command $arg"
1828 finalize_command="$finalize_command $arg"
1833 eval "$prev=\"\$arg\""
1838 fi # test -n "$prev"
1844 if test -n "$link_static_flag"; then
1845 compile_command="$compile_command $link_static_flag"
1846 finalize_command="$finalize_command $link_static_flag"
1852 # FIXME: remove this flag sometime in the future.
1853 $echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2
1877 -export-symbols | -export-symbols-regex)
1878 if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
1879 $echo "$modename: more than one -exported-symbols argument is not allowed"
1882 if test "X$arg" = "X-export-symbols"; then
1890 -framework|-arch|-isysroot)
1892 *" ${arg} ${1} "* | *" ${arg} ${1} "*)
1893 prev=darwin_framework_skip ;;
1894 *) compiler_flags="$compiler_flags $arg"
1895 prev=darwin_framework ;;
1897 compile_command="$compile_command $arg"
1898 finalize_command="$finalize_command $arg"
1907 # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:*
1908 # so, if we see these flags be careful not to treat them like -L
1910 case $with_gcc/$host in
1911 no/*-*-irix* | /*-*-irix*)
1912 compile_command="$compile_command $arg"
1913 finalize_command="$finalize_command $arg"
1920 dir=`$echo "X$arg" | $Xsed -e 's/^-L//'`
1921 # We need an absolute path.
1923 [\\/]* | [A-Za-z]:[\\/]*) ;;
1925 absdir=`cd "$dir" && pwd`
1926 if test -z "$absdir"; then
1927 $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2
1929 notinst_path="$notinst_path $dir"
1937 deplibs="$deplibs -L$dir"
1938 lib_search_path="$lib_search_path $dir"
1942 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
1943 testbindir=`$echo "X$dir" | $Xsed -e 's*/lib$*/bin*'`
1944 case :$dllsearchpath: in
1946 *) dllsearchpath="$dllsearchpath:$dir";;
1948 case :$dllsearchpath: in
1949 *":$testbindir:"*) ;;
1950 *) dllsearchpath="$dllsearchpath:$testbindir";;
1958 if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then
1960 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos*)
1961 # These systems don't actually have a C or math library (as such)
1965 # These systems don't actually have a C library (as such)
1966 test "X$arg" = "X-lc" && continue
1968 *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
1969 # Do not include libc due to us having libc/libc_r.
1970 test "X$arg" = "X-lc" && continue
1972 *-*-rhapsody* | *-*-darwin1.[012])
1973 # Rhapsody C and math libraries are in the System framework
1974 deplibs="$deplibs -framework System"
1977 *-*-sco3.2v5* | *-*-sco5v6*)
1978 # Causes problems with __ctype
1979 test "X$arg" = "X-lc" && continue
1981 *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
1982 # Compiler inserts libc in the correct place for threads to work
1983 test "X$arg" = "X-lc" && continue
1986 elif test "X$arg" = "X-lc_r"; then
1988 *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
1989 # Do not include libc_r directly, use -pthread flag.
1994 deplibs="$deplibs $arg"
1998 # Tru64 UNIX uses -model [arg] to determine the layout of C++
1999 # classes, name mangling, and exception handling.
2001 compile_command="$compile_command $arg"
2002 compiler_flags="$compiler_flags $arg"
2003 finalize_command="$finalize_command $arg"
2008 -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
2009 compiler_flags="$compiler_flags $arg"
2010 compile_command="$compile_command $arg"
2011 finalize_command="$finalize_command $arg"
2020 # -64, -mips[0-9] enable 64-bit mode on the SGI compiler
2021 # -r[0-9][0-9]* specifies the processor on the SGI compiler
2022 # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler
2023 # +DA*, +DD* enable 64-bit mode on the HP compiler
2024 # -q* pass through compiler args for the IBM compiler
2025 # -m* pass through architecture-specific compiler args for GCC
2026 # -m*, -t[45]*, -txscale* pass through architecture-specific
2027 # compiler args for GCC
2028 # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC
2029 # -F/path gives path to uninstalled frameworks, gcc on darwin
2030 # @file GCC response files
2031 -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
2032 -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*)
2034 # Unknown arguments in both finalize_command and compile_command need
2035 # to be aesthetically quoted because they are evaled later.
2036 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
2038 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
2042 compile_command="$compile_command $arg"
2043 finalize_command="$finalize_command $arg"
2044 compiler_flags="$compiler_flags $arg"
2060 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin*)
2061 # The PATH hackery in wrapper scripts is required on Windows
2062 # and Darwin in order for the loader to find any dlls it needs.
2063 $echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2
2064 $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2
2067 *) no_install=yes ;;
2084 -precious-files-regex)
2105 dir=`$echo "X$arg" | $Xsed -e 's/^-R//'`
2106 # We need an absolute path.
2108 [\\/]* | [A-Za-z]:[\\/]*) ;;
2110 $echo "$modename: only absolute run-paths are allowed" 1>&2
2116 *) xrpath="$xrpath $dir" ;;
2121 -static | -static-libtool-libs)
2122 # The effects of -static are defined in a previous loop.
2123 # We used to do the same as -all-static on platforms that
2124 # didn't have a PIC flag, but the assumption that the effects
2125 # would be equivalent was wrong. It would break on at least
2126 # Digital Unix and AIX.
2146 args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'`
2148 save_ifs="$IFS"; IFS=','
2149 for flag in $args; do
2152 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
2157 compiler_flags="$compiler_flags $flag"
2160 arg=`$echo "X$arg" | $Xsed -e "s/^ //"`
2164 args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'`
2166 save_ifs="$IFS"; IFS=','
2167 for flag in $args; do
2170 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
2175 compiler_flags="$compiler_flags $wl$flag"
2176 linker_flags="$linker_flags $flag"
2179 arg=`$echo "X$arg" | $Xsed -e "s/^ //"`
2197 # Some other compiler flag.
2199 # Unknown arguments in both finalize_command and compile_command need
2200 # to be aesthetically quoted because they are evaled later.
2201 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
2203 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
2210 # A standard object.
2215 # A libtool-controlled object.
2217 # Check to see that this really is a libtool object.
2218 if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
2223 # If there is no directory component, then add one.
2225 */* | *\\*) . $arg ;;
2229 if test -z "$pic_object" || \
2230 test -z "$non_pic_object" ||
2231 test "$pic_object" = none && \
2232 test "$non_pic_object" = none; then
2233 $echo "$modename: cannot find name of object for \`$arg'" 1>&2
2237 # Extract subdirectory from the argument.
2238 xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
2239 if test "X$xdir" = "X$arg"; then
2245 if test "$pic_object" != none; then
2246 # Prepend the subdirectory the object is found in.
2247 pic_object="$xdir$pic_object"
2249 if test "$prev" = dlfiles; then
2250 if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
2251 dlfiles="$dlfiles $pic_object"
2255 # If libtool objects are unsupported, then we need to preload.
2260 # CHECK ME: I think I busted this. -Ossama
2261 if test "$prev" = dlprefiles; then
2262 # Preload the old-style object.
2263 dlprefiles="$dlprefiles $pic_object"
2268 libobjs="$libobjs $pic_object"
2273 if test "$non_pic_object" != none; then
2274 # Prepend the subdirectory the object is found in.
2275 non_pic_object="$xdir$non_pic_object"
2277 # A standard non-PIC object
2278 non_pic_objects="$non_pic_objects $non_pic_object"
2279 if test -z "$pic_object" || test "$pic_object" = none ; then
2280 arg="$non_pic_object"
2283 # If the PIC object exists, use it instead.
2284 # $xdir was prepended to $pic_object above.
2285 non_pic_object="$pic_object"
2286 non_pic_objects="$non_pic_objects $non_pic_object"
2289 # Only an error if not doing a dry-run.
2290 if test -z "$run"; then
2291 $echo "$modename: \`$arg' is not a valid libtool object" 1>&2
2296 # Extract subdirectory from the argument.
2297 xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
2298 if test "X$xdir" = "X$arg"; then
2304 pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"`
2305 non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"`
2306 libobjs="$libobjs $pic_object"
2307 non_pic_objects="$non_pic_objects $non_pic_object"
2314 deplibs="$deplibs $arg"
2315 old_deplibs="$old_deplibs $arg"
2320 # A libtool-controlled library.
2322 if test "$prev" = dlfiles; then
2323 # This library was specified with -dlopen.
2324 dlfiles="$dlfiles $arg"
2326 elif test "$prev" = dlprefiles; then
2327 # The library was specified with -dlpreopen.
2328 dlprefiles="$dlprefiles $arg"
2331 deplibs="$deplibs $arg"
2336 # Some other compiler argument.
2338 # Unknown arguments in both finalize_command and compile_command need
2339 # to be aesthetically quoted because they are evaled later.
2340 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
2342 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
2349 # Now actually substitute the argument into the commands.
2350 if test -n "$arg"; then
2351 compile_command="$compile_command $arg"
2352 finalize_command="$finalize_command $arg"
2354 done # argument parsing loop
2356 if test -n "$prev"; then
2357 $echo "$modename: the \`$prevarg' option requires an argument" 1>&2
2362 if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then
2363 eval arg=\"$export_dynamic_flag_spec\"
2364 compile_command="$compile_command $arg"
2365 finalize_command="$finalize_command $arg"
2369 # calculate the name of the file, without its directory
2370 outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'`
2371 libobjs_save="$libobjs"
2373 if test -n "$shlibpath_var"; then
2374 # get the directories listed in $shlibpath_var
2375 eval shlib_search_path=\`\$echo \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\`
2379 eval sys_lib_search_path=\"$sys_lib_search_path_spec\"
2380 eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\"
2382 output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'`
2383 if test "X$output_objdir" = "X$output"; then
2384 output_objdir="$objdir"
2386 output_objdir="$output_objdir/$objdir"
2388 # Create the object directory.
2389 if test ! -d "$output_objdir"; then
2390 $show "$mkdir $output_objdir"
2391 $run $mkdir $output_objdir
2393 if test "$exit_status" -ne 0 && test ! -d "$output_objdir"; then
2398 # Determine the type of output
2401 $echo "$modename: you must specify an output file" 1>&2
2405 *.$libext) linkmode=oldlib ;;
2406 *.lo | *.$objext) linkmode=obj ;;
2407 *.la) linkmode=lib ;;
2408 *) linkmode=prog ;; # Anything else should be a program.
2412 *cygwin* | *mingw* | *pw32*)
2413 # don't eliminate duplications in $postdeps and $predeps
2414 duplicate_compiler_generated_deps=yes
2417 duplicate_compiler_generated_deps=$duplicate_deps
2423 # Find all interdependent deplibs by searching for libraries
2424 # that are linked more than once (e.g. -la -lb -la)
2425 for deplib in $deplibs; do
2426 if test "X$duplicate_deps" = "Xyes" ; then
2428 *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
2431 libs="$libs $deplib"
2434 if test "$linkmode" = lib; then
2435 libs="$predeps $libs $compiler_lib_search_path $postdeps"
2437 # Compute libraries that are listed more than once in $predeps
2438 # $postdeps and mark them as special (i.e., whose duplicates are
2439 # not to be eliminated).
2441 if test "X$duplicate_compiler_generated_deps" = "Xyes" ; then
2442 for pre_post_dep in $predeps $postdeps; do
2443 case "$pre_post_deps " in
2444 *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;;
2446 pre_post_deps="$pre_post_deps $pre_post_dep"
2455 need_relink=no # whether we're linking any uninstalled libtool libraries
2456 notinst_deplibs= # not-installed libtool libraries
2460 for file in $dlfiles $dlprefiles; do
2464 $echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2
2476 passes="conv scan dlopen dlpreopen link"
2481 for pass in $passes; do
2482 if test "$linkmode,$pass" = "lib,link" ||
2483 test "$linkmode,$pass" = "prog,scan"; then
2487 if test "$linkmode" = prog; then
2489 dlopen) libs="$dlfiles" ;;
2490 dlpreopen) libs="$dlprefiles" ;;
2491 link) libs="$deplibs %DEPLIBS% $dependency_libs" ;;
2494 if test "$pass" = dlopen; then
2495 # Collect dlpreopened libraries
2496 save_deplibs="$deplibs"
2499 for deplib in $libs; do
2503 -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
2504 if test "$linkmode,$pass" = "prog,link"; then
2505 compile_deplibs="$deplib $compile_deplibs"
2506 finalize_deplibs="$deplib $finalize_deplibs"
2508 compiler_flags="$compiler_flags $deplib"
2513 if test "$linkmode" != lib && test "$linkmode" != prog; then
2514 $echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2
2517 name=`$echo "X$deplib" | $Xsed -e 's/^-l//'`
2518 for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do
2519 for search_ext in .la $std_shrext .so .a; do
2520 # Search the libtool library
2521 lib="$searchdir/lib${name}${search_ext}"
2522 if test -f "$lib"; then
2523 if test "$search_ext" = ".la"; then
2532 if test "$found" != yes; then
2533 # deplib doesn't seem to be a libtool library
2534 if test "$linkmode,$pass" = "prog,link"; then
2535 compile_deplibs="$deplib $compile_deplibs"
2536 finalize_deplibs="$deplib $finalize_deplibs"
2538 deplibs="$deplib $deplibs"
2539 test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
2542 else # deplib is a libtool library
2543 # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib,
2544 # We need to do some special things here, and not later.
2545 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
2546 case " $predeps $postdeps " in
2548 if (${SED} -e '2q' $lib |
2549 grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
2553 */* | *\\*) . $lib ;;
2556 for l in $old_library $library_names; do
2559 if test "X$ll" = "X$old_library" ; then # only static version available
2561 ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'`
2562 test "X$ladir" = "X$lib" && ladir="."
2563 lib=$ladir/$old_library
2564 if test "$linkmode,$pass" = "prog,link"; then
2565 compile_deplibs="$deplib $compile_deplibs"
2566 finalize_deplibs="$deplib $finalize_deplibs"
2568 deplibs="$deplib $deplibs"
2569 test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
2583 deplibs="$deplib $deplibs"
2584 test "$pass" = conv && continue
2585 newdependency_libs="$deplib $newdependency_libs"
2586 newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
2589 if test "$pass" = conv; then
2590 deplibs="$deplib $deplibs"
2593 if test "$pass" = scan; then
2594 deplibs="$deplib $deplibs"
2596 compile_deplibs="$deplib $compile_deplibs"
2597 finalize_deplibs="$deplib $finalize_deplibs"
2599 newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
2602 $echo "$modename: warning: \`-L' is ignored for archives/objects" 1>&2
2608 if test "$pass" = link; then
2609 dir=`$echo "X$deplib" | $Xsed -e 's/^-R//'`
2610 # Make sure the xrpath contains only unique directories.
2613 *) xrpath="$xrpath $dir" ;;
2616 deplibs="$deplib $deplibs"
2619 *.la) lib="$deplib" ;;
2621 if test "$pass" = conv; then
2622 deplibs="$deplib $deplibs"
2628 case $deplibs_check_method in
2630 set dummy $deplibs_check_method
2631 match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
2632 if eval $echo \"$deplib\" 2>/dev/null \
2634 | $EGREP "$match_pattern_regex" > /dev/null; then
2642 if test "$valid_a_lib" != yes; then
2644 $echo "*** Warning: Trying to link with static lib archive $deplib."
2645 $echo "*** I have the capability to make that library automatically link in when"
2646 $echo "*** you link to this library. But I can only do this if you have a"
2647 $echo "*** shared version of the library, which you do not appear to have"
2648 $echo "*** because the file extensions .$libext of this argument makes me believe"
2649 $echo "*** that it is just a static archive that I should not used here."
2652 $echo "*** Warning: Linking the shared library $output against the"
2653 $echo "*** static library $deplib is not portable!"
2654 deplibs="$deplib $deplibs"
2659 if test "$pass" != link; then
2660 deplibs="$deplib $deplibs"
2662 compile_deplibs="$deplib $compile_deplibs"
2663 finalize_deplibs="$deplib $finalize_deplibs"
2670 if test "$pass" = conv; then
2671 deplibs="$deplib $deplibs"
2672 elif test "$linkmode" = prog; then
2673 if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
2674 # If there is no dlopen support or we're linking statically,
2675 # we need to preload.
2676 newdlprefiles="$newdlprefiles $deplib"
2677 compile_deplibs="$deplib $compile_deplibs"
2678 finalize_deplibs="$deplib $finalize_deplibs"
2680 newdlfiles="$newdlfiles $deplib"
2690 if test "$found" = yes || test -f "$lib"; then :
2692 $echo "$modename: cannot find the library \`$lib' or unhandled argument \`$deplib'" 1>&2
2696 # Check to see that this really is a libtool archive.
2697 if (${SED} -e '2q' $lib | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
2699 $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
2703 ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'`
2704 test "X$ladir" = "X$lib" && ladir="."
2712 # If the library was installed with an old release of libtool,
2713 # it will not redefine variables installed, or shouldnotlink
2721 */* | *\\*) . $lib ;;
2725 if test "$linkmode,$pass" = "lib,link" ||
2726 test "$linkmode,$pass" = "prog,scan" ||
2727 { test "$linkmode" != prog && test "$linkmode" != lib; }; then
2728 test -n "$dlopen" && dlfiles="$dlfiles $dlopen"
2729 test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen"
2732 if test "$pass" = conv; then
2733 # Only check for convenience libraries
2734 deplibs="$lib $deplibs"
2735 if test -z "$libdir"; then
2736 if test -z "$old_library"; then
2737 $echo "$modename: cannot find name of link library for \`$lib'" 1>&2
2740 # It is a libtool convenience library, so add in its objects.
2741 convenience="$convenience $ladir/$objdir/$old_library"
2742 old_convenience="$old_convenience $ladir/$objdir/$old_library"
2744 for deplib in $dependency_libs; do
2745 deplibs="$deplib $deplibs"
2746 if test "X$duplicate_deps" = "Xyes" ; then
2747 case "$tmp_libs " in
2748 *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
2751 tmp_libs="$tmp_libs $deplib"
2753 elif test "$linkmode" != prog && test "$linkmode" != lib; then
2754 $echo "$modename: \`$lib' is not a convenience library" 1>&2
2761 # Get the name of the library we link against.
2763 for l in $old_library $library_names; do
2766 if test -z "$linklib"; then
2767 $echo "$modename: cannot find name of link library for \`$lib'" 1>&2
2771 # This library was specified with -dlopen.
2772 if test "$pass" = dlopen; then
2773 if test -z "$libdir"; then
2774 $echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2
2777 if test -z "$dlname" ||
2778 test "$dlopen_support" != yes ||
2779 test "$build_libtool_libs" = no; then
2780 # If there is no dlname, no dlopen support or we're linking
2781 # statically, we need to preload. We also need to preload any
2782 # dependent libraries so libltdl's deplib preloader doesn't
2783 # bomb out in the load deplibs phase.
2784 dlprefiles="$dlprefiles $lib $dependency_libs"
2786 newdlfiles="$newdlfiles $lib"
2791 # We need an absolute path.
2793 [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;;
2795 abs_ladir=`cd "$ladir" && pwd`
2796 if test -z "$abs_ladir"; then
2797 $echo "$modename: warning: cannot determine absolute directory name of \`$ladir'" 1>&2
2798 $echo "$modename: passing it literally to the linker, although it might fail" 1>&2
2803 laname=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
2805 # Find the relevant object directory and library name.
2806 if test "X$installed" = Xyes; then
2807 if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then
2808 $echo "$modename: warning: library \`$lib' was moved." 1>&2
2816 test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes
2818 if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then
2821 # Remove this search path later
2822 notinst_path="$notinst_path $abs_ladir"
2824 dir="$ladir/$objdir"
2825 absdir="$abs_ladir/$objdir"
2826 # Remove this search path later
2827 notinst_path="$notinst_path $abs_ladir"
2829 fi # $installed = yes
2830 name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
2832 # This library was specified with -dlpreopen.
2833 if test "$pass" = dlpreopen; then
2834 if test -z "$libdir"; then
2835 $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2
2838 # Prefer using a static library (so that no silly _DYNAMIC symbols
2839 # are required to link).
2840 if test -n "$old_library"; then
2841 newdlprefiles="$newdlprefiles $dir/$old_library"
2842 # Otherwise, use the dlname, so that lt_dlopen finds it.
2843 elif test -n "$dlname"; then
2844 newdlprefiles="$newdlprefiles $dir/$dlname"
2846 newdlprefiles="$newdlprefiles $dir/$linklib"
2848 fi # $pass = dlpreopen
2850 if test -z "$libdir"; then
2851 # Link the convenience library
2852 if test "$linkmode" = lib; then
2853 deplibs="$dir/$old_library $deplibs"
2854 elif test "$linkmode,$pass" = "prog,link"; then
2855 compile_deplibs="$dir/$old_library $compile_deplibs"
2856 finalize_deplibs="$dir/$old_library $finalize_deplibs"
2858 deplibs="$lib $deplibs" # used for prog,scan pass
2864 if test "$linkmode" = prog && test "$pass" != link; then
2865 newlib_search_path="$newlib_search_path $ladir"
2866 deplibs="$lib $deplibs"
2869 if test "$link_all_deplibs" != no || test -z "$library_names" ||
2870 test "$build_libtool_libs" = no; then
2875 for deplib in $dependency_libs; do
2877 -L*) newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test
2879 # Need to link against all dependency_libs?
2880 if test "$linkalldeplibs" = yes; then
2881 deplibs="$deplib $deplibs"
2883 # Need to hardcode shared library paths
2884 # or/and link against static libraries
2885 newdependency_libs="$deplib $newdependency_libs"
2887 if test "X$duplicate_deps" = "Xyes" ; then
2888 case "$tmp_libs " in
2889 *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
2892 tmp_libs="$tmp_libs $deplib"
2895 fi # $linkmode = prog...
2897 if test "$linkmode,$pass" = "prog,link"; then
2898 if test -n "$library_names" &&
2899 { { test "$prefer_static_libs" = no ||
2900 test "$prefer_static_libs,$installed" = "built,yes"; } ||
2901 test -z "$old_library"; }; then
2902 # We need to hardcode the library path
2903 if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then
2904 # Make sure the rpath contains only unique directories.
2905 case "$temp_rpath " in
2908 *) temp_rpath="$temp_rpath $absdir" ;;
2912 # Hardcode the library path.
2913 # Skip directories that are in the system default run-time
2915 case " $sys_lib_dlsearch_path " in
2918 case "$compile_rpath " in
2920 *) compile_rpath="$compile_rpath $absdir"
2924 case " $sys_lib_dlsearch_path " in
2927 case "$finalize_rpath " in
2929 *) finalize_rpath="$finalize_rpath $libdir"
2933 fi # $linkmode,$pass = prog,link...
2935 if test "$alldeplibs" = yes &&
2936 { test "$deplibs_check_method" = pass_all ||
2937 { test "$build_libtool_libs" = yes &&
2938 test -n "$library_names"; }; }; then
2939 # We only need to search for static libraries
2944 link_static=no # Whether the deplib will be linked statically
2945 use_static_libs=$prefer_static_libs
2946 if test "$use_static_libs" = built && test "$installed" = yes ; then
2949 if test -n "$library_names" &&
2950 { test "$use_static_libs" = no || test -z "$old_library"; }; then
2951 if test "$installed" = no; then
2952 notinst_deplibs="$notinst_deplibs $lib"
2955 # This is a shared library
2957 # Warn about portability, can't link against -module's on
2958 # some systems (darwin)
2959 if test "$shouldnotlink" = yes && test "$pass" = link ; then
2961 if test "$linkmode" = prog; then
2962 $echo "*** Warning: Linking the executable $output against the loadable module"
2964 $echo "*** Warning: Linking the shared library $output against the loadable module"
2966 $echo "*** $linklib is not portable!"
2968 if test "$linkmode" = lib &&
2969 test "$hardcode_into_libs" = yes; then
2970 # Hardcode the library path.
2971 # Skip directories that are in the system default run-time
2973 case " $sys_lib_dlsearch_path " in
2976 case "$compile_rpath " in
2978 *) compile_rpath="$compile_rpath $absdir"
2982 case " $sys_lib_dlsearch_path " in
2985 case "$finalize_rpath " in
2987 *) finalize_rpath="$finalize_rpath $libdir"
2993 if test -n "$old_archive_from_expsyms_cmds"; then
2994 # figure out the soname
2995 set dummy $library_names
2998 libname=`eval \\$echo \"$libname_spec\"`
2999 # use dlname if we got it. it's perfectly good, no?
3000 if test -n "$dlname"; then
3002 elif test -n "$soname_spec"; then
3006 major=`expr $current - $age`
3010 eval soname=\"$soname_spec\"
3015 # Make a new name for the extract_expsyms_cmds to use
3017 soname=`$echo $soroot | ${SED} -e 's/^.*\///'`
3018 newlib="libimp-`$echo $soname | ${SED} 's/^lib//;s/\.dll$//'`.a"
3020 # If the library has no export list, then create one now
3021 if test -f "$output_objdir/$soname-def"; then :
3023 $show "extracting exported symbol list from \`$soname'"
3024 save_ifs="$IFS"; IFS='~'
3025 cmds=$extract_expsyms_cmds
3026 for cmd in $cmds; do
3030 $run eval "$cmd" || exit $?
3036 if test -f "$output_objdir/$newlib"; then :; else
3037 $show "generating import library for \`$soname'"
3038 save_ifs="$IFS"; IFS='~'
3039 cmds=$old_archive_from_expsyms_cmds
3040 for cmd in $cmds; do
3044 $run eval "$cmd" || exit $?
3048 # make sure the library variables are pointing to the new library
3051 fi # test -n "$old_archive_from_expsyms_cmds"
3053 if test "$linkmode" = prog || test "$mode" != relink; then
3058 case $hardcode_action in
3059 immediate | unsupported)
3060 if test "$hardcode_direct" = no; then
3063 *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;;
3064 *-*-sysv4*uw2*) add_dir="-L$dir" ;;
3065 *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \
3066 *-*-unixware7*) add_dir="-L$dir" ;;
3068 # if the lib is a module then we can not link against
3069 # it, someone is ignoring the new warnings I added
3070 if /usr/bin/file -L $add 2> /dev/null |
3071 $EGREP ": [^:]* bundle" >/dev/null ; then
3072 $echo "** Warning, lib $linklib is a module, not a shared library"
3073 if test -z "$old_library" ; then
3075 $echo "** And there doesn't seem to be a static archive available"
3076 $echo "** The link will probably fail, sorry"
3078 add="$dir/$old_library"
3082 elif test "$hardcode_minus_L" = no; then
3084 *-*-sunos*) add_shlibpath="$dir" ;;
3088 elif test "$hardcode_shlibpath_var" = no; then
3089 add_shlibpath="$dir"
3096 if test "$hardcode_direct" = yes; then
3098 elif test "$hardcode_minus_L" = yes; then
3100 # Try looking first in the location we're being installed to.
3101 if test -n "$inst_prefix_dir"; then
3104 add_dir="$add_dir -L$inst_prefix_dir$libdir"
3109 elif test "$hardcode_shlibpath_var" = yes; then
3110 add_shlibpath="$dir"
3119 if test "$lib_linked" != yes; then
3120 $echo "$modename: configuration error: unsupported hardcode properties"
3124 if test -n "$add_shlibpath"; then
3125 case :$compile_shlibpath: in
3126 *":$add_shlibpath:"*) ;;
3127 *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;;
3130 if test "$linkmode" = prog; then
3131 test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs"
3132 test -n "$add" && compile_deplibs="$add $compile_deplibs"
3134 test -n "$add_dir" && deplibs="$add_dir $deplibs"
3135 test -n "$add" && deplibs="$add $deplibs"
3136 if test "$hardcode_direct" != yes && \
3137 test "$hardcode_minus_L" != yes && \
3138 test "$hardcode_shlibpath_var" = yes; then
3139 case :$finalize_shlibpath: in
3141 *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
3147 if test "$linkmode" = prog || test "$mode" = relink; then
3151 # Finalize command for both is simple: just hardcode it.
3152 if test "$hardcode_direct" = yes; then
3153 add="$libdir/$linklib"
3154 elif test "$hardcode_minus_L" = yes; then
3157 elif test "$hardcode_shlibpath_var" = yes; then
3158 case :$finalize_shlibpath: in
3160 *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
3163 elif test "$hardcode_automatic" = yes; then
3164 if test -n "$inst_prefix_dir" &&
3165 test -f "$inst_prefix_dir$libdir/$linklib" ; then
3166 add="$inst_prefix_dir$libdir/$linklib"
3168 add="$libdir/$linklib"
3171 # We cannot seem to hardcode it, guess we'll fake it.
3173 # Try looking first in the location we're being installed to.
3174 if test -n "$inst_prefix_dir"; then
3177 add_dir="$add_dir -L$inst_prefix_dir$libdir"
3184 if test "$linkmode" = prog; then
3185 test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs"
3186 test -n "$add" && finalize_deplibs="$add $finalize_deplibs"
3188 test -n "$add_dir" && deplibs="$add_dir $deplibs"
3189 test -n "$add" && deplibs="$add $deplibs"
3192 elif test "$linkmode" = prog; then
3193 # Here we assume that one of hardcode_direct or hardcode_minus_L
3194 # is not unsupported. This is valid on all known static and
3196 if test "$hardcode_direct" != unsupported; then
3197 test -n "$old_library" && linklib="$old_library"
3198 compile_deplibs="$dir/$linklib $compile_deplibs"
3199 finalize_deplibs="$dir/$linklib $finalize_deplibs"
3201 compile_deplibs="-l$name -L$dir $compile_deplibs"
3202 finalize_deplibs="-l$name -L$dir $finalize_deplibs"
3204 elif test "$build_libtool_libs" = yes; then
3205 # Not a shared library
3206 if test "$deplibs_check_method" != pass_all; then
3207 # We're trying link a shared library against a static one
3208 # but the system doesn't support it.
3210 # Just print a warning and add the library to dependency_libs so
3211 # that the program can be linked against the static library.
3213 $echo "*** Warning: This system can not link to static lib archive $lib."
3214 $echo "*** I have the capability to make that library automatically link in when"
3215 $echo "*** you link to this library. But I can only do this if you have a"
3216 $echo "*** shared version of the library, which you do not appear to have."
3217 if test "$module" = yes; then
3218 $echo "*** But as you try to build a module library, libtool will still create "
3219 $echo "*** a static module, that should work as long as the dlopening application"
3220 $echo "*** is linked with the -dlopen flag to resolve symbols at runtime."
3221 if test -z "$global_symbol_pipe"; then
3223 $echo "*** However, this would only work if libtool was able to extract symbol"
3224 $echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
3225 $echo "*** not find such a program. So, this module is probably useless."
3226 $echo "*** \`nm' from GNU binutils and a full rebuild may help."
3228 if test "$build_old_libs" = no; then
3229 build_libtool_libs=module
3232 build_libtool_libs=no
3236 deplibs="$dir/$old_library $deplibs"
3239 fi # link shared/static library?
3241 if test "$linkmode" = lib; then
3242 if test -n "$dependency_libs" &&
3243 { test "$hardcode_into_libs" != yes ||
3244 test "$build_old_libs" = yes ||
3245 test "$link_static" = yes; }; then
3246 # Extract -R from dependency_libs
3248 for libdir in $dependency_libs; do
3250 -R*) temp_xrpath=`$echo "X$libdir" | $Xsed -e 's/^-R//'`
3252 *" $temp_xrpath "*) ;;
3253 *) xrpath="$xrpath $temp_xrpath";;
3255 *) temp_deplibs="$temp_deplibs $libdir";;
3258 dependency_libs="$temp_deplibs"
3261 newlib_search_path="$newlib_search_path $absdir"
3262 # Link against this library
3263 test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs"
3264 # ... and its dependency_libs
3266 for deplib in $dependency_libs; do
3267 newdependency_libs="$deplib $newdependency_libs"
3268 if test "X$duplicate_deps" = "Xyes" ; then
3269 case "$tmp_libs " in
3270 *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
3273 tmp_libs="$tmp_libs $deplib"
3276 if test "$link_all_deplibs" != no; then
3277 # Add the search paths of all dependency libraries
3278 for deplib in $dependency_libs; do
3280 -L*) path="$deplib" ;;
3282 dir=`$echo "X$deplib" | $Xsed -e 's%/[^/]*$%%'`
3283 test "X$dir" = "X$deplib" && dir="."
3284 # We need an absolute path.
3286 [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;;
3288 absdir=`cd "$dir" && pwd`
3289 if test -z "$absdir"; then
3290 $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2
3295 if grep "^installed=no" $deplib > /dev/null; then
3296 path="$absdir/$objdir"
3298 eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
3299 if test -z "$libdir"; then
3300 $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
3303 if test "$absdir" != "$libdir"; then
3304 $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2
3311 # we do not want to link against static libs,
3312 # but need to link against shared
3313 eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib`
3314 if test -n "$deplibrary_names" ; then
3315 for tmp in $deplibrary_names ; do
3318 if test -f "$path/$depdepl" ; then
3319 depdepl="$path/$depdepl"
3321 # do not add paths which are already there
3322 case " $newlib_search_path " in
3324 *) newlib_search_path="$newlib_search_path $path";;
3337 # Again, we only want to link against shared libraries
3338 eval tmp_libs=`$echo "X$deplib" | $Xsed -e "s,^\-l,,"`
3339 for tmp in $newlib_search_path ; do
3340 if test -f "$tmp/lib$tmp_libs.dylib" ; then
3341 eval depdepl="$tmp/lib$tmp_libs.dylib"
3352 case " $deplibs " in
3354 *) deplibs="$path $deplibs" ;;
3356 case " $deplibs " in
3358 *) deplibs="$depdepl $deplibs" ;;
3361 fi # link_all_deplibs != no
3363 done # for deplib in $libs
3364 dependency_libs="$newdependency_libs"
3365 if test "$pass" = dlpreopen; then
3366 # Link the dlpreopened libraries before other libraries
3367 for deplib in $save_deplibs; do
3368 deplibs="$deplib $deplibs"
3371 if test "$pass" != dlopen; then
3372 if test "$pass" != conv; then
3373 # Make sure lib_search_path contains only unique directories.
3375 for dir in $newlib_search_path; do
3376 case "$lib_search_path " in
3378 *) lib_search_path="$lib_search_path $dir" ;;
3384 if test "$linkmode,$pass" != "prog,link"; then
3387 vars="compile_deplibs finalize_deplibs"
3389 for var in $vars dependency_libs; do
3390 # Add libraries to $var in reverse order
3391 eval tmp_libs=\"\$$var\"
3393 for deplib in $tmp_libs; do
3394 # FIXME: Pedantically, this is the right thing to do, so
3395 # that some nasty dependency loop isn't accidentally
3397 #new_libs="$deplib $new_libs"
3398 # Pragmatically, this seems to cause very few problems in
3401 -L*) new_libs="$deplib $new_libs" ;;
3404 # And here is the reason: when a library appears more
3405 # than once as an explicit dependence of a library, or
3406 # is implicitly linked in more than once by the
3407 # compiler, it is considered special, and multiple
3408 # occurrences thereof are not removed. Compare this
3409 # with having the same library being listed as a
3410 # dependency of multiple other libraries: in this case,
3411 # we know (pedantically, we assume) the library does not
3412 # need to be listed more than once, so we keep only the
3413 # last copy. This is not always right, but it is rare
3414 # enough that we require users that really mean to play
3415 # such unportable linking tricks to link the library
3416 # using -Wl,-lname, so that libtool does not consider it
3417 # for duplicate removal.
3418 case " $specialdeplibs " in
3419 *" $deplib "*) new_libs="$deplib $new_libs" ;;
3421 case " $new_libs " in
3423 *) new_libs="$deplib $new_libs" ;;
3431 for deplib in $new_libs; do
3434 case " $tmp_libs " in
3436 *) tmp_libs="$tmp_libs $deplib" ;;
3439 *) tmp_libs="$tmp_libs $deplib" ;;
3442 eval $var=\"$tmp_libs\"
3445 # Last step: remove runtime libs from dependency_libs
3446 # (they stay in deplibs)
3448 for i in $dependency_libs ; do
3449 case " $predeps $postdeps $compiler_lib_search_path " in
3454 if test -n "$i" ; then
3455 tmp_libs="$tmp_libs $i"
3458 dependency_libs=$tmp_libs
3460 if test "$linkmode" = prog; then
3461 dlfiles="$newdlfiles"
3462 dlprefiles="$newdlprefiles"
3467 if test -n "$deplibs"; then
3468 $echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2
3471 if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
3472 $echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2
3475 if test -n "$rpath"; then
3476 $echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2
3479 if test -n "$xrpath"; then
3480 $echo "$modename: warning: \`-R' is ignored for archives" 1>&2
3483 if test -n "$vinfo"; then
3484 $echo "$modename: warning: \`-version-info/-version-number' is ignored for archives" 1>&2
3487 if test -n "$release"; then
3488 $echo "$modename: warning: \`-release' is ignored for archives" 1>&2
3491 if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
3492 $echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2
3495 # Now set the variables for building old libraries.
3496 build_libtool_libs=no
3498 objs="$objs$old_deplibs"
3502 # Make sure we only generate libraries of the form `libNAME.la'.
3505 name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
3506 eval shared_ext=\"$shrext_cmds\"
3507 eval libname=\"$libname_spec\"
3510 if test "$module" = no; then
3511 $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2
3515 if test "$need_lib_prefix" != no; then
3516 # Add the "lib" prefix for modules if required
3517 name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
3518 eval shared_ext=\"$shrext_cmds\"
3519 eval libname=\"$libname_spec\"
3521 libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
3526 if test -n "$objs"; then
3527 if test "$deplibs_check_method" != pass_all; then
3528 $echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1
3532 $echo "*** Warning: Linking the shared library $output against the non-libtool"
3533 $echo "*** objects $objs is not portable!"
3534 libobjs="$libobjs $objs"
3538 if test "$dlself" != no; then
3539 $echo "$modename: warning: \`-dlopen self' is ignored for libtool libraries" 1>&2
3543 if test "$#" -gt 2; then
3544 $echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2
3549 if test -z "$rpath"; then
3550 if test "$build_libtool_libs" = yes; then
3551 # Building a libtool convenience library.
3552 # Some compilers have problems with a `.al' extension so
3553 # convenience libraries should have the same extension an
3554 # archive normally would.
3555 oldlibs="$output_objdir/$libname.$libext $oldlibs"
3556 build_libtool_libs=convenience
3560 if test -n "$vinfo"; then
3561 $echo "$modename: warning: \`-version-info/-version-number' is ignored for convenience libraries" 1>&2
3564 if test -n "$release"; then
3565 $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2
3569 # Parse the version information argument.
3570 save_ifs="$IFS"; IFS=':'
3571 set dummy $vinfo 0 0 0
3574 if test -n "$8"; then
3575 $echo "$modename: too many parameters to \`-version-info'" 1>&2
3580 # convert absolute version numbers to libtool ages
3581 # this retains compatibility with .la files and attempts
3582 # to make the code below a bit more comprehensible
3584 case $vinfo_number in
3588 number_revision="$4"
3590 # There are really only two kinds -- those that
3591 # use the current revision as the major version
3592 # and those that subtract age and use age as
3593 # a minor version. But, then there is irix
3594 # which has an extra 1 added just for fun
3596 case $version_type in
3597 darwin|linux|osf|windows|none)
3598 current=`expr $number_major + $number_minor`
3600 revision="$number_revision"
3602 freebsd-aout|freebsd-elf|sunos)
3603 current="$number_major"
3604 revision="$number_minor"
3608 current=`expr $number_major + $number_minor`
3610 revision="$number_minor"
3611 lt_irix_increment=no
3622 # Check that each of the things are valid numbers.
3624 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
3626 $echo "$modename: CURRENT \`$current' must be a nonnegative integer" 1>&2
3627 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
3633 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
3635 $echo "$modename: REVISION \`$revision' must be a nonnegative integer" 1>&2
3636 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
3642 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
3644 $echo "$modename: AGE \`$age' must be a nonnegative integer" 1>&2
3645 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
3650 if test "$age" -gt "$current"; then
3651 $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2
3652 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
3656 # Calculate the version variables.
3660 case $version_type in
3664 # Like Linux, but with the current version available in
3665 # verstring for coding it into the library header
3666 major=.`expr $current - $age`
3667 versuffix="$major.$age.$revision"
3668 # Darwin ld doesn't like 0 for these options...
3669 minor_current=`expr $current + 1`
3670 xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision"
3671 verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
3676 versuffix=".$current.$revision";
3681 versuffix=".$current";
3685 if test "X$lt_irix_increment" = "Xno"; then
3686 major=`expr $current - $age`
3688 major=`expr $current - $age + 1`
3690 case $version_type in
3691 nonstopux) verstring_prefix=nonstopux ;;
3692 *) verstring_prefix=sgi ;;
3694 verstring="$verstring_prefix$major.$revision"
3696 # Add in all the interfaces that we are compatible with.
3698 while test "$loop" -ne 0; do
3699 iface=`expr $revision - $loop`
3700 loop=`expr $loop - 1`
3701 verstring="$verstring_prefix$major.$iface:$verstring"
3704 # Before this point, $major must not contain `.'.
3706 versuffix="$major.$revision"
3710 major=.`expr $current - $age`
3711 versuffix="$major.$age.$revision"
3715 major=.`expr $current - $age`
3716 versuffix=".$current.$age.$revision"
3717 verstring="$current.$age.$revision"
3719 # Add in all the interfaces that we are compatible with.
3721 while test "$loop" -ne 0; do
3722 iface=`expr $current - $loop`
3723 loop=`expr $loop - 1`
3724 verstring="$verstring:${iface}.0"
3727 # Make executables depend on our current version.
3728 verstring="$verstring:${current}.0"
3733 versuffix=".$current.$revision"
3737 # Use '-' rather than '.', since we only want one
3738 # extension on DOS 8.3 filesystems.
3739 major=`expr $current - $age`
3744 $echo "$modename: unknown library version type \`$version_type'" 1>&2
3745 $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
3750 # Clear the version info if we defaulted, and they specified a release.
3751 if test -z "$vinfo" && test -n "$release"; then
3753 case $version_type in
3755 # we can't check for "0.0" in archive_cmds due to quoting
3756 # problems, so we reset it completely
3763 if test "$need_version" = no; then
3770 # Remove version info from name if versioning should be avoided
3771 if test "$avoid_version" = yes && test "$need_version" = no; then
3777 # Check to see if the archive will have undefined symbols.
3778 if test "$allow_undefined" = yes; then
3779 if test "$allow_undefined_flag" = unsupported; then
3780 $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2
3781 build_libtool_libs=no
3785 # Don't allow undefined symbols.
3786 allow_undefined_flag="$no_undefined_flag"
3790 if test "$mode" != relink; then
3791 # Remove our outputs, but don't remove object files since they
3792 # may have been created when compiling PIC objects.
3794 tempremovelist=`$echo "$output_objdir/*"`
3795 for p in $tempremovelist; do
3799 $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*)
3800 if test "X$precious_files_regex" != "X"; then
3801 if echo $p | $EGREP -e "$precious_files_regex" >/dev/null 2>&1
3806 removelist="$removelist $p"
3811 if test -n "$removelist"; then
3812 $show "${rm}r $removelist"
3813 $run ${rm}r $removelist
3817 # Now set the variables for building old libraries.
3818 if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then
3819 oldlibs="$oldlibs $output_objdir/$libname.$libext"
3821 # Transform .lo files to .o files.
3822 oldobjs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP`
3825 # Eliminate all temporary directories.
3826 #for path in $notinst_path; do
3827 # lib_search_path=`$echo "$lib_search_path " | ${SED} -e "s% $path % %g"`
3828 # deplibs=`$echo "$deplibs " | ${SED} -e "s% -L$path % %g"`
3829 # dependency_libs=`$echo "$dependency_libs " | ${SED} -e "s% -L$path % %g"`
3832 if test -n "$xrpath"; then
3833 # If the user specified any rpath flags, then add them.
3835 for libdir in $xrpath; do
3836 temp_xrpath="$temp_xrpath -R$libdir"
3837 case "$finalize_rpath " in
3839 *) finalize_rpath="$finalize_rpath $libdir" ;;
3842 if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then
3843 dependency_libs="$temp_xrpath $dependency_libs"
3847 # Make sure dlfiles contains only unique files that won't be dlpreopened
3848 old_dlfiles="$dlfiles"
3850 for lib in $old_dlfiles; do
3851 case " $dlprefiles $dlfiles " in
3853 *) dlfiles="$dlfiles $lib" ;;
3857 # Make sure dlprefiles contains only unique files
3858 old_dlprefiles="$dlprefiles"
3860 for lib in $old_dlprefiles; do
3861 case "$dlprefiles " in
3863 *) dlprefiles="$dlprefiles $lib" ;;
3867 if test "$build_libtool_libs" = yes; then
3868 if test -n "$rpath"; then
3870 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos*)
3871 # these systems don't actually have a c library (as such)!
3873 *-*-rhapsody* | *-*-darwin1.[012])
3874 # Rhapsody C library is in the System framework
3875 deplibs="$deplibs -framework System"
3878 # Don't link with libc until the a.out ld.so is fixed.
3880 *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
3881 # Do not include libc due to us having libc/libc_r.
3883 *-*-sco3.2v5* | *-*-sco5v6*)
3884 # Causes problems with __ctype
3886 *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
3887 # Compiler inserts libc in the correct place for threads to work
3890 # Add libc to deplibs on all other systems if necessary.
3891 if test "$build_libtool_need_lc" = "yes"; then
3892 deplibs="$deplibs -lc"
3898 # Transform deplibs into only deplibs that can be linked in shared.
3900 libname_save=$libname
3901 release_save=$release
3902 versuffix_save=$versuffix
3904 # I'm not sure if I'm treating the release correctly. I think
3905 # release should show up in the -l (ie -lgmp5) so we don't want to
3906 # add it in twice. Is that correct?
3912 case $deplibs_check_method in
3914 # Don't check for shared/static. Everything works.
3915 # This might be a little naive. We might want to check
3916 # whether the library exists or not. But this is on
3917 # osf3 & osf4 and I'm not really sure... Just
3918 # implementing what was already the behavior.
3922 # This code stresses the "libraries are programs" paradigm to its
3923 # limits. Maybe even breaks it. We compile a program, linking it
3924 # against the deplibs as a proxy for the library. Then we can check
3925 # whether they linked in statically or dynamically with ldd.
3927 cat > conftest.c <<EOF
3928 int main() { return 0; }
3931 if $LTCC $LTCFLAGS -o conftest conftest.c $deplibs; then
3932 ldd_output=`ldd conftest`
3933 for i in $deplibs; do
3934 name=`expr $i : '-l\(.*\)'`
3935 # If $name is empty we are operating on a -L argument.
3936 if test "$name" != "" && test "$name" != "0"; then
3937 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
3938 case " $predeps $postdeps " in
3940 newdeplibs="$newdeplibs $i"
3945 if test -n "$i" ; then
3946 libname=`eval \\$echo \"$libname_spec\"`
3947 deplib_matches=`eval \\$echo \"$library_names_spec\"`
3948 set dummy $deplib_matches
3950 if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
3951 newdeplibs="$newdeplibs $i"
3955 $echo "*** Warning: dynamic linker does not accept needed library $i."
3956 $echo "*** I have the capability to make that library automatically link in when"
3957 $echo "*** you link to this library. But I can only do this if you have a"
3958 $echo "*** shared version of the library, which I believe you do not have"
3959 $echo "*** because a test_compile did reveal that the linker did not use it for"
3960 $echo "*** its dynamic dependency list that programs get resolved with at runtime."
3964 newdeplibs="$newdeplibs $i"
3968 # Error occurred in the first compile. Let's try to salvage
3969 # the situation: Compile a separate program for each library.
3970 for i in $deplibs; do
3971 name=`expr $i : '-l\(.*\)'`
3972 # If $name is empty we are operating on a -L argument.
3973 if test "$name" != "" && test "$name" != "0"; then
3975 if $LTCC $LTCFLAGS -o conftest conftest.c $i; then
3976 ldd_output=`ldd conftest`
3977 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
3978 case " $predeps $postdeps " in
3980 newdeplibs="$newdeplibs $i"
3985 if test -n "$i" ; then
3986 libname=`eval \\$echo \"$libname_spec\"`
3987 deplib_matches=`eval \\$echo \"$library_names_spec\"`
3988 set dummy $deplib_matches
3990 if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
3991 newdeplibs="$newdeplibs $i"
3995 $echo "*** Warning: dynamic linker does not accept needed library $i."
3996 $echo "*** I have the capability to make that library automatically link in when"
3997 $echo "*** you link to this library. But I can only do this if you have a"
3998 $echo "*** shared version of the library, which you do not appear to have"
3999 $echo "*** because a test_compile did reveal that the linker did not use this one"
4000 $echo "*** as a dynamic dependency that programs can get resolved with at runtime."
4006 $echo "*** Warning! Library $i is needed by this library but I was not able to"
4007 $echo "*** make it link in! You will probably need to install it or some"
4008 $echo "*** library that it depends on before this library will be fully"
4009 $echo "*** functional. Installing it before continuing would be even better."
4012 newdeplibs="$newdeplibs $i"
4018 set dummy $deplibs_check_method
4019 file_magic_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
4020 for a_deplib in $deplibs; do
4021 name=`expr $a_deplib : '-l\(.*\)'`
4022 # If $name is empty we are operating on a -L argument.
4023 if test "$name" != "" && test "$name" != "0"; then
4024 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
4025 case " $predeps $postdeps " in
4027 newdeplibs="$newdeplibs $a_deplib"
4032 if test -n "$a_deplib" ; then
4033 libname=`eval \\$echo \"$libname_spec\"`
4034 for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
4035 potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
4036 for potent_lib in $potential_libs; do
4037 # Follow soft links.
4038 if ls -lLd "$potent_lib" 2>/dev/null \
4039 | grep " -> " >/dev/null; then
4042 # The statement above tries to avoid entering an
4043 # endless loop below, in case of cyclic links.
4044 # We might still enter an endless loop, since a link
4045 # loop can be closed while we follow links,
4047 potlib="$potent_lib"
4048 while test -h "$potlib" 2>/dev/null; do
4049 potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'`
4051 [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";;
4052 *) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";;
4055 if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \
4057 | $EGREP "$file_magic_regex" > /dev/null; then
4058 newdeplibs="$newdeplibs $a_deplib"
4065 if test -n "$a_deplib" ; then
4068 $echo "*** Warning: linker path does not have real file for library $a_deplib."
4069 $echo "*** I have the capability to make that library automatically link in when"
4070 $echo "*** you link to this library. But I can only do this if you have a"
4071 $echo "*** shared version of the library, which you do not appear to have"
4072 $echo "*** because I did check the linker path looking for a file starting"
4073 if test -z "$potlib" ; then
4074 $echo "*** with $libname but no candidates were found. (...for file magic test)"
4076 $echo "*** with $libname and none of the candidates passed a file format test"
4077 $echo "*** using a file magic. Last file checked: $potlib"
4081 # Add a -L argument.
4082 newdeplibs="$newdeplibs $a_deplib"
4084 done # Gone through all deplibs.
4087 set dummy $deplibs_check_method
4088 match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
4089 for a_deplib in $deplibs; do
4090 name=`expr $a_deplib : '-l\(.*\)'`
4091 # If $name is empty we are operating on a -L argument.
4092 if test -n "$name" && test "$name" != "0"; then
4093 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
4094 case " $predeps $postdeps " in
4096 newdeplibs="$newdeplibs $a_deplib"
4101 if test -n "$a_deplib" ; then
4102 libname=`eval \\$echo \"$libname_spec\"`
4103 for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
4104 potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
4105 for potent_lib in $potential_libs; do
4106 potlib="$potent_lib" # see symlink-check above in file_magic test
4107 if eval $echo \"$potent_lib\" 2>/dev/null \
4109 | $EGREP "$match_pattern_regex" > /dev/null; then
4110 newdeplibs="$newdeplibs $a_deplib"
4117 if test -n "$a_deplib" ; then
4120 $echo "*** Warning: linker path does not have real file for library $a_deplib."
4121 $echo "*** I have the capability to make that library automatically link in when"
4122 $echo "*** you link to this library. But I can only do this if you have a"
4123 $echo "*** shared version of the library, which you do not appear to have"
4124 $echo "*** because I did check the linker path looking for a file starting"
4125 if test -z "$potlib" ; then
4126 $echo "*** with $libname but no candidates were found. (...for regex pattern test)"
4128 $echo "*** with $libname and none of the candidates passed a file format test"
4129 $echo "*** using a regex pattern. Last file checked: $potlib"
4133 # Add a -L argument.
4134 newdeplibs="$newdeplibs $a_deplib"
4136 done # Gone through all deplibs.
4140 tmp_deplibs=`$echo "X $deplibs" | $Xsed -e 's/ -lc$//' \
4141 -e 's/ -[LR][^ ]*//g'`
4142 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
4143 for i in $predeps $postdeps ; do
4144 # can't use Xsed below, because $i might contain '/'
4145 tmp_deplibs=`$echo "X $tmp_deplibs" | ${SED} -e "1s,^X,," -e "s,$i,,"`
4148 if $echo "X $tmp_deplibs" | $Xsed -e 's/[ ]//g' \
4149 | grep . >/dev/null; then
4151 if test "X$deplibs_check_method" = "Xnone"; then
4152 $echo "*** Warning: inter-library dependencies are not supported in this platform."
4154 $echo "*** Warning: inter-library dependencies are not known to be supported."
4156 $echo "*** All declared inter-library dependencies are being dropped."
4161 versuffix=$versuffix_save
4163 release=$release_save
4164 libname=$libname_save
4168 *-*-rhapsody* | *-*-darwin1.[012])
4169 # On Rhapsody replace the C library is the System framework
4170 newdeplibs=`$echo "X $newdeplibs" | $Xsed -e 's/ -lc / -framework System /'`
4174 if test "$droppeddeps" = yes; then
4175 if test "$module" = yes; then
4177 $echo "*** Warning: libtool could not satisfy all declared inter-library"
4178 $echo "*** dependencies of module $libname. Therefore, libtool will create"
4179 $echo "*** a static module, that should work as long as the dlopening"
4180 $echo "*** application is linked with the -dlopen flag."
4181 if test -z "$global_symbol_pipe"; then
4183 $echo "*** However, this would only work if libtool was able to extract symbol"
4184 $echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
4185 $echo "*** not find such a program. So, this module is probably useless."
4186 $echo "*** \`nm' from GNU binutils and a full rebuild may help."
4188 if test "$build_old_libs" = no; then
4189 oldlibs="$output_objdir/$libname.$libext"
4190 build_libtool_libs=module
4193 build_libtool_libs=no
4196 $echo "*** The inter-library dependencies that have been dropped here will be"
4197 $echo "*** automatically added whenever a program is linked with this library"
4198 $echo "*** or is declared to -dlopen it."
4200 if test "$allow_undefined" = no; then
4202 $echo "*** Since this library must not contain undefined symbols,"
4203 $echo "*** because either the platform does not support them or"
4204 $echo "*** it was explicitly requested with -no-undefined,"
4205 $echo "*** libtool will only create a static version of it."
4206 if test "$build_old_libs" = no; then
4207 oldlibs="$output_objdir/$libname.$libext"
4208 build_libtool_libs=module
4211 build_libtool_libs=no
4216 # Done checking deplibs!
4221 # move library search paths that coincide with paths to not yet
4222 # installed libraries to the beginning of the library search list
4224 for path in $notinst_path; do
4225 case " $new_libs " in
4226 *" -L$path/$objdir "*) ;;
4228 case " $deplibs " in
4229 *" -L$path/$objdir "*)
4230 new_libs="$new_libs -L$path/$objdir" ;;
4235 for deplib in $deplibs; do
4238 case " $new_libs " in
4240 *) new_libs="$new_libs $deplib" ;;
4243 *) new_libs="$new_libs $deplib" ;;
4249 # All the library-specific variables (install_libdir is set above).
4254 # Test again, we may have decided not to build it any more
4255 if test "$build_libtool_libs" = yes; then
4256 if test "$hardcode_into_libs" = yes; then
4257 # Hardcode the library paths
4260 rpath="$finalize_rpath"
4261 test "$mode" != relink && rpath="$compile_rpath$rpath"
4262 for libdir in $rpath; do
4263 if test -n "$hardcode_libdir_flag_spec"; then
4264 if test -n "$hardcode_libdir_separator"; then
4265 if test -z "$hardcode_libdirs"; then
4266 hardcode_libdirs="$libdir"
4268 # Just accumulate the unique libdirs.
4269 case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
4270 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
4273 hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
4278 eval flag=\"$hardcode_libdir_flag_spec\"
4279 dep_rpath="$dep_rpath $flag"
4281 elif test -n "$runpath_var"; then
4282 case "$perm_rpath " in
4284 *) perm_rpath="$perm_rpath $libdir" ;;
4288 # Substitute the hardcoded libdirs into the rpath.
4289 if test -n "$hardcode_libdir_separator" &&
4290 test -n "$hardcode_libdirs"; then
4291 libdir="$hardcode_libdirs"
4292 if test -n "$hardcode_libdir_flag_spec_ld"; then
4293 case $archive_cmds in
4294 *\$LD*) eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" ;;
4295 *) eval dep_rpath=\"$hardcode_libdir_flag_spec\" ;;
4298 eval dep_rpath=\"$hardcode_libdir_flag_spec\"
4301 if test -n "$runpath_var" && test -n "$perm_rpath"; then
4302 # We should set the runpath_var.
4304 for dir in $perm_rpath; do
4307 eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var"
4309 test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs"
4312 shlibpath="$finalize_shlibpath"
4313 test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath"
4314 if test -n "$shlibpath"; then
4315 eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var"
4318 # Get the real and link names of the library.
4319 eval shared_ext=\"$shrext_cmds\"
4320 eval library_names=\"$library_names_spec\"
4321 set dummy $library_names
4325 if test -n "$soname_spec"; then
4326 eval soname=\"$soname_spec\"
4330 if test -z "$dlname"; then
4334 lib="$output_objdir/$realname"
4338 linknames="$linknames $link"
4341 # Use standard objects if they are pic
4342 test -z "$pic_flag" && libobjs=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
4344 # Prepare the list of exported symbols
4345 if test -z "$export_symbols"; then
4346 if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then
4347 $show "generating symbol list for \`$libname.la'"
4348 export_symbols="$output_objdir/$libname.exp"
4349 $run $rm $export_symbols
4350 cmds=$export_symbols_cmds
4351 save_ifs="$IFS"; IFS='~'
4352 for cmd in $cmds; do
4355 if len=`expr "X$cmd" : ".*"` &&
4356 test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
4358 $run eval "$cmd" || exit $?
4359 skipped_export=false
4361 # The command line is too long to execute in one step.
4362 $show "using reloadable object file for export list..."
4364 # Break out early, otherwise skipped_export may be
4365 # set to false by a later but shorter cmd.
4370 if test -n "$export_symbols_regex"; then
4371 $show "$EGREP -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\""
4372 $run eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
4373 $show "$mv \"${export_symbols}T\" \"$export_symbols\""
4374 $run eval '$mv "${export_symbols}T" "$export_symbols"'
4379 if test -n "$export_symbols" && test -n "$include_expsyms"; then
4380 $run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"'
4384 for test_deplib in $deplibs; do
4385 case " $convenience " in
4386 *" $test_deplib "*) ;;
4388 tmp_deplibs="$tmp_deplibs $test_deplib"
4392 deplibs="$tmp_deplibs"
4394 if test -n "$convenience"; then
4395 if test -n "$whole_archive_flag_spec"; then
4396 save_libobjs=$libobjs
4397 eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
4399 gentop="$output_objdir/${outputname}x"
4400 generated="$generated $gentop"
4402 func_extract_archives $gentop $convenience
4403 libobjs="$libobjs $func_extract_archives_result"
4407 if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
4408 eval flag=\"$thread_safe_flag_spec\"
4409 linker_flags="$linker_flags $flag"
4412 # Make a backup of the uninstalled library when relinking
4413 if test "$mode" = relink; then
4414 $run eval '(cd $output_objdir && $rm ${realname}U && $mv $realname ${realname}U)' || exit $?
4417 # Do each of the archive commands.
4418 if test "$module" = yes && test -n "$module_cmds" ; then
4419 if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
4420 eval test_cmds=\"$module_expsym_cmds\"
4421 cmds=$module_expsym_cmds
4423 eval test_cmds=\"$module_cmds\"
4427 if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
4428 eval test_cmds=\"$archive_expsym_cmds\"
4429 cmds=$archive_expsym_cmds
4431 eval test_cmds=\"$archive_cmds\"
4436 if test "X$skipped_export" != "X:" &&
4437 len=`expr "X$test_cmds" : ".*" 2>/dev/null` &&
4438 test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
4441 # The command line is too long to link in one step, link piecewise.
4442 $echo "creating reloadable object files..."
4444 # Save the value of $output and $libobjs because we want to
4445 # use them later. If we have whole_archive_flag_spec, we
4446 # want to use save_libobjs as it was before
4447 # whole_archive_flag_spec was expanded, because we can't
4448 # assume the linker understands whole_archive_flag_spec.
4449 # This may have to be revisited, in case too many
4450 # convenience libraries get linked in and end up exceeding
4452 if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then
4453 save_libobjs=$libobjs
4456 output_la=`$echo "X$output" | $Xsed -e "$basename"`
4458 # Clear the reloadable object creation command queue and
4459 # initialize k to one.
4466 output=$output_objdir/$output_la-${k}.$objext
4467 # Loop over the list of objects to be linked.
4468 for obj in $save_libobjs
4470 eval test_cmds=\"$reload_cmds $objlist $last_robj\"
4471 if test "X$objlist" = X ||
4472 { len=`expr "X$test_cmds" : ".*" 2>/dev/null` &&
4473 test "$len" -le "$max_cmd_len"; }; then
4474 objlist="$objlist $obj"
4476 # The command $test_cmds is almost too long, add a
4477 # command to the queue.
4478 if test "$k" -eq 1 ; then
4479 # The first file doesn't have a previous command to add.
4480 eval concat_cmds=\"$reload_cmds $objlist $last_robj\"
4482 # All subsequent reloadable object files will link in
4483 # the last one created.
4484 eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj\"
4486 last_robj=$output_objdir/$output_la-${k}.$objext
4488 output=$output_objdir/$output_la-${k}.$objext
4493 # Handle the remaining objects by creating one last
4494 # reloadable object file. All subsequent reloadable object
4495 # files will link in the last one created.
4496 test -z "$concat_cmds" || concat_cmds=$concat_cmds~
4497 eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\"
4499 if ${skipped_export-false}; then
4500 $show "generating symbol list for \`$libname.la'"
4501 export_symbols="$output_objdir/$libname.exp"
4502 $run $rm $export_symbols
4504 # Append the command to create the export file.
4505 eval concat_cmds=\"\$concat_cmds~$export_symbols_cmds\"
4508 # Set up a command to remove the reloadable object files
4509 # after they are used.
4511 while test "$i" -lt "$k"
4514 delfiles="$delfiles $output_objdir/$output_la-${i}.$objext"
4517 $echo "creating a temporary reloadable object file: $output"
4519 # Loop through the commands generated above and execute them.
4520 save_ifs="$IFS"; IFS='~'
4521 for cmd in $concat_cmds; do
4524 $run eval "$cmd" || exit $?
4529 # Restore the value of output.
4532 if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then
4533 eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
4535 # Expand the library linking commands again to reset the
4536 # value of $libobjs for piecewise linking.
4538 # Do each of the archive commands.
4539 if test "$module" = yes && test -n "$module_cmds" ; then
4540 if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
4541 cmds=$module_expsym_cmds
4546 if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
4547 cmds=$archive_expsym_cmds
4553 # Append the command to remove the reloadable object files
4554 # to the just-reset $cmds.
4555 eval cmds=\"\$cmds~\$rm $delfiles\"
4557 save_ifs="$IFS"; IFS='~'
4558 for cmd in $cmds; do
4562 $run eval "$cmd" || {
4565 # Restore the uninstalled library and exit
4566 if test "$mode" = relink; then
4567 $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)'
4575 # Restore the uninstalled library and exit
4576 if test "$mode" = relink; then
4577 $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' || exit $?
4579 if test -n "$convenience"; then
4580 if test -z "$whole_archive_flag_spec"; then
4581 $show "${rm}r $gentop"
4582 $run ${rm}r "$gentop"
4589 # Create links to the real library.
4590 for linkname in $linknames; do
4591 if test "$realname" != "$linkname"; then
4592 $show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)"
4593 $run eval '(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)' || exit $?
4597 # If -module or -export-dynamic was specified, set the dlname.
4598 if test "$module" = yes || test "$export_dynamic" = yes; then
4599 # On all known operating systems, these are identical.
4606 if test -n "$deplibs"; then
4607 $echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2
4610 if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
4611 $echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2
4614 if test -n "$rpath"; then
4615 $echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2
4618 if test -n "$xrpath"; then
4619 $echo "$modename: warning: \`-R' is ignored for objects" 1>&2
4622 if test -n "$vinfo"; then
4623 $echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2
4626 if test -n "$release"; then
4627 $echo "$modename: warning: \`-release' is ignored for objects" 1>&2
4632 if test -n "$objs$old_deplibs"; then
4633 $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2
4637 obj=`$echo "X$output" | $Xsed -e "$lo2o"`
4645 # Delete the old objects.
4646 $run $rm $obj $libobj
4648 # Objects from convenience libraries. This assumes
4649 # single-version convenience libraries. Whenever we create
4650 # different ones for PIC/non-PIC, this we'll have to duplicate
4654 # reload_cmds runs $LD directly, so let us get rid of
4655 # -Wl from whole_archive_flag_spec and hope we can get by with
4656 # turning comma into space..
4659 if test -n "$convenience"; then
4660 if test -n "$whole_archive_flag_spec"; then
4661 eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\"
4662 reload_conv_objs=$reload_objs\ `$echo "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'`
4664 gentop="$output_objdir/${obj}x"
4665 generated="$generated $gentop"
4667 func_extract_archives $gentop $convenience
4668 reload_conv_objs="$reload_objs $func_extract_archives_result"
4672 # Create the old-style object.
4673 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
4677 save_ifs="$IFS"; IFS='~'
4678 for cmd in $cmds; do
4682 $run eval "$cmd" || exit $?
4686 # Exit if we aren't doing a library object file.
4687 if test -z "$libobj"; then
4688 if test -n "$gentop"; then
4689 $show "${rm}r $gentop"
4696 if test "$build_libtool_libs" != yes; then
4697 if test -n "$gentop"; then
4698 $show "${rm}r $gentop"
4702 # Create an invalid libtool object if no PIC, so that we don't
4703 # accidentally link it into a program.
4704 # $show "echo timestamp > $libobj"
4705 # $run eval "echo timestamp > $libobj" || exit $?
4709 if test -n "$pic_flag" || test "$pic_mode" != default; then
4710 # Only do commands if we really have different PIC objects.
4711 reload_objs="$libobjs $reload_conv_objs"
4714 save_ifs="$IFS"; IFS='~'
4715 for cmd in $cmds; do
4719 $run eval "$cmd" || exit $?
4724 if test -n "$gentop"; then
4725 $show "${rm}r $gentop"
4734 *cygwin*) output=`$echo $output | ${SED} -e 's,.exe$,,;s,$,.exe,'` ;;
4736 if test -n "$vinfo"; then
4737 $echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2
4740 if test -n "$release"; then
4741 $echo "$modename: warning: \`-release' is ignored for programs" 1>&2
4744 if test "$preload" = yes; then
4745 if test "$dlopen_support" = unknown && test "$dlopen_self" = unknown &&
4746 test "$dlopen_self_static" = unknown; then
4747 $echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support."
4752 *-*-rhapsody* | *-*-darwin1.[012])
4753 # On Rhapsody replace the C library is the System framework
4754 compile_deplibs=`$echo "X $compile_deplibs" | $Xsed -e 's/ -lc / -framework System /'`
4755 finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'`
4761 # Don't allow lazy linking, it breaks C++ global constructors
4762 if test "$tagname" = CXX ; then
4763 compile_command="$compile_command ${wl}-bind_at_load"
4764 finalize_command="$finalize_command ${wl}-bind_at_load"
4770 # move library search paths that coincide with paths to not yet
4771 # installed libraries to the beginning of the library search list
4773 for path in $notinst_path; do
4774 case " $new_libs " in
4775 *" -L$path/$objdir "*) ;;
4777 case " $compile_deplibs " in
4778 *" -L$path/$objdir "*)
4779 new_libs="$new_libs -L$path/$objdir" ;;
4784 for deplib in $compile_deplibs; do
4787 case " $new_libs " in
4789 *) new_libs="$new_libs $deplib" ;;
4792 *) new_libs="$new_libs $deplib" ;;
4795 compile_deplibs="$new_libs"
4798 compile_command="$compile_command $compile_deplibs"
4799 finalize_command="$finalize_command $finalize_deplibs"
4801 if test -n "$rpath$xrpath"; then
4802 # If the user specified any rpath flags, then add them.
4803 for libdir in $rpath $xrpath; do
4804 # This is the magic to use -rpath.
4805 case "$finalize_rpath " in
4807 *) finalize_rpath="$finalize_rpath $libdir" ;;
4812 # Now hardcode the library paths
4815 for libdir in $compile_rpath $finalize_rpath; do
4816 if test -n "$hardcode_libdir_flag_spec"; then
4817 if test -n "$hardcode_libdir_separator"; then
4818 if test -z "$hardcode_libdirs"; then
4819 hardcode_libdirs="$libdir"
4821 # Just accumulate the unique libdirs.
4822 case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
4823 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
4826 hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
4831 eval flag=\"$hardcode_libdir_flag_spec\"
4832 rpath="$rpath $flag"
4834 elif test -n "$runpath_var"; then
4835 case "$perm_rpath " in
4837 *) perm_rpath="$perm_rpath $libdir" ;;
4841 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
4842 testbindir=`$echo "X$libdir" | $Xsed -e 's*/lib$*/bin*'`
4843 case :$dllsearchpath: in
4845 *) dllsearchpath="$dllsearchpath:$libdir";;
4847 case :$dllsearchpath: in
4848 *":$testbindir:"*) ;;
4849 *) dllsearchpath="$dllsearchpath:$testbindir";;
4854 # Substitute the hardcoded libdirs into the rpath.
4855 if test -n "$hardcode_libdir_separator" &&
4856 test -n "$hardcode_libdirs"; then
4857 libdir="$hardcode_libdirs"
4858 eval rpath=\" $hardcode_libdir_flag_spec\"
4860 compile_rpath="$rpath"
4864 for libdir in $finalize_rpath; do
4865 if test -n "$hardcode_libdir_flag_spec"; then
4866 if test -n "$hardcode_libdir_separator"; then
4867 if test -z "$hardcode_libdirs"; then
4868 hardcode_libdirs="$libdir"
4870 # Just accumulate the unique libdirs.
4871 case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
4872 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
4875 hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
4880 eval flag=\"$hardcode_libdir_flag_spec\"
4881 rpath="$rpath $flag"
4883 elif test -n "$runpath_var"; then
4884 case "$finalize_perm_rpath " in
4886 *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;;
4890 # Substitute the hardcoded libdirs into the rpath.
4891 if test -n "$hardcode_libdir_separator" &&
4892 test -n "$hardcode_libdirs"; then
4893 libdir="$hardcode_libdirs"
4894 eval rpath=\" $hardcode_libdir_flag_spec\"
4896 finalize_rpath="$rpath"
4898 if test -n "$libobjs" && test "$build_old_libs" = yes; then
4899 # Transform all the library objects into standard objects.
4900 compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
4901 finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
4905 if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
4906 if test -n "$NM" && test -n "$global_symbol_pipe"; then
4907 dlsyms="${outputname}S.c"
4909 $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2
4913 if test -n "$dlsyms"; then
4917 # Discover the nlist of each of the dlfiles.
4918 nlist="$output_objdir/${outputname}.nm"
4920 $show "$rm $nlist ${nlist}S ${nlist}T"
4921 $run $rm "$nlist" "${nlist}S" "${nlist}T"
4923 # Parse the name list into a source file.
4924 $show "creating $output_objdir/$dlsyms"
4926 test -z "$run" && $echo > "$output_objdir/$dlsyms" "\
4927 /* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */
4928 /* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */
4934 /* Prevent the only kind of declaration conflicts we can make. */
4935 #define lt_preloaded_symbols some_other_symbol
4937 /* External symbol declarations for the compiler. */\
4940 if test "$dlself" = yes; then
4941 $show "generating symbol list for \`$output'"
4943 test -z "$run" && $echo ': @PROGRAM@ ' > "$nlist"
4945 # Add our own program objects to the symbol list.
4946 progfiles=`$echo "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
4947 for arg in $progfiles; do
4948 $show "extracting global C symbols from \`$arg'"
4949 $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
4952 if test -n "$exclude_expsyms"; then
4953 $run eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T'
4954 $run eval '$mv "$nlist"T "$nlist"'
4957 if test -n "$export_symbols_regex"; then
4958 $run eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T'
4959 $run eval '$mv "$nlist"T "$nlist"'
4962 # Prepare the list of exported symbols
4963 if test -z "$export_symbols"; then
4964 export_symbols="$output_objdir/$outputname.exp"
4965 $run $rm $export_symbols
4966 $run eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
4968 *cygwin* | *mingw* )
4969 $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
4970 $run eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"'
4974 $run eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"'
4975 $run eval 'grep -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T'
4976 $run eval 'mv "$nlist"T "$nlist"'
4978 *cygwin* | *mingw* )
4979 $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
4980 $run eval 'cat "$nlist" >> "$output_objdir/$outputname.def"'
4986 for arg in $dlprefiles; do
4987 $show "extracting global C symbols from \`$arg'"
4988 name=`$echo "$arg" | ${SED} -e 's%^.*/%%'`
4989 $run eval '$echo ": $name " >> "$nlist"'
4990 $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
4993 if test -z "$run"; then
4994 # Make sure we have at least an empty file.
4995 test -f "$nlist" || : > "$nlist"
4997 if test -n "$exclude_expsyms"; then
4998 $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T
4999 $mv "$nlist"T "$nlist"
5002 # Try sorting and uniquifying the output.
5003 if grep -v "^: " < "$nlist" |
5004 if sort -k 3 </dev/null >/dev/null 2>&1; then
5009 uniq > "$nlist"S; then
5012 grep -v "^: " < "$nlist" > "$nlist"S
5015 if test -f "$nlist"S; then
5016 eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$dlsyms"'
5018 $echo '/* NONE */' >> "$output_objdir/$dlsyms"
5021 $echo >> "$output_objdir/$dlsyms" "\
5023 #undef lt_preloaded_symbols
5025 #if defined (__STDC__) && __STDC__
5026 # define lt_ptr void *
5028 # define lt_ptr char *
5032 /* The mapping between symbol names and symbols. */
5036 *cygwin* | *mingw* )
5037 $echo >> "$output_objdir/$dlsyms" "\
5038 /* DATA imports from DLLs on WIN32 can't be const, because
5039 runtime relocations are performed -- see ld's documentation
5045 $echo >> "$output_objdir/$dlsyms" "\
5052 $echo >> "$output_objdir/$dlsyms" "\
5056 lt_preloaded_symbols[] =
5060 eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$dlsyms"
5062 $echo >> "$output_objdir/$dlsyms" "\
5066 /* This works around a problem in FreeBSD linker */
5067 #ifdef FREEBSD_WORKAROUND
5068 static const void *lt_preloaded_setup() {
5069 return lt_preloaded_symbols;
5079 pic_flag_for_symtable=
5081 # compiling the symbol table file with pic_flag works around
5082 # a FreeBSD bug that causes programs to crash when -lm is
5083 # linked before any other PIC object. But we must not use
5084 # pic_flag when linking with -static. The problem exists in
5085 # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1.
5086 *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
5087 case "$compile_command " in
5089 *) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND";;
5092 case "$compile_command " in
5094 *) pic_flag_for_symtable=" $pic_flag";;
5098 # Now compile the dynamic symbol file.
5099 $show "(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")"
5100 $run eval '(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $?
5102 # Clean up the generated files.
5103 $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T"
5104 $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T"
5106 # Transform the symbol file into the correct name.
5108 *cygwin* | *mingw* )
5109 if test -f "$output_objdir/${outputname}.def" ; then
5110 compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP`
5111 finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP`
5113 compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
5114 finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
5118 compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
5119 finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
5124 $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2
5129 # We keep going just in case the user didn't refer to
5130 # lt_preloaded_symbols. The linker will fail if global_symbol_pipe
5131 # really was required.
5133 # Nullify the symbol file.
5134 compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP`
5135 finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP`
5138 if test "$need_relink" = no || test "$build_libtool_libs" != yes; then
5139 # Replace the output file specification.
5140 compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$output"'%g' | $NL2SP`
5141 link_command="$compile_command$compile_rpath"
5143 # We have no uninstalled library dependencies, so finalize right now.
5144 $show "$link_command"
5145 $run eval "$link_command"
5148 # Delete the generated files.
5149 if test -n "$dlsyms"; then
5150 $show "$rm $output_objdir/${outputname}S.${objext}"
5151 $run $rm "$output_objdir/${outputname}S.${objext}"
5157 if test -n "$shlibpath_var"; then
5158 # We should set the shlibpath_var
5160 for dir in $temp_rpath; do
5162 [\\/]* | [A-Za-z]:[\\/]*)
5167 # Relative path: add a thisdir entry.
5168 rpath="$rpath\$thisdir/$dir:"
5175 if test -n "$compile_shlibpath$finalize_shlibpath"; then
5176 compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command"
5178 if test -n "$finalize_shlibpath"; then
5179 finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command"
5184 if test -n "$runpath_var"; then
5185 if test -n "$perm_rpath"; then
5186 # We should set the runpath_var.
5188 for dir in $perm_rpath; do
5191 compile_var="$runpath_var=\"$rpath\$$runpath_var\" "
5193 if test -n "$finalize_perm_rpath"; then
5194 # We should set the runpath_var.
5196 for dir in $finalize_perm_rpath; do
5199 finalize_var="$runpath_var=\"$rpath\$$runpath_var\" "
5203 if test "$no_install" = yes; then
5204 # We don't need to create a wrapper script.
5205 link_command="$compile_var$compile_command$compile_rpath"
5206 # Replace the output file specification.
5207 link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
5208 # Delete the old output file.
5210 # Link the executable and exit
5211 $show "$link_command"
5212 $run eval "$link_command" || exit $?
5216 if test "$hardcode_action" = relink; then
5217 # Fast installation is not supported
5218 link_command="$compile_var$compile_command$compile_rpath"
5219 relink_command="$finalize_var$finalize_command$finalize_rpath"
5221 $echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2
5222 $echo "$modename: \`$output' will be relinked during installation" 1>&2
5224 if test "$fast_install" != no; then
5225 link_command="$finalize_var$compile_command$finalize_rpath"
5226 if test "$fast_install" = yes; then
5227 relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $SP2NL | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g' | $NL2SP`
5229 # fast_install is set to needless
5233 link_command="$compile_var$compile_command$compile_rpath"
5234 relink_command="$finalize_var$finalize_command$finalize_rpath"
5238 # Replace the output file specification.
5239 link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
5241 # Delete the old output files.
5242 $run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname
5244 $show "$link_command"
5245 $run eval "$link_command" || exit $?
5247 # Now create the wrapper script.
5248 $show "creating $output"
5250 # Quote the relink command for shipping.
5251 if test -n "$relink_command"; then
5252 # Preserve any variables that may affect compiler behavior
5253 for var in $variables_saved_for_relink; do
5254 if eval test -z \"\${$var+set}\"; then
5255 relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command"
5256 elif eval var_value=\$$var; test -z "$var_value"; then
5257 relink_command="$var=; export $var; $relink_command"
5259 var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"`
5260 relink_command="$var=\"$var_value\"; export $var; $relink_command"
5263 relink_command="(cd `pwd`; $relink_command)"
5264 relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP`
5267 # Quote $echo for shipping.
5268 if test "X$echo" = "X$SHELL $progpath --fallback-echo"; then
5270 [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";;
5271 *) qecho="$SHELL `pwd`/$progpath --fallback-echo";;
5273 qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"`
5275 qecho=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"`
5278 # Only actually do things if our run command is non-null.
5279 if test -z "$run"; then
5280 # win32 will think the script is a binary if it has
5281 # a .exe suffix, so we strip it off here.
5283 *.exe) output=`$echo $output|${SED} 's,.exe$,,'` ;;
5285 # test for cygwin because mv fails w/o .exe extensions
5289 outputname=`$echo $outputname|${SED} 's,.exe$,,'` ;;
5293 *cygwin* | *mingw* )
5294 output_name=`basename $output`
5295 output_path=`dirname $output`
5296 cwrappersource="$output_path/$objdir/lt-$output_name.c"
5297 cwrapper="$output_path/$output_name.exe"
5298 $rm $cwrappersource $cwrapper
5299 trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15
5301 cat > $cwrappersource <<EOF
5303 /* $cwrappersource - temporary wrapper executable for $objdir/$outputname
5304 Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
5306 The $output program cannot be directly executed until all the libtool
5307 libraries that it depends on are installed.
5309 This wrapper executable should never be moved out of the build directory.
5310 If it is, it will not operate correctly.
5312 Currently, it simply execs the wrapper *script* "/bin/sh $output",
5313 but could eventually absorb all of the scripts functionality and
5314 exec $objdir/$outputname directly.
5317 cat >> $cwrappersource<<"EOF"
5326 #include <sys/stat.h>
5328 #if defined(PATH_MAX)
5329 # define LT_PATHMAX PATH_MAX
5330 #elif defined(MAXPATHLEN)
5331 # define LT_PATHMAX MAXPATHLEN
5333 # define LT_PATHMAX 1024
5336 #ifndef DIR_SEPARATOR
5337 # define DIR_SEPARATOR '/'
5338 # define PATH_SEPARATOR ':'
5341 #if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \
5343 # define HAVE_DOS_BASED_FILE_SYSTEM
5344 # ifndef DIR_SEPARATOR_2
5345 # define DIR_SEPARATOR_2 '\\'
5347 # ifndef PATH_SEPARATOR_2
5348 # define PATH_SEPARATOR_2 ';'
5352 #ifndef DIR_SEPARATOR_2
5353 # define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR)
5354 #else /* DIR_SEPARATOR_2 */
5355 # define IS_DIR_SEPARATOR(ch) \
5356 (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2))
5357 #endif /* DIR_SEPARATOR_2 */
5359 #ifndef PATH_SEPARATOR_2
5360 # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR)
5361 #else /* PATH_SEPARATOR_2 */
5362 # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2)
5363 #endif /* PATH_SEPARATOR_2 */
5365 #define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type)))
5366 #define XFREE(stale) do { \
5367 if (stale) { free ((void *) stale); stale = 0; } \
5370 /* -DDEBUG is fairly common in CFLAGS. */
5372 #if defined DEBUGWRAPPER
5373 # define DEBUG(format, ...) fprintf(stderr, format, __VA_ARGS__)
5375 # define DEBUG(format, ...)
5378 const char *program_name = NULL;
5380 void * xmalloc (size_t num);
5381 char * xstrdup (const char *string);
5382 const char * base_name (const char *name);
5383 char * find_executable(const char *wrapper);
5384 int check_executable(const char *path);
5385 char * strendzap(char *str, const char *pat);
5386 void lt_fatal (const char *message, ...);
5389 main (int argc, char *argv[])
5394 program_name = (char *) xstrdup (base_name (argv[0]));
5395 DEBUG("(main) argv[0] : %s\n",argv[0]);
5396 DEBUG("(main) program_name : %s\n",program_name);
5397 newargz = XMALLOC(char *, argc+2);
5400 cat >> $cwrappersource <<EOF
5401 newargz[0] = (char *) xstrdup("$SHELL");
5404 cat >> $cwrappersource <<"EOF"
5405 newargz[1] = find_executable(argv[0]);
5406 if (newargz[1] == NULL)
5407 lt_fatal("Couldn't find %s", argv[0]);
5408 DEBUG("(main) found exe at : %s\n",newargz[1]);
5409 /* we know the script has the same name, without the .exe */
5410 /* so make sure newargz[1] doesn't end in .exe */
5411 strendzap(newargz[1],".exe");
5412 for (i = 1; i < argc; i++)
5413 newargz[i+1] = xstrdup(argv[i]);
5414 newargz[argc+1] = NULL;
5416 for (i=0; i<argc+1; i++)
5418 DEBUG("(main) newargz[%d] : %s\n",i,newargz[i]);
5426 cat >> $cwrappersource <<EOF
5427 execv("$SHELL",(char const **)newargz);
5431 cat >> $cwrappersource <<EOF
5432 execv("$SHELL",newargz);
5437 cat >> $cwrappersource <<"EOF"
5442 xmalloc (size_t num)
5444 void * p = (void *) malloc (num);
5446 lt_fatal ("Memory exhausted");
5452 xstrdup (const char *string)
5454 return string ? strcpy ((char *) xmalloc (strlen (string) + 1), string) : NULL
5459 base_name (const char *name)
5463 #if defined (HAVE_DOS_BASED_FILE_SYSTEM)
5464 /* Skip over the disk name in MSDOS pathnames. */
5465 if (isalpha ((unsigned char)name[0]) && name[1] == ':')
5469 for (base = name; *name; name++)
5470 if (IS_DIR_SEPARATOR (*name))
5476 check_executable(const char * path)
5480 DEBUG("(check_executable) : %s\n", path ? (*path ? path : "EMPTY!") : "NULL!");
5481 if ((!path) || (!*path))
5484 if ((stat (path, &st) >= 0) &&
5486 /* MinGW & native WIN32 do not support S_IXOTH or S_IXGRP */
5487 #if defined (S_IXOTH)
5488 ((st.st_mode & S_IXOTH) == S_IXOTH) ||
5490 #if defined (S_IXGRP)
5491 ((st.st_mode & S_IXGRP) == S_IXGRP) ||
5493 ((st.st_mode & S_IXUSR) == S_IXUSR))
5500 /* Searches for the full path of the wrapper. Returns
5501 newly allocated full path name if found, NULL otherwise */
5503 find_executable (const char* wrapper)
5508 /* static buffer for getcwd */
5509 char tmp[LT_PATHMAX + 1];
5513 DEBUG("(find_executable) : %s\n", wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!");
5515 if ((wrapper == NULL) || (*wrapper == '\0'))
5518 /* Absolute path? */
5519 #if defined (HAVE_DOS_BASED_FILE_SYSTEM)
5520 if (isalpha ((unsigned char)wrapper[0]) && wrapper[1] == ':')
5522 concat_name = xstrdup (wrapper);
5523 if (check_executable(concat_name))
5530 if (IS_DIR_SEPARATOR (wrapper[0]))
5532 concat_name = xstrdup (wrapper);
5533 if (check_executable(concat_name))
5537 #if defined (HAVE_DOS_BASED_FILE_SYSTEM)
5541 for (p = wrapper; *p; p++)
5549 /* no slashes; search PATH */
5550 const char* path = getenv ("PATH");
5553 for (p = path; *p; p = p_next)
5557 for (q = p; *q; q++)
5558 if (IS_PATH_SEPARATOR(*q))
5561 p_next = (*q == '\0' ? q : q + 1);
5564 /* empty path: current directory */
5565 if (getcwd (tmp, LT_PATHMAX) == NULL)
5566 lt_fatal ("getcwd failed");
5567 tmp_len = strlen(tmp);
5568 concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1);
5569 memcpy (concat_name, tmp, tmp_len);
5570 concat_name[tmp_len] = '/';
5571 strcpy (concat_name + tmp_len + 1, wrapper);
5575 concat_name = XMALLOC(char, p_len + 1 + strlen(wrapper) + 1);
5576 memcpy (concat_name, p, p_len);
5577 concat_name[p_len] = '/';
5578 strcpy (concat_name + p_len + 1, wrapper);
5580 if (check_executable(concat_name))
5585 /* not found in PATH; assume curdir */
5587 /* Relative path | not found in path: prepend cwd */
5588 if (getcwd (tmp, LT_PATHMAX) == NULL)
5589 lt_fatal ("getcwd failed");
5590 tmp_len = strlen(tmp);
5591 concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1);
5592 memcpy (concat_name, tmp, tmp_len);
5593 concat_name[tmp_len] = '/';
5594 strcpy (concat_name + tmp_len + 1, wrapper);
5596 if (check_executable(concat_name))
5603 strendzap(char *str, const char *pat)
5607 assert(str != NULL);
5608 assert(pat != NULL);
5611 patlen = strlen(pat);
5615 str += len - patlen;
5616 if (strcmp(str, pat) == 0)
5623 lt_error_core (int exit_status, const char * mode,
5624 const char * message, va_list ap)
5626 fprintf (stderr, "%s: %s: ", program_name, mode);
5627 vfprintf (stderr, message, ap);
5628 fprintf (stderr, ".\n");
5630 if (exit_status >= 0)
5635 lt_fatal (const char *message, ...)
5638 va_start (ap, message);
5639 lt_error_core (EXIT_FAILURE, "FATAL", message, ap);
5643 # we should really use a build-platform specific compiler
5644 # here, but OTOH, the wrappers (shell script and this C one)
5645 # are only useful if you want to execute the "real" binary.
5646 # Since the "real" binary is built for $host, then this
5647 # wrapper might as well be built for $host, too.
5648 $run $LTCC $LTCFLAGS -s -o $cwrapper $cwrappersource
5652 trap "$rm $output; exit $EXIT_FAILURE" 1 2 15
5657 # $output - temporary wrapper script for $objdir/$outputname
5658 # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
5660 # The $output program cannot be directly executed until all the libtool
5661 # libraries that it depends on are installed.
5663 # This wrapper script should never be moved out of the build directory.
5664 # If it is, it will not operate correctly.
5666 # Sed substitution that helps us do robust quoting. It backslashifies
5667 # metacharacters that are still active within double-quoted strings.
5668 Xsed='${SED} -e 1s/^X//'
5669 sed_quote_subst='$sed_quote_subst'
5671 # Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE).
5672 if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then
5675 # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which
5676 # is contrary to our usage. Disable this feature.
5677 alias -g '\${1+\"\$@\"}'='\"\$@\"'
5678 setopt NO_GLOB_SUBST
5680 case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac
5682 BIN_SH=xpg4; export BIN_SH # for Tru64
5683 DUALCASE=1; export DUALCASE # for MKS sh
5685 # The HP-UX ksh and POSIX shell print the target directory to stdout
5687 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
5689 relink_command=\"$relink_command\"
5691 # This environment variable determines our operation mode.
5692 if test \"\$libtool_install_magic\" = \"$magic\"; then
5693 # install mode needs the following variable:
5694 notinst_deplibs='$notinst_deplibs'
5696 # When we are sourced in execute mode, \$file and \$echo are already set.
5697 if test \"\$libtool_execute_magic\" != \"$magic\"; then
5700 # Make sure echo works.
5701 if test \"X\$1\" = X--no-reexec; then
5702 # Discard the --no-reexec flag, and continue.
5704 elif test \"X\`(\$echo '\t') 2>/dev/null\`\" = 'X\t'; then
5705 # Yippee, \$echo works!
5708 # Restart under the correct shell, and then maybe \$echo will work.
5709 exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"}
5715 # Find the directory that this script lives in.
5716 thisdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\`
5717 test \"x\$thisdir\" = \"x\$file\" && thisdir=.
5719 # Follow symbolic links until we get to the real thisdir.
5720 file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\`
5721 while test -n \"\$file\"; do
5722 destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\`
5724 # If there was a directory component, then change thisdir.
5725 if test \"x\$destdir\" != \"x\$file\"; then
5726 case \"\$destdir\" in
5727 [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;;
5728 *) thisdir=\"\$thisdir/\$destdir\" ;;
5732 file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\`
5733 file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\`
5736 # Try to get the absolute directory name.
5737 absdir=\`cd \"\$thisdir\" && pwd\`
5738 test -n \"\$absdir\" && thisdir=\"\$absdir\"
5741 if test "$fast_install" = yes; then
5743 program=lt-'$outputname'$exeext
5744 progdir=\"\$thisdir/$objdir\"
5746 if test ! -f \"\$progdir/\$program\" || \\
5747 { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\
5748 test \"X\$file\" != \"X\$progdir/\$program\"; }; then
5750 file=\"\$\$-\$program\"
5752 if test ! -d \"\$progdir\"; then
5753 $mkdir \"\$progdir\"
5755 $rm \"\$progdir/\$file\"
5760 # relink executable if necessary
5761 if test -n \"\$relink_command\"; then
5762 if relink_command_output=\`eval \$relink_command 2>&1\`; then :
5764 $echo \"\$relink_command_output\" >&2
5765 $rm \"\$progdir/\$file\"
5770 $mv \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null ||
5771 { $rm \"\$progdir/\$program\";
5772 $mv \"\$progdir/\$file\" \"\$progdir/\$program\"; }
5773 $rm \"\$progdir/\$file\"
5777 program='$outputname'
5778 progdir=\"\$thisdir/$objdir\"
5784 if test -f \"\$progdir/\$program\"; then"
5786 # Export our shlibpath_var if we have one.
5787 if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
5789 # Add our own library path to $shlibpath_var
5790 $shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
5792 # Some systems cannot cope with colon-terminated $shlibpath_var
5793 # The second colon is a workaround for a bug in BeOS R4 sed
5794 $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\`
5796 export $shlibpath_var
5800 # fixup the dll searchpath if we need to.
5801 if test -n "$dllsearchpath"; then
5803 # Add the dll search path components to the executable PATH
5804 PATH=$dllsearchpath:\$PATH
5809 if test \"\$libtool_execute_magic\" != \"$magic\"; then
5810 # Run the actual program with our arguments.
5812 # Make sure env LD_LIBRARY_PATH does not mess us up
5813 if test -n \"\${LD_LIBRARY_PATH+set}\"; then
5814 export LD_LIBRARY_PATH=\$progdir:\$LD_LIBRARY_PATH
5818 # Backslashes separate directories on plain windows
5819 *-*-mingw | *-*-os2*)
5821 exec \"\$progdir\\\\\$program\" \${1+\"\$@\"}
5827 exec \"\$progdir/\$program\" \${1+\"\$@\"}
5832 \$echo \"\$0: cannot exec \$program \$*\"
5836 # The program doesn't exist.
5837 \$echo \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2
5838 \$echo \"This script is just a wrapper for \$program.\" 1>&2
5839 $echo \"See the $PACKAGE documentation for more information.\" 1>&2
5850 # See if we need to build an old-fashioned archive.
5851 for oldlib in $oldlibs; do
5853 if test "$build_libtool_libs" = convenience; then
5854 oldobjs="$libobjs_save"
5855 addlibs="$convenience"
5856 build_libtool_libs=no
5858 if test "$build_libtool_libs" = module; then
5859 oldobjs="$libobjs_save"
5860 build_libtool_libs=no
5862 oldobjs="$old_deplibs $non_pic_objects"
5864 addlibs="$old_convenience"
5867 if test -n "$addlibs"; then
5868 gentop="$output_objdir/${outputname}x"
5869 generated="$generated $gentop"
5871 func_extract_archives $gentop $addlibs
5872 oldobjs="$oldobjs $func_extract_archives_result"
5875 # Do each command in the archive commands.
5876 if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
5877 cmds=$old_archive_from_new_cmds
5879 # POSIX demands no paths to be encoded in archives. We have
5880 # to avoid creating archives with duplicate basenames if we
5881 # might have to extract them afterwards, e.g., when creating a
5882 # static archive out of a convenience library, or when linking
5883 # the entirety of a libtool archive into another (currently
5884 # not supported by libtool).
5885 if (for obj in $oldobjs
5887 $echo "X$obj" | $Xsed -e 's%^.*/%%'
5888 done | sort | sort -uc >/dev/null 2>&1); then
5891 $echo "copying selected object files to avoid basename conflicts..."
5893 if test -z "$gentop"; then
5894 gentop="$output_objdir/${outputname}x"
5895 generated="$generated $gentop"
5897 $show "${rm}r $gentop"
5898 $run ${rm}r "$gentop"
5899 $show "$mkdir $gentop"
5900 $run $mkdir "$gentop"
5902 if test "$exit_status" -ne 0 && test ! -d "$gentop"; then
5907 save_oldobjs=$oldobjs
5910 for obj in $save_oldobjs
5912 objbase=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
5913 case " $oldobjs " in
5914 " ") oldobjs=$obj ;;
5917 # Make sure we don't pick an alternate name that also
5919 newobj=lt$counter-$objbase
5920 counter=`expr $counter + 1`
5921 case " $oldobjs " in
5922 *[\ /]"$newobj "*) ;;
5923 *) if test ! -f "$gentop/$newobj"; then break; fi ;;
5926 $show "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj"
5927 $run ln "$obj" "$gentop/$newobj" ||
5928 $run cp "$obj" "$gentop/$newobj"
5929 oldobjs="$oldobjs $gentop/$newobj"
5931 *) oldobjs="$oldobjs $obj" ;;
5936 eval cmds=\"$old_archive_cmds\"
5938 if len=`expr "X$cmds" : ".*"` &&
5939 test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
5940 cmds=$old_archive_cmds
5942 # the command line is too long to link in one step, link in parts
5943 $echo "using piecewise archive linking..."
5948 save_oldobjs=$oldobjs
5950 # Is there a better way of finding the last object in the list?
5951 for obj in $save_oldobjs
5955 for obj in $save_oldobjs
5957 oldobjs="$objlist $obj"
5958 objlist="$objlist $obj"
5959 eval test_cmds=\"$old_archive_cmds\"
5960 if len=`expr "X$test_cmds" : ".*" 2>/dev/null` &&
5961 test "$len" -le "$max_cmd_len"; then
5964 # the above command should be used before it gets too long
5966 if test "$obj" = "$last_oldobj" ; then
5969 test -z "$concat_cmds" || concat_cmds=$concat_cmds~
5970 eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\"
5976 if test "X$oldobjs" = "X" ; then
5977 eval cmds=\"\$concat_cmds\"
5979 eval cmds=\"\$concat_cmds~\$old_archive_cmds\"
5983 save_ifs="$IFS"; IFS='~'
5984 for cmd in $cmds; do
5988 $run eval "$cmd" || exit $?
5993 if test -n "$generated"; then
5994 $show "${rm}r$generated"
5995 $run ${rm}r$generated
5998 # Now create the libtool archive.
6002 test "$build_old_libs" = yes && old_library="$libname.$libext"
6003 $show "creating $output"
6005 # Preserve any variables that may affect compiler behavior
6006 for var in $variables_saved_for_relink; do
6007 if eval test -z \"\${$var+set}\"; then
6008 relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command"
6009 elif eval var_value=\$$var; test -z "$var_value"; then
6010 relink_command="$var=; export $var; $relink_command"
6012 var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"`
6013 relink_command="$var=\"$var_value\"; export $var; $relink_command"
6016 # Quote the link command for shipping.
6017 relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
6018 relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP`
6019 if test "$hardcode_automatic" = yes ; then
6024 # Only create the output if not a dry run.
6025 if test -z "$run"; then
6026 for installed in no yes; do
6027 if test "$installed" = yes; then
6028 if test -z "$install_libdir"; then
6031 output="$output_objdir/$outputname"i
6032 # Replace all uninstalled libtool libraries with the installed ones
6034 for deplib in $dependency_libs; do
6037 name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'`
6038 eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
6039 if test -z "$libdir"; then
6040 $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
6043 if test "X$EGREP" = X ; then
6046 # We do not want portage's install root ($D) present. Check only for
6047 # this if the .la is being installed.
6048 if test "$installed" = yes && test "$D"; then
6049 eval mynewdependency_lib=`echo "$libdir/$name" |sed -e "s:$D:/:g" -e 's:/\+:/:g'`
6051 mynewdependency_lib="$libdir/$name"
6053 # Do not add duplicates
6054 if test "$mynewdependency_lib"; then
6055 my_little_ninja_foo_1=`echo $newdependency_libs |$EGREP -e "$mynewdependency_lib"`
6056 if test -z "$my_little_ninja_foo_1"; then
6057 newdependency_libs="$newdependency_libs $mynewdependency_lib"
6062 if test "$installed" = yes; then
6063 # Rather use S=WORKDIR if our version of portage supports it.
6064 # This is because some ebuild (gcc) do not use $S as buildroot.
6065 if test "$PWORKDIR"; then
6068 # We do not want portage's build root ($S) present.
6069 my_little_ninja_foo_2=`echo $deplib |$EGREP -e "$S"`
6070 # We do not want portage's install root ($D) present.
6071 my_little_ninja_foo_3=`echo $deplib |$EGREP -e "$D"`
6072 if test -n "$my_little_ninja_foo_2" && test "$S"; then
6073 mynewdependency_lib=""
6074 elif test -n "$my_little_ninja_foo_3" && test "$D"; then
6075 eval mynewdependency_lib=`echo "$deplib" |sed -e "s:$D:/:g" -e 's:/\+:/:g'`
6077 mynewdependency_lib="$deplib"
6080 mynewdependency_lib="$deplib"
6082 # Do not add duplicates
6083 if test "$mynewdependency_lib"; then
6084 my_little_ninja_foo_4=`echo $newdependency_libs |$EGREP -e "$mynewdependency_lib"`
6085 if test -z "$my_little_ninja_foo_4"; then
6086 newdependency_libs="$newdependency_libs $mynewdependency_lib"
6092 dependency_libs="$newdependency_libs"
6094 for lib in $dlfiles; do
6095 name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
6096 eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
6097 if test -z "$libdir"; then
6098 $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
6101 newdlfiles="$newdlfiles $libdir/$name"
6103 dlfiles="$newdlfiles"
6105 for lib in $dlprefiles; do
6106 name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
6107 eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
6108 if test -z "$libdir"; then
6109 $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
6112 newdlprefiles="$newdlprefiles $libdir/$name"
6114 dlprefiles="$newdlprefiles"
6117 for lib in $dlfiles; do
6119 [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
6120 *) abs=`pwd`"/$lib" ;;
6122 newdlfiles="$newdlfiles $abs"
6124 dlfiles="$newdlfiles"
6126 for lib in $dlprefiles; do
6128 [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
6129 *) abs=`pwd`"/$lib" ;;
6131 newdlprefiles="$newdlprefiles $abs"
6133 dlprefiles="$newdlprefiles"
6136 # place dlname in correct position for cygwin
6138 case $host,$output,$installed,$module,$dlname in
6139 *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;;
6141 # Do not add duplicates
6142 if test "$installed" = yes && test "$D"; then
6143 install_libdir=`echo "$install_libdir" |sed -e "s:$D:/:g" -e 's:/\+:/:g'`
6146 # $outputname - a libtool library file
6147 # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
6149 # Please DO NOT delete this file!
6150 # It is necessary for linking the library.
6152 # The name that we can dlopen(3).
6155 # Names of this library.
6156 library_names='$library_names'
6158 # The name of the static archive.
6159 old_library='$old_library'
6161 # Libraries that this one depends upon.
6162 dependency_libs='$dependency_libs'
6164 # Version information for $libname.
6169 # Is this an already installed library?
6170 installed=$installed
6172 # Should we warn about portability when linking against -modules?
6173 shouldnotlink=$module
6175 # Files to dlopen/dlpreopen
6177 dlpreopen='$dlprefiles'
6179 # Directory that this library needs to be installed in:
6180 libdir='$install_libdir'"
6181 if test "$installed" = no && test "$need_relink" = yes; then
6183 relink_command=\"$relink_command\""
6188 # Do a symbolic link so that the libtool archive can be found in
6189 # LD_LIBRARY_PATH before the program is installed.
6190 $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)"
6191 $run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' || exit $?
6197 # libtool install mode
6199 modename="$modename: install"
6201 # There may be an optional sh(1) argument at the beginning of
6202 # install_prog (especially on Windows NT).
6203 if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh ||
6204 # Allow the use of GNU shtool's install command.
6205 $echo "X$nonopt" | grep shtool > /dev/null; then
6206 # Aesthetically quote it.
6207 arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"`
6209 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
6213 install_prog="$arg "
6221 # The real first argument should be the name of the installation program.
6222 # Aesthetically quote it.
6223 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
6225 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
6229 install_prog="$install_prog$arg"
6231 # We need to accept at least all the BSD install flags.
6241 if test -n "$dest"; then
6242 files="$files $dest"
6250 case " $install_prog " in
6255 -g | -m | -o) prev=$arg ;;
6263 # If the previous option needed an argument, then skip it.
6264 if test -n "$prev"; then
6273 # Aesthetically quote the argument.
6274 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
6276 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
6280 install_prog="$install_prog $arg"
6283 if test -z "$install_prog"; then
6284 $echo "$modename: you must specify an install program" 1>&2
6289 if test -n "$prev"; then
6290 $echo "$modename: the \`$prev' option requires an argument" 1>&2
6295 if test -z "$files"; then
6296 if test -z "$dest"; then
6297 $echo "$modename: no file or destination specified" 1>&2
6299 $echo "$modename: you must specify a destination" 1>&2
6305 # Strip any trailing slash from the destination.
6306 dest=`$echo "X$dest" | $Xsed -e 's%/$%%'`
6308 # Check to see that the destination is a directory.
6309 test -d "$dest" && isdir=yes
6310 if test "$isdir" = yes; then
6314 destdir=`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'`
6315 test "X$destdir" = "X$dest" && destdir=.
6316 destname=`$echo "X$dest" | $Xsed -e 's%^.*/%%'`
6318 # Not a directory, so check to see that there is only one file specified.
6320 if test "$#" -gt 2; then
6321 $echo "$modename: \`$dest' is not a directory" 1>&2
6327 [\\/]* | [A-Za-z]:[\\/]*) ;;
6329 for file in $files; do
6333 $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2
6342 # This variable tells wrapper scripts just to set variables rather
6343 # than running their programs.
6344 libtool_install_magic="$magic"
6349 for file in $files; do
6351 # Do each installation.
6354 # Do the static libraries later.
6355 staticlibs="$staticlibs $file"
6359 # Check to see that this really is a libtool archive.
6360 if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
6362 $echo "$modename: \`$file' is not a valid libtool archive" 1>&2
6370 # If there is no directory component, then add one.
6372 */* | *\\*) . $file ;;
6376 # Add the libdir to current_libdirs if it is the destination.
6377 if test "X$destdir" = "X$libdir"; then
6378 case "$current_libdirs " in
6380 *) current_libdirs="$current_libdirs $libdir" ;;
6383 # Note the libdir as a future libdir.
6384 case "$future_libdirs " in
6386 *) future_libdirs="$future_libdirs $libdir" ;;
6390 dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/
6391 test "X$dir" = "X$file/" && dir=
6394 if test -n "$relink_command"; then
6395 # Determine the prefix the user has applied to our future dir.
6396 inst_prefix_dir=`$echo "$destdir" | $SED "s%$libdir\$%%"`
6398 # Don't allow the user to place us outside of our expected
6399 # location b/c this prevents finding dependent libraries that
6400 # are installed to the same prefix.
6401 # At present, this check doesn't affect windows .dll's that
6402 # are installed into $libdir/../bin (currently, that works fine)
6403 # but it's something to keep an eye on.
6404 if test "$inst_prefix_dir" = "$destdir"; then
6405 $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2
6409 if test -n "$inst_prefix_dir"; then
6410 # Stick the inst_prefix_dir data into the link command.
6411 relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%" | $NL2SP`
6413 relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%%" | $NL2SP`
6416 $echo "$modename: warning: relinking \`$file'" 1>&2
6417 $show "$relink_command"
6418 if $run eval "$relink_command"; then :
6420 $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
6425 # See the names of the shared library.
6426 set dummy $library_names
6427 if test -n "$2"; then
6433 test -n "$relink_command" && srcname="$realname"T
6435 # Install the shared library and build the symlinks.
6436 $show "$install_prog $dir/$srcname $destdir/$realname"
6437 $run eval "$install_prog $dir/$srcname $destdir/$realname" || exit $?
6438 if test -n "$stripme" && test -n "$striplib"; then
6439 $show "$striplib $destdir/$realname"
6440 $run eval "$striplib $destdir/$realname" || exit $?
6443 if test "$#" -gt 0; then
6444 # Delete the old symlinks, and create new ones.
6445 # Try `ln -sf' first, because the `ln' binary might depend on
6446 # the symlink we replace! Solaris /bin/ln does not understand -f,
6447 # so we also need to try rm && ln -s.
6450 if test "$linkname" != "$realname"; then
6451 $show "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })"
6452 $run eval "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })"
6457 # Do each command in the postinstall commands.
6458 lib="$destdir/$realname"
6459 cmds=$postinstall_cmds
6460 save_ifs="$IFS"; IFS='~'
6461 for cmd in $cmds; do
6465 $run eval "$cmd" || {
6468 # Restore the uninstalled library and exit
6469 if test "$mode" = relink; then
6470 $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)'
6479 # Install the pseudo-library for information purposes.
6480 name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
6481 instname="$dir/$name"i
6482 $show "$install_prog $instname $destdir/$name"
6483 $run eval "$install_prog $instname $destdir/$name" || exit $?
6485 # Maybe install the static library, too.
6486 test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library"
6490 # Install (i.e. copy) a libtool object.
6492 # Figure out destination file name, if it wasn't already specified.
6493 if test -n "$destname"; then
6494 destfile="$destdir/$destname"
6496 destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
6497 destfile="$destdir/$destfile"
6500 # Deduce the name of the destination old-style object file.
6503 staticdest=`$echo "X$destfile" | $Xsed -e "$lo2o"`
6506 staticdest="$destfile"
6510 $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2
6516 # Install the libtool object if requested.
6517 if test -n "$destfile"; then
6518 $show "$install_prog $file $destfile"
6519 $run eval "$install_prog $file $destfile" || exit $?
6522 # Install the old object if enabled.
6523 if test "$build_old_libs" = yes; then
6524 # Deduce the name of the old-style object file.
6525 staticobj=`$echo "X$file" | $Xsed -e "$lo2o"`
6527 $show "$install_prog $staticobj $staticdest"
6528 $run eval "$install_prog \$staticobj \$staticdest" || exit $?
6534 # Figure out destination file name, if it wasn't already specified.
6535 if test -n "$destname"; then
6536 destfile="$destdir/$destname"
6538 destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
6539 destfile="$destdir/$destfile"
6542 # If the file is missing, and there is a .exe on the end, strip it
6543 # because it is most likely a libtool script we actually want to
6548 if test ! -f "$file"; then
6549 file=`$echo $file|${SED} 's,.exe$,,'`
6555 # Do a test to see if this is really a libtool program.
6558 wrapper=`$echo $file | ${SED} -e 's,.exe$,,'`
6564 if (${SED} -e '4q' $wrapper | grep "^# Generated by .*$PACKAGE")>/dev/null 2>&1; then
6568 # Note that it is not necessary on cygwin/mingw to append a dot to
6569 # foo even if both foo and FILE.exe exist: automatic-append-.exe
6570 # behavior happens only for exec(3), not for open(2)! Also, sourcing
6571 # `FILE.' does not work on cygwin managed mounts.
6573 # If there is no directory component, then add one.
6575 */* | *\\*) . ${wrapper} ;;
6576 *) . ./${wrapper} ;;
6579 # Check the variables that should have been set.
6580 if test -z "$notinst_deplibs"; then
6581 $echo "$modename: invalid libtool wrapper script \`$wrapper'" 1>&2
6586 for lib in $notinst_deplibs; do
6587 # Check to see that each library is installed.
6589 if test -f "$lib"; then
6590 # If there is no directory component, then add one.
6592 */* | *\\*) . $lib ;;
6596 libfile="$libdir/"`$echo "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test
6597 if test -n "$libdir" && test ! -f "$libfile"; then
6598 $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2
6604 # Note that it is not necessary on cygwin/mingw to append a dot to
6605 # foo even if both foo and FILE.exe exist: automatic-append-.exe
6606 # behavior happens only for exec(3), not for open(2)! Also, sourcing
6607 # `FILE.' does not work on cygwin managed mounts.
6609 # If there is no directory component, then add one.
6611 */* | *\\*) . ${wrapper} ;;
6612 *) . ./${wrapper} ;;
6616 if test "$fast_install" = no && test -n "$relink_command"; then
6617 if test "$finalize" = yes && test -z "$run"; then
6618 tmpdir=`func_mktempdir`
6619 file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'`
6620 outputname="$tmpdir/$file"
6621 # Replace the output file specification.
6622 relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g' | $NL2SP`
6624 $show "$relink_command"
6625 if $run eval "$relink_command"; then :
6627 $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
6633 $echo "$modename: warning: cannot relink \`$file'" 1>&2
6636 # Install the binary that we compiled earlier.
6637 file=`$echo "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"`
6641 # remove .exe since cygwin /usr/bin/install will append another
6643 case $install_prog,$host in
6644 */usr/bin/install*,*cygwin*)
6645 case $file:$destfile in
6650 destfile=$destfile.exe
6653 destfile=`$echo $destfile | ${SED} -e 's,.exe$,,'`
6658 $show "$install_prog$stripme $file $destfile"
6659 $run eval "$install_prog\$stripme \$file \$destfile" || exit $?
6660 test -n "$outputname" && ${rm}r "$tmpdir"
6665 for file in $staticlibs; do
6666 name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
6668 # Set up the ranlib parameters.
6669 oldlib="$destdir/$name"
6671 $show "$install_prog $file $oldlib"
6672 $run eval "$install_prog \$file \$oldlib" || exit $?
6674 if test -n "$stripme" && test -n "$old_striplib"; then
6675 $show "$old_striplib $oldlib"
6676 $run eval "$old_striplib $oldlib" || exit $?
6679 # Do each command in the postinstall commands.
6680 cmds=$old_postinstall_cmds
6681 save_ifs="$IFS"; IFS='~'
6682 for cmd in $cmds; do
6686 $run eval "$cmd" || exit $?
6691 if test -n "$future_libdirs"; then
6692 $echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2
6695 if test -n "$current_libdirs"; then
6696 # Maybe just do a dry run.
6697 test -n "$run" && current_libdirs=" -n$current_libdirs"
6698 exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs'
6704 # libtool finish mode
6706 modename="$modename: finish"
6710 if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
6713 libdirs="$libdirs $dir"
6716 for libdir in $libdirs; do
6717 if test -n "$finish_cmds"; then
6718 # Do each command in the finish commands.
6720 save_ifs="$IFS"; IFS='~'
6721 for cmd in $cmds; do
6725 $run eval "$cmd" || admincmds="$admincmds
6730 if test -n "$finish_eval"; then
6731 # Do the single finish_eval.
6732 eval cmds=\"$finish_eval\"
6733 $run eval "$cmds" || admincmds="$admincmds
6739 # Exit here if they wanted silent mode.
6740 test "$show" = : && exit $EXIT_SUCCESS
6742 $echo "X----------------------------------------------------------------------" | $Xsed
6743 $echo "Libraries have been installed in:"
6744 for libdir in $libdirs; do
6748 $echo "If you ever happen to want to link against installed libraries"
6749 $echo "in a given directory, LIBDIR, you must either use libtool, and"
6750 $echo "specify the full pathname of the library, or use the \`-LLIBDIR'"
6751 $echo "flag during linking and do at least one of the following:"
6752 if test -n "$shlibpath_var"; then
6753 $echo " - add LIBDIR to the \`$shlibpath_var' environment variable"
6754 $echo " during execution"
6756 if test -n "$runpath_var"; then
6757 $echo " - add LIBDIR to the \`$runpath_var' environment variable"
6758 $echo " during linking"
6760 if test -n "$hardcode_libdir_flag_spec"; then
6762 eval flag=\"$hardcode_libdir_flag_spec\"
6764 $echo " - use the \`$flag' linker flag"
6766 if test -n "$admincmds"; then
6767 $echo " - have your system administrator run these commands:$admincmds"
6769 if test -f /etc/ld.so.conf; then
6770 $echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
6773 $echo "See any operating system documentation about shared libraries for"
6774 $echo "more information, such as the ld(1) and ld.so(8) manual pages."
6775 $echo "X----------------------------------------------------------------------" | $Xsed
6779 # libtool execute mode
6781 modename="$modename: execute"
6783 # The first argument is the command name.
6785 if test -z "$cmd"; then
6786 $echo "$modename: you must specify a COMMAND" 1>&2
6791 # Handle -dlopen flags immediately.
6792 for file in $execute_dlfiles; do
6793 if test ! -f "$file"; then
6794 $echo "$modename: \`$file' is not a file" 1>&2
6802 # Check to see that this really is a libtool archive.
6803 if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
6805 $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
6810 # Read the libtool library.
6814 # If there is no directory component, then add one.
6816 */* | *\\*) . $file ;;
6820 # Skip this library if it cannot be dlopened.
6821 if test -z "$dlname"; then
6822 # Warn if it was a shared library.
6823 test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'"
6827 dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
6828 test "X$dir" = "X$file" && dir=.
6830 if test -f "$dir/$objdir/$dlname"; then
6833 if test ! -f "$dir/$dlname"; then
6834 $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2
6841 # Just add the directory containing the .lo file.
6842 dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
6843 test "X$dir" = "X$file" && dir=.
6847 $echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2
6852 # Get the absolute pathname.
6853 absdir=`cd "$dir" && pwd`
6854 test -n "$absdir" && dir="$absdir"
6856 # Now add the directory to shlibpath_var.
6857 if eval "test -z \"\$$shlibpath_var\""; then
6858 eval "$shlibpath_var=\"\$dir\""
6860 eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\""
6864 # This variable tells wrapper scripts just to set shlibpath_var
6865 # rather than running their programs.
6866 libtool_execute_magic="$magic"
6868 # Check if any of the arguments is a wrapper script.
6875 # Do a test to see if this is really a libtool program.
6876 if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
6877 # If there is no directory component, then add one.
6879 */* | *\\*) . $file ;;
6883 # Transform arg to wrapped name.
6884 file="$progdir/$program"
6888 # Quote arguments (to preserve shell metacharacters).
6889 file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"`
6890 args="$args \"$file\""
6893 if test -z "$run"; then
6894 if test -n "$shlibpath_var"; then
6895 # Export the shlibpath_var.
6896 eval "export $shlibpath_var"
6899 # Restore saved environment variables
6900 for lt_var in LANG LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
6902 eval "if test \"\${save_$lt_var+set}\" = set; then
6903 $lt_var=\$save_$lt_var; export $lt_var
6907 # Now prepare to actually exec the command.
6908 exec_cmd="\$cmd$args"
6910 # Display what would be done.
6911 if test -n "$shlibpath_var"; then
6912 eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\""
6913 $echo "export $shlibpath_var"
6920 # libtool clean and uninstall mode
6922 modename="$modename: $mode"
6928 # This variable tells wrapper scripts just to set variables rather
6929 # than running their programs.
6930 libtool_install_magic="$magic"
6935 -f) rm="$rm $arg"; rmforce=yes ;;
6936 -*) rm="$rm $arg" ;;
6937 *) files="$files $arg" ;;
6941 if test -z "$rm"; then
6942 $echo "$modename: you must specify an RM program" 1>&2
6949 origobjdir="$objdir"
6950 for file in $files; do
6951 dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
6952 if test "X$dir" = "X$file"; then
6954 objdir="$origobjdir"
6956 objdir="$dir/$origobjdir"
6958 name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
6959 test "$mode" = uninstall && objdir="$dir"
6961 # Remember objdir for removal later, being careful to avoid duplicates
6962 if test "$mode" = clean; then
6965 *) rmdirs="$rmdirs $objdir" ;;
6969 # Don't error if the file doesn't exist and rm -f was used.
6970 if (test -L "$file") >/dev/null 2>&1 \
6971 || (test -h "$file") >/dev/null 2>&1 \
6972 || test -f "$file"; then
6974 elif test -d "$file"; then
6977 elif test "$rmforce" = yes; then
6985 # Possibly a libtool archive, so verify it.
6986 if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
6989 # Delete the libtool libraries and symlinks.
6990 for n in $library_names; do
6991 rmfiles="$rmfiles $objdir/$n"
6993 test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library"
6997 case " $library_names " in
6998 # " " in the beginning catches empty $dlname
7000 *) rmfiles="$rmfiles $objdir/$dlname" ;;
7002 test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i"
7005 if test -n "$library_names"; then
7006 # Do each command in the postuninstall commands.
7007 cmds=$postuninstall_cmds
7008 save_ifs="$IFS"; IFS='~'
7009 for cmd in $cmds; do
7014 if test "$?" -ne 0 && test "$rmforce" != yes; then
7021 if test -n "$old_library"; then
7022 # Do each command in the old_postuninstall commands.
7023 cmds=$old_postuninstall_cmds
7024 save_ifs="$IFS"; IFS='~'
7025 for cmd in $cmds; do
7030 if test "$?" -ne 0 && test "$rmforce" != yes; then
7036 # FIXME: should reinstall the best remaining shared library.
7043 # Possibly a libtool object, so verify it.
7044 if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
7049 # Add PIC object to the list of files to remove.
7050 if test -n "$pic_object" \
7051 && test "$pic_object" != none; then
7052 rmfiles="$rmfiles $dir/$pic_object"
7055 # Add non-PIC object to the list of files to remove.
7056 if test -n "$non_pic_object" \
7057 && test "$non_pic_object" != none; then
7058 rmfiles="$rmfiles $dir/$non_pic_object"
7064 if test "$mode" = clean ; then
7068 file=`$echo $file|${SED} 's,.exe$,,'`
7069 noexename=`$echo $name|${SED} 's,.exe$,,'`
7070 # $file with .exe has already been added to rmfiles,
7071 # add $file without .exe
7072 rmfiles="$rmfiles $file"
7075 # Do a test to see if this is a libtool program.
7076 if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
7080 # note $name still contains .exe if it was in $file originally
7081 # as does the version of $file that was added into $rmfiles
7082 rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}"
7083 if test "$fast_install" = yes && test -n "$relink_command"; then
7084 rmfiles="$rmfiles $objdir/lt-$name"
7086 if test "X$noexename" != "X$name" ; then
7087 rmfiles="$rmfiles $objdir/lt-${noexename}.c"
7093 $show "$rm $rmfiles"
7094 $run $rm $rmfiles || exit_status=1
7096 objdir="$origobjdir"
7098 # Try to remove the ${objdir}s in the directories where we deleted files
7099 for dir in $rmdirs; do
7100 if test -d "$dir"; then
7102 $run rmdir $dir >/dev/null 2>&1
7110 $echo "$modename: you must specify a MODE" 1>&2
7111 $echo "$generic_help" 1>&2
7116 if test -z "$exec_cmd"; then
7117 $echo "$modename: invalid operation mode \`$mode'" 1>&2
7118 $echo "$generic_help" 1>&2
7121 fi # test -z "$show_help"
7123 if test -n "$exec_cmd"; then
7128 # We need to display help for each of the modes.
7131 "Usage: $modename [OPTION]... [MODE-ARG]...
7133 Provide generalized library-building support services.
7135 --config show all configuration variables
7136 --debug enable verbose shell tracing
7137 -n, --dry-run display commands without modifying any files
7138 --features display basic configuration information and exit
7139 --finish same as \`--mode=finish'
7140 --help display this help message and exit
7141 --mode=MODE use operation mode MODE [default=inferred from MODE-ARGS]
7142 --quiet same as \`--silent'
7143 --silent don't print informational messages
7144 --tag=TAG use configuration variables from tag TAG
7145 --version print version information
7147 MODE must be one of the following:
7149 clean remove files from the build directory
7150 compile compile a source file into a libtool object
7151 execute automatically set library path, then run a program
7152 finish complete the installation of libtool libraries
7153 install install libraries or executables
7154 link create a library or an executable
7155 uninstall remove libraries from an installed directory
7157 MODE-ARGS vary depending on the MODE. Try \`$modename --help --mode=MODE' for
7158 a more detailed description of MODE.
7160 Report bugs to <bug-libtool@gnu.org>."
7166 "Usage: $modename [OPTION]... --mode=clean RM [RM-OPTION]... FILE...
7168 Remove files from the build directory.
7170 RM is the name of the program to use to delete files associated with each FILE
7171 (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed
7174 If FILE is a libtool library, object or program, all the files associated
7175 with it are deleted. Otherwise, only FILE itself is deleted using RM."
7180 "Usage: $modename [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE
7182 Compile a source file into a libtool library object.
7184 This mode accepts the following additional options:
7186 -o OUTPUT-FILE set the output file name to OUTPUT-FILE
7187 -prefer-pic try to building PIC objects only
7188 -prefer-non-pic try to building non-PIC objects only
7189 -static always build a \`.o' file suitable for static linking
7191 COMPILE-COMMAND is a command to be used in creating a \`standard' object file
7192 from the given SOURCEFILE.
7194 The output file name is determined by removing the directory component from
7195 SOURCEFILE, then substituting the C source code suffix \`.c' with the
7196 library object suffix, \`.lo'."
7201 "Usage: $modename [OPTION]... --mode=execute COMMAND [ARGS]...
7203 Automatically set library path, then run a program.
7205 This mode accepts the following additional options:
7207 -dlopen FILE add the directory containing FILE to the library path
7209 This mode sets the library path environment variable according to \`-dlopen'
7212 If any of the ARGS are libtool executable wrappers, then they are translated
7213 into their corresponding uninstalled binary, and any of their required library
7214 directories are added to the library path.
7216 Then, COMMAND is executed, with ARGS as arguments."
7221 "Usage: $modename [OPTION]... --mode=finish [LIBDIR]...
7223 Complete the installation of libtool libraries.
7225 Each LIBDIR is a directory that contains libtool libraries.
7227 The commands that this mode executes may require superuser privileges. Use
7228 the \`--dry-run' option if you just want to see what would be executed."
7233 "Usage: $modename [OPTION]... --mode=install INSTALL-COMMAND...
7235 Install executables or libraries.
7237 INSTALL-COMMAND is the installation command. The first component should be
7238 either the \`install' or \`cp' program.
7240 The rest of the components are interpreted as arguments to that command (only
7241 BSD-compatible install options are recognized)."
7246 "Usage: $modename [OPTION]... --mode=link LINK-COMMAND...
7248 Link object files or libraries together to form another library, or to
7249 create an executable program.
7251 LINK-COMMAND is a command using the C compiler that you would use to create
7252 a program from several object files.
7254 The following components of LINK-COMMAND are treated specially:
7256 -all-static do not do any dynamic linking at all
7257 -avoid-version do not add a version suffix if possible
7258 -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime
7259 -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols
7260 -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
7261 -export-symbols SYMFILE
7262 try to export only the symbols listed in SYMFILE
7263 -export-symbols-regex REGEX
7264 try to export only the symbols matching REGEX
7265 -LLIBDIR search LIBDIR for required installed libraries
7266 -lNAME OUTPUT-FILE requires the installed library libNAME
7267 -module build a library that can dlopened
7268 -no-fast-install disable the fast-install mode
7269 -no-install link a not-installable executable
7270 -no-undefined declare that a library does not refer to external symbols
7271 -o OUTPUT-FILE create OUTPUT-FILE from the specified objects
7272 -objectlist FILE Use a list of object files found in FILE to specify objects
7273 -precious-files-regex REGEX
7274 don't remove output files matching REGEX
7275 -release RELEASE specify package release information
7276 -rpath LIBDIR the created library will eventually be installed in LIBDIR
7277 -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries
7278 -static do not do any dynamic linking of uninstalled libtool libraries
7279 -static-libtool-libs
7280 do not do any dynamic linking of libtool libraries
7281 -version-info CURRENT[:REVISION[:AGE]]
7282 specify library version info [each variable defaults to 0]
7284 All other options (arguments beginning with \`-') are ignored.
7286 Every other argument is treated as a filename. Files ending in \`.la' are
7287 treated as uninstalled libtool libraries, other files are standard or library
7290 If the OUTPUT-FILE ends in \`.la', then a libtool library is created,
7291 only library objects (\`.lo' files) may be specified, and \`-rpath' is
7292 required, except when creating a convenience library.
7294 If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created
7295 using \`ar' and \`ranlib', or on Windows using \`lib'.
7297 If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file
7298 is created, otherwise an executable program is created."
7303 "Usage: $modename [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE...
7305 Remove libraries from an installation directory.
7307 RM is the name of the program to use to delete files associated with each FILE
7308 (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed
7311 If FILE is a libtool library, all the files associated with it are deleted.
7312 Otherwise, only FILE itself is deleted using RM."
7316 $echo "$modename: invalid operation mode \`$mode'" 1>&2
7323 $echo "Try \`$modename --help' for more information about other modes."
7327 # The TAGs below are defined such that we never get into a situation
7328 # in which we disable both kinds of libraries. Given conflicting
7329 # choices, we go for a static library, that is the most portable,
7330 # since we can't tell whether shared libraries were disabled because
7331 # the user asked for that or because the platform doesn't support
7332 # them. This is particularly important on AIX, because we don't
7333 # support having both static and shared libraries enabled at the same
7334 # time on that platform, so we default to a shared-only configuration.
7335 # If a disable-shared tag is given, we'll fallback to a static-only
7336 # configuration. But we'll never go from static-only to shared-only.
7338 # ### BEGIN LIBTOOL TAG CONFIG: disable-shared
7340 # ### END LIBTOOL TAG CONFIG: disable-shared
7342 # ### BEGIN LIBTOOL TAG CONFIG: disable-static
7344 # ### END LIBTOOL TAG CONFIG: disable-static
7350 # ### BEGIN LIBTOOL TAG CONFIG: CXX
7352 # Libtool was configured on host laserbeak:
7354 # Shell to use when invoking shell scripts.
7357 # Whether or not to build shared libraries.
7358 build_libtool_libs=yes
7360 # Whether or not to build static libraries.
7363 # Whether or not to add -lc for building shared libraries.
7364 build_libtool_need_lc=no
7366 # Whether or not to disallow shared libs when runtime libs are static
7367 allow_libtool_libs_with_static_runtimes=no
7369 # Whether or not to optimize for fast installation.
7374 host=i686-pc-linux-gnu
7379 build=i686-pc-linux-gnu
7382 # An echo program that does not interpret backslashes.
7392 # LTCC compiler flags.
7395 # A language-specific compiler.
7398 # Is the compiler the GNU C compiler?
7402 EGREP="/bin/grep -E"
7404 # The linker used to build libraries.
7405 LD="/usr/i686-pc-linux-gnu/bin/ld"
7407 # Whether we need hard or soft links.
7410 # A BSD-compatible nm program.
7413 # A symbol stripping program
7416 # Used to examine libraries when file_magic_cmd begins "file"
7419 # Used on cygwin: DLL creation program.
7422 # Used on cygwin: object dumper.
7425 # Used on cygwin: assembler.
7428 # The name of the directory that contains temporary libtool files.
7431 # How to create reloadable object files.
7433 reload_cmds="\$LD\$reload_flag -o \$output\$reload_objs"
7435 # How to pass a linker flag through the compiler.
7438 # Object file suffix (normally "o").
7441 # Old archive suffix (normally "a").
7444 # Shared library suffix (normally ".so").
7447 # Executable file suffix (normally "").
7450 # Additional compiler flags for building library objects.
7451 pic_flag=" -fPIC -DPIC"
7454 # What is the maximum length of a command?
7457 # Does compiler simultaneously support -c and -o options?
7460 # Must we lock files when doing compilation?
7463 # Do we need the lib prefix for modules?
7466 # Do we need a version for libraries?
7469 # Whether dlopen is supported.
7470 dlopen_support=unknown
7472 # Whether dlopen of programs is supported.
7475 # Whether dlopen of statically linked programs is supported.
7476 dlopen_self_static=unknown
7478 # Compiler flag to prevent dynamic linking.
7479 link_static_flag="-static"
7481 # Compiler flag to turn off builtin functions.
7482 no_builtin_flag=" -fno-builtin"
7484 # Compiler flag to allow reflexive dlopens.
7485 export_dynamic_flag_spec="\${wl}--export-dynamic"
7487 # Compiler flag to generate shared objects directly from archives.
7488 whole_archive_flag_spec="\${wl}--whole-archive\$convenience \${wl}--no-whole-archive"
7490 # Compiler flag to generate thread-safe objects.
7491 thread_safe_flag_spec=""
7493 # Library versioning type.
7496 # Format of library name prefix.
7497 libname_spec="lib\$name"
7499 # List of archive names. First name is the real one, the rest are links.
7500 # The last name is the one that the linker finds with -lNAME.
7501 library_names_spec="\${libname}\${release}\${shared_ext}\$versuffix \${libname}\${release}\${shared_ext}\$major \$libname\${shared_ext}"
7503 # The coded name of the library, if different from the real name.
7504 soname_spec="\${libname}\${release}\${shared_ext}\$major"
7506 # Commands used to build and install an old-style archive.
7508 old_archive_cmds="\$AR \$AR_FLAGS \$oldlib\$oldobjs~\$RANLIB \$oldlib"
7509 old_postinstall_cmds="chmod 644 \$oldlib~\$RANLIB \$oldlib"
7510 old_postuninstall_cmds=""
7512 # Create an old-style archive from a shared archive.
7513 old_archive_from_new_cmds=""
7515 # Create a temporary old-style archive to link instead of a shared archive.
7516 old_archive_from_expsyms_cmds=""
7518 # Commands used to build and install a shared archive.
7519 archive_cmds="\$CC -shared -nostdlib \$predep_objects \$libobjs \$deplibs \$postdep_objects \$compiler_flags \${wl}-soname \$wl\$soname -o \$lib"
7520 archive_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"
7522 postuninstall_cmds=""
7524 # Commands used to build a loadable module (assumed same as above if empty)
7526 module_expsym_cmds=""
7528 # Commands to strip libraries.
7529 old_striplib="strip --strip-debug"
7530 striplib="strip --strip-unneeded"
7532 # Dependencies to place before the objects being linked to create a
7534 predep_objects="/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/../../../crti.o /usr/lib/gcc/i686-pc-linux-gnu/4.1.2/crtbeginS.o"
7536 # Dependencies to place after the objects being linked to create a
7538 postdep_objects="/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/crtendS.o /usr/lib/gcc/i686-pc-linux-gnu/4.1.2/../../../crtn.o"
7540 # Dependencies to place before the objects being linked to create a
7544 # Dependencies to place after the objects being linked to create a
7546 postdeps="-lstdc++ -lm -lgcc_s -lc -lgcc_s"
7548 # The library search path used internally by the compiler when linking
7550 compiler_lib_search_path="-L/usr/lib/gcc/i686-pc-linux-gnu/4.1.2 -L/usr/lib/gcc/i686-pc-linux-gnu/4.1.2 -L/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/../../../../i686-pc-linux-gnu/lib -L/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/../../.."
7552 # Method to check whether dependent libraries are shared objects.
7553 deplibs_check_method="pass_all"
7555 # Command to use when deplibs_check_method == file_magic.
7556 file_magic_cmd="\$MAGIC_CMD"
7558 # Flag that allows shared libraries with undefined symbols to be built.
7559 allow_undefined_flag=""
7561 # Flag that forces no undefined symbols.
7562 no_undefined_flag=""
7564 # Commands used to finish a libtool library installation in a directory.
7565 finish_cmds="PATH=\\\"\\\$PATH:/sbin\\\" ldconfig -n \$libdir"
7567 # Same as above, but a single script fragment to be evaled but not shown.
7570 # Take the output of nm and produce a listing of raw symbols and C names.
7571 global_symbol_pipe="sed -n -e 's/^.*[ ]\\([ABCDGIRSTW][ABCDGIRSTW]*\\)[ ][ ]*\\([_A-Za-z][_A-Za-z0-9]*\\)\$/\\1 \\2 \\2/p'"
7573 # Transform the output of nm in a proper C declaration
7574 global_symbol_to_cdecl="sed -n -e 's/^. .* \\(.*\\)\$/extern int \\1;/p'"
7576 # Transform the output of nm in a C name address pair
7577 global_symbol_to_c_name_address="sed -n -e 's/^: \\([^ ]*\\) \$/ {\\\"\\1\\\", (lt_ptr) 0},/p' -e 's/^[BCDEGRST] \\([^ ]*\\) \\([^ ]*\\)\$/ {\"\\2\", (lt_ptr) \\&\\2},/p'"
7579 # This is the shared library runtime path variable.
7580 runpath_var=LD_RUN_PATH
7582 # This is the shared library path variable.
7583 shlibpath_var=LD_LIBRARY_PATH
7585 # Is shlibpath searched before the hard-coded library search path?
7586 shlibpath_overrides_runpath=no
7588 # How to hardcode a shared library path into an executable.
7589 hardcode_action=immediate
7591 # Whether we should hardcode library paths into libraries.
7592 hardcode_into_libs=yes
7594 # Flag to hardcode $libdir into a binary during linking.
7595 # This must work even if $libdir does not exist.
7596 hardcode_libdir_flag_spec="\${wl}--rpath \${wl}\$libdir"
7598 # If ld is used when linking, flag to hardcode $libdir into
7599 # a binary during linking. This must work even if $libdir does
7601 hardcode_libdir_flag_spec_ld=""
7603 # Whether we need a single -rpath flag with a separated argument.
7604 hardcode_libdir_separator=""
7606 # Set to yes if using DIR/libNAME during linking hardcodes DIR into the
7610 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
7614 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
7615 # the resulting binary.
7616 hardcode_shlibpath_var=unsupported
7618 # Set to yes if building a shared library automatically hardcodes DIR into the library
7619 # and all subsequent libraries and executables linked against it.
7620 hardcode_automatic=no
7622 # Variables whose values should be saved in libtool wrapper scripts and
7623 # restored at relink time.
7624 variables_saved_for_relink="PATH LD_LIBRARY_PATH LD_RUN_PATH GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
7626 # Whether libtool must link a program against all its dependency libraries.
7627 link_all_deplibs=unknown
7629 # Compile-time system search path for libraries
7630 sys_lib_search_path_spec="/usr/lib/gcc/i686-pc-linux-gnu/4.1.2 /usr/i686-pc-linux-gnu/lib /usr/lib /lib"
7632 # Run-time system search path for libraries
7633 sys_lib_dlsearch_path_spec="/lib /usr/lib /usr/local/lib //usr//lib/opengl/xorg-x11/lib /usr/i686-pc-linux-gnu/lib /usr/lib/gcc/i686-pc-linux-gnu/4.1.1 /usr/lib/gcc/i686-pc-linux-gnu/4.1.2 /usr/lib/gcc/i686-pc-linux-gnu/4.2.0 /usr/lib/nspr /usr/lib/nss /usr/lib/lesstif-2.1 /usr/lib/openmotif-2.2 /usr/lib/qt4 /usr/kde/3.5/lib /usr/qt/3/lib /usr/games/lib /usr/lib/fltk-1.1 /usr/lib/libstdc++-v3/ "
7635 # Fix the shell variable $srcfile for the compiler.
7638 # Set to yes if exported symbols are required.
7639 always_export_symbols=no
7641 # The commands to list exported symbols.
7642 export_symbols_cmds="\$NM \$libobjs \$convenience | \$global_symbol_pipe | \$SED 's/.* //' | sort | uniq > \$export_symbols"
7644 # The commands to extract the exported symbol list from a shared archive.
7645 extract_expsyms_cmds=""
7647 # Symbols that should not be listed in the preloaded symbols.
7650 # Symbols that must always be exported.
7653 # ### END LIBTOOL TAG CONFIG: CXX
7655 # ### BEGIN LIBTOOL TAG CONFIG: GCJ
7657 # Libtool was configured on host laserbeak:
7659 # Shell to use when invoking shell scripts.
7662 # Whether or not to build shared libraries.
7663 build_libtool_libs=yes
7665 # Whether or not to build static libraries.
7668 # Whether or not to add -lc for building shared libraries.
7669 build_libtool_need_lc=no
7671 # Whether or not to disallow shared libs when runtime libs are static
7672 allow_libtool_libs_with_static_runtimes=no
7674 # Whether or not to optimize for fast installation.
7679 host=i686-pc-linux-gnu
7684 build=i686-pc-linux-gnu
7687 # An echo program that does not interpret backslashes.
7697 # LTCC compiler flags.
7700 # A language-specific compiler.
7703 # Is the compiler the GNU C compiler?
7707 EGREP="/bin/grep -E"
7709 # The linker used to build libraries.
7712 # Whether we need hard or soft links.
7715 # A BSD-compatible nm program.
7718 # A symbol stripping program
7721 # Used to examine libraries when file_magic_cmd begins "file"
7724 # Used on cygwin: DLL creation program.
7727 # Used on cygwin: object dumper.
7730 # Used on cygwin: assembler.
7733 # The name of the directory that contains temporary libtool files.
7736 # How to create reloadable object files.
7738 reload_cmds="\$LD\$reload_flag -o \$output\$reload_objs"
7740 # How to pass a linker flag through the compiler.
7743 # Object file suffix (normally "o").
7746 # Old archive suffix (normally "a").
7749 # Shared library suffix (normally ".so").
7752 # Executable file suffix (normally "").
7755 # Additional compiler flags for building library objects.
7759 # What is the maximum length of a command?
7762 # Does compiler simultaneously support -c and -o options?
7765 # Must we lock files when doing compilation?
7768 # Do we need the lib prefix for modules?
7771 # Do we need a version for libraries?
7774 # Whether dlopen is supported.
7775 dlopen_support=unknown
7777 # Whether dlopen of programs is supported.
7780 # Whether dlopen of statically linked programs is supported.
7781 dlopen_self_static=unknown
7783 # Compiler flag to prevent dynamic linking.
7786 # Compiler flag to turn off builtin functions.
7787 no_builtin_flag=" -fno-builtin"
7789 # Compiler flag to allow reflexive dlopens.
7790 export_dynamic_flag_spec="\${wl}--export-dynamic"
7792 # Compiler flag to generate shared objects directly from archives.
7793 whole_archive_flag_spec="\${wl}--whole-archive\$convenience \${wl}--no-whole-archive"
7795 # Compiler flag to generate thread-safe objects.
7796 thread_safe_flag_spec=""
7798 # Library versioning type.
7801 # Format of library name prefix.
7802 libname_spec="lib\$name"
7804 # List of archive names. First name is the real one, the rest are links.
7805 # The last name is the one that the linker finds with -lNAME.
7806 library_names_spec="\${libname}\${release}\${shared_ext}\$versuffix \${libname}\${release}\${shared_ext}\$major \$libname\${shared_ext}"
7808 # The coded name of the library, if different from the real name.
7809 soname_spec="\${libname}\${release}\${shared_ext}\$major"
7811 # Commands used to build and install an old-style archive.
7813 old_archive_cmds="\$AR \$AR_FLAGS \$oldlib\$oldobjs~\$RANLIB \$oldlib"
7814 old_postinstall_cmds="chmod 644 \$oldlib~\$RANLIB \$oldlib"
7815 old_postuninstall_cmds=""
7817 # Create an old-style archive from a shared archive.
7818 old_archive_from_new_cmds=""
7820 # Create a temporary old-style archive to link instead of a shared archive.
7821 old_archive_from_expsyms_cmds=""
7823 # Commands used to build and install a shared archive.
7824 archive_cmds="\$CC -shared \$libobjs \$deplibs \$compiler_flags \${wl}-soname \$wl\$soname -o \$lib"
7825 archive_expsym_cmds="\$echo \\\"{ global:\\\" > \$output_objdir/\$libname.ver~
7826 cat \$export_symbols | sed -e \\\"s/\\\\(.*\\\\)/\\\\1;/\\\" >> \$output_objdir/\$libname.ver~
7827 \$echo \\\"local: *; };\\\" >> \$output_objdir/\$libname.ver~
7828 \$CC -shared \$libobjs \$deplibs \$compiler_flags \${wl}-soname \$wl\$soname \${wl}-version-script \${wl}\$output_objdir/\$libname.ver -o \$lib"
7830 postuninstall_cmds=""
7832 # Commands used to build a loadable module (assumed same as above if empty)
7834 module_expsym_cmds=""
7836 # Commands to strip libraries.
7837 old_striplib="strip --strip-debug"
7838 striplib="strip --strip-unneeded"
7840 # Dependencies to place before the objects being linked to create a
7844 # Dependencies to place after the objects being linked to create a
7848 # Dependencies to place before the objects being linked to create a
7852 # Dependencies to place after the objects being linked to create a
7856 # The library search path used internally by the compiler when linking
7858 compiler_lib_search_path=""
7860 # Method to check whether dependent libraries are shared objects.
7861 deplibs_check_method="pass_all"
7863 # Command to use when deplibs_check_method == file_magic.
7864 file_magic_cmd="\$MAGIC_CMD"
7866 # Flag that allows shared libraries with undefined symbols to be built.
7867 allow_undefined_flag=""
7869 # Flag that forces no undefined symbols.
7870 no_undefined_flag=""
7872 # Commands used to finish a libtool library installation in a directory.
7873 finish_cmds="PATH=\\\"\\\$PATH:/sbin\\\" ldconfig -n \$libdir"
7875 # Same as above, but a single script fragment to be evaled but not shown.
7878 # Take the output of nm and produce a listing of raw symbols and C names.
7879 global_symbol_pipe="sed -n -e 's/^.*[ ]\\([ABCDGIRSTW][ABCDGIRSTW]*\\)[ ][ ]*\\([_A-Za-z][_A-Za-z0-9]*\\)\$/\\1 \\2 \\2/p'"
7881 # Transform the output of nm in a proper C declaration
7882 global_symbol_to_cdecl="sed -n -e 's/^. .* \\(.*\\)\$/extern int \\1;/p'"
7884 # Transform the output of nm in a C name address pair
7885 global_symbol_to_c_name_address="sed -n -e 's/^: \\([^ ]*\\) \$/ {\\\"\\1\\\", (lt_ptr) 0},/p' -e 's/^[BCDEGRST] \\([^ ]*\\) \\([^ ]*\\)\$/ {\"\\2\", (lt_ptr) \\&\\2},/p'"
7887 # This is the shared library runtime path variable.
7888 runpath_var=LD_RUN_PATH
7890 # This is the shared library path variable.
7891 shlibpath_var=LD_LIBRARY_PATH
7893 # Is shlibpath searched before the hard-coded library search path?
7894 shlibpath_overrides_runpath=no
7896 # How to hardcode a shared library path into an executable.
7897 hardcode_action=immediate
7899 # Whether we should hardcode library paths into libraries.
7900 hardcode_into_libs=yes
7902 # Flag to hardcode $libdir into a binary during linking.
7903 # This must work even if $libdir does not exist.
7904 hardcode_libdir_flag_spec="\${wl}--rpath \${wl}\$libdir"
7906 # If ld is used when linking, flag to hardcode $libdir into
7907 # a binary during linking. This must work even if $libdir does
7909 hardcode_libdir_flag_spec_ld=""
7911 # Whether we need a single -rpath flag with a separated argument.
7912 hardcode_libdir_separator=""
7914 # Set to yes if using DIR/libNAME during linking hardcodes DIR into the
7918 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
7922 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
7923 # the resulting binary.
7924 hardcode_shlibpath_var=unsupported
7926 # Set to yes if building a shared library automatically hardcodes DIR into the library
7927 # and all subsequent libraries and executables linked against it.
7928 hardcode_automatic=no
7930 # Variables whose values should be saved in libtool wrapper scripts and
7931 # restored at relink time.
7932 variables_saved_for_relink="PATH LD_LIBRARY_PATH LD_RUN_PATH GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
7934 # Whether libtool must link a program against all its dependency libraries.
7935 link_all_deplibs=unknown
7937 # Compile-time system search path for libraries
7938 sys_lib_search_path_spec="/usr/lib/gcc/i686-pc-linux-gnu/4.1.2 /usr/i686-pc-linux-gnu/lib /usr/lib /lib"
7940 # Run-time system search path for libraries
7941 sys_lib_dlsearch_path_spec="/lib /usr/lib /usr/local/lib //usr//lib/opengl/xorg-x11/lib /usr/i686-pc-linux-gnu/lib /usr/lib/gcc/i686-pc-linux-gnu/4.1.1 /usr/lib/gcc/i686-pc-linux-gnu/4.1.2 /usr/lib/gcc/i686-pc-linux-gnu/4.2.0 /usr/lib/nspr /usr/lib/nss /usr/lib/lesstif-2.1 /usr/lib/openmotif-2.2 /usr/lib/qt4 /usr/kde/3.5/lib /usr/qt/3/lib /usr/games/lib /usr/lib/fltk-1.1 /usr/lib/libstdc++-v3/ "
7943 # Fix the shell variable $srcfile for the compiler.
7946 # Set to yes if exported symbols are required.
7947 always_export_symbols=no
7949 # The commands to list exported symbols.
7950 export_symbols_cmds="\$NM \$libobjs \$convenience | \$global_symbol_pipe | \$SED 's/.* //' | sort | uniq > \$export_symbols"
7952 # The commands to extract the exported symbol list from a shared archive.
7953 extract_expsyms_cmds=""
7955 # Symbols that should not be listed in the preloaded symbols.
7956 exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
7958 # Symbols that must always be exported.
7961 # ### END LIBTOOL TAG CONFIG: GCJ