3 # libtoolT - Provide generalized library-building support services.
4 # Generated automatically by (GNU neuro 0.49.5)
5 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
7 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
27 # As a special exception to the GNU General Public License, if you
28 # distribute this file as part of a program that contains a
29 # configuration script generated by Autoconf, you may include it under
30 # the same distribution terms that you use for the rest of that program.
32 # A sed program that does not truncate output.
35 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
36 Xsed
="/usr/bin/sed -e s/^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.
45 # ### BEGIN LIBTOOL CONFIG
47 # Libtool was configured on host nik.neuroponic.com:
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
71 # An echo program that does not interpret backslashes.
81 # A language-specific compiler.
84 # Is the compiler the GNU C compiler?
90 # The linker used to build libraries.
91 LD
="/usr/i486-slackware-linux/bin/ld"
93 # Whether we need hard or soft links.
96 # A BSD-compatible nm program.
99 # A symbol stripping program
102 # Used to examine libraries when file_magic_cmd begins "file"
105 # Used on cygwin: DLL creation program.
108 # Used on cygwin: object dumper.
111 # Used on cygwin: assembler.
114 # The name of the directory that contains temporary libtool files.
117 # How to create reloadable object files.
119 reload_cmds
="\$LD\$reload_flag -o \$output\$reload_objs"
121 # How to pass a linker flag through the compiler.
124 # Object file suffix (normally "o").
127 # Old archive suffix (normally "a").
130 # Shared library suffix (normally ".so").
133 # Executable file suffix (normally "").
136 # Additional compiler flags for building library objects.
137 pic_flag
=" -fPIC -DPIC"
140 # What is the maximum length of a command?
143 # Does compiler simultaneously support -c and -o options?
146 # Must we lock files when doing compilation ?
149 # Do we need the lib prefix for modules?
152 # Do we need a version for libraries?
155 # Whether dlopen is supported.
156 dlopen_support
=unknown
158 # Whether dlopen of programs is supported.
161 # Whether dlopen of statically linked programs is supported.
162 dlopen_self_static
=unknown
164 # Compiler flag to prevent dynamic linking.
165 link_static_flag
="-static"
167 # Compiler flag to turn off builtin functions.
168 no_builtin_flag
=" -fno-builtin"
170 # Compiler flag to allow reflexive dlopens.
171 export_dynamic_flag_spec
="\${wl}--export-dynamic"
173 # Compiler flag to generate shared objects directly from archives.
174 whole_archive_flag_spec
="\${wl}--whole-archive\$convenience \${wl}--no-whole-archive"
176 # Compiler flag to generate thread-safe objects.
177 thread_safe_flag_spec
=""
179 # Library versioning type.
182 # Format of library name prefix.
183 libname_spec
="lib\$name"
185 # List of archive names. First name is the real one, the rest are links.
186 # The last name is the one that the linker finds with -lNAME.
187 library_names_spec
="\${libname}\${release}\${shared_ext}\$versuffix \${libname}\${release}\${shared_ext}\$major \$libname\${shared_ext}"
189 # The coded name of the library, if different from the real name.
190 soname_spec
="\${libname}\${release}\${shared_ext}\$major"
192 # Commands used to build and install an old-style archive.
194 old_archive_cmds
="\$AR \$AR_FLAGS \$oldlib\$oldobjs\$old_deplibs~\$RANLIB \$oldlib"
195 old_postinstall_cmds
="\$RANLIB \$oldlib~chmod 644 \$oldlib"
196 old_postuninstall_cmds
=""
198 # Create an old-style archive from a shared archive.
199 old_archive_from_new_cmds
=""
201 # Create a temporary old-style archive to link instead of a shared archive.
202 old_archive_from_expsyms_cmds
=""
204 # Commands used to build and install a shared archive.
205 archive_cmds
="\$CC -shared \$libobjs \$deplibs \$compiler_flags \${wl}-soname \$wl\$soname -o \$lib"
206 archive_expsym_cmds
="\$echo \\\"{ global:\\\" > \$output_objdir/\$libname.ver~
207 cat \$export_symbols | sed -e \\\"s/\\\\(.*\\\\)/\\\\1;/\\\" >> \$output_objdir/\$libname.ver~
208 \$echo \\\"local: *; };\\\" >> \$output_objdir/\$libname.ver~
209 \$CC -shared \$libobjs \$deplibs \$compiler_flags \${wl}-soname \$wl\$soname \${wl}-version-script \${wl}\$output_objdir/\$libname.ver -o \$lib"
211 postuninstall_cmds
=""
213 # Commands used to build a loadable module (assumed same as above if empty)
215 module_expsym_cmds
=""
217 # Commands to strip libraries.
218 old_striplib
="strip --strip-debug"
219 striplib
="strip --strip-unneeded"
221 # Dependencies to place before the objects being linked to create a
225 # Dependencies to place after the objects being linked to create a
229 # Dependencies to place before the objects being linked to create a
233 # Dependencies to place after the objects being linked to create a
237 # The library search path used internally by the compiler when linking
239 compiler_lib_search_path
=""
241 # Method to check whether dependent libraries are shared objects.
242 deplibs_check_method
="pass_all"
244 # Command to use when deplibs_check_method == file_magic.
245 file_magic_cmd
="\$MAGIC_CMD"
247 # Flag that allows shared libraries with undefined symbols to be built.
248 allow_undefined_flag
=""
250 # Flag that forces no undefined symbols.
253 # Commands used to finish a libtool library installation in a directory.
254 finish_cmds
="PATH=\\\"\\\$PATH:/sbin\\\" ldconfig -n \$libdir"
256 # Same as above, but a single script fragment to be evaled but not shown.
259 # Take the output of nm and produce a listing of raw symbols and C names.
260 global_symbol_pipe
="sed -n -e 's/^.*[ ]\\([ABCDGIRSTW][ABCDGIRSTW]*\\)[ ][ ]*\\(\\)\\([_A-Za-z][_A-Za-z0-9]*\\)\$/\\1 \\2\\3 \\3/p'"
262 # Transform the output of nm in a proper C declaration
263 global_symbol_to_cdecl
="sed -n -e 's/^. .* \\(.*\\)\$/extern int \\1;/p'"
265 # Transform the output of nm in a C name address pair
266 global_symbol_to_c_name_address
="sed -n -e 's/^: \\([^ ]*\\) \$/ {\\\"\\1\\\", (lt_ptr) 0},/p' -e 's/^[BCDEGRST] \\([^ ]*\\) \\([^ ]*\\)\$/ {\"\\2\", (lt_ptr) \\&\\2},/p'"
268 # This is the shared library runtime path variable.
269 runpath_var
=LD_RUN_PATH
271 # This is the shared library path variable.
272 shlibpath_var
=LD_LIBRARY_PATH
274 # Is shlibpath searched before the hard-coded library search path?
275 shlibpath_overrides_runpath
=no
277 # How to hardcode a shared library path into an executable.
278 hardcode_action
=immediate
280 # Whether we should hardcode library paths into libraries.
281 hardcode_into_libs
=yes
283 # Flag to hardcode $libdir into a binary during linking.
284 # This must work even if $libdir does not exist.
285 hardcode_libdir_flag_spec
="\${wl}--rpath \${wl}\$libdir"
287 # If ld is used when linking, flag to hardcode $libdir into
288 # a binary during linking. This must work even if $libdir does
290 hardcode_libdir_flag_spec_ld
=""
292 # Whether we need a single -rpath flag with a separated argument.
293 hardcode_libdir_separator
=""
295 # Set to yes if using DIR/libNAME during linking hardcodes DIR into the
299 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
303 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
304 # the resulting binary.
305 hardcode_shlibpath_var
=unsupported
307 # Set to yes if building a shared library automatically hardcodes DIR into the library
308 # and all subsequent libraries and executables linked against it.
309 hardcode_automatic
=no
311 # Variables whose values should be saved in libtool wrapper scripts and
312 # restored at relink time.
313 variables_saved_for_relink
="PATH LD_RUN_PATH GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
315 # Whether libtool must link a program against all its dependency libraries.
316 link_all_deplibs
=unknown
318 # Compile-time system search path for libraries
319 sys_lib_search_path_spec
=" /usr/lib/gcc-lib/i486-slackware-linux/3.3.4/ /usr/lib/gcc/i486-slackware-linux/3.3.4/ /usr/lib/gcc-lib/i486-slackware-linux/3.3.4/../../../../i486-slackware-linux/lib/i486-slackware-linux/3.3.4/ /usr/lib/gcc-lib/i486-slackware-linux/3.3.4/../../../../i486-slackware-linux/lib/ /usr/lib/gcc-lib/i486-slackware-linux/3.3.4/../../../i486-slackware-linux/3.3.4/ /usr/lib/gcc-lib/i486-slackware-linux/3.3.4/../../../ /lib/i486-slackware-linux/3.3.4/ /lib/ /usr/lib/i486-slackware-linux/3.3.4/ /usr/lib/"
321 # Run-time system search path for libraries
322 sys_lib_dlsearch_path_spec
="/lib /usr/lib /usr/local/lib /usr/lib /usr/X11R6/lib "
324 # Fix the shell variable $srcfile for the compiler.
327 # Set to yes if exported symbols are required.
328 always_export_symbols
=no
330 # The commands to list exported symbols.
331 export_symbols_cmds
="\$NM \$libobjs \$convenience | \$global_symbol_pipe | \$SED 's/.* //' | sort | uniq > \$export_symbols"
333 # The commands to extract the exported symbol list from a shared archive.
334 extract_expsyms_cmds
=""
336 # Symbols that should not be listed in the preloaded symbols.
337 exclude_expsyms
="_GLOBAL_OFFSET_TABLE_"
339 # Symbols that must always be exported.
342 # ### END LIBTOOL CONFIG
344 # ltmain.sh - Provide generalized library-building support services.
345 # NOTE: Changing this file will not affect anything until you rerun configure.
347 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004
348 # Free Software Foundation, Inc.
349 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
351 # This program is free software; you can redistribute it and/or modify
352 # it under the terms of the GNU General Public License as published by
353 # the Free Software Foundation; either version 2 of the License, or
354 # (at your option) any later version.
356 # This program is distributed in the hope that it will be useful, but
357 # WITHOUT ANY WARRANTY; without even the implied warranty of
358 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
359 # General Public License for more details.
361 # You should have received a copy of the GNU General Public License
362 # along with this program; if not, write to the Free Software
363 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
365 # As a special exception to the GNU General Public License, if you
366 # distribute this file as part of a program that contains a
367 # configuration script generated by Autoconf, you may include it under
368 # the same distribution terms that you use for the rest of that program.
372 # Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
373 # is ksh but when the shell is invoked as "sh" and the current value of
374 # the _XPG environment variable is not equal to 1 (one), the special
375 # positional parameter $0, within a function call, is the name of the
379 # The name of this program:
380 progname
=`echo "$progpath" | $SED $basename`
390 TIMESTAMP
=" (1.1220.2.130 2004/09/19 12:13:49)"
392 # See if we are running on zsh, and set the options which allow our
393 # commands through without removal of \ escapes.
394 if test -n "${ZSH_VERSION+set}" ; then
398 # Check that we have a working $echo.
399 if test "X$1" = X--no-reexec
; then
400 # Discard the --no-reexec flag, and continue.
402 elif test "X$1" = X--fallback-echo
; then
403 # Avoid inline document here, it may be left over
405 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
406 # Yippee, $echo works!
409 # Restart under the correct shell, and then maybe $echo will work.
410 exec $SHELL "$progpath" --no-reexec ${1+"$@"}
413 if test "X$1" = X--fallback-echo
; then
414 # used as fallback echo
423 help="Try \`$progname --help' for more information."
424 magic
="%%%MAGIC variable%%%"
429 # Sed substitution that helps us do robust quoting. It backslashifies
430 # metacharacters that are still active within double-quoted strings.
431 Xsed
="${SED}"' -e 1s/^X//'
432 sed_quote_subst
='s/\([\\`\\"$\\\\]\)/\\\1/g'
433 # test EBCDIC or ASCII
434 case `echo A|tr A '\301'` in
435 A
) # EBCDIC based system
436 SP2NL
="tr '\100' '\n'"
437 NL2SP
="tr '\r\n' '\100\100'"
439 *) # Assume ASCII based system
440 SP2NL
="tr '\040' '\012'"
441 NL2SP
="tr '\015\012' '\040\040'"
446 # Only set LANG and LC_ALL to C if already set.
447 # These must not be set unconditionally because not all systems understand
448 # e.g. LANG=C (notably SCO).
449 # We save the old values to restore during execute mode.
450 if test "${LC_ALL+set}" = set; then
451 save_LC_ALL
="$LC_ALL"; LC_ALL
=C
; export LC_ALL
453 if test "${LANG+set}" = set; then
454 save_LANG
="$LANG"; LANG
=C
; export LANG
457 # Make sure IFS has a sensible default
461 if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
462 $echo "$modename: not configured to build any kind of library" 1>&2
463 $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
476 lo2o
="s/\\.lo\$/.${objext}/"
477 o2lo
="s/\\.${objext}\$/.lo/"
479 #####################################
480 # Shell function definitions:
481 # This seems to be the best place for them
483 # func_win32_libid arg
484 # return the library type of file 'arg'
486 # Need a lot of goo to handle *both* DLLs and import libs
487 # Has to be a shell function in order to 'eat' the argument
488 # that is supplied when $file_magic_command is called.
489 func_win32_libid
() {
490 win32_libid_type
="unknown"
491 win32_fileres
=`file -L $1 2>/dev/null`
492 case $win32_fileres in
493 *ar\ archive\ import\ library
*) # definitely import
494 win32_libid_type
="x86 archive import"
496 *ar\ archive
*) # could be an import, or static
497 if eval $OBJDUMP -f $1 |
$SED -e '10q' 2>/dev
/null | \
498 $EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev
/null
; then
499 win32_nmres
=`eval $NM -f posix -A $1 | \
500 sed -n -e '1,100{/ I /{x;/import/!{s/^/import/;h;p;};x;};}'`
501 if test "X$win32_nmres" = "Ximport" ; then
502 win32_libid_type
="x86 archive import"
504 win32_libid_type
="x86 archive static"
509 win32_libid_type
="x86 DLL"
511 *executable
*) # but shell scripts are "executable" too...
512 case $win32_fileres in
513 *MS\ Windows\ PE\ Intel
*)
514 win32_libid_type
="x86 DLL"
519 $echo $win32_libid_type
524 # Infer tagged configuration to use if any are available and
525 # if one wasn't chosen via the "--tag" command line option.
526 # Only attempt this if the compiler in the base compile
527 # command doesn't match the default compiler.
528 # arg is usually of the form 'gcc ...'
530 if test -n "$available_tags" && test -z "$tagname"; then
534 *[\
[\~\
#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
538 CC_quoted
="$CC_quoted $arg"
541 # Blanks in the command may have been stripped by the calling shell,
542 # but not from the CC environment variable when configure was run.
543 " $CC "* |
"$CC "* |
" `$echo $CC` "* |
"`$echo $CC` "* |
" $CC_quoted"* |
"$CC_quoted "* |
" `$echo $CC_quoted` "* |
"`$echo $CC_quoted` "*) ;;
544 # Blanks at the start of $base_compile will cause this to fail
545 # if we don't check for them as well.
547 for z
in $available_tags; do
548 if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev
/null
; then
549 # Evaluate the configuration.
550 eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`"
553 # Double-quote args containing other shell metacharacters.
555 *[\
[\~\
#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
559 CC_quoted
="$CC_quoted $arg"
562 " $CC "* |
"$CC "* |
" `$echo $CC` "* |
"`$echo $CC` "* |
" $CC_quoted"* |
"$CC_quoted "* |
" `$echo $CC_quoted` "* |
"`$echo $CC_quoted` "*)
563 # The compiler in the base compile command matches
564 # the one in the tagged configuration.
565 # Assume this is the tagged configuration we want.
572 # If $tagname still isn't set, then no tagged configuration
573 # was found and let the user know that the "--tag" command
574 # line option must be used.
575 if test -z "$tagname"; then
576 $echo "$modename: unable to infer tagged configuration"
577 $echo "$modename: specify a tag with \`--tag'" 1>&2
580 # $echo "$modename: using $tagname tagged configuration"
588 # func_extract_archives gentop oldlib ...
589 func_extract_archives
() {
590 my_gentop
="$1"; shift
598 $show "${rm}r $my_gentop"
599 $run ${rm}r
"$my_gentop"
600 $show "$mkdir $my_gentop"
601 $run $mkdir "$my_gentop"
603 if test "$my_status" -ne 0 && test ! -d "$my_gentop"; then
607 for my_xlib
in $my_oldlibs; do
608 # Extract the objects.
610 [\\/]* |
[A-Za-z
]:[\\/]*) my_xabs
="$my_xlib" ;;
611 *) my_xabs
=`pwd`"/$my_xlib" ;;
613 my_xlib
=`$echo "X$my_xlib" | $Xsed -e 's%^.*/%%'`
614 my_xdir
="$my_gentop/$my_xlib"
616 $show "${rm}r $my_xdir"
617 $run ${rm}r
"$my_xdir"
618 $show "$mkdir $my_xdir"
619 $run $mkdir "$my_xdir"
621 if test "$status" -ne 0 && test ! -d "$my_xdir"; then
626 $show "Extracting $my_xabs"
627 # Do not bother doing anything if just a dry run
628 if test -z "$run"; then
629 darwin_orig_dir
=`pwd`
630 cd $my_xdir ||
exit $?
631 darwin_archive
=$my_xabs
633 darwin_base_archive
=`basename $darwin_archive`
634 darwin_arches
=`lipo -info "$darwin_archive" 2>/dev/null | $EGREP Architectures 2>/dev/null`
635 if test -n "$darwin_arches"; then
636 darwin_arches
=`echo "$darwin_arches" | $SED -e 's/.*are://'`
638 $show "$darwin_base_archive has multiple architectures $darwin_arches"
639 for darwin_arch
in $darwin_arches ; do
640 mkdir
-p "unfat-$$/${darwin_base_archive}-${darwin_arch}"
641 lipo
-thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}"
642 # Remove the table of contents from the thin files.
643 $AR -d "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" __.SYMDEF
2>/dev
/null || true
644 $AR -d "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" __.SYMDEF\ SORTED
2>/dev
/null || true
645 cd "unfat-$$/${darwin_base_archive}-${darwin_arch}"
646 $AR -xo "${darwin_base_archive}"
647 rm "${darwin_base_archive}"
649 done # $darwin_arches
650 ## Okay now we have a bunch of thin objects, gotta fatten them up :)
651 darwin_filelist
=`find unfat-$$ -type f | xargs basename | sort -u | $NL2SP`
654 for darwin_file
in $darwin_filelist; do
655 darwin_files
=`find unfat-$$ -name $darwin_file -print | $NL2SP`
656 lipo
-create -output "$darwin_file" $darwin_files
657 done # $darwin_filelist
659 cd "$darwin_orig_dir"
662 (cd $my_xdir && $AR x
$my_xabs) ||
exit $?
667 # We will extract separately just the conflicting names and we will
668 # no longer touch any unique names. It is faster to leave these
669 # extract automatically by $AR in one run.
670 $show "(cd $my_xdir && $AR x $my_xabs)"
671 $run eval "(cd \$my_xdir && $AR x \$my_xabs)" ||
exit $?
672 if ($AR t
"$my_xabs" |
sort |
sort -uc >/dev
/null
2>&1); then
675 $echo "$modename: warning: object name conflicts; renaming object files" 1>&2
676 $echo "$modename: warning: to ensure that they will not overwrite" 1>&2
677 $AR t
"$my_xabs" |
sort |
uniq -cd |
while read -r count name
680 while test "$i" -le "$count"
682 # Put our $i before any first dot (extension)
683 # Never overwrite any file
685 while test "X$name_to" = "X$name" ||
test -f "$my_xdir/$name_to"
687 name_to
=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"`
689 $show "(cd $my_xdir && $AR xN $i $my_xabs '$name' && $mv '$name' '$name_to')"
690 $run eval "(cd \$my_xdir && $AR xN $i \$my_xabs '$name' && $mv '$name' '$name_to')" ||
exit $?
697 my_oldobjs
="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
700 func_extract_archives_result
="$my_oldobjs"
702 # End of Shell function definitions
703 #####################################
706 eval std_shrext
=\"$shrext_cmds\"
708 # Parse our command line options once, thoroughly.
709 while test "$#" -gt 0
715 -*=*) optarg
=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;;
719 # If the previous option needs an argument, assign it.
720 if test -n "$prev"; then
723 execute_dlfiles
="$execute_dlfiles $arg"
727 preserve_args
="${preserve_args}=$arg"
729 # Check whether tagname contains only valid characters
732 $echo "$progname: invalid tag name: $tagname" 1>&2
739 # Don't test for the "default" C tag, as we know, it's there, but
740 # not specially marked.
743 if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$progpath" > /dev
/null
; then
744 taglist
="$taglist $tagname"
745 # Evaluate the configuration.
746 eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^# ### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $progpath`"
748 $echo "$progname: ignoring unknown tag $tagname" 1>&2
763 # Have we seen a non-optional argument yet?
770 $echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP"
772 $echo "Copyright (C) 2003 Free Software Foundation, Inc."
773 $echo "This is free software; see the source for copying conditions. There is NO"
774 $echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
779 ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $progpath
780 # Now print the configurations for the tags.
781 for tagname
in $taglist; do
782 ${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$progpath"
788 $echo "$progname: enabling shell trace mode"
790 preserve_args
="$preserve_args $arg"
799 if test "$build_libtool_libs" = yes; then
800 $echo "enable shared libraries"
802 $echo "disable shared libraries"
804 if test "$build_old_libs" = yes; then
805 $echo "enable static libraries"
807 $echo "disable static libraries"
812 --finish) mode
="finish" ;;
814 --mode) prevopt
="--mode" prev
=mode
;;
815 --mode=*) mode
="$optarg" ;;
817 --preserve-dup-deps) duplicate_deps
="yes" ;;
821 preserve_args
="$preserve_args $arg"
824 --tag) prevopt
="--tag" prev
=tag
;;
826 set tag
"$optarg" ${1+"$@"}
829 preserve_args
="$preserve_args --tag"
838 $echo "$modename: unrecognized option \`$arg'" 1>&2
850 if test -n "$prevopt"; then
851 $echo "$modename: option \`$prevopt' requires an argument" 1>&2
856 # If this variable is set in any of the actions, the command in it
857 # will be execed at the end. This prevents here-documents from being
858 # left over by shells.
861 if test -z "$show_help"; then
863 # Infer the operation mode.
864 if test -z "$mode"; then
865 $echo "*** Warning: inferring the mode of operation is deprecated." 1>&2
866 $echo "*** Future versions of Libtool will require -mode=MODE be specified." 1>&2
868 *cc | cc
* |
*++ | gcc
* |
*-gcc* | g
++* | xlc
*)
880 *db |
*dbx |
*strace |
*truss
)
890 # If we have no mode, but dlfiles were specified, then do execute mode.
891 test -n "$execute_dlfiles" && mode
=execute
893 # Just use the default operation mode.
894 if test -z "$mode"; then
895 if test -n "$nonopt"; then
896 $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2
898 $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2
905 # Only execute mode is allowed to have -dlopen flags.
906 if test -n "$execute_dlfiles" && test "$mode" != execute
; then
907 $echo "$modename: unrecognized option \`-dlopen'" 1>&2
912 # Change the help message to a mode-specific one.
914 help="Try \`$modename --help --mode=$mode' for more information."
916 # These modes are in order of execution frequency so that they run quickly.
918 # libtool compile mode
920 modename
="$modename: compile"
921 # Get the compilation command and the source file.
923 srcfile
="$nonopt" # always keep a non-empty value in "srcfile"
934 # do not "continue". Instead, add this to base_compile
946 # Accept any command-line options.
949 if test -n "$libobj" ; then
950 $echo "$modename: you cannot specify \`-o' more than once" 1>&2
957 -static |
-prefer-pic |
-prefer-non-pic)
968 arg_mode
=arg
# the next one goes into the "base_compile" arg list
969 continue # The current "srcfile" will either be retained or
970 ;; # replaced later. I would guess that would be a bug.
973 args
=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"`
975 save_ifs
="$IFS"; IFS
=','
979 # Double-quote args containing other shell metacharacters.
980 # Many Bourne shells cannot handle close brackets correctly
981 # in scan sets, so we specify it separately.
983 *[\
[\~\
#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
987 lastarg
="$lastarg $arg"
990 lastarg
=`$echo "X$lastarg" | $Xsed -e "s/^ //"`
992 # Add the arguments to base_compile.
993 base_compile
="$base_compile $lastarg"
998 # Accept the current argument as the source file.
999 # The previous "srcfile" becomes the current argument.
1006 esac # case $arg_mode
1008 # Aesthetically quote the previous argument.
1009 lastarg
=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"`
1012 # Double-quote args containing other shell metacharacters.
1013 # Many Bourne shells cannot handle close brackets correctly
1014 # in scan sets, so we specify it separately.
1015 *[\
[\~\
#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
1016 lastarg
="\"$lastarg\""
1020 base_compile
="$base_compile $lastarg"
1025 $echo "$modename: you must specify an argument for -Xcompile"
1029 $echo "$modename: you must specify a target with \`-o'" 1>&2
1033 # Get the name of the library object.
1034 [ -z "$libobj" ] && libobj
=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'`
1038 # Recognize several different file suffixes.
1039 # If the user specifies -o file.o, it is replaced with file.lo
1049 *.class
) xform
=class
;;
1054 *.java
) xform
=java
;;
1057 libobj
=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"`
1060 *.lo
) obj
=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;;
1062 $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2
1067 func_infer_tag
$base_compile
1069 for arg
in $later; do
1088 objname
=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
1089 xdir
=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'`
1090 if test "X$xdir" = "X$obj"; then
1095 lobj
=${xdir}$objdir/$objname
1097 if test -z "$base_compile"; then
1098 $echo "$modename: you must specify a compilation command" 1>&2
1103 # Delete any leftover library objects.
1104 if test "$build_old_libs" = yes; then
1105 removelist
="$obj $lobj $libobj ${libobj}T"
1107 removelist
="$lobj $libobj ${libobj}T"
1110 $run $rm $removelist
1111 trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15
1113 # On Cygwin there's no "real" PIC flag so we must build both object types
1115 cygwin
* | mingw
* | pw32
* | os2
*)
1119 if test "$pic_mode" = no
&& test "$deplibs_check_method" != pass_all
; then
1120 # non-PIC code in shared libraries is not supported
1124 # Calculate the filename of the output object if compiler does
1125 # not support -o with -c
1126 if test "$compiler_c_o" = no
; then
1127 output_obj
=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.
${objext}
1128 lockfile
="$output_obj.lock"
1129 removelist
="$removelist $output_obj $lockfile"
1130 trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15
1137 # Lock this critical section if it is needed
1138 # We use this script file to make the link, it avoids creating a new file
1139 if test "$need_locks" = yes; then
1140 until $run ln "$progpath" "$lockfile" 2>/dev
/null
; do
1141 $show "Waiting for $lockfile to be removed"
1144 elif test "$need_locks" = warn
; then
1145 if test -f "$lockfile"; then
1147 *** ERROR, $lockfile exists and contains:
1148 `cat $lockfile 2>/dev/null`
1150 This indicates that another process is trying to use the same
1151 temporary object file, and libtool could not work around it because
1152 your compiler does not support \`-c' and \`-o' together. If you
1153 repeat this compilation, it may succeed, by chance, but you had better
1154 avoid parallel builds (make -j) in this platform, or get a better
1157 $run $rm $removelist
1160 $echo $srcfile > "$lockfile"
1163 if test -n "$fix_srcfile_path"; then
1164 eval srcfile
=\"$fix_srcfile_path\"
1167 $run $rm "$libobj" "${libobj}T"
1169 # Create a libtool object file (analogous to a ".la" file),
1170 # but don't create it if we're doing a dry run.
1171 test -z "$run" && cat > ${libobj}T
<<EOF
1172 # $libobj - a libtool object file
1173 # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
1175 # Please DO NOT delete this file!
1176 # It is necessary for linking the library.
1178 # Name of the PIC object.
1181 # Only build a PIC object if we are building libtool libraries.
1182 if test "$build_libtool_libs" = yes; then
1183 # Without this assignment, base_compile gets emptied.
1184 fbsd_hideous_sh_bug
=$base_compile
1186 if test "$pic_mode" != no
; then
1187 command="$base_compile $srcfile $pic_flag"
1189 # Don't build PIC code
1190 command="$base_compile $srcfile"
1193 if test ! -d "${xdir}$objdir"; then
1194 $show "$mkdir ${xdir}$objdir"
1195 $run $mkdir ${xdir}$objdir
1197 if test "$status" -ne 0 && test ! -d "${xdir}$objdir"; then
1202 if test -z "$output_obj"; then
1203 # Place PIC objects in $objdir
1204 command="$command -o $lobj"
1207 $run $rm "$lobj" "$output_obj"
1210 if $run eval "$command"; then :
1212 test -n "$output_obj" && $run $rm $removelist
1216 if test "$need_locks" = warn
&&
1217 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
1219 *** ERROR, $lockfile contains:
1220 `cat $lockfile 2>/dev/null`
1222 but it should contain:
1225 This indicates that another process is trying to use the same
1226 temporary object file, and libtool could not work around it because
1227 your compiler does not support \`-c' and \`-o' together. If you
1228 repeat this compilation, it may succeed, by chance, but you had better
1229 avoid parallel builds (make -j) in this platform, or get a better
1232 $run $rm $removelist
1236 # Just move the object if needed, then go on to compile the next one
1237 if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then
1238 $show "$mv $output_obj $lobj"
1239 if $run $mv $output_obj $lobj; then :
1242 $run $rm $removelist
1247 # Append the name of the PIC object to the libtool object file.
1248 test -z "$run" && cat >> ${libobj}T
<<EOF
1249 pic_object='$objdir/$objname'
1253 # Allow error messages only from the first compilation.
1254 if test "$suppress_opt" = yes; then
1255 suppress_output
=' >/dev/null 2>&1'
1258 # No PIC object so indicate it doesn't exist in the libtool
1260 test -z "$run" && cat >> ${libobj}T
<<EOF
1266 # Only build a position-dependent object if we build old libraries.
1267 if test "$build_old_libs" = yes; then
1268 if test "$pic_mode" != yes; then
1269 # Don't build PIC code
1270 command="$base_compile $srcfile"
1272 command="$base_compile $srcfile $pic_flag"
1274 if test "$compiler_c_o" = yes; then
1275 command="$command -o $obj"
1278 # Suppress compiler output if we already did a PIC compilation.
1279 command="$command$suppress_output"
1280 $run $rm "$obj" "$output_obj"
1282 if $run eval "$command"; then :
1284 $run $rm $removelist
1288 if test "$need_locks" = warn
&&
1289 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
1291 *** ERROR, $lockfile contains:
1292 `cat $lockfile 2>/dev/null`
1294 but it should contain:
1297 This indicates that another process is trying to use the same
1298 temporary object file, and libtool could not work around it because
1299 your compiler does not support \`-c' and \`-o' together. If you
1300 repeat this compilation, it may succeed, by chance, but you had better
1301 avoid parallel builds (make -j) in this platform, or get a better
1304 $run $rm $removelist
1308 # Just move the object if needed
1309 if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then
1310 $show "$mv $output_obj $obj"
1311 if $run $mv $output_obj $obj; then :
1314 $run $rm $removelist
1319 # Append the name of the non-PIC object the libtool object file.
1320 # Only append if the libtool object file exists.
1321 test -z "$run" && cat >> ${libobj}T
<<EOF
1322 # Name of the non-PIC object.
1323 non_pic_object='$objname'
1327 # Append the name of the non-PIC object the libtool object file.
1328 # Only append if the libtool object file exists.
1329 test -z "$run" && cat >> ${libobj}T
<<EOF
1330 # Name of the non-PIC object.
1336 $run $mv "${libobj}T" "${libobj}"
1338 # Unlock the critical section if it was locked
1339 if test "$need_locks" != no
; then
1340 $run $rm "$lockfile"
1348 modename
="$modename: link"
1350 *-*-cygwin* |
*-*-mingw* |
*-*-pw32* |
*-*-os2*)
1351 # It is impossible to link a dll without this setting, and
1352 # we shouldn't force the makefile maintainer to figure out
1353 # which system we are compiling for in order to pass an extra
1354 # flag for every libtool invocation.
1355 # allow_undefined=no
1357 # FIXME: Unfortunately, there are problems with the above when trying
1358 # to make a dll which has undefined symbols, in which case not
1359 # even a static library is built. For now, we need to specify
1360 # -no-undefined on the libtool link line when we can be certain
1361 # that all symbols are satisfied, otherwise we get a static library.
1368 libtool_args
="$nonopt"
1369 base_compile
="$nonopt $@"
1370 compile_command
="$nonopt"
1371 finalize_command
="$nonopt"
1384 lib_search_path
=`pwd`
1393 export_symbols_regex
=
1401 precious_files_regex
=
1402 prefer_static_libs
=no
1415 func_infer_tag
$base_compile
1417 # We need to know -static, to get the right output filenames.
1421 -all-static |
-static)
1422 if test "X$arg" = "X-all-static"; then
1423 if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
1424 $echo "$modename: warning: complete static linking is impossible in this configuration" 1>&2
1426 if test -n "$link_static_flag"; then
1427 dlopen_self
=$dlopen_self_static
1430 if test -z "$pic_flag" && test -n "$link_static_flag"; then
1431 dlopen_self
=$dlopen_self_static
1434 build_libtool_libs
=no
1436 prefer_static_libs
=yes
1442 # See if our shared archives depend on static archives.
1443 test -n "$old_archive_from_new_cmds" && build_old_libs
=yes
1445 # Go through the arguments, transforming them on the way.
1446 while test "$#" -gt 0; do
1450 *[\
[\~\
#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
1451 qarg
=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test
1455 libtool_args
="$libtool_args $qarg"
1457 # If the previous option needs an argument, assign it.
1458 if test -n "$prev"; then
1461 compile_command
="$compile_command @OUTPUT@"
1462 finalize_command
="$finalize_command @OUTPUT@"
1468 if test "$preload" = no
; then
1469 # Add the symbol object into the linking commands.
1470 compile_command
="$compile_command @SYMFILE@"
1471 finalize_command
="$finalize_command @SYMFILE@"
1475 *.la |
*.lo
) ;; # We handle these cases below.
1477 if test "$dlself" = no
; then
1485 if test "$prev" = dlprefiles
; then
1487 elif test "$prev" = dlfiles
&& test "$dlopen_self" != yes; then
1497 if test "$prev" = dlfiles
; then
1498 dlfiles
="$dlfiles $arg"
1500 dlprefiles
="$dlprefiles $arg"
1508 export_symbols
="$arg"
1509 if test ! -f "$arg"; then
1510 $echo "$modename: symbol file \`$arg' does not exist"
1517 export_symbols_regex
="$arg"
1522 inst_prefix_dir
="$arg"
1527 precious_files_regex
="$arg"
1537 if test -f "$arg"; then
1540 for fil
in `cat $save_arg`
1542 # moreargs="$moreargs $fil"
1544 # A libtool-controlled object.
1546 # Check to see that this really is a libtool object.
1547 if (${SED} -e '2q' $arg |
grep "^# Generated by .*$PACKAGE") >/dev
/null
2>&1; then
1552 # If there is no directory component, then add one.
1554 */* |
*\\*) .
$arg ;;
1558 if test -z "$pic_object" || \
1559 test -z "$non_pic_object" ||
1560 test "$pic_object" = none
&& \
1561 test "$non_pic_object" = none
; then
1562 $echo "$modename: cannot find name of object for \`$arg'" 1>&2
1566 # Extract subdirectory from the argument.
1567 xdir
=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
1568 if test "X$xdir" = "X$arg"; then
1574 if test "$pic_object" != none
; then
1575 # Prepend the subdirectory the object is found in.
1576 pic_object
="$xdir$pic_object"
1578 if test "$prev" = dlfiles
; then
1579 if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
1580 dlfiles
="$dlfiles $pic_object"
1584 # If libtool objects are unsupported, then we need to preload.
1589 # CHECK ME: I think I busted this. -Ossama
1590 if test "$prev" = dlprefiles
; then
1591 # Preload the old-style object.
1592 dlprefiles
="$dlprefiles $pic_object"
1597 libobjs
="$libobjs $pic_object"
1602 if test "$non_pic_object" != none
; then
1603 # Prepend the subdirectory the object is found in.
1604 non_pic_object
="$xdir$non_pic_object"
1606 # A standard non-PIC object
1607 non_pic_objects
="$non_pic_objects $non_pic_object"
1608 if test -z "$pic_object" ||
test "$pic_object" = none
; then
1609 arg
="$non_pic_object"
1613 # Only an error if not doing a dry-run.
1614 if test -z "$run"; then
1615 $echo "$modename: \`$arg' is not a valid libtool object" 1>&2
1620 # Extract subdirectory from the argument.
1621 xdir
=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
1622 if test "X$xdir" = "X$arg"; then
1628 pic_object
=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"`
1629 non_pic_object
=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"`
1630 libobjs
="$libobjs $pic_object"
1631 non_pic_objects
="$non_pic_objects $non_pic_object"
1636 $echo "$modename: link input file \`$save_arg' does not exist"
1644 # We need an absolute path.
1646 [\\/]* |
[A-Za-z
]:[\\/]*) ;;
1648 $echo "$modename: only absolute run-paths are allowed" 1>&2
1652 if test "$prev" = rpath
; then
1655 *) rpath
="$rpath $arg" ;;
1660 *) xrpath
="$xrpath $arg" ;;
1667 compiler_flags
="$compiler_flags $qarg"
1669 compile_command
="$compile_command $qarg"
1670 finalize_command
="$finalize_command $qarg"
1674 linker_flags
="$linker_flags $qarg"
1675 compiler_flags
="$compiler_flags $wl$qarg"
1677 compile_command
="$compile_command $wl$qarg"
1678 finalize_command
="$finalize_command $wl$qarg"
1682 linker_flags
="$linker_flags $qarg"
1683 compiler_flags
="$compiler_flags $qarg"
1685 compile_command
="$compile_command $qarg"
1686 finalize_command
="$finalize_command $qarg"
1695 eval "$prev=\"\$arg\""
1700 fi # test -n "$prev"
1706 if test -n "$link_static_flag"; then
1707 compile_command
="$compile_command $link_static_flag"
1708 finalize_command
="$finalize_command $link_static_flag"
1714 # FIXME: remove this flag sometime in the future.
1715 $echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2
1739 -export-symbols |
-export-symbols-regex)
1740 if test -n "$export_symbols" ||
test -n "$export_symbols_regex"; then
1741 $echo "$modename: more than one -exported-symbols argument is not allowed"
1744 if test "X$arg" = "X-export-symbols"; then
1757 # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:*
1758 # so, if we see these flags be careful not to treat them like -L
1760 case $with_gcc/$host in
1761 no
/*-*-irix* |
/*-*-irix*)
1762 compile_command
="$compile_command $arg"
1763 finalize_command
="$finalize_command $arg"
1770 dir
=`$echo "X$arg" | $Xsed -e 's/^-L//'`
1771 # We need an absolute path.
1773 [\\/]* |
[A-Za-z
]:[\\/]*) ;;
1775 absdir
=`cd "$dir" && pwd`
1776 if test -z "$absdir"; then
1777 $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2
1786 deplibs
="$deplibs -L$dir"
1787 lib_search_path
="$lib_search_path $dir"
1791 *-*-cygwin* |
*-*-mingw* |
*-*-pw32* |
*-*-os2*)
1792 case :$dllsearchpath: in
1794 *) dllsearchpath
="$dllsearchpath:$dir";;
1802 if test "X$arg" = "X-lc" ||
test "X$arg" = "X-lm"; then
1804 *-*-cygwin* |
*-*-pw32* |
*-*-beos*)
1805 # These systems don't actually have a C or math library (as such)
1808 *-*-mingw* |
*-*-os2*)
1809 # These systems don't actually have a C library (as such)
1810 test "X$arg" = "X-lc" && continue
1812 *-*-openbsd* |
*-*-freebsd*)
1813 # Do not include libc due to us having libc/libc_r.
1814 test "X$arg" = "X-lc" && continue
1816 *-*-rhapsody* |
*-*-darwin1.
[012])
1817 # Rhapsody C and math libraries are in the System framework
1818 deplibs
="$deplibs -framework System"
1821 elif test "X$arg" = "X-lc_r"; then
1823 *-*-openbsd* |
*-*-freebsd*)
1824 # Do not include libc_r directly, use -pthread flag.
1829 deplibs
="$deplibs $arg"
1833 -mt|
-mthreads|
-kthread|
-Kthread|
-pthread|
-pthreads|
--thread-safe)
1834 deplibs
="$deplibs $arg"
1843 # gcc -m* arguments should be passed to the linker via $compiler_flags
1844 # in order to pass architecture information to the linker
1845 # (e.g. 32 vs 64-bit). This may also be accomplished via -Wl,-mfoo
1846 # but this is not reliable with gcc because gcc may use -mfoo to
1847 # select a different linker, different libraries, etc, while
1848 # -Wl,-mfoo simply passes -mfoo to the linker.
1850 # Unknown arguments in both finalize_command and compile_command need
1851 # to be aesthetically quoted because they are evaled later.
1852 arg
=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
1854 *[\
[\~\
#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
1858 compile_command
="$compile_command $arg"
1859 finalize_command
="$finalize_command $arg"
1860 if test "$with_gcc" = "yes" ; then
1861 compiler_flags
="$compiler_flags $arg"
1878 *-*-cygwin* |
*-*-mingw* |
*-*-pw32* |
*-*-os2*)
1879 # The PATH hackery in wrapper scripts is required on Windows
1880 # in order for the loader to find any dlls it needs.
1881 $echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2
1882 $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2
1885 *) no_install
=yes ;;
1902 -precious-files-regex)
1923 dir
=`$echo "X$arg" | $Xsed -e 's/^-R//'`
1924 # We need an absolute path.
1926 [\\/]* |
[A-Za-z
]:[\\/]*) ;;
1928 $echo "$modename: only absolute run-paths are allowed" 1>&2
1934 *) xrpath
="$xrpath $dir" ;;
1940 # The effects of -static are defined in a previous loop.
1941 # We used to do the same as -all-static on platforms that
1942 # didn't have a PIC flag, but the assumption that the effects
1943 # would be equivalent was wrong. It would break on at least
1944 # Digital Unix and AIX.
1964 args
=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'`
1966 save_ifs
="$IFS"; IFS
=','
1967 for flag
in $args; do
1970 *[\
[\~\
#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
1975 compiler_flags
="$compiler_flags $flag"
1978 arg
=`$echo "X$arg" | $Xsed -e "s/^ //"`
1982 args
=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'`
1984 save_ifs
="$IFS"; IFS
=','
1985 for flag
in $args; do
1988 *[\
[\~\
#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
1993 compiler_flags
="$compiler_flags $wl$flag"
1994 linker_flags
="$linker_flags $flag"
1997 arg
=`$echo "X$arg" | $Xsed -e "s/^ //"`
2015 # Some other compiler flag.
2017 # Unknown arguments in both finalize_command and compile_command need
2018 # to be aesthetically quoted because they are evaled later.
2019 arg
=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
2021 *[\
[\~\
#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
2028 # A standard object.
2033 # A libtool-controlled object.
2035 # Check to see that this really is a libtool object.
2036 if (${SED} -e '2q' $arg |
grep "^# Generated by .*$PACKAGE") >/dev
/null
2>&1; then
2041 # If there is no directory component, then add one.
2043 */* |
*\\*) .
$arg ;;
2047 if test -z "$pic_object" || \
2048 test -z "$non_pic_object" ||
2049 test "$pic_object" = none
&& \
2050 test "$non_pic_object" = none
; then
2051 $echo "$modename: cannot find name of object for \`$arg'" 1>&2
2055 # Extract subdirectory from the argument.
2056 xdir
=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
2057 if test "X$xdir" = "X$arg"; then
2063 if test "$pic_object" != none
; then
2064 # Prepend the subdirectory the object is found in.
2065 pic_object
="$xdir$pic_object"
2067 if test "$prev" = dlfiles
; then
2068 if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
2069 dlfiles
="$dlfiles $pic_object"
2073 # If libtool objects are unsupported, then we need to preload.
2078 # CHECK ME: I think I busted this. -Ossama
2079 if test "$prev" = dlprefiles
; then
2080 # Preload the old-style object.
2081 dlprefiles
="$dlprefiles $pic_object"
2086 libobjs
="$libobjs $pic_object"
2091 if test "$non_pic_object" != none
; then
2092 # Prepend the subdirectory the object is found in.
2093 non_pic_object
="$xdir$non_pic_object"
2095 # A standard non-PIC object
2096 non_pic_objects
="$non_pic_objects $non_pic_object"
2097 if test -z "$pic_object" ||
test "$pic_object" = none
; then
2098 arg
="$non_pic_object"
2102 # Only an error if not doing a dry-run.
2103 if test -z "$run"; then
2104 $echo "$modename: \`$arg' is not a valid libtool object" 1>&2
2109 # Extract subdirectory from the argument.
2110 xdir
=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
2111 if test "X$xdir" = "X$arg"; then
2117 pic_object
=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"`
2118 non_pic_object
=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"`
2119 libobjs
="$libobjs $pic_object"
2120 non_pic_objects
="$non_pic_objects $non_pic_object"
2127 deplibs
="$deplibs $arg"
2128 old_deplibs
="$old_deplibs $arg"
2133 # A libtool-controlled library.
2135 if test "$prev" = dlfiles
; then
2136 # This library was specified with -dlopen.
2137 dlfiles
="$dlfiles $arg"
2139 elif test "$prev" = dlprefiles
; then
2140 # The library was specified with -dlpreopen.
2141 dlprefiles
="$dlprefiles $arg"
2144 deplibs
="$deplibs $arg"
2149 # Some other compiler argument.
2151 # Unknown arguments in both finalize_command and compile_command need
2152 # to be aesthetically quoted because they are evaled later.
2153 arg
=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
2155 *[\
[\~\
#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
2162 # Now actually substitute the argument into the commands.
2163 if test -n "$arg"; then
2164 compile_command
="$compile_command $arg"
2165 finalize_command
="$finalize_command $arg"
2167 done # argument parsing loop
2169 if test -n "$prev"; then
2170 $echo "$modename: the \`$prevarg' option requires an argument" 1>&2
2175 if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then
2176 eval arg
=\"$export_dynamic_flag_spec\"
2177 compile_command
="$compile_command $arg"
2178 finalize_command
="$finalize_command $arg"
2182 # calculate the name of the file, without its directory
2183 outputname
=`$echo "X$output" | $Xsed -e 's%^.*/%%'`
2184 libobjs_save
="$libobjs"
2186 if test -n "$shlibpath_var"; then
2187 # get the directories listed in $shlibpath_var
2188 eval shlib_search_path
=\
`\$echo \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\`
2192 eval sys_lib_search_path
=\"$sys_lib_search_path_spec\"
2193 eval sys_lib_dlsearch_path
=\"$sys_lib_dlsearch_path_spec\"
2195 output_objdir
=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'`
2196 if test "X$output_objdir" = "X$output"; then
2197 output_objdir
="$objdir"
2199 output_objdir
="$output_objdir/$objdir"
2201 # Create the object directory.
2202 if test ! -d "$output_objdir"; then
2203 $show "$mkdir $output_objdir"
2204 $run $mkdir $output_objdir
2206 if test "$status" -ne 0 && test ! -d "$output_objdir"; then
2211 # Determine the type of output
2214 $echo "$modename: you must specify an output file" 1>&2
2218 *.
$libext) linkmode
=oldlib
;;
2219 *.lo |
*.
$objext) linkmode
=obj
;;
2220 *.la
) linkmode
=lib
;;
2221 *) linkmode
=prog
;; # Anything else should be a program.
2225 *cygwin
* |
*mingw
* |
*pw32
*)
2226 # don't eliminate duplications in $postdeps and $predeps
2227 duplicate_compiler_generated_deps
=yes
2230 duplicate_compiler_generated_deps
=$duplicate_deps
2236 # Find all interdependent deplibs by searching for libraries
2237 # that are linked more than once (e.g. -la -lb -la)
2238 for deplib
in $deplibs; do
2239 if test "X$duplicate_deps" = "Xyes" ; then
2241 *" $deplib "*) specialdeplibs
="$specialdeplibs $deplib" ;;
2244 libs
="$libs $deplib"
2247 if test "$linkmode" = lib
; then
2248 libs
="$predeps $libs $compiler_lib_search_path $postdeps"
2250 # Compute libraries that are listed more than once in $predeps
2251 # $postdeps and mark them as special (i.e., whose duplicates are
2252 # not to be eliminated).
2254 if test "X$duplicate_compiler_generated_deps" = "Xyes" ; then
2255 for pre_post_dep
in $predeps $postdeps; do
2256 case "$pre_post_deps " in
2257 *" $pre_post_dep "*) specialdeplibs
="$specialdeplibs $pre_post_deps" ;;
2259 pre_post_deps
="$pre_post_deps $pre_post_dep"
2268 need_relink
=no
# whether we're linking any uninstalled libtool libraries
2269 notinst_deplibs
= # not-installed libtool libraries
2270 notinst_path
= # paths that contain not-installed libtool libraries
2274 for file in $dlfiles $dlprefiles; do
2278 $echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2
2290 passes
="conv scan dlopen dlpreopen link"
2295 for pass
in $passes; do
2296 if test "$linkmode,$pass" = "lib,link" ||
2297 test "$linkmode,$pass" = "prog,scan"; then
2301 if test "$linkmode" = prog
; then
2303 dlopen
) libs
="$dlfiles" ;;
2304 dlpreopen
) libs
="$dlprefiles" ;;
2305 link
) libs
="$deplibs %DEPLIBS% $dependency_libs" ;;
2308 if test "$pass" = dlopen
; then
2309 # Collect dlpreopened libraries
2310 save_deplibs
="$deplibs"
2313 for deplib
in $libs; do
2317 -mt|
-mthreads|
-kthread|
-Kthread|
-pthread|
-pthreads|
--thread-safe)
2318 if test "$linkmode,$pass" = "prog,link"; then
2319 compile_deplibs
="$deplib $compile_deplibs"
2320 finalize_deplibs
="$deplib $finalize_deplibs"
2322 deplibs
="$deplib $deplibs"
2327 if test "$linkmode" != lib
&& test "$linkmode" != prog
; then
2328 $echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2
2331 if test "$pass" = conv
; then
2332 deplibs
="$deplib $deplibs"
2335 name
=`$echo "X$deplib" | $Xsed -e 's/^-l//'`
2336 for searchdir
in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do
2337 for search_ext
in .la
$std_shrext .so .a
; do
2338 # Search the libtool library
2339 lib
="$searchdir/lib${name}${search_ext}"
2340 if test -f "$lib"; then
2341 if test "$search_ext" = ".la"; then
2350 if test "$found" != yes; then
2351 # deplib doesn't seem to be a libtool library
2352 if test "$linkmode,$pass" = "prog,link"; then
2353 compile_deplibs
="$deplib $compile_deplibs"
2354 finalize_deplibs
="$deplib $finalize_deplibs"
2356 deplibs
="$deplib $deplibs"
2357 test "$linkmode" = lib
&& newdependency_libs
="$deplib $newdependency_libs"
2360 else # deplib is a libtool library
2361 # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib,
2362 # We need to do some special things here, and not later.
2363 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
2364 case " $predeps $postdeps " in
2366 if (${SED} -e '2q' $lib |
2367 grep "^# Generated by .*$PACKAGE") >/dev
/null
2>&1; then
2371 */* |
*\\*) .
$lib ;;
2374 for l
in $old_library $library_names; do
2377 if test "X$ll" = "X$old_library" ; then # only static version available
2379 ladir
=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'`
2380 test "X$ladir" = "X$lib" && ladir
="."
2381 lib
=$ladir/$old_library
2382 if test "$linkmode,$pass" = "prog,link"; then
2383 compile_deplibs
="$deplib $compile_deplibs"
2384 finalize_deplibs
="$deplib $finalize_deplibs"
2386 deplibs
="$deplib $deplibs"
2387 test "$linkmode" = lib
&& newdependency_libs
="$deplib $newdependency_libs"
2401 deplibs
="$deplib $deplibs"
2402 test "$pass" = conv
&& continue
2403 newdependency_libs
="$deplib $newdependency_libs"
2404 newlib_search_path
="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
2407 if test "$pass" = conv
; then
2408 deplibs
="$deplib $deplibs"
2411 if test "$pass" = scan
; then
2412 deplibs
="$deplib $deplibs"
2414 compile_deplibs
="$deplib $compile_deplibs"
2415 finalize_deplibs
="$deplib $finalize_deplibs"
2417 newlib_search_path
="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
2420 $echo "$modename: warning: \`-L' is ignored for archives/objects" 1>&2
2426 if test "$pass" = link
; then
2427 dir
=`$echo "X$deplib" | $Xsed -e 's/^-R//'`
2428 # Make sure the xrpath contains only unique directories.
2431 *) xrpath
="$xrpath $dir" ;;
2434 deplibs
="$deplib $deplibs"
2437 *.la
) lib
="$deplib" ;;
2439 if test "$pass" = conv
; then
2440 deplibs
="$deplib $deplibs"
2446 case $deplibs_check_method in
2448 set dummy
$deplibs_check_method
2449 match_pattern_regex
=`expr "$deplibs_check_method" : "$2 \(.*\)"`
2450 if eval $echo \"$deplib\" 2>/dev
/null \
2452 |
$EGREP "$match_pattern_regex" > /dev
/null
; then
2460 if test "$valid_a_lib" != yes; then
2462 $echo "*** Warning: Trying to link with static lib archive $deplib."
2463 $echo "*** I have the capability to make that library automatically link in when"
2464 $echo "*** you link to this library. But I can only do this if you have a"
2465 $echo "*** shared version of the library, which you do not appear to have"
2466 $echo "*** because the file extensions .$libext of this argument makes me believe"
2467 $echo "*** that it is just a static archive that I should not used here."
2470 $echo "*** Warning: Linking the shared library $output against the"
2471 $echo "*** static library $deplib is not portable!"
2472 deplibs
="$deplib $deplibs"
2477 if test "$pass" != link
; then
2478 deplibs
="$deplib $deplibs"
2480 compile_deplibs
="$deplib $compile_deplibs"
2481 finalize_deplibs
="$deplib $finalize_deplibs"
2488 if test "$pass" = conv
; then
2489 deplibs
="$deplib $deplibs"
2490 elif test "$linkmode" = prog
; then
2491 if test "$pass" = dlpreopen ||
test "$dlopen_support" != yes ||
test "$build_libtool_libs" = no
; then
2492 # If there is no dlopen support or we're linking statically,
2493 # we need to preload.
2494 newdlprefiles
="$newdlprefiles $deplib"
2495 compile_deplibs
="$deplib $compile_deplibs"
2496 finalize_deplibs
="$deplib $finalize_deplibs"
2498 newdlfiles
="$newdlfiles $deplib"
2508 if test "$found" = yes ||
test -f "$lib"; then :
2510 $echo "$modename: cannot find the library \`$lib'" 1>&2
2514 # Check to see that this really is a libtool archive.
2515 if (${SED} -e '2q' $lib |
grep "^# Generated by .*$PACKAGE") >/dev
/null
2>&1; then :
2517 $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
2521 ladir
=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'`
2522 test "X$ladir" = "X$lib" && ladir
="."
2530 # If the library was installed with an old release of libtool,
2531 # it will not redefine variables installed, or shouldnotlink
2537 */* |
*\\*) .
$lib ;;
2541 if test "$linkmode,$pass" = "lib,link" ||
2542 test "$linkmode,$pass" = "prog,scan" ||
2543 { test "$linkmode" != prog
&& test "$linkmode" != lib
; }; then
2544 test -n "$dlopen" && dlfiles
="$dlfiles $dlopen"
2545 test -n "$dlpreopen" && dlprefiles
="$dlprefiles $dlpreopen"
2548 if test "$pass" = conv
; then
2549 # Only check for convenience libraries
2550 deplibs
="$lib $deplibs"
2551 if test -z "$libdir"; then
2552 if test -z "$old_library"; then
2553 $echo "$modename: cannot find name of link library for \`$lib'" 1>&2
2556 # It is a libtool convenience library, so add in its objects.
2557 convenience
="$convenience $ladir/$objdir/$old_library"
2558 old_convenience
="$old_convenience $ladir/$objdir/$old_library"
2560 for deplib
in $dependency_libs; do
2561 deplibs
="$deplib $deplibs"
2562 if test "X$duplicate_deps" = "Xyes" ; then
2563 case "$tmp_libs " in
2564 *" $deplib "*) specialdeplibs
="$specialdeplibs $deplib" ;;
2567 tmp_libs
="$tmp_libs $deplib"
2569 elif test "$linkmode" != prog
&& test "$linkmode" != lib
; then
2570 $echo "$modename: \`$lib' is not a convenience library" 1>&2
2577 # Get the name of the library we link against.
2579 for l
in $old_library $library_names; do
2582 if test -z "$linklib"; then
2583 $echo "$modename: cannot find name of link library for \`$lib'" 1>&2
2587 # This library was specified with -dlopen.
2588 if test "$pass" = dlopen
; then
2589 if test -z "$libdir"; then
2590 $echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2
2593 if test -z "$dlname" ||
2594 test "$dlopen_support" != yes ||
2595 test "$build_libtool_libs" = no
; then
2596 # If there is no dlname, no dlopen support or we're linking
2597 # statically, we need to preload. We also need to preload any
2598 # dependent libraries so libltdl's deplib preloader doesn't
2599 # bomb out in the load deplibs phase.
2600 dlprefiles
="$dlprefiles $lib $dependency_libs"
2602 newdlfiles
="$newdlfiles $lib"
2607 # We need an absolute path.
2609 [\\/]* |
[A-Za-z
]:[\\/]*) abs_ladir
="$ladir" ;;
2611 abs_ladir
=`cd "$ladir" && pwd`
2612 if test -z "$abs_ladir"; then
2613 $echo "$modename: warning: cannot determine absolute directory name of \`$ladir'" 1>&2
2614 $echo "$modename: passing it literally to the linker, although it might fail" 1>&2
2619 laname
=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
2621 # Find the relevant object directory and library name.
2622 if test "X$installed" = Xyes
; then
2623 if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then
2624 $echo "$modename: warning: library \`$lib' was moved." 1>&2
2633 if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then
2636 # Remove this search path later
2637 notinst_path
="$notinst_path $abs_ladir"
2639 dir
="$ladir/$objdir"
2640 absdir
="$abs_ladir/$objdir"
2641 # Remove this search path later
2642 notinst_path
="$notinst_path $abs_ladir"
2644 fi # $installed = yes
2645 name
=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
2647 # This library was specified with -dlpreopen.
2648 if test "$pass" = dlpreopen
; then
2649 if test -z "$libdir"; then
2650 $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2
2653 # Prefer using a static library (so that no silly _DYNAMIC symbols
2654 # are required to link).
2655 if test -n "$old_library"; then
2656 newdlprefiles
="$newdlprefiles $dir/$old_library"
2657 # Otherwise, use the dlname, so that lt_dlopen finds it.
2658 elif test -n "$dlname"; then
2659 newdlprefiles
="$newdlprefiles $dir/$dlname"
2661 newdlprefiles
="$newdlprefiles $dir/$linklib"
2663 fi # $pass = dlpreopen
2665 if test -z "$libdir"; then
2666 # Link the convenience library
2667 if test "$linkmode" = lib
; then
2668 deplibs
="$dir/$old_library $deplibs"
2669 elif test "$linkmode,$pass" = "prog,link"; then
2670 compile_deplibs
="$dir/$old_library $compile_deplibs"
2671 finalize_deplibs
="$dir/$old_library $finalize_deplibs"
2673 deplibs
="$lib $deplibs" # used for prog,scan pass
2679 if test "$linkmode" = prog
&& test "$pass" != link
; then
2680 newlib_search_path
="$newlib_search_path $ladir"
2681 deplibs
="$lib $deplibs"
2684 if test "$link_all_deplibs" != no ||
test -z "$library_names" ||
2685 test "$build_libtool_libs" = no
; then
2690 for deplib
in $dependency_libs; do
2692 -L*) newlib_search_path
="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test
2694 # Need to link against all dependency_libs?
2695 if test "$linkalldeplibs" = yes; then
2696 deplibs
="$deplib $deplibs"
2698 # Need to hardcode shared library paths
2699 # or/and link against static libraries
2700 newdependency_libs
="$deplib $newdependency_libs"
2702 if test "X$duplicate_deps" = "Xyes" ; then
2703 case "$tmp_libs " in
2704 *" $deplib "*) specialdeplibs
="$specialdeplibs $deplib" ;;
2707 tmp_libs
="$tmp_libs $deplib"
2710 fi # $linkmode = prog...
2712 if test "$linkmode,$pass" = "prog,link"; then
2713 if test -n "$library_names" &&
2714 { test "$prefer_static_libs" = no ||
test -z "$old_library"; }; then
2715 # We need to hardcode the library path
2716 if test -n "$shlibpath_var"; then
2717 # Make sure the rpath contains only unique directories.
2718 case "$temp_rpath " in
2721 *) temp_rpath
="$temp_rpath $dir" ;;
2725 # Hardcode the library path.
2726 # Skip directories that are in the system default run-time
2728 case " $sys_lib_dlsearch_path " in
2731 case "$compile_rpath " in
2733 *) compile_rpath
="$compile_rpath $absdir"
2737 case " $sys_lib_dlsearch_path " in
2740 case "$finalize_rpath " in
2742 *) finalize_rpath
="$finalize_rpath $libdir"
2746 fi # $linkmode,$pass = prog,link...
2748 if test "$alldeplibs" = yes &&
2749 { test "$deplibs_check_method" = pass_all ||
2750 { test "$build_libtool_libs" = yes &&
2751 test -n "$library_names"; }; }; then
2752 # We only need to search for static libraries
2757 link_static
=no
# Whether the deplib will be linked statically
2758 if test -n "$library_names" &&
2759 { test "$prefer_static_libs" = no ||
test -z "$old_library"; }; then
2760 if test "$installed" = no
; then
2761 notinst_deplibs
="$notinst_deplibs $lib"
2764 # This is a shared library
2766 # Warn about portability, can't link against -module's on
2767 # some systems (darwin)
2768 if test "$shouldnotlink" = yes && test "$pass" = link
; then
2770 if test "$linkmode" = prog
; then
2771 $echo "*** Warning: Linking the executable $output against the loadable module"
2773 $echo "*** Warning: Linking the shared library $output against the loadable module"
2775 $echo "*** $linklib is not portable!"
2777 if test "$linkmode" = lib
&&
2778 test "$hardcode_into_libs" = yes; then
2779 # Hardcode the library path.
2780 # Skip directories that are in the system default run-time
2782 case " $sys_lib_dlsearch_path " in
2785 case "$compile_rpath " in
2787 *) compile_rpath
="$compile_rpath $absdir"
2791 case " $sys_lib_dlsearch_path " in
2794 case "$finalize_rpath " in
2796 *) finalize_rpath
="$finalize_rpath $libdir"
2802 if test -n "$old_archive_from_expsyms_cmds"; then
2803 # figure out the soname
2804 set dummy
$library_names
2807 libname
=`eval \\$echo \"$libname_spec\"`
2808 # use dlname if we got it. it's perfectly good, no?
2809 if test -n "$dlname"; then
2811 elif test -n "$soname_spec"; then
2815 major
=`expr $current - $age`
2819 eval soname
=\"$soname_spec\"
2824 # Make a new name for the extract_expsyms_cmds to use
2826 soname
=`$echo $soroot | ${SED} -e 's/^.*\///'`
2827 newlib
="libimp-`$echo $soname | ${SED} 's/^lib//;s/\.dll$//'`.a"
2829 # If the library has no export list, then create one now
2830 if test -f "$output_objdir/$soname-def"; then :
2832 $show "extracting exported symbol list from \`$soname'"
2833 save_ifs
="$IFS"; IFS
='~'
2834 cmds
=$extract_expsyms_cmds
2835 for cmd
in $cmds; do
2839 $run eval "$cmd" ||
exit $?
2845 if test -f "$output_objdir/$newlib"; then :; else
2846 $show "generating import library for \`$soname'"
2847 save_ifs
="$IFS"; IFS
='~'
2848 cmds
=$old_archive_from_expsyms_cmds
2849 for cmd
in $cmds; do
2853 $run eval "$cmd" ||
exit $?
2857 # make sure the library variables are pointing to the new library
2860 fi # test -n "$old_archive_from_expsyms_cmds"
2862 if test "$linkmode" = prog ||
test "$mode" != relink
; then
2867 case $hardcode_action in
2868 immediate | unsupported
)
2869 if test "$hardcode_direct" = no
; then
2872 *-*-sco3.2v5
* ) add_dir
="-L$dir" ;;
2874 # if the lib is a module then we can not link against
2875 # it, someone is ignoring the new warnings I added
2876 if /usr
/bin
/file -L $add 2> /dev
/null |
$EGREP "bundle" >/dev
/null
; then
2877 $echo "** Warning, lib $linklib is a module, not a shared library"
2878 if test -z "$old_library" ; then
2880 $echo "** And there doesn't seem to be a static archive available"
2881 $echo "** The link will probably fail, sorry"
2883 add
="$dir/$old_library"
2887 elif test "$hardcode_minus_L" = no
; then
2889 *-*-sunos*) add_shlibpath
="$dir" ;;
2893 elif test "$hardcode_shlibpath_var" = no
; then
2894 add_shlibpath
="$dir"
2901 if test "$hardcode_direct" = yes; then
2903 elif test "$hardcode_minus_L" = yes; then
2905 # Try looking first in the location we're being installed to.
2906 if test -n "$inst_prefix_dir"; then
2909 add_dir
="$add_dir -L$inst_prefix_dir$libdir"
2914 elif test "$hardcode_shlibpath_var" = yes; then
2915 add_shlibpath
="$dir"
2924 if test "$lib_linked" != yes; then
2925 $echo "$modename: configuration error: unsupported hardcode properties"
2929 if test -n "$add_shlibpath"; then
2930 case :$compile_shlibpath: in
2931 *":$add_shlibpath:"*) ;;
2932 *) compile_shlibpath
="$compile_shlibpath$add_shlibpath:" ;;
2935 if test "$linkmode" = prog
; then
2936 test -n "$add_dir" && compile_deplibs
="$add_dir $compile_deplibs"
2937 test -n "$add" && compile_deplibs
="$add $compile_deplibs"
2939 test -n "$add_dir" && deplibs
="$add_dir $deplibs"
2940 test -n "$add" && deplibs
="$add $deplibs"
2941 if test "$hardcode_direct" != yes && \
2942 test "$hardcode_minus_L" != yes && \
2943 test "$hardcode_shlibpath_var" = yes; then
2944 case :$finalize_shlibpath: in
2946 *) finalize_shlibpath
="$finalize_shlibpath$libdir:" ;;
2952 if test "$linkmode" = prog ||
test "$mode" = relink
; then
2956 # Finalize command for both is simple: just hardcode it.
2957 if test "$hardcode_direct" = yes; then
2958 add
="$libdir/$linklib"
2959 elif test "$hardcode_minus_L" = yes; then
2962 elif test "$hardcode_shlibpath_var" = yes; then
2963 case :$finalize_shlibpath: in
2965 *) finalize_shlibpath
="$finalize_shlibpath$libdir:" ;;
2968 elif test "$hardcode_automatic" = yes; then
2969 if test -n "$inst_prefix_dir" &&
2970 test -f "$inst_prefix_dir$libdir/$linklib" ; then
2971 add
="$inst_prefix_dir$libdir/$linklib"
2973 add
="$libdir/$linklib"
2976 # We cannot seem to hardcode it, guess we'll fake it.
2978 # Try looking first in the location we're being installed to.
2979 if test -n "$inst_prefix_dir"; then
2982 add_dir
="$add_dir -L$inst_prefix_dir$libdir"
2989 if test "$linkmode" = prog
; then
2990 test -n "$add_dir" && finalize_deplibs
="$add_dir $finalize_deplibs"
2991 test -n "$add" && finalize_deplibs
="$add $finalize_deplibs"
2993 test -n "$add_dir" && deplibs
="$add_dir $deplibs"
2994 test -n "$add" && deplibs
="$add $deplibs"
2997 elif test "$linkmode" = prog
; then
2998 # Here we assume that one of hardcode_direct or hardcode_minus_L
2999 # is not unsupported. This is valid on all known static and
3001 if test "$hardcode_direct" != unsupported
; then
3002 test -n "$old_library" && linklib
="$old_library"
3003 compile_deplibs
="$dir/$linklib $compile_deplibs"
3004 finalize_deplibs
="$dir/$linklib $finalize_deplibs"
3006 compile_deplibs
="-l$name -L$dir $compile_deplibs"
3007 finalize_deplibs
="-l$name -L$dir $finalize_deplibs"
3009 elif test "$build_libtool_libs" = yes; then
3010 # Not a shared library
3011 if test "$deplibs_check_method" != pass_all
; then
3012 # We're trying link a shared library against a static one
3013 # but the system doesn't support it.
3015 # Just print a warning and add the library to dependency_libs so
3016 # that the program can be linked against the static library.
3018 $echo "*** Warning: This system can not link to static lib archive $lib."
3019 $echo "*** I have the capability to make that library automatically link in when"
3020 $echo "*** you link to this library. But I can only do this if you have a"
3021 $echo "*** shared version of the library, which you do not appear to have."
3022 if test "$module" = yes; then
3023 $echo "*** But as you try to build a module library, libtool will still create "
3024 $echo "*** a static module, that should work as long as the dlopening application"
3025 $echo "*** is linked with the -dlopen flag to resolve symbols at runtime."
3026 if test -z "$global_symbol_pipe"; then
3028 $echo "*** However, this would only work if libtool was able to extract symbol"
3029 $echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
3030 $echo "*** not find such a program. So, this module is probably useless."
3031 $echo "*** \`nm' from GNU binutils and a full rebuild may help."
3033 if test "$build_old_libs" = no
; then
3034 build_libtool_libs
=module
3037 build_libtool_libs
=no
3041 convenience
="$convenience $dir/$old_library"
3042 old_convenience
="$old_convenience $dir/$old_library"
3043 deplibs
="$dir/$old_library $deplibs"
3046 fi # link shared/static library?
3048 if test "$linkmode" = lib
; then
3049 if test -n "$dependency_libs" &&
3050 { test "$hardcode_into_libs" != yes ||
3051 test "$build_old_libs" = yes ||
3052 test "$link_static" = yes; }; then
3053 # Extract -R from dependency_libs
3055 for libdir
in $dependency_libs; do
3057 -R*) temp_xrpath
=`$echo "X$libdir" | $Xsed -e 's/^-R//'`
3059 *" $temp_xrpath "*) ;;
3060 *) xrpath
="$xrpath $temp_xrpath";;
3062 *) temp_deplibs
="$temp_deplibs $libdir";;
3065 dependency_libs
="$temp_deplibs"
3068 newlib_search_path
="$newlib_search_path $absdir"
3069 # Link against this library
3070 test "$link_static" = no
&& newdependency_libs
="$abs_ladir/$laname $newdependency_libs"
3071 # ... and its dependency_libs
3073 for deplib
in $dependency_libs; do
3074 newdependency_libs
="$deplib $newdependency_libs"
3075 if test "X$duplicate_deps" = "Xyes" ; then
3076 case "$tmp_libs " in
3077 *" $deplib "*) specialdeplibs
="$specialdeplibs $deplib" ;;
3080 tmp_libs
="$tmp_libs $deplib"
3083 if test "$link_all_deplibs" != no
; then
3084 # Add the search paths of all dependency libraries
3085 for deplib
in $dependency_libs; do
3087 -L*) path
="$deplib" ;;
3089 dir
=`$echo "X$deplib" | $Xsed -e 's%/[^/]*$%%'`
3090 test "X$dir" = "X$deplib" && dir
="."
3091 # We need an absolute path.
3093 [\\/]* |
[A-Za-z
]:[\\/]*) absdir
="$dir" ;;
3095 absdir
=`cd "$dir" && pwd`
3096 if test -z "$absdir"; then
3097 $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2
3102 if grep "^installed=no" $deplib > /dev
/null
; then
3103 path
="$absdir/$objdir"
3105 eval libdir
=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
3106 if test -z "$libdir"; then
3107 $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
3110 if test "$absdir" != "$libdir"; then
3111 $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2
3118 # we do not want to link against static libs,
3119 # but need to link against shared
3120 eval deplibrary_names
=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib`
3121 if test -n "$deplibrary_names" ; then
3122 for tmp
in $deplibrary_names ; do
3125 if test -f "$path/$depdepl" ; then
3126 depdepl
="$path/$depdepl"
3128 # do not add paths which are already there
3129 case " $newlib_search_path " in
3131 *) newlib_search_path
="$newlib_search_path $path";;
3144 # Again, we only want to link against shared libraries
3145 eval tmp_libs
=`$echo "X$deplib" | $Xsed -e "s,^\-l,,"`
3146 for tmp
in $newlib_search_path ; do
3147 if test -f "$tmp/lib$tmp_libs.dylib" ; then
3148 eval depdepl
="$tmp/lib$tmp_libs.dylib"
3159 case " $deplibs " in
3161 *) deplibs
="$depdepl $deplibs" ;;
3163 case " $deplibs " in
3165 *) deplibs
="$deplibs $path" ;;
3168 fi # link_all_deplibs != no
3170 done # for deplib in $libs
3171 dependency_libs
="$newdependency_libs"
3172 if test "$pass" = dlpreopen
; then
3173 # Link the dlpreopened libraries before other libraries
3174 for deplib
in $save_deplibs; do
3175 deplibs
="$deplib $deplibs"
3178 if test "$pass" != dlopen
; then
3179 if test "$pass" != conv
; then
3180 # Make sure lib_search_path contains only unique directories.
3182 for dir
in $newlib_search_path; do
3183 case "$lib_search_path " in
3185 *) lib_search_path
="$lib_search_path $dir" ;;
3191 if test "$linkmode,$pass" != "prog,link"; then
3194 vars
="compile_deplibs finalize_deplibs"
3196 for var
in $vars dependency_libs
; do
3197 # Add libraries to $var in reverse order
3198 eval tmp_libs
=\"\$
$var\"
3200 for deplib
in $tmp_libs; do
3201 # FIXME: Pedantically, this is the right thing to do, so
3202 # that some nasty dependency loop isn't accidentally
3204 #new_libs="$deplib $new_libs"
3205 # Pragmatically, this seems to cause very few problems in
3208 -L*) new_libs
="$deplib $new_libs" ;;
3211 # And here is the reason: when a library appears more
3212 # than once as an explicit dependence of a library, or
3213 # is implicitly linked in more than once by the
3214 # compiler, it is considered special, and multiple
3215 # occurrences thereof are not removed. Compare this
3216 # with having the same library being listed as a
3217 # dependency of multiple other libraries: in this case,
3218 # we know (pedantically, we assume) the library does not
3219 # need to be listed more than once, so we keep only the
3220 # last copy. This is not always right, but it is rare
3221 # enough that we require users that really mean to play
3222 # such unportable linking tricks to link the library
3223 # using -Wl,-lname, so that libtool does not consider it
3224 # for duplicate removal.
3225 case " $specialdeplibs " in
3226 *" $deplib "*) new_libs
="$deplib $new_libs" ;;
3228 case " $new_libs " in
3230 *) new_libs
="$deplib $new_libs" ;;
3238 for deplib
in $new_libs; do
3241 case " $tmp_libs " in
3243 *) tmp_libs
="$tmp_libs $deplib" ;;
3246 *) tmp_libs
="$tmp_libs $deplib" ;;
3249 eval $var=\"$tmp_libs\"
3252 # Last step: remove runtime libs from dependency_libs
3253 # (they stay in deplibs)
3255 for i
in $dependency_libs ; do
3256 case " $predeps $postdeps $compiler_lib_search_path " in
3261 if test -n "$i" ; then
3262 tmp_libs
="$tmp_libs $i"
3265 dependency_libs
=$tmp_libs
3267 if test "$linkmode" = prog
; then
3268 dlfiles
="$newdlfiles"
3269 dlprefiles
="$newdlprefiles"
3274 if test -n "$deplibs"; then
3275 $echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2
3278 if test -n "$dlfiles$dlprefiles" ||
test "$dlself" != no
; then
3279 $echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2
3282 if test -n "$rpath"; then
3283 $echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2
3286 if test -n "$xrpath"; then
3287 $echo "$modename: warning: \`-R' is ignored for archives" 1>&2
3290 if test -n "$vinfo"; then
3291 $echo "$modename: warning: \`-version-info/-version-number' is ignored for archives" 1>&2
3294 if test -n "$release"; then
3295 $echo "$modename: warning: \`-release' is ignored for archives" 1>&2
3298 if test -n "$export_symbols" ||
test -n "$export_symbols_regex"; then
3299 $echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2
3302 # Now set the variables for building old libraries.
3303 build_libtool_libs
=no
3305 objs
="$objs$old_deplibs"
3309 # Make sure we only generate libraries of the form `libNAME.la'.
3312 name
=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
3313 eval shared_ext
=\"$shrext_cmds\"
3314 eval libname
=\"$libname_spec\"
3317 if test "$module" = no
; then
3318 $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2
3322 if test "$need_lib_prefix" != no
; then
3323 # Add the "lib" prefix for modules if required
3324 name
=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
3325 eval shared_ext
=\"$shrext_cmds\"
3326 eval libname
=\"$libname_spec\"
3328 libname
=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
3333 if test -n "$objs"; then
3334 if test "$deplibs_check_method" != pass_all
; then
3335 $echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1
3339 $echo "*** Warning: Linking the shared library $output against the non-libtool"
3340 $echo "*** objects $objs is not portable!"
3341 libobjs
="$libobjs $objs"
3345 if test "$dlself" != no
; then
3346 $echo "$modename: warning: \`-dlopen self' is ignored for libtool libraries" 1>&2
3350 if test "$#" -gt 2; then
3351 $echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2
3356 if test -z "$rpath"; then
3357 if test "$build_libtool_libs" = yes; then
3358 # Building a libtool convenience library.
3359 # Some compilers have problems with a `.al' extension so
3360 # convenience libraries should have the same extension an
3361 # archive normally would.
3362 oldlibs
="$output_objdir/$libname.$libext $oldlibs"
3363 build_libtool_libs
=convenience
3367 if test -n "$vinfo"; then
3368 $echo "$modename: warning: \`-version-info/-version-number' is ignored for convenience libraries" 1>&2
3371 if test -n "$release"; then
3372 $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2
3376 # Parse the version information argument.
3377 save_ifs
="$IFS"; IFS
=':'
3378 set dummy
$vinfo 0 0 0
3381 if test -n "$8"; then
3382 $echo "$modename: too many parameters to \`-version-info'" 1>&2
3387 # convert absolute version numbers to libtool ages
3388 # this retains compatibility with .la files and attempts
3389 # to make the code below a bit more comprehensible
3391 case $vinfo_number in
3395 number_revision
="$4"
3397 # There are really only two kinds -- those that
3398 # use the current revision as the major version
3399 # and those that subtract age and use age as
3400 # a minor version. But, then there is irix
3401 # which has an extra 1 added just for fun
3403 case $version_type in
3404 darwin|linux|osf|windows
)
3405 current
=`expr $number_major + $number_minor`
3407 revision
="$number_revision"
3409 freebsd-aout|freebsd-elf|sunos
)
3410 current
="$number_major"
3411 revision
="$number_minor"
3415 current
=`expr $number_major + $number_minor - 1`
3417 revision
="$number_minor"
3428 # Check that each of the things are valid numbers.
3430 0 |
[1-9] |
[1-9][0-9] |
[1-9][0-9][0-9]) ;;
3432 $echo "$modename: CURRENT \`$current' is not a nonnegative integer" 1>&2
3433 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
3439 0 |
[1-9] |
[1-9][0-9] |
[1-9][0-9][0-9]) ;;
3441 $echo "$modename: REVISION \`$revision' is not a nonnegative integer" 1>&2
3442 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
3448 0 |
[1-9] |
[1-9][0-9] |
[1-9][0-9][0-9]) ;;
3450 $echo "$modename: AGE \`$age' is not a nonnegative integer" 1>&2
3451 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
3456 if test "$age" -gt "$current"; then
3457 $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2
3458 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
3462 # Calculate the version variables.
3466 case $version_type in
3470 # Like Linux, but with the current version available in
3471 # verstring for coding it into the library header
3472 major
=.
`expr $current - $age`
3473 versuffix
="$major.$age.$revision"
3474 # Darwin ld doesn't like 0 for these options...
3475 minor_current
=`expr $current + 1`
3476 verstring
="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision"
3481 versuffix
=".$current.$revision";
3486 versuffix
=".$current";
3490 major
=`expr $current - $age + 1`
3492 case $version_type in
3493 nonstopux
) verstring_prefix
=nonstopux
;;
3494 *) verstring_prefix
=sgi
;;
3496 verstring
="$verstring_prefix$major.$revision"
3498 # Add in all the interfaces that we are compatible with.
3500 while test "$loop" -ne 0; do
3501 iface
=`expr $revision - $loop`
3502 loop
=`expr $loop - 1`
3503 verstring
="$verstring_prefix$major.$iface:$verstring"
3506 # Before this point, $major must not contain `.'.
3508 versuffix
="$major.$revision"
3512 major
=.
`expr $current - $age`
3513 versuffix
="$major.$age.$revision"
3517 major
=.
`expr $current - $age`
3518 versuffix
=".$current.$age.$revision"
3519 verstring
="$current.$age.$revision"
3521 # Add in all the interfaces that we are compatible with.
3523 while test "$loop" -ne 0; do
3524 iface
=`expr $current - $loop`
3525 loop
=`expr $loop - 1`
3526 verstring
="$verstring:${iface}.0"
3529 # Make executables depend on our current version.
3530 verstring
="$verstring:${current}.0"
3535 versuffix
=".$current.$revision"
3539 # Use '-' rather than '.', since we only want one
3540 # extension on DOS 8.3 filesystems.
3541 major
=`expr $current - $age`
3546 $echo "$modename: unknown library version type \`$version_type'" 1>&2
3547 $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
3552 # Clear the version info if we defaulted, and they specified a release.
3553 if test -z "$vinfo" && test -n "$release"; then
3555 case $version_type in
3557 # we can't check for "0.0" in archive_cmds due to quoting
3558 # problems, so we reset it completely
3565 if test "$need_version" = no
; then
3572 # Remove version info from name if versioning should be avoided
3573 if test "$avoid_version" = yes && test "$need_version" = no
; then
3579 # Check to see if the archive will have undefined symbols.
3580 if test "$allow_undefined" = yes; then
3581 if test "$allow_undefined_flag" = unsupported
; then
3582 $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2
3583 build_libtool_libs
=no
3587 # Don't allow undefined symbols.
3588 allow_undefined_flag
="$no_undefined_flag"
3592 if test "$mode" != relink
; then
3593 # Remove our outputs, but don't remove object files since they
3594 # may have been created when compiling PIC objects.
3596 tempremovelist
=`$echo "$output_objdir/*"`
3597 for p
in $tempremovelist; do
3601 $output_objdir/$outputname |
$output_objdir/$libname.
* |
$output_objdir/${libname}${release}.
*)
3602 if test "X$precious_files_regex" != "X"; then
3603 if echo $p |
$EGREP -e "$precious_files_regex" >/dev
/null
2>&1
3608 removelist
="$removelist $p"
3613 if test -n "$removelist"; then
3614 $show "${rm}r $removelist"
3615 $run ${rm}r
$removelist
3619 # Now set the variables for building old libraries.
3620 if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience
; then
3621 oldlibs
="$oldlibs $output_objdir/$libname.$libext"
3623 # Transform .lo files to .o files.
3624 oldobjs
="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP`
3627 # Eliminate all temporary directories.
3628 for path
in $notinst_path; do
3629 lib_search_path
=`$echo "$lib_search_path " | ${SED} -e 's% $path % %g'`
3630 deplibs
=`$echo "$deplibs " | ${SED} -e 's% -L$path % %g'`
3631 dependency_libs
=`$echo "$dependency_libs " | ${SED} -e 's% -L$path % %g'`
3634 if test -n "$xrpath"; then
3635 # If the user specified any rpath flags, then add them.
3637 for libdir
in $xrpath; do
3638 temp_xrpath
="$temp_xrpath -R$libdir"
3639 case "$finalize_rpath " in
3641 *) finalize_rpath
="$finalize_rpath $libdir" ;;
3644 if test "$hardcode_into_libs" != yes ||
test "$build_old_libs" = yes; then
3645 dependency_libs
="$temp_xrpath $dependency_libs"
3649 # Make sure dlfiles contains only unique files that won't be dlpreopened
3650 old_dlfiles
="$dlfiles"
3652 for lib
in $old_dlfiles; do
3653 case " $dlprefiles $dlfiles " in
3655 *) dlfiles
="$dlfiles $lib" ;;
3659 # Make sure dlprefiles contains only unique files
3660 old_dlprefiles
="$dlprefiles"
3662 for lib
in $old_dlprefiles; do
3663 case "$dlprefiles " in
3665 *) dlprefiles
="$dlprefiles $lib" ;;
3669 if test "$build_libtool_libs" = yes; then
3670 if test -n "$rpath"; then
3672 *-*-cygwin* |
*-*-mingw* |
*-*-pw32* |
*-*-os2* |
*-*-beos*)
3673 # these systems don't actually have a c library (as such)!
3675 *-*-rhapsody* |
*-*-darwin1.
[012])
3676 # Rhapsody C library is in the System framework
3677 deplibs
="$deplibs -framework System"
3680 # Don't link with libc until the a.out ld.so is fixed.
3682 *-*-openbsd* |
*-*-freebsd*)
3683 # Do not include libc due to us having libc/libc_r.
3684 test "X$arg" = "X-lc" && continue
3687 # Add libc to deplibs on all other systems if necessary.
3688 if test "$build_libtool_need_lc" = "yes"; then
3689 deplibs
="$deplibs -lc"
3695 # Transform deplibs into only deplibs that can be linked in shared.
3697 libname_save
=$libname
3698 release_save
=$release
3699 versuffix_save
=$versuffix
3701 # I'm not sure if I'm treating the release correctly. I think
3702 # release should show up in the -l (ie -lgmp5) so we don't want to
3703 # add it in twice. Is that correct?
3709 case $deplibs_check_method in
3711 # Don't check for shared/static. Everything works.
3712 # This might be a little naive. We might want to check
3713 # whether the library exists or not. But this is on
3714 # osf3 & osf4 and I'm not really sure... Just
3715 # implementing what was already the behavior.
3719 # This code stresses the "libraries are programs" paradigm to its
3720 # limits. Maybe even breaks it. We compile a program, linking it
3721 # against the deplibs as a proxy for the library. Then we can check
3722 # whether they linked in statically or dynamically with ldd.
3724 cat > conftest.c
<<EOF
3725 int main() { return 0; }
3728 $LTCC -o conftest conftest.c
$deplibs
3729 if test "$?" -eq 0 ; then
3730 ldd_output
=`ldd conftest`
3731 for i
in $deplibs; do
3732 name
="`expr $i : '-l\(.*\)'`"
3733 # If $name is empty we are operating on a -L argument.
3734 if test "$name" != "" && test "$name" -ne "0"; then
3735 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
3736 case " $predeps $postdeps " in
3738 newdeplibs
="$newdeplibs $i"
3743 if test -n "$i" ; then
3744 libname
=`eval \\$echo \"$libname_spec\"`
3745 deplib_matches
=`eval \\$echo \"$library_names_spec\"`
3746 set dummy
$deplib_matches
3748 if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
3749 newdeplibs
="$newdeplibs $i"
3753 $echo "*** Warning: dynamic linker does not accept needed library $i."
3754 $echo "*** I have the capability to make that library automatically link in when"
3755 $echo "*** you link to this library. But I can only do this if you have a"
3756 $echo "*** shared version of the library, which I believe you do not have"
3757 $echo "*** because a test_compile did reveal that the linker did not use it for"
3758 $echo "*** its dynamic dependency list that programs get resolved with at runtime."
3762 newdeplibs
="$newdeplibs $i"
3766 # Error occurred in the first compile. Let's try to salvage
3767 # the situation: Compile a separate program for each library.
3768 for i
in $deplibs; do
3769 name
="`expr $i : '-l\(.*\)'`"
3770 # If $name is empty we are operating on a -L argument.
3771 if test "$name" != "" && test "$name" != "0"; then
3773 $LTCC -o conftest conftest.c
$i
3775 if test "$?" -eq 0 ; then
3776 ldd_output
=`ldd conftest`
3777 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
3778 case " $predeps $postdeps " in
3780 newdeplibs
="$newdeplibs $i"
3785 if test -n "$i" ; then
3786 libname
=`eval \\$echo \"$libname_spec\"`
3787 deplib_matches
=`eval \\$echo \"$library_names_spec\"`
3788 set dummy
$deplib_matches
3790 if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
3791 newdeplibs
="$newdeplibs $i"
3795 $echo "*** Warning: dynamic linker does not accept needed library $i."
3796 $echo "*** I have the capability to make that library automatically link in when"
3797 $echo "*** you link to this library. But I can only do this if you have a"
3798 $echo "*** shared version of the library, which you do not appear to have"
3799 $echo "*** because a test_compile did reveal that the linker did not use this one"
3800 $echo "*** as a dynamic dependency that programs can get resolved with at runtime."
3806 $echo "*** Warning! Library $i is needed by this library but I was not able to"
3807 $echo "*** make it link in! You will probably need to install it or some"
3808 $echo "*** library that it depends on before this library will be fully"
3809 $echo "*** functional. Installing it before continuing would be even better."
3812 newdeplibs
="$newdeplibs $i"
3818 set dummy
$deplibs_check_method
3819 file_magic_regex
=`expr "$deplibs_check_method" : "$2 \(.*\)"`
3820 for a_deplib
in $deplibs; do
3821 name
="`expr $a_deplib : '-l\(.*\)'`"
3822 # If $name is empty we are operating on a -L argument.
3823 if test "$name" != "" && test "$name" != "0"; then
3824 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
3825 case " $predeps $postdeps " in
3827 newdeplibs
="$newdeplibs $a_deplib"
3832 if test -n "$a_deplib" ; then
3833 libname
=`eval \\$echo \"$libname_spec\"`
3834 for i
in $lib_search_path $sys_lib_search_path $shlib_search_path; do
3835 potential_libs
=`ls $i/$libname[.-]* 2>/dev/null`
3836 for potent_lib
in $potential_libs; do
3837 # Follow soft links.
3838 if ls -lLd "$potent_lib" 2>/dev
/null \
3839 |
grep " -> " >/dev
/null
; then
3842 # The statement above tries to avoid entering an
3843 # endless loop below, in case of cyclic links.
3844 # We might still enter an endless loop, since a link
3845 # loop can be closed while we follow links,
3847 potlib
="$potent_lib"
3848 while test -h "$potlib" 2>/dev
/null
; do
3849 potliblink
=`ls -ld $potlib | ${SED} 's/.* -> //'`
3851 [\\/]* |
[A-Za-z
]:[\\/]*) potlib
="$potliblink";;
3852 *) potlib
=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";;
3855 if eval $file_magic_cmd \"\
$potlib\" 2>/dev
/null \
3857 |
$EGREP "$file_magic_regex" > /dev
/null
; then
3858 newdeplibs
="$newdeplibs $a_deplib"
3865 if test -n "$a_deplib" ; then
3868 $echo "*** Warning: linker path does not have real file for library $a_deplib."
3869 $echo "*** I have the capability to make that library automatically link in when"
3870 $echo "*** you link to this library. But I can only do this if you have a"
3871 $echo "*** shared version of the library, which you do not appear to have"
3872 $echo "*** because I did check the linker path looking for a file starting"
3873 if test -z "$potlib" ; then
3874 $echo "*** with $libname but no candidates were found. (...for file magic test)"
3876 $echo "*** with $libname and none of the candidates passed a file format test"
3877 $echo "*** using a file magic. Last file checked: $potlib"
3881 # Add a -L argument.
3882 newdeplibs
="$newdeplibs $a_deplib"
3884 done # Gone through all deplibs.
3887 set dummy
$deplibs_check_method
3888 match_pattern_regex
=`expr "$deplibs_check_method" : "$2 \(.*\)"`
3889 for a_deplib
in $deplibs; do
3890 name
="`expr $a_deplib : '-l\(.*\)'`"
3891 # If $name is empty we are operating on a -L argument.
3892 if test -n "$name" && test "$name" != "0"; then
3893 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
3894 case " $predeps $postdeps " in
3896 newdeplibs
="$newdeplibs $a_deplib"
3901 if test -n "$a_deplib" ; then
3902 libname
=`eval \\$echo \"$libname_spec\"`
3903 for i
in $lib_search_path $sys_lib_search_path $shlib_search_path; do
3904 potential_libs
=`ls $i/$libname[.-]* 2>/dev/null`
3905 for potent_lib
in $potential_libs; do
3906 potlib
="$potent_lib" # see symlink-check above in file_magic test
3907 if eval $echo \"$potent_lib\" 2>/dev
/null \
3909 |
$EGREP "$match_pattern_regex" > /dev
/null
; then
3910 newdeplibs
="$newdeplibs $a_deplib"
3917 if test -n "$a_deplib" ; then
3920 $echo "*** Warning: linker path does not have real file for library $a_deplib."
3921 $echo "*** I have the capability to make that library automatically link in when"
3922 $echo "*** you link to this library. But I can only do this if you have a"
3923 $echo "*** shared version of the library, which you do not appear to have"
3924 $echo "*** because I did check the linker path looking for a file starting"
3925 if test -z "$potlib" ; then
3926 $echo "*** with $libname but no candidates were found. (...for regex pattern test)"
3928 $echo "*** with $libname and none of the candidates passed a file format test"
3929 $echo "*** using a regex pattern. Last file checked: $potlib"
3933 # Add a -L argument.
3934 newdeplibs
="$newdeplibs $a_deplib"
3936 done # Gone through all deplibs.
3940 tmp_deplibs
=`$echo "X $deplibs" | $Xsed -e 's/ -lc$//' \
3941 -e 's/ -[LR][^ ]*//g'`
3942 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
3943 for i
in $predeps $postdeps ; do
3944 # can't use Xsed below, because $i might contain '/'
3945 tmp_deplibs
=`$echo "X $tmp_deplibs" | ${SED} -e "1s,^X,," -e "s,$i,,"`
3948 if $echo "X $tmp_deplibs" |
$Xsed -e 's/[ ]//g' \
3949 |
grep .
>/dev
/null
; then
3951 if test "X$deplibs_check_method" = "Xnone"; then
3952 $echo "*** Warning: inter-library dependencies are not supported in this platform."
3954 $echo "*** Warning: inter-library dependencies are not known to be supported."
3956 $echo "*** All declared inter-library dependencies are being dropped."
3961 versuffix
=$versuffix_save
3963 release
=$release_save
3964 libname
=$libname_save
3968 *-*-rhapsody* |
*-*-darwin1.
[012])
3969 # On Rhapsody replace the C library is the System framework
3970 newdeplibs
=`$echo "X $newdeplibs" | $Xsed -e 's/ -lc / -framework System /'`
3974 if test "$droppeddeps" = yes; then
3975 if test "$module" = yes; then
3977 $echo "*** Warning: libtool could not satisfy all declared inter-library"
3978 $echo "*** dependencies of module $libname. Therefore, libtool will create"
3979 $echo "*** a static module, that should work as long as the dlopening"
3980 $echo "*** application is linked with the -dlopen flag."
3981 if test -z "$global_symbol_pipe"; then
3983 $echo "*** However, this would only work if libtool was able to extract symbol"
3984 $echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
3985 $echo "*** not find such a program. So, this module is probably useless."
3986 $echo "*** \`nm' from GNU binutils and a full rebuild may help."
3988 if test "$build_old_libs" = no
; then
3989 oldlibs
="$output_objdir/$libname.$libext"
3990 build_libtool_libs
=module
3993 build_libtool_libs
=no
3996 $echo "*** The inter-library dependencies that have been dropped here will be"
3997 $echo "*** automatically added whenever a program is linked with this library"
3998 $echo "*** or is declared to -dlopen it."
4000 if test "$allow_undefined" = no
; then
4002 $echo "*** Since this library must not contain undefined symbols,"
4003 $echo "*** because either the platform does not support them or"
4004 $echo "*** it was explicitly requested with -no-undefined,"
4005 $echo "*** libtool will only create a static version of it."
4006 if test "$build_old_libs" = no
; then
4007 oldlibs
="$output_objdir/$libname.$libext"
4008 build_libtool_libs
=module
4011 build_libtool_libs
=no
4016 # Done checking deplibs!
4020 # All the library-specific variables (install_libdir is set above).
4025 # Test again, we may have decided not to build it any more
4026 if test "$build_libtool_libs" = yes; then
4027 if test "$hardcode_into_libs" = yes; then
4028 # Hardcode the library paths
4031 rpath
="$finalize_rpath"
4032 test "$mode" != relink
&& rpath
="$compile_rpath$rpath"
4033 for libdir
in $rpath; do
4034 if test -n "$hardcode_libdir_flag_spec"; then
4035 if test -n "$hardcode_libdir_separator"; then
4036 if test -z "$hardcode_libdirs"; then
4037 hardcode_libdirs
="$libdir"
4039 # Just accumulate the unique libdirs.
4040 case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
4041 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
4044 hardcode_libdirs
="$hardcode_libdirs$hardcode_libdir_separator$libdir"
4049 eval flag
=\"$hardcode_libdir_flag_spec\"
4050 dep_rpath
="$dep_rpath $flag"
4052 elif test -n "$runpath_var"; then
4053 case "$perm_rpath " in
4055 *) perm_rpath
="$perm_rpath $libdir" ;;
4059 # Substitute the hardcoded libdirs into the rpath.
4060 if test -n "$hardcode_libdir_separator" &&
4061 test -n "$hardcode_libdirs"; then
4062 libdir
="$hardcode_libdirs"
4063 if test -n "$hardcode_libdir_flag_spec_ld"; then
4064 eval dep_rpath
=\"$hardcode_libdir_flag_spec_ld\"
4066 eval dep_rpath
=\"$hardcode_libdir_flag_spec\"
4069 if test -n "$runpath_var" && test -n "$perm_rpath"; then
4070 # We should set the runpath_var.
4072 for dir
in $perm_rpath; do
4075 eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var"
4077 test -n "$dep_rpath" && deplibs
="$dep_rpath $deplibs"
4080 shlibpath
="$finalize_shlibpath"
4081 test "$mode" != relink
&& shlibpath
="$compile_shlibpath$shlibpath"
4082 if test -n "$shlibpath"; then
4083 eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var"
4086 # Get the real and link names of the library.
4087 eval shared_ext
=\"$shrext_cmds\"
4088 eval library_names
=\"$library_names_spec\"
4089 set dummy
$library_names
4093 if test -n "$soname_spec"; then
4094 eval soname
=\"$soname_spec\"
4098 if test -z "$dlname"; then
4102 lib
="$output_objdir/$realname"
4105 linknames
="$linknames $link"
4108 # Use standard objects if they are pic
4109 test -z "$pic_flag" && libobjs
=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
4111 # Prepare the list of exported symbols
4112 if test -z "$export_symbols"; then
4113 if test "$always_export_symbols" = yes ||
test -n "$export_symbols_regex"; then
4114 $show "generating symbol list for \`$libname.la'"
4115 export_symbols
="$output_objdir/$libname.exp"
4116 $run $rm $export_symbols
4117 cmds
=$export_symbols_cmds
4118 save_ifs
="$IFS"; IFS
='~'
4119 for cmd
in $cmds; do
4122 if len
=`expr "X$cmd" : ".*"` &&
4123 test "$len" -le "$max_cmd_len" ||
test "$max_cmd_len" -le -1; then
4125 $run eval "$cmd" ||
exit $?
4126 skipped_export
=false
4128 # The command line is too long to execute in one step.
4129 $show "using reloadable object file for export list..."
4134 if test -n "$export_symbols_regex"; then
4135 $show "$EGREP -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\""
4136 $run eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
4137 $show "$mv \"${export_symbols}T\" \"$export_symbols\""
4138 $run eval '$mv "${export_symbols}T" "$export_symbols"'
4143 if test -n "$export_symbols" && test -n "$include_expsyms"; then
4144 $run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"'
4148 for test_deplib
in $deplibs; do
4149 case " $convenience " in
4150 *" $test_deplib "*) ;;
4152 tmp_deplibs
="$tmp_deplibs $test_deplib"
4156 deplibs
="$tmp_deplibs"
4158 if test -n "$convenience"; then
4159 if test -n "$whole_archive_flag_spec"; then
4160 save_libobjs
=$libobjs
4161 eval libobjs
=\"\
$libobjs $whole_archive_flag_spec\"
4163 gentop
="$output_objdir/${outputname}x"
4164 generated
="$generated $gentop"
4166 func_extract_archives
$gentop $convenience
4167 libobjs
="$libobjs $func_extract_archives_result"
4171 if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
4172 eval flag
=\"$thread_safe_flag_spec\"
4173 linker_flags
="$linker_flags $flag"
4176 # Make a backup of the uninstalled library when relinking
4177 if test "$mode" = relink
; then
4178 $run eval '(cd $output_objdir && $rm ${realname}U && $mv $realname ${realname}U)' ||
exit $?
4181 # Do each of the archive commands.
4182 if test "$module" = yes && test -n "$module_cmds" ; then
4183 if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
4184 eval test_cmds
=\"$module_expsym_cmds\"
4185 cmds
=$module_expsym_cmds
4187 eval test_cmds
=\"$module_cmds\"
4191 if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
4192 eval test_cmds
=\"$archive_expsym_cmds\"
4193 cmds
=$archive_expsym_cmds
4195 eval test_cmds
=\"$archive_cmds\"
4200 if test "X$skipped_export" != "X:" && len
=`expr "X$test_cmds" : ".*"` &&
4201 test "$len" -le "$max_cmd_len" ||
test "$max_cmd_len" -le -1; then
4204 # The command line is too long to link in one step, link piecewise.
4205 $echo "creating reloadable object files..."
4207 # Save the value of $output and $libobjs because we want to
4208 # use them later. If we have whole_archive_flag_spec, we
4209 # want to use save_libobjs as it was before
4210 # whole_archive_flag_spec was expanded, because we can't
4211 # assume the linker understands whole_archive_flag_spec.
4212 # This may have to be revisited, in case too many
4213 # convenience libraries get linked in and end up exceeding
4215 if test -z "$convenience" ||
test -z "$whole_archive_flag_spec"; then
4216 save_libobjs
=$libobjs
4220 # Clear the reloadable object creation command queue and
4221 # initialize k to one.
4228 output
=$output_objdir/$save_output-${k}.
$objext
4229 # Loop over the list of objects to be linked.
4230 for obj
in $save_libobjs
4232 eval test_cmds
=\"$reload_cmds $objlist $last_robj\"
4233 if test "X$objlist" = X ||
4234 { len
=`expr "X$test_cmds" : ".*"` &&
4235 test "$len" -le "$max_cmd_len"; }; then
4236 objlist
="$objlist $obj"
4238 # The command $test_cmds is almost too long, add a
4239 # command to the queue.
4240 if test "$k" -eq 1 ; then
4241 # The first file doesn't have a previous command to add.
4242 eval concat_cmds
=\"$reload_cmds $objlist $last_robj\"
4244 # All subsequent reloadable object files will link in
4245 # the last one created.
4246 eval concat_cmds
=\"\
$concat_cmds~
$reload_cmds $objlist $last_robj\"
4248 last_robj
=$output_objdir/$save_output-${k}.
$objext
4250 output
=$output_objdir/$save_output-${k}.
$objext
4255 # Handle the remaining objects by creating one last
4256 # reloadable object file. All subsequent reloadable object
4257 # files will link in the last one created.
4258 test -z "$concat_cmds" || concat_cmds
=$concat_cmds~
4259 eval concat_cmds
=\"\
${concat_cmds}$reload_cmds $objlist $last_robj\"
4261 if ${skipped_export-false}; then
4262 $show "generating symbol list for \`$libname.la'"
4263 export_symbols
="$output_objdir/$libname.exp"
4264 $run $rm $export_symbols
4266 # Append the command to create the export file.
4267 eval concat_cmds
=\"\
$concat_cmds~
$export_symbols_cmds\"
4270 # Set up a command to remove the reloadale object files
4271 # after they are used.
4273 while test "$i" -lt "$k"
4276 delfiles
="$delfiles $output_objdir/$save_output-${i}.$objext"
4279 $echo "creating a temporary reloadable object file: $output"
4281 # Loop through the commands generated above and execute them.
4282 save_ifs
="$IFS"; IFS
='~'
4283 for cmd
in $concat_cmds; do
4286 $run eval "$cmd" ||
exit $?
4291 # Restore the value of output.
4294 if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then
4295 eval libobjs
=\"\
$libobjs $whole_archive_flag_spec\"
4297 # Expand the library linking commands again to reset the
4298 # value of $libobjs for piecewise linking.
4300 # Do each of the archive commands.
4301 if test "$module" = yes && test -n "$module_cmds" ; then
4302 if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
4303 cmds
=$module_expsym_cmds
4308 if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
4309 cmds
=$archive_expsym_cmds
4315 # Append the command to remove the reloadable object files
4316 # to the just-reset $cmds.
4317 eval cmds
=\"\
$cmds~\
$rm $delfiles\"
4319 save_ifs
="$IFS"; IFS
='~'
4320 for cmd
in $cmds; do
4324 $run eval "$cmd" ||
exit $?
4328 # Restore the uninstalled library and exit
4329 if test "$mode" = relink
; then
4330 $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' ||
exit $?
4334 # Create links to the real library.
4335 for linkname
in $linknames; do
4336 if test "$realname" != "$linkname"; then
4337 $show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)"
4338 $run eval '(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)' ||
exit $?
4342 # If -module or -export-dynamic was specified, set the dlname.
4343 if test "$module" = yes ||
test "$export_dynamic" = yes; then
4344 # On all known operating systems, these are identical.
4351 if test -n "$deplibs"; then
4352 $echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2
4355 if test -n "$dlfiles$dlprefiles" ||
test "$dlself" != no
; then
4356 $echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2
4359 if test -n "$rpath"; then
4360 $echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2
4363 if test -n "$xrpath"; then
4364 $echo "$modename: warning: \`-R' is ignored for objects" 1>&2
4367 if test -n "$vinfo"; then
4368 $echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2
4371 if test -n "$release"; then
4372 $echo "$modename: warning: \`-release' is ignored for objects" 1>&2
4377 if test -n "$objs$old_deplibs"; then
4378 $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2
4382 obj
=`$echo "X$output" | $Xsed -e "$lo2o"`
4390 # Delete the old objects.
4391 $run $rm $obj $libobj
4393 # Objects from convenience libraries. This assumes
4394 # single-version convenience libraries. Whenever we create
4395 # different ones for PIC/non-PIC, this we'll have to duplicate
4399 # reload_cmds runs $LD directly, so let us get rid of
4400 # -Wl from whole_archive_flag_spec
4403 if test -n "$convenience"; then
4404 if test -n "$whole_archive_flag_spec"; then
4405 eval reload_conv_objs
=\"\
$reload_objs $whole_archive_flag_spec\"
4407 gentop
="$output_objdir/${obj}x"
4408 generated
="$generated $gentop"
4410 func_extract_archives
$gentop $convenience
4411 reload_conv_objs
="$reload_objs $func_extract_archives_result"
4415 # Create the old-style object.
4416 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
4420 save_ifs
="$IFS"; IFS
='~'
4421 for cmd
in $cmds; do
4425 $run eval "$cmd" ||
exit $?
4429 # Exit if we aren't doing a library object file.
4430 if test -z "$libobj"; then
4431 if test -n "$gentop"; then
4432 $show "${rm}r $gentop"
4439 if test "$build_libtool_libs" != yes; then
4440 if test -n "$gentop"; then
4441 $show "${rm}r $gentop"
4445 # Create an invalid libtool object if no PIC, so that we don't
4446 # accidentally link it into a program.
4447 # $show "echo timestamp > $libobj"
4448 # $run eval "echo timestamp > $libobj" || exit $?
4452 if test -n "$pic_flag" ||
test "$pic_mode" != default
; then
4453 # Only do commands if we really have different PIC objects.
4454 reload_objs
="$libobjs $reload_conv_objs"
4457 save_ifs
="$IFS"; IFS
='~'
4458 for cmd
in $cmds; do
4462 $run eval "$cmd" ||
exit $?
4467 if test -n "$gentop"; then
4468 $show "${rm}r $gentop"
4477 *cygwin
*) output
=`$echo $output | ${SED} -e 's,.exe$,,;s,$,.exe,'` ;;
4479 if test -n "$vinfo"; then
4480 $echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2
4483 if test -n "$release"; then
4484 $echo "$modename: warning: \`-release' is ignored for programs" 1>&2
4487 if test "$preload" = yes; then
4488 if test "$dlopen_support" = unknown
&& test "$dlopen_self" = unknown
&&
4489 test "$dlopen_self_static" = unknown
; then
4490 $echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support."
4495 *-*-rhapsody* |
*-*-darwin1.
[012])
4496 # On Rhapsody replace the C library is the System framework
4497 compile_deplibs
=`$echo "X $compile_deplibs" | $Xsed -e 's/ -lc / -framework System /'`
4498 finalize_deplibs
=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'`
4504 # Don't allow lazy linking, it breaks C++ global constructors
4505 if test "$tagname" = CXX
; then
4506 compile_command
="$compile_command ${wl}-bind_at_load"
4507 finalize_command
="$finalize_command ${wl}-bind_at_load"
4512 compile_command
="$compile_command $compile_deplibs"
4513 finalize_command
="$finalize_command $finalize_deplibs"
4515 if test -n "$rpath$xrpath"; then
4516 # If the user specified any rpath flags, then add them.
4517 for libdir
in $rpath $xrpath; do
4518 # This is the magic to use -rpath.
4519 case "$finalize_rpath " in
4521 *) finalize_rpath
="$finalize_rpath $libdir" ;;
4526 # Now hardcode the library paths
4529 for libdir
in $compile_rpath $finalize_rpath; do
4530 if test -n "$hardcode_libdir_flag_spec"; then
4531 if test -n "$hardcode_libdir_separator"; then
4532 if test -z "$hardcode_libdirs"; then
4533 hardcode_libdirs
="$libdir"
4535 # Just accumulate the unique libdirs.
4536 case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
4537 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
4540 hardcode_libdirs
="$hardcode_libdirs$hardcode_libdir_separator$libdir"
4545 eval flag
=\"$hardcode_libdir_flag_spec\"
4546 rpath
="$rpath $flag"
4548 elif test -n "$runpath_var"; then
4549 case "$perm_rpath " in
4551 *) perm_rpath
="$perm_rpath $libdir" ;;
4555 *-*-cygwin* |
*-*-mingw* |
*-*-pw32* |
*-*-os2*)
4556 case :$dllsearchpath: in
4558 *) dllsearchpath
="$dllsearchpath:$libdir";;
4563 # Substitute the hardcoded libdirs into the rpath.
4564 if test -n "$hardcode_libdir_separator" &&
4565 test -n "$hardcode_libdirs"; then
4566 libdir
="$hardcode_libdirs"
4567 eval rpath
=\" $hardcode_libdir_flag_spec\"
4569 compile_rpath
="$rpath"
4573 for libdir
in $finalize_rpath; do
4574 if test -n "$hardcode_libdir_flag_spec"; then
4575 if test -n "$hardcode_libdir_separator"; then
4576 if test -z "$hardcode_libdirs"; then
4577 hardcode_libdirs
="$libdir"
4579 # Just accumulate the unique libdirs.
4580 case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
4581 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
4584 hardcode_libdirs
="$hardcode_libdirs$hardcode_libdir_separator$libdir"
4589 eval flag
=\"$hardcode_libdir_flag_spec\"
4590 rpath
="$rpath $flag"
4592 elif test -n "$runpath_var"; then
4593 case "$finalize_perm_rpath " in
4595 *) finalize_perm_rpath
="$finalize_perm_rpath $libdir" ;;
4599 # Substitute the hardcoded libdirs into the rpath.
4600 if test -n "$hardcode_libdir_separator" &&
4601 test -n "$hardcode_libdirs"; then
4602 libdir
="$hardcode_libdirs"
4603 eval rpath
=\" $hardcode_libdir_flag_spec\"
4605 finalize_rpath
="$rpath"
4607 if test -n "$libobjs" && test "$build_old_libs" = yes; then
4608 # Transform all the library objects into standard objects.
4609 compile_command
=`$echo "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
4610 finalize_command
=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
4614 if test -n "$dlfiles$dlprefiles" ||
test "$dlself" != no
; then
4615 if test -n "$NM" && test -n "$global_symbol_pipe"; then
4616 dlsyms
="${outputname}S.c"
4618 $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2
4622 if test -n "$dlsyms"; then
4626 # Discover the nlist of each of the dlfiles.
4627 nlist
="$output_objdir/${outputname}.nm"
4629 $show "$rm $nlist ${nlist}S ${nlist}T"
4630 $run $rm "$nlist" "${nlist}S" "${nlist}T"
4632 # Parse the name list into a source file.
4633 $show "creating $output_objdir/$dlsyms"
4635 test -z "$run" && $echo > "$output_objdir/$dlsyms" "\
4636 /* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */
4637 /* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */
4643 /* Prevent the only kind of declaration conflicts we can make. */
4644 #define lt_preloaded_symbols some_other_symbol
4646 /* External symbol declarations for the compiler. */\
4649 if test "$dlself" = yes; then
4650 $show "generating symbol list for \`$output'"
4652 test -z "$run" && $echo ': @PROGRAM@ ' > "$nlist"
4654 # Add our own program objects to the symbol list.
4655 progfiles
=`$echo "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
4656 for arg
in $progfiles; do
4657 $show "extracting global C symbols from \`$arg'"
4658 $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
4661 if test -n "$exclude_expsyms"; then
4662 $run eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T'
4663 $run eval '$mv "$nlist"T "$nlist"'
4666 if test -n "$export_symbols_regex"; then
4667 $run eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T'
4668 $run eval '$mv "$nlist"T "$nlist"'
4671 # Prepare the list of exported symbols
4672 if test -z "$export_symbols"; then
4673 export_symbols
="$output_objdir/$output.exp"
4674 $run $rm $export_symbols
4675 $run eval "${SED} -n -e '/^: @PROGRAM@$/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
4677 $run eval "${SED} -e 's/\([][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$output.exp"'
4678 $run eval 'grep -f "$output_objdir/$output.exp" < "$nlist" > "$nlist"T'
4679 $run eval 'mv "$nlist"T "$nlist"'
4683 for arg
in $dlprefiles; do
4684 $show "extracting global C symbols from \`$arg'"
4685 name
=`$echo "$arg" | ${SED} -e 's%^.*/%%'`
4686 $run eval '$echo ": $name " >> "$nlist"'
4687 $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
4690 if test -z "$run"; then
4691 # Make sure we have at least an empty file.
4692 test -f "$nlist" ||
: > "$nlist"
4694 if test -n "$exclude_expsyms"; then
4695 $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T
4696 $mv "$nlist"T
"$nlist"
4699 # Try sorting and uniquifying the output.
4700 if grep -v "^: " < "$nlist" |
4701 if sort -k 3 </dev
/null
>/dev
/null
2>&1; then
4706 uniq > "$nlist"S
; then
4709 grep -v "^: " < "$nlist" > "$nlist"S
4712 if test -f "$nlist"S
; then
4713 eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$dlsyms"'
4715 $echo '/* NONE */' >> "$output_objdir/$dlsyms"
4718 $echo >> "$output_objdir/$dlsyms" "\
4720 #undef lt_preloaded_symbols
4722 #if defined (__STDC__) && __STDC__
4723 # define lt_ptr void *
4725 # define lt_ptr char *
4729 /* The mapping between symbol names and symbols. */
4734 lt_preloaded_symbols[] =
4738 eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$dlsyms"
4740 $echo >> "$output_objdir/$dlsyms" "\
4744 /* This works around a problem in FreeBSD linker */
4745 #ifdef FREEBSD_WORKAROUND
4746 static const void *lt_preloaded_setup() {
4747 return lt_preloaded_symbols;
4757 pic_flag_for_symtable
=
4759 # compiling the symbol table file with pic_flag works around
4760 # a FreeBSD bug that causes programs to crash when -lm is
4761 # linked before any other PIC object. But we must not use
4762 # pic_flag when linking with -static. The problem exists in
4763 # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1.
4764 *-*-freebsd2*|
*-*-freebsd3.0
*|
*-*-freebsdelf3.0
*)
4765 case "$compile_command " in
4767 *) pic_flag_for_symtable
=" $pic_flag -DFREEBSD_WORKAROUND";;
4770 case "$compile_command " in
4772 *) pic_flag_for_symtable
=" $pic_flag";;
4776 # Now compile the dynamic symbol file.
4777 $show "(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")"
4778 $run eval '(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' ||
exit $?
4780 # Clean up the generated files.
4781 $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T"
4782 $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T"
4784 # Transform the symbol file into the correct name.
4785 compile_command
=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
4786 finalize_command
=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
4789 $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2
4794 # We keep going just in case the user didn't refer to
4795 # lt_preloaded_symbols. The linker will fail if global_symbol_pipe
4796 # really was required.
4798 # Nullify the symbol file.
4799 compile_command
=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"`
4800 finalize_command
=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"`
4803 if test "$need_relink" = no ||
test "$build_libtool_libs" != yes; then
4804 # Replace the output file specification.
4805 compile_command
=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
4806 link_command
="$compile_command$compile_rpath"
4808 # We have no uninstalled library dependencies, so finalize right now.
4809 $show "$link_command"
4810 $run eval "$link_command"
4813 # Delete the generated files.
4814 if test -n "$dlsyms"; then
4815 $show "$rm $output_objdir/${outputname}S.${objext}"
4816 $run $rm "$output_objdir/${outputname}S.${objext}"
4822 if test -n "$shlibpath_var"; then
4823 # We should set the shlibpath_var
4825 for dir
in $temp_rpath; do
4827 [\\/]* |
[A-Za-z
]:[\\/]*)
4832 # Relative path: add a thisdir entry.
4833 rpath
="$rpath\$thisdir/$dir:"
4840 if test -n "$compile_shlibpath$finalize_shlibpath"; then
4841 compile_command
="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command"
4843 if test -n "$finalize_shlibpath"; then
4844 finalize_command
="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command"
4849 if test -n "$runpath_var"; then
4850 if test -n "$perm_rpath"; then
4851 # We should set the runpath_var.
4853 for dir
in $perm_rpath; do
4856 compile_var
="$runpath_var=\"$rpath\$$runpath_var\" "
4858 if test -n "$finalize_perm_rpath"; then
4859 # We should set the runpath_var.
4861 for dir
in $finalize_perm_rpath; do
4864 finalize_var
="$runpath_var=\"$rpath\$$runpath_var\" "
4868 if test "$no_install" = yes; then
4869 # We don't need to create a wrapper script.
4870 link_command
="$compile_var$compile_command$compile_rpath"
4871 # Replace the output file specification.
4872 link_command
=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
4873 # Delete the old output file.
4875 # Link the executable and exit
4876 $show "$link_command"
4877 $run eval "$link_command" ||
exit $?
4881 if test "$hardcode_action" = relink
; then
4882 # Fast installation is not supported
4883 link_command
="$compile_var$compile_command$compile_rpath"
4884 relink_command
="$finalize_var$finalize_command$finalize_rpath"
4886 $echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2
4887 $echo "$modename: \`$output' will be relinked during installation" 1>&2
4889 if test "$fast_install" != no
; then
4890 link_command
="$finalize_var$compile_command$finalize_rpath"
4891 if test "$fast_install" = yes; then
4892 relink_command
=`$echo "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'`
4894 # fast_install is set to needless
4898 link_command
="$compile_var$compile_command$compile_rpath"
4899 relink_command
="$finalize_var$finalize_command$finalize_rpath"
4903 # Replace the output file specification.
4904 link_command
=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
4906 # Delete the old output files.
4907 $run $rm $output $output_objdir/$outputname $output_objdir/lt-
$outputname
4909 $show "$link_command"
4910 $run eval "$link_command" ||
exit $?
4912 # Now create the wrapper script.
4913 $show "creating $output"
4915 # Quote the relink command for shipping.
4916 if test -n "$relink_command"; then
4917 # Preserve any variables that may affect compiler behavior
4918 for var
in $variables_saved_for_relink; do
4919 if eval test -z \"\
${$var+set}\"; then
4920 relink_command
="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command"
4921 elif eval var_value
=\$
$var; test -z "$var_value"; then
4922 relink_command
="$var=; export $var; $relink_command"
4924 var_value
=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"`
4925 relink_command
="$var=\"$var_value\"; export $var; $relink_command"
4928 relink_command
="(cd `pwd`; $relink_command)"
4929 relink_command
=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
4932 # Quote $echo for shipping.
4933 if test "X$echo" = "X$SHELL $progpath --fallback-echo"; then
4935 [\\/]* |
[A-Za-z
]:[\\/]*) qecho
="$SHELL $progpath --fallback-echo";;
4936 *) qecho
="$SHELL `pwd`/$progpath --fallback-echo";;
4938 qecho
=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"`
4940 qecho
=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"`
4943 # Only actually do things if our run command is non-null.
4944 if test -z "$run"; then
4945 # win32 will think the script is a binary if it has
4946 # a .exe suffix, so we strip it off here.
4948 *.exe
) output
=`$echo $output|${SED} 's,.exe$,,'` ;;
4950 # test for cygwin because mv fails w/o .exe extensions
4954 outputname
=`$echo $outputname|${SED} 's,.exe$,,'` ;;
4958 *cygwin
* |
*mingw
* )
4959 cwrappersource
=`$echo ${objdir}/lt-${output}.c`
4960 cwrapper
=`$echo ${output}.exe`
4961 $rm $cwrappersource $cwrapper
4962 trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15
4964 cat > $cwrappersource <<EOF
4966 /* $cwrappersource - temporary wrapper executable for $objdir/$outputname
4967 Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
4969 The $output program cannot be directly executed until all the libtool
4970 libraries that it depends on are installed.
4972 This wrapper executable should never be moved out of the build directory.
4973 If it is, it will not operate correctly.
4975 Currently, it simply execs the wrapper *script* "/bin/sh $output",
4976 but could eventually absorb all of the scripts functionality and
4977 exec $objdir/$outputname directly.
4980 cat >> $cwrappersource<<"EOF"
4988 #if defined(PATH_MAX)
4989 # define LT_PATHMAX PATH_MAX
4990 #elif defined(MAXPATHLEN)
4991 # define LT_PATHMAX MAXPATHLEN
4993 # define LT_PATHMAX 1024
4996 #ifndef DIR_SEPARATOR
4997 #define DIR_SEPARATOR '/'
5000 #if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \
5002 #define HAVE_DOS_BASED_FILE_SYSTEM
5003 #ifndef DIR_SEPARATOR_2
5004 #define DIR_SEPARATOR_2 '\\'
5008 #ifndef DIR_SEPARATOR_2
5009 # define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR)
5010 #else /* DIR_SEPARATOR_2 */
5011 # define IS_DIR_SEPARATOR(ch) \
5012 (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2))
5013 #endif /* DIR_SEPARATOR_2 */
5015 #define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type)))
5016 #define XFREE(stale) do { \
5017 if (stale) { free ((void *) stale); stale = 0; } \
5020 const char *program_name = NULL;
5022 void * xmalloc (size_t num);
5023 char * xstrdup (const char *string);
5024 char * basename (const char *name);
5025 char * fnqualify(const char *path);
5026 char * strendzap(char *str, const char *pat);
5027 void lt_fatal (const char *message, ...);
5030 main (int argc, char *argv[])
5035 program_name = (char *) xstrdup ((char *) basename (argv[0]));
5036 newargz = XMALLOC(char *, argc+2);
5039 cat >> $cwrappersource <<EOF
5040 newargz[0] = "$SHELL";
5043 cat >> $cwrappersource <<"EOF"
5044 newargz
[1] = fnqualify
(argv
[0]);
5045 /* we know the
script has the same name
, without the .exe
*/
5046 /* so
make sure newargz
[1] doesn
't end in .exe */
5047 strendzap(newargz[1],".exe");
5048 for (i = 1; i < argc; i++)
5049 newargz[i+1] = xstrdup(argv[i]);
5050 newargz[argc+1] = NULL;
5053 cat >> $cwrappersource <<EOF
5054 execv("$SHELL",newargz);
5057 cat >> $cwrappersource <<"EOF"
5061 xmalloc (size_t num)
5063 void * p = (void *) malloc (num);
5065 lt_fatal ("Memory exhausted");
5071 xstrdup (const char *string)
5073 return string ? strcpy ((char *) xmalloc (strlen (string) + 1), string) : NULL
5078 basename (const char *name)
5082 #if defined (HAVE_DOS_BASED_FILE_SYSTEM)
5083 /* Skip over the disk name in MSDOS pathnames. */
5084 if (isalpha (name[0]) && name[1] == ':')
5088 for (base = name; *name; name++)
5089 if (IS_DIR_SEPARATOR (*name))
5091 return (char *) base;
5095 fnqualify(const char *path)
5099 char tmp[LT_PATHMAX + 1];
5101 assert(path != NULL);
5103 /* Is it qualified already? */
5104 #if defined (HAVE_DOS_BASED_FILE_SYSTEM)
5105 if (isalpha (path[0]) && path[1] == ':')
5106 return xstrdup (path);
5108 if (IS_DIR_SEPARATOR (path[0]))
5109 return xstrdup (path);
5111 /* prepend the current directory */
5112 /* doesn't handle
'~' */
5113 if (getcwd
(tmp
, LT_PATHMAX
) == NULL
)
5114 lt_fatal
("getcwd failed");
5115 size
= strlen
(tmp
) + 1 + strlen
(path
) + 1; /* +2 for '/' and
'\0' */
5116 p
= XMALLOC
(char
, size
);
5117 sprintf
(p
, "%s%c%s", tmp
, DIR_SEPARATOR
, path
);
5122 strendzap
(char
*str
, const char
*pat
)
5126 assert
(str
!= NULL
);
5127 assert
(pat
!= NULL
);
5130 patlen
= strlen
(pat
);
5134 str
+= len
- patlen
;
5135 if (strcmp
(str
, pat
) == 0)
5142 lt_error_core
(int exit_status
, const char
* mode
,
5143 const char
* message
, va_list ap
)
5145 fprintf
(stderr
, "%s: %s: ", program_name
, mode
);
5146 vfprintf
(stderr
, message
, ap
);
5147 fprintf
(stderr
, ".\n");
5149 if (exit_status
>= 0)
5154 lt_fatal
(const char
*message
, ...
)
5157 va_start
(ap
, message
);
5158 lt_error_core
(EXIT_FAILURE
, "FATAL", message
, ap
);
5162 # we should really use a build-platform specific compiler
5163 # here, but OTOH, the wrappers (shell script and this C one)
5164 # are only useful if you want to execute the "real" binary.
5165 # Since the "real" binary is built for $host, then this
5166 # wrapper might as well be built for $host, too.
5167 $run $LTCC -s -o $cwrapper $cwrappersource
5171 trap "$rm $output; exit $EXIT_FAILURE" 1 2 15
5176 # $output - temporary wrapper script for $objdir/$outputname
5177 # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
5179 # The $output program cannot be directly executed until all the libtool
5180 # libraries that it depends on are installed.
5182 # This wrapper script should never be moved out of the build directory.
5183 # If it is, it will not operate correctly.
5185 # Sed substitution that helps us do robust quoting. It backslashifies
5186 # metacharacters that are still active within double-quoted strings.
5187 Xsed='${SED} -e 1s/^X//'
5188 sed_quote_subst='$sed_quote_subst'
5190 # The HP-UX ksh and POSIX shell print the target directory to stdout
5192 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
5194 relink_command=\"$relink_command\"
5196 # This environment variable determines our operation mode.
5197 if test \"\$libtool_install_magic\" = \"$magic\"; then
5198 # install mode needs the following variable:
5199 notinst_deplibs='$notinst_deplibs'
5201 # When we are sourced in execute mode, \$file and \$echo are already set.
5202 if test \"\$libtool_execute_magic\" != \"$magic\"; then
5205 # Make sure echo works.
5206 if test \"X\$1\" = X--no-reexec; then
5207 # Discard the --no-reexec flag, and continue.
5209 elif test \"X\`(\$echo '\t') 2>/dev/null\`\" = 'X\t'; then
5210 # Yippee, \$echo works!
5213 # Restart under the correct shell, and then maybe \$echo will work.
5214 exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"}
5220 # Find the directory that this script lives in.
5221 thisdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\`
5222 test \"x\$thisdir\" = \"x\$file\" && thisdir=.
5224 # Follow symbolic links until we get to the real thisdir.
5225 file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\`
5226 while test -n \"\$file\"; do
5227 destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\`
5229 # If there was a directory component, then change thisdir.
5230 if test \"x\$destdir\" != \"x\$file\"; then
5231 case \"\$destdir\" in
5232 [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;;
5233 *) thisdir=\"\$thisdir/\$destdir\" ;;
5237 file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\`
5238 file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\`
5241 # Try to get the absolute directory name.
5242 absdir=\`cd \"\$thisdir\" && pwd\`
5243 test -n \"\$absdir\" && thisdir=\"\$absdir\"
5246 if test "$fast_install" = yes; then
5248 program=lt-'$outputname'$exeext
5249 progdir=\"\$thisdir/$objdir\"
5251 if test ! -f \"\$progdir/\$program\" || \\
5252 { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\
5253 test \"X\$file\" != \"X\$progdir/\$program\"; }; then
5255 file=\"\$\$-\$program\"
5257 if test ! -d \"\$progdir\"; then
5258 $mkdir \"\$progdir\"
5260 $rm \"\$progdir/\$file\"
5265 # relink executable if necessary
5266 if test -n \"\$relink_command\"; then
5267 if relink_command_output=\`eval \$relink_command 2>&1\`; then :
5269 $echo \"\$relink_command_output\" >&2
5270 $rm \"\$progdir/\$file\"
5275 $mv \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null ||
5276 { $rm \"\$progdir/\$program\";
5277 $mv \"\$progdir/\$file\" \"\$progdir/\$program\"; }
5278 $rm \"\$progdir/\$file\"
5282 program='$outputname'
5283 progdir=\"\$thisdir/$objdir\"
5289 if test -f \"\$progdir/\$program\"; then"
5291 # Export our shlibpath_var if we have one.
5292 if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
5294 # Add our own library path to $shlibpath_var
5295 $shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
5297 # Some systems cannot cope with colon-terminated $shlibpath_var
5298 # The second colon is a workaround for a bug in BeOS R4 sed
5299 $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\`
5301 export $shlibpath_var
5305 # fixup the dll searchpath if we need to.
5306 if test -n "$dllsearchpath"; then
5308 # Add the dll search path components to the executable PATH
5309 PATH=$dllsearchpath:\$PATH
5314 if test \"\$libtool_execute_magic\" != \"$magic\"; then
5315 # Run the actual program with our arguments.
5318 # Backslashes separate directories on plain windows
5319 *-*-mingw |
*-*-os2*)
5321 exec \$progdir\\\\\$program \${1+\"\$@\"}
5327 exec \$progdir/\$program \${1+\"\$@\"}
5332 \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\"
5336 # The program doesn't exist.
5337 \$echo \"\$0: error: \$progdir/\$program does not exist\" 1>&2
5338 \$echo \"This script is just a wrapper for \$program.\" 1>&2
5339 $echo \"See the $PACKAGE documentation for more information.\" 1>&2
5350 # See if we need to build an old-fashioned archive.
5351 for oldlib
in $oldlibs; do
5353 if test "$build_libtool_libs" = convenience
; then
5354 oldobjs
="$libobjs_save"
5355 addlibs
="$convenience"
5356 build_libtool_libs
=no
5358 if test "$build_libtool_libs" = module
; then
5359 oldobjs
="$libobjs_save"
5360 build_libtool_libs
=no
5362 oldobjs
="$old_deplibs $non_pic_objects"
5364 addlibs
="$old_convenience"
5367 if test -n "$addlibs"; then
5368 gentop
="$output_objdir/${outputname}x"
5369 generated
="$generated $gentop"
5371 func_extract_archives
$gentop $addlibs
5372 oldobjs
="$oldobjs $func_extract_archives_result"
5375 # Do each command in the archive commands.
5376 if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
5377 cmds
=$old_archive_from_new_cmds
5379 eval cmds
=\"$old_archive_cmds\"
5381 if len
=`expr "X$cmds" : ".*"` &&
5382 test "$len" -le "$max_cmd_len" ||
test "$max_cmd_len" -le -1; then
5383 cmds
=$old_archive_cmds
5385 # the command line is too long to link in one step, link in parts
5386 $echo "using piecewise archive linking..."
5391 save_oldobjs
=$oldobjs
5392 # GNU ar 2.10+ was changed to match POSIX; thus no paths are
5393 # encoded into archives. This makes 'ar r' malfunction in
5394 # this piecewise linking case whenever conflicting object
5395 # names appear in distinct ar calls; check, warn and compensate.
5396 if (for obj
in $save_oldobjs
5398 $echo "X$obj" |
$Xsed -e 's%^.*/%%'
5399 done |
sort |
sort -uc >/dev
/null
2>&1); then
5402 $echo "$modename: warning: object name conflicts; overriding AR_FLAGS to 'cq'" 1>&2
5403 $echo "$modename: warning: to ensure that POSIX-compatible ar will work" 1>&2
5406 # Is there a better way of finding the last object in the list?
5407 for obj
in $save_oldobjs
5411 for obj
in $save_oldobjs
5413 oldobjs
="$objlist $obj"
5414 objlist
="$objlist $obj"
5415 eval test_cmds
=\"$old_archive_cmds\"
5416 if len
=`expr "X$test_cmds" : ".*"` &&
5417 test "$len" -le "$max_cmd_len"; then
5420 # the above command should be used before it gets too long
5422 if test "$obj" = "$last_oldobj" ; then
5425 test -z "$concat_cmds" || concat_cmds
=$concat_cmds~
5426 eval concat_cmds
=\"\
${concat_cmds}$old_archive_cmds\"
5432 if test "X$oldobjs" = "X" ; then
5433 eval cmds
=\"\
$concat_cmds\"
5435 eval cmds
=\"\
$concat_cmds~\
$old_archive_cmds\"
5439 save_ifs
="$IFS"; IFS
='~'
5440 for cmd
in $cmds; do
5444 $run eval "$cmd" ||
exit $?
5449 if test -n "$generated"; then
5450 $show "${rm}r$generated"
5451 $run ${rm}r
$generated
5454 # Now create the libtool archive.
5458 test "$build_old_libs" = yes && old_library
="$libname.$libext"
5459 $show "creating $output"
5461 # Preserve any variables that may affect compiler behavior
5462 for var
in $variables_saved_for_relink; do
5463 if eval test -z \"\
${$var+set}\"; then
5464 relink_command
="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command"
5465 elif eval var_value
=\$
$var; test -z "$var_value"; then
5466 relink_command
="$var=; export $var; $relink_command"
5468 var_value
=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"`
5469 relink_command
="$var=\"$var_value\"; export $var; $relink_command"
5472 # Quote the link command for shipping.
5473 relink_command
="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
5474 relink_command
=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
5475 if test "$hardcode_automatic" = yes ; then
5480 # Only create the output if not a dry run.
5481 if test -z "$run"; then
5482 for installed
in no
yes; do
5483 if test "$installed" = yes; then
5484 if test -z "$install_libdir"; then
5487 output
="$output_objdir/$outputname"i
5488 # Replace all uninstalled libtool libraries with the installed ones
5490 for deplib
in $dependency_libs; do
5493 name
=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'`
5494 eval libdir
=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
5495 if test -z "$libdir"; then
5496 $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
5499 newdependency_libs
="$newdependency_libs $libdir/$name"
5501 *) newdependency_libs
="$newdependency_libs $deplib" ;;
5504 dependency_libs
="$newdependency_libs"
5506 for lib
in $dlfiles; do
5507 name
=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
5508 eval libdir
=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
5509 if test -z "$libdir"; then
5510 $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
5513 newdlfiles
="$newdlfiles $libdir/$name"
5515 dlfiles
="$newdlfiles"
5517 for lib
in $dlprefiles; do
5518 name
=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
5519 eval libdir
=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
5520 if test -z "$libdir"; then
5521 $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
5524 newdlprefiles
="$newdlprefiles $libdir/$name"
5526 dlprefiles
="$newdlprefiles"
5529 for lib
in $dlfiles; do
5531 [\\/]* |
[A-Za-z
]:[\\/]*) abs
="$lib" ;;
5532 *) abs
=`pwd`"/$lib" ;;
5534 newdlfiles
="$newdlfiles $abs"
5536 dlfiles
="$newdlfiles"
5538 for lib
in $dlprefiles; do
5540 [\\/]* |
[A-Za-z
]:[\\/]*) abs
="$lib" ;;
5541 *) abs
=`pwd`"/$lib" ;;
5543 newdlprefiles
="$newdlprefiles $abs"
5545 dlprefiles
="$newdlprefiles"
5548 # place dlname in correct position for cygwin
5550 case $host,$output,$installed,$module,$dlname in
5551 *cygwin
*,*lai
,yes,no
,*.dll |
*mingw
*,*lai
,yes,no
,*.dll
) tdlname
=..
/bin
/$dlname ;;
5554 # $outputname - a libtool library file
5555 # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
5557 # Please DO NOT delete this file!
5558 # It is necessary for linking the library.
5560 # The name that we can dlopen(3).
5563 # Names of this library.
5564 library_names='$library_names'
5566 # The name of the static archive.
5567 old_library='$old_library'
5569 # Libraries that this one depends upon.
5570 dependency_libs='$dependency_libs'
5572 # Version information for $libname.
5577 # Is this an already installed library?
5578 installed=$installed
5580 # Should we warn about portability when linking against -modules?
5581 shouldnotlink=$module
5583 # Files to dlopen/dlpreopen
5585 dlpreopen='$dlprefiles'
5587 # Directory that this library needs to be installed in:
5588 libdir='$install_libdir'"
5589 if test "$installed" = no
&& test "$need_relink" = yes; then
5591 relink_command=\"$relink_command\""
5596 # Do a symbolic link so that the libtool archive can be found in
5597 # LD_LIBRARY_PATH before the program is installed.
5598 $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)"
5599 $run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' ||
exit $?
5605 # libtool install mode
5607 modename
="$modename: install"
5609 # There may be an optional sh(1) argument at the beginning of
5610 # install_prog (especially on Windows NT).
5611 if test "$nonopt" = "$SHELL" ||
test "$nonopt" = /bin
/sh ||
5612 # Allow the use of GNU shtool's install command.
5613 $echo "X$nonopt" |
$Xsed |
grep shtool
> /dev
/null
; then
5614 # Aesthetically quote it.
5615 arg
=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"`
5617 *[\
[\~\
#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
5621 install_prog
="$arg "
5629 # The real first argument should be the name of the installation program.
5630 # Aesthetically quote it.
5631 arg
=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
5633 *[\
[\~\
#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
5637 install_prog
="$install_prog$arg"
5639 # We need to accept at least all the BSD install flags.
5649 if test -n "$dest"; then
5650 files
="$files $dest"
5668 # If the previous option needed an argument, then skip it.
5669 if test -n "$prev"; then
5678 # Aesthetically quote the argument.
5679 arg
=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
5681 *[\
[\~\
#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
5685 install_prog
="$install_prog $arg"
5688 if test -z "$install_prog"; then
5689 $echo "$modename: you must specify an install program" 1>&2
5694 if test -n "$prev"; then
5695 $echo "$modename: the \`$prev' option requires an argument" 1>&2
5700 if test -z "$files"; then
5701 if test -z "$dest"; then
5702 $echo "$modename: no file or destination specified" 1>&2
5704 $echo "$modename: you must specify a destination" 1>&2
5710 # Strip any trailing slash from the destination.
5711 dest
=`$echo "X$dest" | $Xsed -e 's%/$%%'`
5713 # Check to see that the destination is a directory.
5714 test -d "$dest" && isdir
=yes
5715 if test "$isdir" = yes; then
5719 destdir
=`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'`
5720 test "X$destdir" = "X$dest" && destdir
=.
5721 destname
=`$echo "X$dest" | $Xsed -e 's%^.*/%%'`
5723 # Not a directory, so check to see that there is only one file specified.
5725 if test "$#" -gt 2; then
5726 $echo "$modename: \`$dest' is not a directory" 1>&2
5732 [\\/]* |
[A-Za-z
]:[\\/]*) ;;
5734 for file in $files; do
5738 $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2
5747 # This variable tells wrapper scripts just to set variables rather
5748 # than running their programs.
5749 libtool_install_magic
="$magic"
5754 for file in $files; do
5756 # Do each installation.
5759 # Do the static libraries later.
5760 staticlibs
="$staticlibs $file"
5764 # Check to see that this really is a libtool archive.
5765 if (${SED} -e '2q' $file |
grep "^# Generated by .*$PACKAGE") >/dev
/null
2>&1; then :
5767 $echo "$modename: \`$file' is not a valid libtool archive" 1>&2
5775 # If there is no directory component, then add one.
5777 */* |
*\\*) .
$file ;;
5781 # Add the libdir to current_libdirs if it is the destination.
5782 if test "X$destdir" = "X$libdir"; then
5783 case "$current_libdirs " in
5785 *) current_libdirs
="$current_libdirs $libdir" ;;
5788 # Note the libdir as a future libdir.
5789 case "$future_libdirs " in
5791 *) future_libdirs
="$future_libdirs $libdir" ;;
5795 dir
=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/
5796 test "X$dir" = "X$file/" && dir
=
5799 if test -n "$relink_command"; then
5800 # Determine the prefix the user has applied to our future dir.
5801 inst_prefix_dir
=`$echo "$destdir" | $SED "s%$libdir\$%%"`
5803 # Don't allow the user to place us outside of our expected
5804 # location b/c this prevents finding dependent libraries that
5805 # are installed to the same prefix.
5806 # At present, this check doesn't affect windows .dll's that
5807 # are installed into $libdir/../bin (currently, that works fine)
5808 # but it's something to keep an eye on.
5809 if test "$inst_prefix_dir" = "$destdir"; then
5810 $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2
5814 if test -n "$inst_prefix_dir"; then
5815 # Stick the inst_prefix_dir data into the link command.
5816 relink_command
=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"`
5818 relink_command
=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%%"`
5821 $echo "$modename: warning: relinking \`$file'" 1>&2
5822 $show "$relink_command"
5823 if $run eval "$relink_command"; then :
5825 $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
5830 # See the names of the shared library.
5831 set dummy
$library_names
5832 if test -n "$2"; then
5838 test -n "$relink_command" && srcname
="$realname"T
5840 # Install the shared library and build the symlinks.
5841 $show "$install_prog $dir/$srcname $destdir/$realname"
5842 $run eval "$install_prog $dir/$srcname $destdir/$realname" ||
exit $?
5843 if test -n "$stripme" && test -n "$striplib"; then
5844 $show "$striplib $destdir/$realname"
5845 $run eval "$striplib $destdir/$realname" ||
exit $?
5848 if test "$#" -gt 0; then
5849 # Delete the old symlinks, and create new ones.
5852 if test "$linkname" != "$realname"; then
5853 $show "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)"
5854 $run eval "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)"
5859 # Do each command in the postinstall commands.
5860 lib
="$destdir/$realname"
5861 cmds
=$postinstall_cmds
5862 save_ifs
="$IFS"; IFS
='~'
5863 for cmd
in $cmds; do
5867 $run eval "$cmd" ||
exit $?
5872 # Install the pseudo-library for information purposes.
5873 name
=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
5874 instname
="$dir/$name"i
5875 $show "$install_prog $instname $destdir/$name"
5876 $run eval "$install_prog $instname $destdir/$name" ||
exit $?
5878 # Maybe install the static library, too.
5879 test -n "$old_library" && staticlibs
="$staticlibs $dir/$old_library"
5883 # Install (i.e. copy) a libtool object.
5885 # Figure out destination file name, if it wasn't already specified.
5886 if test -n "$destname"; then
5887 destfile
="$destdir/$destname"
5889 destfile
=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
5890 destfile
="$destdir/$destfile"
5893 # Deduce the name of the destination old-style object file.
5896 staticdest
=`$echo "X$destfile" | $Xsed -e "$lo2o"`
5899 staticdest
="$destfile"
5903 $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2
5909 # Install the libtool object if requested.
5910 if test -n "$destfile"; then
5911 $show "$install_prog $file $destfile"
5912 $run eval "$install_prog $file $destfile" ||
exit $?
5915 # Install the old object if enabled.
5916 if test "$build_old_libs" = yes; then
5917 # Deduce the name of the old-style object file.
5918 staticobj
=`$echo "X$file" | $Xsed -e "$lo2o"`
5920 $show "$install_prog $staticobj $staticdest"
5921 $run eval "$install_prog \$staticobj \$staticdest" ||
exit $?
5927 # Figure out destination file name, if it wasn't already specified.
5928 if test -n "$destname"; then
5929 destfile
="$destdir/$destname"
5931 destfile
=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
5932 destfile
="$destdir/$destfile"
5935 # If the file is missing, and there is a .exe on the end, strip it
5936 # because it is most likely a libtool script we actually want to
5941 if test ! -f "$file"; then
5942 file=`$echo $file|${SED} 's,.exe$,,'`
5948 # Do a test to see if this is really a libtool program.
5951 wrapper
=`$echo $file | ${SED} -e 's,.exe$,,'`
5957 if (${SED} -e '4q' $wrapper |
grep "^# Generated by .*$PACKAGE")>/dev
/null
2>&1; then
5961 # To insure that "foo" is sourced, and not "foo.exe",
5962 # finese the cygwin/MSYS system by explicitly sourcing "foo."
5963 # which disallows the automatic-append-.exe behavior.
5965 *cygwin
* |
*mingw
*) wrapperdot
=${wrapper}.
;;
5966 *) wrapperdot
=${wrapper} ;;
5968 # If there is no directory component, then add one.
5970 */* |
*\\*) .
${wrapperdot} ;;
5971 *) . .
/${wrapperdot} ;;
5974 # Check the variables that should have been set.
5975 if test -z "$notinst_deplibs"; then
5976 $echo "$modename: invalid libtool wrapper script \`$wrapper'" 1>&2
5981 for lib
in $notinst_deplibs; do
5982 # Check to see that each library is installed.
5984 if test -f "$lib"; then
5985 # If there is no directory component, then add one.
5987 */* |
*\\*) .
$lib ;;
5991 libfile
="$libdir/"`$echo "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test
5992 if test -n "$libdir" && test ! -f "$libfile"; then
5993 $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2
5999 # To insure that "foo" is sourced, and not "foo.exe",
6000 # finese the cygwin/MSYS system by explicitly sourcing "foo."
6001 # which disallows the automatic-append-.exe behavior.
6003 *cygwin
* |
*mingw
*) wrapperdot
=${wrapper}.
;;
6004 *) wrapperdot
=${wrapper} ;;
6006 # If there is no directory component, then add one.
6008 */* |
*\\*) .
${wrapperdot} ;;
6009 *) . .
/${wrapperdot} ;;
6013 if test "$fast_install" = no
&& test -n "$relink_command"; then
6014 if test "$finalize" = yes && test -z "$run"; then
6016 test -n "$TMPDIR" && tmpdir
="$TMPDIR"
6017 tmpdir
="$tmpdir/libtool-$$"
6020 if $mkdir "$tmpdir"; then
6024 $echo "$modename: error: cannot create temporary directory \`$tmpdir'" 1>&2
6027 file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'`
6028 outputname
="$tmpdir/$file"
6029 # Replace the output file specification.
6030 relink_command
=`$echo "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'`
6032 $show "$relink_command"
6033 if $run eval "$relink_command"; then :
6035 $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
6041 $echo "$modename: warning: cannot relink \`$file'" 1>&2
6044 # Install the binary that we compiled earlier.
6045 file=`$echo "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"`
6049 # remove .exe since cygwin /usr/bin/install will append another
6051 case $install_prog,$host in
6052 */usr
/bin
/install*,*cygwin
*)
6053 case $file:$destfile in
6058 destfile
=$destfile.exe
6061 destfile
=`$echo $destfile | ${SED} -e 's,.exe$,,'`
6066 $show "$install_prog$stripme $file $destfile"
6067 $run eval "$install_prog\$stripme \$file \$destfile" ||
exit $?
6068 test -n "$outputname" && ${rm}r
"$tmpdir"
6073 for file in $staticlibs; do
6074 name
=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
6076 # Set up the ranlib parameters.
6077 oldlib
="$destdir/$name"
6079 $show "$install_prog $file $oldlib"
6080 $run eval "$install_prog \$file \$oldlib" ||
exit $?
6082 if test -n "$stripme" && test -n "$old_striplib"; then
6083 $show "$old_striplib $oldlib"
6084 $run eval "$old_striplib $oldlib" ||
exit $?
6087 # Do each command in the postinstall commands.
6088 cmds
=$old_postinstall_cmds
6089 save_ifs
="$IFS"; IFS
='~'
6090 for cmd
in $cmds; do
6094 $run eval "$cmd" ||
exit $?
6099 if test -n "$future_libdirs"; then
6100 $echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2
6103 if test -n "$current_libdirs"; then
6104 # Maybe just do a dry run.
6105 test -n "$run" && current_libdirs
=" -n$current_libdirs"
6106 exec_cmd
='$SHELL $progpath $preserve_args --finish$current_libdirs'
6112 # libtool finish mode
6114 modename
="$modename: finish"
6118 if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
6121 libdirs
="$libdirs $dir"
6124 for libdir
in $libdirs; do
6125 if test -n "$finish_cmds"; then
6126 # Do each command in the finish commands.
6128 save_ifs
="$IFS"; IFS
='~'
6129 for cmd
in $cmds; do
6133 $run eval "$cmd" || admincmds
="$admincmds
6138 if test -n "$finish_eval"; then
6139 # Do the single finish_eval.
6140 eval cmds
=\"$finish_eval\"
6141 $run eval "$cmds" || admincmds
="$admincmds
6147 # Exit here if they wanted silent mode.
6148 test "$show" = : && exit $EXIT_SUCCESS
6150 $echo "----------------------------------------------------------------------"
6151 $echo "Libraries have been installed in:"
6152 for libdir
in $libdirs; do
6156 $echo "If you ever happen to want to link against installed libraries"
6157 $echo "in a given directory, LIBDIR, you must either use libtool, and"
6158 $echo "specify the full pathname of the library, or use the \`-LLIBDIR'"
6159 $echo "flag during linking and do at least one of the following:"
6160 if test -n "$shlibpath_var"; then
6161 $echo " - add LIBDIR to the \`$shlibpath_var' environment variable"
6162 $echo " during execution"
6164 if test -n "$runpath_var"; then
6165 $echo " - add LIBDIR to the \`$runpath_var' environment variable"
6166 $echo " during linking"
6168 if test -n "$hardcode_libdir_flag_spec"; then
6170 eval flag
=\"$hardcode_libdir_flag_spec\"
6172 $echo " - use the \`$flag' linker flag"
6174 if test -n "$admincmds"; then
6175 $echo " - have your system administrator run these commands:$admincmds"
6177 if test -f /etc
/ld.so.conf
; then
6178 $echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
6181 $echo "See any operating system documentation about shared libraries for"
6182 $echo "more information, such as the ld(1) and ld.so(8) manual pages."
6183 $echo "----------------------------------------------------------------------"
6187 # libtool execute mode
6189 modename
="$modename: execute"
6191 # The first argument is the command name.
6193 if test -z "$cmd"; then
6194 $echo "$modename: you must specify a COMMAND" 1>&2
6199 # Handle -dlopen flags immediately.
6200 for file in $execute_dlfiles; do
6201 if test ! -f "$file"; then
6202 $echo "$modename: \`$file' is not a file" 1>&2
6210 # Check to see that this really is a libtool archive.
6211 if (${SED} -e '2q' $file |
grep "^# Generated by .*$PACKAGE") >/dev
/null
2>&1; then :
6213 $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
6218 # Read the libtool library.
6222 # If there is no directory component, then add one.
6224 */* |
*\\*) .
$file ;;
6228 # Skip this library if it cannot be dlopened.
6229 if test -z "$dlname"; then
6230 # Warn if it was a shared library.
6231 test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'"
6235 dir
=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
6236 test "X$dir" = "X$file" && dir
=.
6238 if test -f "$dir/$objdir/$dlname"; then
6241 $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2
6247 # Just add the directory containing the .lo file.
6248 dir
=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
6249 test "X$dir" = "X$file" && dir
=.
6253 $echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2
6258 # Get the absolute pathname.
6259 absdir
=`cd "$dir" && pwd`
6260 test -n "$absdir" && dir
="$absdir"
6262 # Now add the directory to shlibpath_var.
6263 if eval "test -z \"\$$shlibpath_var\""; then
6264 eval "$shlibpath_var=\"\$dir\""
6266 eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\""
6270 # This variable tells wrapper scripts just to set shlibpath_var
6271 # rather than running their programs.
6272 libtool_execute_magic
="$magic"
6274 # Check if any of the arguments is a wrapper script.
6281 # Do a test to see if this is really a libtool program.
6282 if (${SED} -e '4q' $file |
grep "^# Generated by .*$PACKAGE") >/dev
/null
2>&1; then
6283 # If there is no directory component, then add one.
6285 */* |
*\\*) .
$file ;;
6289 # Transform arg to wrapped name.
6290 file="$progdir/$program"
6294 # Quote arguments (to preserve shell metacharacters).
6295 file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"`
6296 args
="$args \"$file\""
6299 if test -z "$run"; then
6300 if test -n "$shlibpath_var"; then
6301 # Export the shlibpath_var.
6302 eval "export $shlibpath_var"
6305 # Restore saved environment variables
6306 if test "${save_LC_ALL+set}" = set; then
6307 LC_ALL
="$save_LC_ALL"; export LC_ALL
6309 if test "${save_LANG+set}" = set; then
6310 LANG
="$save_LANG"; export LANG
6313 # Now prepare to actually exec the command.
6314 exec_cmd
="\$cmd$args"
6316 # Display what would be done.
6317 if test -n "$shlibpath_var"; then
6318 eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\""
6319 $echo "export $shlibpath_var"
6326 # libtool clean and uninstall mode
6328 modename
="$modename: $mode"
6334 # This variable tells wrapper scripts just to set variables rather
6335 # than running their programs.
6336 libtool_install_magic
="$magic"
6341 -f) rm="$rm $arg"; rmforce
=yes ;;
6342 -*) rm="$rm $arg" ;;
6343 *) files
="$files $arg" ;;
6347 if test -z "$rm"; then
6348 $echo "$modename: you must specify an RM program" 1>&2
6355 origobjdir
="$objdir"
6356 for file in $files; do
6357 dir
=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
6358 if test "X$dir" = "X$file"; then
6360 objdir
="$origobjdir"
6362 objdir
="$dir/$origobjdir"
6364 name
=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
6365 test "$mode" = uninstall
&& objdir
="$dir"
6367 # Remember objdir for removal later, being careful to avoid duplicates
6368 if test "$mode" = clean
; then
6371 *) rmdirs
="$rmdirs $objdir" ;;
6375 # Don't error if the file doesn't exist and rm -f was used.
6376 if (test -L "$file") >/dev
/null
2>&1 \
6377 ||
(test -h "$file") >/dev
/null
2>&1 \
6378 ||
test -f "$file"; then
6380 elif test -d "$file"; then
6383 elif test "$rmforce" = yes; then
6391 # Possibly a libtool archive, so verify it.
6392 if (${SED} -e '2q' $file |
grep "^# Generated by .*$PACKAGE") >/dev
/null
2>&1; then
6395 # Delete the libtool libraries and symlinks.
6396 for n
in $library_names; do
6397 rmfiles
="$rmfiles $objdir/$n"
6399 test -n "$old_library" && rmfiles
="$rmfiles $objdir/$old_library"
6400 test "$mode" = clean
&& rmfiles
="$rmfiles $objdir/$name $objdir/${name}i"
6402 if test "$mode" = uninstall
; then
6403 if test -n "$library_names"; then
6404 # Do each command in the postuninstall commands.
6405 cmds
=$postuninstall_cmds
6406 save_ifs
="$IFS"; IFS
='~'
6407 for cmd
in $cmds; do
6412 if test "$?" -ne 0 && test "$rmforce" != yes; then
6419 if test -n "$old_library"; then
6420 # Do each command in the old_postuninstall commands.
6421 cmds
=$old_postuninstall_cmds
6422 save_ifs
="$IFS"; IFS
='~'
6423 for cmd
in $cmds; do
6428 if test "$?" -ne 0 && test "$rmforce" != yes; then
6434 # FIXME: should reinstall the best remaining shared library.
6440 # Possibly a libtool object, so verify it.
6441 if (${SED} -e '2q' $file |
grep "^# Generated by .*$PACKAGE") >/dev
/null
2>&1; then
6446 # Add PIC object to the list of files to remove.
6447 if test -n "$pic_object" \
6448 && test "$pic_object" != none
; then
6449 rmfiles
="$rmfiles $dir/$pic_object"
6452 # Add non-PIC object to the list of files to remove.
6453 if test -n "$non_pic_object" \
6454 && test "$non_pic_object" != none
; then
6455 rmfiles
="$rmfiles $dir/$non_pic_object"
6461 if test "$mode" = clean
; then
6465 file=`$echo $file|${SED} 's,.exe$,,'`
6466 noexename
=`$echo $name|${SED} 's,.exe$,,'`
6467 # $file with .exe has already been added to rmfiles,
6468 # add $file without .exe
6469 rmfiles
="$rmfiles $file"
6472 # Do a test to see if this is a libtool program.
6473 if (${SED} -e '4q' $file |
grep "^# Generated by .*$PACKAGE") >/dev
/null
2>&1; then
6477 # note $name still contains .exe if it was in $file originally
6478 # as does the version of $file that was added into $rmfiles
6479 rmfiles
="$rmfiles $objdir/$name $objdir/${name}S.${objext}"
6480 if test "$fast_install" = yes && test -n "$relink_command"; then
6481 rmfiles
="$rmfiles $objdir/lt-$name"
6483 if test "X$noexename" != "X$name" ; then
6484 rmfiles
="$rmfiles $objdir/lt-${noexename}.c"
6490 $show "$rm $rmfiles"
6491 $run $rm $rmfiles || exit_status
=1
6493 objdir
="$origobjdir"
6495 # Try to remove the ${objdir}s in the directories where we deleted files
6496 for dir
in $rmdirs; do
6497 if test -d "$dir"; then
6499 $run rmdir $dir >/dev
/null
2>&1
6507 $echo "$modename: you must specify a MODE" 1>&2
6508 $echo "$generic_help" 1>&2
6513 if test -z "$exec_cmd"; then
6514 $echo "$modename: invalid operation mode \`$mode'" 1>&2
6515 $echo "$generic_help" 1>&2
6518 fi # test -z "$show_help"
6520 if test -n "$exec_cmd"; then
6525 # We need to display help for each of the modes.
6528 "Usage: $modename [OPTION]... [MODE-ARG]...
6530 Provide generalized library-building support services.
6532 --config show all configuration variables
6533 --debug enable verbose shell tracing
6534 -n, --dry-run display commands without modifying any files
6535 --features display basic configuration information and exit
6536 --finish same as \`--mode=finish'
6537 --help display this help message and exit
6538 --mode=MODE use operation mode MODE [default=inferred from MODE-ARGS]
6539 --quiet same as \`--silent'
6540 --silent don't print informational messages
6541 --tag=TAG use configuration variables from tag TAG
6542 --version print version information
6544 MODE must be one of the following:
6546 clean remove files from the build directory
6547 compile compile a source file into a libtool object
6548 execute automatically set library path, then run a program
6549 finish complete the installation of libtool libraries
6550 install install libraries or executables
6551 link create a library or an executable
6552 uninstall remove libraries from an installed directory
6554 MODE-ARGS vary depending on the MODE. Try \`$modename --help --mode=MODE' for
6555 a more detailed description of MODE.
6557 Report bugs to <bug-libtool@gnu.org>."
6563 "Usage: $modename [OPTION]... --mode=clean RM [RM-OPTION]... FILE...
6565 Remove files from the build directory.
6567 RM is the name of the program to use to delete files associated with each FILE
6568 (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed
6571 If FILE is a libtool library, object or program, all the files associated
6572 with it are deleted. Otherwise, only FILE itself is deleted using RM."
6577 "Usage: $modename [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE
6579 Compile a source file into a libtool library object.
6581 This mode accepts the following additional options:
6583 -o OUTPUT-FILE set the output file name to OUTPUT-FILE
6584 -prefer-pic try to building PIC objects only
6585 -prefer-non-pic try to building non-PIC objects only
6586 -static always build a \`.o' file suitable for static linking
6588 COMPILE-COMMAND is a command to be used in creating a \`standard' object file
6589 from the given SOURCEFILE.
6591 The output file name is determined by removing the directory component from
6592 SOURCEFILE, then substituting the C source code suffix \`.c' with the
6593 library object suffix, \`.lo'."
6598 "Usage: $modename [OPTION]... --mode=execute COMMAND [ARGS]...
6600 Automatically set library path, then run a program.
6602 This mode accepts the following additional options:
6604 -dlopen FILE add the directory containing FILE to the library path
6606 This mode sets the library path environment variable according to \`-dlopen'
6609 If any of the ARGS are libtool executable wrappers, then they are translated
6610 into their corresponding uninstalled binary, and any of their required library
6611 directories are added to the library path.
6613 Then, COMMAND is executed, with ARGS as arguments."
6618 "Usage: $modename [OPTION]... --mode=finish [LIBDIR]...
6620 Complete the installation of libtool libraries.
6622 Each LIBDIR is a directory that contains libtool libraries.
6624 The commands that this mode executes may require superuser privileges. Use
6625 the \`--dry-run' option if you just want to see what would be executed."
6630 "Usage: $modename [OPTION]... --mode=install INSTALL-COMMAND...
6632 Install executables or libraries.
6634 INSTALL-COMMAND is the installation command. The first component should be
6635 either the \`install' or \`cp' program.
6637 The rest of the components are interpreted as arguments to that command (only
6638 BSD-compatible install options are recognized)."
6643 "Usage: $modename [OPTION]... --mode=link LINK-COMMAND...
6645 Link object files or libraries together to form another library, or to
6646 create an executable program.
6648 LINK-COMMAND is a command using the C compiler that you would use to create
6649 a program from several object files.
6651 The following components of LINK-COMMAND are treated specially:
6653 -all-static do not do any dynamic linking at all
6654 -avoid-version do not add a version suffix if possible
6655 -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime
6656 -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols
6657 -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
6658 -export-symbols SYMFILE
6659 try to export only the symbols listed in SYMFILE
6660 -export-symbols-regex REGEX
6661 try to export only the symbols matching REGEX
6662 -LLIBDIR search LIBDIR for required installed libraries
6663 -lNAME OUTPUT-FILE requires the installed library libNAME
6664 -module build a library that can dlopened
6665 -no-fast-install disable the fast-install mode
6666 -no-install link a not-installable executable
6667 -no-undefined declare that a library does not refer to external symbols
6668 -o OUTPUT-FILE create OUTPUT-FILE from the specified objects
6669 -objectlist FILE Use a list of object files found in FILE to specify objects
6670 -precious-files-regex REGEX
6671 don't remove output files matching REGEX
6672 -release RELEASE specify package release information
6673 -rpath LIBDIR the created library will eventually be installed in LIBDIR
6674 -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries
6675 -static do not do any dynamic linking of libtool libraries
6676 -version-info CURRENT[:REVISION[:AGE]]
6677 specify library version info [each variable defaults to 0]
6679 All other options (arguments beginning with \`-') are ignored.
6681 Every other argument is treated as a filename. Files ending in \`.la' are
6682 treated as uninstalled libtool libraries, other files are standard or library
6685 If the OUTPUT-FILE ends in \`.la', then a libtool library is created,
6686 only library objects (\`.lo' files) may be specified, and \`-rpath' is
6687 required, except when creating a convenience library.
6689 If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created
6690 using \`ar' and \`ranlib', or on Windows using \`lib'.
6692 If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file
6693 is created, otherwise an executable program is created."
6698 "Usage: $modename [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE...
6700 Remove libraries from an installation directory.
6702 RM is the name of the program to use to delete files associated with each FILE
6703 (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed
6706 If FILE is a libtool library, all the files associated with it are deleted.
6707 Otherwise, only FILE itself is deleted using RM."
6711 $echo "$modename: invalid operation mode \`$mode'" 1>&2
6718 $echo "Try \`$modename --help' for more information about other modes."
6722 # The TAGs below are defined such that we never get into a situation
6723 # in which we disable both kinds of libraries. Given conflicting
6724 # choices, we go for a static library, that is the most portable,
6725 # since we can't tell whether shared libraries were disabled because
6726 # the user asked for that or because the platform doesn't support
6727 # them. This is particularly important on AIX, because we don't
6728 # support having both static and shared libraries enabled at the same
6729 # time on that platform, so we default to a shared-only configuration.
6730 # If a disable-shared tag is given, we'll fallback to a static-only
6731 # configuration. But we'll never go from static-only to shared-only.
6733 # ### BEGIN LIBTOOL TAG CONFIG: disable-shared
6734 build_libtool_libs
=no
6736 # ### END LIBTOOL TAG CONFIG: disable-shared
6738 # ### BEGIN LIBTOOL TAG CONFIG: disable-static
6739 build_old_libs
=`case $build_libtool_libs in yes) $echo no;; *) $echo yes;; esac`
6740 # ### END LIBTOOL TAG CONFIG: disable-static
6746 # ### BEGIN LIBTOOL TAG CONFIG: CXX
6748 # Libtool was configured on host nik.neuroponic.com:
6750 # Shell to use when invoking shell scripts.
6753 # Whether or not to build shared libraries.
6754 build_libtool_libs
=yes
6756 # Whether or not to build static libraries.
6759 # Whether or not to add -lc for building shared libraries.
6760 build_libtool_need_lc
=no
6762 # Whether or not to disallow shared libs when runtime libs are static
6763 allow_libtool_libs_with_static_runtimes
=no
6765 # Whether or not to optimize for fast installation.
6770 host=i686-pc-linux-gnu
6772 # An echo program that does not interpret backslashes.
6782 # A language-specific compiler.
6785 # Is the compiler the GNU C compiler?
6791 # The linker used to build libraries.
6792 LD
="/usr/i486-slackware-linux/bin/ld"
6794 # Whether we need hard or soft links.
6797 # A BSD-compatible nm program.
6800 # A symbol stripping program
6803 # Used to examine libraries when file_magic_cmd begins "file"
6806 # Used on cygwin: DLL creation program.
6809 # Used on cygwin: object dumper.
6812 # Used on cygwin: assembler.
6815 # The name of the directory that contains temporary libtool files.
6818 # How to create reloadable object files.
6820 reload_cmds
="\$LD\$reload_flag -o \$output\$reload_objs"
6822 # How to pass a linker flag through the compiler.
6825 # Object file suffix (normally "o").
6828 # Old archive suffix (normally "a").
6831 # Shared library suffix (normally ".so").
6834 # Executable file suffix (normally "").
6837 # Additional compiler flags for building library objects.
6838 pic_flag
=" -fPIC -DPIC"
6841 # What is the maximum length of a command?
6844 # Does compiler simultaneously support -c and -o options?
6847 # Must we lock files when doing compilation ?
6850 # Do we need the lib prefix for modules?
6853 # Do we need a version for libraries?
6856 # Whether dlopen is supported.
6857 dlopen_support
=unknown
6859 # Whether dlopen of programs is supported.
6862 # Whether dlopen of statically linked programs is supported.
6863 dlopen_self_static
=unknown
6865 # Compiler flag to prevent dynamic linking.
6866 link_static_flag
="-static"
6868 # Compiler flag to turn off builtin functions.
6869 no_builtin_flag
=" -fno-builtin"
6871 # Compiler flag to allow reflexive dlopens.
6872 export_dynamic_flag_spec
="\${wl}--export-dynamic"
6874 # Compiler flag to generate shared objects directly from archives.
6875 whole_archive_flag_spec
="\${wl}--whole-archive\$convenience \${wl}--no-whole-archive"
6877 # Compiler flag to generate thread-safe objects.
6878 thread_safe_flag_spec
=""
6880 # Library versioning type.
6883 # Format of library name prefix.
6884 libname_spec
="lib\$name"
6886 # List of archive names. First name is the real one, the rest are links.
6887 # The last name is the one that the linker finds with -lNAME.
6888 library_names_spec
="\${libname}\${release}\${shared_ext}\$versuffix \${libname}\${release}\${shared_ext}\$major \$libname\${shared_ext}"
6890 # The coded name of the library, if different from the real name.
6891 soname_spec
="\${libname}\${release}\${shared_ext}\$major"
6893 # Commands used to build and install an old-style archive.
6895 old_archive_cmds
="\$AR \$AR_FLAGS \$oldlib\$oldobjs\$old_deplibs~\$RANLIB \$oldlib"
6896 old_postinstall_cmds
="\$RANLIB \$oldlib~chmod 644 \$oldlib"
6897 old_postuninstall_cmds
=""
6899 # Create an old-style archive from a shared archive.
6900 old_archive_from_new_cmds
=""
6902 # Create a temporary old-style archive to link instead of a shared archive.
6903 old_archive_from_expsyms_cmds
=""
6905 # Commands used to build and install a shared archive.
6906 archive_cmds
="\$CC -shared -nostdlib \$predep_objects \$libobjs \$deplibs \$postdep_objects \$compiler_flags \${wl}-soname \$wl\$soname -o \$lib"
6907 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"
6909 postuninstall_cmds
=""
6911 # Commands used to build a loadable module (assumed same as above if empty)
6913 module_expsym_cmds
=""
6915 # Commands to strip libraries.
6916 old_striplib
="strip --strip-debug"
6917 striplib
="strip --strip-unneeded"
6919 # Dependencies to place before the objects being linked to create a
6921 predep_objects
="/usr/lib/gcc-lib/i486-slackware-linux/3.3.4/../../../crti.o /usr/lib/gcc-lib/i486-slackware-linux/3.3.4/crtbeginS.o"
6923 # Dependencies to place after the objects being linked to create a
6925 postdep_objects
="/usr/lib/gcc-lib/i486-slackware-linux/3.3.4/crtendS.o /usr/lib/gcc-lib/i486-slackware-linux/3.3.4/../../../crtn.o"
6927 # Dependencies to place before the objects being linked to create a
6931 # Dependencies to place after the objects being linked to create a
6933 postdeps
="-lstdc++ -lm -lgcc_s -lc -lgcc_s"
6935 # The library search path used internally by the compiler when linking
6937 compiler_lib_search_path
="-L/usr/lib/gcc-lib/i486-slackware-linux/3.3.4 -L/usr/lib/gcc/i486-slackware-linux/3.3.4 -L/usr/lib/gcc-lib/i486-slackware-linux/3.3.4/../../../../i486-slackware-linux/lib -L/usr/lib/gcc-lib/i486-slackware-linux/3.3.4/../../.."
6939 # Method to check whether dependent libraries are shared objects.
6940 deplibs_check_method
="pass_all"
6942 # Command to use when deplibs_check_method == file_magic.
6943 file_magic_cmd
="\$MAGIC_CMD"
6945 # Flag that allows shared libraries with undefined symbols to be built.
6946 allow_undefined_flag
=""
6948 # Flag that forces no undefined symbols.
6949 no_undefined_flag
=""
6951 # Commands used to finish a libtool library installation in a directory.
6952 finish_cmds
="PATH=\\\"\\\$PATH:/sbin\\\" ldconfig -n \$libdir"
6954 # Same as above, but a single script fragment to be evaled but not shown.
6957 # Take the output of nm and produce a listing of raw symbols and C names.
6958 global_symbol_pipe
="sed -n -e 's/^.*[ ]\\([ABCDGIRSTW][ABCDGIRSTW]*\\)[ ][ ]*\\(\\)\\([_A-Za-z][_A-Za-z0-9]*\\)\$/\\1 \\2\\3 \\3/p'"
6960 # Transform the output of nm in a proper C declaration
6961 global_symbol_to_cdecl
="sed -n -e 's/^. .* \\(.*\\)\$/extern int \\1;/p'"
6963 # Transform the output of nm in a C name address pair
6964 global_symbol_to_c_name_address
="sed -n -e 's/^: \\([^ ]*\\) \$/ {\\\"\\1\\\", (lt_ptr) 0},/p' -e 's/^[BCDEGRST] \\([^ ]*\\) \\([^ ]*\\)\$/ {\"\\2\", (lt_ptr) \\&\\2},/p'"
6966 # This is the shared library runtime path variable.
6967 runpath_var
=LD_RUN_PATH
6969 # This is the shared library path variable.
6970 shlibpath_var
=LD_LIBRARY_PATH
6972 # Is shlibpath searched before the hard-coded library search path?
6973 shlibpath_overrides_runpath
=no
6975 # How to hardcode a shared library path into an executable.
6976 hardcode_action
=immediate
6978 # Whether we should hardcode library paths into libraries.
6979 hardcode_into_libs
=yes
6981 # Flag to hardcode $libdir into a binary during linking.
6982 # This must work even if $libdir does not exist.
6983 hardcode_libdir_flag_spec
="\${wl}--rpath \${wl}\$libdir"
6985 # If ld is used when linking, flag to hardcode $libdir into
6986 # a binary during linking. This must work even if $libdir does
6988 hardcode_libdir_flag_spec_ld
=""
6990 # Whether we need a single -rpath flag with a separated argument.
6991 hardcode_libdir_separator
=""
6993 # Set to yes if using DIR/libNAME during linking hardcodes DIR into the
6997 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
7001 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
7002 # the resulting binary.
7003 hardcode_shlibpath_var
=
7005 # Set to yes if building a shared library automatically hardcodes DIR into the library
7006 # and all subsequent libraries and executables linked against it.
7007 hardcode_automatic
=no
7009 # Variables whose values should be saved in libtool wrapper scripts and
7010 # restored at relink time.
7011 variables_saved_for_relink
="PATH LD_LIBRARY_PATH LD_RUN_PATH GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
7013 # Whether libtool must link a program against all its dependency libraries.
7014 link_all_deplibs
=unknown
7016 # Compile-time system search path for libraries
7017 sys_lib_search_path_spec
=" /usr/lib/gcc-lib/i486-slackware-linux/3.3.4/ /usr/lib/gcc/i486-slackware-linux/3.3.4/ /usr/lib/gcc-lib/i486-slackware-linux/3.3.4/../../../../i486-slackware-linux/lib/i486-slackware-linux/3.3.4/ /usr/lib/gcc-lib/i486-slackware-linux/3.3.4/../../../../i486-slackware-linux/lib/ /usr/lib/gcc-lib/i486-slackware-linux/3.3.4/../../../i486-slackware-linux/3.3.4/ /usr/lib/gcc-lib/i486-slackware-linux/3.3.4/../../../ /lib/i486-slackware-linux/3.3.4/ /lib/ /usr/lib/i486-slackware-linux/3.3.4/ /usr/lib/"
7019 # Run-time system search path for libraries
7020 sys_lib_dlsearch_path_spec
="/lib /usr/lib /usr/local/lib /usr/lib /usr/X11R6/lib "
7022 # Fix the shell variable $srcfile for the compiler.
7025 # Set to yes if exported symbols are required.
7026 always_export_symbols
=no
7028 # The commands to list exported symbols.
7029 export_symbols_cmds
="\$NM \$libobjs \$convenience | \$global_symbol_pipe | \$SED 's/.* //' | sort | uniq > \$export_symbols"
7031 # The commands to extract the exported symbol list from a shared archive.
7032 extract_expsyms_cmds
=""
7034 # Symbols that should not be listed in the preloaded symbols.
7037 # Symbols that must always be exported.
7040 # ### END LIBTOOL TAG CONFIG: CXX