3 # libtoolT - Provide generalized library-building support services.
4 # Generated automatically by (GNU simgrid 3.3-svn)
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, 2008
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="/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 blaise:
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.
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 directories searched by this compiler when creating a shared
248 compiler_lib_search_dirs=""
250 # The library search path used internally by the compiler when linking
252 compiler_lib_search_path=""
254 # Method to check whether dependent libraries are shared objects.
255 deplibs_check_method="pass_all"
257 # Command to use when deplibs_check_method == file_magic.
258 file_magic_cmd="\$MAGIC_CMD"
260 # Flag that allows shared libraries with undefined symbols to be built.
261 allow_undefined_flag=""
263 # Flag that forces no undefined symbols.
266 # Commands used to finish a libtool library installation in a directory.
267 finish_cmds="PATH=\\\"\\\$PATH:/sbin\\\" ldconfig -n \$libdir"
269 # Same as above, but a single script fragment to be evaled but not shown.
272 # Take the output of nm and produce a listing of raw symbols and C names.
273 global_symbol_pipe="sed -n -e 's/^.*[ ]\\([ABCDGIRSTW][ABCDGIRSTW]*\\)[ ][ ]*\\([_A-Za-z][_A-Za-z0-9]*\\)\$/\\1 \\2 \\2/p'"
275 # Transform the output of nm in a proper C declaration
276 global_symbol_to_cdecl="sed -n -e 's/^. .* \\(.*\\)\$/extern int \\1;/p'"
278 # Transform the output of nm in a C name address pair
279 global_symbol_to_c_name_address="sed -n -e 's/^: \\([^ ]*\\) \$/ {\\\"\\1\\\", (lt_ptr) 0},/p' -e 's/^[BCDEGRST] \\([^ ]*\\) \\([^ ]*\\)\$/ {\"\\2\", (lt_ptr) \\&\\2},/p'"
281 # This is the shared library runtime path variable.
282 runpath_var=LD_RUN_PATH
284 # This is the shared library path variable.
285 shlibpath_var=LD_LIBRARY_PATH
287 # Is shlibpath searched before the hard-coded library search path?
288 shlibpath_overrides_runpath=no
290 # How to hardcode a shared library path into an executable.
291 hardcode_action=immediate
293 # Whether we should hardcode library paths into libraries.
294 hardcode_into_libs=yes
296 # Flag to hardcode $libdir into a binary during linking.
297 # This must work even if $libdir does not exist.
298 hardcode_libdir_flag_spec="\${wl}--rpath \${wl}\$libdir"
300 # If ld is used when linking, flag to hardcode $libdir into
301 # a binary during linking. This must work even if $libdir does
303 hardcode_libdir_flag_spec_ld=""
305 # Whether we need a single -rpath flag with a separated argument.
306 hardcode_libdir_separator=""
308 # Set to yes if using DIR/libNAME during linking hardcodes DIR into the
312 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
316 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
317 # the resulting binary.
318 hardcode_shlibpath_var=unsupported
320 # Set to yes if building a shared library automatically hardcodes DIR into the library
321 # and all subsequent libraries and executables linked against it.
322 hardcode_automatic=no
324 # Variables whose values should be saved in libtool wrapper scripts and
325 # restored at relink time.
326 variables_saved_for_relink="PATH LD_LIBRARY_PATH LD_RUN_PATH GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
328 # Whether libtool must link a program against all its dependency libraries.
331 # Compile-time system search path for libraries
332 sys_lib_search_path_spec="/usr/lib/gcc/i486-linux-gnu/4.2.3 /usr/lib /lib"
334 # Run-time system search path for libraries
335 sys_lib_dlsearch_path_spec="/lib /usr/lib /lib/i486-linux-gnu /usr/lib/i486-linux-gnu /usr/lib/R/lib /usr/local/lib "
337 # Fix the shell variable $srcfile for the compiler.
340 # Set to yes if exported symbols are required.
341 always_export_symbols=no
343 # The commands to list exported symbols.
344 export_symbols_cmds="\$NM \$libobjs \$convenience | \$global_symbol_pipe | \$SED 's/.* //' | sort | uniq > \$export_symbols"
346 # The commands to extract the exported symbol list from a shared archive.
347 extract_expsyms_cmds=""
349 # Symbols that should not be listed in the preloaded symbols.
350 exclude_expsyms="_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*"
352 # Symbols that must always be exported.
355 # ### END LIBTOOL CONFIG
357 # ltmain.sh - Provide generalized library-building support services.
358 # NOTE: Changing this file will not affect anything until you rerun configure.
360 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006,
361 # 2007 Free Software Foundation, Inc.
362 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
364 # This program is free software; you can redistribute it and/or modify
365 # it under the terms of the GNU General Public License as published by
366 # the Free Software Foundation; either version 2 of the License, or
367 # (at your option) any later version.
369 # This program is distributed in the hope that it will be useful, but
370 # WITHOUT ANY WARRANTY; without even the implied warranty of
371 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
372 # General Public License for more details.
374 # You should have received a copy of the GNU General Public License
375 # along with this program; if not, write to the Free Software
376 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
378 # As a special exception to the GNU General Public License, if you
379 # distribute this file as part of a program that contains a
380 # configuration script generated by Autoconf, you may include it under
381 # the same distribution terms that you use for the rest of that program.
385 # Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
386 # is ksh but when the shell is invoked as "sh" and the current value of
387 # the _XPG environment variable is not equal to 1 (one), the special
388 # positional parameter $0, within a function call, is the name of the
392 # The name of this program:
393 progname=`echo "$progpath" | $SED $basename`
403 TIMESTAMP=" (1.1220.2.456 2007/06/24 02:25:32)"
405 # Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE).
406 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
409 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
410 # is contrary to our usage. Disable this feature.
411 alias -g '${1+"$@"}'='"$@"'
414 case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
416 BIN_SH=xpg4; export BIN_SH # for Tru64
417 DUALCASE=1; export DUALCASE # for MKS sh
419 # Check that we have a working $echo.
420 if test "X$1" = X--no-reexec; then
421 # Discard the --no-reexec flag, and continue.
423 elif test "X$1" = X--fallback-echo; then
424 # Avoid inline document here, it may be left over
426 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
427 # Yippee, $echo works!
430 # Restart under the correct shell, and then maybe $echo will work.
431 exec $SHELL "$progpath" --no-reexec ${1+"$@"}
434 if test "X$1" = X--fallback-echo; then
435 # used as fallback echo
444 help="Try \`$progname --help' for more information."
445 magic="%%%MAGIC variable%%%"
450 # Sed substitution that helps us do robust quoting. It backslashifies
451 # metacharacters that are still active within double-quoted strings.
452 Xsed="${SED}"' -e 1s/^X//'
453 sed_quote_subst='s/\([\\`\\"$\\\\]\)/\\\1/g'
454 # test EBCDIC or ASCII
455 case `echo X|tr X '\101'` in
456 A) # ASCII based system
457 # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
459 NL2SP='tr \015\012 \040\040'
461 *) # EBCDIC based system
463 NL2SP='tr \r\n \100\100'
468 # Only set LANG and LC_ALL to C if already set.
469 # These must not be set unconditionally because not all systems understand
470 # e.g. LANG=C (notably SCO).
471 # We save the old values to restore during execute mode.
472 for lt_var in LANG LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
474 eval "if test \"\${$lt_var+set}\" = set; then
475 save_$lt_var=\$$lt_var
481 # Make sure IFS has a sensible default
486 if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
487 $echo "$modename: not configured to build any kind of library" 1>&2
488 $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
503 lo2o="s/\\.lo\$/.${objext}/"
504 o2lo="s/\\.${objext}\$/.lo/"
508 #####################################
509 # Shell function definitions:
510 # This seems to be the best place for them
512 # func_mktempdir [string]
513 # Make a temporary directory that won't clash with other running
514 # libtool processes, and avoids race conditions if possible. If
515 # given, STRING is the basename for that directory.
518 my_template="${TMPDIR-/tmp}/${1-$progname}"
520 if test "$run" = ":"; then
521 # Return a directory name, but don't create it in dry-run mode
522 my_tmpdir="${my_template}-$$"
525 # If mktemp works, use that first and foremost
526 my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null`
528 if test ! -d "$my_tmpdir"; then
529 # Failing that, at least try and use $RANDOM to avoid a race
530 my_tmpdir="${my_template}-${RANDOM-0}$$"
532 save_mktempdir_umask=`umask`
535 umask $save_mktempdir_umask
538 # If we're not in dry-run mode, bomb out on failure
539 test -d "$my_tmpdir" || {
540 $echo "cannot create temporary directory \`$my_tmpdir'" 1>&2
545 $echo "X$my_tmpdir" | $Xsed
549 # func_win32_libid arg
550 # return the library type of file 'arg'
552 # Need a lot of goo to handle *both* DLLs and import libs
553 # Has to be a shell function in order to 'eat' the argument
554 # that is supplied when $file_magic_command is called.
557 win32_libid_type="unknown"
558 win32_fileres=`file -L $1 2>/dev/null`
559 case $win32_fileres in
560 *ar\ archive\ import\ library*) # definitely import
561 win32_libid_type="x86 archive import"
563 *ar\ archive*) # could be an import, or static
564 if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \
565 $EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then
566 win32_nmres=`eval $NM -f posix -A $1 | \
575 import*) win32_libid_type="x86 archive import";;
576 *) win32_libid_type="x86 archive static";;
581 win32_libid_type="x86 DLL"
583 *executable*) # but shell scripts are "executable" too...
584 case $win32_fileres in
585 *MS\ Windows\ PE\ Intel*)
586 win32_libid_type="x86 DLL"
591 $echo $win32_libid_type
596 # Infer tagged configuration to use if any are available and
597 # if one wasn't chosen via the "--tag" command line option.
598 # Only attempt this if the compiler in the base compile
599 # command doesn't match the default compiler.
600 # arg is usually of the form 'gcc ...'
603 if test -n "$available_tags" && test -z "$tagname"; then
607 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
611 CC_quoted="$CC_quoted $arg"
614 # Blanks in the command may have been stripped by the calling shell,
615 # but not from the CC environment variable when configure was run.
616 " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) ;;
617 # Blanks at the start of $base_compile will cause this to fail
618 # if we don't check for them as well.
620 for z in $available_tags; do
621 if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then
622 # Evaluate the configuration.
623 eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`"
626 # Double-quote args containing other shell metacharacters.
628 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
632 CC_quoted="$CC_quoted $arg"
634 # user sometimes does CC=<HOST>-gcc so we need to match that to 'gcc'
635 trimedcc=`echo ${CC} | $SED -e "s/${host}-//g"`
636 # and sometimes libtool has CC=<HOST>-gcc but user does CC=gcc
637 extendcc=${host}-${CC}
638 # and sometimes libtool has CC=<OLDHOST>-gcc but user has CC=<NEWHOST>-gcc
639 # (Gentoo-specific hack because we always export $CHOST)
640 mungedcc=${CHOST-${host}}-${trimedcc}
642 "cc "* | " cc "* | "${host}-cc "* | " ${host}-cc "*|\
643 "gcc "* | " gcc "* | "${host}-gcc "* | " ${host}-gcc "*)
646 "$trimedcc "* | " $trimedcc "* | "`$echo $trimedcc` "* | " `$echo $trimedcc` "*|\
647 "$extendcc "* | " $extendcc "* | "`$echo $extendcc` "* | " `$echo $extendcc` "*|\
648 "$mungedcc "* | " $mungedcc "* | "`$echo $mungedcc` "* | " `$echo $mungedcc` "*|\
649 " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*)
650 # The compiler in the base compile command matches
651 # the one in the tagged configuration.
652 # Assume this is the tagged configuration we want.
659 # If $tagname still isn't set, then no tagged configuration
660 # was found and let the user know that the "--tag" command
661 # line option must be used.
662 if test -z "$tagname"; then
663 $echo "$modename: unable to infer tagged configuration"
664 $echo "$modename: specify a tag with \`--tag'" 1>&2
667 # $echo "$modename: using $tagname tagged configuration"
675 # func_extract_an_archive dir oldlib
676 func_extract_an_archive ()
678 f_ex_an_ar_dir="$1"; shift
679 f_ex_an_ar_oldlib="$1"
681 $show "(cd $f_ex_an_ar_dir && $AR x $f_ex_an_ar_oldlib)"
682 $run eval "(cd \$f_ex_an_ar_dir && $AR x \$f_ex_an_ar_oldlib)" || exit $?
683 if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then
686 $echo "$modename: ERROR: object name conflicts: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" 1>&2
691 # func_extract_archives gentop oldlib ...
692 func_extract_archives ()
694 my_gentop="$1"; shift
702 $show "${rm}r $my_gentop"
703 $run ${rm}r "$my_gentop"
704 $show "$mkdir $my_gentop"
705 $run $mkdir "$my_gentop"
707 if test "$my_status" -ne 0 && test ! -d "$my_gentop"; then
711 for my_xlib in $my_oldlibs; do
712 # Extract the objects.
714 [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;;
715 *) my_xabs=`pwd`"/$my_xlib" ;;
717 my_xlib=`$echo "X$my_xlib" | $Xsed -e 's%^.*/%%'`
720 case " $extracted_archives " in
722 extracted_serial=`expr $extracted_serial + 1`
723 my_xlib_u=lt$extracted_serial-$my_xlib ;;
727 extracted_archives="$extracted_archives $my_xlib_u"
728 my_xdir="$my_gentop/$my_xlib_u"
730 $show "${rm}r $my_xdir"
731 $run ${rm}r "$my_xdir"
732 $show "$mkdir $my_xdir"
733 $run $mkdir "$my_xdir"
735 if test "$exit_status" -ne 0 && test ! -d "$my_xdir"; then
740 $show "Extracting $my_xabs"
741 # Do not bother doing anything if just a dry run
742 if test -z "$run"; then
743 darwin_orig_dir=`pwd`
744 cd $my_xdir || exit $?
745 darwin_archive=$my_xabs
747 darwin_base_archive=`$echo "X$darwin_archive" | $Xsed -e 's%^.*/%%'`
748 darwin_arches=`lipo -info "$darwin_archive" 2>/dev/null | $EGREP Architectures 2>/dev/null`
749 if test -n "$darwin_arches"; then
750 darwin_arches=`echo "$darwin_arches" | $SED -e 's/.*are://'`
752 $show "$darwin_base_archive has multiple architectures $darwin_arches"
753 for darwin_arch in $darwin_arches ; do
754 mkdir -p "unfat-$$/${darwin_base_archive}-${darwin_arch}"
755 lipo -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}"
756 cd "unfat-$$/${darwin_base_archive}-${darwin_arch}"
757 func_extract_an_archive "`pwd`" "${darwin_base_archive}"
759 $rm "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}"
760 done # $darwin_arches
761 ## Okay now we have a bunch of thin objects, gotta fatten them up :)
762 darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print| xargs basename | sort -u | $NL2SP`
765 for darwin_file in $darwin_filelist; do
766 darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP`
767 lipo -create -output "$darwin_file" $darwin_files
768 done # $darwin_filelist
770 cd "$darwin_orig_dir"
772 cd "$darwin_orig_dir"
773 func_extract_an_archive "$my_xdir" "$my_xabs"
778 func_extract_an_archive "$my_xdir" "$my_xabs"
781 my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
783 func_extract_archives_result="$my_oldobjs"
785 # End of Shell function definitions
786 #####################################
789 eval std_shrext=\"$shrext_cmds\"
793 # Parse our command line options once, thoroughly.
794 while test "$#" -gt 0
800 -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;;
804 # If the previous option needs an argument, assign it.
805 if test -n "$prev"; then
808 execute_dlfiles="$execute_dlfiles $arg"
812 preserve_args="${preserve_args}=$arg"
814 # Check whether tagname contains only valid characters
817 $echo "$progname: invalid tag name: $tagname" 1>&2
824 # Don't test for the "default" C tag, as we know, it's there, but
825 # not specially marked.
828 if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$progpath" > /dev/null; then
829 taglist="$taglist $tagname"
830 # Evaluate the configuration.
831 eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^# ### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $progpath`"
833 $echo "$progname: ignoring unknown tag $tagname" 1>&2
848 # Have we seen a non-optional argument yet?
856 $PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP
858 Copyright (C) 2007 Free Software Foundation, Inc.
859 This is free software; see the source for copying conditions. There is NO
860 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
865 ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $progpath
866 # Now print the configurations for the tags.
867 for tagname in $taglist; do
868 ${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$progpath"
874 $echo "$progname: enabling shell trace mode"
876 preserve_args="$preserve_args $arg"
885 if test "$build_libtool_libs" = yes; then
886 $echo "enable shared libraries"
888 $echo "disable shared libraries"
890 if test "$build_old_libs" = yes; then
891 $echo "enable static libraries"
893 $echo "disable static libraries"
898 --finish) mode="finish" ;;
900 --mode) prevopt="--mode" prev=mode ;;
901 --mode=*) mode="$optarg" ;;
903 --preserve-dup-deps) duplicate_deps="yes" ;;
907 preserve_args="$preserve_args $arg"
913 preserve_args="$preserve_args --tag"
916 set tag "$optarg" ${1+"$@"}
919 preserve_args="$preserve_args --tag"
928 $echo "$modename: unrecognized option \`$arg'" 1>&2
940 if test -n "$prevopt"; then
941 $echo "$modename: option \`$prevopt' requires an argument" 1>&2
946 case $disable_libs in
950 build_libtool_libs=no
954 build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac`
958 # If this variable is set in any of the actions, the command in it
959 # will be execed at the end. This prevents here-documents from being
960 # left over by shells.
963 if test -z "$show_help"; then
965 # Infer the operation mode.
966 if test -z "$mode"; then
967 $echo "*** Warning: inferring the mode of operation is deprecated." 1>&2
968 $echo "*** Future versions of Libtool will require --mode=MODE be specified." 1>&2
970 *cc | cc* | *++ | gcc* | *-gcc* | g++* | xlc*)
982 *db | *dbx | *strace | *truss)
992 # If we have no mode, but dlfiles were specified, then do execute mode.
993 test -n "$execute_dlfiles" && mode=execute
995 # Just use the default operation mode.
996 if test -z "$mode"; then
997 if test -n "$nonopt"; then
998 $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2
1000 $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2
1007 # Only execute mode is allowed to have -dlopen flags.
1008 if test -n "$execute_dlfiles" && test "$mode" != execute; then
1009 $echo "$modename: unrecognized option \`-dlopen'" 1>&2
1014 # Change the help message to a mode-specific one.
1015 generic_help="$help"
1016 help="Try \`$modename --help --mode=$mode' for more information."
1018 # These modes are in order of execution frequency so that they run quickly.
1020 # libtool compile mode
1022 modename="$modename: compile"
1023 # Get the compilation command and the source file.
1025 srcfile="$nonopt" # always keep a non-empty value in "srcfile"
1036 # do not "continue". Instead, add this to base_compile
1048 # Accept any command-line options.
1051 if test -n "$libobj" ; then
1052 $echo "$modename: you cannot specify \`-o' more than once" 1>&2
1059 -static | -prefer-pic | -prefer-non-pic)
1070 arg_mode=arg # the next one goes into the "base_compile" arg list
1071 continue # The current "srcfile" will either be retained or
1072 ;; # replaced later. I would guess that would be a bug.
1075 args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"`
1077 save_ifs="$IFS"; IFS=','
1078 for arg in $args; do
1081 # Double-quote args containing other shell metacharacters.
1082 # Many Bourne shells cannot handle close brackets correctly
1083 # in scan sets, so we specify it separately.
1085 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
1089 lastarg="$lastarg $arg"
1092 lastarg=`$echo "X$lastarg" | $Xsed -e "s/^ //"`
1094 # Add the arguments to base_compile.
1095 base_compile="$base_compile $lastarg"
1100 # Accept the current argument as the source file.
1101 # The previous "srcfile" becomes the current argument.
1108 esac # case $arg_mode
1110 # Aesthetically quote the previous argument.
1111 lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"`
1114 # Double-quote args containing other shell metacharacters.
1115 # Many Bourne shells cannot handle close brackets correctly
1116 # in scan sets, and some SunOS ksh mistreat backslash-escaping
1117 # in scan sets (worked around with variable expansion),
1118 # and furthermore cannot handle '|' '&' '(' ')' in scan sets
1119 # at all, so we specify them separately.
1120 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
1121 lastarg="\"$lastarg\""
1125 base_compile="$base_compile $lastarg"
1130 $echo "$modename: you must specify an argument for -Xcompile"
1134 $echo "$modename: you must specify a target with \`-o'" 1>&2
1138 # Get the name of the library object.
1139 [ -z "$libobj" ] && libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'`
1143 # Recognize several different file suffixes.
1144 # If the user specifies -o file.o, it is replaced with file.lo
1154 *.class) xform=class ;;
1157 *.[fF][09]?) xform=[fF][09]. ;;
1159 *.java) xform=java ;;
1163 libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"`
1166 *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;;
1168 $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2
1173 func_infer_tag $base_compile
1175 for arg in $later; do
1194 qlibobj=`$echo "X$libobj" | $Xsed -e "$sed_quote_subst"`
1196 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
1197 qlibobj="\"$qlibobj\"" ;;
1199 test "X$libobj" != "X$qlibobj" \
1200 && $echo "X$libobj" | grep '[]~#^*{};<>?"'"'"' &()|`$[]' \
1201 && $echo "$modename: libobj name \`$libobj' may not contain shell special characters."
1202 objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
1203 xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'`
1204 if test "X$xdir" = "X$obj"; then
1209 lobj=${xdir}$objdir/$objname
1211 if test -z "$base_compile"; then
1212 $echo "$modename: you must specify a compilation command" 1>&2
1217 # Delete any leftover library objects.
1218 if test "$build_old_libs" = yes; then
1219 removelist="$obj $lobj $libobj ${libobj}T"
1221 removelist="$lobj $libobj ${libobj}T"
1224 $run $rm $removelist
1225 trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15
1227 # On Cygwin there's no "real" PIC flag so we must build both object types
1229 cygwin* | mingw* | pw32* | os2*)
1233 if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then
1234 # non-PIC code in shared libraries is not supported
1238 # Calculate the filename of the output object if compiler does
1239 # not support -o with -c
1240 if test "$compiler_c_o" = no; then
1241 output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext}
1242 lockfile="$output_obj.lock"
1243 removelist="$removelist $output_obj $lockfile"
1244 trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15
1251 # Lock this critical section if it is needed
1252 # We use this script file to make the link, it avoids creating a new file
1253 if test "$need_locks" = yes; then
1254 until $run ln "$srcfile" "$lockfile" 2>/dev/null; do
1255 $show "Waiting for $lockfile to be removed"
1258 elif test "$need_locks" = warn; then
1259 if test -f "$lockfile"; then
1261 *** ERROR, $lockfile exists and contains:
1262 `cat $lockfile 2>/dev/null`
1264 This indicates that another process is trying to use the same
1265 temporary object file, and libtool could not work around it because
1266 your compiler does not support \`-c' and \`-o' together. If you
1267 repeat this compilation, it may succeed, by chance, but you had better
1268 avoid parallel builds (make -j) in this platform, or get a better
1271 $run $rm $removelist
1274 $echo "$srcfile" > "$lockfile"
1277 if test -n "$fix_srcfile_path"; then
1278 eval srcfile=\"$fix_srcfile_path\"
1280 qsrcfile=`$echo "X$srcfile" | $Xsed -e "$sed_quote_subst"`
1282 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
1283 qsrcfile="\"$qsrcfile\"" ;;
1286 $run $rm "$libobj" "${libobj}T"
1288 # Create a libtool object file (analogous to a ".la" file),
1289 # but don't create it if we're doing a dry run.
1290 test -z "$run" && cat > ${libobj}T <<EOF
1291 # $libobj - a libtool object file
1292 # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
1294 # Please DO NOT delete this file!
1295 # It is necessary for linking the library.
1297 # Name of the PIC object.
1300 # Only build a PIC object if we are building libtool libraries.
1301 if test "$build_libtool_libs" = yes; then
1302 # Without this assignment, base_compile gets emptied.
1303 fbsd_hideous_sh_bug=$base_compile
1305 if test "$pic_mode" != no; then
1306 command="$base_compile $qsrcfile $pic_flag"
1308 # Don't build PIC code
1309 command="$base_compile $qsrcfile"
1312 if test ! -d "${xdir}$objdir"; then
1313 $show "$mkdir ${xdir}$objdir"
1314 $run $mkdir ${xdir}$objdir
1316 if test "$exit_status" -ne 0 && test ! -d "${xdir}$objdir"; then
1321 if test -z "$output_obj"; then
1322 # Place PIC objects in $objdir
1323 command="$command -o $lobj"
1326 $run $rm "$lobj" "$output_obj"
1329 if $run eval "$command"; then :
1331 test -n "$output_obj" && $run $rm $removelist
1335 if test "$need_locks" = warn &&
1336 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
1338 *** ERROR, $lockfile contains:
1339 `cat $lockfile 2>/dev/null`
1341 but it should contain:
1344 This indicates that another process is trying to use the same
1345 temporary object file, and libtool could not work around it because
1346 your compiler does not support \`-c' and \`-o' together. If you
1347 repeat this compilation, it may succeed, by chance, but you had better
1348 avoid parallel builds (make -j) in this platform, or get a better
1351 $run $rm $removelist
1355 # Just move the object if needed, then go on to compile the next one
1356 if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then
1357 $show "$mv $output_obj $lobj"
1358 if $run $mv $output_obj $lobj; then :
1361 $run $rm $removelist
1366 # Append the name of the PIC object to the libtool object file.
1367 test -z "$run" && cat >> ${libobj}T <<EOF
1368 pic_object='$objdir/$objname'
1372 # Allow error messages only from the first compilation.
1373 if test "$suppress_opt" = yes; then
1374 suppress_output=' >/dev/null 2>&1'
1377 # No PIC object so indicate it doesn't exist in the libtool
1379 test -z "$run" && cat >> ${libobj}T <<EOF
1385 # Only build a position-dependent object if we build old libraries.
1386 if test "$build_old_libs" = yes; then
1387 if test "$pic_mode" != yes; then
1388 # Don't build PIC code
1389 command="$base_compile $qsrcfile"
1391 command="$base_compile $qsrcfile $pic_flag"
1393 if test "$compiler_c_o" = yes; then
1394 command="$command -o $obj"
1397 # Suppress compiler output if we already did a PIC compilation.
1398 command="$command$suppress_output"
1399 $run $rm "$obj" "$output_obj"
1401 if $run eval "$command"; then :
1403 $run $rm $removelist
1407 if test "$need_locks" = warn &&
1408 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
1410 *** ERROR, $lockfile contains:
1411 `cat $lockfile 2>/dev/null`
1413 but it should contain:
1416 This indicates that another process is trying to use the same
1417 temporary object file, and libtool could not work around it because
1418 your compiler does not support \`-c' and \`-o' together. If you
1419 repeat this compilation, it may succeed, by chance, but you had better
1420 avoid parallel builds (make -j) in this platform, or get a better
1423 $run $rm $removelist
1427 # Just move the object if needed
1428 if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then
1429 $show "$mv $output_obj $obj"
1430 if $run $mv $output_obj $obj; then :
1433 $run $rm $removelist
1438 # Append the name of the non-PIC object the libtool object file.
1439 # Only append if the libtool object file exists.
1440 test -z "$run" && cat >> ${libobj}T <<EOF
1441 # Name of the non-PIC object.
1442 non_pic_object='$objname'
1446 # Append the name of the non-PIC object the libtool object file.
1447 # Only append if the libtool object file exists.
1448 test -z "$run" && cat >> ${libobj}T <<EOF
1449 # Name of the non-PIC object.
1455 $run $mv "${libobj}T" "${libobj}"
1457 # Unlock the critical section if it was locked
1458 if test "$need_locks" != no; then
1459 $run $rm "$lockfile"
1467 modename="$modename: link"
1469 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
1470 # It is impossible to link a dll without this setting, and
1471 # we shouldn't force the makefile maintainer to figure out
1472 # which system we are compiling for in order to pass an extra
1473 # flag for every libtool invocation.
1474 # allow_undefined=no
1476 # FIXME: Unfortunately, there are problems with the above when trying
1477 # to make a dll which has undefined symbols, in which case not
1478 # even a static library is built. For now, we need to specify
1479 # -no-undefined on the libtool link line when we can be certain
1480 # that all symbols are satisfied, otherwise we get a static library.
1487 libtool_args="$nonopt"
1488 base_compile="$nonopt $@"
1489 compile_command="$nonopt"
1490 finalize_command="$nonopt"
1503 lib_search_path=`pwd`
1512 export_symbols_regex=
1520 notinst_path= # paths that contain not-installed libtool libraries
1521 precious_files_regex=
1522 prefer_static_libs=no
1535 func_infer_tag $base_compile
1537 # We need to know -static, to get the right output filenames.
1541 -all-static | -static | -static-libtool-libs)
1544 if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
1545 $echo "$modename: warning: complete static linking is impossible in this configuration" 1>&2
1547 if test -n "$link_static_flag"; then
1548 dlopen_self=$dlopen_self_static
1550 prefer_static_libs=yes
1553 if test -z "$pic_flag" && test -n "$link_static_flag"; then
1554 dlopen_self=$dlopen_self_static
1556 prefer_static_libs=built
1558 -static-libtool-libs)
1559 if test -z "$pic_flag" && test -n "$link_static_flag"; then
1560 dlopen_self=$dlopen_self_static
1562 prefer_static_libs=yes
1565 build_libtool_libs=no
1572 # See if our shared archives depend on static archives.
1573 test -n "$old_archive_from_new_cmds" && build_old_libs=yes
1575 # Go through the arguments, transforming them on the way.
1576 while test "$#" -gt 0; do
1580 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
1581 qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test
1585 libtool_args="$libtool_args $qarg"
1587 # If the previous option needs an argument, assign it.
1588 if test -n "$prev"; then
1591 compile_command="$compile_command @OUTPUT@"
1592 finalize_command="$finalize_command @OUTPUT@"
1598 if test "$preload" = no; then
1599 # Add the symbol object into the linking commands.
1600 compile_command="$compile_command @SYMFILE@"
1601 finalize_command="$finalize_command @SYMFILE@"
1605 *.la | *.lo) ;; # We handle these cases below.
1607 if test "$dlself" = no; then
1615 if test "$prev" = dlprefiles; then
1617 elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then
1627 if test "$prev" = dlfiles; then
1628 dlfiles="$dlfiles $arg"
1630 dlprefiles="$dlprefiles $arg"
1638 export_symbols="$arg"
1639 if test ! -f "$arg"; then
1640 $echo "$modename: symbol file \`$arg' does not exist"
1647 export_symbols_regex="$arg"
1652 inst_prefix_dir="$arg"
1657 precious_files_regex="$arg"
1667 if test -f "$arg"; then
1670 for fil in `cat $save_arg`
1672 # moreargs="$moreargs $fil"
1674 # A libtool-controlled object.
1676 # Check to see that this really is a libtool object.
1677 if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
1682 # If there is no directory component, then add one.
1684 */* | *\\*) . $arg ;;
1688 if test -z "$pic_object" || \
1689 test -z "$non_pic_object" ||
1690 test "$pic_object" = none && \
1691 test "$non_pic_object" = none; then
1692 $echo "$modename: cannot find name of object for \`$arg'" 1>&2
1696 # Extract subdirectory from the argument.
1697 xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
1698 if test "X$xdir" = "X$arg"; then
1704 if test "$pic_object" != none; then
1705 # Prepend the subdirectory the object is found in.
1706 pic_object="$xdir$pic_object"
1708 if test "$prev" = dlfiles; then
1709 if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
1710 dlfiles="$dlfiles $pic_object"
1714 # If libtool objects are unsupported, then we need to preload.
1719 # CHECK ME: I think I busted this. -Ossama
1720 if test "$prev" = dlprefiles; then
1721 # Preload the old-style object.
1722 dlprefiles="$dlprefiles $pic_object"
1727 libobjs="$libobjs $pic_object"
1732 if test "$non_pic_object" != none; then
1733 # Prepend the subdirectory the object is found in.
1734 non_pic_object="$xdir$non_pic_object"
1736 # A standard non-PIC object
1737 non_pic_objects="$non_pic_objects $non_pic_object"
1738 if test -z "$pic_object" || test "$pic_object" = none ; then
1739 arg="$non_pic_object"
1742 # If the PIC object exists, use it instead.
1743 # $xdir was prepended to $pic_object above.
1744 non_pic_object="$pic_object"
1745 non_pic_objects="$non_pic_objects $non_pic_object"
1748 # Only an error if not doing a dry-run.
1749 if test -z "$run"; then
1750 $echo "$modename: \`$arg' is not a valid libtool object" 1>&2
1755 # Extract subdirectory from the argument.
1756 xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
1757 if test "X$xdir" = "X$arg"; then
1763 pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"`
1764 non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"`
1765 libobjs="$libobjs $pic_object"
1766 non_pic_objects="$non_pic_objects $non_pic_object"
1771 $echo "$modename: link input file \`$save_arg' does not exist"
1779 # We need an absolute path.
1781 [\\/]* | [A-Za-z]:[\\/]*) ;;
1783 $echo "$modename: only absolute run-paths are allowed" 1>&2
1787 if test "$prev" = rpath; then
1790 *) rpath="$rpath $arg" ;;
1795 *) xrpath="$xrpath $arg" ;;
1802 compiler_flags="$compiler_flags $qarg"
1804 compile_command="$compile_command $qarg"
1805 finalize_command="$finalize_command $qarg"
1809 linker_flags="$linker_flags $qarg"
1810 compiler_flags="$compiler_flags $wl$qarg"
1812 compile_command="$compile_command $wl$qarg"
1813 finalize_command="$finalize_command $wl$qarg"
1817 linker_flags="$linker_flags $qarg"
1818 compiler_flags="$compiler_flags $qarg"
1820 compile_command="$compile_command $qarg"
1821 finalize_command="$finalize_command $qarg"
1829 darwin_framework|darwin_framework_skip)
1830 test "$prev" = "darwin_framework" && compiler_flags="$compiler_flags $arg"
1831 compile_command="$compile_command $arg"
1832 finalize_command="$finalize_command $arg"
1837 eval "$prev=\"\$arg\""
1842 fi # test -n "$prev"
1848 if test -n "$link_static_flag"; then
1849 compile_command="$compile_command $link_static_flag"
1850 finalize_command="$finalize_command $link_static_flag"
1856 # FIXME: remove this flag sometime in the future.
1857 $echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2
1881 -export-symbols | -export-symbols-regex)
1882 if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
1883 $echo "$modename: more than one -exported-symbols argument is not allowed"
1886 if test "X$arg" = "X-export-symbols"; then
1894 -framework|-arch|-isysroot)
1896 *" ${arg} ${1} "* | *" ${arg} ${1} "*)
1897 prev=darwin_framework_skip ;;
1898 *) compiler_flags="$compiler_flags $arg"
1899 prev=darwin_framework ;;
1901 compile_command="$compile_command $arg"
1902 finalize_command="$finalize_command $arg"
1911 # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:*
1912 # so, if we see these flags be careful not to treat them like -L
1914 case $with_gcc/$host in
1915 no/*-*-irix* | /*-*-irix*)
1916 compile_command="$compile_command $arg"
1917 finalize_command="$finalize_command $arg"
1924 dir=`$echo "X$arg" | $Xsed -e 's/^-L//'`
1925 # We need an absolute path.
1927 [\\/]* | [A-Za-z]:[\\/]*) ;;
1929 absdir=`cd "$dir" && pwd`
1930 if test -z "$absdir"; then
1931 $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2
1933 notinst_path="$notinst_path $dir"
1941 deplibs="$deplibs -L$dir"
1942 lib_search_path="$lib_search_path $dir"
1946 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
1947 testbindir=`$echo "X$dir" | $Xsed -e 's*/lib$*/bin*'`
1948 case :$dllsearchpath: in
1950 *) dllsearchpath="$dllsearchpath:$dir";;
1952 case :$dllsearchpath: in
1953 *":$testbindir:"*) ;;
1954 *) dllsearchpath="$dllsearchpath:$testbindir";;
1962 if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then
1964 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos*)
1965 # These systems don't actually have a C or math library (as such)
1969 # These systems don't actually have a C library (as such)
1970 test "X$arg" = "X-lc" && continue
1972 *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
1973 # Do not include libc due to us having libc/libc_r.
1974 test "X$arg" = "X-lc" && continue
1976 *-*-rhapsody* | *-*-darwin1.[012])
1977 # Rhapsody C and math libraries are in the System framework
1978 deplibs="$deplibs -framework System"
1981 *-*-sco3.2v5* | *-*-sco5v6*)
1982 # Causes problems with __ctype
1983 test "X$arg" = "X-lc" && continue
1985 *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
1986 # Compiler inserts libc in the correct place for threads to work
1987 test "X$arg" = "X-lc" && continue
1990 elif test "X$arg" = "X-lc_r"; then
1992 *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
1993 # Do not include libc_r directly, use -pthread flag.
1998 deplibs="$deplibs $arg"
2002 # Tru64 UNIX uses -model [arg] to determine the layout of C++
2003 # classes, name mangling, and exception handling.
2005 compile_command="$compile_command $arg"
2006 compiler_flags="$compiler_flags $arg"
2007 finalize_command="$finalize_command $arg"
2012 -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
2013 compiler_flags="$compiler_flags $arg"
2014 compile_command="$compile_command $arg"
2015 finalize_command="$finalize_command $arg"
2024 # -64, -mips[0-9] enable 64-bit mode on the SGI compiler
2025 # -r[0-9][0-9]* specifies the processor on the SGI compiler
2026 # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler
2027 # +DA*, +DD* enable 64-bit mode on the HP compiler
2028 # -q* pass through compiler args for the IBM compiler
2029 # -m* pass through architecture-specific compiler args for GCC
2030 # -m*, -t[45]*, -txscale* pass through architecture-specific
2031 # compiler args for GCC
2032 # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC
2033 # -F/path gives path to uninstalled frameworks, gcc on darwin
2034 # @file GCC response files
2035 -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
2036 -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*)
2038 # Unknown arguments in both finalize_command and compile_command need
2039 # to be aesthetically quoted because they are evaled later.
2040 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
2042 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
2046 compile_command="$compile_command $arg"
2047 finalize_command="$finalize_command $arg"
2048 compiler_flags="$compiler_flags $arg"
2064 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin*)
2065 # The PATH hackery in wrapper scripts is required on Windows
2066 # and Darwin in order for the loader to find any dlls it needs.
2067 $echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2
2068 $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2
2071 *) no_install=yes ;;
2088 -precious-files-regex)
2109 dir=`$echo "X$arg" | $Xsed -e 's/^-R//'`
2110 # We need an absolute path.
2112 [\\/]* | [A-Za-z]:[\\/]*) ;;
2114 $echo "$modename: only absolute run-paths are allowed" 1>&2
2120 *) xrpath="$xrpath $dir" ;;
2125 -static | -static-libtool-libs)
2126 # The effects of -static are defined in a previous loop.
2127 # We used to do the same as -all-static on platforms that
2128 # didn't have a PIC flag, but the assumption that the effects
2129 # would be equivalent was wrong. It would break on at least
2130 # Digital Unix and AIX.
2150 args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'`
2152 save_ifs="$IFS"; IFS=','
2153 for flag in $args; do
2156 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
2161 compiler_flags="$compiler_flags $flag"
2164 arg=`$echo "X$arg" | $Xsed -e "s/^ //"`
2168 args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'`
2170 save_ifs="$IFS"; IFS=','
2171 for flag in $args; do
2174 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
2179 compiler_flags="$compiler_flags $wl$flag"
2180 linker_flags="$linker_flags $flag"
2183 arg=`$echo "X$arg" | $Xsed -e "s/^ //"`
2201 # Some other compiler flag.
2203 # Unknown arguments in both finalize_command and compile_command need
2204 # to be aesthetically quoted because they are evaled later.
2205 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
2207 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
2214 # A standard object.
2219 # A libtool-controlled object.
2221 # Check to see that this really is a libtool object.
2222 if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
2227 # If there is no directory component, then add one.
2229 */* | *\\*) . $arg ;;
2233 if test -z "$pic_object" || \
2234 test -z "$non_pic_object" ||
2235 test "$pic_object" = none && \
2236 test "$non_pic_object" = none; then
2237 $echo "$modename: cannot find name of object for \`$arg'" 1>&2
2241 # Extract subdirectory from the argument.
2242 xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
2243 if test "X$xdir" = "X$arg"; then
2249 if test "$pic_object" != none; then
2250 # Prepend the subdirectory the object is found in.
2251 pic_object="$xdir$pic_object"
2253 if test "$prev" = dlfiles; then
2254 if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
2255 dlfiles="$dlfiles $pic_object"
2259 # If libtool objects are unsupported, then we need to preload.
2264 # CHECK ME: I think I busted this. -Ossama
2265 if test "$prev" = dlprefiles; then
2266 # Preload the old-style object.
2267 dlprefiles="$dlprefiles $pic_object"
2272 libobjs="$libobjs $pic_object"
2277 if test "$non_pic_object" != none; then
2278 # Prepend the subdirectory the object is found in.
2279 non_pic_object="$xdir$non_pic_object"
2281 # A standard non-PIC object
2282 non_pic_objects="$non_pic_objects $non_pic_object"
2283 if test -z "$pic_object" || test "$pic_object" = none ; then
2284 arg="$non_pic_object"
2287 # If the PIC object exists, use it instead.
2288 # $xdir was prepended to $pic_object above.
2289 non_pic_object="$pic_object"
2290 non_pic_objects="$non_pic_objects $non_pic_object"
2293 # Only an error if not doing a dry-run.
2294 if test -z "$run"; then
2295 $echo "$modename: \`$arg' is not a valid libtool object" 1>&2
2300 # Extract subdirectory from the argument.
2301 xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
2302 if test "X$xdir" = "X$arg"; then
2308 pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"`
2309 non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"`
2310 libobjs="$libobjs $pic_object"
2311 non_pic_objects="$non_pic_objects $non_pic_object"
2318 deplibs="$deplibs $arg"
2319 old_deplibs="$old_deplibs $arg"
2324 # A libtool-controlled library.
2326 if test "$prev" = dlfiles; then
2327 # This library was specified with -dlopen.
2328 dlfiles="$dlfiles $arg"
2330 elif test "$prev" = dlprefiles; then
2331 # The library was specified with -dlpreopen.
2332 dlprefiles="$dlprefiles $arg"
2335 deplibs="$deplibs $arg"
2340 # Some other compiler argument.
2342 # Unknown arguments in both finalize_command and compile_command need
2343 # to be aesthetically quoted because they are evaled later.
2344 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
2346 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
2353 # Now actually substitute the argument into the commands.
2354 if test -n "$arg"; then
2355 compile_command="$compile_command $arg"
2356 finalize_command="$finalize_command $arg"
2358 done # argument parsing loop
2360 if test -n "$prev"; then
2361 $echo "$modename: the \`$prevarg' option requires an argument" 1>&2
2366 if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then
2367 eval arg=\"$export_dynamic_flag_spec\"
2368 compile_command="$compile_command $arg"
2369 finalize_command="$finalize_command $arg"
2373 # calculate the name of the file, without its directory
2374 outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'`
2375 libobjs_save="$libobjs"
2377 if test -n "$shlibpath_var"; then
2378 # get the directories listed in $shlibpath_var
2379 eval shlib_search_path=\`\$echo \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\`
2383 eval sys_lib_search_path=\"$sys_lib_search_path_spec\"
2384 eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\"
2386 output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'`
2387 if test "X$output_objdir" = "X$output"; then
2388 output_objdir="$objdir"
2390 output_objdir="$output_objdir/$objdir"
2392 # Create the object directory.
2393 if test ! -d "$output_objdir"; then
2394 $show "$mkdir $output_objdir"
2395 $run $mkdir $output_objdir
2397 if test "$exit_status" -ne 0 && test ! -d "$output_objdir"; then
2402 # Determine the type of output
2405 $echo "$modename: you must specify an output file" 1>&2
2409 *.$libext) linkmode=oldlib ;;
2410 *.lo | *.$objext) linkmode=obj ;;
2411 *.la) linkmode=lib ;;
2412 *) linkmode=prog ;; # Anything else should be a program.
2416 *cygwin* | *mingw* | *pw32*)
2417 # don't eliminate duplications in $postdeps and $predeps
2418 duplicate_compiler_generated_deps=yes
2421 duplicate_compiler_generated_deps=$duplicate_deps
2427 # Find all interdependent deplibs by searching for libraries
2428 # that are linked more than once (e.g. -la -lb -la)
2429 for deplib in $deplibs; do
2430 if test "X$duplicate_deps" = "Xyes" ; then
2432 *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
2435 libs="$libs $deplib"
2438 if test "$linkmode" = lib; then
2439 libs="$predeps $libs $compiler_lib_search_path $postdeps"
2441 # Compute libraries that are listed more than once in $predeps
2442 # $postdeps and mark them as special (i.e., whose duplicates are
2443 # not to be eliminated).
2445 if test "X$duplicate_compiler_generated_deps" = "Xyes" ; then
2446 for pre_post_dep in $predeps $postdeps; do
2447 case "$pre_post_deps " in
2448 *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;;
2450 pre_post_deps="$pre_post_deps $pre_post_dep"
2459 need_relink=no # whether we're linking any uninstalled libtool libraries
2460 notinst_deplibs= # not-installed libtool libraries
2464 for file in $dlfiles $dlprefiles; do
2468 $echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2
2480 passes="conv scan dlopen dlpreopen link"
2485 for pass in $passes; do
2486 if test "$linkmode,$pass" = "lib,link" ||
2487 test "$linkmode,$pass" = "prog,scan"; then
2491 if test "$linkmode" = prog; then
2493 dlopen) libs="$dlfiles" ;;
2494 dlpreopen) libs="$dlprefiles" ;;
2495 link) libs="$deplibs %DEPLIBS% $dependency_libs" ;;
2498 if test "$pass" = dlopen; then
2499 # Collect dlpreopened libraries
2500 save_deplibs="$deplibs"
2503 for deplib in $libs; do
2507 -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
2508 if test "$linkmode,$pass" = "prog,link"; then
2509 compile_deplibs="$deplib $compile_deplibs"
2510 finalize_deplibs="$deplib $finalize_deplibs"
2512 compiler_flags="$compiler_flags $deplib"
2517 if test "$linkmode" != lib && test "$linkmode" != prog; then
2518 $echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2
2521 name=`$echo "X$deplib" | $Xsed -e 's/^-l//'`
2522 for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do
2523 for search_ext in .la $std_shrext .so .a; do
2524 # Search the libtool library
2525 lib="$searchdir/lib${name}${search_ext}"
2526 if test -f "$lib"; then
2527 if test "$search_ext" = ".la"; then
2536 if test "$found" != yes; then
2537 # deplib doesn't seem to be a libtool library
2538 if test "$linkmode,$pass" = "prog,link"; then
2539 compile_deplibs="$deplib $compile_deplibs"
2540 finalize_deplibs="$deplib $finalize_deplibs"
2542 deplibs="$deplib $deplibs"
2543 test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
2546 else # deplib is a libtool library
2547 # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib,
2548 # We need to do some special things here, and not later.
2549 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
2550 case " $predeps $postdeps " in
2552 if (${SED} -e '2q' $lib |
2553 grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
2557 */* | *\\*) . $lib ;;
2560 for l in $old_library $library_names; do
2563 if test "X$ll" = "X$old_library" ; then # only static version available
2565 ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'`
2566 test "X$ladir" = "X$lib" && ladir="."
2567 lib=$ladir/$old_library
2568 if test "$linkmode,$pass" = "prog,link"; then
2569 compile_deplibs="$deplib $compile_deplibs"
2570 finalize_deplibs="$deplib $finalize_deplibs"
2572 deplibs="$deplib $deplibs"
2573 test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
2587 deplibs="$deplib $deplibs"
2588 test "$pass" = conv && continue
2589 newdependency_libs="$deplib $newdependency_libs"
2590 newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
2593 if test "$pass" = conv; then
2594 deplibs="$deplib $deplibs"
2597 if test "$pass" = scan; then
2598 deplibs="$deplib $deplibs"
2600 compile_deplibs="$deplib $compile_deplibs"
2601 finalize_deplibs="$deplib $finalize_deplibs"
2603 newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
2606 $echo "$modename: warning: \`-L' is ignored for archives/objects" 1>&2
2612 if test "$pass" = link; then
2613 dir=`$echo "X$deplib" | $Xsed -e 's/^-R//'`
2614 # Make sure the xrpath contains only unique directories.
2617 *) xrpath="$xrpath $dir" ;;
2620 deplibs="$deplib $deplibs"
2623 *.la) lib="$deplib" ;;
2625 if test "$pass" = conv; then
2626 deplibs="$deplib $deplibs"
2632 case $deplibs_check_method in
2634 set dummy $deplibs_check_method
2635 match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
2636 if eval $echo \"$deplib\" 2>/dev/null \
2638 | $EGREP "$match_pattern_regex" > /dev/null; then
2646 if test "$valid_a_lib" != yes; then
2648 $echo "*** Warning: Trying to link with static lib archive $deplib."
2649 $echo "*** I have the capability to make that library automatically link in when"
2650 $echo "*** you link to this library. But I can only do this if you have a"
2651 $echo "*** shared version of the library, which you do not appear to have"
2652 $echo "*** because the file extensions .$libext of this argument makes me believe"
2653 $echo "*** that it is just a static archive that I should not used here."
2656 $echo "*** Warning: Linking the shared library $output against the"
2657 $echo "*** static library $deplib is not portable!"
2658 deplibs="$deplib $deplibs"
2663 if test "$pass" != link; then
2664 deplibs="$deplib $deplibs"
2666 compile_deplibs="$deplib $compile_deplibs"
2667 finalize_deplibs="$deplib $finalize_deplibs"
2674 if test "$pass" = conv; then
2675 deplibs="$deplib $deplibs"
2676 elif test "$linkmode" = prog; then
2677 if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
2678 # If there is no dlopen support or we're linking statically,
2679 # we need to preload.
2680 newdlprefiles="$newdlprefiles $deplib"
2681 compile_deplibs="$deplib $compile_deplibs"
2682 finalize_deplibs="$deplib $finalize_deplibs"
2684 newdlfiles="$newdlfiles $deplib"
2694 if test "$found" = yes || test -f "$lib"; then :
2696 $echo "$modename: cannot find the library \`$lib' or unhandled argument \`$deplib'" 1>&2
2700 # Check to see that this really is a libtool archive.
2701 if (${SED} -e '2q' $lib | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
2703 $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
2707 ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'`
2708 test "X$ladir" = "X$lib" && ladir="."
2716 # If the library was installed with an old release of libtool,
2717 # it will not redefine variables installed, or shouldnotlink
2725 */* | *\\*) . $lib ;;
2729 if test "$linkmode,$pass" = "lib,link" ||
2730 test "$linkmode,$pass" = "prog,scan" ||
2731 { test "$linkmode" != prog && test "$linkmode" != lib; }; then
2732 test -n "$dlopen" && dlfiles="$dlfiles $dlopen"
2733 test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen"
2736 if test "$pass" = conv; then
2737 # Only check for convenience libraries
2738 deplibs="$lib $deplibs"
2739 if test -z "$libdir"; then
2740 if test -z "$old_library"; then
2741 $echo "$modename: cannot find name of link library for \`$lib'" 1>&2
2744 # It is a libtool convenience library, so add in its objects.
2745 convenience="$convenience $ladir/$objdir/$old_library"
2746 old_convenience="$old_convenience $ladir/$objdir/$old_library"
2748 for deplib in $dependency_libs; do
2749 deplibs="$deplib $deplibs"
2750 if test "X$duplicate_deps" = "Xyes" ; then
2751 case "$tmp_libs " in
2752 *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
2755 tmp_libs="$tmp_libs $deplib"
2757 elif test "$linkmode" != prog && test "$linkmode" != lib; then
2758 $echo "$modename: \`$lib' is not a convenience library" 1>&2
2765 # Get the name of the library we link against.
2767 for l in $old_library $library_names; do
2770 if test -z "$linklib"; then
2771 $echo "$modename: cannot find name of link library for \`$lib'" 1>&2
2775 # This library was specified with -dlopen.
2776 if test "$pass" = dlopen; then
2777 if test -z "$libdir"; then
2778 $echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2
2781 if test -z "$dlname" ||
2782 test "$dlopen_support" != yes ||
2783 test "$build_libtool_libs" = no; then
2784 # If there is no dlname, no dlopen support or we're linking
2785 # statically, we need to preload. We also need to preload any
2786 # dependent libraries so libltdl's deplib preloader doesn't
2787 # bomb out in the load deplibs phase.
2788 dlprefiles="$dlprefiles $lib $dependency_libs"
2790 newdlfiles="$newdlfiles $lib"
2795 # We need an absolute path.
2797 [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;;
2799 abs_ladir=`cd "$ladir" && pwd`
2800 if test -z "$abs_ladir"; then
2801 $echo "$modename: warning: cannot determine absolute directory name of \`$ladir'" 1>&2
2802 $echo "$modename: passing it literally to the linker, although it might fail" 1>&2
2807 laname=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
2809 # Find the relevant object directory and library name.
2810 if test "X$installed" = Xyes; then
2811 if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then
2812 $echo "$modename: warning: library \`$lib' was moved." 1>&2
2820 test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes
2822 if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then
2825 # Remove this search path later
2826 notinst_path="$notinst_path $abs_ladir"
2828 dir="$ladir/$objdir"
2829 absdir="$abs_ladir/$objdir"
2830 # Remove this search path later
2831 notinst_path="$notinst_path $abs_ladir"
2833 fi # $installed = yes
2834 name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
2836 # This library was specified with -dlpreopen.
2837 if test "$pass" = dlpreopen; then
2838 if test -z "$libdir"; then
2839 $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2
2842 # Prefer using a static library (so that no silly _DYNAMIC symbols
2843 # are required to link).
2844 if test -n "$old_library"; then
2845 newdlprefiles="$newdlprefiles $dir/$old_library"
2846 # Otherwise, use the dlname, so that lt_dlopen finds it.
2847 elif test -n "$dlname"; then
2848 newdlprefiles="$newdlprefiles $dir/$dlname"
2850 newdlprefiles="$newdlprefiles $dir/$linklib"
2852 fi # $pass = dlpreopen
2854 if test -z "$libdir"; then
2855 # Link the convenience library
2856 if test "$linkmode" = lib; then
2857 deplibs="$dir/$old_library $deplibs"
2858 elif test "$linkmode,$pass" = "prog,link"; then
2859 compile_deplibs="$dir/$old_library $compile_deplibs"
2860 finalize_deplibs="$dir/$old_library $finalize_deplibs"
2862 deplibs="$lib $deplibs" # used for prog,scan pass
2868 if test "$linkmode" = prog && test "$pass" != link; then
2869 newlib_search_path="$newlib_search_path $ladir"
2870 deplibs="$lib $deplibs"
2873 if test "$link_all_deplibs" != no || test -z "$library_names" ||
2874 test "$build_libtool_libs" = no; then
2879 for deplib in $dependency_libs; do
2881 -L*) newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test
2883 # Need to link against all dependency_libs?
2884 if test "$linkalldeplibs" = yes; then
2885 deplibs="$deplib $deplibs"
2887 # Need to hardcode shared library paths
2888 # or/and link against static libraries
2889 newdependency_libs="$deplib $newdependency_libs"
2891 if test "X$duplicate_deps" = "Xyes" ; then
2892 case "$tmp_libs " in
2893 *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
2896 tmp_libs="$tmp_libs $deplib"
2899 fi # $linkmode = prog...
2901 if test "$linkmode,$pass" = "prog,link"; then
2902 if test -n "$library_names" &&
2903 { { test "$prefer_static_libs" = no ||
2904 test "$prefer_static_libs,$installed" = "built,yes"; } ||
2905 test -z "$old_library"; }; then
2906 # We need to hardcode the library path
2907 if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then
2908 # Make sure the rpath contains only unique directories.
2909 case "$temp_rpath " in
2912 *) temp_rpath="$temp_rpath $absdir" ;;
2916 # Hardcode the library path.
2917 # Skip directories that are in the system default run-time
2919 case " $sys_lib_dlsearch_path " in
2922 case "$compile_rpath " in
2924 *) compile_rpath="$compile_rpath $absdir"
2928 case " $sys_lib_dlsearch_path " in
2931 case "$finalize_rpath " in
2933 *) finalize_rpath="$finalize_rpath $libdir"
2937 fi # $linkmode,$pass = prog,link...
2939 if test "$alldeplibs" = yes &&
2940 { test "$deplibs_check_method" = pass_all ||
2941 { test "$build_libtool_libs" = yes &&
2942 test -n "$library_names"; }; }; then
2943 # We only need to search for static libraries
2948 link_static=no # Whether the deplib will be linked statically
2949 use_static_libs=$prefer_static_libs
2950 if test "$use_static_libs" = built && test "$installed" = yes ; then
2953 if test -n "$library_names" &&
2954 { test "$use_static_libs" = no || test -z "$old_library"; }; then
2955 if test "$installed" = no; then
2956 notinst_deplibs="$notinst_deplibs $lib"
2959 # This is a shared library
2961 # Warn about portability, can't link against -module's on
2962 # some systems (darwin)
2963 if test "$shouldnotlink" = yes && test "$pass" = link ; then
2965 if test "$linkmode" = prog; then
2966 $echo "*** Warning: Linking the executable $output against the loadable module"
2968 $echo "*** Warning: Linking the shared library $output against the loadable module"
2970 $echo "*** $linklib is not portable!"
2972 if test "$linkmode" = lib &&
2973 test "$hardcode_into_libs" = yes; then
2974 # Hardcode the library path.
2975 # Skip directories that are in the system default run-time
2977 case " $sys_lib_dlsearch_path " in
2980 case "$compile_rpath " in
2982 *) compile_rpath="$compile_rpath $absdir"
2986 case " $sys_lib_dlsearch_path " in
2989 case "$finalize_rpath " in
2991 *) finalize_rpath="$finalize_rpath $libdir"
2997 if test -n "$old_archive_from_expsyms_cmds"; then
2998 # figure out the soname
2999 set dummy $library_names
3002 libname=`eval \\$echo \"$libname_spec\"`
3003 # use dlname if we got it. it's perfectly good, no?
3004 if test -n "$dlname"; then
3006 elif test -n "$soname_spec"; then
3010 major=`expr $current - $age`
3014 eval soname=\"$soname_spec\"
3019 # Make a new name for the extract_expsyms_cmds to use
3021 soname=`$echo $soroot | ${SED} -e 's/^.*\///'`
3022 newlib="libimp-`$echo $soname | ${SED} 's/^lib//;s/\.dll$//'`.a"
3024 # If the library has no export list, then create one now
3025 if test -f "$output_objdir/$soname-def"; then :
3027 $show "extracting exported symbol list from \`$soname'"
3028 save_ifs="$IFS"; IFS='~'
3029 cmds=$extract_expsyms_cmds
3030 for cmd in $cmds; do
3034 $run eval "$cmd" || exit $?
3040 if test -f "$output_objdir/$newlib"; then :; else
3041 $show "generating import library for \`$soname'"
3042 save_ifs="$IFS"; IFS='~'
3043 cmds=$old_archive_from_expsyms_cmds
3044 for cmd in $cmds; do
3048 $run eval "$cmd" || exit $?
3052 # make sure the library variables are pointing to the new library
3055 fi # test -n "$old_archive_from_expsyms_cmds"
3057 if test "$linkmode" = prog || test "$mode" != relink; then
3062 case $hardcode_action in
3063 immediate | unsupported)
3064 if test "$hardcode_direct" = no; then
3067 *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;;
3068 *-*-sysv4*uw2*) add_dir="-L$dir" ;;
3069 *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \
3070 *-*-unixware7*) add_dir="-L$dir" ;;
3072 # if the lib is a module then we can not link against
3073 # it, someone is ignoring the new warnings I added
3074 if /usr/bin/file -L $add 2> /dev/null |
3075 $EGREP ": [^:]* bundle" >/dev/null ; then
3076 $echo "** Warning, lib $linklib is a module, not a shared library"
3077 if test -z "$old_library" ; then
3079 $echo "** And there doesn't seem to be a static archive available"
3080 $echo "** The link will probably fail, sorry"
3082 add="$dir/$old_library"
3086 elif test "$hardcode_minus_L" = no; then
3088 *-*-sunos*) add_shlibpath="$dir" ;;
3092 elif test "$hardcode_shlibpath_var" = no; then
3093 add_shlibpath="$dir"
3100 if test "$hardcode_direct" = yes; then
3102 elif test "$hardcode_minus_L" = yes; then
3104 # Try looking first in the location we're being installed to.
3105 if test -n "$inst_prefix_dir"; then
3108 add_dir="$add_dir -L$inst_prefix_dir$libdir"
3113 elif test "$hardcode_shlibpath_var" = yes; then
3114 add_shlibpath="$dir"
3123 if test "$lib_linked" != yes; then
3124 $echo "$modename: configuration error: unsupported hardcode properties"
3128 if test -n "$add_shlibpath"; then
3129 case :$compile_shlibpath: in
3130 *":$add_shlibpath:"*) ;;
3131 *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;;
3134 if test "$linkmode" = prog; then
3135 test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs"
3136 test -n "$add" && compile_deplibs="$add $compile_deplibs"
3138 test -n "$add_dir" && deplibs="$add_dir $deplibs"
3139 test -n "$add" && deplibs="$add $deplibs"
3140 if test "$hardcode_direct" != yes && \
3141 test "$hardcode_minus_L" != yes && \
3142 test "$hardcode_shlibpath_var" = yes; then
3143 case :$finalize_shlibpath: in
3145 *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
3151 if test "$linkmode" = prog || test "$mode" = relink; then
3155 # Finalize command for both is simple: just hardcode it.
3156 if test "$hardcode_direct" = yes; then
3157 add="$libdir/$linklib"
3158 elif test "$hardcode_minus_L" = yes; then
3161 elif test "$hardcode_shlibpath_var" = yes; then
3162 case :$finalize_shlibpath: in
3164 *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
3167 elif test "$hardcode_automatic" = yes; then
3168 if test -n "$inst_prefix_dir" &&
3169 test -f "$inst_prefix_dir$libdir/$linklib" ; then
3170 add="$inst_prefix_dir$libdir/$linklib"
3172 add="$libdir/$linklib"
3175 # We cannot seem to hardcode it, guess we'll fake it.
3177 # Try looking first in the location we're being installed to.
3178 if test -n "$inst_prefix_dir"; then
3181 add_dir="$add_dir -L$inst_prefix_dir$libdir"
3188 if test "$linkmode" = prog; then
3189 test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs"
3190 test -n "$add" && finalize_deplibs="$add $finalize_deplibs"
3192 test -n "$add_dir" && deplibs="$add_dir $deplibs"
3193 test -n "$add" && deplibs="$add $deplibs"
3196 elif test "$linkmode" = prog; then
3197 # Here we assume that one of hardcode_direct or hardcode_minus_L
3198 # is not unsupported. This is valid on all known static and
3200 if test "$hardcode_direct" != unsupported; then
3201 test -n "$old_library" && linklib="$old_library"
3202 compile_deplibs="$dir/$linklib $compile_deplibs"
3203 finalize_deplibs="$dir/$linklib $finalize_deplibs"
3205 compile_deplibs="-l$name -L$dir $compile_deplibs"
3206 finalize_deplibs="-l$name -L$dir $finalize_deplibs"
3208 elif test "$build_libtool_libs" = yes; then
3209 # Not a shared library
3210 if test "$deplibs_check_method" != pass_all; then
3211 # We're trying link a shared library against a static one
3212 # but the system doesn't support it.
3214 # Just print a warning and add the library to dependency_libs so
3215 # that the program can be linked against the static library.
3217 $echo "*** Warning: This system can not link to static lib archive $lib."
3218 $echo "*** I have the capability to make that library automatically link in when"
3219 $echo "*** you link to this library. But I can only do this if you have a"
3220 $echo "*** shared version of the library, which you do not appear to have."
3221 if test "$module" = yes; then
3222 $echo "*** But as you try to build a module library, libtool will still create "
3223 $echo "*** a static module, that should work as long as the dlopening application"
3224 $echo "*** is linked with the -dlopen flag to resolve symbols at runtime."
3225 if test -z "$global_symbol_pipe"; then
3227 $echo "*** However, this would only work if libtool was able to extract symbol"
3228 $echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
3229 $echo "*** not find such a program. So, this module is probably useless."
3230 $echo "*** \`nm' from GNU binutils and a full rebuild may help."
3232 if test "$build_old_libs" = no; then
3233 build_libtool_libs=module
3236 build_libtool_libs=no
3240 deplibs="$dir/$old_library $deplibs"
3243 fi # link shared/static library?
3245 if test "$linkmode" = lib; then
3246 if test -n "$dependency_libs" &&
3247 { test "$hardcode_into_libs" != yes ||
3248 test "$build_old_libs" = yes ||
3249 test "$link_static" = yes; }; then
3250 # Extract -R from dependency_libs
3252 for libdir in $dependency_libs; do
3254 -R*) temp_xrpath=`$echo "X$libdir" | $Xsed -e 's/^-R//'`
3256 *" $temp_xrpath "*) ;;
3257 *) xrpath="$xrpath $temp_xrpath";;
3259 *) temp_deplibs="$temp_deplibs $libdir";;
3262 dependency_libs="$temp_deplibs"
3265 newlib_search_path="$newlib_search_path $absdir"
3266 # Link against this library
3267 test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs"
3268 # ... and its dependency_libs
3270 for deplib in $dependency_libs; do
3271 newdependency_libs="$deplib $newdependency_libs"
3272 if test "X$duplicate_deps" = "Xyes" ; then
3273 case "$tmp_libs " in
3274 *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
3277 tmp_libs="$tmp_libs $deplib"
3280 if test "$link_all_deplibs" != no; then
3281 # Add the search paths of all dependency libraries
3282 for deplib in $dependency_libs; do
3284 -L*) path="$deplib" ;;
3286 dir=`$echo "X$deplib" | $Xsed -e 's%/[^/]*$%%'`
3287 test "X$dir" = "X$deplib" && dir="."
3288 # We need an absolute path.
3290 [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;;
3292 absdir=`cd "$dir" && pwd`
3293 if test -z "$absdir"; then
3294 $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2
3299 if grep "^installed=no" $deplib > /dev/null; then
3300 path="$absdir/$objdir"
3302 eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
3303 if test -z "$libdir"; then
3304 $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
3307 if test "$absdir" != "$libdir"; then
3308 $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2
3315 # we do not want to link against static libs,
3316 # but need to link against shared
3317 eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib`
3318 if test -n "$deplibrary_names" ; then
3319 for tmp in $deplibrary_names ; do
3322 if test -f "$path/$depdepl" ; then
3323 depdepl="$path/$depdepl"
3325 # do not add paths which are already there
3326 case " $newlib_search_path " in
3328 *) newlib_search_path="$newlib_search_path $path";;
3341 # Again, we only want to link against shared libraries
3342 eval tmp_libs=`$echo "X$deplib" | $Xsed -e "s,^\-l,,"`
3343 for tmp in $newlib_search_path ; do
3344 if test -f "$tmp/lib$tmp_libs.dylib" ; then
3345 eval depdepl="$tmp/lib$tmp_libs.dylib"
3356 case " $deplibs " in
3358 *) deplibs="$path $deplibs" ;;
3360 case " $deplibs " in
3362 *) deplibs="$depdepl $deplibs" ;;
3365 fi # link_all_deplibs != no
3367 done # for deplib in $libs
3368 dependency_libs="$newdependency_libs"
3369 if test "$pass" = dlpreopen; then
3370 # Link the dlpreopened libraries before other libraries
3371 for deplib in $save_deplibs; do
3372 deplibs="$deplib $deplibs"
3375 if test "$pass" != dlopen; then
3376 if test "$pass" != conv; then
3377 # Make sure lib_search_path contains only unique directories.
3379 for dir in $newlib_search_path; do
3380 case "$lib_search_path " in
3382 *) lib_search_path="$lib_search_path $dir" ;;
3388 if test "$linkmode,$pass" != "prog,link"; then
3391 vars="compile_deplibs finalize_deplibs"
3393 for var in $vars dependency_libs; do
3394 # Add libraries to $var in reverse order
3395 eval tmp_libs=\"\$$var\"
3397 for deplib in $tmp_libs; do
3398 # FIXME: Pedantically, this is the right thing to do, so
3399 # that some nasty dependency loop isn't accidentally
3401 #new_libs="$deplib $new_libs"
3402 # Pragmatically, this seems to cause very few problems in
3405 -L*) new_libs="$deplib $new_libs" ;;
3408 # And here is the reason: when a library appears more
3409 # than once as an explicit dependence of a library, or
3410 # is implicitly linked in more than once by the
3411 # compiler, it is considered special, and multiple
3412 # occurrences thereof are not removed. Compare this
3413 # with having the same library being listed as a
3414 # dependency of multiple other libraries: in this case,
3415 # we know (pedantically, we assume) the library does not
3416 # need to be listed more than once, so we keep only the
3417 # last copy. This is not always right, but it is rare
3418 # enough that we require users that really mean to play
3419 # such unportable linking tricks to link the library
3420 # using -Wl,-lname, so that libtool does not consider it
3421 # for duplicate removal.
3422 case " $specialdeplibs " in
3423 *" $deplib "*) new_libs="$deplib $new_libs" ;;
3425 case " $new_libs " in
3427 *) new_libs="$deplib $new_libs" ;;
3435 for deplib in $new_libs; do
3438 case " $tmp_libs " in
3440 *) tmp_libs="$tmp_libs $deplib" ;;
3443 *) tmp_libs="$tmp_libs $deplib" ;;
3446 eval $var=\"$tmp_libs\"
3449 # Last step: remove runtime libs from dependency_libs
3450 # (they stay in deplibs)
3452 for i in $dependency_libs ; do
3453 case " $predeps $postdeps $compiler_lib_search_path " in
3458 if test -n "$i" ; then
3459 tmp_libs="$tmp_libs $i"
3462 dependency_libs=$tmp_libs
3464 if test "$linkmode" = prog; then
3465 dlfiles="$newdlfiles"
3466 dlprefiles="$newdlprefiles"
3471 if test -n "$deplibs"; then
3472 $echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2
3475 if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
3476 $echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2
3479 if test -n "$rpath"; then
3480 $echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2
3483 if test -n "$xrpath"; then
3484 $echo "$modename: warning: \`-R' is ignored for archives" 1>&2
3487 if test -n "$vinfo"; then
3488 $echo "$modename: warning: \`-version-info/-version-number' is ignored for archives" 1>&2
3491 if test -n "$release"; then
3492 $echo "$modename: warning: \`-release' is ignored for archives" 1>&2
3495 if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
3496 $echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2
3499 # Now set the variables for building old libraries.
3500 build_libtool_libs=no
3502 objs="$objs$old_deplibs"
3506 # Make sure we only generate libraries of the form `libNAME.la'.
3509 name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
3510 eval shared_ext=\"$shrext_cmds\"
3511 eval libname=\"$libname_spec\"
3514 if test "$module" = no; then
3515 $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2
3519 if test "$need_lib_prefix" != no; then
3520 # Add the "lib" prefix for modules if required
3521 name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
3522 eval shared_ext=\"$shrext_cmds\"
3523 eval libname=\"$libname_spec\"
3525 libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
3530 if test -n "$objs"; then
3531 if test "$deplibs_check_method" != pass_all; then
3532 $echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1
3536 $echo "*** Warning: Linking the shared library $output against the non-libtool"
3537 $echo "*** objects $objs is not portable!"
3538 libobjs="$libobjs $objs"
3542 if test "$dlself" != no; then
3543 $echo "$modename: warning: \`-dlopen self' is ignored for libtool libraries" 1>&2
3547 if test "$#" -gt 2; then
3548 $echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2
3553 if test -z "$rpath"; then
3554 if test "$build_libtool_libs" = yes; then
3555 # Building a libtool convenience library.
3556 # Some compilers have problems with a `.al' extension so
3557 # convenience libraries should have the same extension an
3558 # archive normally would.
3559 oldlibs="$output_objdir/$libname.$libext $oldlibs"
3560 build_libtool_libs=convenience
3564 if test -n "$vinfo"; then
3565 $echo "$modename: warning: \`-version-info/-version-number' is ignored for convenience libraries" 1>&2
3568 if test -n "$release"; then
3569 $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2
3573 # Parse the version information argument.
3574 save_ifs="$IFS"; IFS=':'
3575 set dummy $vinfo 0 0 0
3578 if test -n "$8"; then
3579 $echo "$modename: too many parameters to \`-version-info'" 1>&2
3584 # convert absolute version numbers to libtool ages
3585 # this retains compatibility with .la files and attempts
3586 # to make the code below a bit more comprehensible
3588 case $vinfo_number in
3592 number_revision="$4"
3594 # There are really only two kinds -- those that
3595 # use the current revision as the major version
3596 # and those that subtract age and use age as
3597 # a minor version. But, then there is irix
3598 # which has an extra 1 added just for fun
3600 case $version_type in
3601 darwin|linux|osf|windows|none)
3602 current=`expr $number_major + $number_minor`
3604 revision="$number_revision"
3606 freebsd-aout|freebsd-elf|sunos)
3607 current="$number_major"
3608 revision="$number_minor"
3612 current=`expr $number_major + $number_minor`
3614 revision="$number_minor"
3615 lt_irix_increment=no
3626 # Check that each of the things are valid numbers.
3628 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]) ;;
3630 $echo "$modename: CURRENT \`$current' must be a nonnegative integer" 1>&2
3631 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
3637 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]) ;;
3639 $echo "$modename: REVISION \`$revision' must be a nonnegative integer" 1>&2
3640 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
3646 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]) ;;
3648 $echo "$modename: AGE \`$age' must be a nonnegative integer" 1>&2
3649 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
3654 if test "$age" -gt "$current"; then
3655 $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2
3656 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
3660 # Calculate the version variables.
3664 case $version_type in
3668 # Like Linux, but with the current version available in
3669 # verstring for coding it into the library header
3670 major=.`expr $current - $age`
3671 versuffix="$major.$age.$revision"
3672 # Darwin ld doesn't like 0 for these options...
3673 minor_current=`expr $current + 1`
3674 xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision"
3675 verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
3680 versuffix=".$current.$revision";
3685 versuffix=".$current";
3689 if test "X$lt_irix_increment" = "Xno"; then
3690 major=`expr $current - $age`
3692 major=`expr $current - $age + 1`
3694 case $version_type in
3695 nonstopux) verstring_prefix=nonstopux ;;
3696 *) verstring_prefix=sgi ;;
3698 verstring="$verstring_prefix$major.$revision"
3700 # Add in all the interfaces that we are compatible with.
3702 while test "$loop" -ne 0; do
3703 iface=`expr $revision - $loop`
3704 loop=`expr $loop - 1`
3705 verstring="$verstring_prefix$major.$iface:$verstring"
3708 # Before this point, $major must not contain `.'.
3710 versuffix="$major.$revision"
3714 major=.`expr $current - $age`
3715 versuffix="$major.$age.$revision"
3719 major=.`expr $current - $age`
3720 versuffix=".$current.$age.$revision"
3721 verstring="$current.$age.$revision"
3723 # Add in all the interfaces that we are compatible with.
3725 while test "$loop" -ne 0; do
3726 iface=`expr $current - $loop`
3727 loop=`expr $loop - 1`
3728 verstring="$verstring:${iface}.0"
3731 # Make executables depend on our current version.
3732 verstring="$verstring:${current}.0"
3737 versuffix=".$current.$revision"
3741 # Use '-' rather than '.', since we only want one
3742 # extension on DOS 8.3 filesystems.
3743 major=`expr $current - $age`
3748 $echo "$modename: unknown library version type \`$version_type'" 1>&2
3749 $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
3754 # Clear the version info if we defaulted, and they specified a release.
3755 if test -z "$vinfo" && test -n "$release"; then
3757 case $version_type in
3759 # we can't check for "0.0" in archive_cmds due to quoting
3760 # problems, so we reset it completely
3767 if test "$need_version" = no; then
3774 # Remove version info from name if versioning should be avoided
3775 if test "$avoid_version" = yes && test "$need_version" = no; then
3781 # Check to see if the archive will have undefined symbols.
3782 if test "$allow_undefined" = yes; then
3783 if test "$allow_undefined_flag" = unsupported; then
3784 $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2
3785 build_libtool_libs=no
3789 # Don't allow undefined symbols.
3790 allow_undefined_flag="$no_undefined_flag"
3794 if test "$mode" != relink; then
3795 # Remove our outputs, but don't remove object files since they
3796 # may have been created when compiling PIC objects.
3798 tempremovelist=`$echo "$output_objdir/*"`
3799 for p in $tempremovelist; do
3803 $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*)
3804 if test "X$precious_files_regex" != "X"; then
3805 if echo $p | $EGREP -e "$precious_files_regex" >/dev/null 2>&1
3810 removelist="$removelist $p"
3815 if test -n "$removelist"; then
3816 $show "${rm}r $removelist"
3817 $run ${rm}r $removelist
3821 # Now set the variables for building old libraries.
3822 if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then
3823 oldlibs="$oldlibs $output_objdir/$libname.$libext"
3825 # Transform .lo files to .o files.
3826 oldobjs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP`
3829 # Eliminate all temporary directories.
3830 #for path in $notinst_path; do
3831 # lib_search_path=`$echo "$lib_search_path " | ${SED} -e "s% $path % %g"`
3832 # deplibs=`$echo "$deplibs " | ${SED} -e "s% -L$path % %g"`
3833 # dependency_libs=`$echo "$dependency_libs " | ${SED} -e "s% -L$path % %g"`
3836 if test -n "$xrpath"; then
3837 # If the user specified any rpath flags, then add them.
3839 for libdir in $xrpath; do
3840 temp_xrpath="$temp_xrpath -R$libdir"
3841 case "$finalize_rpath " in
3843 *) finalize_rpath="$finalize_rpath $libdir" ;;
3846 if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then
3847 dependency_libs="$temp_xrpath $dependency_libs"
3851 # Make sure dlfiles contains only unique files that won't be dlpreopened
3852 old_dlfiles="$dlfiles"
3854 for lib in $old_dlfiles; do
3855 case " $dlprefiles $dlfiles " in
3857 *) dlfiles="$dlfiles $lib" ;;
3861 # Make sure dlprefiles contains only unique files
3862 old_dlprefiles="$dlprefiles"
3864 for lib in $old_dlprefiles; do
3865 case "$dlprefiles " in
3867 *) dlprefiles="$dlprefiles $lib" ;;
3871 if test "$build_libtool_libs" = yes; then
3872 if test -n "$rpath"; then
3874 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos*)
3875 # these systems don't actually have a c library (as such)!
3877 *-*-rhapsody* | *-*-darwin1.[012])
3878 # Rhapsody C library is in the System framework
3879 deplibs="$deplibs -framework System"
3882 # Don't link with libc until the a.out ld.so is fixed.
3884 *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
3885 # Do not include libc due to us having libc/libc_r.
3887 *-*-sco3.2v5* | *-*-sco5v6*)
3888 # Causes problems with __ctype
3890 *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
3891 # Compiler inserts libc in the correct place for threads to work
3894 # Add libc to deplibs on all other systems if necessary.
3895 if test "$build_libtool_need_lc" = "yes"; then
3896 deplibs="$deplibs -lc"
3902 # Transform deplibs into only deplibs that can be linked in shared.
3904 libname_save=$libname
3905 release_save=$release
3906 versuffix_save=$versuffix
3908 # I'm not sure if I'm treating the release correctly. I think
3909 # release should show up in the -l (ie -lgmp5) so we don't want to
3910 # add it in twice. Is that correct?
3916 case $deplibs_check_method in
3918 # Don't check for shared/static. Everything works.
3919 # This might be a little naive. We might want to check
3920 # whether the library exists or not. But this is on
3921 # osf3 & osf4 and I'm not really sure... Just
3922 # implementing what was already the behavior.
3926 # This code stresses the "libraries are programs" paradigm to its
3927 # limits. Maybe even breaks it. We compile a program, linking it
3928 # against the deplibs as a proxy for the library. Then we can check
3929 # whether they linked in statically or dynamically with ldd.
3931 cat > conftest.c <<EOF
3932 int main() { return 0; }
3935 if $LTCC $LTCFLAGS -o conftest conftest.c $deplibs; then
3936 ldd_output=`ldd conftest`
3937 for i in $deplibs; do
3938 name=`expr $i : '-l\(.*\)'`
3939 # If $name is empty we are operating on a -L argument.
3940 if test "$name" != "" && test "$name" != "0"; then
3941 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
3942 case " $predeps $postdeps " in
3944 newdeplibs="$newdeplibs $i"
3949 if test -n "$i" ; then
3950 libname=`eval \\$echo \"$libname_spec\"`
3951 deplib_matches=`eval \\$echo \"$library_names_spec\"`
3952 set dummy $deplib_matches
3954 if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
3955 newdeplibs="$newdeplibs $i"
3959 $echo "*** Warning: dynamic linker does not accept needed library $i."
3960 $echo "*** I have the capability to make that library automatically link in when"
3961 $echo "*** you link to this library. But I can only do this if you have a"
3962 $echo "*** shared version of the library, which I believe you do not have"
3963 $echo "*** because a test_compile did reveal that the linker did not use it for"
3964 $echo "*** its dynamic dependency list that programs get resolved with at runtime."
3968 newdeplibs="$newdeplibs $i"
3972 # Error occurred in the first compile. Let's try to salvage
3973 # the situation: Compile a separate program for each library.
3974 for i in $deplibs; do
3975 name=`expr $i : '-l\(.*\)'`
3976 # If $name is empty we are operating on a -L argument.
3977 if test "$name" != "" && test "$name" != "0"; then
3979 if $LTCC $LTCFLAGS -o conftest conftest.c $i; then
3980 ldd_output=`ldd conftest`
3981 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
3982 case " $predeps $postdeps " in
3984 newdeplibs="$newdeplibs $i"
3989 if test -n "$i" ; then
3990 libname=`eval \\$echo \"$libname_spec\"`
3991 deplib_matches=`eval \\$echo \"$library_names_spec\"`
3992 set dummy $deplib_matches
3994 if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
3995 newdeplibs="$newdeplibs $i"
3999 $echo "*** Warning: dynamic linker does not accept needed library $i."
4000 $echo "*** I have the capability to make that library automatically link in when"
4001 $echo "*** you link to this library. But I can only do this if you have a"
4002 $echo "*** shared version of the library, which you do not appear to have"
4003 $echo "*** because a test_compile did reveal that the linker did not use this one"
4004 $echo "*** as a dynamic dependency that programs can get resolved with at runtime."
4010 $echo "*** Warning! Library $i is needed by this library but I was not able to"
4011 $echo "*** make it link in! You will probably need to install it or some"
4012 $echo "*** library that it depends on before this library will be fully"
4013 $echo "*** functional. Installing it before continuing would be even better."
4016 newdeplibs="$newdeplibs $i"
4022 set dummy $deplibs_check_method
4023 file_magic_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
4024 for a_deplib in $deplibs; do
4025 name=`expr $a_deplib : '-l\(.*\)'`
4026 # If $name is empty we are operating on a -L argument.
4027 if test "$name" != "" && test "$name" != "0"; then
4028 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
4029 case " $predeps $postdeps " in
4031 newdeplibs="$newdeplibs $a_deplib"
4036 if test -n "$a_deplib" ; then
4037 libname=`eval \\$echo \"$libname_spec\"`
4038 for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
4039 potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
4040 for potent_lib in $potential_libs; do
4041 # Follow soft links.
4042 if ls -lLd "$potent_lib" 2>/dev/null \
4043 | grep " -> " >/dev/null; then
4046 # The statement above tries to avoid entering an
4047 # endless loop below, in case of cyclic links.
4048 # We might still enter an endless loop, since a link
4049 # loop can be closed while we follow links,
4051 potlib="$potent_lib"
4052 while test -h "$potlib" 2>/dev/null; do
4053 potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'`
4055 [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";;
4056 *) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";;
4059 if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \
4061 | $EGREP "$file_magic_regex" > /dev/null; then
4062 newdeplibs="$newdeplibs $a_deplib"
4069 if test -n "$a_deplib" ; then
4072 $echo "*** Warning: linker path does not have real file for library $a_deplib."
4073 $echo "*** I have the capability to make that library automatically link in when"
4074 $echo "*** you link to this library. But I can only do this if you have a"
4075 $echo "*** shared version of the library, which you do not appear to have"
4076 $echo "*** because I did check the linker path looking for a file starting"
4077 if test -z "$potlib" ; then
4078 $echo "*** with $libname but no candidates were found. (...for file magic test)"
4080 $echo "*** with $libname and none of the candidates passed a file format test"
4081 $echo "*** using a file magic. Last file checked: $potlib"
4085 # Add a -L argument.
4086 newdeplibs="$newdeplibs $a_deplib"
4088 done # Gone through all deplibs.
4091 set dummy $deplibs_check_method
4092 match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
4093 for a_deplib in $deplibs; do
4094 name=`expr $a_deplib : '-l\(.*\)'`
4095 # If $name is empty we are operating on a -L argument.
4096 if test -n "$name" && test "$name" != "0"; then
4097 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
4098 case " $predeps $postdeps " in
4100 newdeplibs="$newdeplibs $a_deplib"
4105 if test -n "$a_deplib" ; then
4106 libname=`eval \\$echo \"$libname_spec\"`
4107 for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
4108 potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
4109 for potent_lib in $potential_libs; do
4110 potlib="$potent_lib" # see symlink-check above in file_magic test
4111 if eval $echo \"$potent_lib\" 2>/dev/null \
4113 | $EGREP "$match_pattern_regex" > /dev/null; then
4114 newdeplibs="$newdeplibs $a_deplib"
4121 if test -n "$a_deplib" ; then
4124 $echo "*** Warning: linker path does not have real file for library $a_deplib."
4125 $echo "*** I have the capability to make that library automatically link in when"
4126 $echo "*** you link to this library. But I can only do this if you have a"
4127 $echo "*** shared version of the library, which you do not appear to have"
4128 $echo "*** because I did check the linker path looking for a file starting"
4129 if test -z "$potlib" ; then
4130 $echo "*** with $libname but no candidates were found. (...for regex pattern test)"
4132 $echo "*** with $libname and none of the candidates passed a file format test"
4133 $echo "*** using a regex pattern. Last file checked: $potlib"
4137 # Add a -L argument.
4138 newdeplibs="$newdeplibs $a_deplib"
4140 done # Gone through all deplibs.
4144 tmp_deplibs=`$echo "X $deplibs" | $Xsed -e 's/ -lc$//' \
4145 -e 's/ -[LR][^ ]*//g'`
4146 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
4147 for i in $predeps $postdeps ; do
4148 # can't use Xsed below, because $i might contain '/'
4149 tmp_deplibs=`$echo "X $tmp_deplibs" | ${SED} -e "1s,^X,," -e "s,$i,,"`
4152 if $echo "X $tmp_deplibs" | $Xsed -e 's/[ ]//g' \
4153 | grep . >/dev/null; then
4155 if test "X$deplibs_check_method" = "Xnone"; then
4156 $echo "*** Warning: inter-library dependencies are not supported in this platform."
4158 $echo "*** Warning: inter-library dependencies are not known to be supported."
4160 $echo "*** All declared inter-library dependencies are being dropped."
4165 versuffix=$versuffix_save
4167 release=$release_save
4168 libname=$libname_save
4172 *-*-rhapsody* | *-*-darwin1.[012])
4173 # On Rhapsody replace the C library is the System framework
4174 newdeplibs=`$echo "X $newdeplibs" | $Xsed -e 's/ -lc / -framework System /'`
4178 if test "$droppeddeps" = yes; then
4179 if test "$module" = yes; then
4181 $echo "*** Warning: libtool could not satisfy all declared inter-library"
4182 $echo "*** dependencies of module $libname. Therefore, libtool will create"
4183 $echo "*** a static module, that should work as long as the dlopening"
4184 $echo "*** application is linked with the -dlopen flag."
4185 if test -z "$global_symbol_pipe"; then
4187 $echo "*** However, this would only work if libtool was able to extract symbol"
4188 $echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
4189 $echo "*** not find such a program. So, this module is probably useless."
4190 $echo "*** \`nm' from GNU binutils and a full rebuild may help."
4192 if test "$build_old_libs" = no; then
4193 oldlibs="$output_objdir/$libname.$libext"
4194 build_libtool_libs=module
4197 build_libtool_libs=no
4200 $echo "*** The inter-library dependencies that have been dropped here will be"
4201 $echo "*** automatically added whenever a program is linked with this library"
4202 $echo "*** or is declared to -dlopen it."
4204 if test "$allow_undefined" = no; then
4206 $echo "*** Since this library must not contain undefined symbols,"
4207 $echo "*** because either the platform does not support them or"
4208 $echo "*** it was explicitly requested with -no-undefined,"
4209 $echo "*** libtool will only create a static version of it."
4210 if test "$build_old_libs" = no; then
4211 oldlibs="$output_objdir/$libname.$libext"
4212 build_libtool_libs=module
4215 build_libtool_libs=no
4220 # Done checking deplibs!
4225 # move library search paths that coincide with paths to not yet
4226 # installed libraries to the beginning of the library search list
4228 for path in $notinst_path; do
4229 case " $new_libs " in
4230 *" -L$path/$objdir "*) ;;
4232 case " $deplibs " in
4233 *" -L$path/$objdir "*)
4234 new_libs="$new_libs -L$path/$objdir" ;;
4239 for deplib in $deplibs; do
4242 case " $new_libs " in
4244 *) new_libs="$new_libs $deplib" ;;
4247 *) new_libs="$new_libs $deplib" ;;
4253 # All the library-specific variables (install_libdir is set above).
4258 # Test again, we may have decided not to build it any more
4259 if test "$build_libtool_libs" = yes; then
4260 if test "$hardcode_into_libs" = yes; then
4261 # Hardcode the library paths
4264 rpath="$finalize_rpath"
4265 test "$mode" != relink && rpath="$compile_rpath$rpath"
4266 for libdir in $rpath; do
4267 if test -n "$hardcode_libdir_flag_spec"; then
4268 if test -n "$hardcode_libdir_separator"; then
4269 if test -z "$hardcode_libdirs"; then
4270 hardcode_libdirs="$libdir"
4272 # Just accumulate the unique libdirs.
4273 case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
4274 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
4277 hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
4282 eval flag=\"$hardcode_libdir_flag_spec\"
4283 dep_rpath="$dep_rpath $flag"
4285 elif test -n "$runpath_var"; then
4286 case "$perm_rpath " in
4288 *) perm_rpath="$perm_rpath $libdir" ;;
4292 # Substitute the hardcoded libdirs into the rpath.
4293 if test -n "$hardcode_libdir_separator" &&
4294 test -n "$hardcode_libdirs"; then
4295 libdir="$hardcode_libdirs"
4296 if test -n "$hardcode_libdir_flag_spec_ld"; then
4297 case $archive_cmds in
4298 *\$LD*) eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" ;;
4299 *) eval dep_rpath=\"$hardcode_libdir_flag_spec\" ;;
4302 eval dep_rpath=\"$hardcode_libdir_flag_spec\"
4305 if test -n "$runpath_var" && test -n "$perm_rpath"; then
4306 # We should set the runpath_var.
4308 for dir in $perm_rpath; do
4311 eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var"
4313 test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs"
4316 shlibpath="$finalize_shlibpath"
4317 test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath"
4318 if test -n "$shlibpath"; then
4319 eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var"
4322 # Get the real and link names of the library.
4323 eval shared_ext=\"$shrext_cmds\"
4324 eval library_names=\"$library_names_spec\"
4325 set dummy $library_names
4329 if test -n "$soname_spec"; then
4330 eval soname=\"$soname_spec\"
4334 if test -z "$dlname"; then
4338 lib="$output_objdir/$realname"
4342 linknames="$linknames $link"
4345 # Use standard objects if they are pic
4346 test -z "$pic_flag" && libobjs=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
4348 # Prepare the list of exported symbols
4349 if test -z "$export_symbols"; then
4350 if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then
4351 $show "generating symbol list for \`$libname.la'"
4352 export_symbols="$output_objdir/$libname.exp"
4353 $run $rm $export_symbols
4354 cmds=$export_symbols_cmds
4355 save_ifs="$IFS"; IFS='~'
4356 for cmd in $cmds; do
4359 if len=`expr "X$cmd" : ".*"` &&
4360 test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
4362 $run eval "$cmd" || exit $?
4363 skipped_export=false
4365 # The command line is too long to execute in one step.
4366 $show "using reloadable object file for export list..."
4368 # Break out early, otherwise skipped_export may be
4369 # set to false by a later but shorter cmd.
4374 if test -n "$export_symbols_regex"; then
4375 $show "$EGREP -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\""
4376 $run eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
4377 $show "$mv \"${export_symbols}T\" \"$export_symbols\""
4378 $run eval '$mv "${export_symbols}T" "$export_symbols"'
4383 if test -n "$export_symbols" && test -n "$include_expsyms"; then
4384 $run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"'
4388 for test_deplib in $deplibs; do
4389 case " $convenience " in
4390 *" $test_deplib "*) ;;
4392 tmp_deplibs="$tmp_deplibs $test_deplib"
4396 deplibs="$tmp_deplibs"
4398 if test -n "$convenience"; then
4399 if test -n "$whole_archive_flag_spec"; then
4400 save_libobjs=$libobjs
4401 eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
4403 gentop="$output_objdir/${outputname}x"
4404 generated="$generated $gentop"
4406 func_extract_archives $gentop $convenience
4407 libobjs="$libobjs $func_extract_archives_result"
4411 if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
4412 eval flag=\"$thread_safe_flag_spec\"
4413 linker_flags="$linker_flags $flag"
4416 # Make a backup of the uninstalled library when relinking
4417 if test "$mode" = relink; then
4418 $run eval '(cd $output_objdir && $rm ${realname}U && $mv $realname ${realname}U)' || exit $?
4421 # Do each of the archive commands.
4422 if test "$module" = yes && test -n "$module_cmds" ; then
4423 if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
4424 eval test_cmds=\"$module_expsym_cmds\"
4425 cmds=$module_expsym_cmds
4427 eval test_cmds=\"$module_cmds\"
4431 if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
4432 eval test_cmds=\"$archive_expsym_cmds\"
4433 cmds=$archive_expsym_cmds
4435 eval test_cmds=\"$archive_cmds\"
4440 if test "X$skipped_export" != "X:" &&
4441 len=`expr "X$test_cmds" : ".*" 2>/dev/null` &&
4442 test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
4445 # The command line is too long to link in one step, link piecewise.
4446 $echo "creating reloadable object files..."
4448 # Save the value of $output and $libobjs because we want to
4449 # use them later. If we have whole_archive_flag_spec, we
4450 # want to use save_libobjs as it was before
4451 # whole_archive_flag_spec was expanded, because we can't
4452 # assume the linker understands whole_archive_flag_spec.
4453 # This may have to be revisited, in case too many
4454 # convenience libraries get linked in and end up exceeding
4456 if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then
4457 save_libobjs=$libobjs
4460 output_la=`$echo "X$output" | $Xsed -e "$basename"`
4462 # Clear the reloadable object creation command queue and
4463 # initialize k to one.
4470 output=$output_objdir/$output_la-${k}.$objext
4471 # Loop over the list of objects to be linked.
4472 for obj in $save_libobjs
4474 eval test_cmds=\"$reload_cmds $objlist $last_robj\"
4475 if test "X$objlist" = X ||
4476 { len=`expr "X$test_cmds" : ".*" 2>/dev/null` &&
4477 test "$len" -le "$max_cmd_len"; }; then
4478 objlist="$objlist $obj"
4480 # The command $test_cmds is almost too long, add a
4481 # command to the queue.
4482 if test "$k" -eq 1 ; then
4483 # The first file doesn't have a previous command to add.
4484 eval concat_cmds=\"$reload_cmds $objlist $last_robj\"
4486 # All subsequent reloadable object files will link in
4487 # the last one created.
4488 eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj\"
4490 last_robj=$output_objdir/$output_la-${k}.$objext
4492 output=$output_objdir/$output_la-${k}.$objext
4497 # Handle the remaining objects by creating one last
4498 # reloadable object file. All subsequent reloadable object
4499 # files will link in the last one created.
4500 test -z "$concat_cmds" || concat_cmds=$concat_cmds~
4501 eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\"
4503 if ${skipped_export-false}; then
4504 $show "generating symbol list for \`$libname.la'"
4505 export_symbols="$output_objdir/$libname.exp"
4506 $run $rm $export_symbols
4508 # Append the command to create the export file.
4509 eval concat_cmds=\"\$concat_cmds~$export_symbols_cmds\"
4512 # Set up a command to remove the reloadable object files
4513 # after they are used.
4515 while test "$i" -lt "$k"
4518 delfiles="$delfiles $output_objdir/$output_la-${i}.$objext"
4521 $echo "creating a temporary reloadable object file: $output"
4523 # Loop through the commands generated above and execute them.
4524 save_ifs="$IFS"; IFS='~'
4525 for cmd in $concat_cmds; do
4528 $run eval "$cmd" || exit $?
4533 # Restore the value of output.
4536 if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then
4537 eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
4539 # Expand the library linking commands again to reset the
4540 # value of $libobjs for piecewise linking.
4542 # Do each of the archive commands.
4543 if test "$module" = yes && test -n "$module_cmds" ; then
4544 if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
4545 cmds=$module_expsym_cmds
4550 if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
4551 cmds=$archive_expsym_cmds
4557 # Append the command to remove the reloadable object files
4558 # to the just-reset $cmds.
4559 eval cmds=\"\$cmds~\$rm $delfiles\"
4561 save_ifs="$IFS"; IFS='~'
4562 for cmd in $cmds; do
4566 $run eval "$cmd" || {
4569 # Restore the uninstalled library and exit
4570 if test "$mode" = relink; then
4571 $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)'
4579 # Restore the uninstalled library and exit
4580 if test "$mode" = relink; then
4581 $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' || exit $?
4583 if test -n "$convenience"; then
4584 if test -z "$whole_archive_flag_spec"; then
4585 $show "${rm}r $gentop"
4586 $run ${rm}r "$gentop"
4593 # Create links to the real library.
4594 for linkname in $linknames; do
4595 if test "$realname" != "$linkname"; then
4596 $show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)"
4597 $run eval '(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)' || exit $?
4601 # If -module or -export-dynamic was specified, set the dlname.
4602 if test "$module" = yes || test "$export_dynamic" = yes; then
4603 # On all known operating systems, these are identical.
4610 if test -n "$deplibs"; then
4611 $echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2
4614 if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
4615 $echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2
4618 if test -n "$rpath"; then
4619 $echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2
4622 if test -n "$xrpath"; then
4623 $echo "$modename: warning: \`-R' is ignored for objects" 1>&2
4626 if test -n "$vinfo"; then
4627 $echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2
4630 if test -n "$release"; then
4631 $echo "$modename: warning: \`-release' is ignored for objects" 1>&2
4636 if test -n "$objs$old_deplibs"; then
4637 $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2
4641 obj=`$echo "X$output" | $Xsed -e "$lo2o"`
4649 # Delete the old objects.
4650 $run $rm $obj $libobj
4652 # Objects from convenience libraries. This assumes
4653 # single-version convenience libraries. Whenever we create
4654 # different ones for PIC/non-PIC, this we'll have to duplicate
4658 # reload_cmds runs $LD directly, so let us get rid of
4659 # -Wl from whole_archive_flag_spec and hope we can get by with
4660 # turning comma into space..
4663 if test -n "$convenience"; then
4664 if test -n "$whole_archive_flag_spec"; then
4665 eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\"
4666 reload_conv_objs=$reload_objs\ `$echo "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'`
4668 gentop="$output_objdir/${obj}x"
4669 generated="$generated $gentop"
4671 func_extract_archives $gentop $convenience
4672 reload_conv_objs="$reload_objs $func_extract_archives_result"
4676 # Create the old-style object.
4677 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
4681 save_ifs="$IFS"; IFS='~'
4682 for cmd in $cmds; do
4686 $run eval "$cmd" || exit $?
4690 # Exit if we aren't doing a library object file.
4691 if test -z "$libobj"; then
4692 if test -n "$gentop"; then
4693 $show "${rm}r $gentop"
4700 if test "$build_libtool_libs" != yes; then
4701 if test -n "$gentop"; then
4702 $show "${rm}r $gentop"
4706 # Create an invalid libtool object if no PIC, so that we don't
4707 # accidentally link it into a program.
4708 # $show "echo timestamp > $libobj"
4709 # $run eval "echo timestamp > $libobj" || exit $?
4713 if test -n "$pic_flag" || test "$pic_mode" != default; then
4714 # Only do commands if we really have different PIC objects.
4715 reload_objs="$libobjs $reload_conv_objs"
4718 save_ifs="$IFS"; IFS='~'
4719 for cmd in $cmds; do
4723 $run eval "$cmd" || exit $?
4728 if test -n "$gentop"; then
4729 $show "${rm}r $gentop"
4738 *cygwin*) output=`$echo $output | ${SED} -e 's,.exe$,,;s,$,.exe,'` ;;
4740 if test -n "$vinfo"; then
4741 $echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2
4744 if test -n "$release"; then
4745 $echo "$modename: warning: \`-release' is ignored for programs" 1>&2
4748 if test "$preload" = yes; then
4749 if test "$dlopen_support" = unknown && test "$dlopen_self" = unknown &&
4750 test "$dlopen_self_static" = unknown; then
4751 $echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support."
4756 *-*-rhapsody* | *-*-darwin1.[012])
4757 # On Rhapsody replace the C library is the System framework
4758 compile_deplibs=`$echo "X $compile_deplibs" | $Xsed -e 's/ -lc / -framework System /'`
4759 finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'`
4765 # Don't allow lazy linking, it breaks C++ global constructors
4766 if test "$tagname" = CXX ; then
4767 compile_command="$compile_command ${wl}-bind_at_load"
4768 finalize_command="$finalize_command ${wl}-bind_at_load"
4774 # move library search paths that coincide with paths to not yet
4775 # installed libraries to the beginning of the library search list
4777 for path in $notinst_path; do
4778 case " $new_libs " in
4779 *" -L$path/$objdir "*) ;;
4781 case " $compile_deplibs " in
4782 *" -L$path/$objdir "*)
4783 new_libs="$new_libs -L$path/$objdir" ;;
4788 for deplib in $compile_deplibs; do
4791 case " $new_libs " in
4793 *) new_libs="$new_libs $deplib" ;;
4796 *) new_libs="$new_libs $deplib" ;;
4799 compile_deplibs="$new_libs"
4802 compile_command="$compile_command $compile_deplibs"
4803 finalize_command="$finalize_command $finalize_deplibs"
4805 if test -n "$rpath$xrpath"; then
4806 # If the user specified any rpath flags, then add them.
4807 for libdir in $rpath $xrpath; do
4808 # This is the magic to use -rpath.
4809 case "$finalize_rpath " in
4811 *) finalize_rpath="$finalize_rpath $libdir" ;;
4816 # Now hardcode the library paths
4819 for libdir in $compile_rpath $finalize_rpath; do
4820 if test -n "$hardcode_libdir_flag_spec"; then
4821 if test -n "$hardcode_libdir_separator"; then
4822 if test -z "$hardcode_libdirs"; then
4823 hardcode_libdirs="$libdir"
4825 # Just accumulate the unique libdirs.
4826 case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
4827 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
4830 hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
4835 eval flag=\"$hardcode_libdir_flag_spec\"
4836 rpath="$rpath $flag"
4838 elif test -n "$runpath_var"; then
4839 case "$perm_rpath " in
4841 *) perm_rpath="$perm_rpath $libdir" ;;
4845 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
4846 testbindir=`$echo "X$libdir" | $Xsed -e 's*/lib$*/bin*'`
4847 case :$dllsearchpath: in
4849 *) dllsearchpath="$dllsearchpath:$libdir";;
4851 case :$dllsearchpath: in
4852 *":$testbindir:"*) ;;
4853 *) dllsearchpath="$dllsearchpath:$testbindir";;
4858 # Substitute the hardcoded libdirs into the rpath.
4859 if test -n "$hardcode_libdir_separator" &&
4860 test -n "$hardcode_libdirs"; then
4861 libdir="$hardcode_libdirs"
4862 eval rpath=\" $hardcode_libdir_flag_spec\"
4864 compile_rpath="$rpath"
4868 for libdir in $finalize_rpath; do
4869 if test -n "$hardcode_libdir_flag_spec"; then
4870 if test -n "$hardcode_libdir_separator"; then
4871 if test -z "$hardcode_libdirs"; then
4872 hardcode_libdirs="$libdir"
4874 # Just accumulate the unique libdirs.
4875 case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
4876 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
4879 hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
4884 eval flag=\"$hardcode_libdir_flag_spec\"
4885 rpath="$rpath $flag"
4887 elif test -n "$runpath_var"; then
4888 case "$finalize_perm_rpath " in
4890 *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;;
4894 # Substitute the hardcoded libdirs into the rpath.
4895 if test -n "$hardcode_libdir_separator" &&
4896 test -n "$hardcode_libdirs"; then
4897 libdir="$hardcode_libdirs"
4898 eval rpath=\" $hardcode_libdir_flag_spec\"
4900 finalize_rpath="$rpath"
4902 if test -n "$libobjs" && test "$build_old_libs" = yes; then
4903 # Transform all the library objects into standard objects.
4904 compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
4905 finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
4909 if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
4910 if test -n "$NM" && test -n "$global_symbol_pipe"; then
4911 dlsyms="${outputname}S.c"
4913 $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2
4917 if test -n "$dlsyms"; then
4921 # Discover the nlist of each of the dlfiles.
4922 nlist="$output_objdir/${outputname}.nm"
4924 $show "$rm $nlist ${nlist}S ${nlist}T"
4925 $run $rm "$nlist" "${nlist}S" "${nlist}T"
4927 # Parse the name list into a source file.
4928 $show "creating $output_objdir/$dlsyms"
4930 test -z "$run" && $echo > "$output_objdir/$dlsyms" "\
4931 /* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */
4932 /* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */
4938 /* Prevent the only kind of declaration conflicts we can make. */
4939 #define lt_preloaded_symbols some_other_symbol
4941 /* External symbol declarations for the compiler. */\
4944 if test "$dlself" = yes; then
4945 $show "generating symbol list for \`$output'"
4947 test -z "$run" && $echo ': @PROGRAM@ ' > "$nlist"
4949 # Add our own program objects to the symbol list.
4950 progfiles=`$echo "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
4951 for arg in $progfiles; do
4952 $show "extracting global C symbols from \`$arg'"
4953 $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
4956 if test -n "$exclude_expsyms"; then
4957 $run eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T'
4958 $run eval '$mv "$nlist"T "$nlist"'
4961 if test -n "$export_symbols_regex"; then
4962 $run eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T'
4963 $run eval '$mv "$nlist"T "$nlist"'
4966 # Prepare the list of exported symbols
4967 if test -z "$export_symbols"; then
4968 export_symbols="$output_objdir/$outputname.exp"
4969 $run $rm $export_symbols
4970 $run eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
4972 *cygwin* | *mingw* )
4973 $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
4974 $run eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"'
4978 $run eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"'
4979 $run eval 'grep -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T'
4980 $run eval 'mv "$nlist"T "$nlist"'
4982 *cygwin* | *mingw* )
4983 $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
4984 $run eval 'cat "$nlist" >> "$output_objdir/$outputname.def"'
4990 for arg in $dlprefiles; do
4991 $show "extracting global C symbols from \`$arg'"
4992 name=`$echo "$arg" | ${SED} -e 's%^.*/%%'`
4993 $run eval '$echo ": $name " >> "$nlist"'
4994 $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
4997 if test -z "$run"; then
4998 # Make sure we have at least an empty file.
4999 test -f "$nlist" || : > "$nlist"
5001 if test -n "$exclude_expsyms"; then
5002 $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T
5003 $mv "$nlist"T "$nlist"
5006 # Try sorting and uniquifying the output.
5007 if grep -v "^: " < "$nlist" |
5008 if sort -k 3 </dev/null >/dev/null 2>&1; then
5013 uniq > "$nlist"S; then
5016 grep -v "^: " < "$nlist" > "$nlist"S
5019 if test -f "$nlist"S; then
5020 eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$dlsyms"'
5022 $echo '/* NONE */' >> "$output_objdir/$dlsyms"
5025 $echo >> "$output_objdir/$dlsyms" "\
5027 #undef lt_preloaded_symbols
5029 #if defined (__STDC__) && __STDC__
5030 # define lt_ptr void *
5032 # define lt_ptr char *
5036 /* The mapping between symbol names and symbols. */
5040 *cygwin* | *mingw* )
5041 $echo >> "$output_objdir/$dlsyms" "\
5042 /* DATA imports from DLLs on WIN32 can't be const, because
5043 runtime relocations are performed -- see ld's documentation
5049 $echo >> "$output_objdir/$dlsyms" "\
5056 $echo >> "$output_objdir/$dlsyms" "\
5060 lt_preloaded_symbols[] =
5064 eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$dlsyms"
5066 $echo >> "$output_objdir/$dlsyms" "\
5070 /* This works around a problem in FreeBSD linker */
5071 #ifdef FREEBSD_WORKAROUND
5072 static const void *lt_preloaded_setup() {
5073 return lt_preloaded_symbols;
5083 pic_flag_for_symtable=
5085 # compiling the symbol table file with pic_flag works around
5086 # a FreeBSD bug that causes programs to crash when -lm is
5087 # linked before any other PIC object. But we must not use
5088 # pic_flag when linking with -static. The problem exists in
5089 # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1.
5090 *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
5091 case "$compile_command " in
5093 *) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND";;
5096 case "$compile_command " in
5098 *) pic_flag_for_symtable=" $pic_flag";;
5102 # Now compile the dynamic symbol file.
5103 $show "(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")"
5104 $run eval '(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $?
5106 # Clean up the generated files.
5107 $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T"
5108 $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T"
5110 # Transform the symbol file into the correct name.
5112 *cygwin* | *mingw* )
5113 if test -f "$output_objdir/${outputname}.def" ; then
5114 compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP`
5115 finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP`
5117 compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
5118 finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
5122 compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
5123 finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
5128 $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2
5133 # We keep going just in case the user didn't refer to
5134 # lt_preloaded_symbols. The linker will fail if global_symbol_pipe
5135 # really was required.
5137 # Nullify the symbol file.
5138 compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP`
5139 finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP`
5142 if test "$need_relink" = no || test "$build_libtool_libs" != yes; then
5143 # Replace the output file specification.
5144 compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$output"'%g' | $NL2SP`
5145 link_command="$compile_command$compile_rpath"
5147 # We have no uninstalled library dependencies, so finalize right now.
5148 $show "$link_command"
5149 $run eval "$link_command"
5152 # Delete the generated files.
5153 if test -n "$dlsyms"; then
5154 $show "$rm $output_objdir/${outputname}S.${objext}"
5155 $run $rm "$output_objdir/${outputname}S.${objext}"
5161 if test -n "$shlibpath_var"; then
5162 # We should set the shlibpath_var
5164 for dir in $temp_rpath; do
5166 [\\/]* | [A-Za-z]:[\\/]*)
5171 # Relative path: add a thisdir entry.
5172 rpath="$rpath\$thisdir/$dir:"
5179 if test -n "$compile_shlibpath$finalize_shlibpath"; then
5180 compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command"
5182 if test -n "$finalize_shlibpath"; then
5183 finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command"
5188 if test -n "$runpath_var"; then
5189 if test -n "$perm_rpath"; then
5190 # We should set the runpath_var.
5192 for dir in $perm_rpath; do
5195 compile_var="$runpath_var=\"$rpath\$$runpath_var\" "
5197 if test -n "$finalize_perm_rpath"; then
5198 # We should set the runpath_var.
5200 for dir in $finalize_perm_rpath; do
5203 finalize_var="$runpath_var=\"$rpath\$$runpath_var\" "
5207 if test "$no_install" = yes; then
5208 # We don't need to create a wrapper script.
5209 link_command="$compile_var$compile_command$compile_rpath"
5210 # Replace the output file specification.
5211 link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
5212 # Delete the old output file.
5214 # Link the executable and exit
5215 $show "$link_command"
5216 $run eval "$link_command" || exit $?
5220 if test "$hardcode_action" = relink; then
5221 # Fast installation is not supported
5222 link_command="$compile_var$compile_command$compile_rpath"
5223 relink_command="$finalize_var$finalize_command$finalize_rpath"
5225 $echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2
5226 $echo "$modename: \`$output' will be relinked during installation" 1>&2
5228 if test "$fast_install" != no; then
5229 link_command="$finalize_var$compile_command$finalize_rpath"
5230 if test "$fast_install" = yes; then
5231 relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $SP2NL | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g' | $NL2SP`
5233 # fast_install is set to needless
5237 link_command="$compile_var$compile_command$compile_rpath"
5238 relink_command="$finalize_var$finalize_command$finalize_rpath"
5242 # Replace the output file specification.
5243 link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
5245 # Delete the old output files.
5246 $run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname
5248 $show "$link_command"
5249 $run eval "$link_command" || exit $?
5251 # Now create the wrapper script.
5252 $show "creating $output"
5254 # Quote the relink command for shipping.
5255 if test -n "$relink_command"; then
5256 # Preserve any variables that may affect compiler behavior
5257 for var in $variables_saved_for_relink; do
5258 if eval test -z \"\${$var+set}\"; then
5259 relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command"
5260 elif eval var_value=\$$var; test -z "$var_value"; then
5261 relink_command="$var=; export $var; $relink_command"
5263 var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"`
5264 relink_command="$var=\"$var_value\"; export $var; $relink_command"
5267 relink_command="(cd `pwd`; $relink_command)"
5268 relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP`
5271 # Quote $echo for shipping.
5272 if test "X$echo" = "X$SHELL $progpath --fallback-echo"; then
5274 [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";;
5275 *) qecho="$SHELL `pwd`/$progpath --fallback-echo";;
5277 qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"`
5279 qecho=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"`
5282 # Only actually do things if our run command is non-null.
5283 if test -z "$run"; then
5284 # win32 will think the script is a binary if it has
5285 # a .exe suffix, so we strip it off here.
5287 *.exe) output=`$echo $output|${SED} 's,.exe$,,'` ;;
5289 # test for cygwin because mv fails w/o .exe extensions
5293 outputname=`$echo $outputname|${SED} 's,.exe$,,'` ;;
5297 *cygwin* | *mingw* )
5298 output_name=`basename $output`
5299 output_path=`dirname $output`
5300 cwrappersource="$output_path/$objdir/lt-$output_name.c"
5301 cwrapper="$output_path/$output_name.exe"
5302 $rm $cwrappersource $cwrapper
5303 trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15
5305 cat > $cwrappersource <<EOF
5307 /* $cwrappersource - temporary wrapper executable for $objdir/$outputname
5308 Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
5310 The $output program cannot be directly executed until all the libtool
5311 libraries that it depends on are installed.
5313 This wrapper executable should never be moved out of the build directory.
5314 If it is, it will not operate correctly.
5316 Currently, it simply execs the wrapper *script* "/bin/sh $output",
5317 but could eventually absorb all of the scripts functionality and
5318 exec $objdir/$outputname directly.
5321 cat >> $cwrappersource<<"EOF"
5330 #include <sys/stat.h>
5332 #if defined(PATH_MAX)
5333 # define LT_PATHMAX PATH_MAX
5334 #elif defined(MAXPATHLEN)
5335 # define LT_PATHMAX MAXPATHLEN
5337 # define LT_PATHMAX 1024
5340 #ifndef DIR_SEPARATOR
5341 # define DIR_SEPARATOR '/'
5342 # define PATH_SEPARATOR ':'
5345 #if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \
5347 # define HAVE_DOS_BASED_FILE_SYSTEM
5348 # ifndef DIR_SEPARATOR_2
5349 # define DIR_SEPARATOR_2 '\\'
5351 # ifndef PATH_SEPARATOR_2
5352 # define PATH_SEPARATOR_2 ';'
5356 #ifndef DIR_SEPARATOR_2
5357 # define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR)
5358 #else /* DIR_SEPARATOR_2 */
5359 # define IS_DIR_SEPARATOR(ch) \
5360 (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2))
5361 #endif /* DIR_SEPARATOR_2 */
5363 #ifndef PATH_SEPARATOR_2
5364 # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR)
5365 #else /* PATH_SEPARATOR_2 */
5366 # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2)
5367 #endif /* PATH_SEPARATOR_2 */
5369 #define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type)))
5370 #define XFREE(stale) do { \
5371 if (stale) { free ((void *) stale); stale = 0; } \
5374 /* -DDEBUG is fairly common in CFLAGS. */
5376 #if defined DEBUGWRAPPER
5377 # define DEBUG(format, ...) fprintf(stderr, format, __VA_ARGS__)
5379 # define DEBUG(format, ...)
5382 const char *program_name = NULL;
5384 void * xmalloc (size_t num);
5385 char * xstrdup (const char *string);
5386 const char * base_name (const char *name);
5387 char * find_executable(const char *wrapper);
5388 int check_executable(const char *path);
5389 char * strendzap(char *str, const char *pat);
5390 void lt_fatal (const char *message, ...);
5393 main (int argc, char *argv[])
5398 program_name = (char *) xstrdup (base_name (argv[0]));
5399 DEBUG("(main) argv[0] : %s\n",argv[0]);
5400 DEBUG("(main) program_name : %s\n",program_name);
5401 newargz = XMALLOC(char *, argc+2);
5404 cat >> $cwrappersource <<EOF
5405 newargz[0] = (char *) xstrdup("$SHELL");
5408 cat >> $cwrappersource <<"EOF"
5409 newargz[1] = find_executable(argv[0]);
5410 if (newargz[1] == NULL)
5411 lt_fatal("Couldn't find %s", argv[0]);
5412 DEBUG("(main) found exe at : %s\n",newargz[1]);
5413 /* we know the script has the same name, without the .exe */
5414 /* so make sure newargz[1] doesn't end in .exe */
5415 strendzap(newargz[1],".exe");
5416 for (i = 1; i < argc; i++)
5417 newargz[i+1] = xstrdup(argv[i]);
5418 newargz[argc+1] = NULL;
5420 for (i=0; i<argc+1; i++)
5422 DEBUG("(main) newargz[%d] : %s\n",i,newargz[i]);
5430 cat >> $cwrappersource <<EOF
5431 execv("$SHELL",(char const **)newargz);
5435 cat >> $cwrappersource <<EOF
5436 execv("$SHELL",newargz);
5441 cat >> $cwrappersource <<"EOF"
5446 xmalloc (size_t num)
5448 void * p = (void *) malloc (num);
5450 lt_fatal ("Memory exhausted");
5456 xstrdup (const char *string)
5458 return string ? strcpy ((char *) xmalloc (strlen (string) + 1), string) : NULL
5463 base_name (const char *name)
5467 #if defined (HAVE_DOS_BASED_FILE_SYSTEM)
5468 /* Skip over the disk name in MSDOS pathnames. */
5469 if (isalpha ((unsigned char)name[0]) && name[1] == ':')
5473 for (base = name; *name; name++)
5474 if (IS_DIR_SEPARATOR (*name))
5480 check_executable(const char * path)
5484 DEBUG("(check_executable) : %s\n", path ? (*path ? path : "EMPTY!") : "NULL!");
5485 if ((!path) || (!*path))
5488 if ((stat (path, &st) >= 0) &&
5490 /* MinGW & native WIN32 do not support S_IXOTH or S_IXGRP */
5491 #if defined (S_IXOTH)
5492 ((st.st_mode & S_IXOTH) == S_IXOTH) ||
5494 #if defined (S_IXGRP)
5495 ((st.st_mode & S_IXGRP) == S_IXGRP) ||
5497 ((st.st_mode & S_IXUSR) == S_IXUSR))
5504 /* Searches for the full path of the wrapper. Returns
5505 newly allocated full path name if found, NULL otherwise */
5507 find_executable (const char* wrapper)
5512 /* static buffer for getcwd */
5513 char tmp[LT_PATHMAX + 1];
5517 DEBUG("(find_executable) : %s\n", wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!");
5519 if ((wrapper == NULL) || (*wrapper == '\0'))
5522 /* Absolute path? */
5523 #if defined (HAVE_DOS_BASED_FILE_SYSTEM)
5524 if (isalpha ((unsigned char)wrapper[0]) && wrapper[1] == ':')
5526 concat_name = xstrdup (wrapper);
5527 if (check_executable(concat_name))
5534 if (IS_DIR_SEPARATOR (wrapper[0]))
5536 concat_name = xstrdup (wrapper);
5537 if (check_executable(concat_name))
5541 #if defined (HAVE_DOS_BASED_FILE_SYSTEM)
5545 for (p = wrapper; *p; p++)
5553 /* no slashes; search PATH */
5554 const char* path = getenv ("PATH");
5557 for (p = path; *p; p = p_next)
5561 for (q = p; *q; q++)
5562 if (IS_PATH_SEPARATOR(*q))
5565 p_next = (*q == '\0' ? q : q + 1);
5568 /* empty path: current directory */
5569 if (getcwd (tmp, LT_PATHMAX) == NULL)
5570 lt_fatal ("getcwd failed");
5571 tmp_len = strlen(tmp);
5572 concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1);
5573 memcpy (concat_name, tmp, tmp_len);
5574 concat_name[tmp_len] = '/';
5575 strcpy (concat_name + tmp_len + 1, wrapper);
5579 concat_name = XMALLOC(char, p_len + 1 + strlen(wrapper) + 1);
5580 memcpy (concat_name, p, p_len);
5581 concat_name[p_len] = '/';
5582 strcpy (concat_name + p_len + 1, wrapper);
5584 if (check_executable(concat_name))
5589 /* not found in PATH; assume curdir */
5591 /* Relative path | not found in path: prepend cwd */
5592 if (getcwd (tmp, LT_PATHMAX) == NULL)
5593 lt_fatal ("getcwd failed");
5594 tmp_len = strlen(tmp);
5595 concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1);
5596 memcpy (concat_name, tmp, tmp_len);
5597 concat_name[tmp_len] = '/';
5598 strcpy (concat_name + tmp_len + 1, wrapper);
5600 if (check_executable(concat_name))
5607 strendzap(char *str, const char *pat)
5611 assert(str != NULL);
5612 assert(pat != NULL);
5615 patlen = strlen(pat);
5619 str += len - patlen;
5620 if (strcmp(str, pat) == 0)
5627 lt_error_core (int exit_status, const char * mode,
5628 const char * message, va_list ap)
5630 fprintf (stderr, "%s: %s: ", program_name, mode);
5631 vfprintf (stderr, message, ap);
5632 fprintf (stderr, ".\n");
5634 if (exit_status >= 0)
5639 lt_fatal (const char *message, ...)
5642 va_start (ap, message);
5643 lt_error_core (EXIT_FAILURE, "FATAL", message, ap);
5647 # we should really use a build-platform specific compiler
5648 # here, but OTOH, the wrappers (shell script and this C one)
5649 # are only useful if you want to execute the "real" binary.
5650 # Since the "real" binary is built for $host, then this
5651 # wrapper might as well be built for $host, too.
5652 $run $LTCC $LTCFLAGS -s -o $cwrapper $cwrappersource
5656 trap "$rm $output; exit $EXIT_FAILURE" 1 2 15
5661 # $output - temporary wrapper script for $objdir/$outputname
5662 # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
5664 # The $output program cannot be directly executed until all the libtool
5665 # libraries that it depends on are installed.
5667 # This wrapper script should never be moved out of the build directory.
5668 # If it is, it will not operate correctly.
5670 # Sed substitution that helps us do robust quoting. It backslashifies
5671 # metacharacters that are still active within double-quoted strings.
5672 Xsed='${SED} -e 1s/^X//'
5673 sed_quote_subst='$sed_quote_subst'
5675 # Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE).
5676 if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then
5679 # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which
5680 # is contrary to our usage. Disable this feature.
5681 alias -g '\${1+\"\$@\"}'='\"\$@\"'
5682 setopt NO_GLOB_SUBST
5684 case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac
5686 BIN_SH=xpg4; export BIN_SH # for Tru64
5687 DUALCASE=1; export DUALCASE # for MKS sh
5689 # The HP-UX ksh and POSIX shell print the target directory to stdout
5691 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
5693 relink_command=\"$relink_command\"
5695 # This environment variable determines our operation mode.
5696 if test \"\$libtool_install_magic\" = \"$magic\"; then
5697 # install mode needs the following variable:
5698 notinst_deplibs='$notinst_deplibs'
5700 # When we are sourced in execute mode, \$file and \$echo are already set.
5701 if test \"\$libtool_execute_magic\" != \"$magic\"; then
5704 # Make sure echo works.
5705 if test \"X\$1\" = X--no-reexec; then
5706 # Discard the --no-reexec flag, and continue.
5708 elif test \"X\`(\$echo '\t') 2>/dev/null\`\" = 'X\t'; then
5709 # Yippee, \$echo works!
5712 # Restart under the correct shell, and then maybe \$echo will work.
5713 exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"}
5719 # Find the directory that this script lives in.
5720 thisdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\`
5721 test \"x\$thisdir\" = \"x\$file\" && thisdir=.
5723 # Follow symbolic links until we get to the real thisdir.
5724 file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\`
5725 while test -n \"\$file\"; do
5726 destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\`
5728 # If there was a directory component, then change thisdir.
5729 if test \"x\$destdir\" != \"x\$file\"; then
5730 case \"\$destdir\" in
5731 [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;;
5732 *) thisdir=\"\$thisdir/\$destdir\" ;;
5736 file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\`
5737 file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\`
5740 # Try to get the absolute directory name.
5741 absdir=\`cd \"\$thisdir\" && pwd\`
5742 test -n \"\$absdir\" && thisdir=\"\$absdir\"
5745 if test "$fast_install" = yes; then
5747 program=lt-'$outputname'$exeext
5748 progdir=\"\$thisdir/$objdir\"
5750 if test ! -f \"\$progdir/\$program\" || \\
5751 { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\
5752 test \"X\$file\" != \"X\$progdir/\$program\"; }; then
5754 file=\"\$\$-\$program\"
5756 if test ! -d \"\$progdir\"; then
5757 $mkdir \"\$progdir\"
5759 $rm \"\$progdir/\$file\"
5764 # relink executable if necessary
5765 if test -n \"\$relink_command\"; then
5766 if relink_command_output=\`eval \$relink_command 2>&1\`; then :
5768 $echo \"\$relink_command_output\" >&2
5769 $rm \"\$progdir/\$file\"
5774 $mv \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null ||
5775 { $rm \"\$progdir/\$program\";
5776 $mv \"\$progdir/\$file\" \"\$progdir/\$program\"; }
5777 $rm \"\$progdir/\$file\"
5781 program='$outputname'
5782 progdir=\"\$thisdir/$objdir\"
5788 if test -f \"\$progdir/\$program\"; then"
5790 # Export our shlibpath_var if we have one.
5791 if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
5793 # Add our own library path to $shlibpath_var
5794 $shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
5796 # Some systems cannot cope with colon-terminated $shlibpath_var
5797 # The second colon is a workaround for a bug in BeOS R4 sed
5798 $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\`
5800 export $shlibpath_var
5804 # fixup the dll searchpath if we need to.
5805 if test -n "$dllsearchpath"; then
5807 # Add the dll search path components to the executable PATH
5808 PATH=$dllsearchpath:\$PATH
5813 if test \"\$libtool_execute_magic\" != \"$magic\"; then
5814 # Run the actual program with our arguments.
5816 # Make sure env LD_LIBRARY_PATH does not mess us up
5817 if test -n \"\${LD_LIBRARY_PATH+set}\"; then
5818 export LD_LIBRARY_PATH=\$progdir:\$LD_LIBRARY_PATH
5822 # Backslashes separate directories on plain windows
5823 *-*-mingw | *-*-os2*)
5825 exec \"\$progdir\\\\\$program\" \${1+\"\$@\"}
5831 exec \"\$progdir/\$program\" \${1+\"\$@\"}
5836 \$echo \"\$0: cannot exec \$program \$*\"
5840 # The program doesn't exist.
5841 \$echo \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2
5842 \$echo \"This script is just a wrapper for \$program.\" 1>&2
5843 $echo \"See the $PACKAGE documentation for more information.\" 1>&2
5854 # See if we need to build an old-fashioned archive.
5855 for oldlib in $oldlibs; do
5857 if test "$build_libtool_libs" = convenience; then
5858 oldobjs="$libobjs_save"
5859 addlibs="$convenience"
5860 build_libtool_libs=no
5862 if test "$build_libtool_libs" = module; then
5863 oldobjs="$libobjs_save"
5864 build_libtool_libs=no
5866 oldobjs="$old_deplibs $non_pic_objects"
5868 addlibs="$old_convenience"
5871 if test -n "$addlibs"; then
5872 gentop="$output_objdir/${outputname}x"
5873 generated="$generated $gentop"
5875 func_extract_archives $gentop $addlibs
5876 oldobjs="$oldobjs $func_extract_archives_result"
5879 # Do each command in the archive commands.
5880 if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
5881 cmds=$old_archive_from_new_cmds
5883 # POSIX demands no paths to be encoded in archives. We have
5884 # to avoid creating archives with duplicate basenames if we
5885 # might have to extract them afterwards, e.g., when creating a
5886 # static archive out of a convenience library, or when linking
5887 # the entirety of a libtool archive into another (currently
5888 # not supported by libtool).
5889 if (for obj in $oldobjs
5891 $echo "X$obj" | $Xsed -e 's%^.*/%%'
5892 done | sort | sort -uc >/dev/null 2>&1); then
5895 $echo "copying selected object files to avoid basename conflicts..."
5897 if test -z "$gentop"; then
5898 gentop="$output_objdir/${outputname}x"
5899 generated="$generated $gentop"
5901 $show "${rm}r $gentop"
5902 $run ${rm}r "$gentop"
5903 $show "$mkdir $gentop"
5904 $run $mkdir "$gentop"
5906 if test "$exit_status" -ne 0 && test ! -d "$gentop"; then
5911 save_oldobjs=$oldobjs
5914 for obj in $save_oldobjs
5916 objbase=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
5917 case " $oldobjs " in
5918 " ") oldobjs=$obj ;;
5921 # Make sure we don't pick an alternate name that also
5923 newobj=lt$counter-$objbase
5924 counter=`expr $counter + 1`
5925 case " $oldobjs " in
5926 *[\ /]"$newobj "*) ;;
5927 *) if test ! -f "$gentop/$newobj"; then break; fi ;;
5930 $show "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj"
5931 $run ln "$obj" "$gentop/$newobj" ||
5932 $run cp "$obj" "$gentop/$newobj"
5933 oldobjs="$oldobjs $gentop/$newobj"
5935 *) oldobjs="$oldobjs $obj" ;;
5940 eval cmds=\"$old_archive_cmds\"
5942 if len=`expr "X$cmds" : ".*"` &&
5943 test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
5944 cmds=$old_archive_cmds
5946 # the command line is too long to link in one step, link in parts
5947 $echo "using piecewise archive linking..."
5952 save_oldobjs=$oldobjs
5954 # Is there a better way of finding the last object in the list?
5955 for obj in $save_oldobjs
5959 for obj in $save_oldobjs
5961 oldobjs="$objlist $obj"
5962 objlist="$objlist $obj"
5963 eval test_cmds=\"$old_archive_cmds\"
5964 if len=`expr "X$test_cmds" : ".*" 2>/dev/null` &&
5965 test "$len" -le "$max_cmd_len"; then
5968 # the above command should be used before it gets too long
5970 if test "$obj" = "$last_oldobj" ; then
5973 test -z "$concat_cmds" || concat_cmds=$concat_cmds~
5974 eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\"
5980 if test "X$oldobjs" = "X" ; then
5981 eval cmds=\"\$concat_cmds\"
5983 eval cmds=\"\$concat_cmds~\$old_archive_cmds\"
5987 save_ifs="$IFS"; IFS='~'
5988 for cmd in $cmds; do
5992 $run eval "$cmd" || exit $?
5997 if test -n "$generated"; then
5998 $show "${rm}r$generated"
5999 $run ${rm}r$generated
6002 # Now create the libtool archive.
6006 test "$build_old_libs" = yes && old_library="$libname.$libext"
6007 $show "creating $output"
6009 # Preserve any variables that may affect compiler behavior
6010 for var in $variables_saved_for_relink; do
6011 if eval test -z \"\${$var+set}\"; then
6012 relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command"
6013 elif eval var_value=\$$var; test -z "$var_value"; then
6014 relink_command="$var=; export $var; $relink_command"
6016 var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"`
6017 relink_command="$var=\"$var_value\"; export $var; $relink_command"
6020 # Quote the link command for shipping.
6021 relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
6022 relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP`
6023 if test "$hardcode_automatic" = yes ; then
6028 # Only create the output if not a dry run.
6029 if test -z "$run"; then
6030 for installed in no yes; do
6031 if test "$installed" = yes; then
6032 if test -z "$install_libdir"; then
6035 output="$output_objdir/$outputname"i
6036 # Replace all uninstalled libtool libraries with the installed ones
6038 for deplib in $dependency_libs; do
6041 name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'`
6042 eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
6043 if test -z "$libdir"; then
6044 $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
6047 if test "X$EGREP" = X ; then
6050 # We do not want portage's install root ($D) present. Check only for
6051 # this if the .la is being installed.
6052 if test "$installed" = yes && test "$D"; then
6053 eval mynewdependency_lib=`echo "$libdir/$name" |sed -e "s:$D:/:g" -e 's:/\+:/:g'`
6055 mynewdependency_lib="$libdir/$name"
6057 # Do not add duplicates
6058 if test "$mynewdependency_lib"; then
6059 my_little_ninja_foo_1=`echo $newdependency_libs |$EGREP -e "$mynewdependency_lib"`
6060 if test -z "$my_little_ninja_foo_1"; then
6061 newdependency_libs="$newdependency_libs $mynewdependency_lib"
6066 if test "$installed" = yes; then
6067 # Rather use S=WORKDIR if our version of portage supports it.
6068 # This is because some ebuild (gcc) do not use $S as buildroot.
6069 if test "$PWORKDIR"; then
6072 # We do not want portage's build root ($S) present.
6073 my_little_ninja_foo_2=`echo $deplib |$EGREP -e "$S"`
6074 # We do not want portage's install root ($D) present.
6075 my_little_ninja_foo_3=`echo $deplib |$EGREP -e "$D"`
6076 if test -n "$my_little_ninja_foo_2" && test "$S"; then
6077 mynewdependency_lib=""
6078 elif test -n "$my_little_ninja_foo_3" && test "$D"; then
6079 eval mynewdependency_lib=`echo "$deplib" |sed -e "s:$D:/:g" -e 's:/\+:/:g'`
6081 mynewdependency_lib="$deplib"
6084 mynewdependency_lib="$deplib"
6086 # Do not add duplicates
6087 if test "$mynewdependency_lib"; then
6088 my_little_ninja_foo_4=`echo $newdependency_libs |$EGREP -e "$mynewdependency_lib"`
6089 if test -z "$my_little_ninja_foo_4"; then
6090 newdependency_libs="$newdependency_libs $mynewdependency_lib"
6096 dependency_libs="$newdependency_libs"
6098 for lib in $dlfiles; do
6099 name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
6100 eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
6101 if test -z "$libdir"; then
6102 $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
6105 newdlfiles="$newdlfiles $libdir/$name"
6107 dlfiles="$newdlfiles"
6109 for lib in $dlprefiles; do
6110 name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
6111 eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
6112 if test -z "$libdir"; then
6113 $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
6116 newdlprefiles="$newdlprefiles $libdir/$name"
6118 dlprefiles="$newdlprefiles"
6121 for lib in $dlfiles; do
6123 [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
6124 *) abs=`pwd`"/$lib" ;;
6126 newdlfiles="$newdlfiles $abs"
6128 dlfiles="$newdlfiles"
6130 for lib in $dlprefiles; do
6132 [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
6133 *) abs=`pwd`"/$lib" ;;
6135 newdlprefiles="$newdlprefiles $abs"
6137 dlprefiles="$newdlprefiles"
6140 # place dlname in correct position for cygwin
6142 case $host,$output,$installed,$module,$dlname in
6143 *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;;
6145 # Do not add duplicates
6146 if test "$installed" = yes && test "$D"; then
6147 install_libdir=`echo "$install_libdir" |sed -e "s:$D:/:g" -e 's:/\+:/:g'`
6150 # $outputname - a libtool library file
6151 # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
6153 # Please DO NOT delete this file!
6154 # It is necessary for linking the library.
6156 # The name that we can dlopen(3).
6159 # Names of this library.
6160 library_names='$library_names'
6162 # The name of the static archive.
6163 old_library='$old_library'
6165 # Libraries that this one depends upon.
6166 dependency_libs='$dependency_libs'
6168 # Version information for $libname.
6173 # Is this an already installed library?
6174 installed=$installed
6176 # Should we warn about portability when linking against -modules?
6177 shouldnotlink=$module
6179 # Files to dlopen/dlpreopen
6181 dlpreopen='$dlprefiles'
6183 # Directory that this library needs to be installed in:
6184 libdir='$install_libdir'"
6185 if test "$installed" = no && test "$need_relink" = yes; then
6187 relink_command=\"$relink_command\""
6192 # Do a symbolic link so that the libtool archive can be found in
6193 # LD_LIBRARY_PATH before the program is installed.
6194 $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)"
6195 $run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' || exit $?
6201 # libtool install mode
6203 modename="$modename: install"
6205 # There may be an optional sh(1) argument at the beginning of
6206 # install_prog (especially on Windows NT).
6207 if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh ||
6208 # Allow the use of GNU shtool's install command.
6209 $echo "X$nonopt" | grep shtool > /dev/null; then
6210 # Aesthetically quote it.
6211 arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"`
6213 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
6217 install_prog="$arg "
6225 # The real first argument should be the name of the installation program.
6226 # Aesthetically quote it.
6227 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
6229 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
6233 install_prog="$install_prog$arg"
6235 # We need to accept at least all the BSD install flags.
6245 if test -n "$dest"; then
6246 files="$files $dest"
6254 case " $install_prog " in
6259 -g | -m | -o) prev=$arg ;;
6267 # If the previous option needed an argument, then skip it.
6268 if test -n "$prev"; then
6277 # Aesthetically quote the argument.
6278 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
6280 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
6284 install_prog="$install_prog $arg"
6287 if test -z "$install_prog"; then
6288 $echo "$modename: you must specify an install program" 1>&2
6293 if test -n "$prev"; then
6294 $echo "$modename: the \`$prev' option requires an argument" 1>&2
6299 if test -z "$files"; then
6300 if test -z "$dest"; then
6301 $echo "$modename: no file or destination specified" 1>&2
6303 $echo "$modename: you must specify a destination" 1>&2
6309 # Strip any trailing slash from the destination.
6310 dest=`$echo "X$dest" | $Xsed -e 's%/$%%'`
6312 # Check to see that the destination is a directory.
6313 test -d "$dest" && isdir=yes
6314 if test "$isdir" = yes; then
6318 destdir=`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'`
6319 test "X$destdir" = "X$dest" && destdir=.
6320 destname=`$echo "X$dest" | $Xsed -e 's%^.*/%%'`
6322 # Not a directory, so check to see that there is only one file specified.
6324 if test "$#" -gt 2; then
6325 $echo "$modename: \`$dest' is not a directory" 1>&2
6331 [\\/]* | [A-Za-z]:[\\/]*) ;;
6333 for file in $files; do
6337 $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2
6346 # This variable tells wrapper scripts just to set variables rather
6347 # than running their programs.
6348 libtool_install_magic="$magic"
6353 for file in $files; do
6355 # Do each installation.
6358 # Do the static libraries later.
6359 staticlibs="$staticlibs $file"
6363 # Check to see that this really is a libtool archive.
6364 if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
6366 $echo "$modename: \`$file' is not a valid libtool archive" 1>&2
6374 # If there is no directory component, then add one.
6376 */* | *\\*) . $file ;;
6380 # Add the libdir to current_libdirs if it is the destination.
6381 if test "X$destdir" = "X$libdir"; then
6382 case "$current_libdirs " in
6384 *) current_libdirs="$current_libdirs $libdir" ;;
6387 # Note the libdir as a future libdir.
6388 case "$future_libdirs " in
6390 *) future_libdirs="$future_libdirs $libdir" ;;
6394 dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/
6395 test "X$dir" = "X$file/" && dir=
6398 if test -n "$relink_command"; then
6399 # Determine the prefix the user has applied to our future dir.
6400 inst_prefix_dir=`$echo "$destdir" | $SED "s%$libdir\$%%"`
6402 # Don't allow the user to place us outside of our expected
6403 # location b/c this prevents finding dependent libraries that
6404 # are installed to the same prefix.
6405 # At present, this check doesn't affect windows .dll's that
6406 # are installed into $libdir/../bin (currently, that works fine)
6407 # but it's something to keep an eye on.
6408 if test "$inst_prefix_dir" = "$destdir"; then
6409 $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2
6413 if test -n "$inst_prefix_dir"; then
6414 # Stick the inst_prefix_dir data into the link command.
6415 relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%" | $NL2SP`
6417 relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%%" | $NL2SP`
6420 $echo "$modename: warning: relinking \`$file'" 1>&2
6421 $show "$relink_command"
6422 if $run eval "$relink_command"; then :
6424 $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
6429 # See the names of the shared library.
6430 set dummy $library_names
6431 if test -n "$2"; then
6437 test -n "$relink_command" && srcname="$realname"T
6439 # Install the shared library and build the symlinks.
6440 $show "$install_prog $dir/$srcname $destdir/$realname"
6441 $run eval "$install_prog $dir/$srcname $destdir/$realname" || exit $?
6442 if test -n "$stripme" && test -n "$striplib"; then
6443 $show "$striplib $destdir/$realname"
6444 $run eval "$striplib $destdir/$realname" || exit $?
6447 if test "$#" -gt 0; then
6448 # Delete the old symlinks, and create new ones.
6449 # Try `ln -sf' first, because the `ln' binary might depend on
6450 # the symlink we replace! Solaris /bin/ln does not understand -f,
6451 # so we also need to try rm && ln -s.
6454 if test "$linkname" != "$realname"; then
6455 $show "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })"
6456 $run eval "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })"
6461 # Do each command in the postinstall commands.
6462 lib="$destdir/$realname"
6463 cmds=$postinstall_cmds
6464 save_ifs="$IFS"; IFS='~'
6465 for cmd in $cmds; do
6469 $run eval "$cmd" || {
6472 # Restore the uninstalled library and exit
6473 if test "$mode" = relink; then
6474 $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)'
6483 # Install the pseudo-library for information purposes.
6484 name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
6485 instname="$dir/$name"i
6486 $show "$install_prog $instname $destdir/$name"
6487 $run eval "$install_prog $instname $destdir/$name" || exit $?
6489 # Maybe install the static library, too.
6490 test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library"
6494 # Install (i.e. copy) a libtool object.
6496 # Figure out destination file name, if it wasn't already specified.
6497 if test -n "$destname"; then
6498 destfile="$destdir/$destname"
6500 destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
6501 destfile="$destdir/$destfile"
6504 # Deduce the name of the destination old-style object file.
6507 staticdest=`$echo "X$destfile" | $Xsed -e "$lo2o"`
6510 staticdest="$destfile"
6514 $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2
6520 # Install the libtool object if requested.
6521 if test -n "$destfile"; then
6522 $show "$install_prog $file $destfile"
6523 $run eval "$install_prog $file $destfile" || exit $?
6526 # Install the old object if enabled.
6527 if test "$build_old_libs" = yes; then
6528 # Deduce the name of the old-style object file.
6529 staticobj=`$echo "X$file" | $Xsed -e "$lo2o"`
6531 $show "$install_prog $staticobj $staticdest"
6532 $run eval "$install_prog \$staticobj \$staticdest" || exit $?
6538 # Figure out destination file name, if it wasn't already specified.
6539 if test -n "$destname"; then
6540 destfile="$destdir/$destname"
6542 destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
6543 destfile="$destdir/$destfile"
6546 # If the file is missing, and there is a .exe on the end, strip it
6547 # because it is most likely a libtool script we actually want to
6552 if test ! -f "$file"; then
6553 file=`$echo $file|${SED} 's,.exe$,,'`
6559 # Do a test to see if this is really a libtool program.
6562 wrapper=`$echo $file | ${SED} -e 's,.exe$,,'`
6568 if (${SED} -e '4q' $wrapper | grep "^# Generated by .*$PACKAGE")>/dev/null 2>&1; then
6572 # Note that it is not necessary on cygwin/mingw to append a dot to
6573 # foo even if both foo and FILE.exe exist: automatic-append-.exe
6574 # behavior happens only for exec(3), not for open(2)! Also, sourcing
6575 # `FILE.' does not work on cygwin managed mounts.
6577 # If there is no directory component, then add one.
6579 */* | *\\*) . ${wrapper} ;;
6580 *) . ./${wrapper} ;;
6583 # Check the variables that should have been set.
6584 if test -z "$notinst_deplibs"; then
6585 $echo "$modename: invalid libtool wrapper script \`$wrapper'" 1>&2
6590 for lib in $notinst_deplibs; do
6591 # Check to see that each library is installed.
6593 if test -f "$lib"; then
6594 # If there is no directory component, then add one.
6596 */* | *\\*) . $lib ;;
6600 libfile="$libdir/"`$echo "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test
6601 if test -n "$libdir" && test ! -f "$libfile"; then
6602 $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2
6608 # Note that it is not necessary on cygwin/mingw to append a dot to
6609 # foo even if both foo and FILE.exe exist: automatic-append-.exe
6610 # behavior happens only for exec(3), not for open(2)! Also, sourcing
6611 # `FILE.' does not work on cygwin managed mounts.
6613 # If there is no directory component, then add one.
6615 */* | *\\*) . ${wrapper} ;;
6616 *) . ./${wrapper} ;;
6620 if test "$fast_install" = no && test -n "$relink_command"; then
6621 if test "$finalize" = yes && test -z "$run"; then
6622 tmpdir=`func_mktempdir`
6623 file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'`
6624 outputname="$tmpdir/$file"
6625 # Replace the output file specification.
6626 relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g' | $NL2SP`
6628 $show "$relink_command"
6629 if $run eval "$relink_command"; then :
6631 $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
6637 $echo "$modename: warning: cannot relink \`$file'" 1>&2
6640 # Install the binary that we compiled earlier.
6641 file=`$echo "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"`
6645 # remove .exe since cygwin /usr/bin/install will append another
6647 case $install_prog,$host in
6648 */usr/bin/install*,*cygwin*)
6649 case $file:$destfile in
6654 destfile=$destfile.exe
6657 destfile=`$echo $destfile | ${SED} -e 's,.exe$,,'`
6662 $show "$install_prog$stripme $file $destfile"
6663 $run eval "$install_prog\$stripme \$file \$destfile" || exit $?
6664 test -n "$outputname" && ${rm}r "$tmpdir"
6669 for file in $staticlibs; do
6670 name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
6672 # Set up the ranlib parameters.
6673 oldlib="$destdir/$name"
6675 $show "$install_prog $file $oldlib"
6676 $run eval "$install_prog \$file \$oldlib" || exit $?
6678 if test -n "$stripme" && test -n "$old_striplib"; then
6679 $show "$old_striplib $oldlib"
6680 $run eval "$old_striplib $oldlib" || exit $?
6683 # Do each command in the postinstall commands.
6684 cmds=$old_postinstall_cmds
6685 save_ifs="$IFS"; IFS='~'
6686 for cmd in $cmds; do
6690 $run eval "$cmd" || exit $?
6695 if test -n "$future_libdirs"; then
6696 $echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2
6699 if test -n "$current_libdirs"; then
6700 # Maybe just do a dry run.
6701 test -n "$run" && current_libdirs=" -n$current_libdirs"
6702 exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs'
6708 # libtool finish mode
6710 modename="$modename: finish"
6714 if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
6717 libdirs="$libdirs $dir"
6720 for libdir in $libdirs; do
6721 if test -n "$finish_cmds"; then
6722 # Do each command in the finish commands.
6724 save_ifs="$IFS"; IFS='~'
6725 for cmd in $cmds; do
6729 $run eval "$cmd" || admincmds="$admincmds
6734 if test -n "$finish_eval"; then
6735 # Do the single finish_eval.
6736 eval cmds=\"$finish_eval\"
6737 $run eval "$cmds" || admincmds="$admincmds
6743 # Exit here if they wanted silent mode.
6744 test "$show" = : && exit $EXIT_SUCCESS
6746 $echo "X----------------------------------------------------------------------" | $Xsed
6747 $echo "Libraries have been installed in:"
6748 for libdir in $libdirs; do
6752 $echo "If you ever happen to want to link against installed libraries"
6753 $echo "in a given directory, LIBDIR, you must either use libtool, and"
6754 $echo "specify the full pathname of the library, or use the \`-LLIBDIR'"
6755 $echo "flag during linking and do at least one of the following:"
6756 if test -n "$shlibpath_var"; then
6757 $echo " - add LIBDIR to the \`$shlibpath_var' environment variable"
6758 $echo " during execution"
6760 if test -n "$runpath_var"; then
6761 $echo " - add LIBDIR to the \`$runpath_var' environment variable"
6762 $echo " during linking"
6764 if test -n "$hardcode_libdir_flag_spec"; then
6766 eval flag=\"$hardcode_libdir_flag_spec\"
6768 $echo " - use the \`$flag' linker flag"
6770 if test -n "$admincmds"; then
6771 $echo " - have your system administrator run these commands:$admincmds"
6773 if test -f /etc/ld.so.conf; then
6774 $echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
6777 $echo "See any operating system documentation about shared libraries for"
6778 $echo "more information, such as the ld(1) and ld.so(8) manual pages."
6779 $echo "X----------------------------------------------------------------------" | $Xsed
6783 # libtool execute mode
6785 modename="$modename: execute"
6787 # The first argument is the command name.
6789 if test -z "$cmd"; then
6790 $echo "$modename: you must specify a COMMAND" 1>&2
6795 # Handle -dlopen flags immediately.
6796 for file in $execute_dlfiles; do
6797 if test ! -f "$file"; then
6798 $echo "$modename: \`$file' is not a file" 1>&2
6806 # Check to see that this really is a libtool archive.
6807 if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
6809 $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
6814 # Read the libtool library.
6818 # If there is no directory component, then add one.
6820 */* | *\\*) . $file ;;
6824 # Skip this library if it cannot be dlopened.
6825 if test -z "$dlname"; then
6826 # Warn if it was a shared library.
6827 test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'"
6831 dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
6832 test "X$dir" = "X$file" && dir=.
6834 if test -f "$dir/$objdir/$dlname"; then
6837 if test ! -f "$dir/$dlname"; then
6838 $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2
6845 # Just add the directory containing the .lo file.
6846 dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
6847 test "X$dir" = "X$file" && dir=.
6851 $echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2
6856 # Get the absolute pathname.
6857 absdir=`cd "$dir" && pwd`
6858 test -n "$absdir" && dir="$absdir"
6860 # Now add the directory to shlibpath_var.
6861 if eval "test -z \"\$$shlibpath_var\""; then
6862 eval "$shlibpath_var=\"\$dir\""
6864 eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\""
6868 # This variable tells wrapper scripts just to set shlibpath_var
6869 # rather than running their programs.
6870 libtool_execute_magic="$magic"
6872 # Check if any of the arguments is a wrapper script.
6879 # Do a test to see if this is really a libtool program.
6880 if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
6881 # If there is no directory component, then add one.
6883 */* | *\\*) . $file ;;
6887 # Transform arg to wrapped name.
6888 file="$progdir/$program"
6892 # Quote arguments (to preserve shell metacharacters).
6893 file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"`
6894 args="$args \"$file\""
6897 if test -z "$run"; then
6898 if test -n "$shlibpath_var"; then
6899 # Export the shlibpath_var.
6900 eval "export $shlibpath_var"
6903 # Restore saved environment variables
6904 for lt_var in LANG LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
6906 eval "if test \"\${save_$lt_var+set}\" = set; then
6907 $lt_var=\$save_$lt_var; export $lt_var
6911 # Now prepare to actually exec the command.
6912 exec_cmd="\$cmd$args"
6914 # Display what would be done.
6915 if test -n "$shlibpath_var"; then
6916 eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\""
6917 $echo "export $shlibpath_var"
6924 # libtool clean and uninstall mode
6926 modename="$modename: $mode"
6932 # This variable tells wrapper scripts just to set variables rather
6933 # than running their programs.
6934 libtool_install_magic="$magic"
6939 -f) rm="$rm $arg"; rmforce=yes ;;
6940 -*) rm="$rm $arg" ;;
6941 *) files="$files $arg" ;;
6945 if test -z "$rm"; then
6946 $echo "$modename: you must specify an RM program" 1>&2
6953 origobjdir="$objdir"
6954 for file in $files; do
6955 dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
6956 if test "X$dir" = "X$file"; then
6958 objdir="$origobjdir"
6960 objdir="$dir/$origobjdir"
6962 name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
6963 test "$mode" = uninstall && objdir="$dir"
6965 # Remember objdir for removal later, being careful to avoid duplicates
6966 if test "$mode" = clean; then
6969 *) rmdirs="$rmdirs $objdir" ;;
6973 # Don't error if the file doesn't exist and rm -f was used.
6974 if (test -L "$file") >/dev/null 2>&1 \
6975 || (test -h "$file") >/dev/null 2>&1 \
6976 || test -f "$file"; then
6978 elif test -d "$file"; then
6981 elif test "$rmforce" = yes; then
6989 # Possibly a libtool archive, so verify it.
6990 if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
6993 # Delete the libtool libraries and symlinks.
6994 for n in $library_names; do
6995 rmfiles="$rmfiles $objdir/$n"
6997 test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library"
7001 case " $library_names " in
7002 # " " in the beginning catches empty $dlname
7004 *) rmfiles="$rmfiles $objdir/$dlname" ;;
7006 test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i"
7009 if test -n "$library_names"; then
7010 # Do each command in the postuninstall commands.
7011 cmds=$postuninstall_cmds
7012 save_ifs="$IFS"; IFS='~'
7013 for cmd in $cmds; do
7018 if test "$?" -ne 0 && test "$rmforce" != yes; then
7025 if test -n "$old_library"; then
7026 # Do each command in the old_postuninstall commands.
7027 cmds=$old_postuninstall_cmds
7028 save_ifs="$IFS"; IFS='~'
7029 for cmd in $cmds; do
7034 if test "$?" -ne 0 && test "$rmforce" != yes; then
7040 # FIXME: should reinstall the best remaining shared library.
7047 # Possibly a libtool object, so verify it.
7048 if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
7053 # Add PIC object to the list of files to remove.
7054 if test -n "$pic_object" \
7055 && test "$pic_object" != none; then
7056 rmfiles="$rmfiles $dir/$pic_object"
7059 # Add non-PIC object to the list of files to remove.
7060 if test -n "$non_pic_object" \
7061 && test "$non_pic_object" != none; then
7062 rmfiles="$rmfiles $dir/$non_pic_object"
7068 if test "$mode" = clean ; then
7072 file=`$echo $file|${SED} 's,.exe$,,'`
7073 noexename=`$echo $name|${SED} 's,.exe$,,'`
7074 # $file with .exe has already been added to rmfiles,
7075 # add $file without .exe
7076 rmfiles="$rmfiles $file"
7079 # Do a test to see if this is a libtool program.
7080 if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
7084 # note $name still contains .exe if it was in $file originally
7085 # as does the version of $file that was added into $rmfiles
7086 rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}"
7087 if test "$fast_install" = yes && test -n "$relink_command"; then
7088 rmfiles="$rmfiles $objdir/lt-$name"
7090 if test "X$noexename" != "X$name" ; then
7091 rmfiles="$rmfiles $objdir/lt-${noexename}.c"
7097 $show "$rm $rmfiles"
7098 $run $rm $rmfiles || exit_status=1
7100 objdir="$origobjdir"
7102 # Try to remove the ${objdir}s in the directories where we deleted files
7103 for dir in $rmdirs; do
7104 if test -d "$dir"; then
7106 $run rmdir $dir >/dev/null 2>&1
7114 $echo "$modename: you must specify a MODE" 1>&2
7115 $echo "$generic_help" 1>&2
7120 if test -z "$exec_cmd"; then
7121 $echo "$modename: invalid operation mode \`$mode'" 1>&2
7122 $echo "$generic_help" 1>&2
7125 fi # test -z "$show_help"
7127 if test -n "$exec_cmd"; then
7132 # We need to display help for each of the modes.
7135 "Usage: $modename [OPTION]... [MODE-ARG]...
7137 Provide generalized library-building support services.
7139 --config show all configuration variables
7140 --debug enable verbose shell tracing
7141 -n, --dry-run display commands without modifying any files
7142 --features display basic configuration information and exit
7143 --finish same as \`--mode=finish'
7144 --help display this help message and exit
7145 --mode=MODE use operation mode MODE [default=inferred from MODE-ARGS]
7146 --quiet same as \`--silent'
7147 --silent don't print informational messages
7148 --tag=TAG use configuration variables from tag TAG
7149 --version print version information
7151 MODE must be one of the following:
7153 clean remove files from the build directory
7154 compile compile a source file into a libtool object
7155 execute automatically set library path, then run a program
7156 finish complete the installation of libtool libraries
7157 install install libraries or executables
7158 link create a library or an executable
7159 uninstall remove libraries from an installed directory
7161 MODE-ARGS vary depending on the MODE. Try \`$modename --help --mode=MODE' for
7162 a more detailed description of MODE.
7164 Report bugs to <bug-libtool@gnu.org>."
7170 "Usage: $modename [OPTION]... --mode=clean RM [RM-OPTION]... FILE...
7172 Remove files from the build directory.
7174 RM is the name of the program to use to delete files associated with each FILE
7175 (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed
7178 If FILE is a libtool library, object or program, all the files associated
7179 with it are deleted. Otherwise, only FILE itself is deleted using RM."
7184 "Usage: $modename [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE
7186 Compile a source file into a libtool library object.
7188 This mode accepts the following additional options:
7190 -o OUTPUT-FILE set the output file name to OUTPUT-FILE
7191 -prefer-pic try to building PIC objects only
7192 -prefer-non-pic try to building non-PIC objects only
7193 -static always build a \`.o' file suitable for static linking
7195 COMPILE-COMMAND is a command to be used in creating a \`standard' object file
7196 from the given SOURCEFILE.
7198 The output file name is determined by removing the directory component from
7199 SOURCEFILE, then substituting the C source code suffix \`.c' with the
7200 library object suffix, \`.lo'."
7205 "Usage: $modename [OPTION]... --mode=execute COMMAND [ARGS]...
7207 Automatically set library path, then run a program.
7209 This mode accepts the following additional options:
7211 -dlopen FILE add the directory containing FILE to the library path
7213 This mode sets the library path environment variable according to \`-dlopen'
7216 If any of the ARGS are libtool executable wrappers, then they are translated
7217 into their corresponding uninstalled binary, and any of their required library
7218 directories are added to the library path.
7220 Then, COMMAND is executed, with ARGS as arguments."
7225 "Usage: $modename [OPTION]... --mode=finish [LIBDIR]...
7227 Complete the installation of libtool libraries.
7229 Each LIBDIR is a directory that contains libtool libraries.
7231 The commands that this mode executes may require superuser privileges. Use
7232 the \`--dry-run' option if you just want to see what would be executed."
7237 "Usage: $modename [OPTION]... --mode=install INSTALL-COMMAND...
7239 Install executables or libraries.
7241 INSTALL-COMMAND is the installation command. The first component should be
7242 either the \`install' or \`cp' program.
7244 The rest of the components are interpreted as arguments to that command (only
7245 BSD-compatible install options are recognized)."
7250 "Usage: $modename [OPTION]... --mode=link LINK-COMMAND...
7252 Link object files or libraries together to form another library, or to
7253 create an executable program.
7255 LINK-COMMAND is a command using the C compiler that you would use to create
7256 a program from several object files.
7258 The following components of LINK-COMMAND are treated specially:
7260 -all-static do not do any dynamic linking at all
7261 -avoid-version do not add a version suffix if possible
7262 -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime
7263 -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols
7264 -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
7265 -export-symbols SYMFILE
7266 try to export only the symbols listed in SYMFILE
7267 -export-symbols-regex REGEX
7268 try to export only the symbols matching REGEX
7269 -LLIBDIR search LIBDIR for required installed libraries
7270 -lNAME OUTPUT-FILE requires the installed library libNAME
7271 -module build a library that can dlopened
7272 -no-fast-install disable the fast-install mode
7273 -no-install link a not-installable executable
7274 -no-undefined declare that a library does not refer to external symbols
7275 -o OUTPUT-FILE create OUTPUT-FILE from the specified objects
7276 -objectlist FILE Use a list of object files found in FILE to specify objects
7277 -precious-files-regex REGEX
7278 don't remove output files matching REGEX
7279 -release RELEASE specify package release information
7280 -rpath LIBDIR the created library will eventually be installed in LIBDIR
7281 -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries
7282 -static do not do any dynamic linking of uninstalled libtool libraries
7283 -static-libtool-libs
7284 do not do any dynamic linking of libtool libraries
7285 -version-info CURRENT[:REVISION[:AGE]]
7286 specify library version info [each variable defaults to 0]
7288 All other options (arguments beginning with \`-') are ignored.
7290 Every other argument is treated as a filename. Files ending in \`.la' are
7291 treated as uninstalled libtool libraries, other files are standard or library
7294 If the OUTPUT-FILE ends in \`.la', then a libtool library is created,
7295 only library objects (\`.lo' files) may be specified, and \`-rpath' is
7296 required, except when creating a convenience library.
7298 If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created
7299 using \`ar' and \`ranlib', or on Windows using \`lib'.
7301 If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file
7302 is created, otherwise an executable program is created."
7307 "Usage: $modename [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE...
7309 Remove libraries from an installation directory.
7311 RM is the name of the program to use to delete files associated with each FILE
7312 (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed
7315 If FILE is a libtool library, all the files associated with it are deleted.
7316 Otherwise, only FILE itself is deleted using RM."
7320 $echo "$modename: invalid operation mode \`$mode'" 1>&2
7327 $echo "Try \`$modename --help' for more information about other modes."
7331 # The TAGs below are defined such that we never get into a situation
7332 # in which we disable both kinds of libraries. Given conflicting
7333 # choices, we go for a static library, that is the most portable,
7334 # since we can't tell whether shared libraries were disabled because
7335 # the user asked for that or because the platform doesn't support
7336 # them. This is particularly important on AIX, because we don't
7337 # support having both static and shared libraries enabled at the same
7338 # time on that platform, so we default to a shared-only configuration.
7339 # If a disable-shared tag is given, we'll fallback to a static-only
7340 # configuration. But we'll never go from static-only to shared-only.
7342 # ### BEGIN LIBTOOL TAG CONFIG: disable-shared
7344 # ### END LIBTOOL TAG CONFIG: disable-shared
7346 # ### BEGIN LIBTOOL TAG CONFIG: disable-static
7348 # ### END LIBTOOL TAG CONFIG: disable-static
7354 # ### BEGIN LIBTOOL TAG CONFIG: CXX
7356 # Libtool was configured on host blaise:
7358 # Shell to use when invoking shell scripts.
7361 # Whether or not to build shared libraries.
7362 build_libtool_libs=yes
7364 # Whether or not to build static libraries.
7367 # Whether or not to add -lc for building shared libraries.
7368 build_libtool_need_lc=no
7370 # Whether or not to disallow shared libs when runtime libs are static
7371 allow_libtool_libs_with_static_runtimes=no
7373 # Whether or not to optimize for fast installation.
7378 host=i686-pc-linux-gnu
7383 build=i686-pc-linux-gnu
7386 # An echo program that does not interpret backslashes.
7396 # LTCC compiler flags.
7399 # A language-specific compiler.
7402 # Is the compiler the GNU C compiler?
7406 EGREP="/bin/grep -E"
7408 # The linker used to build libraries.
7411 # Whether we need hard or soft links.
7414 # A BSD-compatible nm program.
7417 # A symbol stripping program
7420 # Used to examine libraries when file_magic_cmd begins "file"
7423 # Used on cygwin: DLL creation program.
7426 # Used on cygwin: object dumper.
7429 # Used on cygwin: assembler.
7432 # The name of the directory that contains temporary libtool files.
7435 # How to create reloadable object files.
7437 reload_cmds="\$LD\$reload_flag -o \$output\$reload_objs"
7439 # How to pass a linker flag through the compiler.
7442 # Object file suffix (normally "o").
7445 # Old archive suffix (normally "a").
7448 # Shared library suffix (normally ".so").
7451 # Executable file suffix (normally "").
7454 # Additional compiler flags for building library objects.
7455 pic_flag=" -fPIC -DPIC"
7458 # What is the maximum length of a command?
7461 # Does compiler simultaneously support -c and -o options?
7464 # Must we lock files when doing compilation?
7467 # Do we need the lib prefix for modules?
7470 # Do we need a version for libraries?
7473 # Whether dlopen is supported.
7474 dlopen_support=unknown
7476 # Whether dlopen of programs is supported.
7479 # Whether dlopen of statically linked programs is supported.
7480 dlopen_self_static=unknown
7482 # Compiler flag to prevent dynamic linking.
7483 link_static_flag="-static"
7485 # Compiler flag to turn off builtin functions.
7486 no_builtin_flag=" -fno-builtin"
7488 # Compiler flag to allow reflexive dlopens.
7489 export_dynamic_flag_spec="\${wl}--export-dynamic"
7491 # Compiler flag to generate shared objects directly from archives.
7492 whole_archive_flag_spec="\${wl}--whole-archive\$convenience \${wl}--no-whole-archive"
7494 # Compiler flag to generate thread-safe objects.
7495 thread_safe_flag_spec=""
7497 # Library versioning type.
7500 # Format of library name prefix.
7501 libname_spec="lib\$name"
7503 # List of archive names. First name is the real one, the rest are links.
7504 # The last name is the one that the linker finds with -lNAME.
7505 library_names_spec="\${libname}\${release}\${shared_ext}\$versuffix \${libname}\${release}\${shared_ext}\$major \$libname\${shared_ext}"
7507 # The coded name of the library, if different from the real name.
7508 soname_spec="\${libname}\${release}\${shared_ext}\$major"
7510 # Commands used to build and install an old-style archive.
7512 old_archive_cmds="\$AR \$AR_FLAGS \$oldlib\$oldobjs~\$RANLIB \$oldlib"
7513 old_postinstall_cmds="chmod 644 \$oldlib~\$RANLIB \$oldlib"
7514 old_postuninstall_cmds=""
7516 # Create an old-style archive from a shared archive.
7517 old_archive_from_new_cmds=""
7519 # Create a temporary old-style archive to link instead of a shared archive.
7520 old_archive_from_expsyms_cmds=""
7522 # Commands used to build and install a shared archive.
7523 archive_cmds="\$CC -shared -nostdlib \$predep_objects \$libobjs \$deplibs \$postdep_objects \$compiler_flags \${wl}-soname \$wl\$soname -o \$lib"
7524 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"
7526 postuninstall_cmds=""
7528 # Commands used to build a loadable module (assumed same as above if empty)
7530 module_expsym_cmds=""
7532 # Commands to strip libraries.
7533 old_striplib="strip --strip-debug"
7534 striplib="strip --strip-unneeded"
7536 # Dependencies to place before the objects being linked to create a
7538 predep_objects="/usr/lib/gcc/i486-linux-gnu/4.2.3/../../../../lib/crti.o /usr/lib/gcc/i486-linux-gnu/4.2.3/crtbeginS.o"
7540 # Dependencies to place after the objects being linked to create a
7542 postdep_objects="/usr/lib/gcc/i486-linux-gnu/4.2.3/crtendS.o /usr/lib/gcc/i486-linux-gnu/4.2.3/../../../../lib/crtn.o"
7544 # Dependencies to place before the objects being linked to create a
7548 # Dependencies to place after the objects being linked to create a
7550 postdeps="-lstdc++ -lm -lgcc_s -lc -lgcc_s"
7552 # The directories searched by this compiler when creating a shared
7554 compiler_lib_search_dirs="/usr/lib/gcc/i486-linux-gnu/4.2.3 /usr/lib/gcc/i486-linux-gnu/4.2.3 /usr/lib/gcc/i486-linux-gnu/4.2.3/../../../../lib /lib/../lib /usr/lib/../lib /usr/lib/gcc/i486-linux-gnu/4.2.3/../../.."
7556 # The library search path used internally by the compiler when linking
7558 compiler_lib_search_path="-L/usr/lib/gcc/i486-linux-gnu/4.2.3 -L/usr/lib/gcc/i486-linux-gnu/4.2.3 -L/usr/lib/gcc/i486-linux-gnu/4.2.3/../../../../lib -L/lib/../lib -L/usr/lib/../lib -L/usr/lib/gcc/i486-linux-gnu/4.2.3/../../.."
7560 # Method to check whether dependent libraries are shared objects.
7561 deplibs_check_method="pass_all"
7563 # Command to use when deplibs_check_method == file_magic.
7564 file_magic_cmd="\$MAGIC_CMD"
7566 # Flag that allows shared libraries with undefined symbols to be built.
7567 allow_undefined_flag=""
7569 # Flag that forces no undefined symbols.
7570 no_undefined_flag=""
7572 # Commands used to finish a libtool library installation in a directory.
7573 finish_cmds="PATH=\\\"\\\$PATH:/sbin\\\" ldconfig -n \$libdir"
7575 # Same as above, but a single script fragment to be evaled but not shown.
7578 # Take the output of nm and produce a listing of raw symbols and C names.
7579 global_symbol_pipe="sed -n -e 's/^.*[ ]\\([ABCDGIRSTW][ABCDGIRSTW]*\\)[ ][ ]*\\([_A-Za-z][_A-Za-z0-9]*\\)\$/\\1 \\2 \\2/p'"
7581 # Transform the output of nm in a proper C declaration
7582 global_symbol_to_cdecl="sed -n -e 's/^. .* \\(.*\\)\$/extern int \\1;/p'"
7584 # Transform the output of nm in a C name address pair
7585 global_symbol_to_c_name_address="sed -n -e 's/^: \\([^ ]*\\) \$/ {\\\"\\1\\\", (lt_ptr) 0},/p' -e 's/^[BCDEGRST] \\([^ ]*\\) \\([^ ]*\\)\$/ {\"\\2\", (lt_ptr) \\&\\2},/p'"
7587 # This is the shared library runtime path variable.
7588 runpath_var=LD_RUN_PATH
7590 # This is the shared library path variable.
7591 shlibpath_var=LD_LIBRARY_PATH
7593 # Is shlibpath searched before the hard-coded library search path?
7594 shlibpath_overrides_runpath=no
7596 # How to hardcode a shared library path into an executable.
7597 hardcode_action=immediate
7599 # Whether we should hardcode library paths into libraries.
7600 hardcode_into_libs=yes
7602 # Flag to hardcode $libdir into a binary during linking.
7603 # This must work even if $libdir does not exist.
7604 hardcode_libdir_flag_spec="\${wl}--rpath \${wl}\$libdir"
7606 # If ld is used when linking, flag to hardcode $libdir into
7607 # a binary during linking. This must work even if $libdir does
7609 hardcode_libdir_flag_spec_ld=""
7611 # Whether we need a single -rpath flag with a separated argument.
7612 hardcode_libdir_separator=""
7614 # Set to yes if using DIR/libNAME during linking hardcodes DIR into the
7618 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
7622 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
7623 # the resulting binary.
7624 hardcode_shlibpath_var=unsupported
7626 # Set to yes if building a shared library automatically hardcodes DIR into the library
7627 # and all subsequent libraries and executables linked against it.
7628 hardcode_automatic=no
7630 # Variables whose values should be saved in libtool wrapper scripts and
7631 # restored at relink time.
7632 variables_saved_for_relink="PATH LD_LIBRARY_PATH LD_RUN_PATH GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
7634 # Whether libtool must link a program against all its dependency libraries.
7637 # Compile-time system search path for libraries
7638 sys_lib_search_path_spec="/usr/lib/gcc/i486-linux-gnu/4.2.3 /usr/lib /lib"
7640 # Run-time system search path for libraries
7641 sys_lib_dlsearch_path_spec="/lib /usr/lib /lib/i486-linux-gnu /usr/lib/i486-linux-gnu /usr/lib/R/lib /usr/local/lib "
7643 # Fix the shell variable $srcfile for the compiler.
7646 # Set to yes if exported symbols are required.
7647 always_export_symbols=no
7649 # The commands to list exported symbols.
7650 export_symbols_cmds="\$NM \$libobjs \$convenience | \$global_symbol_pipe | \$SED 's/.* //' | sort | uniq > \$export_symbols"
7652 # The commands to extract the exported symbol list from a shared archive.
7653 extract_expsyms_cmds=""
7655 # Symbols that should not be listed in the preloaded symbols.
7656 exclude_expsyms="_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*"
7658 # Symbols that must always be exported.
7661 # ### END LIBTOOL TAG CONFIG: CXX
7663 # ### BEGIN LIBTOOL TAG CONFIG: GCJ
7665 # Libtool was configured on host blaise:
7667 # Shell to use when invoking shell scripts.
7670 # Whether or not to build shared libraries.
7671 build_libtool_libs=yes
7673 # Whether or not to build static libraries.
7676 # Whether or not to add -lc for building shared libraries.
7677 build_libtool_need_lc=no
7679 # Whether or not to disallow shared libs when runtime libs are static
7680 allow_libtool_libs_with_static_runtimes=no
7682 # Whether or not to optimize for fast installation.
7687 host=i686-pc-linux-gnu
7692 build=i686-pc-linux-gnu
7695 # An echo program that does not interpret backslashes.
7705 # LTCC compiler flags.
7708 # A language-specific compiler.
7711 # Is the compiler the GNU C compiler?
7715 EGREP="/bin/grep -E"
7717 # The linker used to build libraries.
7720 # Whether we need hard or soft links.
7723 # A BSD-compatible nm program.
7726 # A symbol stripping program
7729 # Used to examine libraries when file_magic_cmd begins "file"
7732 # Used on cygwin: DLL creation program.
7735 # Used on cygwin: object dumper.
7738 # Used on cygwin: assembler.
7741 # The name of the directory that contains temporary libtool files.
7744 # How to create reloadable object files.
7746 reload_cmds="\$LD\$reload_flag -o \$output\$reload_objs"
7748 # How to pass a linker flag through the compiler.
7751 # Object file suffix (normally "o").
7754 # Old archive suffix (normally "a").
7757 # Shared library suffix (normally ".so").
7760 # Executable file suffix (normally "").
7763 # Additional compiler flags for building library objects.
7767 # What is the maximum length of a command?
7770 # Does compiler simultaneously support -c and -o options?
7773 # Must we lock files when doing compilation?
7776 # Do we need the lib prefix for modules?
7779 # Do we need a version for libraries?
7782 # Whether dlopen is supported.
7783 dlopen_support=unknown
7785 # Whether dlopen of programs is supported.
7788 # Whether dlopen of statically linked programs is supported.
7789 dlopen_self_static=unknown
7791 # Compiler flag to prevent dynamic linking.
7794 # Compiler flag to turn off builtin functions.
7795 no_builtin_flag=" -fno-builtin"
7797 # Compiler flag to allow reflexive dlopens.
7798 export_dynamic_flag_spec="\${wl}--export-dynamic"
7800 # Compiler flag to generate shared objects directly from archives.
7801 whole_archive_flag_spec="\${wl}--whole-archive\$convenience \${wl}--no-whole-archive"
7803 # Compiler flag to generate thread-safe objects.
7804 thread_safe_flag_spec=""
7806 # Library versioning type.
7809 # Format of library name prefix.
7810 libname_spec="lib\$name"
7812 # List of archive names. First name is the real one, the rest are links.
7813 # The last name is the one that the linker finds with -lNAME.
7814 library_names_spec="\${libname}\${release}\${shared_ext}\$versuffix \${libname}\${release}\${shared_ext}\$major \$libname\${shared_ext}"
7816 # The coded name of the library, if different from the real name.
7817 soname_spec="\${libname}\${release}\${shared_ext}\$major"
7819 # Commands used to build and install an old-style archive.
7821 old_archive_cmds="\$AR \$AR_FLAGS \$oldlib\$oldobjs~\$RANLIB \$oldlib"
7822 old_postinstall_cmds="chmod 644 \$oldlib~\$RANLIB \$oldlib"
7823 old_postuninstall_cmds=""
7825 # Create an old-style archive from a shared archive.
7826 old_archive_from_new_cmds=""
7828 # Create a temporary old-style archive to link instead of a shared archive.
7829 old_archive_from_expsyms_cmds=""
7831 # Commands used to build and install a shared archive.
7832 archive_cmds="\$CC -shared \$libobjs \$deplibs \$compiler_flags \${wl}-soname \$wl\$soname -o \$lib"
7833 archive_expsym_cmds="\$echo \\\"{ global:\\\" > \$output_objdir/\$libname.ver~
7834 cat \$export_symbols | sed -e \\\"s/\\\\(.*\\\\)/\\\\1;/\\\" >> \$output_objdir/\$libname.ver~
7835 \$echo \\\"local: *; };\\\" >> \$output_objdir/\$libname.ver~
7836 \$CC -shared \$libobjs \$deplibs \$compiler_flags \${wl}-soname \$wl\$soname \${wl}-version-script \${wl}\$output_objdir/\$libname.ver -o \$lib"
7838 postuninstall_cmds=""
7840 # Commands used to build a loadable module (assumed same as above if empty)
7842 module_expsym_cmds=""
7844 # Commands to strip libraries.
7845 old_striplib="strip --strip-debug"
7846 striplib="strip --strip-unneeded"
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 # Dependencies to place before the objects being linked to create a
7860 # Dependencies to place after the objects being linked to create a
7864 # The directories searched by this compiler when creating a shared
7866 compiler_lib_search_dirs=""
7868 # The library search path used internally by the compiler when linking
7870 compiler_lib_search_path=""
7872 # Method to check whether dependent libraries are shared objects.
7873 deplibs_check_method="pass_all"
7875 # Command to use when deplibs_check_method == file_magic.
7876 file_magic_cmd="\$MAGIC_CMD"
7878 # Flag that allows shared libraries with undefined symbols to be built.
7879 allow_undefined_flag=""
7881 # Flag that forces no undefined symbols.
7882 no_undefined_flag=""
7884 # Commands used to finish a libtool library installation in a directory.
7885 finish_cmds="PATH=\\\"\\\$PATH:/sbin\\\" ldconfig -n \$libdir"
7887 # Same as above, but a single script fragment to be evaled but not shown.
7890 # Take the output of nm and produce a listing of raw symbols and C names.
7891 global_symbol_pipe="sed -n -e 's/^.*[ ]\\([ABCDGIRSTW][ABCDGIRSTW]*\\)[ ][ ]*\\([_A-Za-z][_A-Za-z0-9]*\\)\$/\\1 \\2 \\2/p'"
7893 # Transform the output of nm in a proper C declaration
7894 global_symbol_to_cdecl="sed -n -e 's/^. .* \\(.*\\)\$/extern int \\1;/p'"
7896 # Transform the output of nm in a C name address pair
7897 global_symbol_to_c_name_address="sed -n -e 's/^: \\([^ ]*\\) \$/ {\\\"\\1\\\", (lt_ptr) 0},/p' -e 's/^[BCDEGRST] \\([^ ]*\\) \\([^ ]*\\)\$/ {\"\\2\", (lt_ptr) \\&\\2},/p'"
7899 # This is the shared library runtime path variable.
7900 runpath_var=LD_RUN_PATH
7902 # This is the shared library path variable.
7903 shlibpath_var=LD_LIBRARY_PATH
7905 # Is shlibpath searched before the hard-coded library search path?
7906 shlibpath_overrides_runpath=no
7908 # How to hardcode a shared library path into an executable.
7909 hardcode_action=immediate
7911 # Whether we should hardcode library paths into libraries.
7912 hardcode_into_libs=yes
7914 # Flag to hardcode $libdir into a binary during linking.
7915 # This must work even if $libdir does not exist.
7916 hardcode_libdir_flag_spec="\${wl}--rpath \${wl}\$libdir"
7918 # If ld is used when linking, flag to hardcode $libdir into
7919 # a binary during linking. This must work even if $libdir does
7921 hardcode_libdir_flag_spec_ld=""
7923 # Whether we need a single -rpath flag with a separated argument.
7924 hardcode_libdir_separator=""
7926 # Set to yes if using DIR/libNAME during linking hardcodes DIR into the
7930 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
7934 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
7935 # the resulting binary.
7936 hardcode_shlibpath_var=unsupported
7938 # Set to yes if building a shared library automatically hardcodes DIR into the library
7939 # and all subsequent libraries and executables linked against it.
7940 hardcode_automatic=no
7942 # Variables whose values should be saved in libtool wrapper scripts and
7943 # restored at relink time.
7944 variables_saved_for_relink="PATH LD_LIBRARY_PATH LD_RUN_PATH GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
7946 # Whether libtool must link a program against all its dependency libraries.
7949 # Compile-time system search path for libraries
7950 sys_lib_search_path_spec="/usr/lib/gcc/i486-linux-gnu/4.2.3 /usr/lib /lib"
7952 # Run-time system search path for libraries
7953 sys_lib_dlsearch_path_spec="/lib /usr/lib /lib/i486-linux-gnu /usr/lib/i486-linux-gnu /usr/lib/R/lib /usr/local/lib "
7955 # Fix the shell variable $srcfile for the compiler.
7958 # Set to yes if exported symbols are required.
7959 always_export_symbols=no
7961 # The commands to list exported symbols.
7962 export_symbols_cmds="\$NM \$libobjs \$convenience | \$global_symbol_pipe | \$SED 's/.* //' | sort | uniq > \$export_symbols"
7964 # The commands to extract the exported symbol list from a shared archive.
7965 extract_expsyms_cmds=""
7967 # Symbols that should not be listed in the preloaded symbols.
7968 exclude_expsyms="_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*"
7970 # Symbols that must always be exported.
7973 # ### END LIBTOOL TAG CONFIG: GCJ