3 # libtoolT - Provide generalized library-building support services.
4 # Generated automatically by (GNU flac 1.2.1)
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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
27 # As a special exception to the GNU General Public License, if you
28 # distribute this file as part of a program that contains a
29 # configuration script generated by Autoconf, you may include it under
30 # the same distribution terms that you use for the rest of that program.
32 # A sed program that does not truncate output.
35 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
36 Xsed
="/bin/sed -e 1s/^X//"
38 # The HP-UX ksh and POSIX shell print the target directory to stdout
40 (unset CDPATH
) >/dev
/null
2>&1 && unset CDPATH
42 # The names of the tagged configurations supported by this script.
45 # ### BEGIN LIBTOOL CONFIG
47 # Libtool was configured on host vicente-P5K-E:
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.
68 host_alias
=mipsel-linux
69 host=mipsel-unknown-linux-gnu
73 build_alias
=x86_64-linux-gnu
74 build
=x86_64-pc-linux-gnu
77 # An echo program that does not interpret backslashes.
85 LTCC
="mipsel-uclibc-gcc"
87 # A language-specific compiler.
88 CC
="mipsel-uclibc-gcc"
90 # Is the compiler the GNU C compiler?
96 # The linker used to build libraries.
99 # Whether we need hard or soft links.
102 # A BSD-compatible nm program.
103 NM
="mipsel-uclibc-nm"
105 # A symbol stripping program
106 STRIP
="mipsel-uclibc-strip -R .note -R .comment"
108 # Used to examine libraries when file_magic_cmd begins "file"
111 # Used on cygwin: DLL creation program.
114 # Used on cygwin: object dumper.
117 # Used on cygwin: assembler.
118 AS
="mipsel-uclibc-as"
120 # The name of the directory that contains temporary libtool files.
123 # How to create reloadable object files.
125 reload_cmds
="\$LD\$reload_flag -o \$output\$reload_objs"
127 # How to pass a linker flag through the compiler.
130 # Object file suffix (normally "o").
133 # Old archive suffix (normally "a").
136 # Shared library suffix (normally ".so").
139 # Executable file suffix (normally "").
142 # Additional compiler flags for building library objects.
143 pic_flag
=" -fPIC -DPIC"
146 # What is the maximum length of a command?
149 # Does compiler simultaneously support -c and -o options?
152 # Must we lock files when doing compilation?
155 # Do we need the lib prefix for modules?
158 # Do we need a version for libraries?
161 # Whether dlopen is supported.
162 dlopen_support
=unknown
164 # Whether dlopen of programs is supported.
167 # Whether dlopen of statically linked programs is supported.
168 dlopen_self_static
=unknown
170 # Compiler flag to prevent dynamic linking.
171 link_static_flag
="-static"
173 # Compiler flag to turn off builtin functions.
174 no_builtin_flag
=" -fno-builtin"
176 # Compiler flag to allow reflexive dlopens.
177 export_dynamic_flag_spec
="\${wl}--export-dynamic"
179 # Compiler flag to generate shared objects directly from archives.
180 whole_archive_flag_spec
="\${wl}--whole-archive\$convenience \${wl}--no-whole-archive"
182 # Compiler flag to generate thread-safe objects.
183 thread_safe_flag_spec
=""
185 # Library versioning type.
188 # Format of library name prefix.
189 libname_spec
="lib\$name"
191 # List of archive names. First name is the real one, the rest are links.
192 # The last name is the one that the linker finds with -lNAME.
193 library_names_spec
="\${libname}\${release}\${shared_ext}\$versuffix \${libname}\${release}\${shared_ext}\$major \$libname\${shared_ext}"
195 # The coded name of the library, if different from the real name.
196 soname_spec
="\${libname}\${release}\${shared_ext}\$major"
198 # Commands used to build and install an old-style archive.
199 RANLIB
="mipsel-uclibc-ranlib"
200 old_archive_cmds
="\$AR \$AR_FLAGS \$oldlib\$oldobjs\$old_deplibs~\$RANLIB \$oldlib"
201 old_postinstall_cmds
="\$RANLIB \$oldlib~chmod 644 \$oldlib"
202 old_postuninstall_cmds
=""
204 # Create an old-style archive from a shared archive.
205 old_archive_from_new_cmds
=""
207 # Create a temporary old-style archive to link instead of a shared archive.
208 old_archive_from_expsyms_cmds
=""
210 # Commands used to build and install a shared archive.
211 archive_cmds
="\$CC -shared \$libobjs \$deplibs \$compiler_flags \${wl}-soname \$wl\$soname -o \$lib"
212 archive_expsym_cmds
="\$echo \\\"{ global:\\\" > \$output_objdir/\$libname.ver~
213 cat \$export_symbols | sed -e \\\"s/\\\\(.*\\\\)/\\\\1;/\\\" >> \$output_objdir/\$libname.ver~
214 \$echo \\\"local: *; };\\\" >> \$output_objdir/\$libname.ver~
215 \$CC -shared \$libobjs \$deplibs \$compiler_flags \${wl}-soname \$wl\$soname \${wl}-version-script \${wl}\$output_objdir/\$libname.ver -o \$lib"
217 postuninstall_cmds
=""
219 # Commands used to build a loadable module (assumed same as above if empty)
221 module_expsym_cmds
=""
223 # Commands to strip libraries.
224 old_striplib
="mipsel-uclibc-strip -R .note -R .comment --strip-debug"
225 striplib
="mipsel-uclibc-strip -R .note -R .comment --strip-unneeded"
227 # Dependencies to place before the objects being linked to create a
231 # Dependencies to place after the objects being linked to create a
235 # Dependencies to place before the objects being linked to create a
239 # Dependencies to place after the objects being linked to create a
243 # The library search path used internally by the compiler when linking
245 compiler_lib_search_path
=""
247 # Method to check whether dependent libraries are shared objects.
248 deplibs_check_method
="pass_all"
250 # Command to use when deplibs_check_method == file_magic.
251 file_magic_cmd
="\$MAGIC_CMD"
253 # Flag that allows shared libraries with undefined symbols to be built.
254 allow_undefined_flag
=""
256 # Flag that forces no undefined symbols.
259 # Commands used to finish a libtool library installation in a directory.
260 finish_cmds
="PATH=\\\"\\\$PATH:/sbin\\\" ldconfig -n \$libdir"
262 # Same as above, but a single script fragment to be evaled but not shown.
265 # Take the output of nm and produce a listing of raw symbols and C names.
266 global_symbol_pipe
="sed -n -e 's/^.*[ ]\\([ABCDGIRSTW][ABCDGIRSTW]*\\)[ ][ ]*\\([_A-Za-z][_A-Za-z0-9]*\\)\$/\\1 \\2 \\2/p'"
268 # Transform the output of nm in a proper C declaration
269 global_symbol_to_cdecl
="sed -n -e 's/^. .* \\(.*\\)\$/extern int \\1;/p'"
271 # Transform the output of nm in a C name address pair
272 global_symbol_to_c_name_address
="sed -n -e 's/^: \\([^ ]*\\) \$/ {\\\"\\1\\\", (lt_ptr) 0},/p' -e 's/^[BCDEGRST] \\([^ ]*\\) \\([^ ]*\\)\$/ {\"\\2\", (lt_ptr) \\&\\2},/p'"
274 # This is the shared library runtime path variable.
275 runpath_var
=LD_RUN_PATH
277 # This is the shared library path variable.
278 shlibpath_var
=LD_LIBRARY_PATH
280 # Is shlibpath searched before the hard-coded library search path?
281 shlibpath_overrides_runpath
=no
283 # How to hardcode a shared library path into an executable.
284 hardcode_action
=immediate
286 # Whether we should hardcode library paths into libraries.
287 hardcode_into_libs
=yes
289 # Flag to hardcode $libdir into a binary during linking.
290 # This must work even if $libdir does not exist.
291 hardcode_libdir_flag_spec
="\${wl}--rpath \${wl}\$libdir"
293 # If ld is used when linking, flag to hardcode $libdir into
294 # a binary during linking. This must work even if $libdir does
296 hardcode_libdir_flag_spec_ld
=""
298 # Whether we need a single -rpath flag with a separated argument.
299 hardcode_libdir_separator
=""
301 # Set to yes if using DIR/libNAME during linking hardcodes DIR into the
305 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
309 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
310 # the resulting binary.
311 hardcode_shlibpath_var
=unsupported
313 # Set to yes if building a shared library automatically hardcodes DIR into the library
314 # and all subsequent libraries and executables linked against it.
315 hardcode_automatic
=no
317 # Variables whose values should be saved in libtool wrapper scripts and
318 # restored at relink time.
319 variables_saved_for_relink
="PATH LD_RUN_PATH GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
321 # Whether libtool must link a program against all its dependency libraries.
322 link_all_deplibs
=unknown
324 # Compile-time system search path for libraries
325 sys_lib_search_path_spec
=" /home/vicente/tomato/tools/brcm/K26/hndtools-mipsel-uclibc-4.2.4/bin/../lib/gcc/mipsel-linux-uclibc/4.2.4/ /home/vicente/tomato/tools/brcm/K26/hndtools-mipsel-uclibc-4.2.4/bin/../lib/gcc/ /opt/brcm/hndtools-mipsel-uclibc-4.2.4/lib/gcc/mipsel-linux-uclibc/4.2.4/ /usr/lib/gcc/mipsel-linux-uclibc/4.2.4/ /home/vicente/tomato/tools/brcm/K26/hndtools-mipsel-uclibc-4.2.4/bin/../lib/gcc/mipsel-linux-uclibc/4.2.4/../../../../mipsel-linux-uclibc/lib/mipsel-linux-uclibc/4.2.4/ /home/vicente/tomato/tools/brcm/K26/hndtools-mipsel-uclibc-4.2.4/bin/../lib/gcc/mipsel-linux-uclibc/4.2.4/../../../../mipsel-linux-uclibc/lib/ /opt/brcm/hndtools-mipsel-uclibc-4.2.4/mipsel-linux-uclibc/lib/mipsel-linux-uclibc/4.2.4/ /opt/brcm/hndtools-mipsel-uclibc-4.2.4/mipsel-linux-uclibc/lib/"
327 # Run-time system search path for libraries
328 sys_lib_dlsearch_path_spec
="/lib /usr/lib /lib/i386-linux-gnu /usr/lib/i386-linux-gnu /lib/i686-linux-gnu /usr/lib/i686-linux-gnu /usr/local/lib /usr/lib/nvidia-settings /lib/x86_64-linux-gnu /usr/lib/x86_64-linux-gnu /usr/lib/nvidia-current /usr/lib32/nvidia-current /lib32 /usr/lib32 "
330 # Fix the shell variable $srcfile for the compiler.
333 # Set to yes if exported symbols are required.
334 always_export_symbols
=no
336 # The commands to list exported symbols.
337 export_symbols_cmds
="\$NM \$libobjs \$convenience | \$global_symbol_pipe | \$SED 's/.* //' | sort | uniq > \$export_symbols"
339 # The commands to extract the exported symbol list from a shared archive.
340 extract_expsyms_cmds
=""
342 # Symbols that should not be listed in the preloaded symbols.
343 exclude_expsyms
="_GLOBAL_OFFSET_TABLE_"
345 # Symbols that must always be exported.
348 # ### END LIBTOOL CONFIG
350 # ltmain.sh - Provide generalized library-building support services.
351 # NOTE: Changing this file will not affect anything until you rerun configure.
353 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005
354 # Free Software Foundation, Inc.
355 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
357 # This program is free software; you can redistribute it and/or modify
358 # it under the terms of the GNU General Public License as published by
359 # the Free Software Foundation; either version 2 of the License, or
360 # (at your option) any later version.
362 # This program is distributed in the hope that it will be useful, but
363 # WITHOUT ANY WARRANTY; without even the implied warranty of
364 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
365 # General Public License for more details.
367 # You should have received a copy of the GNU General Public License
368 # along with this program; if not, write to the Free Software
369 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
371 # As a special exception to the GNU General Public License, if you
372 # distribute this file as part of a program that contains a
373 # configuration script generated by Autoconf, you may include it under
374 # the same distribution terms that you use for the rest of that program.
378 # Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
379 # is ksh but when the shell is invoked as "sh" and the current value of
380 # the _XPG environment variable is not equal to 1 (one), the special
381 # positional parameter $0, within a function call, is the name of the
385 # The name of this program:
386 progname
=`echo "$progpath" | $SED $basename`
396 TIMESTAMP
=" (1.1220.2.235 2005/04/25 18:13:26)"
398 # See if we are running on zsh, and set the options which allow our
399 # commands through without removal of \ escapes.
400 if test -n "${ZSH_VERSION+set}" ; then
404 # Check that we have a working $echo.
405 if test "X$1" = X--no-reexec
; then
406 # Discard the --no-reexec flag, and continue.
408 elif test "X$1" = X--fallback-echo
; then
409 # Avoid inline document here, it may be left over
411 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
412 # Yippee, $echo works!
415 # Restart under the correct shell, and then maybe $echo will work.
416 exec $SHELL "$progpath" --no-reexec ${1+"$@"}
419 if test "X$1" = X--fallback-echo
; then
420 # used as fallback echo
429 help="Try \`$progname --help' for more information."
430 magic
="%%%MAGIC variable%%%"
435 # Sed substitution that helps us do robust quoting. It backslashifies
436 # metacharacters that are still active within double-quoted strings.
437 Xsed
="${SED}"' -e 1s/^X//'
438 sed_quote_subst
='s/\([\\`\\"$\\\\]\)/\\\1/g'
439 # test EBCDIC or ASCII
440 case `echo A|tr A '\301'` in
441 A
) # EBCDIC based system
442 SP2NL
="tr '\100' '\n'"
443 NL2SP
="tr '\r\n' '\100\100'"
445 *) # Assume ASCII based system
446 SP2NL
="tr '\040' '\012'"
447 NL2SP
="tr '\015\012' '\040\040'"
452 # Only set LANG and LC_ALL to C if already set.
453 # These must not be set unconditionally because not all systems understand
454 # e.g. LANG=C (notably SCO).
455 # We save the old values to restore during execute mode.
456 if test "${LC_ALL+set}" = set; then
457 save_LC_ALL
="$LC_ALL"; LC_ALL
=C
; export LC_ALL
459 if test "${LANG+set}" = set; then
460 save_LANG
="$LANG"; LANG
=C
; export LANG
463 # Make sure IFS has a sensible default
468 if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
469 $echo "$modename: not configured to build any kind of library" 1>&2
470 $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
483 lo2o
="s/\\.lo\$/.${objext}/"
484 o2lo
="s/\\.${objext}\$/.lo/"
485 quote_scanset
='[[~#^*{};<>?'"'"' ]'
487 #####################################
488 # Shell function definitions:
489 # This seems to be the best place for them
491 # func_win32_libid arg
492 # return the library type of file 'arg'
494 # Need a lot of goo to handle *both* DLLs and import libs
495 # Has to be a shell function in order to 'eat' the argument
496 # that is supplied when $file_magic_command is called.
499 win32_libid_type
="unknown"
500 win32_fileres
=`file -L $1 2>/dev/null`
501 case $win32_fileres in
502 *ar\ archive\ import\ library
*) # definitely import
503 win32_libid_type
="x86 archive import"
505 *ar\ archive
*) # could be an import, or static
506 if eval $OBJDUMP -f $1 |
$SED -e '10q' 2>/dev
/null | \
507 $EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev
/null
; then
508 win32_nmres
=`eval $NM -f posix -A $1 | \
509 sed -n -e '1,100{/ I /{x;/import/!{s/^/import/;h;p;};x;};}'`
510 if test "X$win32_nmres" = "Ximport" ; then
511 win32_libid_type
="x86 archive import"
513 win32_libid_type
="x86 archive static"
518 win32_libid_type
="x86 DLL"
520 *executable
*) # but shell scripts are "executable" too...
521 case $win32_fileres in
522 *MS\ Windows\ PE\ Intel
*)
523 win32_libid_type
="x86 DLL"
528 $echo $win32_libid_type
533 # Infer tagged configuration to use if any are available and
534 # if one wasn't chosen via the "--tag" command line option.
535 # Only attempt this if the compiler in the base compile
536 # command doesn't match the default compiler.
537 # arg is usually of the form 'gcc ...'
540 if test -n "$available_tags" && test -z "$tagname"; then
544 *$quote_scanset* |
*]* |
*\|
* |
*\
&* |
*\
(* |
*\
)* |
"")
548 CC_quoted
="$CC_quoted $arg"
551 # Blanks in the command may have been stripped by the calling shell,
552 # but not from the CC environment variable when configure was run.
553 " $CC "* |
"$CC "* |
" `$echo $CC` "* |
"`$echo $CC` "* |
" $CC_quoted"* |
"$CC_quoted "* |
" `$echo $CC_quoted` "* |
"`$echo $CC_quoted` "*) ;;
554 # Blanks at the start of $base_compile will cause this to fail
555 # if we don't check for them as well.
557 for z
in $available_tags; do
558 if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev
/null
; then
559 # Evaluate the configuration.
560 eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`"
563 # Double-quote args containing other shell metacharacters.
565 *$quote_scanset* |
*]* |
*\|
* |
*\
&* |
*\
(* |
*\
)* |
"")
569 CC_quoted
="$CC_quoted $arg"
572 " $CC "* |
"$CC "* |
" `$echo $CC` "* |
"`$echo $CC` "* |
" $CC_quoted"* |
"$CC_quoted "* |
" `$echo $CC_quoted` "* |
"`$echo $CC_quoted` "*)
573 # The compiler in the base compile command matches
574 # the one in the tagged configuration.
575 # Assume this is the tagged configuration we want.
582 # If $tagname still isn't set, then no tagged configuration
583 # was found and let the user know that the "--tag" command
584 # line option must be used.
585 if test -z "$tagname"; then
586 $echo "$modename: unable to infer tagged configuration"
587 $echo "$modename: specify a tag with \`--tag'" 1>&2
590 # $echo "$modename: using $tagname tagged configuration"
598 # func_extract_an_archive dir oldlib
599 func_extract_an_archive
()
601 f_ex_an_ar_dir
="$1"; shift
602 f_ex_an_ar_oldlib
="$1"
604 $show "(cd $f_ex_an_ar_dir && $AR x $f_ex_an_ar_oldlib)"
605 $run eval "(cd \$f_ex_an_ar_dir && $AR x \$f_ex_an_ar_oldlib)" ||
exit $?
606 if ($AR t
"$f_ex_an_ar_oldlib" |
sort |
sort -uc >/dev
/null
2>&1); then
609 $echo "$modename: ERROR: object name conflicts: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" 1>&2
614 # func_extract_archives gentop oldlib ...
615 func_extract_archives
()
617 my_gentop
="$1"; shift
625 $show "${rm}r $my_gentop"
626 $run ${rm}r
"$my_gentop"
627 $show "$mkdir $my_gentop"
628 $run $mkdir "$my_gentop"
630 if test "$my_status" -ne 0 && test ! -d "$my_gentop"; then
634 for my_xlib
in $my_oldlibs; do
635 # Extract the objects.
637 [\\/]* |
[A-Za-z
]:[\\/]*) my_xabs
="$my_xlib" ;;
638 *) my_xabs
=`pwd`"/$my_xlib" ;;
640 my_xlib
=`$echo "X$my_xlib" | $Xsed -e 's%^.*/%%'`
641 my_xdir
="$my_gentop/$my_xlib"
643 $show "${rm}r $my_xdir"
644 $run ${rm}r
"$my_xdir"
645 $show "$mkdir $my_xdir"
646 $run $mkdir "$my_xdir"
648 if test "$status" -ne 0 && test ! -d "$my_xdir"; then
653 $show "Extracting $my_xabs"
654 # Do not bother doing anything if just a dry run
655 if test -z "$run"; then
656 darwin_orig_dir
=`pwd`
657 cd $my_xdir ||
exit $?
658 darwin_archive
=$my_xabs
660 darwin_base_archive
=`$echo "X$darwin_archive" | $Xsed -e 's%^.*/%%'`
661 darwin_arches
=`lipo -info "$darwin_archive" 2>/dev/null | $EGREP Architectures 2>/dev/null`
662 if test -n "$darwin_arches"; then
663 darwin_arches
=`echo "$darwin_arches" | $SED -e 's/.*are://'`
665 $show "$darwin_base_archive has multiple architectures $darwin_arches"
666 for darwin_arch
in $darwin_arches ; do
667 mkdir
-p "unfat-$$/${darwin_base_archive}-${darwin_arch}"
668 lipo
-thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}"
669 cd "unfat-$$/${darwin_base_archive}-${darwin_arch}"
670 func_extract_an_archive
"`pwd`" "${darwin_base_archive}"
672 $rm "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}"
673 done # $darwin_arches
674 ## Okay now we have a bunch of thin objects, gotta fatten them up :)
675 darwin_filelist
=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print| xargs basename | sort -u | $NL2SP`
678 for darwin_file
in $darwin_filelist; do
679 darwin_files
=`find unfat-$$ -name $darwin_file -print | $NL2SP`
680 lipo
-create -output "$darwin_file" $darwin_files
681 done # $darwin_filelist
683 cd "$darwin_orig_dir"
685 cd "$darwin_orig_dir"
686 func_extract_an_archive
"$my_xdir" "$my_xabs"
691 func_extract_an_archive
"$my_xdir" "$my_xabs"
694 my_oldobjs
="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
696 func_extract_archives_result
="$my_oldobjs"
698 # End of Shell function definitions
699 #####################################
702 eval std_shrext
=\"$shrext_cmds\"
704 # Parse our command line options once, thoroughly.
705 while test "$#" -gt 0
711 -*=*) optarg
=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;;
715 # If the previous option needs an argument, assign it.
716 if test -n "$prev"; then
719 execute_dlfiles
="$execute_dlfiles $arg"
723 preserve_args
="${preserve_args}=$arg"
725 # Check whether tagname contains only valid characters
728 $echo "$progname: invalid tag name: $tagname" 1>&2
735 # Don't test for the "default" C tag, as we know, it's there, but
736 # not specially marked.
739 if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$progpath" > /dev
/null
; then
740 taglist
="$taglist $tagname"
741 # Evaluate the configuration.
742 eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^# ### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $progpath`"
744 $echo "$progname: ignoring unknown tag $tagname" 1>&2
759 # Have we seen a non-optional argument yet?
766 $echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP"
768 $echo "Copyright (C) 2005 Free Software Foundation, Inc."
769 $echo "This is free software; see the source for copying conditions. There is NO"
770 $echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
775 ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $progpath
776 # Now print the configurations for the tags.
777 for tagname
in $taglist; do
778 ${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$progpath"
784 $echo "$progname: enabling shell trace mode"
786 preserve_args
="$preserve_args $arg"
795 if test "$build_libtool_libs" = yes; then
796 $echo "enable shared libraries"
798 $echo "disable shared libraries"
800 if test "$build_old_libs" = yes; then
801 $echo "enable static libraries"
803 $echo "disable static libraries"
808 --finish) mode
="finish" ;;
810 --mode) prevopt
="--mode" prev
=mode
;;
811 --mode=*) mode
="$optarg" ;;
813 --preserve-dup-deps) duplicate_deps
="yes" ;;
817 preserve_args
="$preserve_args $arg"
820 --tag) prevopt
="--tag" prev
=tag
;;
822 set tag
"$optarg" ${1+"$@"}
825 preserve_args
="$preserve_args --tag"
834 $echo "$modename: unrecognized option \`$arg'" 1>&2
846 if test -n "$prevopt"; then
847 $echo "$modename: option \`$prevopt' requires an argument" 1>&2
852 # If this variable is set in any of the actions, the command in it
853 # will be execed at the end. This prevents here-documents from being
854 # left over by shells.
857 if test -z "$show_help"; then
859 # Infer the operation mode.
860 if test -z "$mode"; then
861 $echo "*** Warning: inferring the mode of operation is deprecated." 1>&2
862 $echo "*** Future versions of Libtool will require --mode=MODE be specified." 1>&2
864 *cc | cc
* |
*++ | gcc
* |
*-gcc* | g
++* | xlc
*)
876 *db |
*dbx |
*strace |
*truss
)
886 # If we have no mode, but dlfiles were specified, then do execute mode.
887 test -n "$execute_dlfiles" && mode
=execute
889 # Just use the default operation mode.
890 if test -z "$mode"; then
891 if test -n "$nonopt"; then
892 $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2
894 $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2
901 # Only execute mode is allowed to have -dlopen flags.
902 if test -n "$execute_dlfiles" && test "$mode" != execute
; then
903 $echo "$modename: unrecognized option \`-dlopen'" 1>&2
908 # Change the help message to a mode-specific one.
910 help="Try \`$modename --help --mode=$mode' for more information."
912 # These modes are in order of execution frequency so that they run quickly.
914 # libtool compile mode
916 modename
="$modename: compile"
917 # Get the compilation command and the source file.
919 srcfile
="$nonopt" # always keep a non-empty value in "srcfile"
930 # do not "continue". Instead, add this to base_compile
942 # Accept any command-line options.
945 if test -n "$libobj" ; then
946 $echo "$modename: you cannot specify \`-o' more than once" 1>&2
953 -static |
-prefer-pic |
-prefer-non-pic)
964 arg_mode
=arg
# the next one goes into the "base_compile" arg list
965 continue # The current "srcfile" will either be retained or
966 ;; # replaced later. I would guess that would be a bug.
969 args
=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"`
971 save_ifs
="$IFS"; IFS
=','
975 # Double-quote args containing other shell metacharacters.
976 # Many Bourne shells cannot handle close brackets correctly
977 # in scan sets, so we specify it separately.
979 *$quote_scanset* |
*]* |
*\|
* |
*\
&* |
*\
(* |
*\
)* |
"")
983 lastarg
="$lastarg $arg"
986 lastarg
=`$echo "X$lastarg" | $Xsed -e "s/^ //"`
988 # Add the arguments to base_compile.
989 base_compile
="$base_compile $lastarg"
994 # Accept the current argument as the source file.
995 # The previous "srcfile" becomes the current argument.
1002 esac # case $arg_mode
1004 # Aesthetically quote the previous argument.
1005 lastarg
=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"`
1008 # Double-quote args containing other shell metacharacters.
1009 # Many Bourne shells cannot handle close brackets correctly
1010 # in scan sets, and some SunOS ksh mistreat backslash-escaping
1011 # in scan sets (worked around with variable expansion),
1012 # and furthermore cannot handle '|' '&' '(' ')' in scan sets
1013 # at all, so we specify them separately.
1014 *$quote_scanset* |
*]* |
*\|
* |
*\
&* |
*\
(* |
*\
)* |
"")
1015 lastarg
="\"$lastarg\""
1019 base_compile
="$base_compile $lastarg"
1024 $echo "$modename: you must specify an argument for -Xcompile"
1028 $echo "$modename: you must specify a target with \`-o'" 1>&2
1032 # Get the name of the library object.
1033 [ -z "$libobj" ] && libobj
=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'`
1037 # Recognize several different file suffixes.
1038 # If the user specifies -o file.o, it is replaced with file.lo
1048 *.class
) xform
=class
;;
1053 *.java
) xform
=java
;;
1056 libobj
=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"`
1059 *.lo
) obj
=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;;
1061 $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2
1066 func_infer_tag
$base_compile
1068 for arg
in $later; do
1087 qlibobj
=`$echo "X$libobj" | $Xsed -e "$sed_quote_subst"`
1089 *$quote_scanset* |
*]* |
*\|
* |
*\
&* |
*\
(* |
*\
)* |
"")
1090 qlibobj
="\"$qlibobj\"" ;;
1092 if test "X$libobj" != "X$qlibobj"; then
1093 $echo "$modename: libobj name \`$libobj' may not contain shell special characters."
1096 objname
=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
1097 xdir
=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'`
1098 if test "X$xdir" = "X$obj"; then
1103 lobj
=${xdir}$objdir/$objname
1105 if test -z "$base_compile"; then
1106 $echo "$modename: you must specify a compilation command" 1>&2
1111 # Delete any leftover library objects.
1112 if test "$build_old_libs" = yes; then
1113 removelist
="$obj $lobj $libobj ${libobj}T"
1115 removelist
="$lobj $libobj ${libobj}T"
1118 $run $rm $removelist
1119 trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15
1121 # On Cygwin there's no "real" PIC flag so we must build both object types
1123 cygwin
* | mingw
* | pw32
* | os2
*)
1127 if test "$pic_mode" = no
&& test "$deplibs_check_method" != pass_all
; then
1128 # non-PIC code in shared libraries is not supported
1132 # Calculate the filename of the output object if compiler does
1133 # not support -o with -c
1134 if test "$compiler_c_o" = no
; then
1135 output_obj
=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.
${objext}
1136 lockfile
="$output_obj.lock"
1137 removelist
="$removelist $output_obj $lockfile"
1138 trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15
1145 # Lock this critical section if it is needed
1146 # We use this script file to make the link, it avoids creating a new file
1147 if test "$need_locks" = yes; then
1148 until $run ln "$progpath" "$lockfile" 2>/dev
/null
; do
1149 $show "Waiting for $lockfile to be removed"
1152 elif test "$need_locks" = warn
; then
1153 if test -f "$lockfile"; then
1155 *** ERROR, $lockfile exists and contains:
1156 `cat $lockfile 2>/dev/null`
1158 This indicates that another process is trying to use the same
1159 temporary object file, and libtool could not work around it because
1160 your compiler does not support \`-c' and \`-o' together. If you
1161 repeat this compilation, it may succeed, by chance, but you had better
1162 avoid parallel builds (make -j) in this platform, or get a better
1165 $run $rm $removelist
1168 $echo "$srcfile" > "$lockfile"
1171 if test -n "$fix_srcfile_path"; then
1172 eval srcfile
=\"$fix_srcfile_path\"
1174 qsrcfile
=`$echo "X$srcfile" | $Xsed -e "$sed_quote_subst"`
1176 *$quote_scanset* |
*]* |
*\|
* |
*\
&* |
*\
(* |
*\
)* |
"")
1177 qsrcfile
="\"$qsrcfile\"" ;;
1180 $run $rm "$libobj" "${libobj}T"
1182 # Create a libtool object file (analogous to a ".la" file),
1183 # but don't create it if we're doing a dry run.
1184 test -z "$run" && cat > ${libobj}T
<<EOF
1185 # $libobj - a libtool object file
1186 # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
1188 # Please DO NOT delete this file!
1189 # It is necessary for linking the library.
1191 # Name of the PIC object.
1194 # Only build a PIC object if we are building libtool libraries.
1195 if test "$build_libtool_libs" = yes; then
1196 # Without this assignment, base_compile gets emptied.
1197 fbsd_hideous_sh_bug
=$base_compile
1199 if test "$pic_mode" != no
; then
1200 command="$base_compile $qsrcfile $pic_flag"
1202 # Don't build PIC code
1203 command="$base_compile $qsrcfile"
1206 if test ! -d "${xdir}$objdir"; then
1207 $show "$mkdir ${xdir}$objdir"
1208 $run $mkdir ${xdir}$objdir
1210 if test "$status" -ne 0 && test ! -d "${xdir}$objdir"; then
1215 if test -z "$output_obj"; then
1216 # Place PIC objects in $objdir
1217 command="$command -o $lobj"
1220 $run $rm "$lobj" "$output_obj"
1223 if $run eval "$command"; then :
1225 test -n "$output_obj" && $run $rm $removelist
1229 if test "$need_locks" = warn
&&
1230 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
1232 *** ERROR, $lockfile contains:
1233 `cat $lockfile 2>/dev/null`
1235 but it should contain:
1238 This indicates that another process is trying to use the same
1239 temporary object file, and libtool could not work around it because
1240 your compiler does not support \`-c' and \`-o' together. If you
1241 repeat this compilation, it may succeed, by chance, but you had better
1242 avoid parallel builds (make -j) in this platform, or get a better
1245 $run $rm $removelist
1249 # Just move the object if needed, then go on to compile the next one
1250 if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then
1251 $show "$mv $output_obj $lobj"
1252 if $run $mv $output_obj $lobj; then :
1255 $run $rm $removelist
1260 # Append the name of the PIC object to the libtool object file.
1261 test -z "$run" && cat >> ${libobj}T
<<EOF
1262 pic_object='$objdir/$objname'
1266 # Allow error messages only from the first compilation.
1267 if test "$suppress_opt" = yes; then
1268 suppress_output
=' >/dev/null 2>&1'
1271 # No PIC object so indicate it doesn't exist in the libtool
1273 test -z "$run" && cat >> ${libobj}T
<<EOF
1279 # Only build a position-dependent object if we build old libraries.
1280 if test "$build_old_libs" = yes; then
1281 if test "$pic_mode" != yes; then
1282 # Don't build PIC code
1283 command="$base_compile $qsrcfile"
1285 command="$base_compile $qsrcfile $pic_flag"
1287 if test "$compiler_c_o" = yes; then
1288 command="$command -o $obj"
1291 # Suppress compiler output if we already did a PIC compilation.
1292 command="$command$suppress_output"
1293 $run $rm "$obj" "$output_obj"
1295 if $run eval "$command"; then :
1297 $run $rm $removelist
1301 if test "$need_locks" = warn
&&
1302 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
1304 *** ERROR, $lockfile contains:
1305 `cat $lockfile 2>/dev/null`
1307 but it should contain:
1310 This indicates that another process is trying to use the same
1311 temporary object file, and libtool could not work around it because
1312 your compiler does not support \`-c' and \`-o' together. If you
1313 repeat this compilation, it may succeed, by chance, but you had better
1314 avoid parallel builds (make -j) in this platform, or get a better
1317 $run $rm $removelist
1321 # Just move the object if needed
1322 if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then
1323 $show "$mv $output_obj $obj"
1324 if $run $mv $output_obj $obj; then :
1327 $run $rm $removelist
1332 # Append the name of the non-PIC object the libtool object file.
1333 # Only append if the libtool object file exists.
1334 test -z "$run" && cat >> ${libobj}T
<<EOF
1335 # Name of the non-PIC object.
1336 non_pic_object='$objname'
1340 # Append the name of the non-PIC object the libtool object file.
1341 # Only append if the libtool object file exists.
1342 test -z "$run" && cat >> ${libobj}T
<<EOF
1343 # Name of the non-PIC object.
1349 $run $mv "${libobj}T" "${libobj}"
1351 # Unlock the critical section if it was locked
1352 if test "$need_locks" != no
; then
1353 $run $rm "$lockfile"
1361 modename
="$modename: link"
1363 *-*-cygwin* |
*-*-mingw* |
*-*-pw32* |
*-*-os2*)
1364 # It is impossible to link a dll without this setting, and
1365 # we shouldn't force the makefile maintainer to figure out
1366 # which system we are compiling for in order to pass an extra
1367 # flag for every libtool invocation.
1368 # allow_undefined=no
1370 # FIXME: Unfortunately, there are problems with the above when trying
1371 # to make a dll which has undefined symbols, in which case not
1372 # even a static library is built. For now, we need to specify
1373 # -no-undefined on the libtool link line when we can be certain
1374 # that all symbols are satisfied, otherwise we get a static library.
1381 libtool_args
="$nonopt"
1382 base_compile
="$nonopt $@"
1383 compile_command
="$nonopt"
1384 finalize_command
="$nonopt"
1397 lib_search_path
=`pwd`
1406 export_symbols_regex
=
1414 precious_files_regex
=
1415 prefer_static_libs
=no
1428 func_infer_tag
$base_compile
1430 # We need to know -static, to get the right output filenames.
1434 -all-static |
-static)
1435 if test "X$arg" = "X-all-static"; then
1436 if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
1437 $echo "$modename: warning: complete static linking is impossible in this configuration" 1>&2
1439 if test -n "$link_static_flag"; then
1440 dlopen_self
=$dlopen_self_static
1443 if test -z "$pic_flag" && test -n "$link_static_flag"; then
1444 dlopen_self
=$dlopen_self_static
1447 build_libtool_libs
=no
1449 prefer_static_libs
=yes
1455 # See if our shared archives depend on static archives.
1456 test -n "$old_archive_from_new_cmds" && build_old_libs
=yes
1458 # Go through the arguments, transforming them on the way.
1459 while test "$#" -gt 0; do
1463 *$quote_scanset* |
*]* |
*\|
* |
*\
&* |
*\
(* |
*\
)* |
"")
1464 qarg
=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test
1468 libtool_args
="$libtool_args $qarg"
1470 # If the previous option needs an argument, assign it.
1471 if test -n "$prev"; then
1474 compile_command
="$compile_command @OUTPUT@"
1475 finalize_command
="$finalize_command @OUTPUT@"
1481 if test "$preload" = no
; then
1482 # Add the symbol object into the linking commands.
1483 compile_command
="$compile_command @SYMFILE@"
1484 finalize_command
="$finalize_command @SYMFILE@"
1488 *.la |
*.lo
) ;; # We handle these cases below.
1490 if test "$dlself" = no
; then
1498 if test "$prev" = dlprefiles
; then
1500 elif test "$prev" = dlfiles
&& test "$dlopen_self" != yes; then
1510 if test "$prev" = dlfiles
; then
1511 dlfiles
="$dlfiles $arg"
1513 dlprefiles
="$dlprefiles $arg"
1521 export_symbols
="$arg"
1522 if test ! -f "$arg"; then
1523 $echo "$modename: symbol file \`$arg' does not exist"
1530 export_symbols_regex
="$arg"
1535 inst_prefix_dir
="$arg"
1540 precious_files_regex
="$arg"
1550 if test -f "$arg"; then
1553 for fil
in `cat $save_arg`
1555 # moreargs="$moreargs $fil"
1557 # A libtool-controlled object.
1559 # Check to see that this really is a libtool object.
1560 if (${SED} -e '2q' $arg |
grep "^# Generated by .*$PACKAGE") >/dev
/null
2>&1; then
1565 # If there is no directory component, then add one.
1567 */* |
*\\*) .
$arg ;;
1571 if test -z "$pic_object" || \
1572 test -z "$non_pic_object" ||
1573 test "$pic_object" = none
&& \
1574 test "$non_pic_object" = none
; then
1575 $echo "$modename: cannot find name of object for \`$arg'" 1>&2
1579 # Extract subdirectory from the argument.
1580 xdir
=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
1581 if test "X$xdir" = "X$arg"; then
1587 if test "$pic_object" != none
; then
1588 # Prepend the subdirectory the object is found in.
1589 pic_object
="$xdir$pic_object"
1591 if test "$prev" = dlfiles
; then
1592 if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
1593 dlfiles
="$dlfiles $pic_object"
1597 # If libtool objects are unsupported, then we need to preload.
1602 # CHECK ME: I think I busted this. -Ossama
1603 if test "$prev" = dlprefiles
; then
1604 # Preload the old-style object.
1605 dlprefiles
="$dlprefiles $pic_object"
1610 libobjs
="$libobjs $pic_object"
1615 if test "$non_pic_object" != none
; then
1616 # Prepend the subdirectory the object is found in.
1617 non_pic_object
="$xdir$non_pic_object"
1619 # A standard non-PIC object
1620 non_pic_objects
="$non_pic_objects $non_pic_object"
1621 if test -z "$pic_object" ||
test "$pic_object" = none
; then
1622 arg
="$non_pic_object"
1626 # Only an error if not doing a dry-run.
1627 if test -z "$run"; then
1628 $echo "$modename: \`$arg' is not a valid libtool object" 1>&2
1633 # Extract subdirectory from the argument.
1634 xdir
=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
1635 if test "X$xdir" = "X$arg"; then
1641 pic_object
=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"`
1642 non_pic_object
=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"`
1643 libobjs
="$libobjs $pic_object"
1644 non_pic_objects
="$non_pic_objects $non_pic_object"
1649 $echo "$modename: link input file \`$save_arg' does not exist"
1657 # We need an absolute path.
1659 [\\/]* |
[A-Za-z
]:[\\/]*) ;;
1661 $echo "$modename: only absolute run-paths are allowed" 1>&2
1665 if test "$prev" = rpath
; then
1668 *) rpath
="$rpath $arg" ;;
1673 *) xrpath
="$xrpath $arg" ;;
1680 compiler_flags
="$compiler_flags $qarg"
1682 compile_command
="$compile_command $qarg"
1683 finalize_command
="$finalize_command $qarg"
1687 linker_flags
="$linker_flags $qarg"
1688 compiler_flags
="$compiler_flags $wl$qarg"
1690 compile_command
="$compile_command $wl$qarg"
1691 finalize_command
="$finalize_command $wl$qarg"
1695 linker_flags
="$linker_flags $qarg"
1696 compiler_flags
="$compiler_flags $qarg"
1698 compile_command
="$compile_command $qarg"
1699 finalize_command
="$finalize_command $qarg"
1708 compiler_flags
="$compiler_flags $arg"
1713 eval "$prev=\"\$arg\""
1718 fi # test -n "$prev"
1724 if test -n "$link_static_flag"; then
1725 compile_command
="$compile_command $link_static_flag"
1726 finalize_command
="$finalize_command $link_static_flag"
1732 # FIXME: remove this flag sometime in the future.
1733 $echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2
1757 -export-symbols |
-export-symbols-regex)
1758 if test -n "$export_symbols" ||
test -n "$export_symbols_regex"; then
1759 $echo "$modename: more than one -exported-symbols argument is not allowed"
1762 if test "X$arg" = "X-export-symbols"; then
1771 prev
=darwin_framework
1772 compiler_flags
="$compiler_flags $arg"
1781 # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:*
1782 # so, if we see these flags be careful not to treat them like -L
1784 case $with_gcc/$host in
1785 no
/*-*-irix* |
/*-*-irix*)
1786 compile_command
="$compile_command $arg"
1787 finalize_command
="$finalize_command $arg"
1794 dir
=`$echo "X$arg" | $Xsed -e 's/^-L//'`
1795 # We need an absolute path.
1797 [\\/]* |
[A-Za-z
]:[\\/]*) ;;
1799 absdir
=`cd "$dir" && pwd`
1800 if test -z "$absdir"; then
1801 $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2
1810 deplibs
="$deplibs -L$dir"
1811 lib_search_path
="$lib_search_path $dir"
1815 *-*-cygwin* |
*-*-mingw* |
*-*-pw32* |
*-*-os2*)
1816 case :$dllsearchpath: in
1818 *) dllsearchpath
="$dllsearchpath:$dir";;
1826 if test "X$arg" = "X-lc" ||
test "X$arg" = "X-lm"; then
1828 *-*-cygwin* |
*-*-pw32* |
*-*-beos*)
1829 # These systems don't actually have a C or math library (as such)
1832 *-*-mingw* |
*-*-os2*)
1833 # These systems don't actually have a C library (as such)
1834 test "X$arg" = "X-lc" && continue
1836 *-*-openbsd* |
*-*-freebsd* |
*-*-dragonfly*)
1837 # Do not include libc due to us having libc/libc_r.
1838 test "X$arg" = "X-lc" && continue
1840 *-*-rhapsody* |
*-*-darwin1.
[012])
1841 # Rhapsody C and math libraries are in the System framework
1842 deplibs
="$deplibs -framework System"
1845 elif test "X$arg" = "X-lc_r"; then
1847 *-*-openbsd* |
*-*-freebsd* |
*-*-dragonfly*)
1848 # Do not include libc_r directly, use -pthread flag.
1853 deplibs
="$deplibs $arg"
1857 # Tru64 UNIX uses -model [arg] to determine the layout of C++
1858 # classes, name mangling, and exception handling.
1860 compile_command
="$compile_command $arg"
1861 compiler_flags
="$compiler_flags $arg"
1862 finalize_command
="$finalize_command $arg"
1867 -mt|
-mthreads|
-kthread|
-Kthread|
-pthread|
-pthreads|
--thread-safe)
1868 compiler_flags
="$compiler_flags $arg"
1869 compile_command
="$compile_command $arg"
1870 finalize_command
="$finalize_command $arg"
1879 # -64, -mips[0-9] enable 64-bit mode on the SGI compiler
1880 # -r[0-9][0-9]* specifies the processor on the SGI compiler
1881 # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler
1882 # +DA*, +DD* enable 64-bit mode on the HP compiler
1883 # -q* pass through compiler args for the IBM compiler
1884 # -m* pass through architecture-specific compiler args for GCC
1885 -64|
-mips[0-9]|
-r[0-9][0-9]*|
-xarch=*|
-xtarget=*|
+DA
*|
+DD
*|
-q*|
-m*)
1887 # Unknown arguments in both finalize_command and compile_command need
1888 # to be aesthetically quoted because they are evaled later.
1889 arg
=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
1891 *$quote_scanset* |
*]* |
*\|
* |
*\
&* |
*\
(* |
*\
)* |
"")
1895 compile_command
="$compile_command $arg"
1896 finalize_command
="$finalize_command $arg"
1897 if test "$with_gcc" = "yes" ; then
1898 compiler_flags
="$compiler_flags $arg"
1915 *-*-cygwin* |
*-*-mingw* |
*-*-pw32* |
*-*-os2*)
1916 # The PATH hackery in wrapper scripts is required on Windows
1917 # in order for the loader to find any dlls it needs.
1918 $echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2
1919 $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2
1922 *) no_install
=yes ;;
1939 -precious-files-regex)
1960 dir
=`$echo "X$arg" | $Xsed -e 's/^-R//'`
1961 # We need an absolute path.
1963 [\\/]* |
[A-Za-z
]:[\\/]*) ;;
1965 $echo "$modename: only absolute run-paths are allowed" 1>&2
1971 *) xrpath
="$xrpath $dir" ;;
1977 # The effects of -static are defined in a previous loop.
1978 # We used to do the same as -all-static on platforms that
1979 # didn't have a PIC flag, but the assumption that the effects
1980 # would be equivalent was wrong. It would break on at least
1981 # Digital Unix and AIX.
2001 args
=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'`
2003 save_ifs
="$IFS"; IFS
=','
2004 for flag
in $args; do
2007 *$quote_scanset* |
*]* |
*\|
* |
*\
&* |
*\
(* |
*\
)* |
"")
2012 compiler_flags
="$compiler_flags $flag"
2015 arg
=`$echo "X$arg" | $Xsed -e "s/^ //"`
2019 args
=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'`
2021 save_ifs
="$IFS"; IFS
=','
2022 for flag
in $args; do
2025 *$quote_scanset* |
*]* |
*\|
* |
*\
&* |
*\
(* |
*\
)* |
"")
2030 compiler_flags
="$compiler_flags $wl$flag"
2031 linker_flags
="$linker_flags $flag"
2034 arg
=`$echo "X$arg" | $Xsed -e "s/^ //"`
2052 # Some other compiler flag.
2054 # Unknown arguments in both finalize_command and compile_command need
2055 # to be aesthetically quoted because they are evaled later.
2056 arg
=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
2058 *$quote_scanset* |
*]* |
*\|
* |
*\
&* |
*\
(* |
*\
)* |
"")
2065 # A standard object.
2070 # A libtool-controlled object.
2072 # Check to see that this really is a libtool object.
2073 if (${SED} -e '2q' $arg |
grep "^# Generated by .*$PACKAGE") >/dev
/null
2>&1; then
2078 # If there is no directory component, then add one.
2080 */* |
*\\*) .
$arg ;;
2084 if test -z "$pic_object" || \
2085 test -z "$non_pic_object" ||
2086 test "$pic_object" = none
&& \
2087 test "$non_pic_object" = none
; then
2088 $echo "$modename: cannot find name of object for \`$arg'" 1>&2
2092 # Extract subdirectory from the argument.
2093 xdir
=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
2094 if test "X$xdir" = "X$arg"; then
2100 if test "$pic_object" != none
; then
2101 # Prepend the subdirectory the object is found in.
2102 pic_object
="$xdir$pic_object"
2104 if test "$prev" = dlfiles
; then
2105 if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
2106 dlfiles
="$dlfiles $pic_object"
2110 # If libtool objects are unsupported, then we need to preload.
2115 # CHECK ME: I think I busted this. -Ossama
2116 if test "$prev" = dlprefiles
; then
2117 # Preload the old-style object.
2118 dlprefiles
="$dlprefiles $pic_object"
2123 libobjs
="$libobjs $pic_object"
2128 if test "$non_pic_object" != none
; then
2129 # Prepend the subdirectory the object is found in.
2130 non_pic_object
="$xdir$non_pic_object"
2132 # A standard non-PIC object
2133 non_pic_objects
="$non_pic_objects $non_pic_object"
2134 if test -z "$pic_object" ||
test "$pic_object" = none
; then
2135 arg
="$non_pic_object"
2139 # Only an error if not doing a dry-run.
2140 if test -z "$run"; then
2141 $echo "$modename: \`$arg' is not a valid libtool object" 1>&2
2146 # Extract subdirectory from the argument.
2147 xdir
=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
2148 if test "X$xdir" = "X$arg"; then
2154 pic_object
=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"`
2155 non_pic_object
=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"`
2156 libobjs
="$libobjs $pic_object"
2157 non_pic_objects
="$non_pic_objects $non_pic_object"
2164 deplibs
="$deplibs $arg"
2165 old_deplibs
="$old_deplibs $arg"
2170 # A libtool-controlled library.
2172 if test "$prev" = dlfiles
; then
2173 # This library was specified with -dlopen.
2174 dlfiles
="$dlfiles $arg"
2176 elif test "$prev" = dlprefiles
; then
2177 # The library was specified with -dlpreopen.
2178 dlprefiles
="$dlprefiles $arg"
2181 deplibs
="$deplibs $arg"
2186 # Some other compiler argument.
2188 # Unknown arguments in both finalize_command and compile_command need
2189 # to be aesthetically quoted because they are evaled later.
2190 arg
=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
2192 *$quote_scanset* |
*]* |
*\|
* |
*\
&* |
*\
(* |
*\
)* |
"")
2199 # Now actually substitute the argument into the commands.
2200 if test -n "$arg"; then
2201 compile_command
="$compile_command $arg"
2202 finalize_command
="$finalize_command $arg"
2204 done # argument parsing loop
2206 if test -n "$prev"; then
2207 $echo "$modename: the \`$prevarg' option requires an argument" 1>&2
2212 if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then
2213 eval arg
=\"$export_dynamic_flag_spec\"
2214 compile_command
="$compile_command $arg"
2215 finalize_command
="$finalize_command $arg"
2219 # calculate the name of the file, without its directory
2220 outputname
=`$echo "X$output" | $Xsed -e 's%^.*/%%'`
2221 libobjs_save
="$libobjs"
2223 if test -n "$shlibpath_var"; then
2224 # get the directories listed in $shlibpath_var
2225 eval shlib_search_path
=\
`\$echo \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\`
2229 eval sys_lib_search_path
=\"$sys_lib_search_path_spec\"
2230 eval sys_lib_dlsearch_path
=\"$sys_lib_dlsearch_path_spec\"
2232 output_objdir
=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'`
2233 if test "X$output_objdir" = "X$output"; then
2234 output_objdir
="$objdir"
2236 output_objdir
="$output_objdir/$objdir"
2238 # Create the object directory.
2239 if test ! -d "$output_objdir"; then
2240 $show "$mkdir $output_objdir"
2241 $run $mkdir $output_objdir
2243 if test "$status" -ne 0 && test ! -d "$output_objdir"; then
2248 # Determine the type of output
2251 $echo "$modename: you must specify an output file" 1>&2
2255 *.
$libext) linkmode
=oldlib
;;
2256 *.lo |
*.
$objext) linkmode
=obj
;;
2257 *.la
) linkmode
=lib
;;
2258 *) linkmode
=prog
;; # Anything else should be a program.
2262 *cygwin
* |
*mingw
* |
*pw32
*)
2263 # don't eliminate duplications in $postdeps and $predeps
2264 duplicate_compiler_generated_deps
=yes
2267 duplicate_compiler_generated_deps
=$duplicate_deps
2273 # Find all interdependent deplibs by searching for libraries
2274 # that are linked more than once (e.g. -la -lb -la)
2275 for deplib
in $deplibs; do
2276 if test "X$duplicate_deps" = "Xyes" ; then
2278 *" $deplib "*) specialdeplibs
="$specialdeplibs $deplib" ;;
2281 libs
="$libs $deplib"
2284 if test "$linkmode" = lib
; then
2285 libs
="$predeps $libs $compiler_lib_search_path $postdeps"
2287 # Compute libraries that are listed more than once in $predeps
2288 # $postdeps and mark them as special (i.e., whose duplicates are
2289 # not to be eliminated).
2291 if test "X$duplicate_compiler_generated_deps" = "Xyes" ; then
2292 for pre_post_dep
in $predeps $postdeps; do
2293 case "$pre_post_deps " in
2294 *" $pre_post_dep "*) specialdeplibs
="$specialdeplibs $pre_post_deps" ;;
2296 pre_post_deps
="$pre_post_deps $pre_post_dep"
2305 need_relink
=no
# whether we're linking any uninstalled libtool libraries
2306 notinst_deplibs
= # not-installed libtool libraries
2307 notinst_path
= # paths that contain not-installed libtool libraries
2311 for file in $dlfiles $dlprefiles; do
2315 $echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2
2327 passes
="conv scan dlopen dlpreopen link"
2332 for pass
in $passes; do
2333 if test "$linkmode,$pass" = "lib,link" ||
2334 test "$linkmode,$pass" = "prog,scan"; then
2338 if test "$linkmode" = prog
; then
2340 dlopen
) libs
="$dlfiles" ;;
2341 dlpreopen
) libs
="$dlprefiles" ;;
2342 link
) libs
="$deplibs %DEPLIBS% $dependency_libs" ;;
2345 if test "$pass" = dlopen
; then
2346 # Collect dlpreopened libraries
2347 save_deplibs
="$deplibs"
2350 for deplib
in $libs; do
2354 -mt|
-mthreads|
-kthread|
-Kthread|
-pthread|
-pthreads|
--thread-safe)
2355 if test "$linkmode,$pass" = "prog,link"; then
2356 compile_deplibs
="$deplib $compile_deplibs"
2357 finalize_deplibs
="$deplib $finalize_deplibs"
2359 compiler_flags
="$compiler_flags $deplib"
2364 if test "$linkmode" != lib
&& test "$linkmode" != prog
; then
2365 $echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2
2368 name
=`$echo "X$deplib" | $Xsed -e 's/^-l//'`
2369 for searchdir
in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do
2370 for search_ext
in .la
$std_shrext .so .a
; do
2371 # Search the libtool library
2372 lib
="$searchdir/lib${name}${search_ext}"
2373 if test -f "$lib"; then
2374 if test "$search_ext" = ".la"; then
2383 if test "$found" != yes; then
2384 # deplib doesn't seem to be a libtool library
2385 if test "$linkmode,$pass" = "prog,link"; then
2386 compile_deplibs
="$deplib $compile_deplibs"
2387 finalize_deplibs
="$deplib $finalize_deplibs"
2389 deplibs
="$deplib $deplibs"
2390 test "$linkmode" = lib
&& newdependency_libs
="$deplib $newdependency_libs"
2393 else # deplib is a libtool library
2394 # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib,
2395 # We need to do some special things here, and not later.
2396 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
2397 case " $predeps $postdeps " in
2399 if (${SED} -e '2q' $lib |
2400 grep "^# Generated by .*$PACKAGE") >/dev
/null
2>&1; then
2404 */* |
*\\*) .
$lib ;;
2407 for l
in $old_library $library_names; do
2410 if test "X$ll" = "X$old_library" ; then # only static version available
2412 ladir
=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'`
2413 test "X$ladir" = "X$lib" && ladir
="."
2414 lib
=$ladir/$old_library
2415 if test "$linkmode,$pass" = "prog,link"; then
2416 compile_deplibs
="$deplib $compile_deplibs"
2417 finalize_deplibs
="$deplib $finalize_deplibs"
2419 deplibs
="$deplib $deplibs"
2420 test "$linkmode" = lib
&& newdependency_libs
="$deplib $newdependency_libs"
2434 deplibs
="$deplib $deplibs"
2435 test "$pass" = conv
&& continue
2436 newdependency_libs
="$deplib $newdependency_libs"
2437 newlib_search_path
="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
2440 if test "$pass" = conv
; then
2441 deplibs
="$deplib $deplibs"
2444 if test "$pass" = scan
; then
2445 deplibs
="$deplib $deplibs"
2447 compile_deplibs
="$deplib $compile_deplibs"
2448 finalize_deplibs
="$deplib $finalize_deplibs"
2450 newlib_search_path
="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
2453 $echo "$modename: warning: \`-L' is ignored for archives/objects" 1>&2
2459 if test "$pass" = link
; then
2460 dir
=`$echo "X$deplib" | $Xsed -e 's/^-R//'`
2461 # Make sure the xrpath contains only unique directories.
2464 *) xrpath
="$xrpath $dir" ;;
2467 deplibs
="$deplib $deplibs"
2470 *.la
) lib
="$deplib" ;;
2472 if test "$pass" = conv
; then
2473 deplibs
="$deplib $deplibs"
2479 case $deplibs_check_method in
2481 set dummy
$deplibs_check_method
2482 match_pattern_regex
=`expr "$deplibs_check_method" : "$2 \(.*\)"`
2483 if eval $echo \"$deplib\" 2>/dev
/null \
2485 |
$EGREP "$match_pattern_regex" > /dev
/null
; then
2493 if test "$valid_a_lib" != yes; then
2495 $echo "*** Warning: Trying to link with static lib archive $deplib."
2496 $echo "*** I have the capability to make that library automatically link in when"
2497 $echo "*** you link to this library. But I can only do this if you have a"
2498 $echo "*** shared version of the library, which you do not appear to have"
2499 $echo "*** because the file extensions .$libext of this argument makes me believe"
2500 $echo "*** that it is just a static archive that I should not used here."
2503 $echo "*** Warning: Linking the shared library $output against the"
2504 $echo "*** static library $deplib is not portable!"
2505 deplibs
="$deplib $deplibs"
2510 if test "$pass" != link
; then
2511 deplibs
="$deplib $deplibs"
2513 compile_deplibs
="$deplib $compile_deplibs"
2514 finalize_deplibs
="$deplib $finalize_deplibs"
2521 if test "$pass" = conv
; then
2522 deplibs
="$deplib $deplibs"
2523 elif test "$linkmode" = prog
; then
2524 if test "$pass" = dlpreopen ||
test "$dlopen_support" != yes ||
test "$build_libtool_libs" = no
; then
2525 # If there is no dlopen support or we're linking statically,
2526 # we need to preload.
2527 newdlprefiles
="$newdlprefiles $deplib"
2528 compile_deplibs
="$deplib $compile_deplibs"
2529 finalize_deplibs
="$deplib $finalize_deplibs"
2531 newdlfiles
="$newdlfiles $deplib"
2541 if test "$found" = yes ||
test -f "$lib"; then :
2543 $echo "$modename: cannot find the library \`$lib'" 1>&2
2547 # Check to see that this really is a libtool archive.
2548 if (${SED} -e '2q' $lib |
grep "^# Generated by .*$PACKAGE") >/dev
/null
2>&1; then :
2550 $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
2554 ladir
=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'`
2555 test "X$ladir" = "X$lib" && ladir
="."
2563 # If the library was installed with an old release of libtool,
2564 # it will not redefine variables installed, or shouldnotlink
2572 */* |
*\\*) .
$lib ;;
2576 if test "$linkmode,$pass" = "lib,link" ||
2577 test "$linkmode,$pass" = "prog,scan" ||
2578 { test "$linkmode" != prog
&& test "$linkmode" != lib
; }; then
2579 test -n "$dlopen" && dlfiles
="$dlfiles $dlopen"
2580 test -n "$dlpreopen" && dlprefiles
="$dlprefiles $dlpreopen"
2583 if test "$pass" = conv
; then
2584 # Only check for convenience libraries
2585 deplibs
="$lib $deplibs"
2586 if test -z "$libdir"; then
2587 if test -z "$old_library"; then
2588 $echo "$modename: cannot find name of link library for \`$lib'" 1>&2
2591 # It is a libtool convenience library, so add in its objects.
2592 convenience
="$convenience $ladir/$objdir/$old_library"
2593 old_convenience
="$old_convenience $ladir/$objdir/$old_library"
2595 for deplib
in $dependency_libs; do
2596 deplibs
="$deplib $deplibs"
2597 if test "X$duplicate_deps" = "Xyes" ; then
2598 case "$tmp_libs " in
2599 *" $deplib "*) specialdeplibs
="$specialdeplibs $deplib" ;;
2602 tmp_libs
="$tmp_libs $deplib"
2604 elif test "$linkmode" != prog
&& test "$linkmode" != lib
; then
2605 $echo "$modename: \`$lib' is not a convenience library" 1>&2
2612 # Get the name of the library we link against.
2614 for l
in $old_library $library_names; do
2617 if test -z "$linklib"; then
2618 $echo "$modename: cannot find name of link library for \`$lib'" 1>&2
2622 # This library was specified with -dlopen.
2623 if test "$pass" = dlopen
; then
2624 if test -z "$libdir"; then
2625 $echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2
2628 if test -z "$dlname" ||
2629 test "$dlopen_support" != yes ||
2630 test "$build_libtool_libs" = no
; then
2631 # If there is no dlname, no dlopen support or we're linking
2632 # statically, we need to preload. We also need to preload any
2633 # dependent libraries so libltdl's deplib preloader doesn't
2634 # bomb out in the load deplibs phase.
2635 dlprefiles
="$dlprefiles $lib $dependency_libs"
2637 newdlfiles
="$newdlfiles $lib"
2642 # We need an absolute path.
2644 [\\/]* |
[A-Za-z
]:[\\/]*) abs_ladir
="$ladir" ;;
2646 abs_ladir
=`cd "$ladir" && pwd`
2647 if test -z "$abs_ladir"; then
2648 $echo "$modename: warning: cannot determine absolute directory name of \`$ladir'" 1>&2
2649 $echo "$modename: passing it literally to the linker, although it might fail" 1>&2
2654 laname
=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
2656 # Find the relevant object directory and library name.
2657 if test "X$installed" = Xyes
; then
2658 if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then
2659 $echo "$modename: warning: library \`$lib' was moved." 1>&2
2667 test "X$hardcode_automatic" = Xyes
&& avoidtemprpath
=yes
2669 if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then
2672 # Remove this search path later
2673 notinst_path
="$notinst_path $abs_ladir"
2675 dir
="$ladir/$objdir"
2676 absdir
="$abs_ladir/$objdir"
2677 # Remove this search path later
2678 notinst_path
="$notinst_path $abs_ladir"
2680 fi # $installed = yes
2681 name
=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
2683 # This library was specified with -dlpreopen.
2684 if test "$pass" = dlpreopen
; then
2685 if test -z "$libdir"; then
2686 $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2
2689 # Prefer using a static library (so that no silly _DYNAMIC symbols
2690 # are required to link).
2691 if test -n "$old_library"; then
2692 newdlprefiles
="$newdlprefiles $dir/$old_library"
2693 # Otherwise, use the dlname, so that lt_dlopen finds it.
2694 elif test -n "$dlname"; then
2695 newdlprefiles
="$newdlprefiles $dir/$dlname"
2697 newdlprefiles
="$newdlprefiles $dir/$linklib"
2699 fi # $pass = dlpreopen
2701 if test -z "$libdir"; then
2702 # Link the convenience library
2703 if test "$linkmode" = lib
; then
2704 deplibs
="$dir/$old_library $deplibs"
2705 elif test "$linkmode,$pass" = "prog,link"; then
2706 compile_deplibs
="$dir/$old_library $compile_deplibs"
2707 finalize_deplibs
="$dir/$old_library $finalize_deplibs"
2709 deplibs
="$lib $deplibs" # used for prog,scan pass
2715 if test "$linkmode" = prog
&& test "$pass" != link
; then
2716 newlib_search_path
="$newlib_search_path $ladir"
2717 deplibs
="$lib $deplibs"
2720 if test "$link_all_deplibs" != no ||
test -z "$library_names" ||
2721 test "$build_libtool_libs" = no
; then
2726 for deplib
in $dependency_libs; do
2728 -L*) newlib_search_path
="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test
2730 # Need to link against all dependency_libs?
2731 if test "$linkalldeplibs" = yes; then
2732 deplibs
="$deplib $deplibs"
2734 # Need to hardcode shared library paths
2735 # or/and link against static libraries
2736 newdependency_libs
="$deplib $newdependency_libs"
2738 if test "X$duplicate_deps" = "Xyes" ; then
2739 case "$tmp_libs " in
2740 *" $deplib "*) specialdeplibs
="$specialdeplibs $deplib" ;;
2743 tmp_libs
="$tmp_libs $deplib"
2746 fi # $linkmode = prog...
2748 if test "$linkmode,$pass" = "prog,link"; then
2749 if test -n "$library_names" &&
2750 { test "$prefer_static_libs" = no ||
test -z "$old_library"; }; then
2751 # We need to hardcode the library path
2752 if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then
2753 # Make sure the rpath contains only unique directories.
2754 case "$temp_rpath " in
2757 *) temp_rpath
="$temp_rpath $dir" ;;
2761 # Hardcode the library path.
2762 # Skip directories that are in the system default run-time
2764 case " $sys_lib_dlsearch_path " in
2767 case "$compile_rpath " in
2769 *) compile_rpath
="$compile_rpath $absdir"
2773 case " $sys_lib_dlsearch_path " in
2776 case "$finalize_rpath " in
2778 *) finalize_rpath
="$finalize_rpath $libdir"
2782 fi # $linkmode,$pass = prog,link...
2784 if test "$alldeplibs" = yes &&
2785 { test "$deplibs_check_method" = pass_all ||
2786 { test "$build_libtool_libs" = yes &&
2787 test -n "$library_names"; }; }; then
2788 # We only need to search for static libraries
2793 link_static
=no
# Whether the deplib will be linked statically
2794 if test -n "$library_names" &&
2795 { test "$prefer_static_libs" = no ||
test -z "$old_library"; }; then
2796 if test "$installed" = no
; then
2797 notinst_deplibs
="$notinst_deplibs $lib"
2800 # This is a shared library
2802 # Warn about portability, can't link against -module's on
2803 # some systems (darwin)
2804 if test "$shouldnotlink" = yes && test "$pass" = link
; then
2806 if test "$linkmode" = prog
; then
2807 $echo "*** Warning: Linking the executable $output against the loadable module"
2809 $echo "*** Warning: Linking the shared library $output against the loadable module"
2811 $echo "*** $linklib is not portable!"
2813 if test "$linkmode" = lib
&&
2814 test "$hardcode_into_libs" = yes; then
2815 # Hardcode the library path.
2816 # Skip directories that are in the system default run-time
2818 case " $sys_lib_dlsearch_path " in
2821 case "$compile_rpath " in
2823 *) compile_rpath
="$compile_rpath $absdir"
2827 case " $sys_lib_dlsearch_path " in
2830 case "$finalize_rpath " in
2832 *) finalize_rpath
="$finalize_rpath $libdir"
2838 if test -n "$old_archive_from_expsyms_cmds"; then
2839 # figure out the soname
2840 set dummy
$library_names
2843 libname
=`eval \\$echo \"$libname_spec\"`
2844 # use dlname if we got it. it's perfectly good, no?
2845 if test -n "$dlname"; then
2847 elif test -n "$soname_spec"; then
2851 major
=`expr $current - $age`
2855 eval soname
=\"$soname_spec\"
2860 # Make a new name for the extract_expsyms_cmds to use
2862 soname
=`$echo $soroot | ${SED} -e 's/^.*\///'`
2863 newlib
="libimp-`$echo $soname | ${SED} 's/^lib//;s/\.dll$//'`.a"
2865 # If the library has no export list, then create one now
2866 if test -f "$output_objdir/$soname-def"; then :
2868 $show "extracting exported symbol list from \`$soname'"
2869 save_ifs
="$IFS"; IFS
='~'
2870 cmds
=$extract_expsyms_cmds
2871 for cmd
in $cmds; do
2875 $run eval "$cmd" ||
exit $?
2881 if test -f "$output_objdir/$newlib"; then :; else
2882 $show "generating import library for \`$soname'"
2883 save_ifs
="$IFS"; IFS
='~'
2884 cmds
=$old_archive_from_expsyms_cmds
2885 for cmd
in $cmds; do
2889 $run eval "$cmd" ||
exit $?
2893 # make sure the library variables are pointing to the new library
2896 fi # test -n "$old_archive_from_expsyms_cmds"
2898 if test "$linkmode" = prog ||
test "$mode" != relink
; then
2903 case $hardcode_action in
2904 immediate | unsupported
)
2905 if test "$hardcode_direct" = no
; then
2908 *-*-sco3.2v5
* ) add_dir
="-L$dir" ;;
2910 # if the lib is a module then we can not link against
2911 # it, someone is ignoring the new warnings I added
2912 if /usr
/bin
/file -L $add 2> /dev
/null |
$EGREP "bundle" >/dev
/null
; then
2913 $echo "** Warning, lib $linklib is a module, not a shared library"
2914 if test -z "$old_library" ; then
2916 $echo "** And there doesn't seem to be a static archive available"
2917 $echo "** The link will probably fail, sorry"
2919 add
="$dir/$old_library"
2923 elif test "$hardcode_minus_L" = no
; then
2925 *-*-sunos*) add_shlibpath
="$dir" ;;
2929 elif test "$hardcode_shlibpath_var" = no
; then
2930 add_shlibpath
="$dir"
2937 if test "$hardcode_direct" = yes; then
2939 elif test "$hardcode_minus_L" = yes; then
2941 # Try looking first in the location we're being installed to.
2942 if test -n "$inst_prefix_dir"; then
2945 add_dir
="$add_dir -L$inst_prefix_dir$libdir"
2950 elif test "$hardcode_shlibpath_var" = yes; then
2951 add_shlibpath
="$dir"
2960 if test "$lib_linked" != yes; then
2961 $echo "$modename: configuration error: unsupported hardcode properties"
2965 if test -n "$add_shlibpath"; then
2966 case :$compile_shlibpath: in
2967 *":$add_shlibpath:"*) ;;
2968 *) compile_shlibpath
="$compile_shlibpath$add_shlibpath:" ;;
2971 if test "$linkmode" = prog
; then
2972 test -n "$add_dir" && compile_deplibs
="$add_dir $compile_deplibs"
2973 test -n "$add" && compile_deplibs
="$add $compile_deplibs"
2975 test -n "$add_dir" && deplibs
="$add_dir $deplibs"
2976 test -n "$add" && deplibs
="$add $deplibs"
2977 if test "$hardcode_direct" != yes && \
2978 test "$hardcode_minus_L" != yes && \
2979 test "$hardcode_shlibpath_var" = yes; then
2980 case :$finalize_shlibpath: in
2982 *) finalize_shlibpath
="$finalize_shlibpath$libdir:" ;;
2988 if test "$linkmode" = prog ||
test "$mode" = relink
; then
2992 # Finalize command for both is simple: just hardcode it.
2993 if test "$hardcode_direct" = yes; then
2994 add
="$libdir/$linklib"
2995 elif test "$hardcode_minus_L" = yes; then
2998 elif test "$hardcode_shlibpath_var" = yes; then
2999 case :$finalize_shlibpath: in
3001 *) finalize_shlibpath
="$finalize_shlibpath$libdir:" ;;
3004 elif test "$hardcode_automatic" = yes; then
3005 if test -n "$inst_prefix_dir" &&
3006 test -f "$inst_prefix_dir$libdir/$linklib" ; then
3007 add
="$inst_prefix_dir$libdir/$linklib"
3009 add
="$libdir/$linklib"
3012 # We cannot seem to hardcode it, guess we'll fake it.
3014 # Try looking first in the location we're being installed to.
3015 if test -n "$inst_prefix_dir"; then
3018 add_dir
="$add_dir -L$inst_prefix_dir$libdir"
3025 if test "$linkmode" = prog
; then
3026 test -n "$add_dir" && finalize_deplibs
="$add_dir $finalize_deplibs"
3027 test -n "$add" && finalize_deplibs
="$add $finalize_deplibs"
3029 test -n "$add_dir" && deplibs
="$add_dir $deplibs"
3030 test -n "$add" && deplibs
="$add $deplibs"
3033 elif test "$linkmode" = prog
; then
3034 # Here we assume that one of hardcode_direct or hardcode_minus_L
3035 # is not unsupported. This is valid on all known static and
3037 if test "$hardcode_direct" != unsupported
; then
3038 test -n "$old_library" && linklib
="$old_library"
3039 compile_deplibs
="$dir/$linklib $compile_deplibs"
3040 finalize_deplibs
="$dir/$linklib $finalize_deplibs"
3042 compile_deplibs
="-l$name -L$dir $compile_deplibs"
3043 finalize_deplibs
="-l$name -L$dir $finalize_deplibs"
3045 elif test "$build_libtool_libs" = yes; then
3046 # Not a shared library
3047 if test "$deplibs_check_method" != pass_all
; then
3048 # We're trying link a shared library against a static one
3049 # but the system doesn't support it.
3051 # Just print a warning and add the library to dependency_libs so
3052 # that the program can be linked against the static library.
3054 $echo "*** Warning: This system can not link to static lib archive $lib."
3055 $echo "*** I have the capability to make that library automatically link in when"
3056 $echo "*** you link to this library. But I can only do this if you have a"
3057 $echo "*** shared version of the library, which you do not appear to have."
3058 if test "$module" = yes; then
3059 $echo "*** But as you try to build a module library, libtool will still create "
3060 $echo "*** a static module, that should work as long as the dlopening application"
3061 $echo "*** is linked with the -dlopen flag to resolve symbols at runtime."
3062 if test -z "$global_symbol_pipe"; then
3064 $echo "*** However, this would only work if libtool was able to extract symbol"
3065 $echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
3066 $echo "*** not find such a program. So, this module is probably useless."
3067 $echo "*** \`nm' from GNU binutils and a full rebuild may help."
3069 if test "$build_old_libs" = no
; then
3070 build_libtool_libs
=module
3073 build_libtool_libs
=no
3077 convenience
="$convenience $dir/$old_library"
3078 old_convenience
="$old_convenience $dir/$old_library"
3079 deplibs
="$dir/$old_library $deplibs"
3082 fi # link shared/static library?
3084 if test "$linkmode" = lib
; then
3085 if test -n "$dependency_libs" &&
3086 { test "$hardcode_into_libs" != yes ||
3087 test "$build_old_libs" = yes ||
3088 test "$link_static" = yes; }; then
3089 # Extract -R from dependency_libs
3091 for libdir
in $dependency_libs; do
3093 -R*) temp_xrpath
=`$echo "X$libdir" | $Xsed -e 's/^-R//'`
3095 *" $temp_xrpath "*) ;;
3096 *) xrpath
="$xrpath $temp_xrpath";;
3098 *) temp_deplibs
="$temp_deplibs $libdir";;
3101 dependency_libs
="$temp_deplibs"
3104 newlib_search_path
="$newlib_search_path $absdir"
3105 # Link against this library
3106 test "$link_static" = no
&& newdependency_libs
="$abs_ladir/$laname $newdependency_libs"
3107 # ... and its dependency_libs
3109 for deplib
in $dependency_libs; do
3110 newdependency_libs
="$deplib $newdependency_libs"
3111 if test "X$duplicate_deps" = "Xyes" ; then
3112 case "$tmp_libs " in
3113 *" $deplib "*) specialdeplibs
="$specialdeplibs $deplib" ;;
3116 tmp_libs
="$tmp_libs $deplib"
3119 if test "$link_all_deplibs" != no
; then
3120 # Add the search paths of all dependency libraries
3121 for deplib
in $dependency_libs; do
3123 -L*) path
="$deplib" ;;
3125 dir
=`$echo "X$deplib" | $Xsed -e 's%/[^/]*$%%'`
3126 test "X$dir" = "X$deplib" && dir
="."
3127 # We need an absolute path.
3129 [\\/]* |
[A-Za-z
]:[\\/]*) absdir
="$dir" ;;
3131 absdir
=`cd "$dir" && pwd`
3132 if test -z "$absdir"; then
3133 $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2
3138 if grep "^installed=no" $deplib > /dev
/null
; then
3139 path
="$absdir/$objdir"
3141 eval libdir
=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
3142 if test -z "$libdir"; then
3143 $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
3146 if test "$absdir" != "$libdir"; then
3147 $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2
3154 # we do not want to link against static libs,
3155 # but need to link against shared
3156 eval deplibrary_names
=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib`
3157 if test -n "$deplibrary_names" ; then
3158 for tmp
in $deplibrary_names ; do
3161 if test -f "$path/$depdepl" ; then
3162 depdepl
="$path/$depdepl"
3164 # do not add paths which are already there
3165 case " $newlib_search_path " in
3167 *) newlib_search_path
="$newlib_search_path $path";;
3180 # Again, we only want to link against shared libraries
3181 eval tmp_libs
=`$echo "X$deplib" | $Xsed -e "s,^\-l,,"`
3182 for tmp
in $newlib_search_path ; do
3183 if test -f "$tmp/lib$tmp_libs.dylib" ; then
3184 eval depdepl
="$tmp/lib$tmp_libs.dylib"
3195 case " $deplibs " in
3197 *) deplibs
="$path $deplibs" ;;
3199 case " $deplibs " in
3201 *) deplibs
="$depdepl $deplibs" ;;
3204 fi # link_all_deplibs != no
3206 done # for deplib in $libs
3207 dependency_libs
="$newdependency_libs"
3208 if test "$pass" = dlpreopen
; then
3209 # Link the dlpreopened libraries before other libraries
3210 for deplib
in $save_deplibs; do
3211 deplibs
="$deplib $deplibs"
3214 if test "$pass" != dlopen
; then
3215 if test "$pass" != conv
; then
3216 # Make sure lib_search_path contains only unique directories.
3218 for dir
in $newlib_search_path; do
3219 case "$lib_search_path " in
3221 *) lib_search_path
="$lib_search_path $dir" ;;
3227 if test "$linkmode,$pass" != "prog,link"; then
3230 vars
="compile_deplibs finalize_deplibs"
3232 for var
in $vars dependency_libs
; do
3233 # Add libraries to $var in reverse order
3234 eval tmp_libs
=\"\$
$var\"
3236 for deplib
in $tmp_libs; do
3237 # FIXME: Pedantically, this is the right thing to do, so
3238 # that some nasty dependency loop isn't accidentally
3240 #new_libs="$deplib $new_libs"
3241 # Pragmatically, this seems to cause very few problems in
3244 -L*) new_libs
="$deplib $new_libs" ;;
3247 # And here is the reason: when a library appears more
3248 # than once as an explicit dependence of a library, or
3249 # is implicitly linked in more than once by the
3250 # compiler, it is considered special, and multiple
3251 # occurrences thereof are not removed. Compare this
3252 # with having the same library being listed as a
3253 # dependency of multiple other libraries: in this case,
3254 # we know (pedantically, we assume) the library does not
3255 # need to be listed more than once, so we keep only the
3256 # last copy. This is not always right, but it is rare
3257 # enough that we require users that really mean to play
3258 # such unportable linking tricks to link the library
3259 # using -Wl,-lname, so that libtool does not consider it
3260 # for duplicate removal.
3261 case " $specialdeplibs " in
3262 *" $deplib "*) new_libs
="$deplib $new_libs" ;;
3264 case " $new_libs " in
3266 *) new_libs
="$deplib $new_libs" ;;
3274 for deplib
in $new_libs; do
3277 case " $tmp_libs " in
3279 *) tmp_libs
="$tmp_libs $deplib" ;;
3282 *) tmp_libs
="$tmp_libs $deplib" ;;
3285 eval $var=\"$tmp_libs\"
3288 # Last step: remove runtime libs from dependency_libs
3289 # (they stay in deplibs)
3291 for i
in $dependency_libs ; do
3292 case " $predeps $postdeps $compiler_lib_search_path " in
3297 if test -n "$i" ; then
3298 tmp_libs
="$tmp_libs $i"
3301 dependency_libs
=$tmp_libs
3303 if test "$linkmode" = prog
; then
3304 dlfiles
="$newdlfiles"
3305 dlprefiles
="$newdlprefiles"
3310 if test -n "$deplibs"; then
3311 $echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2
3314 if test -n "$dlfiles$dlprefiles" ||
test "$dlself" != no
; then
3315 $echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2
3318 if test -n "$rpath"; then
3319 $echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2
3322 if test -n "$xrpath"; then
3323 $echo "$modename: warning: \`-R' is ignored for archives" 1>&2
3326 if test -n "$vinfo"; then
3327 $echo "$modename: warning: \`-version-info/-version-number' is ignored for archives" 1>&2
3330 if test -n "$release"; then
3331 $echo "$modename: warning: \`-release' is ignored for archives" 1>&2
3334 if test -n "$export_symbols" ||
test -n "$export_symbols_regex"; then
3335 $echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2
3338 # Now set the variables for building old libraries.
3339 build_libtool_libs
=no
3341 objs
="$objs$old_deplibs"
3345 # Make sure we only generate libraries of the form `libNAME.la'.
3348 name
=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
3349 eval shared_ext
=\"$shrext_cmds\"
3350 eval libname
=\"$libname_spec\"
3353 if test "$module" = no
; then
3354 $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2
3358 if test "$need_lib_prefix" != no
; then
3359 # Add the "lib" prefix for modules if required
3360 name
=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
3361 eval shared_ext
=\"$shrext_cmds\"
3362 eval libname
=\"$libname_spec\"
3364 libname
=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
3369 if test -n "$objs"; then
3370 if test "$deplibs_check_method" != pass_all
; then
3371 $echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1
3375 $echo "*** Warning: Linking the shared library $output against the non-libtool"
3376 $echo "*** objects $objs is not portable!"
3377 libobjs
="$libobjs $objs"
3381 if test "$dlself" != no
; then
3382 $echo "$modename: warning: \`-dlopen self' is ignored for libtool libraries" 1>&2
3386 if test "$#" -gt 2; then
3387 $echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2
3392 if test -z "$rpath"; then
3393 if test "$build_libtool_libs" = yes; then
3394 # Building a libtool convenience library.
3395 # Some compilers have problems with a `.al' extension so
3396 # convenience libraries should have the same extension an
3397 # archive normally would.
3398 oldlibs
="$output_objdir/$libname.$libext $oldlibs"
3399 build_libtool_libs
=convenience
3403 if test -n "$vinfo"; then
3404 $echo "$modename: warning: \`-version-info/-version-number' is ignored for convenience libraries" 1>&2
3407 if test -n "$release"; then
3408 $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2
3412 # Parse the version information argument.
3413 save_ifs
="$IFS"; IFS
=':'
3414 set dummy
$vinfo 0 0 0
3417 if test -n "$8"; then
3418 $echo "$modename: too many parameters to \`-version-info'" 1>&2
3423 # convert absolute version numbers to libtool ages
3424 # this retains compatibility with .la files and attempts
3425 # to make the code below a bit more comprehensible
3427 case $vinfo_number in
3431 number_revision
="$4"
3433 # There are really only two kinds -- those that
3434 # use the current revision as the major version
3435 # and those that subtract age and use age as
3436 # a minor version. But, then there is irix
3437 # which has an extra 1 added just for fun
3439 case $version_type in
3440 darwin|linux|osf|windows
)
3441 current
=`expr $number_major + $number_minor`
3443 revision
="$number_revision"
3445 freebsd-aout|freebsd-elf|sunos
)
3446 current
="$number_major"
3447 revision
="$number_minor"
3451 current
=`expr $number_major + $number_minor - 1`
3453 revision
="$number_minor"
3464 # Check that each of the things are valid numbers.
3466 0|
[1-9]|
[1-9][0-9]|
[1-9][0-9][0-9]|
[1-9][0-9][0-9][0-9]|
[1-9][0-9][0-9][0-9][0-9]) ;;
3468 $echo "$modename: CURRENT \`$current' must be a nonnegative integer" 1>&2
3469 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
3475 0|
[1-9]|
[1-9][0-9]|
[1-9][0-9][0-9]|
[1-9][0-9][0-9][0-9]|
[1-9][0-9][0-9][0-9][0-9]) ;;
3477 $echo "$modename: REVISION \`$revision' must be a nonnegative integer" 1>&2
3478 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
3484 0|
[1-9]|
[1-9][0-9]|
[1-9][0-9][0-9]|
[1-9][0-9][0-9][0-9]|
[1-9][0-9][0-9][0-9][0-9]) ;;
3486 $echo "$modename: AGE \`$age' must be a nonnegative integer" 1>&2
3487 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
3492 if test "$age" -gt "$current"; then
3493 $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2
3494 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
3498 # Calculate the version variables.
3502 case $version_type in
3506 # Like Linux, but with the current version available in
3507 # verstring for coding it into the library header
3508 major
=.
`expr $current - $age`
3509 versuffix
="$major.$age.$revision"
3510 # Darwin ld doesn't like 0 for these options...
3511 minor_current
=`expr $current + 1`
3512 verstring
="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision"
3517 versuffix
=".$current.$revision";
3522 versuffix
=".$current";
3526 major
=`expr $current - $age + 1`
3528 case $version_type in
3529 nonstopux
) verstring_prefix
=nonstopux
;;
3530 *) verstring_prefix
=sgi
;;
3532 verstring
="$verstring_prefix$major.$revision"
3534 # Add in all the interfaces that we are compatible with.
3536 while test "$loop" -ne 0; do
3537 iface
=`expr $revision - $loop`
3538 loop
=`expr $loop - 1`
3539 verstring
="$verstring_prefix$major.$iface:$verstring"
3542 # Before this point, $major must not contain `.'.
3544 versuffix
="$major.$revision"
3548 major
=.
`expr $current - $age`
3549 versuffix
="$major.$age.$revision"
3553 major
=.
`expr $current - $age`
3554 versuffix
=".$current.$age.$revision"
3555 verstring
="$current.$age.$revision"
3557 # Add in all the interfaces that we are compatible with.
3559 while test "$loop" -ne 0; do
3560 iface
=`expr $current - $loop`
3561 loop
=`expr $loop - 1`
3562 verstring
="$verstring:${iface}.0"
3565 # Make executables depend on our current version.
3566 verstring
="$verstring:${current}.0"
3571 versuffix
=".$current.$revision"
3575 # Use '-' rather than '.', since we only want one
3576 # extension on DOS 8.3 filesystems.
3577 major
=`expr $current - $age`
3582 $echo "$modename: unknown library version type \`$version_type'" 1>&2
3583 $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
3588 # Clear the version info if we defaulted, and they specified a release.
3589 if test -z "$vinfo" && test -n "$release"; then
3591 case $version_type in
3593 # we can't check for "0.0" in archive_cmds due to quoting
3594 # problems, so we reset it completely
3601 if test "$need_version" = no
; then
3608 # Remove version info from name if versioning should be avoided
3609 if test "$avoid_version" = yes && test "$need_version" = no
; then
3615 # Check to see if the archive will have undefined symbols.
3616 if test "$allow_undefined" = yes; then
3617 if test "$allow_undefined_flag" = unsupported
; then
3618 $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2
3619 build_libtool_libs
=no
3623 # Don't allow undefined symbols.
3624 allow_undefined_flag
="$no_undefined_flag"
3628 if test "$mode" != relink
; then
3629 # Remove our outputs, but don't remove object files since they
3630 # may have been created when compiling PIC objects.
3632 tempremovelist
=`$echo "$output_objdir/*"`
3633 for p
in $tempremovelist; do
3637 $output_objdir/$outputname |
$output_objdir/$libname.
* |
$output_objdir/${libname}${release}.
*)
3638 if test "X$precious_files_regex" != "X"; then
3639 if echo $p |
$EGREP -e "$precious_files_regex" >/dev
/null
2>&1
3644 removelist
="$removelist $p"
3649 if test -n "$removelist"; then
3650 $show "${rm}r $removelist"
3651 $run ${rm}r
$removelist
3655 # Now set the variables for building old libraries.
3656 if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience
; then
3657 oldlibs
="$oldlibs $output_objdir/$libname.$libext"
3659 # Transform .lo files to .o files.
3660 oldobjs
="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP`
3663 # Eliminate all temporary directories.
3664 for path
in $notinst_path; do
3665 lib_search_path
=`$echo "$lib_search_path " | ${SED} -e 's% $path % %g'`
3666 deplibs
=`$echo "$deplibs " | ${SED} -e 's% -L$path % %g'`
3667 dependency_libs
=`$echo "$dependency_libs " | ${SED} -e 's% -L$path % %g'`
3670 if test -n "$xrpath"; then
3671 # If the user specified any rpath flags, then add them.
3673 for libdir
in $xrpath; do
3674 temp_xrpath
="$temp_xrpath -R$libdir"
3675 case "$finalize_rpath " in
3677 *) finalize_rpath
="$finalize_rpath $libdir" ;;
3680 if test "$hardcode_into_libs" != yes ||
test "$build_old_libs" = yes; then
3681 dependency_libs
="$temp_xrpath $dependency_libs"
3685 # Make sure dlfiles contains only unique files that won't be dlpreopened
3686 old_dlfiles
="$dlfiles"
3688 for lib
in $old_dlfiles; do
3689 case " $dlprefiles $dlfiles " in
3691 *) dlfiles
="$dlfiles $lib" ;;
3695 # Make sure dlprefiles contains only unique files
3696 old_dlprefiles
="$dlprefiles"
3698 for lib
in $old_dlprefiles; do
3699 case "$dlprefiles " in
3701 *) dlprefiles
="$dlprefiles $lib" ;;
3705 if test "$build_libtool_libs" = yes; then
3706 if test -n "$rpath"; then
3708 *-*-cygwin* |
*-*-mingw* |
*-*-pw32* |
*-*-os2* |
*-*-beos*)
3709 # these systems don't actually have a c library (as such)!
3711 *-*-rhapsody* |
*-*-darwin1.
[012])
3712 # Rhapsody C library is in the System framework
3713 deplibs
="$deplibs -framework System"
3716 # Don't link with libc until the a.out ld.so is fixed.
3718 *-*-openbsd* |
*-*-freebsd* |
*-*-dragonfly*)
3719 # Do not include libc due to us having libc/libc_r.
3720 test "X$arg" = "X-lc" && continue
3723 # Add libc to deplibs on all other systems if necessary.
3724 if test "$build_libtool_need_lc" = "yes"; then
3725 deplibs
="$deplibs -lc"
3731 # Transform deplibs into only deplibs that can be linked in shared.
3733 libname_save
=$libname
3734 release_save
=$release
3735 versuffix_save
=$versuffix
3737 # I'm not sure if I'm treating the release correctly. I think
3738 # release should show up in the -l (ie -lgmp5) so we don't want to
3739 # add it in twice. Is that correct?
3745 case $deplibs_check_method in
3747 # Don't check for shared/static. Everything works.
3748 # This might be a little naive. We might want to check
3749 # whether the library exists or not. But this is on
3750 # osf3 & osf4 and I'm not really sure... Just
3751 # implementing what was already the behavior.
3755 # This code stresses the "libraries are programs" paradigm to its
3756 # limits. Maybe even breaks it. We compile a program, linking it
3757 # against the deplibs as a proxy for the library. Then we can check
3758 # whether they linked in statically or dynamically with ldd.
3760 cat > conftest.c
<<EOF
3761 int main() { return 0; }
3764 $LTCC -o conftest conftest.c
$deplibs
3765 if test "$?" -eq 0 ; then
3766 ldd_output
=`ldd conftest`
3767 for i
in $deplibs; do
3768 name
="`expr $i : '-l\(.*\)'`"
3769 # If $name is empty we are operating on a -L argument.
3770 if test "$name" != "" && test "$name" -ne "0"; then
3771 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
3772 case " $predeps $postdeps " in
3774 newdeplibs
="$newdeplibs $i"
3779 if test -n "$i" ; then
3780 libname
=`eval \\$echo \"$libname_spec\"`
3781 deplib_matches
=`eval \\$echo \"$library_names_spec\"`
3782 set dummy
$deplib_matches
3784 if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
3785 newdeplibs
="$newdeplibs $i"
3789 $echo "*** Warning: dynamic linker does not accept needed library $i."
3790 $echo "*** I have the capability to make that library automatically link in when"
3791 $echo "*** you link to this library. But I can only do this if you have a"
3792 $echo "*** shared version of the library, which I believe you do not have"
3793 $echo "*** because a test_compile did reveal that the linker did not use it for"
3794 $echo "*** its dynamic dependency list that programs get resolved with at runtime."
3798 newdeplibs
="$newdeplibs $i"
3802 # Error occurred in the first compile. Let's try to salvage
3803 # the situation: Compile a separate program for each library.
3804 for i
in $deplibs; do
3805 name
="`expr $i : '-l\(.*\)'`"
3806 # If $name is empty we are operating on a -L argument.
3807 if test "$name" != "" && test "$name" != "0"; then
3809 $LTCC -o conftest conftest.c
$i
3811 if test "$?" -eq 0 ; then
3812 ldd_output
=`ldd conftest`
3813 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
3814 case " $predeps $postdeps " in
3816 newdeplibs
="$newdeplibs $i"
3821 if test -n "$i" ; then
3822 libname
=`eval \\$echo \"$libname_spec\"`
3823 deplib_matches
=`eval \\$echo \"$library_names_spec\"`
3824 set dummy
$deplib_matches
3826 if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
3827 newdeplibs
="$newdeplibs $i"
3831 $echo "*** Warning: dynamic linker does not accept needed library $i."
3832 $echo "*** I have the capability to make that library automatically link in when"
3833 $echo "*** you link to this library. But I can only do this if you have a"
3834 $echo "*** shared version of the library, which you do not appear to have"
3835 $echo "*** because a test_compile did reveal that the linker did not use this one"
3836 $echo "*** as a dynamic dependency that programs can get resolved with at runtime."
3842 $echo "*** Warning! Library $i is needed by this library but I was not able to"
3843 $echo "*** make it link in! You will probably need to install it or some"
3844 $echo "*** library that it depends on before this library will be fully"
3845 $echo "*** functional. Installing it before continuing would be even better."
3848 newdeplibs
="$newdeplibs $i"
3854 set dummy
$deplibs_check_method
3855 file_magic_regex
=`expr "$deplibs_check_method" : "$2 \(.*\)"`
3856 for a_deplib
in $deplibs; do
3857 name
="`expr $a_deplib : '-l\(.*\)'`"
3858 # If $name is empty we are operating on a -L argument.
3859 if test "$name" != "" && test "$name" != "0"; then
3860 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
3861 case " $predeps $postdeps " in
3863 newdeplibs
="$newdeplibs $a_deplib"
3868 if test -n "$a_deplib" ; then
3869 libname
=`eval \\$echo \"$libname_spec\"`
3870 for i
in $lib_search_path $sys_lib_search_path $shlib_search_path; do
3871 potential_libs
=`ls $i/$libname[.-]* 2>/dev/null`
3872 for potent_lib
in $potential_libs; do
3873 # Follow soft links.
3874 if ls -lLd "$potent_lib" 2>/dev
/null \
3875 |
grep " -> " >/dev
/null
; then
3878 # The statement above tries to avoid entering an
3879 # endless loop below, in case of cyclic links.
3880 # We might still enter an endless loop, since a link
3881 # loop can be closed while we follow links,
3883 potlib
="$potent_lib"
3884 while test -h "$potlib" 2>/dev
/null
; do
3885 potliblink
=`ls -ld $potlib | ${SED} 's/.* -> //'`
3887 [\\/]* |
[A-Za-z
]:[\\/]*) potlib
="$potliblink";;
3888 *) potlib
=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";;
3891 if eval $file_magic_cmd \"\
$potlib\" 2>/dev
/null \
3893 |
$EGREP "$file_magic_regex" > /dev
/null
; then
3894 newdeplibs
="$newdeplibs $a_deplib"
3901 if test -n "$a_deplib" ; then
3904 $echo "*** Warning: linker path does not have real file for library $a_deplib."
3905 $echo "*** I have the capability to make that library automatically link in when"
3906 $echo "*** you link to this library. But I can only do this if you have a"
3907 $echo "*** shared version of the library, which you do not appear to have"
3908 $echo "*** because I did check the linker path looking for a file starting"
3909 if test -z "$potlib" ; then
3910 $echo "*** with $libname but no candidates were found. (...for file magic test)"
3912 $echo "*** with $libname and none of the candidates passed a file format test"
3913 $echo "*** using a file magic. Last file checked: $potlib"
3917 # Add a -L argument.
3918 newdeplibs
="$newdeplibs $a_deplib"
3920 done # Gone through all deplibs.
3923 set dummy
$deplibs_check_method
3924 match_pattern_regex
=`expr "$deplibs_check_method" : "$2 \(.*\)"`
3925 for a_deplib
in $deplibs; do
3926 name
="`expr $a_deplib : '-l\(.*\)'`"
3927 # If $name is empty we are operating on a -L argument.
3928 if test -n "$name" && test "$name" != "0"; then
3929 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
3930 case " $predeps $postdeps " in
3932 newdeplibs
="$newdeplibs $a_deplib"
3937 if test -n "$a_deplib" ; then
3938 libname
=`eval \\$echo \"$libname_spec\"`
3939 for i
in $lib_search_path $sys_lib_search_path $shlib_search_path; do
3940 potential_libs
=`ls $i/$libname[.-]* 2>/dev/null`
3941 for potent_lib
in $potential_libs; do
3942 potlib
="$potent_lib" # see symlink-check above in file_magic test
3943 if eval $echo \"$potent_lib\" 2>/dev
/null \
3945 |
$EGREP "$match_pattern_regex" > /dev
/null
; then
3946 newdeplibs
="$newdeplibs $a_deplib"
3953 if test -n "$a_deplib" ; then
3956 $echo "*** Warning: linker path does not have real file for library $a_deplib."
3957 $echo "*** I have the capability to make that library automatically link in when"
3958 $echo "*** you link to this library. But I can only do this if you have a"
3959 $echo "*** shared version of the library, which you do not appear to have"
3960 $echo "*** because I did check the linker path looking for a file starting"
3961 if test -z "$potlib" ; then
3962 $echo "*** with $libname but no candidates were found. (...for regex pattern test)"
3964 $echo "*** with $libname and none of the candidates passed a file format test"
3965 $echo "*** using a regex pattern. Last file checked: $potlib"
3969 # Add a -L argument.
3970 newdeplibs
="$newdeplibs $a_deplib"
3972 done # Gone through all deplibs.
3976 tmp_deplibs
=`$echo "X $deplibs" | $Xsed -e 's/ -lc$//' \
3977 -e 's/ -[LR][^ ]*//g'`
3978 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
3979 for i
in $predeps $postdeps ; do
3980 # can't use Xsed below, because $i might contain '/'
3981 tmp_deplibs
=`$echo "X $tmp_deplibs" | ${SED} -e "1s,^X,," -e "s,$i,,"`
3984 if $echo "X $tmp_deplibs" |
$Xsed -e 's/[ ]//g' \
3985 |
grep .
>/dev
/null
; then
3987 if test "X$deplibs_check_method" = "Xnone"; then
3988 $echo "*** Warning: inter-library dependencies are not supported in this platform."
3990 $echo "*** Warning: inter-library dependencies are not known to be supported."
3992 $echo "*** All declared inter-library dependencies are being dropped."
3997 versuffix
=$versuffix_save
3999 release
=$release_save
4000 libname
=$libname_save
4004 *-*-rhapsody* |
*-*-darwin1.
[012])
4005 # On Rhapsody replace the C library is the System framework
4006 newdeplibs
=`$echo "X $newdeplibs" | $Xsed -e 's/ -lc / -framework System /'`
4010 if test "$droppeddeps" = yes; then
4011 if test "$module" = yes; then
4013 $echo "*** Warning: libtool could not satisfy all declared inter-library"
4014 $echo "*** dependencies of module $libname. Therefore, libtool will create"
4015 $echo "*** a static module, that should work as long as the dlopening"
4016 $echo "*** application is linked with the -dlopen flag."
4017 if test -z "$global_symbol_pipe"; then
4019 $echo "*** However, this would only work if libtool was able to extract symbol"
4020 $echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
4021 $echo "*** not find such a program. So, this module is probably useless."
4022 $echo "*** \`nm' from GNU binutils and a full rebuild may help."
4024 if test "$build_old_libs" = no
; then
4025 oldlibs
="$output_objdir/$libname.$libext"
4026 build_libtool_libs
=module
4029 build_libtool_libs
=no
4032 $echo "*** The inter-library dependencies that have been dropped here will be"
4033 $echo "*** automatically added whenever a program is linked with this library"
4034 $echo "*** or is declared to -dlopen it."
4036 if test "$allow_undefined" = no
; then
4038 $echo "*** Since this library must not contain undefined symbols,"
4039 $echo "*** because either the platform does not support them or"
4040 $echo "*** it was explicitly requested with -no-undefined,"
4041 $echo "*** libtool will only create a static version of it."
4042 if test "$build_old_libs" = no
; then
4043 oldlibs
="$output_objdir/$libname.$libext"
4044 build_libtool_libs
=module
4047 build_libtool_libs
=no
4052 # Done checking deplibs!
4056 # All the library-specific variables (install_libdir is set above).
4061 # Test again, we may have decided not to build it any more
4062 if test "$build_libtool_libs" = yes; then
4063 if test "$hardcode_into_libs" = yes; then
4064 # Hardcode the library paths
4067 rpath
="$finalize_rpath"
4068 test "$mode" != relink
&& rpath
="$compile_rpath$rpath"
4069 for libdir
in $rpath; do
4070 if test -n "$hardcode_libdir_flag_spec"; then
4071 if test -n "$hardcode_libdir_separator"; then
4072 if test -z "$hardcode_libdirs"; then
4073 hardcode_libdirs
="$libdir"
4075 # Just accumulate the unique libdirs.
4076 case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
4077 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
4080 hardcode_libdirs
="$hardcode_libdirs$hardcode_libdir_separator$libdir"
4085 eval flag
=\"$hardcode_libdir_flag_spec\"
4086 dep_rpath
="$dep_rpath $flag"
4088 elif test -n "$runpath_var"; then
4089 case "$perm_rpath " in
4091 *) perm_rpath
="$perm_rpath $libdir" ;;
4095 # Substitute the hardcoded libdirs into the rpath.
4096 if test -n "$hardcode_libdir_separator" &&
4097 test -n "$hardcode_libdirs"; then
4098 libdir
="$hardcode_libdirs"
4099 if test -n "$hardcode_libdir_flag_spec_ld"; then
4100 eval dep_rpath
=\"$hardcode_libdir_flag_spec_ld\"
4102 eval dep_rpath
=\"$hardcode_libdir_flag_spec\"
4105 if test -n "$runpath_var" && test -n "$perm_rpath"; then
4106 # We should set the runpath_var.
4108 for dir
in $perm_rpath; do
4111 eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var"
4113 test -n "$dep_rpath" && deplibs
="$dep_rpath $deplibs"
4116 shlibpath
="$finalize_shlibpath"
4117 test "$mode" != relink
&& shlibpath
="$compile_shlibpath$shlibpath"
4118 if test -n "$shlibpath"; then
4119 eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var"
4122 # Get the real and link names of the library.
4123 eval shared_ext
=\"$shrext_cmds\"
4124 eval library_names
=\"$library_names_spec\"
4125 set dummy
$library_names
4129 if test -n "$soname_spec"; then
4130 eval soname
=\"$soname_spec\"
4134 if test -z "$dlname"; then
4138 lib
="$output_objdir/$realname"
4141 linknames
="$linknames $link"
4144 # Use standard objects if they are pic
4145 test -z "$pic_flag" && libobjs
=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
4147 # Prepare the list of exported symbols
4148 if test -z "$export_symbols"; then
4149 if test "$always_export_symbols" = yes ||
test -n "$export_symbols_regex"; then
4150 $show "generating symbol list for \`$libname.la'"
4151 export_symbols
="$output_objdir/$libname.exp"
4152 $run $rm $export_symbols
4153 cmds
=$export_symbols_cmds
4154 save_ifs
="$IFS"; IFS
='~'
4155 for cmd
in $cmds; do
4158 if len
=`expr "X$cmd" : ".*"` &&
4159 test "$len" -le "$max_cmd_len" ||
test "$max_cmd_len" -le -1; then
4161 $run eval "$cmd" ||
exit $?
4162 skipped_export
=false
4164 # The command line is too long to execute in one step.
4165 $show "using reloadable object file for export list..."
4170 if test -n "$export_symbols_regex"; then
4171 $show "$EGREP -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\""
4172 $run eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
4173 $show "$mv \"${export_symbols}T\" \"$export_symbols\""
4174 $run eval '$mv "${export_symbols}T" "$export_symbols"'
4179 if test -n "$export_symbols" && test -n "$include_expsyms"; then
4180 $run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"'
4184 for test_deplib
in $deplibs; do
4185 case " $convenience " in
4186 *" $test_deplib "*) ;;
4188 tmp_deplibs
="$tmp_deplibs $test_deplib"
4192 deplibs
="$tmp_deplibs"
4194 if test -n "$convenience"; then
4195 if test -n "$whole_archive_flag_spec"; then
4196 save_libobjs
=$libobjs
4197 eval libobjs
=\"\
$libobjs $whole_archive_flag_spec\"
4199 gentop
="$output_objdir/${outputname}x"
4200 generated
="$generated $gentop"
4202 func_extract_archives
$gentop $convenience
4203 libobjs
="$libobjs $func_extract_archives_result"
4207 if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
4208 eval flag
=\"$thread_safe_flag_spec\"
4209 linker_flags
="$linker_flags $flag"
4212 # Make a backup of the uninstalled library when relinking
4213 if test "$mode" = relink
; then
4214 $run eval '(cd $output_objdir && $rm ${realname}U && $mv $realname ${realname}U)' ||
exit $?
4217 # Do each of the archive commands.
4218 if test "$module" = yes && test -n "$module_cmds" ; then
4219 if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
4220 eval test_cmds
=\"$module_expsym_cmds\"
4221 cmds
=$module_expsym_cmds
4223 eval test_cmds
=\"$module_cmds\"
4227 if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
4228 eval test_cmds
=\"$archive_expsym_cmds\"
4229 cmds
=$archive_expsym_cmds
4231 eval test_cmds
=\"$archive_cmds\"
4236 if test "X$skipped_export" != "X:" && len
=`expr "X$test_cmds" : ".*"` &&
4237 test "$len" -le "$max_cmd_len" ||
test "$max_cmd_len" -le -1; then
4240 # The command line is too long to link in one step, link piecewise.
4241 $echo "creating reloadable object files..."
4243 # Save the value of $output and $libobjs because we want to
4244 # use them later. If we have whole_archive_flag_spec, we
4245 # want to use save_libobjs as it was before
4246 # whole_archive_flag_spec was expanded, because we can't
4247 # assume the linker understands whole_archive_flag_spec.
4248 # This may have to be revisited, in case too many
4249 # convenience libraries get linked in and end up exceeding
4251 if test -z "$convenience" ||
test -z "$whole_archive_flag_spec"; then
4252 save_libobjs
=$libobjs
4255 output_la
=`$echo "X$output" | $Xsed -e "$basename"`
4257 # Clear the reloadable object creation command queue and
4258 # initialize k to one.
4265 output
=$output_objdir/$output_la-${k}.
$objext
4266 # Loop over the list of objects to be linked.
4267 for obj
in $save_libobjs
4269 eval test_cmds
=\"$reload_cmds $objlist $last_robj\"
4270 if test "X$objlist" = X ||
4271 { len
=`expr "X$test_cmds" : ".*"` &&
4272 test "$len" -le "$max_cmd_len"; }; then
4273 objlist
="$objlist $obj"
4275 # The command $test_cmds is almost too long, add a
4276 # command to the queue.
4277 if test "$k" -eq 1 ; then
4278 # The first file doesn't have a previous command to add.
4279 eval concat_cmds
=\"$reload_cmds $objlist $last_robj\"
4281 # All subsequent reloadable object files will link in
4282 # the last one created.
4283 eval concat_cmds
=\"\
$concat_cmds~
$reload_cmds $objlist $last_robj\"
4285 last_robj
=$output_objdir/$output_la-${k}.
$objext
4287 output
=$output_objdir/$output_la-${k}.
$objext
4292 # Handle the remaining objects by creating one last
4293 # reloadable object file. All subsequent reloadable object
4294 # files will link in the last one created.
4295 test -z "$concat_cmds" || concat_cmds
=$concat_cmds~
4296 eval concat_cmds
=\"\
${concat_cmds}$reload_cmds $objlist $last_robj\"
4298 if ${skipped_export-false}; then
4299 $show "generating symbol list for \`$libname.la'"
4300 export_symbols
="$output_objdir/$libname.exp"
4301 $run $rm $export_symbols
4303 # Append the command to create the export file.
4304 eval concat_cmds
=\"\
$concat_cmds~
$export_symbols_cmds\"
4307 # Set up a command to remove the reloadable object files
4308 # after they are used.
4310 while test "$i" -lt "$k"
4313 delfiles
="$delfiles $output_objdir/$output_la-${i}.$objext"
4316 $echo "creating a temporary reloadable object file: $output"
4318 # Loop through the commands generated above and execute them.
4319 save_ifs
="$IFS"; IFS
='~'
4320 for cmd
in $concat_cmds; do
4323 $run eval "$cmd" ||
exit $?
4328 # Restore the value of output.
4331 if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then
4332 eval libobjs
=\"\
$libobjs $whole_archive_flag_spec\"
4334 # Expand the library linking commands again to reset the
4335 # value of $libobjs for piecewise linking.
4337 # Do each of the archive commands.
4338 if test "$module" = yes && test -n "$module_cmds" ; then
4339 if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
4340 cmds
=$module_expsym_cmds
4345 if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
4346 cmds
=$archive_expsym_cmds
4352 # Append the command to remove the reloadable object files
4353 # to the just-reset $cmds.
4354 eval cmds
=\"\
$cmds~\
$rm $delfiles\"
4356 save_ifs
="$IFS"; IFS
='~'
4357 for cmd
in $cmds; do
4361 $run eval "$cmd" ||
exit $?
4365 # Restore the uninstalled library and exit
4366 if test "$mode" = relink
; then
4367 $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' ||
exit $?
4371 # Create links to the real library.
4372 for linkname
in $linknames; do
4373 if test "$realname" != "$linkname"; then
4374 $show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)"
4375 $run eval '(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)' ||
exit $?
4379 # If -module or -export-dynamic was specified, set the dlname.
4380 if test "$module" = yes ||
test "$export_dynamic" = yes; then
4381 # On all known operating systems, these are identical.
4388 if test -n "$deplibs"; then
4389 $echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2
4392 if test -n "$dlfiles$dlprefiles" ||
test "$dlself" != no
; then
4393 $echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2
4396 if test -n "$rpath"; then
4397 $echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2
4400 if test -n "$xrpath"; then
4401 $echo "$modename: warning: \`-R' is ignored for objects" 1>&2
4404 if test -n "$vinfo"; then
4405 $echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2
4408 if test -n "$release"; then
4409 $echo "$modename: warning: \`-release' is ignored for objects" 1>&2
4414 if test -n "$objs$old_deplibs"; then
4415 $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2
4419 obj
=`$echo "X$output" | $Xsed -e "$lo2o"`
4427 # Delete the old objects.
4428 $run $rm $obj $libobj
4430 # Objects from convenience libraries. This assumes
4431 # single-version convenience libraries. Whenever we create
4432 # different ones for PIC/non-PIC, this we'll have to duplicate
4436 # reload_cmds runs $LD directly, so let us get rid of
4437 # -Wl from whole_archive_flag_spec
4440 if test -n "$convenience"; then
4441 if test -n "$whole_archive_flag_spec"; then
4442 eval reload_conv_objs
=\"\
$reload_objs $whole_archive_flag_spec\"
4444 gentop
="$output_objdir/${obj}x"
4445 generated
="$generated $gentop"
4447 func_extract_archives
$gentop $convenience
4448 reload_conv_objs
="$reload_objs $func_extract_archives_result"
4452 # Create the old-style object.
4453 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
4457 save_ifs
="$IFS"; IFS
='~'
4458 for cmd
in $cmds; do
4462 $run eval "$cmd" ||
exit $?
4466 # Exit if we aren't doing a library object file.
4467 if test -z "$libobj"; then
4468 if test -n "$gentop"; then
4469 $show "${rm}r $gentop"
4476 if test "$build_libtool_libs" != yes; then
4477 if test -n "$gentop"; then
4478 $show "${rm}r $gentop"
4482 # Create an invalid libtool object if no PIC, so that we don't
4483 # accidentally link it into a program.
4484 # $show "echo timestamp > $libobj"
4485 # $run eval "echo timestamp > $libobj" || exit $?
4489 if test -n "$pic_flag" ||
test "$pic_mode" != default
; then
4490 # Only do commands if we really have different PIC objects.
4491 reload_objs
="$libobjs $reload_conv_objs"
4494 save_ifs
="$IFS"; IFS
='~'
4495 for cmd
in $cmds; do
4499 $run eval "$cmd" ||
exit $?
4504 if test -n "$gentop"; then
4505 $show "${rm}r $gentop"
4514 *cygwin
*) output
=`$echo $output | ${SED} -e 's,.exe$,,;s,$,.exe,'` ;;
4516 if test -n "$vinfo"; then
4517 $echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2
4520 if test -n "$release"; then
4521 $echo "$modename: warning: \`-release' is ignored for programs" 1>&2
4524 if test "$preload" = yes; then
4525 if test "$dlopen_support" = unknown
&& test "$dlopen_self" = unknown
&&
4526 test "$dlopen_self_static" = unknown
; then
4527 $echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support."
4532 *-*-rhapsody* |
*-*-darwin1.
[012])
4533 # On Rhapsody replace the C library is the System framework
4534 compile_deplibs
=`$echo "X $compile_deplibs" | $Xsed -e 's/ -lc / -framework System /'`
4535 finalize_deplibs
=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'`
4541 # Don't allow lazy linking, it breaks C++ global constructors
4542 if test "$tagname" = CXX
; then
4543 compile_command
="$compile_command ${wl}-bind_at_load"
4544 finalize_command
="$finalize_command ${wl}-bind_at_load"
4549 compile_command
="$compile_command $compile_deplibs"
4550 finalize_command
="$finalize_command $finalize_deplibs"
4552 if test -n "$rpath$xrpath"; then
4553 # If the user specified any rpath flags, then add them.
4554 for libdir
in $rpath $xrpath; do
4555 # This is the magic to use -rpath.
4556 case "$finalize_rpath " in
4558 *) finalize_rpath
="$finalize_rpath $libdir" ;;
4563 # Now hardcode the library paths
4566 for libdir
in $compile_rpath $finalize_rpath; do
4567 if test -n "$hardcode_libdir_flag_spec"; then
4568 if test -n "$hardcode_libdir_separator"; then
4569 if test -z "$hardcode_libdirs"; then
4570 hardcode_libdirs
="$libdir"
4572 # Just accumulate the unique libdirs.
4573 case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
4574 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
4577 hardcode_libdirs
="$hardcode_libdirs$hardcode_libdir_separator$libdir"
4582 eval flag
=\"$hardcode_libdir_flag_spec\"
4583 rpath
="$rpath $flag"
4585 elif test -n "$runpath_var"; then
4586 case "$perm_rpath " in
4588 *) perm_rpath
="$perm_rpath $libdir" ;;
4592 *-*-cygwin* |
*-*-mingw* |
*-*-pw32* |
*-*-os2*)
4593 case :$dllsearchpath: in
4595 *) dllsearchpath
="$dllsearchpath:$libdir";;
4600 # Substitute the hardcoded libdirs into the rpath.
4601 if test -n "$hardcode_libdir_separator" &&
4602 test -n "$hardcode_libdirs"; then
4603 libdir
="$hardcode_libdirs"
4604 eval rpath
=\" $hardcode_libdir_flag_spec\"
4606 compile_rpath
="$rpath"
4610 for libdir
in $finalize_rpath; do
4611 if test -n "$hardcode_libdir_flag_spec"; then
4612 if test -n "$hardcode_libdir_separator"; then
4613 if test -z "$hardcode_libdirs"; then
4614 hardcode_libdirs
="$libdir"
4616 # Just accumulate the unique libdirs.
4617 case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
4618 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
4621 hardcode_libdirs
="$hardcode_libdirs$hardcode_libdir_separator$libdir"
4626 eval flag
=\"$hardcode_libdir_flag_spec\"
4627 rpath
="$rpath $flag"
4629 elif test -n "$runpath_var"; then
4630 case "$finalize_perm_rpath " in
4632 *) finalize_perm_rpath
="$finalize_perm_rpath $libdir" ;;
4636 # Substitute the hardcoded libdirs into the rpath.
4637 if test -n "$hardcode_libdir_separator" &&
4638 test -n "$hardcode_libdirs"; then
4639 libdir
="$hardcode_libdirs"
4640 eval rpath
=\" $hardcode_libdir_flag_spec\"
4642 finalize_rpath
="$rpath"
4644 if test -n "$libobjs" && test "$build_old_libs" = yes; then
4645 # Transform all the library objects into standard objects.
4646 compile_command
=`$echo "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
4647 finalize_command
=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
4651 if test -n "$dlfiles$dlprefiles" ||
test "$dlself" != no
; then
4652 if test -n "$NM" && test -n "$global_symbol_pipe"; then
4653 dlsyms
="${outputname}S.c"
4655 $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2
4659 if test -n "$dlsyms"; then
4663 # Discover the nlist of each of the dlfiles.
4664 nlist
="$output_objdir/${outputname}.nm"
4666 $show "$rm $nlist ${nlist}S ${nlist}T"
4667 $run $rm "$nlist" "${nlist}S" "${nlist}T"
4669 # Parse the name list into a source file.
4670 $show "creating $output_objdir/$dlsyms"
4672 test -z "$run" && $echo > "$output_objdir/$dlsyms" "\
4673 /* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */
4674 /* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */
4680 /* Prevent the only kind of declaration conflicts we can make. */
4681 #define lt_preloaded_symbols some_other_symbol
4683 /* External symbol declarations for the compiler. */\
4686 if test "$dlself" = yes; then
4687 $show "generating symbol list for \`$output'"
4689 test -z "$run" && $echo ': @PROGRAM@ ' > "$nlist"
4691 # Add our own program objects to the symbol list.
4692 progfiles
=`$echo "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
4693 for arg
in $progfiles; do
4694 $show "extracting global C symbols from \`$arg'"
4695 $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
4698 if test -n "$exclude_expsyms"; then
4699 $run eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T'
4700 $run eval '$mv "$nlist"T "$nlist"'
4703 if test -n "$export_symbols_regex"; then
4704 $run eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T'
4705 $run eval '$mv "$nlist"T "$nlist"'
4708 # Prepare the list of exported symbols
4709 if test -z "$export_symbols"; then
4710 export_symbols
="$output_objdir/$outputname.exp"
4711 $run $rm $export_symbols
4712 $run eval "${SED} -n -e '/^: @PROGRAM@$/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
4714 $run eval "${SED} -e 's/\([ ][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"'
4715 $run eval 'grep -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T'
4716 $run eval 'mv "$nlist"T "$nlist"'
4720 for arg
in $dlprefiles; do
4721 $show "extracting global C symbols from \`$arg'"
4722 name
=`$echo "$arg" | ${SED} -e 's%^.*/%%'`
4723 $run eval '$echo ": $name " >> "$nlist"'
4724 $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
4727 if test -z "$run"; then
4728 # Make sure we have at least an empty file.
4729 test -f "$nlist" ||
: > "$nlist"
4731 if test -n "$exclude_expsyms"; then
4732 $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T
4733 $mv "$nlist"T
"$nlist"
4736 # Try sorting and uniquifying the output.
4737 if grep -v "^: " < "$nlist" |
4738 if sort -k 3 </dev
/null
>/dev
/null
2>&1; then
4743 uniq > "$nlist"S
; then
4746 grep -v "^: " < "$nlist" > "$nlist"S
4749 if test -f "$nlist"S
; then
4750 eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$dlsyms"'
4752 $echo '/* NONE */' >> "$output_objdir/$dlsyms"
4755 $echo >> "$output_objdir/$dlsyms" "\
4757 #undef lt_preloaded_symbols
4759 #if defined (__STDC__) && __STDC__
4760 # define lt_ptr void *
4762 # define lt_ptr char *
4766 /* The mapping between symbol names and symbols. */
4770 *cygwin
* |
*mingw
* )
4771 $echo >> "$output_objdir/$dlsyms" "\
4772 /* DATA imports from DLLs on WIN32 can't be const, because
4773 runtime relocations are performed -- see ld's documentation
4779 $echo >> "$output_objdir/$dlsyms" "\
4786 $echo >> "$output_objdir/$dlsyms" "\
4790 lt_preloaded_symbols[] =
4794 eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$dlsyms"
4796 $echo >> "$output_objdir/$dlsyms" "\
4800 /* This works around a problem in FreeBSD linker */
4801 #ifdef FREEBSD_WORKAROUND
4802 static const void *lt_preloaded_setup() {
4803 return lt_preloaded_symbols;
4813 pic_flag_for_symtable
=
4815 # compiling the symbol table file with pic_flag works around
4816 # a FreeBSD bug that causes programs to crash when -lm is
4817 # linked before any other PIC object. But we must not use
4818 # pic_flag when linking with -static. The problem exists in
4819 # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1.
4820 *-*-freebsd2*|
*-*-freebsd3.0
*|
*-*-freebsdelf3.0
*)
4821 case "$compile_command " in
4823 *) pic_flag_for_symtable
=" $pic_flag -DFREEBSD_WORKAROUND";;
4826 case "$compile_command " in
4828 *) pic_flag_for_symtable
=" $pic_flag";;
4832 # Now compile the dynamic symbol file.
4833 $show "(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")"
4834 $run eval '(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' ||
exit $?
4836 # Clean up the generated files.
4837 $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T"
4838 $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T"
4840 # Transform the symbol file into the correct name.
4841 compile_command
=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
4842 finalize_command
=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
4845 $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2
4850 # We keep going just in case the user didn't refer to
4851 # lt_preloaded_symbols. The linker will fail if global_symbol_pipe
4852 # really was required.
4854 # Nullify the symbol file.
4855 compile_command
=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"`
4856 finalize_command
=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"`
4859 if test "$need_relink" = no ||
test "$build_libtool_libs" != yes; then
4860 # Replace the output file specification.
4861 compile_command
=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
4862 link_command
="$compile_command$compile_rpath"
4864 # We have no uninstalled library dependencies, so finalize right now.
4865 $show "$link_command"
4866 $run eval "$link_command"
4869 # Delete the generated files.
4870 if test -n "$dlsyms"; then
4871 $show "$rm $output_objdir/${outputname}S.${objext}"
4872 $run $rm "$output_objdir/${outputname}S.${objext}"
4878 if test -n "$shlibpath_var"; then
4879 # We should set the shlibpath_var
4881 for dir
in $temp_rpath; do
4883 [\\/]* |
[A-Za-z
]:[\\/]*)
4888 # Relative path: add a thisdir entry.
4889 rpath
="$rpath\$thisdir/$dir:"
4896 if test -n "$compile_shlibpath$finalize_shlibpath"; then
4897 compile_command
="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command"
4899 if test -n "$finalize_shlibpath"; then
4900 finalize_command
="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command"
4905 if test -n "$runpath_var"; then
4906 if test -n "$perm_rpath"; then
4907 # We should set the runpath_var.
4909 for dir
in $perm_rpath; do
4912 compile_var
="$runpath_var=\"$rpath\$$runpath_var\" "
4914 if test -n "$finalize_perm_rpath"; then
4915 # We should set the runpath_var.
4917 for dir
in $finalize_perm_rpath; do
4920 finalize_var
="$runpath_var=\"$rpath\$$runpath_var\" "
4924 if test "$no_install" = yes; then
4925 # We don't need to create a wrapper script.
4926 link_command
="$compile_var$compile_command$compile_rpath"
4927 # Replace the output file specification.
4928 link_command
=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
4929 # Delete the old output file.
4931 # Link the executable and exit
4932 $show "$link_command"
4933 $run eval "$link_command" ||
exit $?
4937 if test "$hardcode_action" = relink
; then
4938 # Fast installation is not supported
4939 link_command
="$compile_var$compile_command$compile_rpath"
4940 relink_command
="$finalize_var$finalize_command$finalize_rpath"
4942 $echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2
4943 $echo "$modename: \`$output' will be relinked during installation" 1>&2
4945 if test "$fast_install" != no
; then
4946 link_command
="$finalize_var$compile_command$finalize_rpath"
4947 if test "$fast_install" = yes; then
4948 relink_command
=`$echo "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'`
4950 # fast_install is set to needless
4954 link_command
="$compile_var$compile_command$compile_rpath"
4955 relink_command
="$finalize_var$finalize_command$finalize_rpath"
4959 # Replace the output file specification.
4960 link_command
=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
4962 # Delete the old output files.
4963 $run $rm $output $output_objdir/$outputname $output_objdir/lt-
$outputname
4965 $show "$link_command"
4966 $run eval "$link_command" ||
exit $?
4968 # Now create the wrapper script.
4969 $show "creating $output"
4971 # Quote the relink command for shipping.
4972 if test -n "$relink_command"; then
4973 # Preserve any variables that may affect compiler behavior
4974 for var
in $variables_saved_for_relink; do
4975 if eval test -z \"\
${$var+set}\"; then
4976 relink_command
="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command"
4977 elif eval var_value
=\$
$var; test -z "$var_value"; then
4978 relink_command
="$var=; export $var; $relink_command"
4980 var_value
=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"`
4981 relink_command
="$var=\"$var_value\"; export $var; $relink_command"
4984 relink_command
="(cd `pwd`; $relink_command)"
4985 relink_command
=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
4988 # Quote $echo for shipping.
4989 if test "X$echo" = "X$SHELL $progpath --fallback-echo"; then
4991 [\\/]* |
[A-Za-z
]:[\\/]*) qecho
="$SHELL $progpath --fallback-echo";;
4992 *) qecho
="$SHELL `pwd`/$progpath --fallback-echo";;
4994 qecho
=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"`
4996 qecho
=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"`
4999 # Only actually do things if our run command is non-null.
5000 if test -z "$run"; then
5001 # win32 will think the script is a binary if it has
5002 # a .exe suffix, so we strip it off here.
5004 *.exe
) output
=`$echo $output|${SED} 's,.exe$,,'` ;;
5006 # test for cygwin because mv fails w/o .exe extensions
5010 outputname
=`$echo $outputname|${SED} 's,.exe$,,'` ;;
5014 *cygwin
* |
*mingw
* )
5015 cwrappersource
=`$echo ${objdir}/lt-${outputname}.c`
5016 cwrapper
=`$echo ${output}.exe`
5017 $rm $cwrappersource $cwrapper
5018 trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15
5020 cat > $cwrappersource <<EOF
5022 /* $cwrappersource - temporary wrapper executable for $objdir/$outputname
5023 Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
5025 The $output program cannot be directly executed until all the libtool
5026 libraries that it depends on are installed.
5028 This wrapper executable should never be moved out of the build directory.
5029 If it is, it will not operate correctly.
5031 Currently, it simply execs the wrapper *script* "/bin/sh $output",
5032 but could eventually absorb all of the scripts functionality and
5033 exec $objdir/$outputname directly.
5036 cat >> $cwrappersource<<"EOF"
5044 #if defined(PATH_MAX)
5045 # define LT_PATHMAX PATH_MAX
5046 #elif defined(MAXPATHLEN)
5047 # define LT_PATHMAX MAXPATHLEN
5049 # define LT_PATHMAX 1024
5052 #ifndef DIR_SEPARATOR
5053 #define DIR_SEPARATOR '/'
5056 #if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \
5058 #define HAVE_DOS_BASED_FILE_SYSTEM
5059 #ifndef DIR_SEPARATOR_2
5060 #define DIR_SEPARATOR_2 '\\'
5064 #ifndef DIR_SEPARATOR_2
5065 # define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR)
5066 #else /* DIR_SEPARATOR_2 */
5067 # define IS_DIR_SEPARATOR(ch) \
5068 (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2))
5069 #endif /* DIR_SEPARATOR_2 */
5071 #define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type)))
5072 #define XFREE(stale) do { \
5073 if (stale) { free ((void *) stale); stale = 0; } \
5076 const char *program_name = NULL;
5078 void * xmalloc (size_t num);
5079 char * xstrdup (const char *string);
5080 char * basename (const char *name);
5081 char * fnqualify(const char *path);
5082 char * strendzap(char *str, const char *pat);
5083 void lt_fatal (const char *message, ...);
5086 main (int argc, char *argv[])
5091 program_name = (char *) xstrdup ((char *) basename (argv[0]));
5092 newargz = XMALLOC(char *, argc+2);
5095 cat >> $cwrappersource <<EOF
5096 newargz[0] = "$SHELL";
5099 cat >> $cwrappersource <<"EOF"
5100 newargz
[1] = fnqualify
(argv
[0]);
5101 /* we know the
script has the same name
, without the .exe
*/
5102 /* so
make sure newargz
[1] doesn
't end in .exe */
5103 strendzap(newargz[1],".exe");
5104 for (i = 1; i < argc; i++)
5105 newargz[i+1] = xstrdup(argv[i]);
5106 newargz[argc+1] = NULL;
5109 cat >> $cwrappersource <<EOF
5110 execv("$SHELL",newargz);
5113 cat >> $cwrappersource <<"EOF"
5117 xmalloc (size_t num)
5119 void * p = (void *) malloc (num);
5121 lt_fatal ("Memory exhausted");
5127 xstrdup (const char *string)
5129 return string ? strcpy ((char *) xmalloc (strlen (string) + 1), string) : NULL
5134 basename (const char *name)
5138 #if defined (HAVE_DOS_BASED_FILE_SYSTEM)
5139 /* Skip over the disk name in MSDOS pathnames. */
5140 if (isalpha (name[0]) && name[1] == ':')
5144 for (base = name; *name; name++)
5145 if (IS_DIR_SEPARATOR (*name))
5147 return (char *) base;
5151 fnqualify(const char *path)
5155 char tmp[LT_PATHMAX + 1];
5157 assert(path != NULL);
5159 /* Is it qualified already? */
5160 #if defined (HAVE_DOS_BASED_FILE_SYSTEM)
5161 if (isalpha (path[0]) && path[1] == ':')
5162 return xstrdup (path);
5164 if (IS_DIR_SEPARATOR (path[0]))
5165 return xstrdup (path);
5167 /* prepend the current directory */
5168 /* doesn't handle
'~' */
5169 if (getcwd
(tmp
, LT_PATHMAX
) == NULL
)
5170 lt_fatal
("getcwd failed");
5171 size
= strlen
(tmp
) + 1 + strlen
(path
) + 1; /* +2 for '/' and
'\0' */
5172 p
= XMALLOC
(char
, size
);
5173 sprintf
(p
, "%s%c%s", tmp
, DIR_SEPARATOR
, path
);
5178 strendzap
(char
*str
, const char
*pat
)
5182 assert
(str
!= NULL
);
5183 assert
(pat
!= NULL
);
5186 patlen
= strlen
(pat
);
5190 str
+= len
- patlen
;
5191 if (strcmp
(str
, pat
) == 0)
5198 lt_error_core
(int exit_status
, const char
* mode
,
5199 const char
* message
, va_list ap
)
5201 fprintf
(stderr
, "%s: %s: ", program_name
, mode
);
5202 vfprintf
(stderr
, message
, ap
);
5203 fprintf
(stderr
, ".\n");
5205 if (exit_status
>= 0)
5210 lt_fatal
(const char
*message
, ...
)
5213 va_start
(ap
, message
);
5214 lt_error_core
(EXIT_FAILURE
, "FATAL", message
, ap
);
5218 # we should really use a build-platform specific compiler
5219 # here, but OTOH, the wrappers (shell script and this C one)
5220 # are only useful if you want to execute the "real" binary.
5221 # Since the "real" binary is built for $host, then this
5222 # wrapper might as well be built for $host, too.
5223 $run $LTCC -s -o $cwrapper $cwrappersource
5227 trap "$rm $output; exit $EXIT_FAILURE" 1 2 15
5232 # $output - temporary wrapper script for $objdir/$outputname
5233 # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
5235 # The $output program cannot be directly executed until all the libtool
5236 # libraries that it depends on are installed.
5238 # This wrapper script should never be moved out of the build directory.
5239 # If it is, it will not operate correctly.
5241 # Sed substitution that helps us do robust quoting. It backslashifies
5242 # metacharacters that are still active within double-quoted strings.
5243 Xsed='${SED} -e 1s/^X//'
5244 sed_quote_subst='$sed_quote_subst'
5246 # The HP-UX ksh and POSIX shell print the target directory to stdout
5248 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
5250 relink_command=\"$relink_command\"
5252 # This environment variable determines our operation mode.
5253 if test \"\$libtool_install_magic\" = \"$magic\"; then
5254 # install mode needs the following variable:
5255 notinst_deplibs='$notinst_deplibs'
5257 # When we are sourced in execute mode, \$file and \$echo are already set.
5258 if test \"\$libtool_execute_magic\" != \"$magic\"; then
5261 # Make sure echo works.
5262 if test \"X\$1\" = X--no-reexec; then
5263 # Discard the --no-reexec flag, and continue.
5265 elif test \"X\`(\$echo '\t') 2>/dev/null\`\" = 'X\t'; then
5266 # Yippee, \$echo works!
5269 # Restart under the correct shell, and then maybe \$echo will work.
5270 exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"}
5276 # Find the directory that this script lives in.
5277 thisdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\`
5278 test \"x\$thisdir\" = \"x\$file\" && thisdir=.
5280 # Follow symbolic links until we get to the real thisdir.
5281 file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\`
5282 while test -n \"\$file\"; do
5283 destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\`
5285 # If there was a directory component, then change thisdir.
5286 if test \"x\$destdir\" != \"x\$file\"; then
5287 case \"\$destdir\" in
5288 [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;;
5289 *) thisdir=\"\$thisdir/\$destdir\" ;;
5293 file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\`
5294 file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\`
5297 # Try to get the absolute directory name.
5298 absdir=\`cd \"\$thisdir\" && pwd\`
5299 test -n \"\$absdir\" && thisdir=\"\$absdir\"
5302 if test "$fast_install" = yes; then
5304 program=lt-'$outputname'$exeext
5305 progdir=\"\$thisdir/$objdir\"
5307 if test ! -f \"\$progdir/\$program\" || \\
5308 { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\
5309 test \"X\$file\" != \"X\$progdir/\$program\"; }; then
5311 file=\"\$\$-\$program\"
5313 if test ! -d \"\$progdir\"; then
5314 $mkdir \"\$progdir\"
5316 $rm \"\$progdir/\$file\"
5321 # relink executable if necessary
5322 if test -n \"\$relink_command\"; then
5323 if relink_command_output=\`eval \$relink_command 2>&1\`; then :
5325 $echo \"\$relink_command_output\" >&2
5326 $rm \"\$progdir/\$file\"
5331 $mv \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null ||
5332 { $rm \"\$progdir/\$program\";
5333 $mv \"\$progdir/\$file\" \"\$progdir/\$program\"; }
5334 $rm \"\$progdir/\$file\"
5338 program='$outputname'
5339 progdir=\"\$thisdir/$objdir\"
5345 if test -f \"\$progdir/\$program\"; then"
5347 # Export our shlibpath_var if we have one.
5348 if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
5350 # Add our own library path to $shlibpath_var
5351 $shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
5353 # Some systems cannot cope with colon-terminated $shlibpath_var
5354 # The second colon is a workaround for a bug in BeOS R4 sed
5355 $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\`
5357 export $shlibpath_var
5361 # fixup the dll searchpath if we need to.
5362 if test -n "$dllsearchpath"; then
5364 # Add the dll search path components to the executable PATH
5365 PATH=$dllsearchpath:\$PATH
5370 if test \"\$libtool_execute_magic\" != \"$magic\"; then
5371 # Run the actual program with our arguments.
5374 # Backslashes separate directories on plain windows
5375 *-*-mingw |
*-*-os2*)
5377 exec \$progdir\\\\\$program \${1+\"\$@\"}
5383 exec \$progdir/\$program \${1+\"\$@\"}
5388 \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\"
5392 # The program doesn't exist.
5393 \$echo \"\$0: error: \$progdir/\$program does not exist\" 1>&2
5394 \$echo \"This script is just a wrapper for \$program.\" 1>&2
5395 $echo \"See the $PACKAGE documentation for more information.\" 1>&2
5406 # See if we need to build an old-fashioned archive.
5407 for oldlib
in $oldlibs; do
5409 if test "$build_libtool_libs" = convenience
; then
5410 oldobjs
="$libobjs_save"
5411 addlibs
="$convenience"
5412 build_libtool_libs
=no
5414 if test "$build_libtool_libs" = module
; then
5415 oldobjs
="$libobjs_save"
5416 build_libtool_libs
=no
5418 oldobjs
="$old_deplibs $non_pic_objects"
5420 addlibs
="$old_convenience"
5423 if test -n "$addlibs"; then
5424 gentop
="$output_objdir/${outputname}x"
5425 generated
="$generated $gentop"
5427 func_extract_archives
$gentop $addlibs
5428 oldobjs
="$oldobjs $func_extract_archives_result"
5431 # Do each command in the archive commands.
5432 if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
5433 cmds
=$old_archive_from_new_cmds
5435 # POSIX demands no paths to be encoded in archives. We have
5436 # to avoid creating archives with duplicate basenames if we
5437 # might have to extract them afterwards, e.g., when creating a
5438 # static archive out of a convenience library, or when linking
5439 # the entirety of a libtool archive into another (currently
5440 # not supported by libtool).
5441 if (for obj
in $oldobjs
5443 $echo "X$obj" |
$Xsed -e 's%^.*/%%'
5444 done |
sort |
sort -uc >/dev
/null
2>&1); then
5447 $echo "copying selected object files to avoid basename conflicts..."
5449 if test -z "$gentop"; then
5450 gentop
="$output_objdir/${outputname}x"
5451 generated
="$generated $gentop"
5453 $show "${rm}r $gentop"
5454 $run ${rm}r
"$gentop"
5455 $show "$mkdir $gentop"
5456 $run $mkdir "$gentop"
5458 if test "$status" -ne 0 && test ! -d "$gentop"; then
5463 save_oldobjs
=$oldobjs
5466 for obj
in $save_oldobjs
5468 objbase
=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
5469 case " $oldobjs " in
5470 " ") oldobjs
=$obj ;;
5473 # Make sure we don't pick an alternate name that also
5475 newobj
=lt
$counter-$objbase
5476 counter
=`expr $counter + 1`
5477 case " $oldobjs " in
5478 *[\
/]"$newobj "*) ;;
5479 *) if test ! -f "$gentop/$newobj"; then break; fi ;;
5482 $show "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj"
5483 $run ln "$obj" "$gentop/$newobj" ||
5484 $run cp "$obj" "$gentop/$newobj"
5485 oldobjs
="$oldobjs $gentop/$newobj"
5487 *) oldobjs
="$oldobjs $obj" ;;
5492 eval cmds
=\"$old_archive_cmds\"
5494 if len
=`expr "X$cmds" : ".*"` &&
5495 test "$len" -le "$max_cmd_len" ||
test "$max_cmd_len" -le -1; then
5496 cmds
=$old_archive_cmds
5498 # the command line is too long to link in one step, link in parts
5499 $echo "using piecewise archive linking..."
5504 save_oldobjs
=$oldobjs
5506 # Is there a better way of finding the last object in the list?
5507 for obj
in $save_oldobjs
5511 for obj
in $save_oldobjs
5513 oldobjs
="$objlist $obj"
5514 objlist
="$objlist $obj"
5515 eval test_cmds
=\"$old_archive_cmds\"
5516 if len
=`expr "X$test_cmds" : ".*"` &&
5517 test "$len" -le "$max_cmd_len"; then
5520 # the above command should be used before it gets too long
5522 if test "$obj" = "$last_oldobj" ; then
5525 test -z "$concat_cmds" || concat_cmds
=$concat_cmds~
5526 eval concat_cmds
=\"\
${concat_cmds}$old_archive_cmds\"
5532 if test "X$oldobjs" = "X" ; then
5533 eval cmds
=\"\
$concat_cmds\"
5535 eval cmds
=\"\
$concat_cmds~\
$old_archive_cmds\"
5539 save_ifs
="$IFS"; IFS
='~'
5540 for cmd
in $cmds; do
5544 $run eval "$cmd" ||
exit $?
5549 if test -n "$generated"; then
5550 $show "${rm}r$generated"
5551 $run ${rm}r
$generated
5554 # Now create the libtool archive.
5558 test "$build_old_libs" = yes && old_library
="$libname.$libext"
5559 $show "creating $output"
5561 # Preserve any variables that may affect compiler behavior
5562 for var
in $variables_saved_for_relink; do
5563 if eval test -z \"\
${$var+set}\"; then
5564 relink_command
="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command"
5565 elif eval var_value
=\$
$var; test -z "$var_value"; then
5566 relink_command
="$var=; export $var; $relink_command"
5568 var_value
=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"`
5569 relink_command
="$var=\"$var_value\"; export $var; $relink_command"
5572 # Quote the link command for shipping.
5573 relink_command
="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
5574 relink_command
=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
5575 if test "$hardcode_automatic" = yes ; then
5580 # Only create the output if not a dry run.
5581 if test -z "$run"; then
5582 for installed
in no
yes; do
5583 if test "$installed" = yes; then
5584 if test -z "$install_libdir"; then
5587 output
="$output_objdir/$outputname"i
5588 # Replace all uninstalled libtool libraries with the installed ones
5590 for deplib
in $dependency_libs; do
5593 name
=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'`
5594 eval libdir
=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
5595 if test -z "$libdir"; then
5596 $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
5599 newdependency_libs
="$newdependency_libs $libdir/$name"
5601 *) newdependency_libs
="$newdependency_libs $deplib" ;;
5604 dependency_libs
="$newdependency_libs"
5606 for lib
in $dlfiles; do
5607 name
=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
5608 eval libdir
=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
5609 if test -z "$libdir"; then
5610 $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
5613 newdlfiles
="$newdlfiles $libdir/$name"
5615 dlfiles
="$newdlfiles"
5617 for lib
in $dlprefiles; do
5618 name
=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
5619 eval libdir
=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
5620 if test -z "$libdir"; then
5621 $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
5624 newdlprefiles
="$newdlprefiles $libdir/$name"
5626 dlprefiles
="$newdlprefiles"
5629 for lib
in $dlfiles; do
5631 [\\/]* |
[A-Za-z
]:[\\/]*) abs
="$lib" ;;
5632 *) abs
=`pwd`"/$lib" ;;
5634 newdlfiles
="$newdlfiles $abs"
5636 dlfiles
="$newdlfiles"
5638 for lib
in $dlprefiles; do
5640 [\\/]* |
[A-Za-z
]:[\\/]*) abs
="$lib" ;;
5641 *) abs
=`pwd`"/$lib" ;;
5643 newdlprefiles
="$newdlprefiles $abs"
5645 dlprefiles
="$newdlprefiles"
5648 # place dlname in correct position for cygwin
5650 case $host,$output,$installed,$module,$dlname in
5651 *cygwin
*,*lai
,yes,no
,*.dll |
*mingw
*,*lai
,yes,no
,*.dll
) tdlname
=..
/bin
/$dlname ;;
5654 # $outputname - a libtool library file
5655 # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
5657 # Please DO NOT delete this file!
5658 # It is necessary for linking the library.
5660 # The name that we can dlopen(3).
5663 # Names of this library.
5664 library_names='$library_names'
5666 # The name of the static archive.
5667 old_library='$old_library'
5669 # Libraries that this one depends upon.
5670 dependency_libs='$dependency_libs'
5672 # Version information for $libname.
5677 # Is this an already installed library?
5678 installed=$installed
5680 # Should we warn about portability when linking against -modules?
5681 shouldnotlink=$module
5683 # Files to dlopen/dlpreopen
5685 dlpreopen='$dlprefiles'
5687 # Directory that this library needs to be installed in:
5688 libdir='$install_libdir'"
5689 if test "$installed" = no
&& test "$need_relink" = yes; then
5691 relink_command=\"$relink_command\""
5696 # Do a symbolic link so that the libtool archive can be found in
5697 # LD_LIBRARY_PATH before the program is installed.
5698 $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)"
5699 $run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' ||
exit $?
5705 # libtool install mode
5707 modename
="$modename: install"
5709 # There may be an optional sh(1) argument at the beginning of
5710 # install_prog (especially on Windows NT).
5711 if test "$nonopt" = "$SHELL" ||
test "$nonopt" = /bin
/sh ||
5712 # Allow the use of GNU shtool's install command.
5713 $echo "X$nonopt" |
$Xsed |
grep shtool
> /dev
/null
; then
5714 # Aesthetically quote it.
5715 arg
=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"`
5717 *$quote_scanset* |
*]* |
*\|
* |
*\
&* |
*\
(* |
*\
)* |
"")
5721 install_prog
="$arg "
5729 # The real first argument should be the name of the installation program.
5730 # Aesthetically quote it.
5731 arg
=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
5733 *$quote_scanset* |
*]* |
*\|
* |
*\
&* |
*\
(* |
*\
)* |
"")
5737 install_prog
="$install_prog$arg"
5739 # We need to accept at least all the BSD install flags.
5749 if test -n "$dest"; then
5750 files
="$files $dest"
5768 # If the previous option needed an argument, then skip it.
5769 if test -n "$prev"; then
5778 # Aesthetically quote the argument.
5779 arg
=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
5781 *$quote_scanset* |
*]* |
*\|
* |
*\
&* |
*\
(* |
*\
)* |
"")
5785 install_prog
="$install_prog $arg"
5788 if test -z "$install_prog"; then
5789 $echo "$modename: you must specify an install program" 1>&2
5794 if test -n "$prev"; then
5795 $echo "$modename: the \`$prev' option requires an argument" 1>&2
5800 if test -z "$files"; then
5801 if test -z "$dest"; then
5802 $echo "$modename: no file or destination specified" 1>&2
5804 $echo "$modename: you must specify a destination" 1>&2
5810 # Strip any trailing slash from the destination.
5811 dest
=`$echo "X$dest" | $Xsed -e 's%/$%%'`
5813 # Check to see that the destination is a directory.
5814 test -d "$dest" && isdir
=yes
5815 if test "$isdir" = yes; then
5819 destdir
=`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'`
5820 test "X$destdir" = "X$dest" && destdir
=.
5821 destname
=`$echo "X$dest" | $Xsed -e 's%^.*/%%'`
5823 # Not a directory, so check to see that there is only one file specified.
5825 if test "$#" -gt 2; then
5826 $echo "$modename: \`$dest' is not a directory" 1>&2
5832 [\\/]* |
[A-Za-z
]:[\\/]*) ;;
5834 for file in $files; do
5838 $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2
5847 # This variable tells wrapper scripts just to set variables rather
5848 # than running their programs.
5849 libtool_install_magic
="$magic"
5854 for file in $files; do
5856 # Do each installation.
5859 # Do the static libraries later.
5860 staticlibs
="$staticlibs $file"
5864 # Check to see that this really is a libtool archive.
5865 if (${SED} -e '2q' $file |
grep "^# Generated by .*$PACKAGE") >/dev
/null
2>&1; then :
5867 $echo "$modename: \`$file' is not a valid libtool archive" 1>&2
5875 # If there is no directory component, then add one.
5877 */* |
*\\*) .
$file ;;
5881 # Add the libdir to current_libdirs if it is the destination.
5882 if test "X$destdir" = "X$libdir"; then
5883 case "$current_libdirs " in
5885 *) current_libdirs
="$current_libdirs $libdir" ;;
5888 # Note the libdir as a future libdir.
5889 case "$future_libdirs " in
5891 *) future_libdirs
="$future_libdirs $libdir" ;;
5895 dir
=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/
5896 test "X$dir" = "X$file/" && dir
=
5899 if test -n "$relink_command"; then
5900 # Determine the prefix the user has applied to our future dir.
5901 inst_prefix_dir
=`$echo "$destdir" | $SED "s%$libdir\$%%"`
5903 # Don't allow the user to place us outside of our expected
5904 # location b/c this prevents finding dependent libraries that
5905 # are installed to the same prefix.
5906 # At present, this check doesn't affect windows .dll's that
5907 # are installed into $libdir/../bin (currently, that works fine)
5908 # but it's something to keep an eye on.
5909 if test "$inst_prefix_dir" = "$destdir"; then
5910 $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2
5914 if test -n "$inst_prefix_dir"; then
5915 # Stick the inst_prefix_dir data into the link command.
5916 relink_command
=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"`
5918 relink_command
=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%%"`
5921 $echo "$modename: warning: relinking \`$file'" 1>&2
5922 $show "$relink_command"
5923 if $run eval "$relink_command"; then :
5925 $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
5930 # See the names of the shared library.
5931 set dummy
$library_names
5932 if test -n "$2"; then
5938 test -n "$relink_command" && srcname
="$realname"T
5940 # Install the shared library and build the symlinks.
5941 $show "$install_prog $dir/$srcname $destdir/$realname"
5942 $run eval "$install_prog $dir/$srcname $destdir/$realname" ||
exit $?
5943 if test -n "$stripme" && test -n "$striplib"; then
5944 $show "$striplib $destdir/$realname"
5945 $run eval "$striplib $destdir/$realname" ||
exit $?
5948 if test "$#" -gt 0; then
5949 # Delete the old symlinks, and create new ones.
5952 if test "$linkname" != "$realname"; then
5953 $show "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)"
5954 $run eval "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)"
5959 # Do each command in the postinstall commands.
5960 lib
="$destdir/$realname"
5961 cmds
=$postinstall_cmds
5962 save_ifs
="$IFS"; IFS
='~'
5963 for cmd
in $cmds; do
5967 $run eval "$cmd" ||
exit $?
5972 # Install the pseudo-library for information purposes.
5973 name
=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
5974 instname
="$dir/$name"i
5975 $show "$install_prog $instname $destdir/$name"
5976 $run eval "$install_prog $instname $destdir/$name" ||
exit $?
5978 # Maybe install the static library, too.
5979 test -n "$old_library" && staticlibs
="$staticlibs $dir/$old_library"
5983 # Install (i.e. copy) a libtool object.
5985 # Figure out destination file name, if it wasn't already specified.
5986 if test -n "$destname"; then
5987 destfile
="$destdir/$destname"
5989 destfile
=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
5990 destfile
="$destdir/$destfile"
5993 # Deduce the name of the destination old-style object file.
5996 staticdest
=`$echo "X$destfile" | $Xsed -e "$lo2o"`
5999 staticdest
="$destfile"
6003 $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2
6009 # Install the libtool object if requested.
6010 if test -n "$destfile"; then
6011 $show "$install_prog $file $destfile"
6012 $run eval "$install_prog $file $destfile" ||
exit $?
6015 # Install the old object if enabled.
6016 if test "$build_old_libs" = yes; then
6017 # Deduce the name of the old-style object file.
6018 staticobj
=`$echo "X$file" | $Xsed -e "$lo2o"`
6020 $show "$install_prog $staticobj $staticdest"
6021 $run eval "$install_prog \$staticobj \$staticdest" ||
exit $?
6027 # Figure out destination file name, if it wasn't already specified.
6028 if test -n "$destname"; then
6029 destfile
="$destdir/$destname"
6031 destfile
=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
6032 destfile
="$destdir/$destfile"
6035 # If the file is missing, and there is a .exe on the end, strip it
6036 # because it is most likely a libtool script we actually want to
6041 if test ! -f "$file"; then
6042 file=`$echo $file|${SED} 's,.exe$,,'`
6048 # Do a test to see if this is really a libtool program.
6051 wrapper
=`$echo $file | ${SED} -e 's,.exe$,,'`
6057 if (${SED} -e '4q' $wrapper |
grep "^# Generated by .*$PACKAGE")>/dev
/null
2>&1; then
6061 # To insure that "foo" is sourced, and not "foo.exe",
6062 # finese the cygwin/MSYS system by explicitly sourcing "foo."
6063 # which disallows the automatic-append-.exe behavior.
6065 *cygwin
* |
*mingw
*) wrapperdot
=${wrapper}.
;;
6066 *) wrapperdot
=${wrapper} ;;
6068 # If there is no directory component, then add one.
6070 */* |
*\\*) .
${wrapperdot} ;;
6071 *) . .
/${wrapperdot} ;;
6074 # Check the variables that should have been set.
6075 if test -z "$notinst_deplibs"; then
6076 $echo "$modename: invalid libtool wrapper script \`$wrapper'" 1>&2
6081 for lib
in $notinst_deplibs; do
6082 # Check to see that each library is installed.
6084 if test -f "$lib"; then
6085 # If there is no directory component, then add one.
6087 */* |
*\\*) .
$lib ;;
6091 libfile
="$libdir/"`$echo "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test
6092 if test -n "$libdir" && test ! -f "$libfile"; then
6093 $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2
6099 # To insure that "foo" is sourced, and not "foo.exe",
6100 # finese the cygwin/MSYS system by explicitly sourcing "foo."
6101 # which disallows the automatic-append-.exe behavior.
6103 *cygwin
* |
*mingw
*) wrapperdot
=${wrapper}.
;;
6104 *) wrapperdot
=${wrapper} ;;
6106 # If there is no directory component, then add one.
6108 */* |
*\\*) .
${wrapperdot} ;;
6109 *) . .
/${wrapperdot} ;;
6113 if test "$fast_install" = no
&& test -n "$relink_command"; then
6114 if test "$finalize" = yes && test -z "$run"; then
6116 test -n "$TMPDIR" && tmpdir
="$TMPDIR"
6117 tmpdir
="$tmpdir/libtool-$$"
6120 if $mkdir "$tmpdir"; then
6124 $echo "$modename: error: cannot create temporary directory \`$tmpdir'" 1>&2
6127 file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'`
6128 outputname
="$tmpdir/$file"
6129 # Replace the output file specification.
6130 relink_command
=`$echo "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'`
6132 $show "$relink_command"
6133 if $run eval "$relink_command"; then :
6135 $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
6141 $echo "$modename: warning: cannot relink \`$file'" 1>&2
6144 # Install the binary that we compiled earlier.
6145 file=`$echo "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"`
6149 # remove .exe since cygwin /usr/bin/install will append another
6151 case $install_prog,$host in
6152 */usr
/bin
/install*,*cygwin
*)
6153 case $file:$destfile in
6158 destfile
=$destfile.exe
6161 destfile
=`$echo $destfile | ${SED} -e 's,.exe$,,'`
6166 $show "$install_prog$stripme $file $destfile"
6167 $run eval "$install_prog\$stripme \$file \$destfile" ||
exit $?
6168 test -n "$outputname" && ${rm}r
"$tmpdir"
6173 for file in $staticlibs; do
6174 name
=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
6176 # Set up the ranlib parameters.
6177 oldlib
="$destdir/$name"
6179 $show "$install_prog $file $oldlib"
6180 $run eval "$install_prog \$file \$oldlib" ||
exit $?
6182 if test -n "$stripme" && test -n "$old_striplib"; then
6183 $show "$old_striplib $oldlib"
6184 $run eval "$old_striplib $oldlib" ||
exit $?
6187 # Do each command in the postinstall commands.
6188 cmds
=$old_postinstall_cmds
6189 save_ifs
="$IFS"; IFS
='~'
6190 for cmd
in $cmds; do
6194 $run eval "$cmd" ||
exit $?
6199 if test -n "$future_libdirs"; then
6200 $echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2
6203 if test -n "$current_libdirs"; then
6204 # Maybe just do a dry run.
6205 test -n "$run" && current_libdirs
=" -n$current_libdirs"
6206 exec_cmd
='$SHELL $progpath $preserve_args --finish$current_libdirs'
6212 # libtool finish mode
6214 modename
="$modename: finish"
6218 if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
6221 libdirs
="$libdirs $dir"
6224 for libdir
in $libdirs; do
6225 if test -n "$finish_cmds"; then
6226 # Do each command in the finish commands.
6228 save_ifs
="$IFS"; IFS
='~'
6229 for cmd
in $cmds; do
6233 $run eval "$cmd" || admincmds
="$admincmds
6238 if test -n "$finish_eval"; then
6239 # Do the single finish_eval.
6240 eval cmds
=\"$finish_eval\"
6241 $run eval "$cmds" || admincmds
="$admincmds
6247 # Exit here if they wanted silent mode.
6248 test "$show" = : && exit $EXIT_SUCCESS
6250 $echo "----------------------------------------------------------------------"
6251 $echo "Libraries have been installed in:"
6252 for libdir
in $libdirs; do
6256 $echo "If you ever happen to want to link against installed libraries"
6257 $echo "in a given directory, LIBDIR, you must either use libtool, and"
6258 $echo "specify the full pathname of the library, or use the \`-LLIBDIR'"
6259 $echo "flag during linking and do at least one of the following:"
6260 if test -n "$shlibpath_var"; then
6261 $echo " - add LIBDIR to the \`$shlibpath_var' environment variable"
6262 $echo " during execution"
6264 if test -n "$runpath_var"; then
6265 $echo " - add LIBDIR to the \`$runpath_var' environment variable"
6266 $echo " during linking"
6268 if test -n "$hardcode_libdir_flag_spec"; then
6270 eval flag
=\"$hardcode_libdir_flag_spec\"
6272 $echo " - use the \`$flag' linker flag"
6274 if test -n "$admincmds"; then
6275 $echo " - have your system administrator run these commands:$admincmds"
6277 if test -f /etc
/ld.so.conf
; then
6278 $echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
6281 $echo "See any operating system documentation about shared libraries for"
6282 $echo "more information, such as the ld(1) and ld.so(8) manual pages."
6283 $echo "----------------------------------------------------------------------"
6287 # libtool execute mode
6289 modename
="$modename: execute"
6291 # The first argument is the command name.
6293 if test -z "$cmd"; then
6294 $echo "$modename: you must specify a COMMAND" 1>&2
6299 # Handle -dlopen flags immediately.
6300 for file in $execute_dlfiles; do
6301 if test ! -f "$file"; then
6302 $echo "$modename: \`$file' is not a file" 1>&2
6310 # Check to see that this really is a libtool archive.
6311 if (${SED} -e '2q' $file |
grep "^# Generated by .*$PACKAGE") >/dev
/null
2>&1; then :
6313 $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
6318 # Read the libtool library.
6322 # If there is no directory component, then add one.
6324 */* |
*\\*) .
$file ;;
6328 # Skip this library if it cannot be dlopened.
6329 if test -z "$dlname"; then
6330 # Warn if it was a shared library.
6331 test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'"
6335 dir
=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
6336 test "X$dir" = "X$file" && dir
=.
6338 if test -f "$dir/$objdir/$dlname"; then
6341 $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2
6347 # Just add the directory containing the .lo file.
6348 dir
=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
6349 test "X$dir" = "X$file" && dir
=.
6353 $echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2
6358 # Get the absolute pathname.
6359 absdir
=`cd "$dir" && pwd`
6360 test -n "$absdir" && dir
="$absdir"
6362 # Now add the directory to shlibpath_var.
6363 if eval "test -z \"\$$shlibpath_var\""; then
6364 eval "$shlibpath_var=\"\$dir\""
6366 eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\""
6370 # This variable tells wrapper scripts just to set shlibpath_var
6371 # rather than running their programs.
6372 libtool_execute_magic
="$magic"
6374 # Check if any of the arguments is a wrapper script.
6381 # Do a test to see if this is really a libtool program.
6382 if (${SED} -e '4q' $file |
grep "^# Generated by .*$PACKAGE") >/dev
/null
2>&1; then
6383 # If there is no directory component, then add one.
6385 */* |
*\\*) .
$file ;;
6389 # Transform arg to wrapped name.
6390 file="$progdir/$program"
6394 # Quote arguments (to preserve shell metacharacters).
6395 file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"`
6396 args
="$args \"$file\""
6399 if test -z "$run"; then
6400 if test -n "$shlibpath_var"; then
6401 # Export the shlibpath_var.
6402 eval "export $shlibpath_var"
6405 # Restore saved environment variables
6406 if test "${save_LC_ALL+set}" = set; then
6407 LC_ALL
="$save_LC_ALL"; export LC_ALL
6409 if test "${save_LANG+set}" = set; then
6410 LANG
="$save_LANG"; export LANG
6413 # Now prepare to actually exec the command.
6414 exec_cmd
="\$cmd$args"
6416 # Display what would be done.
6417 if test -n "$shlibpath_var"; then
6418 eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\""
6419 $echo "export $shlibpath_var"
6426 # libtool clean and uninstall mode
6428 modename
="$modename: $mode"
6434 # This variable tells wrapper scripts just to set variables rather
6435 # than running their programs.
6436 libtool_install_magic
="$magic"
6441 -f) rm="$rm $arg"; rmforce
=yes ;;
6442 -*) rm="$rm $arg" ;;
6443 *) files
="$files $arg" ;;
6447 if test -z "$rm"; then
6448 $echo "$modename: you must specify an RM program" 1>&2
6455 origobjdir
="$objdir"
6456 for file in $files; do
6457 dir
=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
6458 if test "X$dir" = "X$file"; then
6460 objdir
="$origobjdir"
6462 objdir
="$dir/$origobjdir"
6464 name
=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
6465 test "$mode" = uninstall
&& objdir
="$dir"
6467 # Remember objdir for removal later, being careful to avoid duplicates
6468 if test "$mode" = clean
; then
6471 *) rmdirs
="$rmdirs $objdir" ;;
6475 # Don't error if the file doesn't exist and rm -f was used.
6476 if (test -L "$file") >/dev
/null
2>&1 \
6477 ||
(test -h "$file") >/dev
/null
2>&1 \
6478 ||
test -f "$file"; then
6480 elif test -d "$file"; then
6483 elif test "$rmforce" = yes; then
6491 # Possibly a libtool archive, so verify it.
6492 if (${SED} -e '2q' $file |
grep "^# Generated by .*$PACKAGE") >/dev
/null
2>&1; then
6495 # Delete the libtool libraries and symlinks.
6496 for n
in $library_names; do
6497 rmfiles
="$rmfiles $objdir/$n"
6499 test -n "$old_library" && rmfiles
="$rmfiles $objdir/$old_library"
6500 test "$mode" = clean
&& rmfiles
="$rmfiles $objdir/$name $objdir/${name}i"
6502 if test "$mode" = uninstall
; then
6503 if test -n "$library_names"; then
6504 # Do each command in the postuninstall commands.
6505 cmds
=$postuninstall_cmds
6506 save_ifs
="$IFS"; IFS
='~'
6507 for cmd
in $cmds; do
6512 if test "$?" -ne 0 && test "$rmforce" != yes; then
6519 if test -n "$old_library"; then
6520 # Do each command in the old_postuninstall commands.
6521 cmds
=$old_postuninstall_cmds
6522 save_ifs
="$IFS"; IFS
='~'
6523 for cmd
in $cmds; do
6528 if test "$?" -ne 0 && test "$rmforce" != yes; then
6534 # FIXME: should reinstall the best remaining shared library.
6540 # Possibly a libtool object, so verify it.
6541 if (${SED} -e '2q' $file |
grep "^# Generated by .*$PACKAGE") >/dev
/null
2>&1; then
6546 # Add PIC object to the list of files to remove.
6547 if test -n "$pic_object" \
6548 && test "$pic_object" != none
; then
6549 rmfiles
="$rmfiles $dir/$pic_object"
6552 # Add non-PIC object to the list of files to remove.
6553 if test -n "$non_pic_object" \
6554 && test "$non_pic_object" != none
; then
6555 rmfiles
="$rmfiles $dir/$non_pic_object"
6561 if test "$mode" = clean
; then
6565 file=`$echo $file|${SED} 's,.exe$,,'`
6566 noexename
=`$echo $name|${SED} 's,.exe$,,'`
6567 # $file with .exe has already been added to rmfiles,
6568 # add $file without .exe
6569 rmfiles
="$rmfiles $file"
6572 # Do a test to see if this is a libtool program.
6573 if (${SED} -e '4q' $file |
grep "^# Generated by .*$PACKAGE") >/dev
/null
2>&1; then
6577 # note $name still contains .exe if it was in $file originally
6578 # as does the version of $file that was added into $rmfiles
6579 rmfiles
="$rmfiles $objdir/$name $objdir/${name}S.${objext}"
6580 if test "$fast_install" = yes && test -n "$relink_command"; then
6581 rmfiles
="$rmfiles $objdir/lt-$name"
6583 if test "X$noexename" != "X$name" ; then
6584 rmfiles
="$rmfiles $objdir/lt-${noexename}.c"
6590 $show "$rm $rmfiles"
6591 $run $rm $rmfiles || exit_status
=1
6593 objdir
="$origobjdir"
6595 # Try to remove the ${objdir}s in the directories where we deleted files
6596 for dir
in $rmdirs; do
6597 if test -d "$dir"; then
6599 $run rmdir $dir >/dev
/null
2>&1
6607 $echo "$modename: you must specify a MODE" 1>&2
6608 $echo "$generic_help" 1>&2
6613 if test -z "$exec_cmd"; then
6614 $echo "$modename: invalid operation mode \`$mode'" 1>&2
6615 $echo "$generic_help" 1>&2
6618 fi # test -z "$show_help"
6620 if test -n "$exec_cmd"; then
6625 # We need to display help for each of the modes.
6628 "Usage: $modename [OPTION]... [MODE-ARG]...
6630 Provide generalized library-building support services.
6632 --config show all configuration variables
6633 --debug enable verbose shell tracing
6634 -n, --dry-run display commands without modifying any files
6635 --features display basic configuration information and exit
6636 --finish same as \`--mode=finish'
6637 --help display this help message and exit
6638 --mode=MODE use operation mode MODE [default=inferred from MODE-ARGS]
6639 --quiet same as \`--silent'
6640 --silent don't print informational messages
6641 --tag=TAG use configuration variables from tag TAG
6642 --version print version information
6644 MODE must be one of the following:
6646 clean remove files from the build directory
6647 compile compile a source file into a libtool object
6648 execute automatically set library path, then run a program
6649 finish complete the installation of libtool libraries
6650 install install libraries or executables
6651 link create a library or an executable
6652 uninstall remove libraries from an installed directory
6654 MODE-ARGS vary depending on the MODE. Try \`$modename --help --mode=MODE' for
6655 a more detailed description of MODE.
6657 Report bugs to <bug-libtool@gnu.org>."
6663 "Usage: $modename [OPTION]... --mode=clean RM [RM-OPTION]... FILE...
6665 Remove files from the build directory.
6667 RM is the name of the program to use to delete files associated with each FILE
6668 (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed
6671 If FILE is a libtool library, object or program, all the files associated
6672 with it are deleted. Otherwise, only FILE itself is deleted using RM."
6677 "Usage: $modename [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE
6679 Compile a source file into a libtool library object.
6681 This mode accepts the following additional options:
6683 -o OUTPUT-FILE set the output file name to OUTPUT-FILE
6684 -prefer-pic try to building PIC objects only
6685 -prefer-non-pic try to building non-PIC objects only
6686 -static always build a \`.o' file suitable for static linking
6688 COMPILE-COMMAND is a command to be used in creating a \`standard' object file
6689 from the given SOURCEFILE.
6691 The output file name is determined by removing the directory component from
6692 SOURCEFILE, then substituting the C source code suffix \`.c' with the
6693 library object suffix, \`.lo'."
6698 "Usage: $modename [OPTION]... --mode=execute COMMAND [ARGS]...
6700 Automatically set library path, then run a program.
6702 This mode accepts the following additional options:
6704 -dlopen FILE add the directory containing FILE to the library path
6706 This mode sets the library path environment variable according to \`-dlopen'
6709 If any of the ARGS are libtool executable wrappers, then they are translated
6710 into their corresponding uninstalled binary, and any of their required library
6711 directories are added to the library path.
6713 Then, COMMAND is executed, with ARGS as arguments."
6718 "Usage: $modename [OPTION]... --mode=finish [LIBDIR]...
6720 Complete the installation of libtool libraries.
6722 Each LIBDIR is a directory that contains libtool libraries.
6724 The commands that this mode executes may require superuser privileges. Use
6725 the \`--dry-run' option if you just want to see what would be executed."
6730 "Usage: $modename [OPTION]... --mode=install INSTALL-COMMAND...
6732 Install executables or libraries.
6734 INSTALL-COMMAND is the installation command. The first component should be
6735 either the \`install' or \`cp' program.
6737 The rest of the components are interpreted as arguments to that command (only
6738 BSD-compatible install options are recognized)."
6743 "Usage: $modename [OPTION]... --mode=link LINK-COMMAND...
6745 Link object files or libraries together to form another library, or to
6746 create an executable program.
6748 LINK-COMMAND is a command using the C compiler that you would use to create
6749 a program from several object files.
6751 The following components of LINK-COMMAND are treated specially:
6753 -all-static do not do any dynamic linking at all
6754 -avoid-version do not add a version suffix if possible
6755 -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime
6756 -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols
6757 -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
6758 -export-symbols SYMFILE
6759 try to export only the symbols listed in SYMFILE
6760 -export-symbols-regex REGEX
6761 try to export only the symbols matching REGEX
6762 -LLIBDIR search LIBDIR for required installed libraries
6763 -lNAME OUTPUT-FILE requires the installed library libNAME
6764 -module build a library that can dlopened
6765 -no-fast-install disable the fast-install mode
6766 -no-install link a not-installable executable
6767 -no-undefined declare that a library does not refer to external symbols
6768 -o OUTPUT-FILE create OUTPUT-FILE from the specified objects
6769 -objectlist FILE Use a list of object files found in FILE to specify objects
6770 -precious-files-regex REGEX
6771 don't remove output files matching REGEX
6772 -release RELEASE specify package release information
6773 -rpath LIBDIR the created library will eventually be installed in LIBDIR
6774 -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries
6775 -static do not do any dynamic linking of libtool libraries
6776 -version-info CURRENT[:REVISION[:AGE]]
6777 specify library version info [each variable defaults to 0]
6779 All other options (arguments beginning with \`-') are ignored.
6781 Every other argument is treated as a filename. Files ending in \`.la' are
6782 treated as uninstalled libtool libraries, other files are standard or library
6785 If the OUTPUT-FILE ends in \`.la', then a libtool library is created,
6786 only library objects (\`.lo' files) may be specified, and \`-rpath' is
6787 required, except when creating a convenience library.
6789 If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created
6790 using \`ar' and \`ranlib', or on Windows using \`lib'.
6792 If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file
6793 is created, otherwise an executable program is created."
6798 "Usage: $modename [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE...
6800 Remove libraries from an installation directory.
6802 RM is the name of the program to use to delete files associated with each FILE
6803 (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed
6806 If FILE is a libtool library, all the files associated with it are deleted.
6807 Otherwise, only FILE itself is deleted using RM."
6811 $echo "$modename: invalid operation mode \`$mode'" 1>&2
6818 $echo "Try \`$modename --help' for more information about other modes."
6822 # The TAGs below are defined such that we never get into a situation
6823 # in which we disable both kinds of libraries. Given conflicting
6824 # choices, we go for a static library, that is the most portable,
6825 # since we can't tell whether shared libraries were disabled because
6826 # the user asked for that or because the platform doesn't support
6827 # them. This is particularly important on AIX, because we don't
6828 # support having both static and shared libraries enabled at the same
6829 # time on that platform, so we default to a shared-only configuration.
6830 # If a disable-shared tag is given, we'll fallback to a static-only
6831 # configuration. But we'll never go from static-only to shared-only.
6833 # ### BEGIN LIBTOOL TAG CONFIG: disable-shared
6834 build_libtool_libs
=no
6836 # ### END LIBTOOL TAG CONFIG: disable-shared
6838 # ### BEGIN LIBTOOL TAG CONFIG: disable-static
6839 build_old_libs
=`case $build_libtool_libs in yes) $echo no;; *) $echo yes;; esac`
6840 # ### END LIBTOOL TAG CONFIG: disable-static
6846 # ### BEGIN LIBTOOL TAG CONFIG: CXX
6848 # Libtool was configured on host vicente-P5K-E:
6850 # Shell to use when invoking shell scripts.
6853 # Whether or not to build shared libraries.
6854 build_libtool_libs
=yes
6856 # Whether or not to build static libraries.
6859 # Whether or not to add -lc for building shared libraries.
6860 build_libtool_need_lc
=no
6862 # Whether or not to disallow shared libs when runtime libs are static
6863 allow_libtool_libs_with_static_runtimes
=no
6865 # Whether or not to optimize for fast installation.
6869 host_alias
=mipsel-linux
6870 host=mipsel-unknown-linux-gnu
6874 build_alias
=x86_64-linux-gnu
6875 build
=x86_64-pc-linux-gnu
6878 # An echo program that does not interpret backslashes.
6882 AR
="mipsel-uclibc-ar"
6886 LTCC
="mipsel-uclibc-gcc"
6888 # A language-specific compiler.
6889 CC
="mipsel-linux-g++"
6891 # Is the compiler the GNU C compiler?
6897 # The linker used to build libraries.
6898 LD
="mipsel-uclibc-ld"
6900 # Whether we need hard or soft links.
6903 # A BSD-compatible nm program.
6904 NM
="mipsel-uclibc-nm"
6906 # A symbol stripping program
6907 STRIP
="mipsel-uclibc-strip -R .note -R .comment"
6909 # Used to examine libraries when file_magic_cmd begins "file"
6912 # Used on cygwin: DLL creation program.
6915 # Used on cygwin: object dumper.
6918 # Used on cygwin: assembler.
6919 AS
="mipsel-uclibc-as"
6921 # The name of the directory that contains temporary libtool files.
6924 # How to create reloadable object files.
6926 reload_cmds
="\$LD\$reload_flag -o \$output\$reload_objs"
6928 # How to pass a linker flag through the compiler.
6931 # Object file suffix (normally "o").
6934 # Old archive suffix (normally "a").
6937 # Shared library suffix (normally ".so").
6940 # Executable file suffix (normally "").
6943 # Additional compiler flags for building library objects.
6944 pic_flag
=" -fPIC -DPIC"
6947 # What is the maximum length of a command?
6950 # Does compiler simultaneously support -c and -o options?
6953 # Must we lock files when doing compilation?
6956 # Do we need the lib prefix for modules?
6959 # Do we need a version for libraries?
6962 # Whether dlopen is supported.
6963 dlopen_support
=unknown
6965 # Whether dlopen of programs is supported.
6968 # Whether dlopen of statically linked programs is supported.
6969 dlopen_self_static
=unknown
6971 # Compiler flag to prevent dynamic linking.
6972 link_static_flag
="-static"
6974 # Compiler flag to turn off builtin functions.
6975 no_builtin_flag
=" -fno-builtin"
6977 # Compiler flag to allow reflexive dlopens.
6978 export_dynamic_flag_spec
="\${wl}--export-dynamic"
6980 # Compiler flag to generate shared objects directly from archives.
6981 whole_archive_flag_spec
="\${wl}--whole-archive\$convenience \${wl}--no-whole-archive"
6983 # Compiler flag to generate thread-safe objects.
6984 thread_safe_flag_spec
=""
6986 # Library versioning type.
6989 # Format of library name prefix.
6990 libname_spec
="lib\$name"
6992 # List of archive names. First name is the real one, the rest are links.
6993 # The last name is the one that the linker finds with -lNAME.
6994 library_names_spec
="\${libname}\${release}\${shared_ext}\$versuffix \${libname}\${release}\${shared_ext}\$major \$libname\${shared_ext}"
6996 # The coded name of the library, if different from the real name.
6997 soname_spec
="\${libname}\${release}\${shared_ext}\$major"
6999 # Commands used to build and install an old-style archive.
7000 RANLIB
="mipsel-uclibc-ranlib"
7001 old_archive_cmds
="\$AR \$AR_FLAGS \$oldlib\$oldobjs\$old_deplibs~\$RANLIB \$oldlib"
7002 old_postinstall_cmds
="\$RANLIB \$oldlib~chmod 644 \$oldlib"
7003 old_postuninstall_cmds
=""
7005 # Create an old-style archive from a shared archive.
7006 old_archive_from_new_cmds
=""
7008 # Create a temporary old-style archive to link instead of a shared archive.
7009 old_archive_from_expsyms_cmds
=""
7011 # Commands used to build and install a shared archive.
7012 archive_cmds
="\$CC -shared -nostdlib \$predep_objects \$libobjs \$deplibs \$postdep_objects \$compiler_flags \${wl}-soname \$wl\$soname -o \$lib"
7013 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"
7015 postuninstall_cmds
=""
7017 # Commands used to build a loadable module (assumed same as above if empty)
7019 module_expsym_cmds
=""
7021 # Commands to strip libraries.
7022 old_striplib
="mipsel-uclibc-strip -R .note -R .comment --strip-debug"
7023 striplib
="mipsel-uclibc-strip -R .note -R .comment --strip-unneeded"
7025 # Dependencies to place before the objects being linked to create a
7027 predep_objects
="/home/vicente/tomato/tools/brcm/K26/hndtools-mipsel-uclibc-4.2.4/bin/../lib/gcc/mipsel-linux-uclibc/4.2.4/../../../../mipsel-linux-uclibc/lib/crti.o /home/vicente/tomato/tools/brcm/K26/hndtools-mipsel-uclibc-4.2.4/bin/../lib/gcc/mipsel-linux-uclibc/4.2.4/crtbeginS.o"
7029 # Dependencies to place after the objects being linked to create a
7031 postdep_objects
="/home/vicente/tomato/tools/brcm/K26/hndtools-mipsel-uclibc-4.2.4/bin/../lib/gcc/mipsel-linux-uclibc/4.2.4/crtendS.o /home/vicente/tomato/tools/brcm/K26/hndtools-mipsel-uclibc-4.2.4/bin/../lib/gcc/mipsel-linux-uclibc/4.2.4/../../../../mipsel-linux-uclibc/lib/crtn.o"
7033 # Dependencies to place before the objects being linked to create a
7037 # Dependencies to place after the objects being linked to create a
7039 postdeps
="-lstdc++ -lm -lgcc_s -lc -lgcc_s"
7041 # The library search path used internally by the compiler when linking
7043 compiler_lib_search_path
="-L/home/vicente/tomato/tools/brcm/K26/hndtools-mipsel-uclibc-4.2.4/bin/../lib/gcc/mipsel-linux-uclibc/4.2.4 -L/home/vicente/tomato/tools/brcm/K26/hndtools-mipsel-uclibc-4.2.4/bin/../lib/gcc -L/home/vicente/tomato/tools/brcm/K26/hndtools-mipsel-uclibc-4.2.4/bin/../lib/gcc/mipsel-linux-uclibc/4.2.4/../../../../mipsel-linux-uclibc/lib"
7045 # Method to check whether dependent libraries are shared objects.
7046 deplibs_check_method
="pass_all"
7048 # Command to use when deplibs_check_method == file_magic.
7049 file_magic_cmd
="\$MAGIC_CMD"
7051 # Flag that allows shared libraries with undefined symbols to be built.
7052 allow_undefined_flag
=""
7054 # Flag that forces no undefined symbols.
7055 no_undefined_flag
=""
7057 # Commands used to finish a libtool library installation in a directory.
7058 finish_cmds
="PATH=\\\"\\\$PATH:/sbin\\\" ldconfig -n \$libdir"
7060 # Same as above, but a single script fragment to be evaled but not shown.
7063 # Take the output of nm and produce a listing of raw symbols and C names.
7064 global_symbol_pipe
="sed -n -e 's/^.*[ ]\\([ABCDGIRSTW][ABCDGIRSTW]*\\)[ ][ ]*\\([_A-Za-z][_A-Za-z0-9]*\\)\$/\\1 \\2 \\2/p'"
7066 # Transform the output of nm in a proper C declaration
7067 global_symbol_to_cdecl
="sed -n -e 's/^. .* \\(.*\\)\$/extern int \\1;/p'"
7069 # Transform the output of nm in a C name address pair
7070 global_symbol_to_c_name_address
="sed -n -e 's/^: \\([^ ]*\\) \$/ {\\\"\\1\\\", (lt_ptr) 0},/p' -e 's/^[BCDEGRST] \\([^ ]*\\) \\([^ ]*\\)\$/ {\"\\2\", (lt_ptr) \\&\\2},/p'"
7072 # This is the shared library runtime path variable.
7073 runpath_var
=LD_RUN_PATH
7075 # This is the shared library path variable.
7076 shlibpath_var
=LD_LIBRARY_PATH
7078 # Is shlibpath searched before the hard-coded library search path?
7079 shlibpath_overrides_runpath
=no
7081 # How to hardcode a shared library path into an executable.
7082 hardcode_action
=immediate
7084 # Whether we should hardcode library paths into libraries.
7085 hardcode_into_libs
=yes
7087 # Flag to hardcode $libdir into a binary during linking.
7088 # This must work even if $libdir does not exist.
7089 hardcode_libdir_flag_spec
="\${wl}--rpath \${wl}\$libdir"
7091 # If ld is used when linking, flag to hardcode $libdir into
7092 # a binary during linking. This must work even if $libdir does
7094 hardcode_libdir_flag_spec_ld
=""
7096 # Whether we need a single -rpath flag with a separated argument.
7097 hardcode_libdir_separator
=""
7099 # Set to yes if using DIR/libNAME during linking hardcodes DIR into the
7103 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
7107 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
7108 # the resulting binary.
7109 hardcode_shlibpath_var
=
7111 # Set to yes if building a shared library automatically hardcodes DIR into the library
7112 # and all subsequent libraries and executables linked against it.
7113 hardcode_automatic
=no
7115 # Variables whose values should be saved in libtool wrapper scripts and
7116 # restored at relink time.
7117 variables_saved_for_relink
="PATH LD_LIBRARY_PATH LD_RUN_PATH GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
7119 # Whether libtool must link a program against all its dependency libraries.
7120 link_all_deplibs
=unknown
7122 # Compile-time system search path for libraries
7123 sys_lib_search_path_spec
=" /home/vicente/tomato/tools/brcm/K26/hndtools-mipsel-uclibc-4.2.4/bin/../lib/gcc/mipsel-linux-uclibc/4.2.4/ /home/vicente/tomato/tools/brcm/K26/hndtools-mipsel-uclibc-4.2.4/bin/../lib/gcc/ /opt/brcm/hndtools-mipsel-uclibc-4.2.4/lib/gcc/mipsel-linux-uclibc/4.2.4/ /usr/lib/gcc/mipsel-linux-uclibc/4.2.4/ /home/vicente/tomato/tools/brcm/K26/hndtools-mipsel-uclibc-4.2.4/bin/../lib/gcc/mipsel-linux-uclibc/4.2.4/../../../../mipsel-linux-uclibc/lib/mipsel-linux-uclibc/4.2.4/ /home/vicente/tomato/tools/brcm/K26/hndtools-mipsel-uclibc-4.2.4/bin/../lib/gcc/mipsel-linux-uclibc/4.2.4/../../../../mipsel-linux-uclibc/lib/ /opt/brcm/hndtools-mipsel-uclibc-4.2.4/mipsel-linux-uclibc/lib/mipsel-linux-uclibc/4.2.4/ /opt/brcm/hndtools-mipsel-uclibc-4.2.4/mipsel-linux-uclibc/lib/"
7125 # Run-time system search path for libraries
7126 sys_lib_dlsearch_path_spec
="/lib /usr/lib /lib/i386-linux-gnu /usr/lib/i386-linux-gnu /lib/i686-linux-gnu /usr/lib/i686-linux-gnu /usr/local/lib /usr/lib/nvidia-settings /lib/x86_64-linux-gnu /usr/lib/x86_64-linux-gnu /usr/lib/nvidia-current /usr/lib32/nvidia-current /lib32 /usr/lib32 "
7128 # Fix the shell variable $srcfile for the compiler.
7131 # Set to yes if exported symbols are required.
7132 always_export_symbols
=no
7134 # The commands to list exported symbols.
7135 export_symbols_cmds
="\$NM \$libobjs \$convenience | \$global_symbol_pipe | \$SED 's/.* //' | sort | uniq > \$export_symbols"
7137 # The commands to extract the exported symbol list from a shared archive.
7138 extract_expsyms_cmds
=""
7140 # Symbols that should not be listed in the preloaded symbols.
7143 # Symbols that must always be exported.
7146 # ### END LIBTOOL TAG CONFIG: CXX