3 # libtoolT - Provide generalized library-building support services.
4 # Generated automatically by (GNU neuro 0.49.21)
5 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
7 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
8 # Free Software Foundation, Inc.
10 # This file is part of GNU Libtool:
11 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
13 # This program is free software; you can redistribute it and/or modify
14 # it under the terms of the GNU General Public License as published by
15 # the Free Software Foundation; either version 2 of the License, or
16 # (at your option) any later version.
18 # This program is distributed in the hope that it will be useful, but
19 # WITHOUT ANY WARRANTY; without even the implied warranty of
20 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21 # General Public License for more details.
23 # You should have received a copy of the GNU General Public License
24 # along with this program; if not, write to the Free Software
25 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
27 # As a special exception to the GNU General Public License, if you
28 # distribute this file as part of a program that contains a
29 # configuration script generated by Autoconf, you may include it under
30 # the same distribution terms that you use for the rest of that program.
32 # A sed program that does not truncate output.
35 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
36 Xsed
="/usr/bin/sed -e s/^X//"
38 # The HP-UX ksh and POSIX shell print the target directory to stdout
40 (unset CDPATH
) >/dev
/null
2>&1 && unset CDPATH
42 # The names of the tagged configurations supported by this script.
45 # ### BEGIN LIBTOOL CONFIG
47 # Libtool was configured on host nik.neuroponic.com:
49 # Shell to use when invoking shell scripts.
52 # Whether or not to build shared libraries.
53 build_libtool_libs
=yes
55 # Whether or not to build static libraries.
58 # Whether or not to add -lc for building shared libraries.
59 build_libtool_need_lc
=yes
61 # Whether or not to disallow shared libs when runtime libs are static
62 allow_libtool_libs_with_static_runtimes
=yes
64 # Whether or not to optimize for fast installation.
68 host_alias
=i386-mingw32msvc
69 host=i386-pc-mingw32msvc
71 # An echo program that does not interpret backslashes.
75 AR
="i386-mingw32msvc-ar"
79 LTCC
="i386-mingw32msvc-gcc"
81 # A language-specific compiler.
82 CC
="i386-mingw32msvc-gcc"
84 # Is the compiler the GNU C compiler?
90 # The linker used to build libraries.
91 LD
="/usr/misc/torrents/mingw/cross-tools/i386-mingw32msvc/bin/ld"
93 # Whether we need hard or soft links.
96 # A BSD-compatible nm program.
97 NM
="/usr/misc/torrents/mingw/cross-tools/bin/i386-mingw32msvc-nm -B"
99 # A symbol stripping program
100 STRIP
="i386-mingw32msvc-strip"
102 # Used to examine libraries when file_magic_cmd begins "file"
105 # Used on cygwin: DLL creation program.
106 DLLTOOL
="i386-mingw32msvc-dlltool"
108 # Used on cygwin: object dumper.
109 OBJDUMP
="i386-mingw32msvc-objdump"
111 # Used on cygwin: assembler.
112 AS
="i386-mingw32msvc-as"
114 # The name of the directory that contains temporary libtool files.
117 # How to create reloadable object files.
119 reload_cmds
="\$LD\$reload_flag -o \$output\$reload_objs"
121 # How to pass a linker flag through the compiler.
124 # Object file suffix (normally "o").
127 # Old archive suffix (normally "a").
130 # Shared library suffix (normally ".so").
133 # Executable file suffix (normally "").
136 # Additional compiler flags for building library objects.
137 pic_flag
=" -DDLL_EXPORT -DPIC"
140 # What is the maximum length of a command?
143 # Does compiler simultaneously support -c and -o options?
146 # Must we lock files when doing compilation ?
149 # Do we need the lib prefix for modules?
152 # Do we need a version for libraries?
155 # Whether dlopen is supported.
156 dlopen_support
=unknown
158 # Whether dlopen of programs is supported.
161 # Whether dlopen of statically linked programs is supported.
162 dlopen_self_static
=unknown
164 # Compiler flag to prevent dynamic linking.
165 link_static_flag
="-static"
167 # Compiler flag to turn off builtin functions.
168 no_builtin_flag
=" -fno-builtin -fno-rtti -fno-exceptions"
170 # Compiler flag to allow reflexive dlopens.
171 export_dynamic_flag_spec
="\${wl}--export-dynamic"
173 # Compiler flag to generate shared objects directly from archives.
174 whole_archive_flag_spec
="\${wl}--whole-archive\$convenience \${wl}--no-whole-archive"
176 # Compiler flag to generate thread-safe objects.
177 thread_safe_flag_spec
=""
179 # Library versioning type.
182 # Format of library name prefix.
183 libname_spec
="lib\$name"
185 # List of archive names. First name is the real one, the rest are links.
186 # The last name is the one that the linker finds with -lNAME.
187 library_names_spec
="\$libname.dll.a"
189 # The coded name of the library, if different from the real name.
190 soname_spec
="\${libname}\`echo \${release} | \$SED -e s/[.]/-/g\`\${versuffix}\${shared_ext}"
192 # Commands used to build and install an old-style archive.
193 RANLIB
="i386-mingw32msvc-ranlib"
194 old_archive_cmds
="\$AR \$AR_FLAGS \$oldlib\$oldobjs\$old_deplibs~\$RANLIB \$oldlib"
195 old_postinstall_cmds
="\$RANLIB \$oldlib~chmod 644 \$oldlib"
196 old_postuninstall_cmds
=""
198 # Create an old-style archive from a shared archive.
199 old_archive_from_new_cmds
=""
201 # Create a temporary old-style archive to link instead of a shared archive.
202 old_archive_from_expsyms_cmds
=""
204 # Commands used to build and install a shared archive.
205 archive_cmds
="\$CC -shared \$libobjs \$deplibs \$compiler_flags -o \$output_objdir/\$soname \${wl}--image-base=0x10000000 \${wl}--out-implib,\$lib"
206 archive_expsym_cmds
="if test \\\"x\\\`\$SED 1q \$export_symbols\\\`\\\" = xEXPORTS; then
207 cp \$export_symbols \$output_objdir/\$soname.def;
209 echo EXPORTS > \$output_objdir/\$soname.def;
210 cat \$export_symbols >> \$output_objdir/\$soname.def;
212 \$CC -shared \$output_objdir/\$soname.def \$libobjs \$deplibs \$compiler_flags -o \$output_objdir/\$soname \${wl}--image-base=0x10000000 \${wl}--out-implib,\$lib"
213 postinstall_cmds
="base_file=\\\`basename \\\${file}\\\`~
214 dlpath=\\\`\$SHELL 2>&1 -c '. \$dir/'\\\${base_file}'i;echo \\\$dlname'\\\`~
215 dldir=\$destdir/\\\`dirname \\\$dlpath\\\`~
216 test -d \\\$dldir || mkdir -p \\\$dldir~
217 \$install_prog \$dir/\$dlname \\\$dldir/\$dlname"
218 postuninstall_cmds
="dldll=\\\`\$SHELL 2>&1 -c '. \$file; echo \\\$dlname'\\\`~
219 dlpath=\$dir/\\\$dldll~
222 # Commands used to build a loadable module (assumed same as above if empty)
224 module_expsym_cmds
=""
226 # Commands to strip libraries.
227 old_striplib
="i386-mingw32msvc-strip --strip-debug"
228 striplib
="i386-mingw32msvc-strip --strip-unneeded"
230 # Dependencies to place before the objects being linked to create a
234 # Dependencies to place after the objects being linked to create a
238 # Dependencies to place before the objects being linked to create a
242 # Dependencies to place after the objects being linked to create a
246 # The library search path used internally by the compiler when linking
248 compiler_lib_search_path
=""
250 # Method to check whether dependent libraries are shared objects.
251 deplibs_check_method
="file_magic file format pei*-i386(.*architecture: i386)?"
253 # Command to use when deplibs_check_method == file_magic.
254 file_magic_cmd
="\$OBJDUMP -f"
256 # Flag that allows shared libraries with undefined symbols to be built.
257 allow_undefined_flag
="unsupported"
259 # Flag that forces no undefined symbols.
262 # Commands used to finish a libtool library installation in a directory.
265 # Same as above, but a single script fragment to be evaled but not shown.
268 # Take the output of nm and produce a listing of raw symbols and C names.
269 global_symbol_pipe
="sed -n -e 's/^.*[ ]\\([ABCDGIRSTW][ABCDGIRSTW]*\\)[ ][ ]*\\(_\\)\\([_A-Za-z][_A-Za-z0-9]*\\)\$/\\1 \\2\\3 \\3/p'"
271 # Transform the output of nm in a proper C declaration
272 global_symbol_to_cdecl
="sed -n -e 's/^. .* \\(.*\\)\$/extern int \\1;/p'"
274 # Transform the output of nm in a C name address pair
275 global_symbol_to_c_name_address
="sed -n -e 's/^: \\([^ ]*\\) \$/ {\\\"\\1\\\", (lt_ptr) 0},/p' -e 's/^[BCDEGRST] \\([^ ]*\\) \\([^ ]*\\)\$/ {\"\\2\", (lt_ptr) \\&\\2},/p'"
277 # This is the shared library runtime path variable.
278 runpath_var
=LD_RUN_PATH
280 # This is the shared library path variable.
283 # Is shlibpath searched before the hard-coded library search path?
284 shlibpath_overrides_runpath
=yes
286 # How to hardcode a shared library path into an executable.
287 hardcode_action
=immediate
289 # Whether we should hardcode library paths into libraries.
290 hardcode_into_libs
=no
292 # Flag to hardcode $libdir into a binary during linking.
293 # This must work even if $libdir does not exist.
294 hardcode_libdir_flag_spec
="\${wl}--rpath \${wl}\$libdir"
296 # If ld is used when linking, flag to hardcode $libdir into
297 # a binary during linking. This must work even if $libdir does
299 hardcode_libdir_flag_spec_ld
=""
301 # Whether we need a single -rpath flag with a separated argument.
302 hardcode_libdir_separator
=""
304 # Set to yes if using DIR/libNAME during linking hardcodes DIR into the
308 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
312 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
313 # the resulting binary.
314 hardcode_shlibpath_var
=unsupported
316 # Set to yes if building a shared library automatically hardcodes DIR into the library
317 # and all subsequent libraries and executables linked against it.
318 hardcode_automatic
=no
320 # Variables whose values should be saved in libtool wrapper scripts and
321 # restored at relink time.
322 variables_saved_for_relink
="PATH LD_RUN_PATH GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
324 # Whether libtool must link a program against all its dependency libraries.
325 link_all_deplibs
=unknown
327 # Compile-time system search path for libraries
328 sys_lib_search_path_spec
=" /usr/misc/torrents/mingw/cross-tools/bin/../lib/gcc-lib/i386-mingw32msvc/3.2.3/ /usr/misc/torrents/mingw/cross-tools/bin/../lib/gcc-lib/ /usr/local/cross-tools/lib/gcc-lib/i386-mingw32msvc/3.2.3/ /usr/lib/gcc/i386-mingw32msvc/3.2.3/ /usr/misc/torrents/mingw/cross-tools/bin/../lib/gcc-lib/i386-mingw32msvc/3.2.3/../../../../i386-mingw32msvc/lib/i386-mingw32msvc/3.2.3/ /usr/misc/torrents/mingw/cross-tools/bin/../lib/gcc-lib/i386-mingw32msvc/3.2.3/../../../../i386-mingw32msvc/lib/ /usr/local/cross-tools/lib/gcc-lib/i386-mingw32msvc/3.2.3/../../../../i386-mingw32msvc/lib/i386-mingw32msvc/3.2.3/ /usr/local/cross-tools/lib/gcc-lib/i386-mingw32msvc/3.2.3/../../../../i386-mingw32msvc/lib/ /usr/misc/torrents/mingw/cross-tools/bin/../lib/gcc-lib/i386-mingw32msvc/3.2.3/../../../i386-mingw32msvc/3.2.3/ /usr/misc/torrents/mingw/cross-tools/bin/../lib/gcc-lib/i386-mingw32msvc/3.2.3/../../../"
330 # Run-time system search path for libraries
331 sys_lib_dlsearch_path_spec
="/lib /usr/lib"
333 # Fix the shell variable $srcfile for the compiler.
336 # Set to yes if exported symbols are required.
337 always_export_symbols
=no
339 # The commands to list exported symbols.
340 export_symbols_cmds
="\$NM \$libobjs \$convenience | \$global_symbol_pipe | \$SED -e '/^[BCDGS] /s/.* \\\\([^ ]*\\\\)/\\\\1 DATA/' | \$SED -e '/^[AITW] /s/.* //' | sort | uniq > \$export_symbols"
342 # The commands to extract the exported symbol list from a shared archive.
343 extract_expsyms_cmds
=""
345 # Symbols that should not be listed in the preloaded symbols.
346 exclude_expsyms
="_GLOBAL_OFFSET_TABLE_"
348 # Symbols that must always be exported.
351 # ### END LIBTOOL CONFIG
353 # ltmain.sh - Provide generalized library-building support services.
354 # NOTE: Changing this file will not affect anything until you rerun configure.
356 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004
357 # Free Software Foundation, Inc.
358 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
360 # This program is free software; you can redistribute it and/or modify
361 # it under the terms of the GNU General Public License as published by
362 # the Free Software Foundation; either version 2 of the License, or
363 # (at your option) any later version.
365 # This program is distributed in the hope that it will be useful, but
366 # WITHOUT ANY WARRANTY; without even the implied warranty of
367 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
368 # General Public License for more details.
370 # You should have received a copy of the GNU General Public License
371 # along with this program; if not, write to the Free Software
372 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
374 # As a special exception to the GNU General Public License, if you
375 # distribute this file as part of a program that contains a
376 # configuration script generated by Autoconf, you may include it under
377 # the same distribution terms that you use for the rest of that program.
381 # Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
382 # is ksh but when the shell is invoked as "sh" and the current value of
383 # the _XPG environment variable is not equal to 1 (one), the special
384 # positional parameter $0, within a function call, is the name of the
388 # The name of this program:
389 progname
=`echo "$progpath" | $SED $basename`
399 TIMESTAMP
=" (1.1220.2.130 2004/09/19 12:13:49)"
401 # See if we are running on zsh, and set the options which allow our
402 # commands through without removal of \ escapes.
403 if test -n "${ZSH_VERSION+set}" ; then
407 # Check that we have a working $echo.
408 if test "X$1" = X--no-reexec
; then
409 # Discard the --no-reexec flag, and continue.
411 elif test "X$1" = X--fallback-echo
; then
412 # Avoid inline document here, it may be left over
414 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
415 # Yippee, $echo works!
418 # Restart under the correct shell, and then maybe $echo will work.
419 exec $SHELL "$progpath" --no-reexec ${1+"$@"}
422 if test "X$1" = X--fallback-echo
; then
423 # used as fallback echo
432 help="Try \`$progname --help' for more information."
433 magic
="%%%MAGIC variable%%%"
438 # Sed substitution that helps us do robust quoting. It backslashifies
439 # metacharacters that are still active within double-quoted strings.
440 Xsed
="${SED}"' -e 1s/^X//'
441 sed_quote_subst
='s/\([\\`\\"$\\\\]\)/\\\1/g'
442 # test EBCDIC or ASCII
443 case `echo A|tr A '\301'` in
444 A
) # EBCDIC based system
445 SP2NL
="tr '\100' '\n'"
446 NL2SP
="tr '\r\n' '\100\100'"
448 *) # Assume ASCII based system
449 SP2NL
="tr '\040' '\012'"
450 NL2SP
="tr '\015\012' '\040\040'"
455 # Only set LANG and LC_ALL to C if already set.
456 # These must not be set unconditionally because not all systems understand
457 # e.g. LANG=C (notably SCO).
458 # We save the old values to restore during execute mode.
459 if test "${LC_ALL+set}" = set; then
460 save_LC_ALL
="$LC_ALL"; LC_ALL
=C
; export LC_ALL
462 if test "${LANG+set}" = set; then
463 save_LANG
="$LANG"; LANG
=C
; export LANG
466 # Make sure IFS has a sensible default
470 if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
471 $echo "$modename: not configured to build any kind of library" 1>&2
472 $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
485 lo2o
="s/\\.lo\$/.${objext}/"
486 o2lo
="s/\\.${objext}\$/.lo/"
488 #####################################
489 # Shell function definitions:
490 # This seems to be the best place for them
492 # func_win32_libid arg
493 # return the library type of file 'arg'
495 # Need a lot of goo to handle *both* DLLs and import libs
496 # Has to be a shell function in order to 'eat' the argument
497 # that is supplied when $file_magic_command is called.
498 func_win32_libid
() {
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 ...'
539 if test -n "$available_tags" && test -z "$tagname"; then
543 *[\
[\~\
#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
547 CC_quoted
="$CC_quoted $arg"
550 # Blanks in the command may have been stripped by the calling shell,
551 # but not from the CC environment variable when configure was run.
552 " $CC "* |
"$CC "* |
" `$echo $CC` "* |
"`$echo $CC` "* |
" $CC_quoted"* |
"$CC_quoted "* |
" `$echo $CC_quoted` "* |
"`$echo $CC_quoted` "*) ;;
553 # Blanks at the start of $base_compile will cause this to fail
554 # if we don't check for them as well.
556 for z
in $available_tags; do
557 if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev
/null
; then
558 # Evaluate the configuration.
559 eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`"
562 # Double-quote args containing other shell metacharacters.
564 *[\
[\~\
#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
568 CC_quoted
="$CC_quoted $arg"
571 " $CC "* |
"$CC "* |
" `$echo $CC` "* |
"`$echo $CC` "* |
" $CC_quoted"* |
"$CC_quoted "* |
" `$echo $CC_quoted` "* |
"`$echo $CC_quoted` "*)
572 # The compiler in the base compile command matches
573 # the one in the tagged configuration.
574 # Assume this is the tagged configuration we want.
581 # If $tagname still isn't set, then no tagged configuration
582 # was found and let the user know that the "--tag" command
583 # line option must be used.
584 if test -z "$tagname"; then
585 $echo "$modename: unable to infer tagged configuration"
586 $echo "$modename: specify a tag with \`--tag'" 1>&2
589 # $echo "$modename: using $tagname tagged configuration"
597 # func_extract_archives gentop oldlib ...
598 func_extract_archives
() {
599 my_gentop
="$1"; shift
607 $show "${rm}r $my_gentop"
608 $run ${rm}r
"$my_gentop"
609 $show "$mkdir $my_gentop"
610 $run $mkdir "$my_gentop"
612 if test "$my_status" -ne 0 && test ! -d "$my_gentop"; then
616 for my_xlib
in $my_oldlibs; do
617 # Extract the objects.
619 [\\/]* |
[A-Za-z
]:[\\/]*) my_xabs
="$my_xlib" ;;
620 *) my_xabs
=`pwd`"/$my_xlib" ;;
622 my_xlib
=`$echo "X$my_xlib" | $Xsed -e 's%^.*/%%'`
623 my_xdir
="$my_gentop/$my_xlib"
625 $show "${rm}r $my_xdir"
626 $run ${rm}r
"$my_xdir"
627 $show "$mkdir $my_xdir"
628 $run $mkdir "$my_xdir"
630 if test "$status" -ne 0 && test ! -d "$my_xdir"; then
635 $show "Extracting $my_xabs"
636 # Do not bother doing anything if just a dry run
637 if test -z "$run"; then
638 darwin_orig_dir
=`pwd`
639 cd $my_xdir ||
exit $?
640 darwin_archive
=$my_xabs
642 darwin_base_archive
=`basename $darwin_archive`
643 darwin_arches
=`lipo -info "$darwin_archive" 2>/dev/null | $EGREP Architectures 2>/dev/null`
644 if test -n "$darwin_arches"; then
645 darwin_arches
=`echo "$darwin_arches" | $SED -e 's/.*are://'`
647 $show "$darwin_base_archive has multiple architectures $darwin_arches"
648 for darwin_arch
in $darwin_arches ; do
649 mkdir
-p "unfat-$$/${darwin_base_archive}-${darwin_arch}"
650 lipo
-thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}"
651 # Remove the table of contents from the thin files.
652 $AR -d "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" __.SYMDEF
2>/dev
/null || true
653 $AR -d "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" __.SYMDEF\ SORTED
2>/dev
/null || true
654 cd "unfat-$$/${darwin_base_archive}-${darwin_arch}"
655 $AR -xo "${darwin_base_archive}"
656 rm "${darwin_base_archive}"
658 done # $darwin_arches
659 ## Okay now we have a bunch of thin objects, gotta fatten them up :)
660 darwin_filelist
=`find unfat-$$ -type f | xargs basename | sort -u | $NL2SP`
663 for darwin_file
in $darwin_filelist; do
664 darwin_files
=`find unfat-$$ -name $darwin_file -print | $NL2SP`
665 lipo
-create -output "$darwin_file" $darwin_files
666 done # $darwin_filelist
668 cd "$darwin_orig_dir"
671 (cd $my_xdir && $AR x
$my_xabs) ||
exit $?
676 # We will extract separately just the conflicting names and we will
677 # no longer touch any unique names. It is faster to leave these
678 # extract automatically by $AR in one run.
679 $show "(cd $my_xdir && $AR x $my_xabs)"
680 $run eval "(cd \$my_xdir && $AR x \$my_xabs)" ||
exit $?
681 if ($AR t
"$my_xabs" |
sort |
sort -uc >/dev
/null
2>&1); then
684 $echo "$modename: warning: object name conflicts; renaming object files" 1>&2
685 $echo "$modename: warning: to ensure that they will not overwrite" 1>&2
686 $AR t
"$my_xabs" |
sort |
uniq -cd |
while read -r count name
689 while test "$i" -le "$count"
691 # Put our $i before any first dot (extension)
692 # Never overwrite any file
694 while test "X$name_to" = "X$name" ||
test -f "$my_xdir/$name_to"
696 name_to
=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"`
698 $show "(cd $my_xdir && $AR xN $i $my_xabs '$name' && $mv '$name' '$name_to')"
699 $run eval "(cd \$my_xdir && $AR xN $i \$my_xabs '$name' && $mv '$name' '$name_to')" ||
exit $?
706 my_oldobjs
="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
709 func_extract_archives_result
="$my_oldobjs"
711 # End of Shell function definitions
712 #####################################
715 eval std_shrext
=\"$shrext_cmds\"
717 # Parse our command line options once, thoroughly.
718 while test "$#" -gt 0
724 -*=*) optarg
=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;;
728 # If the previous option needs an argument, assign it.
729 if test -n "$prev"; then
732 execute_dlfiles
="$execute_dlfiles $arg"
736 preserve_args
="${preserve_args}=$arg"
738 # Check whether tagname contains only valid characters
741 $echo "$progname: invalid tag name: $tagname" 1>&2
748 # Don't test for the "default" C tag, as we know, it's there, but
749 # not specially marked.
752 if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$progpath" > /dev
/null
; then
753 taglist
="$taglist $tagname"
754 # Evaluate the configuration.
755 eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^# ### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $progpath`"
757 $echo "$progname: ignoring unknown tag $tagname" 1>&2
772 # Have we seen a non-optional argument yet?
779 $echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP"
781 $echo "Copyright (C) 2003 Free Software Foundation, Inc."
782 $echo "This is free software; see the source for copying conditions. There is NO"
783 $echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
788 ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $progpath
789 # Now print the configurations for the tags.
790 for tagname
in $taglist; do
791 ${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$progpath"
797 $echo "$progname: enabling shell trace mode"
799 preserve_args
="$preserve_args $arg"
808 if test "$build_libtool_libs" = yes; then
809 $echo "enable shared libraries"
811 $echo "disable shared libraries"
813 if test "$build_old_libs" = yes; then
814 $echo "enable static libraries"
816 $echo "disable static libraries"
821 --finish) mode
="finish" ;;
823 --mode) prevopt
="--mode" prev
=mode
;;
824 --mode=*) mode
="$optarg" ;;
826 --preserve-dup-deps) duplicate_deps
="yes" ;;
830 preserve_args
="$preserve_args $arg"
833 --tag) prevopt
="--tag" prev
=tag
;;
835 set tag
"$optarg" ${1+"$@"}
838 preserve_args
="$preserve_args --tag"
847 $echo "$modename: unrecognized option \`$arg'" 1>&2
859 if test -n "$prevopt"; then
860 $echo "$modename: option \`$prevopt' requires an argument" 1>&2
865 # If this variable is set in any of the actions, the command in it
866 # will be execed at the end. This prevents here-documents from being
867 # left over by shells.
870 if test -z "$show_help"; then
872 # Infer the operation mode.
873 if test -z "$mode"; then
874 $echo "*** Warning: inferring the mode of operation is deprecated." 1>&2
875 $echo "*** Future versions of Libtool will require -mode=MODE be specified." 1>&2
877 *cc | cc
* |
*++ | gcc
* |
*-gcc* | g
++* | xlc
*)
889 *db |
*dbx |
*strace |
*truss
)
899 # If we have no mode, but dlfiles were specified, then do execute mode.
900 test -n "$execute_dlfiles" && mode
=execute
902 # Just use the default operation mode.
903 if test -z "$mode"; then
904 if test -n "$nonopt"; then
905 $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2
907 $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2
914 # Only execute mode is allowed to have -dlopen flags.
915 if test -n "$execute_dlfiles" && test "$mode" != execute
; then
916 $echo "$modename: unrecognized option \`-dlopen'" 1>&2
921 # Change the help message to a mode-specific one.
923 help="Try \`$modename --help --mode=$mode' for more information."
925 # These modes are in order of execution frequency so that they run quickly.
927 # libtool compile mode
929 modename
="$modename: compile"
930 # Get the compilation command and the source file.
932 srcfile
="$nonopt" # always keep a non-empty value in "srcfile"
943 # do not "continue". Instead, add this to base_compile
955 # Accept any command-line options.
958 if test -n "$libobj" ; then
959 $echo "$modename: you cannot specify \`-o' more than once" 1>&2
966 -static |
-prefer-pic |
-prefer-non-pic)
977 arg_mode
=arg
# the next one goes into the "base_compile" arg list
978 continue # The current "srcfile" will either be retained or
979 ;; # replaced later. I would guess that would be a bug.
982 args
=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"`
984 save_ifs
="$IFS"; IFS
=','
988 # Double-quote args containing other shell metacharacters.
989 # Many Bourne shells cannot handle close brackets correctly
990 # in scan sets, so we specify it separately.
992 *[\
[\~\
#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
996 lastarg
="$lastarg $arg"
999 lastarg
=`$echo "X$lastarg" | $Xsed -e "s/^ //"`
1001 # Add the arguments to base_compile.
1002 base_compile
="$base_compile $lastarg"
1007 # Accept the current argument as the source file.
1008 # The previous "srcfile" becomes the current argument.
1015 esac # case $arg_mode
1017 # Aesthetically quote the previous argument.
1018 lastarg
=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"`
1021 # Double-quote args containing other shell metacharacters.
1022 # Many Bourne shells cannot handle close brackets correctly
1023 # in scan sets, so we specify it separately.
1024 *[\
[\~\
#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
1025 lastarg
="\"$lastarg\""
1029 base_compile
="$base_compile $lastarg"
1034 $echo "$modename: you must specify an argument for -Xcompile"
1038 $echo "$modename: you must specify a target with \`-o'" 1>&2
1042 # Get the name of the library object.
1043 [ -z "$libobj" ] && libobj
=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'`
1047 # Recognize several different file suffixes.
1048 # If the user specifies -o file.o, it is replaced with file.lo
1058 *.class
) xform
=class
;;
1063 *.java
) xform
=java
;;
1066 libobj
=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"`
1069 *.lo
) obj
=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;;
1071 $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2
1076 func_infer_tag
$base_compile
1078 for arg
in $later; do
1097 objname
=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
1098 xdir
=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'`
1099 if test "X$xdir" = "X$obj"; then
1104 lobj
=${xdir}$objdir/$objname
1106 if test -z "$base_compile"; then
1107 $echo "$modename: you must specify a compilation command" 1>&2
1112 # Delete any leftover library objects.
1113 if test "$build_old_libs" = yes; then
1114 removelist
="$obj $lobj $libobj ${libobj}T"
1116 removelist
="$lobj $libobj ${libobj}T"
1119 $run $rm $removelist
1120 trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15
1122 # On Cygwin there's no "real" PIC flag so we must build both object types
1124 cygwin
* | mingw
* | pw32
* | os2
*)
1128 if test "$pic_mode" = no
&& test "$deplibs_check_method" != pass_all
; then
1129 # non-PIC code in shared libraries is not supported
1133 # Calculate the filename of the output object if compiler does
1134 # not support -o with -c
1135 if test "$compiler_c_o" = no
; then
1136 output_obj
=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.
${objext}
1137 lockfile
="$output_obj.lock"
1138 removelist
="$removelist $output_obj $lockfile"
1139 trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15
1146 # Lock this critical section if it is needed
1147 # We use this script file to make the link, it avoids creating a new file
1148 if test "$need_locks" = yes; then
1149 until $run ln "$progpath" "$lockfile" 2>/dev
/null
; do
1150 $show "Waiting for $lockfile to be removed"
1153 elif test "$need_locks" = warn
; then
1154 if test -f "$lockfile"; then
1156 *** ERROR, $lockfile exists and contains:
1157 `cat $lockfile 2>/dev/null`
1159 This indicates that another process is trying to use the same
1160 temporary object file, and libtool could not work around it because
1161 your compiler does not support \`-c' and \`-o' together. If you
1162 repeat this compilation, it may succeed, by chance, but you had better
1163 avoid parallel builds (make -j) in this platform, or get a better
1166 $run $rm $removelist
1169 $echo $srcfile > "$lockfile"
1172 if test -n "$fix_srcfile_path"; then
1173 eval srcfile
=\"$fix_srcfile_path\"
1176 $run $rm "$libobj" "${libobj}T"
1178 # Create a libtool object file (analogous to a ".la" file),
1179 # but don't create it if we're doing a dry run.
1180 test -z "$run" && cat > ${libobj}T
<<EOF
1181 # $libobj - a libtool object file
1182 # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
1184 # Please DO NOT delete this file!
1185 # It is necessary for linking the library.
1187 # Name of the PIC object.
1190 # Only build a PIC object if we are building libtool libraries.
1191 if test "$build_libtool_libs" = yes; then
1192 # Without this assignment, base_compile gets emptied.
1193 fbsd_hideous_sh_bug
=$base_compile
1195 if test "$pic_mode" != no
; then
1196 command="$base_compile $srcfile $pic_flag"
1198 # Don't build PIC code
1199 command="$base_compile $srcfile"
1202 if test ! -d "${xdir}$objdir"; then
1203 $show "$mkdir ${xdir}$objdir"
1204 $run $mkdir ${xdir}$objdir
1206 if test "$status" -ne 0 && test ! -d "${xdir}$objdir"; then
1211 if test -z "$output_obj"; then
1212 # Place PIC objects in $objdir
1213 command="$command -o $lobj"
1216 $run $rm "$lobj" "$output_obj"
1219 if $run eval "$command"; then :
1221 test -n "$output_obj" && $run $rm $removelist
1225 if test "$need_locks" = warn
&&
1226 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
1228 *** ERROR, $lockfile contains:
1229 `cat $lockfile 2>/dev/null`
1231 but it should contain:
1234 This indicates that another process is trying to use the same
1235 temporary object file, and libtool could not work around it because
1236 your compiler does not support \`-c' and \`-o' together. If you
1237 repeat this compilation, it may succeed, by chance, but you had better
1238 avoid parallel builds (make -j) in this platform, or get a better
1241 $run $rm $removelist
1245 # Just move the object if needed, then go on to compile the next one
1246 if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then
1247 $show "$mv $output_obj $lobj"
1248 if $run $mv $output_obj $lobj; then :
1251 $run $rm $removelist
1256 # Append the name of the PIC object to the libtool object file.
1257 test -z "$run" && cat >> ${libobj}T
<<EOF
1258 pic_object='$objdir/$objname'
1262 # Allow error messages only from the first compilation.
1263 if test "$suppress_opt" = yes; then
1264 suppress_output
=' >/dev/null 2>&1'
1267 # No PIC object so indicate it doesn't exist in the libtool
1269 test -z "$run" && cat >> ${libobj}T
<<EOF
1275 # Only build a position-dependent object if we build old libraries.
1276 if test "$build_old_libs" = yes; then
1277 if test "$pic_mode" != yes; then
1278 # Don't build PIC code
1279 command="$base_compile $srcfile"
1281 command="$base_compile $srcfile $pic_flag"
1283 if test "$compiler_c_o" = yes; then
1284 command="$command -o $obj"
1287 # Suppress compiler output if we already did a PIC compilation.
1288 command="$command$suppress_output"
1289 $run $rm "$obj" "$output_obj"
1291 if $run eval "$command"; then :
1293 $run $rm $removelist
1297 if test "$need_locks" = warn
&&
1298 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
1300 *** ERROR, $lockfile contains:
1301 `cat $lockfile 2>/dev/null`
1303 but it should contain:
1306 This indicates that another process is trying to use the same
1307 temporary object file, and libtool could not work around it because
1308 your compiler does not support \`-c' and \`-o' together. If you
1309 repeat this compilation, it may succeed, by chance, but you had better
1310 avoid parallel builds (make -j) in this platform, or get a better
1313 $run $rm $removelist
1317 # Just move the object if needed
1318 if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then
1319 $show "$mv $output_obj $obj"
1320 if $run $mv $output_obj $obj; then :
1323 $run $rm $removelist
1328 # Append the name of the non-PIC object the libtool object file.
1329 # Only append if the libtool object file exists.
1330 test -z "$run" && cat >> ${libobj}T
<<EOF
1331 # Name of the non-PIC object.
1332 non_pic_object='$objname'
1336 # Append the name of the non-PIC object the libtool object file.
1337 # Only append if the libtool object file exists.
1338 test -z "$run" && cat >> ${libobj}T
<<EOF
1339 # Name of the non-PIC object.
1345 $run $mv "${libobj}T" "${libobj}"
1347 # Unlock the critical section if it was locked
1348 if test "$need_locks" != no
; then
1349 $run $rm "$lockfile"
1357 modename
="$modename: link"
1359 *-*-cygwin* |
*-*-mingw* |
*-*-pw32* |
*-*-os2*)
1360 # It is impossible to link a dll without this setting, and
1361 # we shouldn't force the makefile maintainer to figure out
1362 # which system we are compiling for in order to pass an extra
1363 # flag for every libtool invocation.
1364 # allow_undefined=no
1366 # FIXME: Unfortunately, there are problems with the above when trying
1367 # to make a dll which has undefined symbols, in which case not
1368 # even a static library is built. For now, we need to specify
1369 # -no-undefined on the libtool link line when we can be certain
1370 # that all symbols are satisfied, otherwise we get a static library.
1377 libtool_args
="$nonopt"
1378 base_compile
="$nonopt $@"
1379 compile_command
="$nonopt"
1380 finalize_command
="$nonopt"
1393 lib_search_path
=`pwd`
1402 export_symbols_regex
=
1410 precious_files_regex
=
1411 prefer_static_libs
=no
1424 func_infer_tag
$base_compile
1426 # We need to know -static, to get the right output filenames.
1430 -all-static |
-static)
1431 if test "X$arg" = "X-all-static"; then
1432 if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
1433 $echo "$modename: warning: complete static linking is impossible in this configuration" 1>&2
1435 if test -n "$link_static_flag"; then
1436 dlopen_self
=$dlopen_self_static
1439 if test -z "$pic_flag" && test -n "$link_static_flag"; then
1440 dlopen_self
=$dlopen_self_static
1443 build_libtool_libs
=no
1445 prefer_static_libs
=yes
1451 # See if our shared archives depend on static archives.
1452 test -n "$old_archive_from_new_cmds" && build_old_libs
=yes
1454 # Go through the arguments, transforming them on the way.
1455 while test "$#" -gt 0; do
1459 *[\
[\~\
#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
1460 qarg
=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test
1464 libtool_args
="$libtool_args $qarg"
1466 # If the previous option needs an argument, assign it.
1467 if test -n "$prev"; then
1470 compile_command
="$compile_command @OUTPUT@"
1471 finalize_command
="$finalize_command @OUTPUT@"
1477 if test "$preload" = no
; then
1478 # Add the symbol object into the linking commands.
1479 compile_command
="$compile_command @SYMFILE@"
1480 finalize_command
="$finalize_command @SYMFILE@"
1484 *.la |
*.lo
) ;; # We handle these cases below.
1486 if test "$dlself" = no
; then
1494 if test "$prev" = dlprefiles
; then
1496 elif test "$prev" = dlfiles
&& test "$dlopen_self" != yes; then
1506 if test "$prev" = dlfiles
; then
1507 dlfiles
="$dlfiles $arg"
1509 dlprefiles
="$dlprefiles $arg"
1517 export_symbols
="$arg"
1518 if test ! -f "$arg"; then
1519 $echo "$modename: symbol file \`$arg' does not exist"
1526 export_symbols_regex
="$arg"
1531 inst_prefix_dir
="$arg"
1536 precious_files_regex
="$arg"
1546 if test -f "$arg"; then
1549 for fil
in `cat $save_arg`
1551 # moreargs="$moreargs $fil"
1553 # A libtool-controlled object.
1555 # Check to see that this really is a libtool object.
1556 if (${SED} -e '2q' $arg |
grep "^# Generated by .*$PACKAGE") >/dev
/null
2>&1; then
1561 # If there is no directory component, then add one.
1563 */* |
*\\*) .
$arg ;;
1567 if test -z "$pic_object" || \
1568 test -z "$non_pic_object" ||
1569 test "$pic_object" = none
&& \
1570 test "$non_pic_object" = none
; then
1571 $echo "$modename: cannot find name of object for \`$arg'" 1>&2
1575 # Extract subdirectory from the argument.
1576 xdir
=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
1577 if test "X$xdir" = "X$arg"; then
1583 if test "$pic_object" != none
; then
1584 # Prepend the subdirectory the object is found in.
1585 pic_object
="$xdir$pic_object"
1587 if test "$prev" = dlfiles
; then
1588 if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
1589 dlfiles
="$dlfiles $pic_object"
1593 # If libtool objects are unsupported, then we need to preload.
1598 # CHECK ME: I think I busted this. -Ossama
1599 if test "$prev" = dlprefiles
; then
1600 # Preload the old-style object.
1601 dlprefiles
="$dlprefiles $pic_object"
1606 libobjs
="$libobjs $pic_object"
1611 if test "$non_pic_object" != none
; then
1612 # Prepend the subdirectory the object is found in.
1613 non_pic_object
="$xdir$non_pic_object"
1615 # A standard non-PIC object
1616 non_pic_objects
="$non_pic_objects $non_pic_object"
1617 if test -z "$pic_object" ||
test "$pic_object" = none
; then
1618 arg
="$non_pic_object"
1622 # Only an error if not doing a dry-run.
1623 if test -z "$run"; then
1624 $echo "$modename: \`$arg' is not a valid libtool object" 1>&2
1629 # Extract subdirectory from the argument.
1630 xdir
=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
1631 if test "X$xdir" = "X$arg"; then
1637 pic_object
=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"`
1638 non_pic_object
=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"`
1639 libobjs
="$libobjs $pic_object"
1640 non_pic_objects
="$non_pic_objects $non_pic_object"
1645 $echo "$modename: link input file \`$save_arg' does not exist"
1653 # We need an absolute path.
1655 [\\/]* |
[A-Za-z
]:[\\/]*) ;;
1657 $echo "$modename: only absolute run-paths are allowed" 1>&2
1661 if test "$prev" = rpath
; then
1664 *) rpath
="$rpath $arg" ;;
1669 *) xrpath
="$xrpath $arg" ;;
1676 compiler_flags
="$compiler_flags $qarg"
1678 compile_command
="$compile_command $qarg"
1679 finalize_command
="$finalize_command $qarg"
1683 linker_flags
="$linker_flags $qarg"
1684 compiler_flags
="$compiler_flags $wl$qarg"
1686 compile_command
="$compile_command $wl$qarg"
1687 finalize_command
="$finalize_command $wl$qarg"
1691 linker_flags
="$linker_flags $qarg"
1692 compiler_flags
="$compiler_flags $qarg"
1694 compile_command
="$compile_command $qarg"
1695 finalize_command
="$finalize_command $qarg"
1704 eval "$prev=\"\$arg\""
1709 fi # test -n "$prev"
1715 if test -n "$link_static_flag"; then
1716 compile_command
="$compile_command $link_static_flag"
1717 finalize_command
="$finalize_command $link_static_flag"
1723 # FIXME: remove this flag sometime in the future.
1724 $echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2
1748 -export-symbols |
-export-symbols-regex)
1749 if test -n "$export_symbols" ||
test -n "$export_symbols_regex"; then
1750 $echo "$modename: more than one -exported-symbols argument is not allowed"
1753 if test "X$arg" = "X-export-symbols"; then
1766 # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:*
1767 # so, if we see these flags be careful not to treat them like -L
1769 case $with_gcc/$host in
1770 no
/*-*-irix* |
/*-*-irix*)
1771 compile_command
="$compile_command $arg"
1772 finalize_command
="$finalize_command $arg"
1779 dir
=`$echo "X$arg" | $Xsed -e 's/^-L//'`
1780 # We need an absolute path.
1782 [\\/]* |
[A-Za-z
]:[\\/]*) ;;
1784 absdir
=`cd "$dir" && pwd`
1785 if test -z "$absdir"; then
1786 $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2
1795 deplibs
="$deplibs -L$dir"
1796 lib_search_path
="$lib_search_path $dir"
1800 *-*-cygwin* |
*-*-mingw* |
*-*-pw32* |
*-*-os2*)
1801 case :$dllsearchpath: in
1803 *) dllsearchpath
="$dllsearchpath:$dir";;
1811 if test "X$arg" = "X-lc" ||
test "X$arg" = "X-lm"; then
1813 *-*-cygwin* |
*-*-pw32* |
*-*-beos*)
1814 # These systems don't actually have a C or math library (as such)
1817 *-*-mingw* |
*-*-os2*)
1818 # These systems don't actually have a C library (as such)
1819 test "X$arg" = "X-lc" && continue
1821 *-*-openbsd* |
*-*-freebsd*)
1822 # Do not include libc due to us having libc/libc_r.
1823 test "X$arg" = "X-lc" && continue
1825 *-*-rhapsody* |
*-*-darwin1.
[012])
1826 # Rhapsody C and math libraries are in the System framework
1827 deplibs
="$deplibs -framework System"
1830 elif test "X$arg" = "X-lc_r"; then
1832 *-*-openbsd* |
*-*-freebsd*)
1833 # Do not include libc_r directly, use -pthread flag.
1838 deplibs
="$deplibs $arg"
1842 -mt|
-mthreads|
-kthread|
-Kthread|
-pthread|
-pthreads|
--thread-safe)
1843 deplibs
="$deplibs $arg"
1852 # gcc -m* arguments should be passed to the linker via $compiler_flags
1853 # in order to pass architecture information to the linker
1854 # (e.g. 32 vs 64-bit). This may also be accomplished via -Wl,-mfoo
1855 # but this is not reliable with gcc because gcc may use -mfoo to
1856 # select a different linker, different libraries, etc, while
1857 # -Wl,-mfoo simply passes -mfoo to the linker.
1859 # Unknown arguments in both finalize_command and compile_command need
1860 # to be aesthetically quoted because they are evaled later.
1861 arg
=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
1863 *[\
[\~\
#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
1867 compile_command
="$compile_command $arg"
1868 finalize_command
="$finalize_command $arg"
1869 if test "$with_gcc" = "yes" ; then
1870 compiler_flags
="$compiler_flags $arg"
1887 *-*-cygwin* |
*-*-mingw* |
*-*-pw32* |
*-*-os2*)
1888 # The PATH hackery in wrapper scripts is required on Windows
1889 # in order for the loader to find any dlls it needs.
1890 $echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2
1891 $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2
1894 *) no_install
=yes ;;
1911 -precious-files-regex)
1932 dir
=`$echo "X$arg" | $Xsed -e 's/^-R//'`
1933 # We need an absolute path.
1935 [\\/]* |
[A-Za-z
]:[\\/]*) ;;
1937 $echo "$modename: only absolute run-paths are allowed" 1>&2
1943 *) xrpath
="$xrpath $dir" ;;
1949 # The effects of -static are defined in a previous loop.
1950 # We used to do the same as -all-static on platforms that
1951 # didn't have a PIC flag, but the assumption that the effects
1952 # would be equivalent was wrong. It would break on at least
1953 # Digital Unix and AIX.
1973 args
=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'`
1975 save_ifs
="$IFS"; IFS
=','
1976 for flag
in $args; do
1979 *[\
[\~\
#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
1984 compiler_flags
="$compiler_flags $flag"
1987 arg
=`$echo "X$arg" | $Xsed -e "s/^ //"`
1991 args
=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'`
1993 save_ifs
="$IFS"; IFS
=','
1994 for flag
in $args; do
1997 *[\
[\~\
#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
2002 compiler_flags
="$compiler_flags $wl$flag"
2003 linker_flags
="$linker_flags $flag"
2006 arg
=`$echo "X$arg" | $Xsed -e "s/^ //"`
2024 # Some other compiler flag.
2026 # Unknown arguments in both finalize_command and compile_command need
2027 # to be aesthetically quoted because they are evaled later.
2028 arg
=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
2030 *[\
[\~\
#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
2037 # A standard object.
2042 # A libtool-controlled object.
2044 # Check to see that this really is a libtool object.
2045 if (${SED} -e '2q' $arg |
grep "^# Generated by .*$PACKAGE") >/dev
/null
2>&1; then
2050 # If there is no directory component, then add one.
2052 */* |
*\\*) .
$arg ;;
2056 if test -z "$pic_object" || \
2057 test -z "$non_pic_object" ||
2058 test "$pic_object" = none
&& \
2059 test "$non_pic_object" = none
; then
2060 $echo "$modename: cannot find name of object for \`$arg'" 1>&2
2064 # Extract subdirectory from the argument.
2065 xdir
=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
2066 if test "X$xdir" = "X$arg"; then
2072 if test "$pic_object" != none
; then
2073 # Prepend the subdirectory the object is found in.
2074 pic_object
="$xdir$pic_object"
2076 if test "$prev" = dlfiles
; then
2077 if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
2078 dlfiles
="$dlfiles $pic_object"
2082 # If libtool objects are unsupported, then we need to preload.
2087 # CHECK ME: I think I busted this. -Ossama
2088 if test "$prev" = dlprefiles
; then
2089 # Preload the old-style object.
2090 dlprefiles
="$dlprefiles $pic_object"
2095 libobjs
="$libobjs $pic_object"
2100 if test "$non_pic_object" != none
; then
2101 # Prepend the subdirectory the object is found in.
2102 non_pic_object
="$xdir$non_pic_object"
2104 # A standard non-PIC object
2105 non_pic_objects
="$non_pic_objects $non_pic_object"
2106 if test -z "$pic_object" ||
test "$pic_object" = none
; then
2107 arg
="$non_pic_object"
2111 # Only an error if not doing a dry-run.
2112 if test -z "$run"; then
2113 $echo "$modename: \`$arg' is not a valid libtool object" 1>&2
2118 # Extract subdirectory from the argument.
2119 xdir
=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
2120 if test "X$xdir" = "X$arg"; then
2126 pic_object
=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"`
2127 non_pic_object
=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"`
2128 libobjs
="$libobjs $pic_object"
2129 non_pic_objects
="$non_pic_objects $non_pic_object"
2136 deplibs
="$deplibs $arg"
2137 old_deplibs
="$old_deplibs $arg"
2142 # A libtool-controlled library.
2144 if test "$prev" = dlfiles
; then
2145 # This library was specified with -dlopen.
2146 dlfiles
="$dlfiles $arg"
2148 elif test "$prev" = dlprefiles
; then
2149 # The library was specified with -dlpreopen.
2150 dlprefiles
="$dlprefiles $arg"
2153 deplibs
="$deplibs $arg"
2158 # Some other compiler argument.
2160 # Unknown arguments in both finalize_command and compile_command need
2161 # to be aesthetically quoted because they are evaled later.
2162 arg
=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
2164 *[\
[\~\
#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
2171 # Now actually substitute the argument into the commands.
2172 if test -n "$arg"; then
2173 compile_command
="$compile_command $arg"
2174 finalize_command
="$finalize_command $arg"
2176 done # argument parsing loop
2178 if test -n "$prev"; then
2179 $echo "$modename: the \`$prevarg' option requires an argument" 1>&2
2184 if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then
2185 eval arg
=\"$export_dynamic_flag_spec\"
2186 compile_command
="$compile_command $arg"
2187 finalize_command
="$finalize_command $arg"
2191 # calculate the name of the file, without its directory
2192 outputname
=`$echo "X$output" | $Xsed -e 's%^.*/%%'`
2193 libobjs_save
="$libobjs"
2195 if test -n "$shlibpath_var"; then
2196 # get the directories listed in $shlibpath_var
2197 eval shlib_search_path
=\
`\$echo \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\`
2201 eval sys_lib_search_path
=\"$sys_lib_search_path_spec\"
2202 eval sys_lib_dlsearch_path
=\"$sys_lib_dlsearch_path_spec\"
2204 output_objdir
=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'`
2205 if test "X$output_objdir" = "X$output"; then
2206 output_objdir
="$objdir"
2208 output_objdir
="$output_objdir/$objdir"
2210 # Create the object directory.
2211 if test ! -d "$output_objdir"; then
2212 $show "$mkdir $output_objdir"
2213 $run $mkdir $output_objdir
2215 if test "$status" -ne 0 && test ! -d "$output_objdir"; then
2220 # Determine the type of output
2223 $echo "$modename: you must specify an output file" 1>&2
2227 *.
$libext) linkmode
=oldlib
;;
2228 *.lo |
*.
$objext) linkmode
=obj
;;
2229 *.la
) linkmode
=lib
;;
2230 *) linkmode
=prog
;; # Anything else should be a program.
2234 *cygwin
* |
*mingw
* |
*pw32
*)
2235 # don't eliminate duplications in $postdeps and $predeps
2236 duplicate_compiler_generated_deps
=yes
2239 duplicate_compiler_generated_deps
=$duplicate_deps
2245 # Find all interdependent deplibs by searching for libraries
2246 # that are linked more than once (e.g. -la -lb -la)
2247 for deplib
in $deplibs; do
2248 if test "X$duplicate_deps" = "Xyes" ; then
2250 *" $deplib "*) specialdeplibs
="$specialdeplibs $deplib" ;;
2253 libs
="$libs $deplib"
2256 if test "$linkmode" = lib
; then
2257 libs
="$predeps $libs $compiler_lib_search_path $postdeps"
2259 # Compute libraries that are listed more than once in $predeps
2260 # $postdeps and mark them as special (i.e., whose duplicates are
2261 # not to be eliminated).
2263 if test "X$duplicate_compiler_generated_deps" = "Xyes" ; then
2264 for pre_post_dep
in $predeps $postdeps; do
2265 case "$pre_post_deps " in
2266 *" $pre_post_dep "*) specialdeplibs
="$specialdeplibs $pre_post_deps" ;;
2268 pre_post_deps
="$pre_post_deps $pre_post_dep"
2277 need_relink
=no
# whether we're linking any uninstalled libtool libraries
2278 notinst_deplibs
= # not-installed libtool libraries
2279 notinst_path
= # paths that contain not-installed libtool libraries
2283 for file in $dlfiles $dlprefiles; do
2287 $echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2
2299 passes
="conv scan dlopen dlpreopen link"
2304 for pass
in $passes; do
2305 if test "$linkmode,$pass" = "lib,link" ||
2306 test "$linkmode,$pass" = "prog,scan"; then
2310 if test "$linkmode" = prog
; then
2312 dlopen
) libs
="$dlfiles" ;;
2313 dlpreopen
) libs
="$dlprefiles" ;;
2314 link
) libs
="$deplibs %DEPLIBS% $dependency_libs" ;;
2317 if test "$pass" = dlopen
; then
2318 # Collect dlpreopened libraries
2319 save_deplibs
="$deplibs"
2322 for deplib
in $libs; do
2326 -mt|
-mthreads|
-kthread|
-Kthread|
-pthread|
-pthreads|
--thread-safe)
2327 if test "$linkmode,$pass" = "prog,link"; then
2328 compile_deplibs
="$deplib $compile_deplibs"
2329 finalize_deplibs
="$deplib $finalize_deplibs"
2331 deplibs
="$deplib $deplibs"
2336 if test "$linkmode" != lib
&& test "$linkmode" != prog
; then
2337 $echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2
2340 if test "$pass" = conv
; then
2341 deplibs
="$deplib $deplibs"
2344 name
=`$echo "X$deplib" | $Xsed -e 's/^-l//'`
2345 for searchdir
in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do
2346 for search_ext
in .la
$std_shrext .so .a
; do
2347 # Search the libtool library
2348 lib
="$searchdir/lib${name}${search_ext}"
2349 if test -f "$lib"; then
2350 if test "$search_ext" = ".la"; then
2359 if test "$found" != yes; then
2360 # deplib doesn't seem to be a libtool library
2361 if test "$linkmode,$pass" = "prog,link"; then
2362 compile_deplibs
="$deplib $compile_deplibs"
2363 finalize_deplibs
="$deplib $finalize_deplibs"
2365 deplibs
="$deplib $deplibs"
2366 test "$linkmode" = lib
&& newdependency_libs
="$deplib $newdependency_libs"
2369 else # deplib is a libtool library
2370 # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib,
2371 # We need to do some special things here, and not later.
2372 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
2373 case " $predeps $postdeps " in
2375 if (${SED} -e '2q' $lib |
2376 grep "^# Generated by .*$PACKAGE") >/dev
/null
2>&1; then
2380 */* |
*\\*) .
$lib ;;
2383 for l
in $old_library $library_names; do
2386 if test "X$ll" = "X$old_library" ; then # only static version available
2388 ladir
=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'`
2389 test "X$ladir" = "X$lib" && ladir
="."
2390 lib
=$ladir/$old_library
2391 if test "$linkmode,$pass" = "prog,link"; then
2392 compile_deplibs
="$deplib $compile_deplibs"
2393 finalize_deplibs
="$deplib $finalize_deplibs"
2395 deplibs
="$deplib $deplibs"
2396 test "$linkmode" = lib
&& newdependency_libs
="$deplib $newdependency_libs"
2410 deplibs
="$deplib $deplibs"
2411 test "$pass" = conv
&& continue
2412 newdependency_libs
="$deplib $newdependency_libs"
2413 newlib_search_path
="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
2416 if test "$pass" = conv
; then
2417 deplibs
="$deplib $deplibs"
2420 if test "$pass" = scan
; then
2421 deplibs
="$deplib $deplibs"
2423 compile_deplibs
="$deplib $compile_deplibs"
2424 finalize_deplibs
="$deplib $finalize_deplibs"
2426 newlib_search_path
="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
2429 $echo "$modename: warning: \`-L' is ignored for archives/objects" 1>&2
2435 if test "$pass" = link
; then
2436 dir
=`$echo "X$deplib" | $Xsed -e 's/^-R//'`
2437 # Make sure the xrpath contains only unique directories.
2440 *) xrpath
="$xrpath $dir" ;;
2443 deplibs
="$deplib $deplibs"
2446 *.la
) lib
="$deplib" ;;
2448 if test "$pass" = conv
; then
2449 deplibs
="$deplib $deplibs"
2455 case $deplibs_check_method in
2457 set dummy
$deplibs_check_method
2458 match_pattern_regex
=`expr "$deplibs_check_method" : "$2 \(.*\)"`
2459 if eval $echo \"$deplib\" 2>/dev
/null \
2461 |
$EGREP "$match_pattern_regex" > /dev
/null
; then
2469 if test "$valid_a_lib" != yes; then
2471 $echo "*** Warning: Trying to link with static lib archive $deplib."
2472 $echo "*** I have the capability to make that library automatically link in when"
2473 $echo "*** you link to this library. But I can only do this if you have a"
2474 $echo "*** shared version of the library, which you do not appear to have"
2475 $echo "*** because the file extensions .$libext of this argument makes me believe"
2476 $echo "*** that it is just a static archive that I should not used here."
2479 $echo "*** Warning: Linking the shared library $output against the"
2480 $echo "*** static library $deplib is not portable!"
2481 deplibs
="$deplib $deplibs"
2486 if test "$pass" != link
; then
2487 deplibs
="$deplib $deplibs"
2489 compile_deplibs
="$deplib $compile_deplibs"
2490 finalize_deplibs
="$deplib $finalize_deplibs"
2497 if test "$pass" = conv
; then
2498 deplibs
="$deplib $deplibs"
2499 elif test "$linkmode" = prog
; then
2500 if test "$pass" = dlpreopen ||
test "$dlopen_support" != yes ||
test "$build_libtool_libs" = no
; then
2501 # If there is no dlopen support or we're linking statically,
2502 # we need to preload.
2503 newdlprefiles
="$newdlprefiles $deplib"
2504 compile_deplibs
="$deplib $compile_deplibs"
2505 finalize_deplibs
="$deplib $finalize_deplibs"
2507 newdlfiles
="$newdlfiles $deplib"
2517 if test "$found" = yes ||
test -f "$lib"; then :
2519 $echo "$modename: cannot find the library \`$lib'" 1>&2
2523 # Check to see that this really is a libtool archive.
2524 if (${SED} -e '2q' $lib |
grep "^# Generated by .*$PACKAGE") >/dev
/null
2>&1; then :
2526 $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
2530 ladir
=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'`
2531 test "X$ladir" = "X$lib" && ladir
="."
2539 # If the library was installed with an old release of libtool,
2540 # it will not redefine variables installed, or shouldnotlink
2546 */* |
*\\*) .
$lib ;;
2550 if test "$linkmode,$pass" = "lib,link" ||
2551 test "$linkmode,$pass" = "prog,scan" ||
2552 { test "$linkmode" != prog
&& test "$linkmode" != lib
; }; then
2553 test -n "$dlopen" && dlfiles
="$dlfiles $dlopen"
2554 test -n "$dlpreopen" && dlprefiles
="$dlprefiles $dlpreopen"
2557 if test "$pass" = conv
; then
2558 # Only check for convenience libraries
2559 deplibs
="$lib $deplibs"
2560 if test -z "$libdir"; then
2561 if test -z "$old_library"; then
2562 $echo "$modename: cannot find name of link library for \`$lib'" 1>&2
2565 # It is a libtool convenience library, so add in its objects.
2566 convenience
="$convenience $ladir/$objdir/$old_library"
2567 old_convenience
="$old_convenience $ladir/$objdir/$old_library"
2569 for deplib
in $dependency_libs; do
2570 deplibs
="$deplib $deplibs"
2571 if test "X$duplicate_deps" = "Xyes" ; then
2572 case "$tmp_libs " in
2573 *" $deplib "*) specialdeplibs
="$specialdeplibs $deplib" ;;
2576 tmp_libs
="$tmp_libs $deplib"
2578 elif test "$linkmode" != prog
&& test "$linkmode" != lib
; then
2579 $echo "$modename: \`$lib' is not a convenience library" 1>&2
2586 # Get the name of the library we link against.
2588 for l
in $old_library $library_names; do
2591 if test -z "$linklib"; then
2592 $echo "$modename: cannot find name of link library for \`$lib'" 1>&2
2596 # This library was specified with -dlopen.
2597 if test "$pass" = dlopen
; then
2598 if test -z "$libdir"; then
2599 $echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2
2602 if test -z "$dlname" ||
2603 test "$dlopen_support" != yes ||
2604 test "$build_libtool_libs" = no
; then
2605 # If there is no dlname, no dlopen support or we're linking
2606 # statically, we need to preload. We also need to preload any
2607 # dependent libraries so libltdl's deplib preloader doesn't
2608 # bomb out in the load deplibs phase.
2609 dlprefiles
="$dlprefiles $lib $dependency_libs"
2611 newdlfiles
="$newdlfiles $lib"
2616 # We need an absolute path.
2618 [\\/]* |
[A-Za-z
]:[\\/]*) abs_ladir
="$ladir" ;;
2620 abs_ladir
=`cd "$ladir" && pwd`
2621 if test -z "$abs_ladir"; then
2622 $echo "$modename: warning: cannot determine absolute directory name of \`$ladir'" 1>&2
2623 $echo "$modename: passing it literally to the linker, although it might fail" 1>&2
2628 laname
=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
2630 # Find the relevant object directory and library name.
2631 if test "X$installed" = Xyes
; then
2632 if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then
2633 $echo "$modename: warning: library \`$lib' was moved." 1>&2
2642 if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then
2645 # Remove this search path later
2646 notinst_path
="$notinst_path $abs_ladir"
2648 dir
="$ladir/$objdir"
2649 absdir
="$abs_ladir/$objdir"
2650 # Remove this search path later
2651 notinst_path
="$notinst_path $abs_ladir"
2653 fi # $installed = yes
2654 name
=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
2656 # This library was specified with -dlpreopen.
2657 if test "$pass" = dlpreopen
; then
2658 if test -z "$libdir"; then
2659 $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2
2662 # Prefer using a static library (so that no silly _DYNAMIC symbols
2663 # are required to link).
2664 if test -n "$old_library"; then
2665 newdlprefiles
="$newdlprefiles $dir/$old_library"
2666 # Otherwise, use the dlname, so that lt_dlopen finds it.
2667 elif test -n "$dlname"; then
2668 newdlprefiles
="$newdlprefiles $dir/$dlname"
2670 newdlprefiles
="$newdlprefiles $dir/$linklib"
2672 fi # $pass = dlpreopen
2674 if test -z "$libdir"; then
2675 # Link the convenience library
2676 if test "$linkmode" = lib
; then
2677 deplibs
="$dir/$old_library $deplibs"
2678 elif test "$linkmode,$pass" = "prog,link"; then
2679 compile_deplibs
="$dir/$old_library $compile_deplibs"
2680 finalize_deplibs
="$dir/$old_library $finalize_deplibs"
2682 deplibs
="$lib $deplibs" # used for prog,scan pass
2688 if test "$linkmode" = prog
&& test "$pass" != link
; then
2689 newlib_search_path
="$newlib_search_path $ladir"
2690 deplibs
="$lib $deplibs"
2693 if test "$link_all_deplibs" != no ||
test -z "$library_names" ||
2694 test "$build_libtool_libs" = no
; then
2699 for deplib
in $dependency_libs; do
2701 -L*) newlib_search_path
="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test
2703 # Need to link against all dependency_libs?
2704 if test "$linkalldeplibs" = yes; then
2705 deplibs
="$deplib $deplibs"
2707 # Need to hardcode shared library paths
2708 # or/and link against static libraries
2709 newdependency_libs
="$deplib $newdependency_libs"
2711 if test "X$duplicate_deps" = "Xyes" ; then
2712 case "$tmp_libs " in
2713 *" $deplib "*) specialdeplibs
="$specialdeplibs $deplib" ;;
2716 tmp_libs
="$tmp_libs $deplib"
2719 fi # $linkmode = prog...
2721 if test "$linkmode,$pass" = "prog,link"; then
2722 if test -n "$library_names" &&
2723 { test "$prefer_static_libs" = no ||
test -z "$old_library"; }; then
2724 # We need to hardcode the library path
2725 if test -n "$shlibpath_var"; then
2726 # Make sure the rpath contains only unique directories.
2727 case "$temp_rpath " in
2730 *) temp_rpath
="$temp_rpath $dir" ;;
2734 # Hardcode the library path.
2735 # Skip directories that are in the system default run-time
2737 case " $sys_lib_dlsearch_path " in
2740 case "$compile_rpath " in
2742 *) compile_rpath
="$compile_rpath $absdir"
2746 case " $sys_lib_dlsearch_path " in
2749 case "$finalize_rpath " in
2751 *) finalize_rpath
="$finalize_rpath $libdir"
2755 fi # $linkmode,$pass = prog,link...
2757 if test "$alldeplibs" = yes &&
2758 { test "$deplibs_check_method" = pass_all ||
2759 { test "$build_libtool_libs" = yes &&
2760 test -n "$library_names"; }; }; then
2761 # We only need to search for static libraries
2766 link_static
=no
# Whether the deplib will be linked statically
2767 if test -n "$library_names" &&
2768 { test "$prefer_static_libs" = no ||
test -z "$old_library"; }; then
2769 if test "$installed" = no
; then
2770 notinst_deplibs
="$notinst_deplibs $lib"
2773 # This is a shared library
2775 # Warn about portability, can't link against -module's on
2776 # some systems (darwin)
2777 if test "$shouldnotlink" = yes && test "$pass" = link
; then
2779 if test "$linkmode" = prog
; then
2780 $echo "*** Warning: Linking the executable $output against the loadable module"
2782 $echo "*** Warning: Linking the shared library $output against the loadable module"
2784 $echo "*** $linklib is not portable!"
2786 if test "$linkmode" = lib
&&
2787 test "$hardcode_into_libs" = yes; then
2788 # Hardcode the library path.
2789 # Skip directories that are in the system default run-time
2791 case " $sys_lib_dlsearch_path " in
2794 case "$compile_rpath " in
2796 *) compile_rpath
="$compile_rpath $absdir"
2800 case " $sys_lib_dlsearch_path " in
2803 case "$finalize_rpath " in
2805 *) finalize_rpath
="$finalize_rpath $libdir"
2811 if test -n "$old_archive_from_expsyms_cmds"; then
2812 # figure out the soname
2813 set dummy
$library_names
2816 libname
=`eval \\$echo \"$libname_spec\"`
2817 # use dlname if we got it. it's perfectly good, no?
2818 if test -n "$dlname"; then
2820 elif test -n "$soname_spec"; then
2824 major
=`expr $current - $age`
2828 eval soname
=\"$soname_spec\"
2833 # Make a new name for the extract_expsyms_cmds to use
2835 soname
=`$echo $soroot | ${SED} -e 's/^.*\///'`
2836 newlib
="libimp-`$echo $soname | ${SED} 's/^lib//;s/\.dll$//'`.a"
2838 # If the library has no export list, then create one now
2839 if test -f "$output_objdir/$soname-def"; then :
2841 $show "extracting exported symbol list from \`$soname'"
2842 save_ifs
="$IFS"; IFS
='~'
2843 cmds
=$extract_expsyms_cmds
2844 for cmd
in $cmds; do
2848 $run eval "$cmd" ||
exit $?
2854 if test -f "$output_objdir/$newlib"; then :; else
2855 $show "generating import library for \`$soname'"
2856 save_ifs
="$IFS"; IFS
='~'
2857 cmds
=$old_archive_from_expsyms_cmds
2858 for cmd
in $cmds; do
2862 $run eval "$cmd" ||
exit $?
2866 # make sure the library variables are pointing to the new library
2869 fi # test -n "$old_archive_from_expsyms_cmds"
2871 if test "$linkmode" = prog ||
test "$mode" != relink
; then
2876 case $hardcode_action in
2877 immediate | unsupported
)
2878 if test "$hardcode_direct" = no
; then
2881 *-*-sco3.2v5
* ) add_dir
="-L$dir" ;;
2883 # if the lib is a module then we can not link against
2884 # it, someone is ignoring the new warnings I added
2885 if /usr
/bin
/file -L $add 2> /dev
/null |
$EGREP "bundle" >/dev
/null
; then
2886 $echo "** Warning, lib $linklib is a module, not a shared library"
2887 if test -z "$old_library" ; then
2889 $echo "** And there doesn't seem to be a static archive available"
2890 $echo "** The link will probably fail, sorry"
2892 add
="$dir/$old_library"
2896 elif test "$hardcode_minus_L" = no
; then
2898 *-*-sunos*) add_shlibpath
="$dir" ;;
2902 elif test "$hardcode_shlibpath_var" = no
; then
2903 add_shlibpath
="$dir"
2910 if test "$hardcode_direct" = yes; then
2912 elif test "$hardcode_minus_L" = yes; then
2914 # Try looking first in the location we're being installed to.
2915 if test -n "$inst_prefix_dir"; then
2918 add_dir
="$add_dir -L$inst_prefix_dir$libdir"
2923 elif test "$hardcode_shlibpath_var" = yes; then
2924 add_shlibpath
="$dir"
2933 if test "$lib_linked" != yes; then
2934 $echo "$modename: configuration error: unsupported hardcode properties"
2938 if test -n "$add_shlibpath"; then
2939 case :$compile_shlibpath: in
2940 *":$add_shlibpath:"*) ;;
2941 *) compile_shlibpath
="$compile_shlibpath$add_shlibpath:" ;;
2944 if test "$linkmode" = prog
; then
2945 test -n "$add_dir" && compile_deplibs
="$add_dir $compile_deplibs"
2946 test -n "$add" && compile_deplibs
="$add $compile_deplibs"
2948 test -n "$add_dir" && deplibs
="$add_dir $deplibs"
2949 test -n "$add" && deplibs
="$add $deplibs"
2950 if test "$hardcode_direct" != yes && \
2951 test "$hardcode_minus_L" != yes && \
2952 test "$hardcode_shlibpath_var" = yes; then
2953 case :$finalize_shlibpath: in
2955 *) finalize_shlibpath
="$finalize_shlibpath$libdir:" ;;
2961 if test "$linkmode" = prog ||
test "$mode" = relink
; then
2965 # Finalize command for both is simple: just hardcode it.
2966 if test "$hardcode_direct" = yes; then
2967 add
="$libdir/$linklib"
2968 elif test "$hardcode_minus_L" = yes; then
2971 elif test "$hardcode_shlibpath_var" = yes; then
2972 case :$finalize_shlibpath: in
2974 *) finalize_shlibpath
="$finalize_shlibpath$libdir:" ;;
2977 elif test "$hardcode_automatic" = yes; then
2978 if test -n "$inst_prefix_dir" &&
2979 test -f "$inst_prefix_dir$libdir/$linklib" ; then
2980 add
="$inst_prefix_dir$libdir/$linklib"
2982 add
="$libdir/$linklib"
2985 # We cannot seem to hardcode it, guess we'll fake it.
2987 # Try looking first in the location we're being installed to.
2988 if test -n "$inst_prefix_dir"; then
2991 add_dir
="$add_dir -L$inst_prefix_dir$libdir"
2998 if test "$linkmode" = prog
; then
2999 test -n "$add_dir" && finalize_deplibs
="$add_dir $finalize_deplibs"
3000 test -n "$add" && finalize_deplibs
="$add $finalize_deplibs"
3002 test -n "$add_dir" && deplibs
="$add_dir $deplibs"
3003 test -n "$add" && deplibs
="$add $deplibs"
3006 elif test "$linkmode" = prog
; then
3007 # Here we assume that one of hardcode_direct or hardcode_minus_L
3008 # is not unsupported. This is valid on all known static and
3010 if test "$hardcode_direct" != unsupported
; then
3011 test -n "$old_library" && linklib
="$old_library"
3012 compile_deplibs
="$dir/$linklib $compile_deplibs"
3013 finalize_deplibs
="$dir/$linklib $finalize_deplibs"
3015 compile_deplibs
="-l$name -L$dir $compile_deplibs"
3016 finalize_deplibs
="-l$name -L$dir $finalize_deplibs"
3018 elif test "$build_libtool_libs" = yes; then
3019 # Not a shared library
3020 if test "$deplibs_check_method" != pass_all
; then
3021 # We're trying link a shared library against a static one
3022 # but the system doesn't support it.
3024 # Just print a warning and add the library to dependency_libs so
3025 # that the program can be linked against the static library.
3027 $echo "*** Warning: This system can not link to static lib archive $lib."
3028 $echo "*** I have the capability to make that library automatically link in when"
3029 $echo "*** you link to this library. But I can only do this if you have a"
3030 $echo "*** shared version of the library, which you do not appear to have."
3031 if test "$module" = yes; then
3032 $echo "*** But as you try to build a module library, libtool will still create "
3033 $echo "*** a static module, that should work as long as the dlopening application"
3034 $echo "*** is linked with the -dlopen flag to resolve symbols at runtime."
3035 if test -z "$global_symbol_pipe"; then
3037 $echo "*** However, this would only work if libtool was able to extract symbol"
3038 $echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
3039 $echo "*** not find such a program. So, this module is probably useless."
3040 $echo "*** \`nm' from GNU binutils and a full rebuild may help."
3042 if test "$build_old_libs" = no
; then
3043 build_libtool_libs
=module
3046 build_libtool_libs
=no
3050 convenience
="$convenience $dir/$old_library"
3051 old_convenience
="$old_convenience $dir/$old_library"
3052 deplibs
="$dir/$old_library $deplibs"
3055 fi # link shared/static library?
3057 if test "$linkmode" = lib
; then
3058 if test -n "$dependency_libs" &&
3059 { test "$hardcode_into_libs" != yes ||
3060 test "$build_old_libs" = yes ||
3061 test "$link_static" = yes; }; then
3062 # Extract -R from dependency_libs
3064 for libdir
in $dependency_libs; do
3066 -R*) temp_xrpath
=`$echo "X$libdir" | $Xsed -e 's/^-R//'`
3068 *" $temp_xrpath "*) ;;
3069 *) xrpath
="$xrpath $temp_xrpath";;
3071 *) temp_deplibs
="$temp_deplibs $libdir";;
3074 dependency_libs
="$temp_deplibs"
3077 newlib_search_path
="$newlib_search_path $absdir"
3078 # Link against this library
3079 test "$link_static" = no
&& newdependency_libs
="$abs_ladir/$laname $newdependency_libs"
3080 # ... and its dependency_libs
3082 for deplib
in $dependency_libs; do
3083 newdependency_libs
="$deplib $newdependency_libs"
3084 if test "X$duplicate_deps" = "Xyes" ; then
3085 case "$tmp_libs " in
3086 *" $deplib "*) specialdeplibs
="$specialdeplibs $deplib" ;;
3089 tmp_libs
="$tmp_libs $deplib"
3092 if test "$link_all_deplibs" != no
; then
3093 # Add the search paths of all dependency libraries
3094 for deplib
in $dependency_libs; do
3096 -L*) path
="$deplib" ;;
3098 dir
=`$echo "X$deplib" | $Xsed -e 's%/[^/]*$%%'`
3099 test "X$dir" = "X$deplib" && dir
="."
3100 # We need an absolute path.
3102 [\\/]* |
[A-Za-z
]:[\\/]*) absdir
="$dir" ;;
3104 absdir
=`cd "$dir" && pwd`
3105 if test -z "$absdir"; then
3106 $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2
3111 if grep "^installed=no" $deplib > /dev
/null
; then
3112 path
="$absdir/$objdir"
3114 eval libdir
=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
3115 if test -z "$libdir"; then
3116 $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
3119 if test "$absdir" != "$libdir"; then
3120 $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2
3127 # we do not want to link against static libs,
3128 # but need to link against shared
3129 eval deplibrary_names
=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib`
3130 if test -n "$deplibrary_names" ; then
3131 for tmp
in $deplibrary_names ; do
3134 if test -f "$path/$depdepl" ; then
3135 depdepl
="$path/$depdepl"
3137 # do not add paths which are already there
3138 case " $newlib_search_path " in
3140 *) newlib_search_path
="$newlib_search_path $path";;
3153 # Again, we only want to link against shared libraries
3154 eval tmp_libs
=`$echo "X$deplib" | $Xsed -e "s,^\-l,,"`
3155 for tmp
in $newlib_search_path ; do
3156 if test -f "$tmp/lib$tmp_libs.dylib" ; then
3157 eval depdepl
="$tmp/lib$tmp_libs.dylib"
3168 case " $deplibs " in
3170 *) deplibs
="$depdepl $deplibs" ;;
3172 case " $deplibs " in
3174 *) deplibs
="$deplibs $path" ;;
3177 fi # link_all_deplibs != no
3179 done # for deplib in $libs
3180 dependency_libs
="$newdependency_libs"
3181 if test "$pass" = dlpreopen
; then
3182 # Link the dlpreopened libraries before other libraries
3183 for deplib
in $save_deplibs; do
3184 deplibs
="$deplib $deplibs"
3187 if test "$pass" != dlopen
; then
3188 if test "$pass" != conv
; then
3189 # Make sure lib_search_path contains only unique directories.
3191 for dir
in $newlib_search_path; do
3192 case "$lib_search_path " in
3194 *) lib_search_path
="$lib_search_path $dir" ;;
3200 if test "$linkmode,$pass" != "prog,link"; then
3203 vars
="compile_deplibs finalize_deplibs"
3205 for var
in $vars dependency_libs
; do
3206 # Add libraries to $var in reverse order
3207 eval tmp_libs
=\"\$
$var\"
3209 for deplib
in $tmp_libs; do
3210 # FIXME: Pedantically, this is the right thing to do, so
3211 # that some nasty dependency loop isn't accidentally
3213 #new_libs="$deplib $new_libs"
3214 # Pragmatically, this seems to cause very few problems in
3217 -L*) new_libs
="$deplib $new_libs" ;;
3220 # And here is the reason: when a library appears more
3221 # than once as an explicit dependence of a library, or
3222 # is implicitly linked in more than once by the
3223 # compiler, it is considered special, and multiple
3224 # occurrences thereof are not removed. Compare this
3225 # with having the same library being listed as a
3226 # dependency of multiple other libraries: in this case,
3227 # we know (pedantically, we assume) the library does not
3228 # need to be listed more than once, so we keep only the
3229 # last copy. This is not always right, but it is rare
3230 # enough that we require users that really mean to play
3231 # such unportable linking tricks to link the library
3232 # using -Wl,-lname, so that libtool does not consider it
3233 # for duplicate removal.
3234 case " $specialdeplibs " in
3235 *" $deplib "*) new_libs
="$deplib $new_libs" ;;
3237 case " $new_libs " in
3239 *) new_libs
="$deplib $new_libs" ;;
3247 for deplib
in $new_libs; do
3250 case " $tmp_libs " in
3252 *) tmp_libs
="$tmp_libs $deplib" ;;
3255 *) tmp_libs
="$tmp_libs $deplib" ;;
3258 eval $var=\"$tmp_libs\"
3261 # Last step: remove runtime libs from dependency_libs
3262 # (they stay in deplibs)
3264 for i
in $dependency_libs ; do
3265 case " $predeps $postdeps $compiler_lib_search_path " in
3270 if test -n "$i" ; then
3271 tmp_libs
="$tmp_libs $i"
3274 dependency_libs
=$tmp_libs
3276 if test "$linkmode" = prog
; then
3277 dlfiles
="$newdlfiles"
3278 dlprefiles
="$newdlprefiles"
3283 if test -n "$deplibs"; then
3284 $echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2
3287 if test -n "$dlfiles$dlprefiles" ||
test "$dlself" != no
; then
3288 $echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2
3291 if test -n "$rpath"; then
3292 $echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2
3295 if test -n "$xrpath"; then
3296 $echo "$modename: warning: \`-R' is ignored for archives" 1>&2
3299 if test -n "$vinfo"; then
3300 $echo "$modename: warning: \`-version-info/-version-number' is ignored for archives" 1>&2
3303 if test -n "$release"; then
3304 $echo "$modename: warning: \`-release' is ignored for archives" 1>&2
3307 if test -n "$export_symbols" ||
test -n "$export_symbols_regex"; then
3308 $echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2
3311 # Now set the variables for building old libraries.
3312 build_libtool_libs
=no
3314 objs
="$objs$old_deplibs"
3318 # Make sure we only generate libraries of the form `libNAME.la'.
3321 name
=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
3322 eval shared_ext
=\"$shrext_cmds\"
3323 eval libname
=\"$libname_spec\"
3326 if test "$module" = no
; then
3327 $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2
3331 if test "$need_lib_prefix" != no
; then
3332 # Add the "lib" prefix for modules if required
3333 name
=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
3334 eval shared_ext
=\"$shrext_cmds\"
3335 eval libname
=\"$libname_spec\"
3337 libname
=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
3342 if test -n "$objs"; then
3343 if test "$deplibs_check_method" != pass_all
; then
3344 $echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1
3348 $echo "*** Warning: Linking the shared library $output against the non-libtool"
3349 $echo "*** objects $objs is not portable!"
3350 libobjs
="$libobjs $objs"
3354 if test "$dlself" != no
; then
3355 $echo "$modename: warning: \`-dlopen self' is ignored for libtool libraries" 1>&2
3359 if test "$#" -gt 2; then
3360 $echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2
3365 if test -z "$rpath"; then
3366 if test "$build_libtool_libs" = yes; then
3367 # Building a libtool convenience library.
3368 # Some compilers have problems with a `.al' extension so
3369 # convenience libraries should have the same extension an
3370 # archive normally would.
3371 oldlibs
="$output_objdir/$libname.$libext $oldlibs"
3372 build_libtool_libs
=convenience
3376 if test -n "$vinfo"; then
3377 $echo "$modename: warning: \`-version-info/-version-number' is ignored for convenience libraries" 1>&2
3380 if test -n "$release"; then
3381 $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2
3385 # Parse the version information argument.
3386 save_ifs
="$IFS"; IFS
=':'
3387 set dummy
$vinfo 0 0 0
3390 if test -n "$8"; then
3391 $echo "$modename: too many parameters to \`-version-info'" 1>&2
3396 # convert absolute version numbers to libtool ages
3397 # this retains compatibility with .la files and attempts
3398 # to make the code below a bit more comprehensible
3400 case $vinfo_number in
3404 number_revision
="$4"
3406 # There are really only two kinds -- those that
3407 # use the current revision as the major version
3408 # and those that subtract age and use age as
3409 # a minor version. But, then there is irix
3410 # which has an extra 1 added just for fun
3412 case $version_type in
3413 darwin|linux|osf|windows
)
3414 current
=`expr $number_major + $number_minor`
3416 revision
="$number_revision"
3418 freebsd-aout|freebsd-elf|sunos
)
3419 current
="$number_major"
3420 revision
="$number_minor"
3424 current
=`expr $number_major + $number_minor - 1`
3426 revision
="$number_minor"
3437 # Check that each of the things are valid numbers.
3439 0 |
[1-9] |
[1-9][0-9] |
[1-9][0-9][0-9]) ;;
3441 $echo "$modename: CURRENT \`$current' is not a nonnegative integer" 1>&2
3442 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
3448 0 |
[1-9] |
[1-9][0-9] |
[1-9][0-9][0-9]) ;;
3450 $echo "$modename: REVISION \`$revision' is not a nonnegative integer" 1>&2
3451 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
3457 0 |
[1-9] |
[1-9][0-9] |
[1-9][0-9][0-9]) ;;
3459 $echo "$modename: AGE \`$age' is not a nonnegative integer" 1>&2
3460 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
3465 if test "$age" -gt "$current"; then
3466 $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2
3467 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
3471 # Calculate the version variables.
3475 case $version_type in
3479 # Like Linux, but with the current version available in
3480 # verstring for coding it into the library header
3481 major
=.
`expr $current - $age`
3482 versuffix
="$major.$age.$revision"
3483 # Darwin ld doesn't like 0 for these options...
3484 minor_current
=`expr $current + 1`
3485 verstring
="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision"
3490 versuffix
=".$current.$revision";
3495 versuffix
=".$current";
3499 major
=`expr $current - $age + 1`
3501 case $version_type in
3502 nonstopux
) verstring_prefix
=nonstopux
;;
3503 *) verstring_prefix
=sgi
;;
3505 verstring
="$verstring_prefix$major.$revision"
3507 # Add in all the interfaces that we are compatible with.
3509 while test "$loop" -ne 0; do
3510 iface
=`expr $revision - $loop`
3511 loop
=`expr $loop - 1`
3512 verstring
="$verstring_prefix$major.$iface:$verstring"
3515 # Before this point, $major must not contain `.'.
3517 versuffix
="$major.$revision"
3521 major
=.
`expr $current - $age`
3522 versuffix
="$major.$age.$revision"
3526 major
=.
`expr $current - $age`
3527 versuffix
=".$current.$age.$revision"
3528 verstring
="$current.$age.$revision"
3530 # Add in all the interfaces that we are compatible with.
3532 while test "$loop" -ne 0; do
3533 iface
=`expr $current - $loop`
3534 loop
=`expr $loop - 1`
3535 verstring
="$verstring:${iface}.0"
3538 # Make executables depend on our current version.
3539 verstring
="$verstring:${current}.0"
3544 versuffix
=".$current.$revision"
3548 # Use '-' rather than '.', since we only want one
3549 # extension on DOS 8.3 filesystems.
3550 major
=`expr $current - $age`
3555 $echo "$modename: unknown library version type \`$version_type'" 1>&2
3556 $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
3561 # Clear the version info if we defaulted, and they specified a release.
3562 if test -z "$vinfo" && test -n "$release"; then
3564 case $version_type in
3566 # we can't check for "0.0" in archive_cmds due to quoting
3567 # problems, so we reset it completely
3574 if test "$need_version" = no
; then
3581 # Remove version info from name if versioning should be avoided
3582 if test "$avoid_version" = yes && test "$need_version" = no
; then
3588 # Check to see if the archive will have undefined symbols.
3589 if test "$allow_undefined" = yes; then
3590 if test "$allow_undefined_flag" = unsupported
; then
3591 $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2
3592 build_libtool_libs
=no
3596 # Don't allow undefined symbols.
3597 allow_undefined_flag
="$no_undefined_flag"
3601 if test "$mode" != relink
; then
3602 # Remove our outputs, but don't remove object files since they
3603 # may have been created when compiling PIC objects.
3605 tempremovelist
=`$echo "$output_objdir/*"`
3606 for p
in $tempremovelist; do
3610 $output_objdir/$outputname |
$output_objdir/$libname.
* |
$output_objdir/${libname}${release}.
*)
3611 if test "X$precious_files_regex" != "X"; then
3612 if echo $p |
$EGREP -e "$precious_files_regex" >/dev
/null
2>&1
3617 removelist
="$removelist $p"
3622 if test -n "$removelist"; then
3623 $show "${rm}r $removelist"
3624 $run ${rm}r
$removelist
3628 # Now set the variables for building old libraries.
3629 if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience
; then
3630 oldlibs
="$oldlibs $output_objdir/$libname.$libext"
3632 # Transform .lo files to .o files.
3633 oldobjs
="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP`
3636 # Eliminate all temporary directories.
3637 for path
in $notinst_path; do
3638 lib_search_path
=`$echo "$lib_search_path " | ${SED} -e 's% $path % %g'`
3639 deplibs
=`$echo "$deplibs " | ${SED} -e 's% -L$path % %g'`
3640 dependency_libs
=`$echo "$dependency_libs " | ${SED} -e 's% -L$path % %g'`
3643 if test -n "$xrpath"; then
3644 # If the user specified any rpath flags, then add them.
3646 for libdir
in $xrpath; do
3647 temp_xrpath
="$temp_xrpath -R$libdir"
3648 case "$finalize_rpath " in
3650 *) finalize_rpath
="$finalize_rpath $libdir" ;;
3653 if test "$hardcode_into_libs" != yes ||
test "$build_old_libs" = yes; then
3654 dependency_libs
="$temp_xrpath $dependency_libs"
3658 # Make sure dlfiles contains only unique files that won't be dlpreopened
3659 old_dlfiles
="$dlfiles"
3661 for lib
in $old_dlfiles; do
3662 case " $dlprefiles $dlfiles " in
3664 *) dlfiles
="$dlfiles $lib" ;;
3668 # Make sure dlprefiles contains only unique files
3669 old_dlprefiles
="$dlprefiles"
3671 for lib
in $old_dlprefiles; do
3672 case "$dlprefiles " in
3674 *) dlprefiles
="$dlprefiles $lib" ;;
3678 if test "$build_libtool_libs" = yes; then
3679 if test -n "$rpath"; then
3681 *-*-cygwin* |
*-*-mingw* |
*-*-pw32* |
*-*-os2* |
*-*-beos*)
3682 # these systems don't actually have a c library (as such)!
3684 *-*-rhapsody* |
*-*-darwin1.
[012])
3685 # Rhapsody C library is in the System framework
3686 deplibs
="$deplibs -framework System"
3689 # Don't link with libc until the a.out ld.so is fixed.
3691 *-*-openbsd* |
*-*-freebsd*)
3692 # Do not include libc due to us having libc/libc_r.
3693 test "X$arg" = "X-lc" && continue
3696 # Add libc to deplibs on all other systems if necessary.
3697 if test "$build_libtool_need_lc" = "yes"; then
3698 deplibs
="$deplibs -lc"
3704 # Transform deplibs into only deplibs that can be linked in shared.
3706 libname_save
=$libname
3707 release_save
=$release
3708 versuffix_save
=$versuffix
3710 # I'm not sure if I'm treating the release correctly. I think
3711 # release should show up in the -l (ie -lgmp5) so we don't want to
3712 # add it in twice. Is that correct?
3718 case $deplibs_check_method in
3720 # Don't check for shared/static. Everything works.
3721 # This might be a little naive. We might want to check
3722 # whether the library exists or not. But this is on
3723 # osf3 & osf4 and I'm not really sure... Just
3724 # implementing what was already the behavior.
3728 # This code stresses the "libraries are programs" paradigm to its
3729 # limits. Maybe even breaks it. We compile a program, linking it
3730 # against the deplibs as a proxy for the library. Then we can check
3731 # whether they linked in statically or dynamically with ldd.
3733 cat > conftest.c
<<EOF
3734 int main() { return 0; }
3737 $LTCC -o conftest conftest.c
$deplibs
3738 if test "$?" -eq 0 ; then
3739 ldd_output
=`ldd conftest`
3740 for i
in $deplibs; do
3741 name
="`expr $i : '-l\(.*\)'`"
3742 # If $name is empty we are operating on a -L argument.
3743 if test "$name" != "" && test "$name" -ne "0"; then
3744 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
3745 case " $predeps $postdeps " in
3747 newdeplibs
="$newdeplibs $i"
3752 if test -n "$i" ; then
3753 libname
=`eval \\$echo \"$libname_spec\"`
3754 deplib_matches
=`eval \\$echo \"$library_names_spec\"`
3755 set dummy
$deplib_matches
3757 if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
3758 newdeplibs
="$newdeplibs $i"
3762 $echo "*** Warning: dynamic linker does not accept needed library $i."
3763 $echo "*** I have the capability to make that library automatically link in when"
3764 $echo "*** you link to this library. But I can only do this if you have a"
3765 $echo "*** shared version of the library, which I believe you do not have"
3766 $echo "*** because a test_compile did reveal that the linker did not use it for"
3767 $echo "*** its dynamic dependency list that programs get resolved with at runtime."
3771 newdeplibs
="$newdeplibs $i"
3775 # Error occurred in the first compile. Let's try to salvage
3776 # the situation: Compile a separate program for each library.
3777 for i
in $deplibs; do
3778 name
="`expr $i : '-l\(.*\)'`"
3779 # If $name is empty we are operating on a -L argument.
3780 if test "$name" != "" && test "$name" != "0"; then
3782 $LTCC -o conftest conftest.c
$i
3784 if test "$?" -eq 0 ; then
3785 ldd_output
=`ldd conftest`
3786 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
3787 case " $predeps $postdeps " in
3789 newdeplibs
="$newdeplibs $i"
3794 if test -n "$i" ; then
3795 libname
=`eval \\$echo \"$libname_spec\"`
3796 deplib_matches
=`eval \\$echo \"$library_names_spec\"`
3797 set dummy
$deplib_matches
3799 if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
3800 newdeplibs
="$newdeplibs $i"
3804 $echo "*** Warning: dynamic linker does not accept needed library $i."
3805 $echo "*** I have the capability to make that library automatically link in when"
3806 $echo "*** you link to this library. But I can only do this if you have a"
3807 $echo "*** shared version of the library, which you do not appear to have"
3808 $echo "*** because a test_compile did reveal that the linker did not use this one"
3809 $echo "*** as a dynamic dependency that programs can get resolved with at runtime."
3815 $echo "*** Warning! Library $i is needed by this library but I was not able to"
3816 $echo "*** make it link in! You will probably need to install it or some"
3817 $echo "*** library that it depends on before this library will be fully"
3818 $echo "*** functional. Installing it before continuing would be even better."
3821 newdeplibs
="$newdeplibs $i"
3827 set dummy
$deplibs_check_method
3828 file_magic_regex
=`expr "$deplibs_check_method" : "$2 \(.*\)"`
3829 for a_deplib
in $deplibs; do
3830 name
="`expr $a_deplib : '-l\(.*\)'`"
3831 # If $name is empty we are operating on a -L argument.
3832 if test "$name" != "" && test "$name" != "0"; then
3833 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
3834 case " $predeps $postdeps " in
3836 newdeplibs
="$newdeplibs $a_deplib"
3841 if test -n "$a_deplib" ; then
3842 libname
=`eval \\$echo \"$libname_spec\"`
3843 for i
in $lib_search_path $sys_lib_search_path $shlib_search_path; do
3844 potential_libs
=`ls $i/$libname[.-]* 2>/dev/null`
3845 for potent_lib
in $potential_libs; do
3846 # Follow soft links.
3847 if ls -lLd "$potent_lib" 2>/dev
/null \
3848 |
grep " -> " >/dev
/null
; then
3851 # The statement above tries to avoid entering an
3852 # endless loop below, in case of cyclic links.
3853 # We might still enter an endless loop, since a link
3854 # loop can be closed while we follow links,
3856 potlib
="$potent_lib"
3857 while test -h "$potlib" 2>/dev
/null
; do
3858 potliblink
=`ls -ld $potlib | ${SED} 's/.* -> //'`
3860 [\\/]* |
[A-Za-z
]:[\\/]*) potlib
="$potliblink";;
3861 *) potlib
=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";;
3864 if eval $file_magic_cmd \"\
$potlib\" 2>/dev
/null \
3866 |
$EGREP "$file_magic_regex" > /dev
/null
; then
3867 newdeplibs
="$newdeplibs $a_deplib"
3874 if test -n "$a_deplib" ; then
3877 $echo "*** Warning: linker path does not have real file for library $a_deplib."
3878 $echo "*** I have the capability to make that library automatically link in when"
3879 $echo "*** you link to this library. But I can only do this if you have a"
3880 $echo "*** shared version of the library, which you do not appear to have"
3881 $echo "*** because I did check the linker path looking for a file starting"
3882 if test -z "$potlib" ; then
3883 $echo "*** with $libname but no candidates were found. (...for file magic test)"
3885 $echo "*** with $libname and none of the candidates passed a file format test"
3886 $echo "*** using a file magic. Last file checked: $potlib"
3890 # Add a -L argument.
3891 newdeplibs
="$newdeplibs $a_deplib"
3893 done # Gone through all deplibs.
3896 set dummy
$deplibs_check_method
3897 match_pattern_regex
=`expr "$deplibs_check_method" : "$2 \(.*\)"`
3898 for a_deplib
in $deplibs; do
3899 name
="`expr $a_deplib : '-l\(.*\)'`"
3900 # If $name is empty we are operating on a -L argument.
3901 if test -n "$name" && test "$name" != "0"; then
3902 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
3903 case " $predeps $postdeps " in
3905 newdeplibs
="$newdeplibs $a_deplib"
3910 if test -n "$a_deplib" ; then
3911 libname
=`eval \\$echo \"$libname_spec\"`
3912 for i
in $lib_search_path $sys_lib_search_path $shlib_search_path; do
3913 potential_libs
=`ls $i/$libname[.-]* 2>/dev/null`
3914 for potent_lib
in $potential_libs; do
3915 potlib
="$potent_lib" # see symlink-check above in file_magic test
3916 if eval $echo \"$potent_lib\" 2>/dev
/null \
3918 |
$EGREP "$match_pattern_regex" > /dev
/null
; then
3919 newdeplibs
="$newdeplibs $a_deplib"
3926 if test -n "$a_deplib" ; then
3929 $echo "*** Warning: linker path does not have real file for library $a_deplib."
3930 $echo "*** I have the capability to make that library automatically link in when"
3931 $echo "*** you link to this library. But I can only do this if you have a"
3932 $echo "*** shared version of the library, which you do not appear to have"
3933 $echo "*** because I did check the linker path looking for a file starting"
3934 if test -z "$potlib" ; then
3935 $echo "*** with $libname but no candidates were found. (...for regex pattern test)"
3937 $echo "*** with $libname and none of the candidates passed a file format test"
3938 $echo "*** using a regex pattern. Last file checked: $potlib"
3942 # Add a -L argument.
3943 newdeplibs
="$newdeplibs $a_deplib"
3945 done # Gone through all deplibs.
3949 tmp_deplibs
=`$echo "X $deplibs" | $Xsed -e 's/ -lc$//' \
3950 -e 's/ -[LR][^ ]*//g'`
3951 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
3952 for i
in $predeps $postdeps ; do
3953 # can't use Xsed below, because $i might contain '/'
3954 tmp_deplibs
=`$echo "X $tmp_deplibs" | ${SED} -e "1s,^X,," -e "s,$i,,"`
3957 if $echo "X $tmp_deplibs" |
$Xsed -e 's/[ ]//g' \
3958 |
grep .
>/dev
/null
; then
3960 if test "X$deplibs_check_method" = "Xnone"; then
3961 $echo "*** Warning: inter-library dependencies are not supported in this platform."
3963 $echo "*** Warning: inter-library dependencies are not known to be supported."
3965 $echo "*** All declared inter-library dependencies are being dropped."
3970 versuffix
=$versuffix_save
3972 release
=$release_save
3973 libname
=$libname_save
3977 *-*-rhapsody* |
*-*-darwin1.
[012])
3978 # On Rhapsody replace the C library is the System framework
3979 newdeplibs
=`$echo "X $newdeplibs" | $Xsed -e 's/ -lc / -framework System /'`
3983 if test "$droppeddeps" = yes; then
3984 if test "$module" = yes; then
3986 $echo "*** Warning: libtool could not satisfy all declared inter-library"
3987 $echo "*** dependencies of module $libname. Therefore, libtool will create"
3988 $echo "*** a static module, that should work as long as the dlopening"
3989 $echo "*** application is linked with the -dlopen flag."
3990 if test -z "$global_symbol_pipe"; then
3992 $echo "*** However, this would only work if libtool was able to extract symbol"
3993 $echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
3994 $echo "*** not find such a program. So, this module is probably useless."
3995 $echo "*** \`nm' from GNU binutils and a full rebuild may help."
3997 if test "$build_old_libs" = no
; then
3998 oldlibs
="$output_objdir/$libname.$libext"
3999 build_libtool_libs
=module
4002 build_libtool_libs
=no
4005 $echo "*** The inter-library dependencies that have been dropped here will be"
4006 $echo "*** automatically added whenever a program is linked with this library"
4007 $echo "*** or is declared to -dlopen it."
4009 if test "$allow_undefined" = no
; then
4011 $echo "*** Since this library must not contain undefined symbols,"
4012 $echo "*** because either the platform does not support them or"
4013 $echo "*** it was explicitly requested with -no-undefined,"
4014 $echo "*** libtool will only create a static version of it."
4015 if test "$build_old_libs" = no
; then
4016 oldlibs
="$output_objdir/$libname.$libext"
4017 build_libtool_libs
=module
4020 build_libtool_libs
=no
4025 # Done checking deplibs!
4029 # All the library-specific variables (install_libdir is set above).
4034 # Test again, we may have decided not to build it any more
4035 if test "$build_libtool_libs" = yes; then
4036 if test "$hardcode_into_libs" = yes; then
4037 # Hardcode the library paths
4040 rpath
="$finalize_rpath"
4041 test "$mode" != relink
&& rpath
="$compile_rpath$rpath"
4042 for libdir
in $rpath; do
4043 if test -n "$hardcode_libdir_flag_spec"; then
4044 if test -n "$hardcode_libdir_separator"; then
4045 if test -z "$hardcode_libdirs"; then
4046 hardcode_libdirs
="$libdir"
4048 # Just accumulate the unique libdirs.
4049 case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
4050 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
4053 hardcode_libdirs
="$hardcode_libdirs$hardcode_libdir_separator$libdir"
4058 eval flag
=\"$hardcode_libdir_flag_spec\"
4059 dep_rpath
="$dep_rpath $flag"
4061 elif test -n "$runpath_var"; then
4062 case "$perm_rpath " in
4064 *) perm_rpath
="$perm_rpath $libdir" ;;
4068 # Substitute the hardcoded libdirs into the rpath.
4069 if test -n "$hardcode_libdir_separator" &&
4070 test -n "$hardcode_libdirs"; then
4071 libdir
="$hardcode_libdirs"
4072 if test -n "$hardcode_libdir_flag_spec_ld"; then
4073 eval dep_rpath
=\"$hardcode_libdir_flag_spec_ld\"
4075 eval dep_rpath
=\"$hardcode_libdir_flag_spec\"
4078 if test -n "$runpath_var" && test -n "$perm_rpath"; then
4079 # We should set the runpath_var.
4081 for dir
in $perm_rpath; do
4084 eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var"
4086 test -n "$dep_rpath" && deplibs
="$dep_rpath $deplibs"
4089 shlibpath
="$finalize_shlibpath"
4090 test "$mode" != relink
&& shlibpath
="$compile_shlibpath$shlibpath"
4091 if test -n "$shlibpath"; then
4092 eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var"
4095 # Get the real and link names of the library.
4096 eval shared_ext
=\"$shrext_cmds\"
4097 eval library_names
=\"$library_names_spec\"
4098 set dummy
$library_names
4102 if test -n "$soname_spec"; then
4103 eval soname
=\"$soname_spec\"
4107 if test -z "$dlname"; then
4111 lib
="$output_objdir/$realname"
4114 linknames
="$linknames $link"
4117 # Use standard objects if they are pic
4118 test -z "$pic_flag" && libobjs
=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
4120 # Prepare the list of exported symbols
4121 if test -z "$export_symbols"; then
4122 if test "$always_export_symbols" = yes ||
test -n "$export_symbols_regex"; then
4123 $show "generating symbol list for \`$libname.la'"
4124 export_symbols
="$output_objdir/$libname.exp"
4125 $run $rm $export_symbols
4126 cmds
=$export_symbols_cmds
4127 save_ifs
="$IFS"; IFS
='~'
4128 for cmd
in $cmds; do
4131 if len
=`expr "X$cmd" : ".*"` &&
4132 test "$len" -le "$max_cmd_len" ||
test "$max_cmd_len" -le -1; then
4134 $run eval "$cmd" ||
exit $?
4135 skipped_export
=false
4137 # The command line is too long to execute in one step.
4138 $show "using reloadable object file for export list..."
4143 if test -n "$export_symbols_regex"; then
4144 $show "$EGREP -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\""
4145 $run eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
4146 $show "$mv \"${export_symbols}T\" \"$export_symbols\""
4147 $run eval '$mv "${export_symbols}T" "$export_symbols"'
4152 if test -n "$export_symbols" && test -n "$include_expsyms"; then
4153 $run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"'
4157 for test_deplib
in $deplibs; do
4158 case " $convenience " in
4159 *" $test_deplib "*) ;;
4161 tmp_deplibs
="$tmp_deplibs $test_deplib"
4165 deplibs
="$tmp_deplibs"
4167 if test -n "$convenience"; then
4168 if test -n "$whole_archive_flag_spec"; then
4169 save_libobjs
=$libobjs
4170 eval libobjs
=\"\
$libobjs $whole_archive_flag_spec\"
4172 gentop
="$output_objdir/${outputname}x"
4173 generated
="$generated $gentop"
4175 func_extract_archives
$gentop $convenience
4176 libobjs
="$libobjs $func_extract_archives_result"
4180 if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
4181 eval flag
=\"$thread_safe_flag_spec\"
4182 linker_flags
="$linker_flags $flag"
4185 # Make a backup of the uninstalled library when relinking
4186 if test "$mode" = relink
; then
4187 $run eval '(cd $output_objdir && $rm ${realname}U && $mv $realname ${realname}U)' ||
exit $?
4190 # Do each of the archive commands.
4191 if test "$module" = yes && test -n "$module_cmds" ; then
4192 if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
4193 eval test_cmds
=\"$module_expsym_cmds\"
4194 cmds
=$module_expsym_cmds
4196 eval test_cmds
=\"$module_cmds\"
4200 if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
4201 eval test_cmds
=\"$archive_expsym_cmds\"
4202 cmds
=$archive_expsym_cmds
4204 eval test_cmds
=\"$archive_cmds\"
4209 if test "X$skipped_export" != "X:" && len
=`expr "X$test_cmds" : ".*"` &&
4210 test "$len" -le "$max_cmd_len" ||
test "$max_cmd_len" -le -1; then
4213 # The command line is too long to link in one step, link piecewise.
4214 $echo "creating reloadable object files..."
4216 # Save the value of $output and $libobjs because we want to
4217 # use them later. If we have whole_archive_flag_spec, we
4218 # want to use save_libobjs as it was before
4219 # whole_archive_flag_spec was expanded, because we can't
4220 # assume the linker understands whole_archive_flag_spec.
4221 # This may have to be revisited, in case too many
4222 # convenience libraries get linked in and end up exceeding
4224 if test -z "$convenience" ||
test -z "$whole_archive_flag_spec"; then
4225 save_libobjs
=$libobjs
4229 # Clear the reloadable object creation command queue and
4230 # initialize k to one.
4237 output
=$output_objdir/$save_output-${k}.
$objext
4238 # Loop over the list of objects to be linked.
4239 for obj
in $save_libobjs
4241 eval test_cmds
=\"$reload_cmds $objlist $last_robj\"
4242 if test "X$objlist" = X ||
4243 { len
=`expr "X$test_cmds" : ".*"` &&
4244 test "$len" -le "$max_cmd_len"; }; then
4245 objlist
="$objlist $obj"
4247 # The command $test_cmds is almost too long, add a
4248 # command to the queue.
4249 if test "$k" -eq 1 ; then
4250 # The first file doesn't have a previous command to add.
4251 eval concat_cmds
=\"$reload_cmds $objlist $last_robj\"
4253 # All subsequent reloadable object files will link in
4254 # the last one created.
4255 eval concat_cmds
=\"\
$concat_cmds~
$reload_cmds $objlist $last_robj\"
4257 last_robj
=$output_objdir/$save_output-${k}.
$objext
4259 output
=$output_objdir/$save_output-${k}.
$objext
4264 # Handle the remaining objects by creating one last
4265 # reloadable object file. All subsequent reloadable object
4266 # files will link in the last one created.
4267 test -z "$concat_cmds" || concat_cmds
=$concat_cmds~
4268 eval concat_cmds
=\"\
${concat_cmds}$reload_cmds $objlist $last_robj\"
4270 if ${skipped_export-false}; then
4271 $show "generating symbol list for \`$libname.la'"
4272 export_symbols
="$output_objdir/$libname.exp"
4273 $run $rm $export_symbols
4275 # Append the command to create the export file.
4276 eval concat_cmds
=\"\
$concat_cmds~
$export_symbols_cmds\"
4279 # Set up a command to remove the reloadale object files
4280 # after they are used.
4282 while test "$i" -lt "$k"
4285 delfiles
="$delfiles $output_objdir/$save_output-${i}.$objext"
4288 $echo "creating a temporary reloadable object file: $output"
4290 # Loop through the commands generated above and execute them.
4291 save_ifs
="$IFS"; IFS
='~'
4292 for cmd
in $concat_cmds; do
4295 $run eval "$cmd" ||
exit $?
4300 # Restore the value of output.
4303 if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then
4304 eval libobjs
=\"\
$libobjs $whole_archive_flag_spec\"
4306 # Expand the library linking commands again to reset the
4307 # value of $libobjs for piecewise linking.
4309 # Do each of the archive commands.
4310 if test "$module" = yes && test -n "$module_cmds" ; then
4311 if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
4312 cmds
=$module_expsym_cmds
4317 if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
4318 cmds
=$archive_expsym_cmds
4324 # Append the command to remove the reloadable object files
4325 # to the just-reset $cmds.
4326 eval cmds
=\"\
$cmds~\
$rm $delfiles\"
4328 save_ifs
="$IFS"; IFS
='~'
4329 for cmd
in $cmds; do
4333 $run eval "$cmd" ||
exit $?
4337 # Restore the uninstalled library and exit
4338 if test "$mode" = relink
; then
4339 $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' ||
exit $?
4343 # Create links to the real library.
4344 for linkname
in $linknames; do
4345 if test "$realname" != "$linkname"; then
4346 $show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)"
4347 $run eval '(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)' ||
exit $?
4351 # If -module or -export-dynamic was specified, set the dlname.
4352 if test "$module" = yes ||
test "$export_dynamic" = yes; then
4353 # On all known operating systems, these are identical.
4360 if test -n "$deplibs"; then
4361 $echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2
4364 if test -n "$dlfiles$dlprefiles" ||
test "$dlself" != no
; then
4365 $echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2
4368 if test -n "$rpath"; then
4369 $echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2
4372 if test -n "$xrpath"; then
4373 $echo "$modename: warning: \`-R' is ignored for objects" 1>&2
4376 if test -n "$vinfo"; then
4377 $echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2
4380 if test -n "$release"; then
4381 $echo "$modename: warning: \`-release' is ignored for objects" 1>&2
4386 if test -n "$objs$old_deplibs"; then
4387 $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2
4391 obj
=`$echo "X$output" | $Xsed -e "$lo2o"`
4399 # Delete the old objects.
4400 $run $rm $obj $libobj
4402 # Objects from convenience libraries. This assumes
4403 # single-version convenience libraries. Whenever we create
4404 # different ones for PIC/non-PIC, this we'll have to duplicate
4408 # reload_cmds runs $LD directly, so let us get rid of
4409 # -Wl from whole_archive_flag_spec
4412 if test -n "$convenience"; then
4413 if test -n "$whole_archive_flag_spec"; then
4414 eval reload_conv_objs
=\"\
$reload_objs $whole_archive_flag_spec\"
4416 gentop
="$output_objdir/${obj}x"
4417 generated
="$generated $gentop"
4419 func_extract_archives
$gentop $convenience
4420 reload_conv_objs
="$reload_objs $func_extract_archives_result"
4424 # Create the old-style object.
4425 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
4429 save_ifs
="$IFS"; IFS
='~'
4430 for cmd
in $cmds; do
4434 $run eval "$cmd" ||
exit $?
4438 # Exit if we aren't doing a library object file.
4439 if test -z "$libobj"; then
4440 if test -n "$gentop"; then
4441 $show "${rm}r $gentop"
4448 if test "$build_libtool_libs" != yes; then
4449 if test -n "$gentop"; then
4450 $show "${rm}r $gentop"
4454 # Create an invalid libtool object if no PIC, so that we don't
4455 # accidentally link it into a program.
4456 # $show "echo timestamp > $libobj"
4457 # $run eval "echo timestamp > $libobj" || exit $?
4461 if test -n "$pic_flag" ||
test "$pic_mode" != default
; then
4462 # Only do commands if we really have different PIC objects.
4463 reload_objs
="$libobjs $reload_conv_objs"
4466 save_ifs
="$IFS"; IFS
='~'
4467 for cmd
in $cmds; do
4471 $run eval "$cmd" ||
exit $?
4476 if test -n "$gentop"; then
4477 $show "${rm}r $gentop"
4486 *cygwin
*) output
=`$echo $output | ${SED} -e 's,.exe$,,;s,$,.exe,'` ;;
4488 if test -n "$vinfo"; then
4489 $echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2
4492 if test -n "$release"; then
4493 $echo "$modename: warning: \`-release' is ignored for programs" 1>&2
4496 if test "$preload" = yes; then
4497 if test "$dlopen_support" = unknown
&& test "$dlopen_self" = unknown
&&
4498 test "$dlopen_self_static" = unknown
; then
4499 $echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support."
4504 *-*-rhapsody* |
*-*-darwin1.
[012])
4505 # On Rhapsody replace the C library is the System framework
4506 compile_deplibs
=`$echo "X $compile_deplibs" | $Xsed -e 's/ -lc / -framework System /'`
4507 finalize_deplibs
=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'`
4513 # Don't allow lazy linking, it breaks C++ global constructors
4514 if test "$tagname" = CXX
; then
4515 compile_command
="$compile_command ${wl}-bind_at_load"
4516 finalize_command
="$finalize_command ${wl}-bind_at_load"
4521 compile_command
="$compile_command $compile_deplibs"
4522 finalize_command
="$finalize_command $finalize_deplibs"
4524 if test -n "$rpath$xrpath"; then
4525 # If the user specified any rpath flags, then add them.
4526 for libdir
in $rpath $xrpath; do
4527 # This is the magic to use -rpath.
4528 case "$finalize_rpath " in
4530 *) finalize_rpath
="$finalize_rpath $libdir" ;;
4535 # Now hardcode the library paths
4538 for libdir
in $compile_rpath $finalize_rpath; do
4539 if test -n "$hardcode_libdir_flag_spec"; then
4540 if test -n "$hardcode_libdir_separator"; then
4541 if test -z "$hardcode_libdirs"; then
4542 hardcode_libdirs
="$libdir"
4544 # Just accumulate the unique libdirs.
4545 case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
4546 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
4549 hardcode_libdirs
="$hardcode_libdirs$hardcode_libdir_separator$libdir"
4554 eval flag
=\"$hardcode_libdir_flag_spec\"
4555 rpath
="$rpath $flag"
4557 elif test -n "$runpath_var"; then
4558 case "$perm_rpath " in
4560 *) perm_rpath
="$perm_rpath $libdir" ;;
4564 *-*-cygwin* |
*-*-mingw* |
*-*-pw32* |
*-*-os2*)
4565 case :$dllsearchpath: in
4567 *) dllsearchpath
="$dllsearchpath:$libdir";;
4572 # Substitute the hardcoded libdirs into the rpath.
4573 if test -n "$hardcode_libdir_separator" &&
4574 test -n "$hardcode_libdirs"; then
4575 libdir
="$hardcode_libdirs"
4576 eval rpath
=\" $hardcode_libdir_flag_spec\"
4578 compile_rpath
="$rpath"
4582 for libdir
in $finalize_rpath; do
4583 if test -n "$hardcode_libdir_flag_spec"; then
4584 if test -n "$hardcode_libdir_separator"; then
4585 if test -z "$hardcode_libdirs"; then
4586 hardcode_libdirs
="$libdir"
4588 # Just accumulate the unique libdirs.
4589 case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
4590 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
4593 hardcode_libdirs
="$hardcode_libdirs$hardcode_libdir_separator$libdir"
4598 eval flag
=\"$hardcode_libdir_flag_spec\"
4599 rpath
="$rpath $flag"
4601 elif test -n "$runpath_var"; then
4602 case "$finalize_perm_rpath " in
4604 *) finalize_perm_rpath
="$finalize_perm_rpath $libdir" ;;
4608 # Substitute the hardcoded libdirs into the rpath.
4609 if test -n "$hardcode_libdir_separator" &&
4610 test -n "$hardcode_libdirs"; then
4611 libdir
="$hardcode_libdirs"
4612 eval rpath
=\" $hardcode_libdir_flag_spec\"
4614 finalize_rpath
="$rpath"
4616 if test -n "$libobjs" && test "$build_old_libs" = yes; then
4617 # Transform all the library objects into standard objects.
4618 compile_command
=`$echo "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
4619 finalize_command
=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
4623 if test -n "$dlfiles$dlprefiles" ||
test "$dlself" != no
; then
4624 if test -n "$NM" && test -n "$global_symbol_pipe"; then
4625 dlsyms
="${outputname}S.c"
4627 $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2
4631 if test -n "$dlsyms"; then
4635 # Discover the nlist of each of the dlfiles.
4636 nlist
="$output_objdir/${outputname}.nm"
4638 $show "$rm $nlist ${nlist}S ${nlist}T"
4639 $run $rm "$nlist" "${nlist}S" "${nlist}T"
4641 # Parse the name list into a source file.
4642 $show "creating $output_objdir/$dlsyms"
4644 test -z "$run" && $echo > "$output_objdir/$dlsyms" "\
4645 /* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */
4646 /* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */
4652 /* Prevent the only kind of declaration conflicts we can make. */
4653 #define lt_preloaded_symbols some_other_symbol
4655 /* External symbol declarations for the compiler. */\
4658 if test "$dlself" = yes; then
4659 $show "generating symbol list for \`$output'"
4661 test -z "$run" && $echo ': @PROGRAM@ ' > "$nlist"
4663 # Add our own program objects to the symbol list.
4664 progfiles
=`$echo "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
4665 for arg
in $progfiles; do
4666 $show "extracting global C symbols from \`$arg'"
4667 $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
4670 if test -n "$exclude_expsyms"; then
4671 $run eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T'
4672 $run eval '$mv "$nlist"T "$nlist"'
4675 if test -n "$export_symbols_regex"; then
4676 $run eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T'
4677 $run eval '$mv "$nlist"T "$nlist"'
4680 # Prepare the list of exported symbols
4681 if test -z "$export_symbols"; then
4682 export_symbols
="$output_objdir/$output.exp"
4683 $run $rm $export_symbols
4684 $run eval "${SED} -n -e '/^: @PROGRAM@$/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
4686 $run eval "${SED} -e 's/\([][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$output.exp"'
4687 $run eval 'grep -f "$output_objdir/$output.exp" < "$nlist" > "$nlist"T'
4688 $run eval 'mv "$nlist"T "$nlist"'
4692 for arg
in $dlprefiles; do
4693 $show "extracting global C symbols from \`$arg'"
4694 name
=`$echo "$arg" | ${SED} -e 's%^.*/%%'`
4695 $run eval '$echo ": $name " >> "$nlist"'
4696 $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
4699 if test -z "$run"; then
4700 # Make sure we have at least an empty file.
4701 test -f "$nlist" ||
: > "$nlist"
4703 if test -n "$exclude_expsyms"; then
4704 $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T
4705 $mv "$nlist"T
"$nlist"
4708 # Try sorting and uniquifying the output.
4709 if grep -v "^: " < "$nlist" |
4710 if sort -k 3 </dev
/null
>/dev
/null
2>&1; then
4715 uniq > "$nlist"S
; then
4718 grep -v "^: " < "$nlist" > "$nlist"S
4721 if test -f "$nlist"S
; then
4722 eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$dlsyms"'
4724 $echo '/* NONE */' >> "$output_objdir/$dlsyms"
4727 $echo >> "$output_objdir/$dlsyms" "\
4729 #undef lt_preloaded_symbols
4731 #if defined (__STDC__) && __STDC__
4732 # define lt_ptr void *
4734 # define lt_ptr char *
4738 /* The mapping between symbol names and symbols. */
4743 lt_preloaded_symbols[] =
4747 eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$dlsyms"
4749 $echo >> "$output_objdir/$dlsyms" "\
4753 /* This works around a problem in FreeBSD linker */
4754 #ifdef FREEBSD_WORKAROUND
4755 static const void *lt_preloaded_setup() {
4756 return lt_preloaded_symbols;
4766 pic_flag_for_symtable
=
4768 # compiling the symbol table file with pic_flag works around
4769 # a FreeBSD bug that causes programs to crash when -lm is
4770 # linked before any other PIC object. But we must not use
4771 # pic_flag when linking with -static. The problem exists in
4772 # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1.
4773 *-*-freebsd2*|
*-*-freebsd3.0
*|
*-*-freebsdelf3.0
*)
4774 case "$compile_command " in
4776 *) pic_flag_for_symtable
=" $pic_flag -DFREEBSD_WORKAROUND";;
4779 case "$compile_command " in
4781 *) pic_flag_for_symtable
=" $pic_flag";;
4785 # Now compile the dynamic symbol file.
4786 $show "(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")"
4787 $run eval '(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' ||
exit $?
4789 # Clean up the generated files.
4790 $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T"
4791 $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T"
4793 # Transform the symbol file into the correct name.
4794 compile_command
=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
4795 finalize_command
=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
4798 $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2
4803 # We keep going just in case the user didn't refer to
4804 # lt_preloaded_symbols. The linker will fail if global_symbol_pipe
4805 # really was required.
4807 # Nullify the symbol file.
4808 compile_command
=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"`
4809 finalize_command
=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"`
4812 if test "$need_relink" = no ||
test "$build_libtool_libs" != yes; then
4813 # Replace the output file specification.
4814 compile_command
=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
4815 link_command
="$compile_command$compile_rpath"
4817 # We have no uninstalled library dependencies, so finalize right now.
4818 $show "$link_command"
4819 $run eval "$link_command"
4822 # Delete the generated files.
4823 if test -n "$dlsyms"; then
4824 $show "$rm $output_objdir/${outputname}S.${objext}"
4825 $run $rm "$output_objdir/${outputname}S.${objext}"
4831 if test -n "$shlibpath_var"; then
4832 # We should set the shlibpath_var
4834 for dir
in $temp_rpath; do
4836 [\\/]* |
[A-Za-z
]:[\\/]*)
4841 # Relative path: add a thisdir entry.
4842 rpath
="$rpath\$thisdir/$dir:"
4849 if test -n "$compile_shlibpath$finalize_shlibpath"; then
4850 compile_command
="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command"
4852 if test -n "$finalize_shlibpath"; then
4853 finalize_command
="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command"
4858 if test -n "$runpath_var"; then
4859 if test -n "$perm_rpath"; then
4860 # We should set the runpath_var.
4862 for dir
in $perm_rpath; do
4865 compile_var
="$runpath_var=\"$rpath\$$runpath_var\" "
4867 if test -n "$finalize_perm_rpath"; then
4868 # We should set the runpath_var.
4870 for dir
in $finalize_perm_rpath; do
4873 finalize_var
="$runpath_var=\"$rpath\$$runpath_var\" "
4877 if test "$no_install" = yes; then
4878 # We don't need to create a wrapper script.
4879 link_command
="$compile_var$compile_command$compile_rpath"
4880 # Replace the output file specification.
4881 link_command
=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
4882 # Delete the old output file.
4884 # Link the executable and exit
4885 $show "$link_command"
4886 $run eval "$link_command" ||
exit $?
4890 if test "$hardcode_action" = relink
; then
4891 # Fast installation is not supported
4892 link_command
="$compile_var$compile_command$compile_rpath"
4893 relink_command
="$finalize_var$finalize_command$finalize_rpath"
4895 $echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2
4896 $echo "$modename: \`$output' will be relinked during installation" 1>&2
4898 if test "$fast_install" != no
; then
4899 link_command
="$finalize_var$compile_command$finalize_rpath"
4900 if test "$fast_install" = yes; then
4901 relink_command
=`$echo "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'`
4903 # fast_install is set to needless
4907 link_command
="$compile_var$compile_command$compile_rpath"
4908 relink_command
="$finalize_var$finalize_command$finalize_rpath"
4912 # Replace the output file specification.
4913 link_command
=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
4915 # Delete the old output files.
4916 $run $rm $output $output_objdir/$outputname $output_objdir/lt-
$outputname
4918 $show "$link_command"
4919 $run eval "$link_command" ||
exit $?
4921 # Now create the wrapper script.
4922 $show "creating $output"
4924 # Quote the relink command for shipping.
4925 if test -n "$relink_command"; then
4926 # Preserve any variables that may affect compiler behavior
4927 for var
in $variables_saved_for_relink; do
4928 if eval test -z \"\
${$var+set}\"; then
4929 relink_command
="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command"
4930 elif eval var_value
=\$
$var; test -z "$var_value"; then
4931 relink_command
="$var=; export $var; $relink_command"
4933 var_value
=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"`
4934 relink_command
="$var=\"$var_value\"; export $var; $relink_command"
4937 relink_command
="(cd `pwd`; $relink_command)"
4938 relink_command
=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
4941 # Quote $echo for shipping.
4942 if test "X$echo" = "X$SHELL $progpath --fallback-echo"; then
4944 [\\/]* |
[A-Za-z
]:[\\/]*) qecho
="$SHELL $progpath --fallback-echo";;
4945 *) qecho
="$SHELL `pwd`/$progpath --fallback-echo";;
4947 qecho
=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"`
4949 qecho
=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"`
4952 # Only actually do things if our run command is non-null.
4953 if test -z "$run"; then
4954 # win32 will think the script is a binary if it has
4955 # a .exe suffix, so we strip it off here.
4957 *.exe
) output
=`$echo $output|${SED} 's,.exe$,,'` ;;
4959 # test for cygwin because mv fails w/o .exe extensions
4963 outputname
=`$echo $outputname|${SED} 's,.exe$,,'` ;;
4967 *cygwin
* |
*mingw
* )
4968 cwrappersource
=`$echo ${objdir}/lt-${output}.c`
4969 cwrapper
=`$echo ${output}.exe`
4970 $rm $cwrappersource $cwrapper
4971 trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15
4973 cat > $cwrappersource <<EOF
4975 /* $cwrappersource - temporary wrapper executable for $objdir/$outputname
4976 Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
4978 The $output program cannot be directly executed until all the libtool
4979 libraries that it depends on are installed.
4981 This wrapper executable should never be moved out of the build directory.
4982 If it is, it will not operate correctly.
4984 Currently, it simply execs the wrapper *script* "/bin/sh $output",
4985 but could eventually absorb all of the scripts functionality and
4986 exec $objdir/$outputname directly.
4989 cat >> $cwrappersource<<"EOF"
4997 #if defined(PATH_MAX)
4998 # define LT_PATHMAX PATH_MAX
4999 #elif defined(MAXPATHLEN)
5000 # define LT_PATHMAX MAXPATHLEN
5002 # define LT_PATHMAX 1024
5005 #ifndef DIR_SEPARATOR
5006 #define DIR_SEPARATOR '/'
5009 #if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \
5011 #define HAVE_DOS_BASED_FILE_SYSTEM
5012 #ifndef DIR_SEPARATOR_2
5013 #define DIR_SEPARATOR_2 '\\'
5017 #ifndef DIR_SEPARATOR_2
5018 # define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR)
5019 #else /* DIR_SEPARATOR_2 */
5020 # define IS_DIR_SEPARATOR(ch) \
5021 (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2))
5022 #endif /* DIR_SEPARATOR_2 */
5024 #define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type)))
5025 #define XFREE(stale) do { \
5026 if (stale) { free ((void *) stale); stale = 0; } \
5029 const char *program_name = NULL;
5031 void * xmalloc (size_t num);
5032 char * xstrdup (const char *string);
5033 char * basename (const char *name);
5034 char * fnqualify(const char *path);
5035 char * strendzap(char *str, const char *pat);
5036 void lt_fatal (const char *message, ...);
5039 main (int argc, char *argv[])
5044 program_name = (char *) xstrdup ((char *) basename (argv[0]));
5045 newargz = XMALLOC(char *, argc+2);
5048 cat >> $cwrappersource <<EOF
5049 newargz[0] = "$SHELL";
5052 cat >> $cwrappersource <<"EOF"
5053 newargz
[1] = fnqualify
(argv
[0]);
5054 /* we know the
script has the same name
, without the .exe
*/
5055 /* so
make sure newargz
[1] doesn
't end in .exe */
5056 strendzap(newargz[1],".exe");
5057 for (i = 1; i < argc; i++)
5058 newargz[i+1] = xstrdup(argv[i]);
5059 newargz[argc+1] = NULL;
5062 cat >> $cwrappersource <<EOF
5063 execv("$SHELL",newargz);
5066 cat >> $cwrappersource <<"EOF"
5070 xmalloc (size_t num)
5072 void * p = (void *) malloc (num);
5074 lt_fatal ("Memory exhausted");
5080 xstrdup (const char *string)
5082 return string ? strcpy ((char *) xmalloc (strlen (string) + 1), string) : NULL
5087 basename (const char *name)
5091 #if defined (HAVE_DOS_BASED_FILE_SYSTEM)
5092 /* Skip over the disk name in MSDOS pathnames. */
5093 if (isalpha (name[0]) && name[1] == ':')
5097 for (base = name; *name; name++)
5098 if (IS_DIR_SEPARATOR (*name))
5100 return (char *) base;
5104 fnqualify(const char *path)
5108 char tmp[LT_PATHMAX + 1];
5110 assert(path != NULL);
5112 /* Is it qualified already? */
5113 #if defined (HAVE_DOS_BASED_FILE_SYSTEM)
5114 if (isalpha (path[0]) && path[1] == ':')
5115 return xstrdup (path);
5117 if (IS_DIR_SEPARATOR (path[0]))
5118 return xstrdup (path);
5120 /* prepend the current directory */
5121 /* doesn't handle
'~' */
5122 if (getcwd
(tmp
, LT_PATHMAX
) == NULL
)
5123 lt_fatal
("getcwd failed");
5124 size
= strlen
(tmp
) + 1 + strlen
(path
) + 1; /* +2 for '/' and
'\0' */
5125 p
= XMALLOC
(char
, size
);
5126 sprintf
(p
, "%s%c%s", tmp
, DIR_SEPARATOR
, path
);
5131 strendzap
(char
*str
, const char
*pat
)
5135 assert
(str
!= NULL
);
5136 assert
(pat
!= NULL
);
5139 patlen
= strlen
(pat
);
5143 str
+= len
- patlen
;
5144 if (strcmp
(str
, pat
) == 0)
5151 lt_error_core
(int exit_status
, const char
* mode
,
5152 const char
* message
, va_list ap
)
5154 fprintf
(stderr
, "%s: %s: ", program_name
, mode
);
5155 vfprintf
(stderr
, message
, ap
);
5156 fprintf
(stderr
, ".\n");
5158 if (exit_status
>= 0)
5163 lt_fatal
(const char
*message
, ...
)
5166 va_start
(ap
, message
);
5167 lt_error_core
(EXIT_FAILURE
, "FATAL", message
, ap
);
5171 # we should really use a build-platform specific compiler
5172 # here, but OTOH, the wrappers (shell script and this C one)
5173 # are only useful if you want to execute the "real" binary.
5174 # Since the "real" binary is built for $host, then this
5175 # wrapper might as well be built for $host, too.
5176 $run $LTCC -s -o $cwrapper $cwrappersource
5180 trap "$rm $output; exit $EXIT_FAILURE" 1 2 15
5185 # $output - temporary wrapper script for $objdir/$outputname
5186 # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
5188 # The $output program cannot be directly executed until all the libtool
5189 # libraries that it depends on are installed.
5191 # This wrapper script should never be moved out of the build directory.
5192 # If it is, it will not operate correctly.
5194 # Sed substitution that helps us do robust quoting. It backslashifies
5195 # metacharacters that are still active within double-quoted strings.
5196 Xsed='${SED} -e 1s/^X//'
5197 sed_quote_subst='$sed_quote_subst'
5199 # The HP-UX ksh and POSIX shell print the target directory to stdout
5201 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
5203 relink_command=\"$relink_command\"
5205 # This environment variable determines our operation mode.
5206 if test \"\$libtool_install_magic\" = \"$magic\"; then
5207 # install mode needs the following variable:
5208 notinst_deplibs='$notinst_deplibs'
5210 # When we are sourced in execute mode, \$file and \$echo are already set.
5211 if test \"\$libtool_execute_magic\" != \"$magic\"; then
5214 # Make sure echo works.
5215 if test \"X\$1\" = X--no-reexec; then
5216 # Discard the --no-reexec flag, and continue.
5218 elif test \"X\`(\$echo '\t') 2>/dev/null\`\" = 'X\t'; then
5219 # Yippee, \$echo works!
5222 # Restart under the correct shell, and then maybe \$echo will work.
5223 exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"}
5229 # Find the directory that this script lives in.
5230 thisdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\`
5231 test \"x\$thisdir\" = \"x\$file\" && thisdir=.
5233 # Follow symbolic links until we get to the real thisdir.
5234 file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\`
5235 while test -n \"\$file\"; do
5236 destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\`
5238 # If there was a directory component, then change thisdir.
5239 if test \"x\$destdir\" != \"x\$file\"; then
5240 case \"\$destdir\" in
5241 [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;;
5242 *) thisdir=\"\$thisdir/\$destdir\" ;;
5246 file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\`
5247 file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\`
5250 # Try to get the absolute directory name.
5251 absdir=\`cd \"\$thisdir\" && pwd\`
5252 test -n \"\$absdir\" && thisdir=\"\$absdir\"
5255 if test "$fast_install" = yes; then
5257 program=lt-'$outputname'$exeext
5258 progdir=\"\$thisdir/$objdir\"
5260 if test ! -f \"\$progdir/\$program\" || \\
5261 { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\
5262 test \"X\$file\" != \"X\$progdir/\$program\"; }; then
5264 file=\"\$\$-\$program\"
5266 if test ! -d \"\$progdir\"; then
5267 $mkdir \"\$progdir\"
5269 $rm \"\$progdir/\$file\"
5274 # relink executable if necessary
5275 if test -n \"\$relink_command\"; then
5276 if relink_command_output=\`eval \$relink_command 2>&1\`; then :
5278 $echo \"\$relink_command_output\" >&2
5279 $rm \"\$progdir/\$file\"
5284 $mv \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null ||
5285 { $rm \"\$progdir/\$program\";
5286 $mv \"\$progdir/\$file\" \"\$progdir/\$program\"; }
5287 $rm \"\$progdir/\$file\"
5291 program='$outputname'
5292 progdir=\"\$thisdir/$objdir\"
5298 if test -f \"\$progdir/\$program\"; then"
5300 # Export our shlibpath_var if we have one.
5301 if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
5303 # Add our own library path to $shlibpath_var
5304 $shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
5306 # Some systems cannot cope with colon-terminated $shlibpath_var
5307 # The second colon is a workaround for a bug in BeOS R4 sed
5308 $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\`
5310 export $shlibpath_var
5314 # fixup the dll searchpath if we need to.
5315 if test -n "$dllsearchpath"; then
5317 # Add the dll search path components to the executable PATH
5318 PATH=$dllsearchpath:\$PATH
5323 if test \"\$libtool_execute_magic\" != \"$magic\"; then
5324 # Run the actual program with our arguments.
5327 # Backslashes separate directories on plain windows
5328 *-*-mingw |
*-*-os2*)
5330 exec \$progdir\\\\\$program \${1+\"\$@\"}
5336 exec \$progdir/\$program \${1+\"\$@\"}
5341 \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\"
5345 # The program doesn't exist.
5346 \$echo \"\$0: error: \$progdir/\$program does not exist\" 1>&2
5347 \$echo \"This script is just a wrapper for \$program.\" 1>&2
5348 $echo \"See the $PACKAGE documentation for more information.\" 1>&2
5359 # See if we need to build an old-fashioned archive.
5360 for oldlib
in $oldlibs; do
5362 if test "$build_libtool_libs" = convenience
; then
5363 oldobjs
="$libobjs_save"
5364 addlibs
="$convenience"
5365 build_libtool_libs
=no
5367 if test "$build_libtool_libs" = module
; then
5368 oldobjs
="$libobjs_save"
5369 build_libtool_libs
=no
5371 oldobjs
="$old_deplibs $non_pic_objects"
5373 addlibs
="$old_convenience"
5376 if test -n "$addlibs"; then
5377 gentop
="$output_objdir/${outputname}x"
5378 generated
="$generated $gentop"
5380 func_extract_archives
$gentop $addlibs
5381 oldobjs
="$oldobjs $func_extract_archives_result"
5384 # Do each command in the archive commands.
5385 if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
5386 cmds
=$old_archive_from_new_cmds
5388 eval cmds
=\"$old_archive_cmds\"
5390 if len
=`expr "X$cmds" : ".*"` &&
5391 test "$len" -le "$max_cmd_len" ||
test "$max_cmd_len" -le -1; then
5392 cmds
=$old_archive_cmds
5394 # the command line is too long to link in one step, link in parts
5395 $echo "using piecewise archive linking..."
5400 save_oldobjs
=$oldobjs
5401 # GNU ar 2.10+ was changed to match POSIX; thus no paths are
5402 # encoded into archives. This makes 'ar r' malfunction in
5403 # this piecewise linking case whenever conflicting object
5404 # names appear in distinct ar calls; check, warn and compensate.
5405 if (for obj
in $save_oldobjs
5407 $echo "X$obj" |
$Xsed -e 's%^.*/%%'
5408 done |
sort |
sort -uc >/dev
/null
2>&1); then
5411 $echo "$modename: warning: object name conflicts; overriding AR_FLAGS to 'cq'" 1>&2
5412 $echo "$modename: warning: to ensure that POSIX-compatible ar will work" 1>&2
5415 # Is there a better way of finding the last object in the list?
5416 for obj
in $save_oldobjs
5420 for obj
in $save_oldobjs
5422 oldobjs
="$objlist $obj"
5423 objlist
="$objlist $obj"
5424 eval test_cmds
=\"$old_archive_cmds\"
5425 if len
=`expr "X$test_cmds" : ".*"` &&
5426 test "$len" -le "$max_cmd_len"; then
5429 # the above command should be used before it gets too long
5431 if test "$obj" = "$last_oldobj" ; then
5434 test -z "$concat_cmds" || concat_cmds
=$concat_cmds~
5435 eval concat_cmds
=\"\
${concat_cmds}$old_archive_cmds\"
5441 if test "X$oldobjs" = "X" ; then
5442 eval cmds
=\"\
$concat_cmds\"
5444 eval cmds
=\"\
$concat_cmds~\
$old_archive_cmds\"
5448 save_ifs
="$IFS"; IFS
='~'
5449 for cmd
in $cmds; do
5453 $run eval "$cmd" ||
exit $?
5458 if test -n "$generated"; then
5459 $show "${rm}r$generated"
5460 $run ${rm}r
$generated
5463 # Now create the libtool archive.
5467 test "$build_old_libs" = yes && old_library
="$libname.$libext"
5468 $show "creating $output"
5470 # Preserve any variables that may affect compiler behavior
5471 for var
in $variables_saved_for_relink; do
5472 if eval test -z \"\
${$var+set}\"; then
5473 relink_command
="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command"
5474 elif eval var_value
=\$
$var; test -z "$var_value"; then
5475 relink_command
="$var=; export $var; $relink_command"
5477 var_value
=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"`
5478 relink_command
="$var=\"$var_value\"; export $var; $relink_command"
5481 # Quote the link command for shipping.
5482 relink_command
="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
5483 relink_command
=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
5484 if test "$hardcode_automatic" = yes ; then
5489 # Only create the output if not a dry run.
5490 if test -z "$run"; then
5491 for installed
in no
yes; do
5492 if test "$installed" = yes; then
5493 if test -z "$install_libdir"; then
5496 output
="$output_objdir/$outputname"i
5497 # Replace all uninstalled libtool libraries with the installed ones
5499 for deplib
in $dependency_libs; do
5502 name
=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'`
5503 eval libdir
=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
5504 if test -z "$libdir"; then
5505 $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
5508 newdependency_libs
="$newdependency_libs $libdir/$name"
5510 *) newdependency_libs
="$newdependency_libs $deplib" ;;
5513 dependency_libs
="$newdependency_libs"
5515 for lib
in $dlfiles; do
5516 name
=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
5517 eval libdir
=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
5518 if test -z "$libdir"; then
5519 $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
5522 newdlfiles
="$newdlfiles $libdir/$name"
5524 dlfiles
="$newdlfiles"
5526 for lib
in $dlprefiles; do
5527 name
=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
5528 eval libdir
=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
5529 if test -z "$libdir"; then
5530 $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
5533 newdlprefiles
="$newdlprefiles $libdir/$name"
5535 dlprefiles
="$newdlprefiles"
5538 for lib
in $dlfiles; do
5540 [\\/]* |
[A-Za-z
]:[\\/]*) abs
="$lib" ;;
5541 *) abs
=`pwd`"/$lib" ;;
5543 newdlfiles
="$newdlfiles $abs"
5545 dlfiles
="$newdlfiles"
5547 for lib
in $dlprefiles; do
5549 [\\/]* |
[A-Za-z
]:[\\/]*) abs
="$lib" ;;
5550 *) abs
=`pwd`"/$lib" ;;
5552 newdlprefiles
="$newdlprefiles $abs"
5554 dlprefiles
="$newdlprefiles"
5557 # place dlname in correct position for cygwin
5559 case $host,$output,$installed,$module,$dlname in
5560 *cygwin
*,*lai
,yes,no
,*.dll |
*mingw
*,*lai
,yes,no
,*.dll
) tdlname
=..
/bin
/$dlname ;;
5563 # $outputname - a libtool library file
5564 # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
5566 # Please DO NOT delete this file!
5567 # It is necessary for linking the library.
5569 # The name that we can dlopen(3).
5572 # Names of this library.
5573 library_names='$library_names'
5575 # The name of the static archive.
5576 old_library='$old_library'
5578 # Libraries that this one depends upon.
5579 dependency_libs='$dependency_libs'
5581 # Version information for $libname.
5586 # Is this an already installed library?
5587 installed=$installed
5589 # Should we warn about portability when linking against -modules?
5590 shouldnotlink=$module
5592 # Files to dlopen/dlpreopen
5594 dlpreopen='$dlprefiles'
5596 # Directory that this library needs to be installed in:
5597 libdir='$install_libdir'"
5598 if test "$installed" = no
&& test "$need_relink" = yes; then
5600 relink_command=\"$relink_command\""
5605 # Do a symbolic link so that the libtool archive can be found in
5606 # LD_LIBRARY_PATH before the program is installed.
5607 $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)"
5608 $run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' ||
exit $?
5614 # libtool install mode
5616 modename
="$modename: install"
5618 # There may be an optional sh(1) argument at the beginning of
5619 # install_prog (especially on Windows NT).
5620 if test "$nonopt" = "$SHELL" ||
test "$nonopt" = /bin
/sh ||
5621 # Allow the use of GNU shtool's install command.
5622 $echo "X$nonopt" |
$Xsed |
grep shtool
> /dev
/null
; then
5623 # Aesthetically quote it.
5624 arg
=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"`
5626 *[\
[\~\
#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
5630 install_prog
="$arg "
5638 # The real first argument should be the name of the installation program.
5639 # Aesthetically quote it.
5640 arg
=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
5642 *[\
[\~\
#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
5646 install_prog
="$install_prog$arg"
5648 # We need to accept at least all the BSD install flags.
5658 if test -n "$dest"; then
5659 files
="$files $dest"
5677 # If the previous option needed an argument, then skip it.
5678 if test -n "$prev"; then
5687 # Aesthetically quote the argument.
5688 arg
=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
5690 *[\
[\~\
#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
5694 install_prog
="$install_prog $arg"
5697 if test -z "$install_prog"; then
5698 $echo "$modename: you must specify an install program" 1>&2
5703 if test -n "$prev"; then
5704 $echo "$modename: the \`$prev' option requires an argument" 1>&2
5709 if test -z "$files"; then
5710 if test -z "$dest"; then
5711 $echo "$modename: no file or destination specified" 1>&2
5713 $echo "$modename: you must specify a destination" 1>&2
5719 # Strip any trailing slash from the destination.
5720 dest
=`$echo "X$dest" | $Xsed -e 's%/$%%'`
5722 # Check to see that the destination is a directory.
5723 test -d "$dest" && isdir
=yes
5724 if test "$isdir" = yes; then
5728 destdir
=`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'`
5729 test "X$destdir" = "X$dest" && destdir
=.
5730 destname
=`$echo "X$dest" | $Xsed -e 's%^.*/%%'`
5732 # Not a directory, so check to see that there is only one file specified.
5734 if test "$#" -gt 2; then
5735 $echo "$modename: \`$dest' is not a directory" 1>&2
5741 [\\/]* |
[A-Za-z
]:[\\/]*) ;;
5743 for file in $files; do
5747 $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2
5756 # This variable tells wrapper scripts just to set variables rather
5757 # than running their programs.
5758 libtool_install_magic
="$magic"
5763 for file in $files; do
5765 # Do each installation.
5768 # Do the static libraries later.
5769 staticlibs
="$staticlibs $file"
5773 # Check to see that this really is a libtool archive.
5774 if (${SED} -e '2q' $file |
grep "^# Generated by .*$PACKAGE") >/dev
/null
2>&1; then :
5776 $echo "$modename: \`$file' is not a valid libtool archive" 1>&2
5784 # If there is no directory component, then add one.
5786 */* |
*\\*) .
$file ;;
5790 # Add the libdir to current_libdirs if it is the destination.
5791 if test "X$destdir" = "X$libdir"; then
5792 case "$current_libdirs " in
5794 *) current_libdirs
="$current_libdirs $libdir" ;;
5797 # Note the libdir as a future libdir.
5798 case "$future_libdirs " in
5800 *) future_libdirs
="$future_libdirs $libdir" ;;
5804 dir
=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/
5805 test "X$dir" = "X$file/" && dir
=
5808 if test -n "$relink_command"; then
5809 # Determine the prefix the user has applied to our future dir.
5810 inst_prefix_dir
=`$echo "$destdir" | $SED "s%$libdir\$%%"`
5812 # Don't allow the user to place us outside of our expected
5813 # location b/c this prevents finding dependent libraries that
5814 # are installed to the same prefix.
5815 # At present, this check doesn't affect windows .dll's that
5816 # are installed into $libdir/../bin (currently, that works fine)
5817 # but it's something to keep an eye on.
5818 if test "$inst_prefix_dir" = "$destdir"; then
5819 $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2
5823 if test -n "$inst_prefix_dir"; then
5824 # Stick the inst_prefix_dir data into the link command.
5825 relink_command
=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"`
5827 relink_command
=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%%"`
5830 $echo "$modename: warning: relinking \`$file'" 1>&2
5831 $show "$relink_command"
5832 if $run eval "$relink_command"; then :
5834 $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
5839 # See the names of the shared library.
5840 set dummy
$library_names
5841 if test -n "$2"; then
5847 test -n "$relink_command" && srcname
="$realname"T
5849 # Install the shared library and build the symlinks.
5850 $show "$install_prog $dir/$srcname $destdir/$realname"
5851 $run eval "$install_prog $dir/$srcname $destdir/$realname" ||
exit $?
5852 if test -n "$stripme" && test -n "$striplib"; then
5853 $show "$striplib $destdir/$realname"
5854 $run eval "$striplib $destdir/$realname" ||
exit $?
5857 if test "$#" -gt 0; then
5858 # Delete the old symlinks, and create new ones.
5861 if test "$linkname" != "$realname"; then
5862 $show "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)"
5863 $run eval "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)"
5868 # Do each command in the postinstall commands.
5869 lib
="$destdir/$realname"
5870 cmds
=$postinstall_cmds
5871 save_ifs
="$IFS"; IFS
='~'
5872 for cmd
in $cmds; do
5876 $run eval "$cmd" ||
exit $?
5881 # Install the pseudo-library for information purposes.
5882 name
=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
5883 instname
="$dir/$name"i
5884 $show "$install_prog $instname $destdir/$name"
5885 $run eval "$install_prog $instname $destdir/$name" ||
exit $?
5887 # Maybe install the static library, too.
5888 test -n "$old_library" && staticlibs
="$staticlibs $dir/$old_library"
5892 # Install (i.e. copy) a libtool object.
5894 # Figure out destination file name, if it wasn't already specified.
5895 if test -n "$destname"; then
5896 destfile
="$destdir/$destname"
5898 destfile
=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
5899 destfile
="$destdir/$destfile"
5902 # Deduce the name of the destination old-style object file.
5905 staticdest
=`$echo "X$destfile" | $Xsed -e "$lo2o"`
5908 staticdest
="$destfile"
5912 $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2
5918 # Install the libtool object if requested.
5919 if test -n "$destfile"; then
5920 $show "$install_prog $file $destfile"
5921 $run eval "$install_prog $file $destfile" ||
exit $?
5924 # Install the old object if enabled.
5925 if test "$build_old_libs" = yes; then
5926 # Deduce the name of the old-style object file.
5927 staticobj
=`$echo "X$file" | $Xsed -e "$lo2o"`
5929 $show "$install_prog $staticobj $staticdest"
5930 $run eval "$install_prog \$staticobj \$staticdest" ||
exit $?
5936 # Figure out destination file name, if it wasn't already specified.
5937 if test -n "$destname"; then
5938 destfile
="$destdir/$destname"
5940 destfile
=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
5941 destfile
="$destdir/$destfile"
5944 # If the file is missing, and there is a .exe on the end, strip it
5945 # because it is most likely a libtool script we actually want to
5950 if test ! -f "$file"; then
5951 file=`$echo $file|${SED} 's,.exe$,,'`
5957 # Do a test to see if this is really a libtool program.
5960 wrapper
=`$echo $file | ${SED} -e 's,.exe$,,'`
5966 if (${SED} -e '4q' $wrapper |
grep "^# Generated by .*$PACKAGE")>/dev
/null
2>&1; then
5970 # To insure that "foo" is sourced, and not "foo.exe",
5971 # finese the cygwin/MSYS system by explicitly sourcing "foo."
5972 # which disallows the automatic-append-.exe behavior.
5974 *cygwin
* |
*mingw
*) wrapperdot
=${wrapper}.
;;
5975 *) wrapperdot
=${wrapper} ;;
5977 # If there is no directory component, then add one.
5979 */* |
*\\*) .
${wrapperdot} ;;
5980 *) . .
/${wrapperdot} ;;
5983 # Check the variables that should have been set.
5984 if test -z "$notinst_deplibs"; then
5985 $echo "$modename: invalid libtool wrapper script \`$wrapper'" 1>&2
5990 for lib
in $notinst_deplibs; do
5991 # Check to see that each library is installed.
5993 if test -f "$lib"; then
5994 # If there is no directory component, then add one.
5996 */* |
*\\*) .
$lib ;;
6000 libfile
="$libdir/"`$echo "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test
6001 if test -n "$libdir" && test ! -f "$libfile"; then
6002 $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2
6008 # To insure that "foo" is sourced, and not "foo.exe",
6009 # finese the cygwin/MSYS system by explicitly sourcing "foo."
6010 # which disallows the automatic-append-.exe behavior.
6012 *cygwin
* |
*mingw
*) wrapperdot
=${wrapper}.
;;
6013 *) wrapperdot
=${wrapper} ;;
6015 # If there is no directory component, then add one.
6017 */* |
*\\*) .
${wrapperdot} ;;
6018 *) . .
/${wrapperdot} ;;
6022 if test "$fast_install" = no
&& test -n "$relink_command"; then
6023 if test "$finalize" = yes && test -z "$run"; then
6025 test -n "$TMPDIR" && tmpdir
="$TMPDIR"
6026 tmpdir
="$tmpdir/libtool-$$"
6029 if $mkdir "$tmpdir"; then
6033 $echo "$modename: error: cannot create temporary directory \`$tmpdir'" 1>&2
6036 file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'`
6037 outputname
="$tmpdir/$file"
6038 # Replace the output file specification.
6039 relink_command
=`$echo "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'`
6041 $show "$relink_command"
6042 if $run eval "$relink_command"; then :
6044 $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
6050 $echo "$modename: warning: cannot relink \`$file'" 1>&2
6053 # Install the binary that we compiled earlier.
6054 file=`$echo "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"`
6058 # remove .exe since cygwin /usr/bin/install will append another
6060 case $install_prog,$host in
6061 */usr
/bin
/install*,*cygwin
*)
6062 case $file:$destfile in
6067 destfile
=$destfile.exe
6070 destfile
=`$echo $destfile | ${SED} -e 's,.exe$,,'`
6075 $show "$install_prog$stripme $file $destfile"
6076 $run eval "$install_prog\$stripme \$file \$destfile" ||
exit $?
6077 test -n "$outputname" && ${rm}r
"$tmpdir"
6082 for file in $staticlibs; do
6083 name
=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
6085 # Set up the ranlib parameters.
6086 oldlib
="$destdir/$name"
6088 $show "$install_prog $file $oldlib"
6089 $run eval "$install_prog \$file \$oldlib" ||
exit $?
6091 if test -n "$stripme" && test -n "$old_striplib"; then
6092 $show "$old_striplib $oldlib"
6093 $run eval "$old_striplib $oldlib" ||
exit $?
6096 # Do each command in the postinstall commands.
6097 cmds
=$old_postinstall_cmds
6098 save_ifs
="$IFS"; IFS
='~'
6099 for cmd
in $cmds; do
6103 $run eval "$cmd" ||
exit $?
6108 if test -n "$future_libdirs"; then
6109 $echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2
6112 if test -n "$current_libdirs"; then
6113 # Maybe just do a dry run.
6114 test -n "$run" && current_libdirs
=" -n$current_libdirs"
6115 exec_cmd
='$SHELL $progpath $preserve_args --finish$current_libdirs'
6121 # libtool finish mode
6123 modename
="$modename: finish"
6127 if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
6130 libdirs
="$libdirs $dir"
6133 for libdir
in $libdirs; do
6134 if test -n "$finish_cmds"; then
6135 # Do each command in the finish commands.
6137 save_ifs
="$IFS"; IFS
='~'
6138 for cmd
in $cmds; do
6142 $run eval "$cmd" || admincmds
="$admincmds
6147 if test -n "$finish_eval"; then
6148 # Do the single finish_eval.
6149 eval cmds
=\"$finish_eval\"
6150 $run eval "$cmds" || admincmds
="$admincmds
6156 # Exit here if they wanted silent mode.
6157 test "$show" = : && exit $EXIT_SUCCESS
6159 $echo "----------------------------------------------------------------------"
6160 $echo "Libraries have been installed in:"
6161 for libdir
in $libdirs; do
6165 $echo "If you ever happen to want to link against installed libraries"
6166 $echo "in a given directory, LIBDIR, you must either use libtool, and"
6167 $echo "specify the full pathname of the library, or use the \`-LLIBDIR'"
6168 $echo "flag during linking and do at least one of the following:"
6169 if test -n "$shlibpath_var"; then
6170 $echo " - add LIBDIR to the \`$shlibpath_var' environment variable"
6171 $echo " during execution"
6173 if test -n "$runpath_var"; then
6174 $echo " - add LIBDIR to the \`$runpath_var' environment variable"
6175 $echo " during linking"
6177 if test -n "$hardcode_libdir_flag_spec"; then
6179 eval flag
=\"$hardcode_libdir_flag_spec\"
6181 $echo " - use the \`$flag' linker flag"
6183 if test -n "$admincmds"; then
6184 $echo " - have your system administrator run these commands:$admincmds"
6186 if test -f /etc
/ld.so.conf
; then
6187 $echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
6190 $echo "See any operating system documentation about shared libraries for"
6191 $echo "more information, such as the ld(1) and ld.so(8) manual pages."
6192 $echo "----------------------------------------------------------------------"
6196 # libtool execute mode
6198 modename
="$modename: execute"
6200 # The first argument is the command name.
6202 if test -z "$cmd"; then
6203 $echo "$modename: you must specify a COMMAND" 1>&2
6208 # Handle -dlopen flags immediately.
6209 for file in $execute_dlfiles; do
6210 if test ! -f "$file"; then
6211 $echo "$modename: \`$file' is not a file" 1>&2
6219 # Check to see that this really is a libtool archive.
6220 if (${SED} -e '2q' $file |
grep "^# Generated by .*$PACKAGE") >/dev
/null
2>&1; then :
6222 $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
6227 # Read the libtool library.
6231 # If there is no directory component, then add one.
6233 */* |
*\\*) .
$file ;;
6237 # Skip this library if it cannot be dlopened.
6238 if test -z "$dlname"; then
6239 # Warn if it was a shared library.
6240 test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'"
6244 dir
=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
6245 test "X$dir" = "X$file" && dir
=.
6247 if test -f "$dir/$objdir/$dlname"; then
6250 $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2
6256 # Just add the directory containing the .lo file.
6257 dir
=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
6258 test "X$dir" = "X$file" && dir
=.
6262 $echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2
6267 # Get the absolute pathname.
6268 absdir
=`cd "$dir" && pwd`
6269 test -n "$absdir" && dir
="$absdir"
6271 # Now add the directory to shlibpath_var.
6272 if eval "test -z \"\$$shlibpath_var\""; then
6273 eval "$shlibpath_var=\"\$dir\""
6275 eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\""
6279 # This variable tells wrapper scripts just to set shlibpath_var
6280 # rather than running their programs.
6281 libtool_execute_magic
="$magic"
6283 # Check if any of the arguments is a wrapper script.
6290 # Do a test to see if this is really a libtool program.
6291 if (${SED} -e '4q' $file |
grep "^# Generated by .*$PACKAGE") >/dev
/null
2>&1; then
6292 # If there is no directory component, then add one.
6294 */* |
*\\*) .
$file ;;
6298 # Transform arg to wrapped name.
6299 file="$progdir/$program"
6303 # Quote arguments (to preserve shell metacharacters).
6304 file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"`
6305 args
="$args \"$file\""
6308 if test -z "$run"; then
6309 if test -n "$shlibpath_var"; then
6310 # Export the shlibpath_var.
6311 eval "export $shlibpath_var"
6314 # Restore saved environment variables
6315 if test "${save_LC_ALL+set}" = set; then
6316 LC_ALL
="$save_LC_ALL"; export LC_ALL
6318 if test "${save_LANG+set}" = set; then
6319 LANG
="$save_LANG"; export LANG
6322 # Now prepare to actually exec the command.
6323 exec_cmd
="\$cmd$args"
6325 # Display what would be done.
6326 if test -n "$shlibpath_var"; then
6327 eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\""
6328 $echo "export $shlibpath_var"
6335 # libtool clean and uninstall mode
6337 modename
="$modename: $mode"
6343 # This variable tells wrapper scripts just to set variables rather
6344 # than running their programs.
6345 libtool_install_magic
="$magic"
6350 -f) rm="$rm $arg"; rmforce
=yes ;;
6351 -*) rm="$rm $arg" ;;
6352 *) files
="$files $arg" ;;
6356 if test -z "$rm"; then
6357 $echo "$modename: you must specify an RM program" 1>&2
6364 origobjdir
="$objdir"
6365 for file in $files; do
6366 dir
=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
6367 if test "X$dir" = "X$file"; then
6369 objdir
="$origobjdir"
6371 objdir
="$dir/$origobjdir"
6373 name
=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
6374 test "$mode" = uninstall
&& objdir
="$dir"
6376 # Remember objdir for removal later, being careful to avoid duplicates
6377 if test "$mode" = clean
; then
6380 *) rmdirs
="$rmdirs $objdir" ;;
6384 # Don't error if the file doesn't exist and rm -f was used.
6385 if (test -L "$file") >/dev
/null
2>&1 \
6386 ||
(test -h "$file") >/dev
/null
2>&1 \
6387 ||
test -f "$file"; then
6389 elif test -d "$file"; then
6392 elif test "$rmforce" = yes; then
6400 # Possibly a libtool archive, so verify it.
6401 if (${SED} -e '2q' $file |
grep "^# Generated by .*$PACKAGE") >/dev
/null
2>&1; then
6404 # Delete the libtool libraries and symlinks.
6405 for n
in $library_names; do
6406 rmfiles
="$rmfiles $objdir/$n"
6408 test -n "$old_library" && rmfiles
="$rmfiles $objdir/$old_library"
6409 test "$mode" = clean
&& rmfiles
="$rmfiles $objdir/$name $objdir/${name}i"
6411 if test "$mode" = uninstall
; then
6412 if test -n "$library_names"; then
6413 # Do each command in the postuninstall commands.
6414 cmds
=$postuninstall_cmds
6415 save_ifs
="$IFS"; IFS
='~'
6416 for cmd
in $cmds; do
6421 if test "$?" -ne 0 && test "$rmforce" != yes; then
6428 if test -n "$old_library"; then
6429 # Do each command in the old_postuninstall commands.
6430 cmds
=$old_postuninstall_cmds
6431 save_ifs
="$IFS"; IFS
='~'
6432 for cmd
in $cmds; do
6437 if test "$?" -ne 0 && test "$rmforce" != yes; then
6443 # FIXME: should reinstall the best remaining shared library.
6449 # Possibly a libtool object, so verify it.
6450 if (${SED} -e '2q' $file |
grep "^# Generated by .*$PACKAGE") >/dev
/null
2>&1; then
6455 # Add PIC object to the list of files to remove.
6456 if test -n "$pic_object" \
6457 && test "$pic_object" != none
; then
6458 rmfiles
="$rmfiles $dir/$pic_object"
6461 # Add non-PIC object to the list of files to remove.
6462 if test -n "$non_pic_object" \
6463 && test "$non_pic_object" != none
; then
6464 rmfiles
="$rmfiles $dir/$non_pic_object"
6470 if test "$mode" = clean
; then
6474 file=`$echo $file|${SED} 's,.exe$,,'`
6475 noexename
=`$echo $name|${SED} 's,.exe$,,'`
6476 # $file with .exe has already been added to rmfiles,
6477 # add $file without .exe
6478 rmfiles
="$rmfiles $file"
6481 # Do a test to see if this is a libtool program.
6482 if (${SED} -e '4q' $file |
grep "^# Generated by .*$PACKAGE") >/dev
/null
2>&1; then
6486 # note $name still contains .exe if it was in $file originally
6487 # as does the version of $file that was added into $rmfiles
6488 rmfiles
="$rmfiles $objdir/$name $objdir/${name}S.${objext}"
6489 if test "$fast_install" = yes && test -n "$relink_command"; then
6490 rmfiles
="$rmfiles $objdir/lt-$name"
6492 if test "X$noexename" != "X$name" ; then
6493 rmfiles
="$rmfiles $objdir/lt-${noexename}.c"
6499 $show "$rm $rmfiles"
6500 $run $rm $rmfiles || exit_status
=1
6502 objdir
="$origobjdir"
6504 # Try to remove the ${objdir}s in the directories where we deleted files
6505 for dir
in $rmdirs; do
6506 if test -d "$dir"; then
6508 $run rmdir $dir >/dev
/null
2>&1
6516 $echo "$modename: you must specify a MODE" 1>&2
6517 $echo "$generic_help" 1>&2
6522 if test -z "$exec_cmd"; then
6523 $echo "$modename: invalid operation mode \`$mode'" 1>&2
6524 $echo "$generic_help" 1>&2
6527 fi # test -z "$show_help"
6529 if test -n "$exec_cmd"; then
6534 # We need to display help for each of the modes.
6537 "Usage: $modename [OPTION]... [MODE-ARG]...
6539 Provide generalized library-building support services.
6541 --config show all configuration variables
6542 --debug enable verbose shell tracing
6543 -n, --dry-run display commands without modifying any files
6544 --features display basic configuration information and exit
6545 --finish same as \`--mode=finish'
6546 --help display this help message and exit
6547 --mode=MODE use operation mode MODE [default=inferred from MODE-ARGS]
6548 --quiet same as \`--silent'
6549 --silent don't print informational messages
6550 --tag=TAG use configuration variables from tag TAG
6551 --version print version information
6553 MODE must be one of the following:
6555 clean remove files from the build directory
6556 compile compile a source file into a libtool object
6557 execute automatically set library path, then run a program
6558 finish complete the installation of libtool libraries
6559 install install libraries or executables
6560 link create a library or an executable
6561 uninstall remove libraries from an installed directory
6563 MODE-ARGS vary depending on the MODE. Try \`$modename --help --mode=MODE' for
6564 a more detailed description of MODE.
6566 Report bugs to <bug-libtool@gnu.org>."
6572 "Usage: $modename [OPTION]... --mode=clean RM [RM-OPTION]... FILE...
6574 Remove files from the build directory.
6576 RM is the name of the program to use to delete files associated with each FILE
6577 (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed
6580 If FILE is a libtool library, object or program, all the files associated
6581 with it are deleted. Otherwise, only FILE itself is deleted using RM."
6586 "Usage: $modename [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE
6588 Compile a source file into a libtool library object.
6590 This mode accepts the following additional options:
6592 -o OUTPUT-FILE set the output file name to OUTPUT-FILE
6593 -prefer-pic try to building PIC objects only
6594 -prefer-non-pic try to building non-PIC objects only
6595 -static always build a \`.o' file suitable for static linking
6597 COMPILE-COMMAND is a command to be used in creating a \`standard' object file
6598 from the given SOURCEFILE.
6600 The output file name is determined by removing the directory component from
6601 SOURCEFILE, then substituting the C source code suffix \`.c' with the
6602 library object suffix, \`.lo'."
6607 "Usage: $modename [OPTION]... --mode=execute COMMAND [ARGS]...
6609 Automatically set library path, then run a program.
6611 This mode accepts the following additional options:
6613 -dlopen FILE add the directory containing FILE to the library path
6615 This mode sets the library path environment variable according to \`-dlopen'
6618 If any of the ARGS are libtool executable wrappers, then they are translated
6619 into their corresponding uninstalled binary, and any of their required library
6620 directories are added to the library path.
6622 Then, COMMAND is executed, with ARGS as arguments."
6627 "Usage: $modename [OPTION]... --mode=finish [LIBDIR]...
6629 Complete the installation of libtool libraries.
6631 Each LIBDIR is a directory that contains libtool libraries.
6633 The commands that this mode executes may require superuser privileges. Use
6634 the \`--dry-run' option if you just want to see what would be executed."
6639 "Usage: $modename [OPTION]... --mode=install INSTALL-COMMAND...
6641 Install executables or libraries.
6643 INSTALL-COMMAND is the installation command. The first component should be
6644 either the \`install' or \`cp' program.
6646 The rest of the components are interpreted as arguments to that command (only
6647 BSD-compatible install options are recognized)."
6652 "Usage: $modename [OPTION]... --mode=link LINK-COMMAND...
6654 Link object files or libraries together to form another library, or to
6655 create an executable program.
6657 LINK-COMMAND is a command using the C compiler that you would use to create
6658 a program from several object files.
6660 The following components of LINK-COMMAND are treated specially:
6662 -all-static do not do any dynamic linking at all
6663 -avoid-version do not add a version suffix if possible
6664 -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime
6665 -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols
6666 -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
6667 -export-symbols SYMFILE
6668 try to export only the symbols listed in SYMFILE
6669 -export-symbols-regex REGEX
6670 try to export only the symbols matching REGEX
6671 -LLIBDIR search LIBDIR for required installed libraries
6672 -lNAME OUTPUT-FILE requires the installed library libNAME
6673 -module build a library that can dlopened
6674 -no-fast-install disable the fast-install mode
6675 -no-install link a not-installable executable
6676 -no-undefined declare that a library does not refer to external symbols
6677 -o OUTPUT-FILE create OUTPUT-FILE from the specified objects
6678 -objectlist FILE Use a list of object files found in FILE to specify objects
6679 -precious-files-regex REGEX
6680 don't remove output files matching REGEX
6681 -release RELEASE specify package release information
6682 -rpath LIBDIR the created library will eventually be installed in LIBDIR
6683 -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries
6684 -static do not do any dynamic linking of libtool libraries
6685 -version-info CURRENT[:REVISION[:AGE]]
6686 specify library version info [each variable defaults to 0]
6688 All other options (arguments beginning with \`-') are ignored.
6690 Every other argument is treated as a filename. Files ending in \`.la' are
6691 treated as uninstalled libtool libraries, other files are standard or library
6694 If the OUTPUT-FILE ends in \`.la', then a libtool library is created,
6695 only library objects (\`.lo' files) may be specified, and \`-rpath' is
6696 required, except when creating a convenience library.
6698 If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created
6699 using \`ar' and \`ranlib', or on Windows using \`lib'.
6701 If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file
6702 is created, otherwise an executable program is created."
6707 "Usage: $modename [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE...
6709 Remove libraries from an installation directory.
6711 RM is the name of the program to use to delete files associated with each FILE
6712 (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed
6715 If FILE is a libtool library, all the files associated with it are deleted.
6716 Otherwise, only FILE itself is deleted using RM."
6720 $echo "$modename: invalid operation mode \`$mode'" 1>&2
6727 $echo "Try \`$modename --help' for more information about other modes."
6731 # The TAGs below are defined such that we never get into a situation
6732 # in which we disable both kinds of libraries. Given conflicting
6733 # choices, we go for a static library, that is the most portable,
6734 # since we can't tell whether shared libraries were disabled because
6735 # the user asked for that or because the platform doesn't support
6736 # them. This is particularly important on AIX, because we don't
6737 # support having both static and shared libraries enabled at the same
6738 # time on that platform, so we default to a shared-only configuration.
6739 # If a disable-shared tag is given, we'll fallback to a static-only
6740 # configuration. But we'll never go from static-only to shared-only.
6742 # ### BEGIN LIBTOOL TAG CONFIG: disable-shared
6743 build_libtool_libs
=no
6745 # ### END LIBTOOL TAG CONFIG: disable-shared
6747 # ### BEGIN LIBTOOL TAG CONFIG: disable-static
6748 build_old_libs
=`case $build_libtool_libs in yes) $echo no;; *) $echo yes;; esac`
6749 # ### END LIBTOOL TAG CONFIG: disable-static
6755 # ### BEGIN LIBTOOL TAG CONFIG: CXX
6757 # Libtool was configured on host nik.neuroponic.com:
6759 # Shell to use when invoking shell scripts.
6762 # Whether or not to build shared libraries.
6763 build_libtool_libs
=yes
6765 # Whether or not to build static libraries.
6768 # Whether or not to add -lc for building shared libraries.
6769 build_libtool_need_lc
=no
6771 # Whether or not to disallow shared libs when runtime libs are static
6772 allow_libtool_libs_with_static_runtimes
=yes
6774 # Whether or not to optimize for fast installation.
6775 fast_install
=needless
6778 host_alias
=i386-mingw32msvc
6779 host=i386-pc-mingw32msvc
6781 # An echo program that does not interpret backslashes.
6785 AR
="i386-mingw32msvc-ar"
6789 LTCC
="i386-mingw32msvc-gcc"
6791 # A language-specific compiler.
6792 CC
="i386-mingw32msvc-g++"
6794 # Is the compiler the GNU C compiler?
6800 # The linker used to build libraries.
6801 LD
="/usr/misc/torrents/mingw/cross-tools/i386-mingw32msvc/bin/ld"
6803 # Whether we need hard or soft links.
6806 # A BSD-compatible nm program.
6807 NM
="/usr/misc/torrents/mingw/cross-tools/bin/i386-mingw32msvc-nm -B"
6809 # A symbol stripping program
6810 STRIP
="i386-mingw32msvc-strip"
6812 # Used to examine libraries when file_magic_cmd begins "file"
6815 # Used on cygwin: DLL creation program.
6816 DLLTOOL
="i386-mingw32msvc-dlltool"
6818 # Used on cygwin: object dumper.
6819 OBJDUMP
="i386-mingw32msvc-objdump"
6821 # Used on cygwin: assembler.
6822 AS
="i386-mingw32msvc-as"
6824 # The name of the directory that contains temporary libtool files.
6827 # How to create reloadable object files.
6829 reload_cmds
="\$LD\$reload_flag -o \$output\$reload_objs"
6831 # How to pass a linker flag through the compiler.
6834 # Object file suffix (normally "o").
6837 # Old archive suffix (normally "a").
6840 # Shared library suffix (normally ".so").
6843 # Executable file suffix (normally "").
6846 # Additional compiler flags for building library objects.
6847 pic_flag
=" -DDLL_EXPORT -DPIC"
6850 # What is the maximum length of a command?
6853 # Does compiler simultaneously support -c and -o options?
6856 # Must we lock files when doing compilation ?
6859 # Do we need the lib prefix for modules?
6862 # Do we need a version for libraries?
6865 # Whether dlopen is supported.
6866 dlopen_support
=unknown
6868 # Whether dlopen of programs is supported.
6871 # Whether dlopen of statically linked programs is supported.
6872 dlopen_self_static
=unknown
6874 # Compiler flag to prevent dynamic linking.
6875 link_static_flag
="-static"
6877 # Compiler flag to turn off builtin functions.
6878 no_builtin_flag
=" -fno-builtin"
6880 # Compiler flag to allow reflexive dlopens.
6881 export_dynamic_flag_spec
="\${wl}--export-dynamic"
6883 # Compiler flag to generate shared objects directly from archives.
6884 whole_archive_flag_spec
="\${wl}--whole-archive\$convenience \${wl}--no-whole-archive"
6886 # Compiler flag to generate thread-safe objects.
6887 thread_safe_flag_spec
=""
6889 # Library versioning type.
6890 version_type
=windows
6892 # Format of library name prefix.
6893 libname_spec
="lib\$name"
6895 # List of archive names. First name is the real one, the rest are links.
6896 # The last name is the one that the linker finds with -lNAME.
6897 library_names_spec
="\$libname.dll.a"
6899 # The coded name of the library, if different from the real name.
6900 soname_spec
="\${libname}\`echo \${release} | \$SED -e s/[.]/-/g\`\${versuffix}\${shared_ext}"
6902 # Commands used to build and install an old-style archive.
6903 RANLIB
="i386-mingw32msvc-ranlib"
6904 old_archive_cmds
="\$AR \$AR_FLAGS \$oldlib\$oldobjs\$old_deplibs~\$RANLIB \$oldlib"
6905 old_postinstall_cmds
="\$RANLIB \$oldlib~chmod 644 \$oldlib"
6906 old_postuninstall_cmds
=""
6908 # Create an old-style archive from a shared archive.
6909 old_archive_from_new_cmds
=""
6911 # Create a temporary old-style archive to link instead of a shared archive.
6912 old_archive_from_expsyms_cmds
=""
6914 # Commands used to build and install a shared archive.
6915 archive_cmds
="\$CC -shared -nostdlib \$predep_objects \$libobjs \$deplibs \$postdep_objects \$compiler_flags -o \$output_objdir/\$soname \${wl}--image-base=0x10000000 \${wl}--out-implib,\$lib"
6916 archive_expsym_cmds
="if test \\\"x\\\`\$SED 1q \$export_symbols\\\`\\\" = xEXPORTS; then
6917 cp \$export_symbols \$output_objdir/\$soname.def;
6919 echo EXPORTS > \$output_objdir/\$soname.def;
6920 cat \$export_symbols >> \$output_objdir/\$soname.def;
6922 \$CC -shared -nostdlib \$output_objdir/\$soname.def \$predep_objects \$libobjs \$deplibs \$postdep_objects \$compiler_flags -o \$output_objdir/\$soname \${wl}--image-base=0x10000000 \${wl}--out-implib,\$lib"
6923 postinstall_cmds
="base_file=\\\`basename \\\${file}\\\`~
6924 dlpath=\\\`\$SHELL 2>&1 -c '. \$dir/'\\\${base_file}'i;echo \\\$dlname'\\\`~
6925 dldir=\$destdir/\\\`dirname \\\$dlpath\\\`~
6926 test -d \\\$dldir || mkdir -p \\\$dldir~
6927 \$install_prog \$dir/\$dlname \\\$dldir/\$dlname"
6928 postuninstall_cmds
="dldll=\\\`\$SHELL 2>&1 -c '. \$file; echo \\\$dlname'\\\`~
6929 dlpath=\$dir/\\\$dldll~
6932 # Commands used to build a loadable module (assumed same as above if empty)
6934 module_expsym_cmds
=""
6936 # Commands to strip libraries.
6937 old_striplib
="i386-mingw32msvc-strip --strip-debug"
6938 striplib
="i386-mingw32msvc-strip --strip-unneeded"
6940 # Dependencies to place before the objects being linked to create a
6942 predep_objects
="/usr/misc/torrents/mingw/cross-tools/bin/../lib/gcc-lib/i386-mingw32msvc/3.2.3/../../../../i386-mingw32msvc/lib/dllcrt2.o /usr/misc/torrents/mingw/cross-tools/bin/../lib/gcc-lib/i386-mingw32msvc/3.2.3/crtbegin.o"
6944 # Dependencies to place after the objects being linked to create a
6946 postdep_objects
="/usr/misc/torrents/mingw/cross-tools/bin/../lib/gcc-lib/i386-mingw32msvc/3.2.3/crtend.o"
6948 # Dependencies to place before the objects being linked to create a
6952 # Dependencies to place after the objects being linked to create a
6954 postdeps
="-lstdc++ -lmingw32 -lgcc -lmoldname -lmingwex -lmsvcrt -luser32 -lkernel32 -ladvapi32 -lshell32 -lmingw32 -lgcc -lmoldname -lmingwex -lmsvcrt"
6956 # The library search path used internally by the compiler when linking
6958 compiler_lib_search_path
="-L/usr/misc/torrents/mingw/cross-tools/bin/../lib/gcc-lib/i386-mingw32msvc/3.2.3 -L/usr/misc/torrents/mingw/cross-tools/bin/../lib/gcc-lib -L/usr/misc/torrents/mingw/cross-tools/bin/../lib/gcc-lib/i386-mingw32msvc/3.2.3/../../../../i386-mingw32msvc/lib -L/usr/misc/torrents/mingw/cross-tools/bin/../lib/gcc-lib/i386-mingw32msvc/3.2.3/../../.."
6960 # Method to check whether dependent libraries are shared objects.
6961 deplibs_check_method
="file_magic file format pei*-i386(.*architecture: i386)?"
6963 # Command to use when deplibs_check_method == file_magic.
6964 file_magic_cmd
="\$OBJDUMP -f"
6966 # Flag that allows shared libraries with undefined symbols to be built.
6967 allow_undefined_flag
="unsupported"
6969 # Flag that forces no undefined symbols.
6970 no_undefined_flag
=""
6972 # Commands used to finish a libtool library installation in a directory.
6975 # Same as above, but a single script fragment to be evaled but not shown.
6978 # Take the output of nm and produce a listing of raw symbols and C names.
6979 global_symbol_pipe
="sed -n -e 's/^.*[ ]\\([ABCDGIRSTW][ABCDGIRSTW]*\\)[ ][ ]*\\(_\\)\\([_A-Za-z][_A-Za-z0-9]*\\)\$/\\1 \\2\\3 \\3/p'"
6981 # Transform the output of nm in a proper C declaration
6982 global_symbol_to_cdecl
="sed -n -e 's/^. .* \\(.*\\)\$/extern int \\1;/p'"
6984 # Transform the output of nm in a C name address pair
6985 global_symbol_to_c_name_address
="sed -n -e 's/^: \\([^ ]*\\) \$/ {\\\"\\1\\\", (lt_ptr) 0},/p' -e 's/^[BCDEGRST] \\([^ ]*\\) \\([^ ]*\\)\$/ {\"\\2\", (lt_ptr) \\&\\2},/p'"
6987 # This is the shared library runtime path variable.
6988 runpath_var
=LD_RUN_PATH
6990 # This is the shared library path variable.
6993 # Is shlibpath searched before the hard-coded library search path?
6994 shlibpath_overrides_runpath
=yes
6996 # How to hardcode a shared library path into an executable.
6997 hardcode_action
=immediate
6999 # Whether we should hardcode library paths into libraries.
7000 hardcode_into_libs
=no
7002 # Flag to hardcode $libdir into a binary during linking.
7003 # This must work even if $libdir does not exist.
7004 hardcode_libdir_flag_spec
="-L\$libdir"
7006 # If ld is used when linking, flag to hardcode $libdir into
7007 # a binary during linking. This must work even if $libdir does
7009 hardcode_libdir_flag_spec_ld
=""
7011 # Whether we need a single -rpath flag with a separated argument.
7012 hardcode_libdir_separator
=""
7014 # Set to yes if using DIR/libNAME during linking hardcodes DIR into the
7018 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
7022 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
7023 # the resulting binary.
7024 hardcode_shlibpath_var
=
7026 # Set to yes if building a shared library automatically hardcodes DIR into the library
7027 # and all subsequent libraries and executables linked against it.
7028 hardcode_automatic
=no
7030 # Variables whose values should be saved in libtool wrapper scripts and
7031 # restored at relink time.
7032 variables_saved_for_relink
="PATH PATH LD_RUN_PATH GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
7034 # Whether libtool must link a program against all its dependency libraries.
7035 link_all_deplibs
=unknown
7037 # Compile-time system search path for libraries
7038 sys_lib_search_path_spec
=" /usr/misc/torrents/mingw/cross-tools/bin/../lib/gcc-lib/i386-mingw32msvc/3.2.3/ /usr/misc/torrents/mingw/cross-tools/bin/../lib/gcc-lib/ /usr/local/cross-tools/lib/gcc-lib/i386-mingw32msvc/3.2.3/ /usr/lib/gcc/i386-mingw32msvc/3.2.3/ /usr/misc/torrents/mingw/cross-tools/bin/../lib/gcc-lib/i386-mingw32msvc/3.2.3/../../../../i386-mingw32msvc/lib/i386-mingw32msvc/3.2.3/ /usr/misc/torrents/mingw/cross-tools/bin/../lib/gcc-lib/i386-mingw32msvc/3.2.3/../../../../i386-mingw32msvc/lib/ /usr/local/cross-tools/lib/gcc-lib/i386-mingw32msvc/3.2.3/../../../../i386-mingw32msvc/lib/i386-mingw32msvc/3.2.3/ /usr/local/cross-tools/lib/gcc-lib/i386-mingw32msvc/3.2.3/../../../../i386-mingw32msvc/lib/ /usr/misc/torrents/mingw/cross-tools/bin/../lib/gcc-lib/i386-mingw32msvc/3.2.3/../../../i386-mingw32msvc/3.2.3/ /usr/misc/torrents/mingw/cross-tools/bin/../lib/gcc-lib/i386-mingw32msvc/3.2.3/../../../"
7040 # Run-time system search path for libraries
7041 sys_lib_dlsearch_path_spec
="/lib /usr/lib"
7043 # Fix the shell variable $srcfile for the compiler.
7046 # Set to yes if exported symbols are required.
7047 always_export_symbols
=no
7049 # The commands to list exported symbols.
7050 export_symbols_cmds
="\$NM \$libobjs \$convenience | \$global_symbol_pipe | \$SED -e '/^[BCDGS] /s/.* \\\\([^ ]*\\\\)/\\\\1 DATA/' | \$SED -e '/^[AITW] /s/.* //' | sort | uniq > \$export_symbols"
7052 # The commands to extract the exported symbol list from a shared archive.
7053 extract_expsyms_cmds
=""
7055 # Symbols that should not be listed in the preloaded symbols.
7058 # Symbols that must always be exported.
7061 # ### END LIBTOOL TAG CONFIG: CXX