3 # libtoolT - Provide generalized library-building support services.
4 # Generated automatically by (GNU idesk 0.6.2)
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
="/bin/sed -e s/^X//"
38 # The HP-UX ksh and POSIX shell print the target directory to stdout
40 if test "X${CDPATH+set}" = Xset
; then CDPATH
=:; export CDPATH
; fi
42 # The names of the tagged configurations supported by this script.
45 # ### BEGIN LIBTOOL CONFIG
47 # Libtool was configured on host carpe-diem:
49 # Shell to use when invoking shell scripts.
52 # Whether or not to build shared libraries.
53 build_libtool_libs
=yes
55 # Whether or not to build static libraries.
58 # Whether or not to add -lc for building shared libraries.
59 build_libtool_need_lc
=no
61 # Whether or not to disallow shared libs when runtime libs are static
62 allow_libtool_libs_with_static_runtimes
=no
64 # Whether or not to optimize for fast installation.
69 host=i686-pc-linux-gnu
71 # An echo program that does not interpret backslashes.
81 # A language-specific compiler.
84 # Is the compiler the GNU C compiler?
90 # The linker used to build libraries.
93 # Whether we need hard or soft links.
96 # A BSD-compatible nm program.
99 # A symbol stripping program
102 # Used to examine libraries when file_magic_cmd begins "file"
105 # Used on cygwin: DLL creation program.
108 # Used on cygwin: object dumper.
111 # Used on cygwin: assembler.
114 # The name of the directory that contains temporary libtool files.
117 # How to create reloadable object files.
119 reload_cmds
="\$LD\$reload_flag -o \$output\$reload_objs"
121 # How to pass a linker flag through the compiler.
124 # Object file suffix (normally "o").
127 # Old archive suffix (normally "a").
130 # Shared library suffix (normally ".so").
133 # Executable file suffix (normally "").
136 # Additional compiler flags for building library objects.
137 pic_flag
=" -fPIC -DPIC"
140 # What is the maximum length of a command?
143 # Does compiler simultaneously support -c and -o options?
146 # Must we lock files when doing compilation ?
149 # Do we need the lib prefix for modules?
152 # Do we need a version for libraries?
155 # Whether dlopen is supported.
156 dlopen_support
=unknown
158 # Whether dlopen of programs is supported.
161 # Whether dlopen of statically linked programs is supported.
162 dlopen_self_static
=unknown
164 # Compiler flag to prevent dynamic linking.
165 link_static_flag
="-static"
167 # Compiler flag to turn off builtin functions.
168 no_builtin_flag
=" -fno-builtin -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}\${release}\${shared_ext}\$versuffix \${libname}\${release}\${shared_ext}\$major \$libname\${shared_ext}"
189 # The coded name of the library, if different from the real name.
190 soname_spec
="\${libname}\${release}\${shared_ext}\$major"
192 # Commands used to build and install an old-style archive.
194 old_archive_cmds
="\$AR \$AR_FLAGS \$oldlib\$oldobjs\$old_deplibs~\$RANLIB \$oldlib"
195 old_postinstall_cmds
="\$RANLIB \$oldlib~chmod 644 \$oldlib"
196 old_postuninstall_cmds
=""
198 # Create an old-style archive from a shared archive.
199 old_archive_from_new_cmds
=""
201 # Create a temporary old-style archive to link instead of a shared archive.
202 old_archive_from_expsyms_cmds
=""
204 # Commands used to build and install a shared archive.
205 archive_cmds
="\$CC -shared \$libobjs \$deplibs \$compiler_flags \${wl}-soname \$wl\$soname -o \$lib"
206 archive_expsym_cmds
="\$echo \\\"{ global:\\\" > \$output_objdir/\$libname.ver~
207 cat \$export_symbols | sed -e \\\"s/\\\\(.*\\\\)/\\\\1;/\\\" >> \$output_objdir/\$libname.ver~
208 \$echo \\\"local: *; };\\\" >> \$output_objdir/\$libname.ver~
209 \$CC -shared \$libobjs \$deplibs \$compiler_flags \${wl}-soname \$wl\$soname \${wl}-version-script \${wl}\$output_objdir/\$libname.ver -o \$lib"
211 postuninstall_cmds
=""
213 # Commands used to build a loadable module (assumed same as above if empty)
215 module_expsym_cmds
=""
217 # Commands to strip libraries.
218 old_striplib
="strip --strip-debug"
219 striplib
="strip --strip-unneeded"
221 # Dependencies to place before the objects being linked to create a
225 # Dependencies to place after the objects being linked to create a
229 # Dependencies to place before the objects being linked to create a
233 # Dependencies to place after the objects being linked to create a
237 # The library search path used internally by the compiler when linking
239 compiler_lib_search_path
=""
241 # Method to check whether dependent libraries are shared objects.
242 deplibs_check_method
="pass_all"
244 # Command to use when deplibs_check_method == file_magic.
245 file_magic_cmd
="\$MAGIC_CMD"
247 # Flag that allows shared libraries with undefined symbols to be built.
248 allow_undefined_flag
=""
250 # Flag that forces no undefined symbols.
253 # Commands used to finish a libtool library installation in a directory.
254 finish_cmds
="PATH=\\\"\\\$PATH:/sbin\\\" ldconfig -n \$libdir"
256 # Same as above, but a single script fragment to be evaled but not shown.
259 # Take the output of nm and produce a listing of raw symbols and C names.
260 global_symbol_pipe
="sed -n -e 's/^.*[ ]\\([ABCDGIRSTW][ABCDGIRSTW]*\\)[ ][ ]*\\(\\)\\([_A-Za-z][_A-Za-z0-9]*\\)\$/\\1 \\2\\3 \\3/p'"
262 # Transform the output of nm in a proper C declaration
263 global_symbol_to_cdecl
="sed -n -e 's/^. .* \\(.*\\)\$/extern int \\1;/p'"
265 # Transform the output of nm in a C name address pair
266 global_symbol_to_c_name_address
="sed -n -e 's/^: \\([^ ]*\\) \$/ {\\\"\\1\\\", (lt_ptr) 0},/p' -e 's/^[BCDEGRST] \\([^ ]*\\) \\([^ ]*\\)\$/ {\"\\2\", (lt_ptr) \\&\\2},/p'"
268 # This is the shared library runtime path variable.
269 runpath_var
=LD_RUN_PATH
271 # This is the shared library path variable.
272 shlibpath_var
=LD_LIBRARY_PATH
274 # Is shlibpath searched before the hard-coded library search path?
275 shlibpath_overrides_runpath
=no
277 # How to hardcode a shared library path into an executable.
278 hardcode_action
=immediate
280 # Whether we should hardcode library paths into libraries.
281 hardcode_into_libs
=yes
283 # Flag to hardcode $libdir into a binary during linking.
284 # This must work even if $libdir does not exist.
285 hardcode_libdir_flag_spec
="\${wl}--rpath \${wl}\$libdir"
287 # If ld is used when linking, flag to hardcode $libdir into
288 # a binary during linking. This must work even if $libdir does
290 hardcode_libdir_flag_spec_ld
=""
292 # Whether we need a single -rpath flag with a separated argument.
293 hardcode_libdir_separator
=""
295 # Set to yes if using DIR/libNAME during linking hardcodes DIR into the
299 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
303 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
304 # the resulting binary.
305 hardcode_shlibpath_var
=unsupported
307 # Set to yes if building a shared library automatically hardcodes DIR into the library
308 # and all subsequent libraries and executables linked against it.
309 hardcode_automatic
=no
311 # Variables whose values should be saved in libtool wrapper scripts and
312 # restored at relink time.
313 variables_saved_for_relink
="PATH LD_RUN_PATH GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
315 # Whether libtool must link a program against all its dependency libraries.
316 link_all_deplibs
=unknown
318 # Compile-time system search path for libraries
319 sys_lib_search_path_spec
=" /usr/lib/gcc-lib/i386-linux/3.2.3/ /usr/lib/gcc/i386-linux/3.2.3/ /usr/lib/gcc-lib/i386-linux/3.2.3/../../../../i386-linux/lib/i386-linux/3.2.3/ /usr/lib/gcc-lib/i386-linux/3.2.3/../../../../i386-linux/lib/ /usr/lib/gcc-lib/i386-linux/3.2.3/../../../i386-linux/3.2.3/ /usr/lib/gcc-lib/i386-linux/3.2.3/../../../ /lib/i386-linux/3.2.3/ /lib/ /usr/lib/i386-linux/3.2.3/ /usr/lib/"
321 # Run-time system search path for libraries
322 sys_lib_dlsearch_path_spec
="/lib /usr/lib /lib
325 /usr/i486-linuxlibc1/lib
328 # Fix the shell variable $srcfile for the compiler.
331 # Set to yes if exported symbols are required.
332 always_export_symbols
=no
334 # The commands to list exported symbols.
335 export_symbols_cmds
="\$NM \$libobjs \$convenience | \$global_symbol_pipe | \$SED 's/.* //' | sort | uniq > \$export_symbols"
337 # The commands to extract the exported symbol list from a shared archive.
338 extract_expsyms_cmds
=""
340 # Symbols that should not be listed in the preloaded symbols.
341 exclude_expsyms
="_GLOBAL_OFFSET_TABLE_"
343 # Symbols that must always be exported.
346 # ### END LIBTOOL CONFIG
348 # ltmain.sh - Provide generalized library-building support services.
349 # NOTE: Changing this file will not affect anything until you rerun configure.
351 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003
352 # Free Software Foundation, Inc.
353 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
355 # This program is free software; you can redistribute it and/or modify
356 # it under the terms of the GNU General Public License as published by
357 # the Free Software Foundation; either version 2 of the License, or
358 # (at your option) any later version.
360 # This program is distributed in the hope that it will be useful, but
361 # WITHOUT ANY WARRANTY; without even the implied warranty of
362 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
363 # General Public License for more details.
365 # You should have received a copy of the GNU General Public License
366 # along with this program; if not, write to the Free Software
367 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
369 # As a special exception to the GNU General Public License, if you
370 # distribute this file as part of a program that contains a
371 # configuration script generated by Autoconf, you may include it under
372 # the same distribution terms that you use for the rest of that program.
374 # Check that we have a working $echo.
375 if test "X$1" = X--no-reexec
; then
376 # Discard the --no-reexec flag, and continue.
378 elif test "X$1" = X--fallback-echo
; then
379 # Avoid inline document here, it may be left over
381 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
382 # Yippee, $echo works!
385 # Restart under the correct shell, and then maybe $echo will work.
386 exec $SHELL "$0" --no-reexec ${1+"$@"}
389 if test "X$1" = X--fallback-echo
; then
390 # used as fallback echo
398 # The name of this program.
399 progname
=`$echo "$0" | ${SED} 's%^.*/%%'`
406 TIMESTAMP
=" (1.1220.2.35 2003/11/12 18:51:58) Debian$Rev: 179 $"
409 help="Try \`$progname --help' for more information."
410 magic
="%%%MAGIC variable%%%"
415 # Sed substitution that helps us do robust quoting. It backslashifies
416 # metacharacters that are still active within double-quoted strings.
417 Xsed
="${SED}"' -e 1s/^X//'
418 sed_quote_subst
='s/\([\\`\\"$\\\\]\)/\\\1/g'
419 # test EBCDIC or ASCII
420 case `echo A|tr A '\301'` in
421 A
) # EBCDIC based system
422 SP2NL
="tr '\100' '\n'"
423 NL2SP
="tr '\r\n' '\100\100'"
425 *) # Assume ASCII based system
426 SP2NL
="tr '\040' '\012'"
427 NL2SP
="tr '\015\012' '\040\040'"
432 # Only set LANG and LC_ALL to C if already set.
433 # These must not be set unconditionally because not all systems understand
434 # e.g. LANG=C (notably SCO).
435 # We save the old values to restore during execute mode.
436 if test "${LC_ALL+set}" = set; then
437 save_LC_ALL
="$LC_ALL"; LC_ALL
=C
; export LC_ALL
439 if test "${LANG+set}" = set; then
440 save_LANG
="$LANG"; LANG
=C
; export LANG
443 # Make sure IFS has a sensible default
447 if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
448 $echo "$modename: not configured to build any kind of library" 1>&2
449 $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
462 lo2o
="s/\\.lo\$/.${objext}/"
463 o2lo
="s/\\.${objext}\$/.lo/"
465 #####################################
466 # Shell function definitions:
467 # This seems to be the best place for them
469 # Need a lot of goo to handle *both* DLLs and import libs
470 # Has to be a shell function in order to 'eat' the argument
471 # that is supplied when $file_magic_command is called.
473 win32_libid_type
="unknown"
474 win32_fileres
=`file -L $1 2>/dev/null`
475 case $win32_fileres in
476 *ar\ archive\ import\ library
*) # definitely import
477 win32_libid_type
="x86 archive import"
479 *ar\ archive
*) # could be an import, or static
480 if eval $OBJDUMP -f $1 |
$SED -e '10q' 2>/dev
/null | \
481 grep -E 'file format pe-i386(.*architecture: i386)?' >/dev
/null
; then
482 win32_nmres
=`eval $NM -f posix -A $1 | \
483 sed -n -e '1,100{/ I /{x;/import/!{s/^/import/;h;p;};x;};}'`
484 if test "X$win32_nmres" = "Ximport" ; then
485 win32_libid_type
="x86 archive import"
487 win32_libid_type
="x86 archive static"
492 win32_libid_type
="x86 DLL"
494 *executable
*) # but shell scripts are "executable" too...
495 case $win32_fileres in
496 *MS\ Windows\ PE\ Intel
*)
497 win32_libid_type
="x86 DLL"
502 $echo $win32_libid_type
505 # End of Shell function definitions
506 #####################################
508 # Parse our command line options once, thoroughly.
509 while test "$#" -gt 0
515 -*=*) optarg
=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;;
519 # If the previous option needs an argument, assign it.
520 if test -n "$prev"; then
523 execute_dlfiles
="$execute_dlfiles $arg"
527 preserve_args
="${preserve_args}=$arg"
529 # Check whether tagname contains only valid characters
532 $echo "$progname: invalid tag name: $tagname" 1>&2
539 # Don't test for the "default" C tag, as we know, it's there, but
540 # not specially marked.
543 if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$0" > /dev
/null
; then
544 taglist
="$taglist $tagname"
545 # Evaluate the configuration.
546 eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^# ### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $0`"
548 $echo "$progname: ignoring unknown tag $tagname" 1>&2
563 # Have we seen a non-optional argument yet?
570 $echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP"
572 $echo "Copyright (C) 2003 Free Software Foundation, Inc."
573 $echo "This is free software; see the source for copying conditions. There is NO"
574 $echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
579 ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $0
580 # Now print the configurations for the tags.
581 for tagname
in $taglist; do
582 ${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$0"
588 $echo "$progname: enabling shell trace mode"
590 preserve_args
="$preserve_args $arg"
599 if test "$build_libtool_libs" = yes; then
600 $echo "enable shared libraries"
602 $echo "disable shared libraries"
604 if test "$build_old_libs" = yes; then
605 $echo "enable static libraries"
607 $echo "disable static libraries"
612 --finish) mode
="finish" ;;
614 --mode) prevopt
="--mode" prev
=mode
;;
615 --mode=*) mode
="$optarg" ;;
617 --preserve-dup-deps) duplicate_deps
="yes" ;;
621 preserve_args
="$preserve_args $arg"
624 --tag) prevopt
="--tag" prev
=tag
;;
626 set tag
"$optarg" ${1+"$@"}
629 preserve_args
="$preserve_args --tag"
638 $echo "$modename: unrecognized option \`$arg'" 1>&2
650 if test -n "$prevopt"; then
651 $echo "$modename: option \`$prevopt' requires an argument" 1>&2
656 # If this variable is set in any of the actions, the command in it
657 # will be execed at the end. This prevents here-documents from being
658 # left over by shells.
661 if test -z "$show_help"; then
663 # Infer the operation mode.
664 if test -z "$mode"; then
665 $echo "*** Warning: inferring the mode of operation is deprecated." 1>&2
666 $echo "*** Future versions of Libtool will require -mode=MODE be specified." 1>&2
668 *cc | cc
* |
*++ | gcc
* |
*-gcc* | g
++* | xlc
*)
680 *db |
*dbx |
*strace |
*truss
)
690 # If we have no mode, but dlfiles were specified, then do execute mode.
691 test -n "$execute_dlfiles" && mode
=execute
693 # Just use the default operation mode.
694 if test -z "$mode"; then
695 if test -n "$nonopt"; then
696 $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2
698 $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2
705 # Only execute mode is allowed to have -dlopen flags.
706 if test -n "$execute_dlfiles" && test "$mode" != execute
; then
707 $echo "$modename: unrecognized option \`-dlopen'" 1>&2
712 # Change the help message to a mode-specific one.
714 help="Try \`$modename --help --mode=$mode' for more information."
716 # These modes are in order of execution frequency so that they run quickly.
718 # libtool compile mode
720 modename
="$modename: compile"
721 # Get the compilation command and the source file.
723 srcfile
="$nonopt" # always keep a non-empty value in "srcfile"
734 # do not "continue". Instead, add this to base_compile
746 # Accept any command-line options.
749 if test -n "$libobj" ; then
750 $echo "$modename: you cannot specify \`-o' more than once" 1>&2
757 -static |
-prefer-pic |
-prefer-non-pic)
768 arg_mode
=arg
# the next one goes into the "base_compile" arg list
769 continue # The current "srcfile" will either be retained or
770 ;; # replaced later. I would guess that would be a bug.
773 args
=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"`
775 save_ifs
="$IFS"; IFS
=','
779 # Double-quote args containing other shell metacharacters.
780 # Many Bourne shells cannot handle close brackets correctly
781 # in scan sets, so we specify it separately.
783 *[\
[\~\
#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
787 lastarg
="$lastarg $arg"
790 lastarg
=`$echo "X$lastarg" | $Xsed -e "s/^ //"`
792 # Add the arguments to base_compile.
793 base_compile
="$base_compile $lastarg"
798 # Accept the current argument as the source file.
799 # The previous "srcfile" becomes the current argument.
806 esac # case $arg_mode
808 # Aesthetically quote the previous argument.
809 lastarg
=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"`
812 # Double-quote args containing other shell metacharacters.
813 # Many Bourne shells cannot handle close brackets correctly
814 # in scan sets, so we specify it separately.
815 *[\
[\~\
#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
816 lastarg
="\"$lastarg\""
820 base_compile
="$base_compile $lastarg"
825 $echo "$modename: you must specify an argument for -Xcompile"
829 $echo "$modename: you must specify a target with \`-o'" 1>&2
833 # Get the name of the library object.
834 [ -z "$libobj" ] && libobj
=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'`
838 # Recognize several different file suffixes.
839 # If the user specifies -o file.o, it is replaced with file.lo
849 *.class
) xform
=class
;;
854 *.java
) xform
=java
;;
857 libobj
=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"`
860 *.lo
) obj
=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;;
862 $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2
867 # Infer tagged configuration to use if any are available and
868 # if one wasn't chosen via the "--tag" command line option.
869 # Only attempt this if the compiler in the base compile
870 # command doesn't match the default compiler.
871 if test -n "$available_tags" && test -z "$tagname"; then
872 case $base_compile in
873 # Blanks in the command may have been stripped by the calling shell,
874 # but not from the CC environment variable when configure was run.
875 " $CC "* |
"$CC "* |
" `$echo $CC` "* |
"`$echo $CC` "*) ;;
876 # Blanks at the start of $base_compile will cause this to fail
877 # if we don't check for them as well.
879 for z
in $available_tags; do
880 if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$0" > /dev
/null
; then
881 # Evaluate the configuration.
882 eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $0`"
883 case "$base_compile " in
884 "$CC "* |
" $CC "* |
"`$echo $CC` "* |
" `$echo $CC` "*)
885 # The compiler in the base compile command matches
886 # the one in the tagged configuration.
887 # Assume this is the tagged configuration we want.
894 # If $tagname still isn't set, then no tagged configuration
895 # was found and let the user know that the "--tag" command
896 # line option must be used.
897 if test -z "$tagname"; then
898 $echo "$modename: unable to infer tagged configuration"
899 $echo "$modename: specify a tag with \`--tag'" 1>&2
902 # $echo "$modename: using $tagname tagged configuration"
908 for arg
in $later; do
927 objname
=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
928 xdir
=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'`
929 if test "X$xdir" = "X$obj"; then
934 lobj
=${xdir}$objdir/$objname
936 if test -z "$base_compile"; then
937 $echo "$modename: you must specify a compilation command" 1>&2
942 # Delete any leftover library objects.
943 if test "$build_old_libs" = yes; then
944 removelist
="$obj $lobj $libobj ${libobj}T"
946 removelist
="$lobj $libobj ${libobj}T"
950 trap "$run $rm $removelist; exit 1" 1 2 15
952 # On Cygwin there's no "real" PIC flag so we must build both object types
954 cygwin
* | mingw
* | pw32
* | os2
*)
958 if test "$pic_mode" = no
&& test "$deplibs_check_method" != pass_all
; then
959 # non-PIC code in shared libraries is not supported
963 # Calculate the filename of the output object if compiler does
964 # not support -o with -c
965 if test "$compiler_c_o" = no
; then
966 output_obj
=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.
${objext}
967 lockfile
="$output_obj.lock"
968 removelist
="$removelist $output_obj $lockfile"
969 trap "$run $rm $removelist; exit 1" 1 2 15
976 # Lock this critical section if it is needed
977 # We use this script file to make the link, it avoids creating a new file
978 if test "$need_locks" = yes; then
979 until $run ln "$0" "$lockfile" 2>/dev
/null
; do
980 $show "Waiting for $lockfile to be removed"
983 elif test "$need_locks" = warn
; then
984 if test -f "$lockfile"; then
986 *** ERROR, $lockfile exists and contains:
987 `cat $lockfile 2>/dev/null`
989 This indicates that another process is trying to use the same
990 temporary object file, and libtool could not work around it because
991 your compiler does not support \`-c' and \`-o' together. If you
992 repeat this compilation, it may succeed, by chance, but you had better
993 avoid parallel builds (make -j) in this platform, or get a better
999 $echo $srcfile > "$lockfile"
1002 if test -n "$fix_srcfile_path"; then
1003 eval srcfile
=\"$fix_srcfile_path\"
1006 $run $rm "$libobj" "${libobj}T"
1008 # Create a libtool object file (analogous to a ".la" file),
1009 # but don't create it if we're doing a dry run.
1010 test -z "$run" && cat > ${libobj}T
<<EOF
1011 # $libobj - a libtool object file
1012 # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
1014 # Please DO NOT delete this file!
1015 # It is necessary for linking the library.
1017 # Name of the PIC object.
1020 # Only build a PIC object if we are building libtool libraries.
1021 if test "$build_libtool_libs" = yes; then
1022 # Without this assignment, base_compile gets emptied.
1023 fbsd_hideous_sh_bug
=$base_compile
1025 if test "$pic_mode" != no
; then
1026 command="$base_compile $srcfile $pic_flag"
1028 # Don't build PIC code
1029 command="$base_compile $srcfile"
1032 if test ! -d "${xdir}$objdir"; then
1033 $show "$mkdir ${xdir}$objdir"
1034 $run $mkdir ${xdir}$objdir
1036 if test "$status" -ne 0 && test ! -d "${xdir}$objdir"; then
1041 if test -z "$output_obj"; then
1042 # Place PIC objects in $objdir
1043 command="$command -o $lobj"
1046 $run $rm "$lobj" "$output_obj"
1049 if $run eval "$command"; then :
1051 test -n "$output_obj" && $run $rm $removelist
1055 if test "$need_locks" = warn
&&
1056 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
1058 *** ERROR, $lockfile contains:
1059 `cat $lockfile 2>/dev/null`
1061 but it should contain:
1064 This indicates that another process is trying to use the same
1065 temporary object file, and libtool could not work around it because
1066 your compiler does not support \`-c' and \`-o' together. If you
1067 repeat this compilation, it may succeed, by chance, but you had better
1068 avoid parallel builds (make -j) in this platform, or get a better
1071 $run $rm $removelist
1075 # Just move the object if needed, then go on to compile the next one
1076 if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then
1077 $show "$mv $output_obj $lobj"
1078 if $run $mv $output_obj $lobj; then :
1081 $run $rm $removelist
1086 # Append the name of the PIC object to the libtool object file.
1087 test -z "$run" && cat >> ${libobj}T
<<EOF
1088 pic_object='$objdir/$objname'
1092 # Allow error messages only from the first compilation.
1093 if test "$suppress_opt" = yes; then
1094 suppress_output
=' >/dev/null 2>&1'
1097 # No PIC object so indicate it doesn't exist in the libtool
1099 test -z "$run" && cat >> ${libobj}T
<<EOF
1105 # Only build a position-dependent object if we build old libraries.
1106 if test "$build_old_libs" = yes; then
1107 if test "$pic_mode" != yes; then
1108 # Don't build PIC code
1109 command="$base_compile $srcfile"
1111 command="$base_compile $srcfile $pic_flag"
1113 if test "$compiler_c_o" = yes; then
1114 command="$command -o $obj"
1117 # Suppress compiler output if we already did a PIC compilation.
1118 command="$command$suppress_output"
1119 $run $rm "$obj" "$output_obj"
1121 if $run eval "$command"; then :
1123 $run $rm $removelist
1127 if test "$need_locks" = warn
&&
1128 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
1130 *** ERROR, $lockfile contains:
1131 `cat $lockfile 2>/dev/null`
1133 but it should contain:
1136 This indicates that another process is trying to use the same
1137 temporary object file, and libtool could not work around it because
1138 your compiler does not support \`-c' and \`-o' together. If you
1139 repeat this compilation, it may succeed, by chance, but you had better
1140 avoid parallel builds (make -j) in this platform, or get a better
1143 $run $rm $removelist
1147 # Just move the object if needed
1148 if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then
1149 $show "$mv $output_obj $obj"
1150 if $run $mv $output_obj $obj; then :
1153 $run $rm $removelist
1158 # Append the name of the non-PIC object the libtool object file.
1159 # Only append if the libtool object file exists.
1160 test -z "$run" && cat >> ${libobj}T
<<EOF
1161 # Name of the non-PIC object.
1162 non_pic_object='$objname'
1166 # Append the name of the non-PIC object the libtool object file.
1167 # Only append if the libtool object file exists.
1168 test -z "$run" && cat >> ${libobj}T
<<EOF
1169 # Name of the non-PIC object.
1175 $run $mv "${libobj}T" "${libobj}"
1177 # Unlock the critical section if it was locked
1178 if test "$need_locks" != no
; then
1179 $run $rm "$lockfile"
1187 modename
="$modename: link"
1189 *-*-cygwin* |
*-*-mingw* |
*-*-pw32* |
*-*-os2*)
1190 # It is impossible to link a dll without this setting, and
1191 # we shouldn't force the makefile maintainer to figure out
1192 # which system we are compiling for in order to pass an extra
1193 # flag for every libtool invocation.
1194 # allow_undefined=no
1196 # FIXME: Unfortunately, there are problems with the above when trying
1197 # to make a dll which has undefined symbols, in which case not
1198 # even a static library is built. For now, we need to specify
1199 # -no-undefined on the libtool link line when we can be certain
1200 # that all symbols are satisfied, otherwise we get a static library.
1207 libtool_args
="$nonopt"
1208 base_compile
="$nonopt $@"
1209 compile_command
="$nonopt"
1210 finalize_command
="$nonopt"
1223 lib_search_path
=`pwd`
1232 export_symbols_regex
=
1240 prefer_static_libs
=no
1253 # Infer tagged configuration to use if any are available and
1254 # if one wasn't chosen via the "--tag" command line option.
1255 # Only attempt this if the compiler in the base link
1256 # command doesn't match the default compiler.
1257 if test -n "$available_tags" && test -z "$tagname"; then
1258 case $base_compile in
1259 # Blanks in the command may have been stripped by the calling shell,
1260 # but not from the CC environment variable when configure was run.
1261 "$CC "* |
" $CC "* |
"`$echo $CC` "* |
" `$echo $CC` "*) ;;
1262 # Blanks at the start of $base_compile will cause this to fail
1263 # if we don't check for them as well.
1265 for z
in $available_tags; do
1266 if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$0" > /dev
/null
; then
1267 # Evaluate the configuration.
1268 eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $0`"
1269 case $base_compile in
1270 "$CC "* |
" $CC "* |
"`$echo $CC` "* |
" `$echo $CC` "*)
1271 # The compiler in $compile_command matches
1272 # the one in the tagged configuration.
1273 # Assume this is the tagged configuration we want.
1280 # If $tagname still isn't set, then no tagged configuration
1281 # was found and let the user know that the "--tag" command
1282 # line option must be used.
1283 if test -z "$tagname"; then
1284 $echo "$modename: unable to infer tagged configuration"
1285 $echo "$modename: specify a tag with \`--tag'" 1>&2
1288 # $echo "$modename: using $tagname tagged configuration"
1294 # We need to know -static, to get the right output filenames.
1298 -all-static |
-static)
1299 if test "X$arg" = "X-all-static"; then
1300 if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
1301 $echo "$modename: warning: complete static linking is impossible in this configuration" 1>&2
1303 if test -n "$link_static_flag"; then
1304 dlopen_self
=$dlopen_self_static
1307 if test -z "$pic_flag" && test -n "$link_static_flag"; then
1308 dlopen_self
=$dlopen_self_static
1311 build_libtool_libs
=no
1313 prefer_static_libs
=yes
1319 # See if our shared archives depend on static archives.
1320 test -n "$old_archive_from_new_cmds" && build_old_libs
=yes
1322 # Go through the arguments, transforming them on the way.
1323 while test "$#" -gt 0; do
1327 *[\
[\~\
#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
1328 qarg
=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test
1332 libtool_args
="$libtool_args $qarg"
1334 # If the previous option needs an argument, assign it.
1335 if test -n "$prev"; then
1338 compile_command
="$compile_command @OUTPUT@"
1339 finalize_command
="$finalize_command @OUTPUT@"
1345 if test "$preload" = no
; then
1346 # Add the symbol object into the linking commands.
1347 compile_command
="$compile_command @SYMFILE@"
1348 finalize_command
="$finalize_command @SYMFILE@"
1352 *.la |
*.lo
) ;; # We handle these cases below.
1354 if test "$dlself" = no
; then
1362 if test "$prev" = dlprefiles
; then
1364 elif test "$prev" = dlfiles
&& test "$dlopen_self" != yes; then
1374 if test "$prev" = dlfiles
; then
1375 dlfiles
="$dlfiles $arg"
1377 dlprefiles
="$dlprefiles $arg"
1385 export_symbols
="$arg"
1386 if test ! -f "$arg"; then
1387 $echo "$modename: symbol file \`$arg' does not exist"
1394 export_symbols_regex
="$arg"
1399 inst_prefix_dir
="$arg"
1409 if test -f "$arg"; then
1412 for fil
in `cat $save_arg`
1414 # moreargs="$moreargs $fil"
1416 # A libtool-controlled object.
1418 # Check to see that this really is a libtool object.
1419 if (${SED} -e '2q' $arg |
grep "^# Generated by .*$PACKAGE") >/dev
/null
2>&1; then
1424 # If there is no directory component, then add one.
1426 */* |
*\\*) .
$arg ;;
1430 if test -z "$pic_object" || \
1431 test -z "$non_pic_object" ||
1432 test "$pic_object" = none
&& \
1433 test "$non_pic_object" = none
; then
1434 $echo "$modename: cannot find name of object for \`$arg'" 1>&2
1438 # Extract subdirectory from the argument.
1439 xdir
=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
1440 if test "X$xdir" = "X$arg"; then
1446 if test "$pic_object" != none
; then
1447 # Prepend the subdirectory the object is found in.
1448 pic_object
="$xdir$pic_object"
1450 if test "$prev" = dlfiles
; then
1451 if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
1452 dlfiles
="$dlfiles $pic_object"
1456 # If libtool objects are unsupported, then we need to preload.
1461 # CHECK ME: I think I busted this. -Ossama
1462 if test "$prev" = dlprefiles
; then
1463 # Preload the old-style object.
1464 dlprefiles
="$dlprefiles $pic_object"
1469 libobjs
="$libobjs $pic_object"
1474 if test "$non_pic_object" != none
; then
1475 # Prepend the subdirectory the object is found in.
1476 non_pic_object
="$xdir$non_pic_object"
1478 # A standard non-PIC object
1479 non_pic_objects
="$non_pic_objects $non_pic_object"
1480 if test -z "$pic_object" ||
test "$pic_object" = none
; then
1481 arg
="$non_pic_object"
1485 # Only an error if not doing a dry-run.
1486 if test -z "$run"; then
1487 $echo "$modename: \`$arg' is not a valid libtool object" 1>&2
1492 # Extract subdirectory from the argument.
1493 xdir
=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
1494 if test "X$xdir" = "X$arg"; then
1500 pic_object
=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"`
1501 non_pic_object
=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"`
1502 libobjs
="$libobjs $pic_object"
1503 non_pic_objects
="$non_pic_objects $non_pic_object"
1508 $echo "$modename: link input file \`$save_arg' does not exist"
1516 # We need an absolute path.
1518 [\\/]* |
[A-Za-z
]:[\\/]*) ;;
1520 $echo "$modename: only absolute run-paths are allowed" 1>&2
1524 if test "$prev" = rpath
; then
1527 *) rpath
="$rpath $arg" ;;
1532 *) xrpath
="$xrpath $arg" ;;
1539 compiler_flags
="$compiler_flags $qarg"
1541 compile_command
="$compile_command $qarg"
1542 finalize_command
="$finalize_command $qarg"
1546 linker_flags
="$linker_flags $qarg"
1547 compiler_flags
="$compiler_flags $wl$qarg"
1549 compile_command
="$compile_command $wl$qarg"
1550 finalize_command
="$finalize_command $wl$qarg"
1554 linker_flags
="$linker_flags $qarg"
1555 compiler_flags
="$compiler_flags $qarg"
1557 compile_command
="$compile_command $qarg"
1558 finalize_command
="$finalize_command $qarg"
1562 eval "$prev=\"\$arg\""
1567 fi # test -n "$prev"
1573 if test -n "$link_static_flag"; then
1574 compile_command
="$compile_command $link_static_flag"
1575 finalize_command
="$finalize_command $link_static_flag"
1581 # FIXME: remove this flag sometime in the future.
1582 $echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2
1606 -export-symbols |
-export-symbols-regex)
1607 if test -n "$export_symbols" ||
test -n "$export_symbols_regex"; then
1608 $echo "$modename: more than one -exported-symbols argument is not allowed"
1611 if test "X$arg" = "X-export-symbols"; then
1624 # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:*
1625 # so, if we see these flags be careful not to treat them like -L
1627 case $with_gcc/$host in
1628 no
/*-*-irix* |
/*-*-irix*)
1629 compile_command
="$compile_command $arg"
1630 finalize_command
="$finalize_command $arg"
1637 dir
=`$echo "X$arg" | $Xsed -e 's/^-L//'`
1638 # We need an absolute path.
1640 [\\/]* |
[A-Za-z
]:[\\/]*) ;;
1642 absdir
=`cd "$dir" && pwd`
1643 if test -z "$absdir"; then
1644 $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2
1653 deplibs
="$deplibs -L$dir"
1654 lib_search_path
="$lib_search_path $dir"
1658 *-*-cygwin* |
*-*-mingw* |
*-*-pw32* |
*-*-os2*)
1659 case :$dllsearchpath: in
1661 *) dllsearchpath
="$dllsearchpath:$dir";;
1669 if test "X$arg" = "X-lc" ||
test "X$arg" = "X-lm"; then
1671 *-*-cygwin* |
*-*-pw32* |
*-*-beos*)
1672 # These systems don't actually have a C or math library (as such)
1675 *-*-mingw* |
*-*-os2*)
1676 # These systems don't actually have a C library (as such)
1677 test "X$arg" = "X-lc" && continue
1679 *-*-openbsd* |
*-*-freebsd*)
1680 # Do not include libc due to us having libc/libc_r.
1681 test "X$arg" = "X-lc" && continue
1683 *-*-rhapsody* |
*-*-darwin1.
[012])
1684 # Rhapsody C and math libraries are in the System framework
1685 deplibs
="$deplibs -framework System"
1688 elif test "X$arg" = "X-lc_r"; then
1690 *-*-openbsd* |
*-*-freebsd*)
1691 # Do not include libc_r directly, use -pthread flag.
1696 deplibs
="$deplibs $arg"
1700 -mt|
-mthreads|
-kthread|
-Kthread|
-pthread|
-pthreads|
--thread-safe)
1701 deplibs
="$deplibs $arg"
1710 # gcc -m* arguments should be passed to the linker via $compiler_flags
1711 # in order to pass architecture information to the linker
1712 # (e.g. 32 vs 64-bit). This may also be accomplished via -Wl,-mfoo
1713 # but this is not reliable with gcc because gcc may use -mfoo to
1714 # select a different linker, different libraries, etc, while
1715 # -Wl,-mfoo simply passes -mfoo to the linker.
1717 # Unknown arguments in both finalize_command and compile_command need
1718 # to be aesthetically quoted because they are evaled later.
1719 arg
=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
1721 *[\
[\~\
#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
1725 compile_command
="$compile_command $arg"
1726 finalize_command
="$finalize_command $arg"
1727 if test "$with_gcc" = "yes" ; then
1728 compiler_flags
="$compiler_flags $arg"
1745 *-*-cygwin* |
*-*-mingw* |
*-*-pw32* |
*-*-os2*)
1746 # The PATH hackery in wrapper scripts is required on Windows
1747 # in order for the loader to find any dlls it needs.
1748 $echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2
1749 $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2
1752 *) no_install
=yes ;;
1785 dir
=`$echo "X$arg" | $Xsed -e 's/^-R//'`
1786 # We need an absolute path.
1788 [\\/]* |
[A-Za-z
]:[\\/]*) ;;
1790 $echo "$modename: only absolute run-paths are allowed" 1>&2
1796 *) xrpath
="$xrpath $dir" ;;
1802 # The effects of -static are defined in a previous loop.
1803 # We used to do the same as -all-static on platforms that
1804 # didn't have a PIC flag, but the assumption that the effects
1805 # would be equivalent was wrong. It would break on at least
1806 # Digital Unix and AIX.
1826 args
=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'`
1828 save_ifs
="$IFS"; IFS
=','
1829 for flag
in $args; do
1832 *[\
[\~\
#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
1837 compiler_flags
="$compiler_flags $flag"
1840 arg
=`$echo "X$arg" | $Xsed -e "s/^ //"`
1844 args
=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'`
1846 save_ifs
="$IFS"; IFS
=','
1847 for flag
in $args; do
1850 *[\
[\~\
#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
1855 compiler_flags
="$compiler_flags $wl$flag"
1856 linker_flags
="$linker_flags $flag"
1859 arg
=`$echo "X$arg" | $Xsed -e "s/^ //"`
1877 # Some other compiler flag.
1879 # Unknown arguments in both finalize_command and compile_command need
1880 # to be aesthetically quoted because they are evaled later.
1881 arg
=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
1883 *[\
[\~\
#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
1890 # A standard object.
1895 # A libtool-controlled object.
1897 # Check to see that this really is a libtool object.
1898 if (${SED} -e '2q' $arg |
grep "^# Generated by .*$PACKAGE") >/dev
/null
2>&1; then
1903 # If there is no directory component, then add one.
1905 */* |
*\\*) .
$arg ;;
1909 if test -z "$pic_object" || \
1910 test -z "$non_pic_object" ||
1911 test "$pic_object" = none
&& \
1912 test "$non_pic_object" = none
; then
1913 $echo "$modename: cannot find name of object for \`$arg'" 1>&2
1917 # Extract subdirectory from the argument.
1918 xdir
=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
1919 if test "X$xdir" = "X$arg"; then
1925 if test "$pic_object" != none
; then
1926 # Prepend the subdirectory the object is found in.
1927 pic_object
="$xdir$pic_object"
1929 if test "$prev" = dlfiles
; then
1930 if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
1931 dlfiles
="$dlfiles $pic_object"
1935 # If libtool objects are unsupported, then we need to preload.
1940 # CHECK ME: I think I busted this. -Ossama
1941 if test "$prev" = dlprefiles
; then
1942 # Preload the old-style object.
1943 dlprefiles
="$dlprefiles $pic_object"
1948 libobjs
="$libobjs $pic_object"
1953 if test "$non_pic_object" != none
; then
1954 # Prepend the subdirectory the object is found in.
1955 non_pic_object
="$xdir$non_pic_object"
1957 # A standard non-PIC object
1958 non_pic_objects
="$non_pic_objects $non_pic_object"
1959 if test -z "$pic_object" ||
test "$pic_object" = none
; then
1960 arg
="$non_pic_object"
1964 # Only an error if not doing a dry-run.
1965 if test -z "$run"; then
1966 $echo "$modename: \`$arg' is not a valid libtool object" 1>&2
1971 # Extract subdirectory from the argument.
1972 xdir
=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
1973 if test "X$xdir" = "X$arg"; then
1979 pic_object
=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"`
1980 non_pic_object
=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"`
1981 libobjs
="$libobjs $pic_object"
1982 non_pic_objects
="$non_pic_objects $non_pic_object"
1989 deplibs
="$deplibs $arg"
1990 old_deplibs
="$old_deplibs $arg"
1995 # A libtool-controlled library.
1997 if test "$prev" = dlfiles
; then
1998 # This library was specified with -dlopen.
1999 dlfiles
="$dlfiles $arg"
2001 elif test "$prev" = dlprefiles
; then
2002 # The library was specified with -dlpreopen.
2003 dlprefiles
="$dlprefiles $arg"
2006 deplibs
="$deplibs $arg"
2011 # Some other compiler argument.
2013 # Unknown arguments in both finalize_command and compile_command need
2014 # to be aesthetically quoted because they are evaled later.
2015 arg
=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
2017 *[\
[\~\
#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
2024 # Now actually substitute the argument into the commands.
2025 if test -n "$arg"; then
2026 compile_command
="$compile_command $arg"
2027 finalize_command
="$finalize_command $arg"
2029 done # argument parsing loop
2031 if test -n "$prev"; then
2032 $echo "$modename: the \`$prevarg' option requires an argument" 1>&2
2037 if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then
2038 eval arg
=\"$export_dynamic_flag_spec\"
2039 compile_command
="$compile_command $arg"
2040 finalize_command
="$finalize_command $arg"
2044 # calculate the name of the file, without its directory
2045 outputname
=`$echo "X$output" | $Xsed -e 's%^.*/%%'`
2046 libobjs_save
="$libobjs"
2048 if test -n "$shlibpath_var"; then
2049 # get the directories listed in $shlibpath_var
2050 eval shlib_search_path
=\
`\$echo \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\`
2054 eval sys_lib_search_path
=\"$sys_lib_search_path_spec\"
2055 eval sys_lib_dlsearch_path
=\"$sys_lib_dlsearch_path_spec\"
2057 output_objdir
=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'`
2058 if test "X$output_objdir" = "X$output"; then
2059 output_objdir
="$objdir"
2061 output_objdir
="$output_objdir/$objdir"
2063 # Create the object directory.
2064 if test ! -d "$output_objdir"; then
2065 $show "$mkdir $output_objdir"
2066 $run $mkdir $output_objdir
2068 if test "$status" -ne 0 && test ! -d "$output_objdir"; then
2073 # Determine the type of output
2076 $echo "$modename: you must specify an output file" 1>&2
2080 *.
$libext) linkmode
=oldlib
;;
2081 *.lo |
*.
$objext) linkmode
=obj
;;
2082 *.la
) linkmode
=lib
;;
2083 *) linkmode
=prog
;; # Anything else should be a program.
2087 *cygwin
* |
*mingw
* |
*pw32
*)
2088 # don't eliminate duplcations in $postdeps and $predeps
2089 duplicate_compiler_generated_deps
=yes
2092 duplicate_compiler_generated_deps
=$duplicate_deps
2098 # Find all interdependent deplibs by searching for libraries
2099 # that are linked more than once (e.g. -la -lb -la)
2100 for deplib
in $deplibs; do
2101 if test "X$duplicate_deps" = "Xyes" ; then
2103 *" $deplib "*) specialdeplibs
="$specialdeplibs $deplib" ;;
2106 libs
="$libs $deplib"
2109 if test "$linkmode" = lib
; then
2110 libs
="$predeps $libs $compiler_lib_search_path $postdeps"
2112 # Compute libraries that are listed more than once in $predeps
2113 # $postdeps and mark them as special (i.e., whose duplicates are
2114 # not to be eliminated).
2116 if test "X$duplicate_compiler_generated_deps" = "Xyes" ; then
2117 for pre_post_dep
in $predeps $postdeps; do
2118 case "$pre_post_deps " in
2119 *" $pre_post_dep "*) specialdeplibs
="$specialdeplibs $pre_post_deps" ;;
2121 pre_post_deps
="$pre_post_deps $pre_post_dep"
2130 need_relink
=no
# whether we're linking any uninstalled libtool libraries
2131 notinst_deplibs
= # not-installed libtool libraries
2132 notinst_path
= # paths that contain not-installed libtool libraries
2136 for file in $dlfiles $dlprefiles; do
2140 $echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2
2152 passes
="conv scan dlopen dlpreopen link"
2157 for pass
in $passes; do
2158 if test "$linkmode,$pass" = "lib,link" ||
2159 test "$linkmode,$pass" = "prog,scan"; then
2163 if test "$linkmode" = prog
; then
2165 dlopen
) libs
="$dlfiles" ;;
2166 dlpreopen
) libs
="$dlprefiles" ;;
2167 link
) libs
="$deplibs %DEPLIBS% $dependency_libs" ;;
2170 if test "$pass" = dlopen
; then
2171 # Collect dlpreopened libraries
2172 save_deplibs
="$deplibs"
2175 for deplib
in $libs; do
2179 -mt|
-mthreads|
-kthread|
-Kthread|
-pthread|
-pthreads|
--thread-safe)
2180 if test "$linkmode,$pass" = "prog,link"; then
2181 compile_deplibs
="$deplib $compile_deplibs"
2182 finalize_deplibs
="$deplib $finalize_deplibs"
2184 deplibs
="$deplib $deplibs"
2189 if test "$linkmode" != lib
&& test "$linkmode" != prog
; then
2190 $echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2
2193 if test "$pass" = conv
; then
2194 deplibs
="$deplib $deplibs"
2197 name
=`$echo "X$deplib" | $Xsed -e 's/^-l//'`
2198 for searchdir
in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do
2199 for search_ext
in .la
$shrext .so .a
; do
2200 # Search the libtool library
2201 lib
="$searchdir/lib${name}${search_ext}"
2202 if test -f "$lib"; then
2203 if test "$search_ext" = ".la"; then
2212 if test "$found" != yes; then
2213 # deplib doesn't seem to be a libtool library
2214 if test "$linkmode,$pass" = "prog,link"; then
2215 compile_deplibs
="$deplib $compile_deplibs"
2216 finalize_deplibs
="$deplib $finalize_deplibs"
2218 deplibs
="$deplib $deplibs"
2219 test "$linkmode" = lib
&& newdependency_libs
="$deplib $newdependency_libs"
2222 else # deplib is a libtool library
2223 # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib,
2224 # We need to do some special things here, and not later.
2225 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
2226 case " $predeps $postdeps " in
2228 if (${SED} -e '2q' $lib |
2229 grep "^# Generated by .*$PACKAGE") >/dev
/null
2>&1; then
2233 */* |
*\\*) .
$lib ;;
2236 for l
in $old_library $library_names; do
2239 if test "X$ll" = "X$old_library" ; then # only static version available
2241 ladir
=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'`
2242 test "X$ladir" = "X$lib" && ladir
="."
2243 lib
=$ladir/$old_library
2244 if test "$linkmode,$pass" = "prog,link"; then
2245 compile_deplibs
="$deplib $compile_deplibs"
2246 finalize_deplibs
="$deplib $finalize_deplibs"
2248 deplibs
="$deplib $deplibs"
2249 test "$linkmode" = lib
&& newdependency_libs
="$deplib $newdependency_libs"
2263 deplibs
="$deplib $deplibs"
2264 test "$pass" = conv
&& continue
2265 newdependency_libs
="$deplib $newdependency_libs"
2266 newlib_search_path
="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
2269 if test "$pass" = conv
; then
2270 deplibs
="$deplib $deplibs"
2273 if test "$pass" = scan
; then
2274 deplibs
="$deplib $deplibs"
2275 newlib_search_path
="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
2277 compile_deplibs
="$deplib $compile_deplibs"
2278 finalize_deplibs
="$deplib $finalize_deplibs"
2282 $echo "$modename: warning: \`-L' is ignored for archives/objects" 1>&2
2288 if test "$pass" = link
; then
2289 dir
=`$echo "X$deplib" | $Xsed -e 's/^-R//'`
2290 # Make sure the xrpath contains only unique directories.
2293 *) xrpath
="$xrpath $dir" ;;
2296 deplibs
="$deplib $deplibs"
2299 *.la
) lib
="$deplib" ;;
2301 if test "$pass" = conv
; then
2302 deplibs
="$deplib $deplibs"
2307 if test "$deplibs_check_method" != pass_all
; then
2309 $echo "*** Warning: Trying to link with static lib archive $deplib."
2310 $echo "*** I have the capability to make that library automatically link in when"
2311 $echo "*** you link to this library. But I can only do this if you have a"
2312 $echo "*** shared version of the library, which you do not appear to have"
2313 $echo "*** because the file extensions .$libext of this argument makes me believe"
2314 $echo "*** that it is just a static archive that I should not used here."
2317 $echo "*** Warning: Linking the shared library $output against the"
2318 $echo "*** static library $deplib is not portable!"
2319 deplibs
="$deplib $deplibs"
2324 if test "$pass" != link
; then
2325 deplibs
="$deplib $deplibs"
2327 compile_deplibs
="$deplib $compile_deplibs"
2328 finalize_deplibs
="$deplib $finalize_deplibs"
2335 if test "$pass" = conv
; then
2336 deplibs
="$deplib $deplibs"
2337 elif test "$linkmode" = prog
; then
2338 if test "$pass" = dlpreopen ||
test "$dlopen_support" != yes ||
test "$build_libtool_libs" = no
; then
2339 # If there is no dlopen support or we're linking statically,
2340 # we need to preload.
2341 newdlprefiles
="$newdlprefiles $deplib"
2342 compile_deplibs
="$deplib $compile_deplibs"
2343 finalize_deplibs
="$deplib $finalize_deplibs"
2345 newdlfiles
="$newdlfiles $deplib"
2355 if test "$found" = yes ||
test -f "$lib"; then :
2357 $echo "$modename: cannot find the library \`$lib'" 1>&2
2361 # Check to see that this really is a libtool archive.
2362 if (${SED} -e '2q' $lib |
grep "^# Generated by .*$PACKAGE") >/dev
/null
2>&1; then :
2364 $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
2368 ladir
=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'`
2369 test "X$ladir" = "X$lib" && ladir
="."
2377 # If the library was installed with an old release of libtool,
2378 # it will not redefine variables installed, or shouldnotlink
2384 */* |
*\\*) .
$lib ;;
2388 if test "$linkmode,$pass" = "lib,link" ||
2389 test "$linkmode,$pass" = "prog,scan" ||
2390 { test "$linkmode" != prog
&& test "$linkmode" != lib
; }; then
2391 test -n "$dlopen" && dlfiles
="$dlfiles $dlopen"
2392 test -n "$dlpreopen" && dlprefiles
="$dlprefiles $dlpreopen"
2395 if test "$pass" = conv
; then
2396 # Only check for convenience libraries
2397 deplibs
="$lib $deplibs"
2398 if test -z "$libdir"; then
2399 if test -z "$old_library"; then
2400 $echo "$modename: cannot find name of link library for \`$lib'" 1>&2
2403 # It is a libtool convenience library, so add in its objects.
2404 convenience
="$convenience $ladir/$objdir/$old_library"
2405 old_convenience
="$old_convenience $ladir/$objdir/$old_library"
2407 for deplib
in $dependency_libs; do
2408 deplibs
="$deplib $deplibs"
2409 if test "X$duplicate_deps" = "Xyes" ; then
2410 case "$tmp_libs " in
2411 *" $deplib "*) specialdeplibs
="$specialdeplibs $deplib" ;;
2414 tmp_libs
="$tmp_libs $deplib"
2416 elif test "$linkmode" != prog
&& test "$linkmode" != lib
; then
2417 $echo "$modename: \`$lib' is not a convenience library" 1>&2
2424 # Get the name of the library we link against.
2426 for l
in $old_library $library_names; do
2429 if test -z "$linklib"; then
2430 $echo "$modename: cannot find name of link library for \`$lib'" 1>&2
2434 # This library was specified with -dlopen.
2435 if test "$pass" = dlopen
; then
2436 if test -z "$libdir"; then
2437 $echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2
2440 if test -z "$dlname" ||
test "$dlopen_support" != yes ||
test "$build_libtool_libs" = no
; then
2441 # If there is no dlname, no dlopen support or we're linking
2442 # statically, we need to preload. We also need to preload any
2443 # dependent libraries so libltdl's deplib preloader doesn't
2444 # bomb out in the load deplibs phase.
2445 dlprefiles
="$dlprefiles $lib $dependency_libs"
2447 newdlfiles
="$newdlfiles $lib"
2452 # We need an absolute path.
2454 [\\/]* |
[A-Za-z
]:[\\/]*) abs_ladir
="$ladir" ;;
2456 abs_ladir
=`cd "$ladir" && pwd`
2457 if test -z "$abs_ladir"; then
2458 $echo "$modename: warning: cannot determine absolute directory name of \`$ladir'" 1>&2
2459 $echo "$modename: passing it literally to the linker, although it might fail" 1>&2
2464 laname
=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
2466 # Find the relevant object directory and library name.
2467 if test "X$installed" = Xyes
; then
2468 if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then
2469 $echo "$modename: warning: library \`$lib' was moved." 1>&2
2478 dir
="$ladir/$objdir"
2479 absdir
="$abs_ladir/$objdir"
2480 # Remove this search path later
2481 notinst_path
="$notinst_path $abs_ladir"
2482 fi # $installed = yes
2483 name
=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
2485 # This library was specified with -dlpreopen.
2486 if test "$pass" = dlpreopen
; then
2487 if test -z "$libdir"; then
2488 $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2
2491 # Prefer using a static library (so that no silly _DYNAMIC symbols
2492 # are required to link).
2493 if test -n "$old_library"; then
2494 newdlprefiles
="$newdlprefiles $dir/$old_library"
2495 # Otherwise, use the dlname, so that lt_dlopen finds it.
2496 elif test -n "$dlname"; then
2497 newdlprefiles
="$newdlprefiles $dir/$dlname"
2499 newdlprefiles
="$newdlprefiles $dir/$linklib"
2501 fi # $pass = dlpreopen
2503 if test -z "$libdir"; then
2504 # Link the convenience library
2505 if test "$linkmode" = lib
; then
2506 deplibs
="$dir/$old_library $deplibs"
2507 elif test "$linkmode,$pass" = "prog,link"; then
2508 compile_deplibs
="$dir/$old_library $compile_deplibs"
2509 finalize_deplibs
="$dir/$old_library $finalize_deplibs"
2511 deplibs
="$lib $deplibs" # used for prog,scan pass
2517 if test "$linkmode" = prog
&& test "$pass" != link
; then
2518 newlib_search_path
="$newlib_search_path $ladir"
2519 deplibs
="$lib $deplibs"
2522 if test "$link_all_deplibs" != no ||
test -z "$library_names" ||
2523 test "$build_libtool_libs" = no
; then
2528 for deplib
in $dependency_libs; do
2530 -L*) newlib_search_path
="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test
2532 # Need to link against all dependency_libs?
2533 if test "$linkalldeplibs" = yes; then
2534 deplibs
="$deplib $deplibs"
2536 # Need to hardcode shared library paths
2537 # or/and link against static libraries
2538 newdependency_libs
="$deplib $newdependency_libs"
2540 if test "X$duplicate_deps" = "Xyes" ; then
2541 case "$tmp_libs " in
2542 *" $deplib "*) specialdeplibs
="$specialdeplibs $deplib" ;;
2545 tmp_libs
="$tmp_libs $deplib"
2548 fi # $linkmode = prog...
2550 if test "$linkmode,$pass" = "prog,link"; then
2551 if test -n "$library_names" &&
2552 { test "$prefer_static_libs" = no ||
test -z "$old_library"; }; then
2553 # We need to hardcode the library path
2554 if test -n "$shlibpath_var"; then
2555 # Make sure the rpath contains only unique directories.
2556 case "$temp_rpath " in
2559 *) temp_rpath
="$temp_rpath $dir" ;;
2563 # Hardcode the library path.
2564 # Skip directories that are in the system default run-time
2566 case " $sys_lib_dlsearch_path " in
2569 case "$compile_rpath " in
2571 *) compile_rpath
="$compile_rpath $absdir"
2575 case " $sys_lib_dlsearch_path " in
2578 case "$finalize_rpath " in
2580 *) finalize_rpath
="$finalize_rpath $libdir"
2584 fi # $linkmode,$pass = prog,link...
2586 if test "$alldeplibs" = yes &&
2587 { test "$deplibs_check_method" = pass_all ||
2588 { test "$build_libtool_libs" = yes &&
2589 test -n "$library_names"; }; }; then
2590 # We only need to search for static libraries
2595 link_static
=no
# Whether the deplib will be linked statically
2596 if test -n "$library_names" &&
2597 { test "$prefer_static_libs" = no ||
test -z "$old_library"; }; then
2598 if test "$installed" = no
; then
2599 notinst_deplibs
="$notinst_deplibs $lib"
2602 # This is a shared library
2604 # Warn about portability, can't link against -module's on some systems (darwin)
2605 if test "$shouldnotlink" = yes && test "$pass" = link
; then
2607 if test "$linkmode" = prog
; then
2608 $echo "*** Warning: Linking the executable $output against the loadable module"
2610 $echo "*** Warning: Linking the shared library $output against the loadable module"
2612 $echo "*** $linklib is not portable!"
2614 if test "$linkmode" = lib
&&
2615 test "$hardcode_into_libs" = yes; then
2616 # Hardcode the library path.
2617 # Skip directories that are in the system default run-time
2619 case " $sys_lib_dlsearch_path " in
2622 case "$compile_rpath " in
2624 *) compile_rpath
="$compile_rpath $absdir"
2628 case " $sys_lib_dlsearch_path " in
2631 case "$finalize_rpath " in
2633 *) finalize_rpath
="$finalize_rpath $libdir"
2639 if test -n "$old_archive_from_expsyms_cmds"; then
2640 # figure out the soname
2641 set dummy
$library_names
2644 libname
=`eval \\$echo \"$libname_spec\"`
2645 # use dlname if we got it. it's perfectly good, no?
2646 if test -n "$dlname"; then
2648 elif test -n "$soname_spec"; then
2652 major
=`expr $current - $age`
2656 eval soname
=\"$soname_spec\"
2661 # Make a new name for the extract_expsyms_cmds to use
2663 soname
=`$echo $soroot | ${SED} -e 's/^.*\///'`
2664 newlib
="libimp-`$echo $soname | ${SED} 's/^lib//;s/\.dll$//'`.a"
2666 # If the library has no export list, then create one now
2667 if test -f "$output_objdir/$soname-def"; then :
2669 $show "extracting exported symbol list from \`$soname'"
2670 save_ifs
="$IFS"; IFS
='~'
2671 eval cmds
=\"$extract_expsyms_cmds\"
2672 for cmd
in $cmds; do
2675 $run eval "$cmd" ||
exit $?
2681 if test -f "$output_objdir/$newlib"; then :; else
2682 $show "generating import library for \`$soname'"
2683 save_ifs
="$IFS"; IFS
='~'
2684 eval cmds
=\"$old_archive_from_expsyms_cmds\"
2685 for cmd
in $cmds; do
2688 $run eval "$cmd" ||
exit $?
2692 # make sure the library variables are pointing to the new library
2695 fi # test -n "$old_archive_from_expsyms_cmds"
2697 if test "$linkmode" = prog ||
test "$mode" != relink
; then
2702 case $hardcode_action in
2703 immediate | unsupported
)
2704 if test "$hardcode_direct" = no
; then
2707 *-*-sco3.2v5
* ) add_dir
="-L$dir" ;;
2709 # if the lib is a module then we can not link against it, someone
2710 # is ignoring the new warnings I added
2711 if /usr
/bin
/file -L $add 2> /dev
/null |
grep "bundle" >/dev
/null
; then
2712 $echo "** Warning, lib $linklib is a module, not a shared library"
2713 if test -z "$old_library" ; then
2715 $echo "** And there doesn't seem to be a static archive available"
2716 $echo "** The link will probably fail, sorry"
2718 add
="$dir/$old_library"
2722 elif test "$hardcode_minus_L" = no
; then
2724 *-*-sunos*) add_shlibpath
="$dir" ;;
2728 elif test "$hardcode_shlibpath_var" = no
; then
2729 add_shlibpath
="$dir"
2736 if test "$hardcode_direct" = yes; then
2738 elif test "$hardcode_minus_L" = yes; then
2740 # Try looking first in the location we're being installed to.
2741 if test -n "$inst_prefix_dir"; then
2744 add_dir
="$add_dir -L$inst_prefix_dir$libdir"
2749 elif test "$hardcode_shlibpath_var" = yes; then
2750 add_shlibpath
="$dir"
2759 if test "$lib_linked" != yes; then
2760 $echo "$modename: configuration error: unsupported hardcode properties"
2764 if test -n "$add_shlibpath"; then
2765 case :$compile_shlibpath: in
2766 *":$add_shlibpath:"*) ;;
2767 *) compile_shlibpath
="$compile_shlibpath$add_shlibpath:" ;;
2770 if test "$linkmode" = prog
; then
2771 test -n "$add_dir" && compile_deplibs
="$add_dir $compile_deplibs"
2772 test -n "$add" && compile_deplibs
="$add $compile_deplibs"
2774 test -n "$add_dir" && deplibs
="$add_dir $deplibs"
2775 test -n "$add" && deplibs
="$add $deplibs"
2776 if test "$hardcode_direct" != yes && \
2777 test "$hardcode_minus_L" != yes && \
2778 test "$hardcode_shlibpath_var" = yes; then
2779 case :$finalize_shlibpath: in
2781 *) finalize_shlibpath
="$finalize_shlibpath$libdir:" ;;
2787 if test "$linkmode" = prog ||
test "$mode" = relink
; then
2791 # Finalize command for both is simple: just hardcode it.
2792 if test "$hardcode_direct" = yes; then
2793 add
="$libdir/$linklib"
2794 elif test "$hardcode_minus_L" = yes; then
2797 elif test "$hardcode_shlibpath_var" = yes; then
2798 case :$finalize_shlibpath: in
2800 *) finalize_shlibpath
="$finalize_shlibpath$libdir:" ;;
2803 elif test "$hardcode_automatic" = yes; then
2804 if test -n "$inst_prefix_dir" && test -f "$inst_prefix_dir$libdir/$linklib" ; then
2805 add
="$inst_prefix_dir$libdir/$linklib"
2807 add
="$libdir/$linklib"
2810 # We cannot seem to hardcode it, guess we'll fake it.
2812 # Try looking first in the location we're being installed to.
2813 if test -n "$inst_prefix_dir"; then
2816 add_dir
="$add_dir -L$inst_prefix_dir$libdir"
2823 if test "$linkmode" = prog
; then
2824 test -n "$add_dir" && finalize_deplibs
="$add_dir $finalize_deplibs"
2825 test -n "$add" && finalize_deplibs
="$add $finalize_deplibs"
2827 test -n "$add_dir" && deplibs
="$add_dir $deplibs"
2828 test -n "$add" && deplibs
="$add $deplibs"
2831 elif test "$linkmode" = prog
; then
2832 # Here we assume that one of hardcode_direct or hardcode_minus_L
2833 # is not unsupported. This is valid on all known static and
2835 if test "$hardcode_direct" != unsupported
; then
2836 test -n "$old_library" && linklib
="$old_library"
2837 compile_deplibs
="$dir/$linklib $compile_deplibs"
2838 finalize_deplibs
="$dir/$linklib $finalize_deplibs"
2840 compile_deplibs
="-l$name -L$dir $compile_deplibs"
2841 finalize_deplibs
="-l$name -L$dir $finalize_deplibs"
2843 elif test "$build_libtool_libs" = yes; then
2844 # Not a shared library
2845 if test "$deplibs_check_method" != pass_all
; then
2846 # We're trying link a shared library against a static one
2847 # but the system doesn't support it.
2849 # Just print a warning and add the library to dependency_libs so
2850 # that the program can be linked against the static library.
2852 $echo "*** Warning: This system can not link to static lib archive $lib."
2853 $echo "*** I have the capability to make that library automatically link in when"
2854 $echo "*** you link to this library. But I can only do this if you have a"
2855 $echo "*** shared version of the library, which you do not appear to have."
2856 if test "$module" = yes; then
2857 $echo "*** But as you try to build a module library, libtool will still create "
2858 $echo "*** a static module, that should work as long as the dlopening application"
2859 $echo "*** is linked with the -dlopen flag to resolve symbols at runtime."
2860 if test -z "$global_symbol_pipe"; then
2862 $echo "*** However, this would only work if libtool was able to extract symbol"
2863 $echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
2864 $echo "*** not find such a program. So, this module is probably useless."
2865 $echo "*** \`nm' from GNU binutils and a full rebuild may help."
2867 if test "$build_old_libs" = no
; then
2868 build_libtool_libs
=module
2871 build_libtool_libs
=no
2875 convenience
="$convenience $dir/$old_library"
2876 old_convenience
="$old_convenience $dir/$old_library"
2877 deplibs
="$dir/$old_library $deplibs"
2880 fi # link shared/static library?
2882 if test "$linkmode" = lib
; then
2883 if test -n "$dependency_libs" &&
2884 { test "$hardcode_into_libs" != yes ||
test "$build_old_libs" = yes ||
2885 test "$link_static" = yes; }; then
2886 # Extract -R from dependency_libs
2888 for libdir
in $dependency_libs; do
2890 -R*) temp_xrpath
=`$echo "X$libdir" | $Xsed -e 's/^-R//'`
2892 *" $temp_xrpath "*) ;;
2893 *) xrpath
="$xrpath $temp_xrpath";;
2895 *) temp_deplibs
="$temp_deplibs $libdir";;
2898 dependency_libs
="$temp_deplibs"
2901 newlib_search_path
="$newlib_search_path $absdir"
2902 # Link against this library
2903 test "$link_static" = no
&& newdependency_libs
="$abs_ladir/$laname $newdependency_libs"
2904 # ... and its dependency_libs
2906 for deplib
in $dependency_libs; do
2907 newdependency_libs
="$deplib $newdependency_libs"
2908 if test "X$duplicate_deps" = "Xyes" ; then
2909 case "$tmp_libs " in
2910 *" $deplib "*) specialdeplibs
="$specialdeplibs $deplib" ;;
2913 tmp_libs
="$tmp_libs $deplib"
2916 if test "$link_all_deplibs" != no
; then
2917 # Add the search paths of all dependency libraries
2918 for deplib
in $dependency_libs; do
2920 -L*) path
="$deplib" ;;
2922 dir
=`$echo "X$deplib" | $Xsed -e 's%/[^/]*$%%'`
2923 test "X$dir" = "X$deplib" && dir
="."
2924 # We need an absolute path.
2926 [\\/]* |
[A-Za-z
]:[\\/]*) absdir
="$dir" ;;
2928 absdir
=`cd "$dir" && pwd`
2929 if test -z "$absdir"; then
2930 $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2
2935 if grep "^installed=no" $deplib > /dev
/null
; then
2936 path
="$absdir/$objdir"
2938 eval libdir
=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
2939 if test -z "$libdir"; then
2940 $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
2943 if test "$absdir" != "$libdir"; then
2944 $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2
2951 # we do not want to link against static libs, but need to link against shared
2952 eval deplibrary_names
=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib`
2953 if test -n "$deplibrary_names" ; then
2954 for tmp
in $deplibrary_names ; do
2957 if test -f "$path/$depdepl" ; then
2958 depdepl
="$path/$depdepl"
2960 # do not add paths which are already there
2961 case " $newlib_search_path " in
2963 *) newlib_search_path
="$newlib_search_path $path";;
2977 # Again, we only want to link against shared libraries
2978 eval tmp_libs
=`$echo "X$deplib" | $Xsed -e "s,^\-l,,"`
2979 for tmp
in $newlib_search_path ; do
2980 if test -f "$tmp/lib$tmp_libs.dylib" ; then
2981 eval depdepl
="$tmp/lib$tmp_libs.dylib"
2992 case " $deplibs " in
2994 *) deplibs
="$deplibs $depdepl" ;;
2996 case " $deplibs " in
2998 *) deplibs
="$deplibs $path" ;;
3001 fi # link_all_deplibs != no
3003 done # for deplib in $libs
3004 dependency_libs
="$newdependency_libs"
3005 if test "$pass" = dlpreopen
; then
3006 # Link the dlpreopened libraries before other libraries
3007 for deplib
in $save_deplibs; do
3008 deplibs
="$deplib $deplibs"
3011 if test "$pass" != dlopen
; then
3012 if test "$pass" != conv
; then
3013 # Make sure lib_search_path contains only unique directories.
3015 for dir
in $newlib_search_path; do
3016 case "$lib_search_path " in
3018 *) lib_search_path
="$lib_search_path $dir" ;;
3024 if test "$linkmode,$pass" != "prog,link"; then
3027 vars
="compile_deplibs finalize_deplibs"
3029 for var
in $vars dependency_libs
; do
3030 # Add libraries to $var in reverse order
3031 eval tmp_libs
=\"\$
$var\"
3033 for deplib
in $tmp_libs; do
3034 # FIXME: Pedantically, this is the right thing to do, so
3035 # that some nasty dependency loop isn't accidentally
3037 #new_libs="$deplib $new_libs"
3038 # Pragmatically, this seems to cause very few problems in
3041 -L*) new_libs
="$deplib $new_libs" ;;
3044 # And here is the reason: when a library appears more
3045 # than once as an explicit dependence of a library, or
3046 # is implicitly linked in more than once by the
3047 # compiler, it is considered special, and multiple
3048 # occurrences thereof are not removed. Compare this
3049 # with having the same library being listed as a
3050 # dependency of multiple other libraries: in this case,
3051 # we know (pedantically, we assume) the library does not
3052 # need to be listed more than once, so we keep only the
3053 # last copy. This is not always right, but it is rare
3054 # enough that we require users that really mean to play
3055 # such unportable linking tricks to link the library
3056 # using -Wl,-lname, so that libtool does not consider it
3057 # for duplicate removal.
3058 case " $specialdeplibs " in
3059 *" $deplib "*) new_libs
="$deplib $new_libs" ;;
3061 case " $new_libs " in
3063 *) new_libs
="$deplib $new_libs" ;;
3071 for deplib
in $new_libs; do
3074 case " $tmp_libs " in
3076 *) tmp_libs
="$tmp_libs $deplib" ;;
3079 *) tmp_libs
="$tmp_libs $deplib" ;;
3082 eval $var=\"$tmp_libs\"
3085 # Last step: remove runtime libs from dependency_libs (they stay in deplibs)
3087 for i
in $dependency_libs ; do
3088 case " $predeps $postdeps $compiler_lib_search_path " in
3093 if test -n "$i" ; then
3094 tmp_libs
="$tmp_libs $i"
3097 dependency_libs
=$tmp_libs
3099 if test "$linkmode" = prog
; then
3100 dlfiles
="$newdlfiles"
3101 dlprefiles
="$newdlprefiles"
3106 if test -n "$deplibs"; then
3107 $echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2
3110 if test -n "$dlfiles$dlprefiles" ||
test "$dlself" != no
; then
3111 $echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2
3114 if test -n "$rpath"; then
3115 $echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2
3118 if test -n "$xrpath"; then
3119 $echo "$modename: warning: \`-R' is ignored for archives" 1>&2
3122 if test -n "$vinfo"; then
3123 $echo "$modename: warning: \`-version-info/-version-number' is ignored for archives" 1>&2
3126 if test -n "$release"; then
3127 $echo "$modename: warning: \`-release' is ignored for archives" 1>&2
3130 if test -n "$export_symbols" ||
test -n "$export_symbols_regex"; then
3131 $echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2
3134 # Now set the variables for building old libraries.
3135 build_libtool_libs
=no
3137 objs
="$objs$old_deplibs"
3141 # Make sure we only generate libraries of the form `libNAME.la'.
3144 name
=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
3145 eval shared_ext
=\"$shrext\"
3146 eval libname
=\"$libname_spec\"
3149 if test "$module" = no
; then
3150 $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2
3154 if test "$need_lib_prefix" != no
; then
3155 # Add the "lib" prefix for modules if required
3156 name
=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
3157 eval shared_ext
=\"$shrext\"
3158 eval libname
=\"$libname_spec\"
3160 libname
=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
3165 if test -n "$objs"; then
3166 if test "$deplibs_check_method" != pass_all
; then
3167 $echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1
3171 $echo "*** Warning: Linking the shared library $output against the non-libtool"
3172 $echo "*** objects $objs is not portable!"
3173 libobjs
="$libobjs $objs"
3177 if test "$dlself" != no
; then
3178 $echo "$modename: warning: \`-dlopen self' is ignored for libtool libraries" 1>&2
3182 if test "$#" -gt 2; then
3183 $echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2
3188 if test -z "$rpath"; then
3189 if test "$build_libtool_libs" = yes; then
3190 # Building a libtool convenience library.
3191 # Some compilers have problems with a `.al' extension so
3192 # convenience libraries should have the same extension an
3193 # archive normally would.
3194 oldlibs
="$output_objdir/$libname.$libext $oldlibs"
3195 build_libtool_libs
=convenience
3199 if test -n "$vinfo"; then
3200 $echo "$modename: warning: \`-version-info/-version-number' is ignored for convenience libraries" 1>&2
3203 if test -n "$release"; then
3204 $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2
3208 # Parse the version information argument.
3209 save_ifs
="$IFS"; IFS
=':'
3210 set dummy
$vinfo 0 0 0
3213 if test -n "$8"; then
3214 $echo "$modename: too many parameters to \`-version-info'" 1>&2
3219 # convert absolute version numbers to libtool ages
3220 # this retains compatibility with .la files and attempts
3221 # to make the code below a bit more comprehensible
3223 case $vinfo_number in
3227 number_revision
="$4"
3229 # There are really only two kinds -- those that
3230 # use the current revision as the major version
3231 # and those that subtract age and use age as
3232 # a minor version. But, then there is irix
3233 # which has an extra 1 added just for fun
3235 case $version_type in
3236 darwin|linux|osf|windows
)
3237 current
=`expr $number_major + $number_minor`
3239 revision
="$number_revision"
3241 freebsd-aout|freebsd-elf|sunos
)
3242 current
="$number_major"
3243 revision
="$number_minor"
3247 current
=`expr $number_major + $number_minor - 1`
3249 revision
="$number_minor"
3260 # Check that each of the things are valid numbers.
3262 0 |
[1-9] |
[1-9][0-9] |
[1-9][0-9][0-9]) ;;
3264 $echo "$modename: CURRENT \`$current' is not a nonnegative integer" 1>&2
3265 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
3271 0 |
[1-9] |
[1-9][0-9] |
[1-9][0-9][0-9]) ;;
3273 $echo "$modename: REVISION \`$revision' is not a nonnegative integer" 1>&2
3274 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
3280 0 |
[1-9] |
[1-9][0-9] |
[1-9][0-9][0-9]) ;;
3282 $echo "$modename: AGE \`$age' is not a nonnegative integer" 1>&2
3283 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
3288 if test "$age" -gt "$current"; then
3289 $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2
3290 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
3294 # Calculate the version variables.
3298 case $version_type in
3302 # Like Linux, but with the current version available in
3303 # verstring for coding it into the library header
3304 major
=.
`expr $current - $age`
3305 versuffix
="$major.$age.$revision"
3306 # Darwin ld doesn't like 0 for these options...
3307 minor_current
=`expr $current + 1`
3308 verstring
="-compatibility_version $minor_current -current_version $minor_current.$revision"
3313 versuffix
=".$current.$revision";
3318 versuffix
=".$current";
3322 major
=`expr $current - $age + 1`
3324 case $version_type in
3325 nonstopux
) verstring_prefix
=nonstopux
;;
3326 *) verstring_prefix
=sgi
;;
3328 verstring
="$verstring_prefix$major.$revision"
3330 # Add in all the interfaces that we are compatible with.
3332 while test "$loop" -ne 0; do
3333 iface
=`expr $revision - $loop`
3334 loop
=`expr $loop - 1`
3335 verstring
="$verstring_prefix$major.$iface:$verstring"
3338 # Before this point, $major must not contain `.'.
3340 versuffix
="$major.$revision"
3344 major
=.
`expr $current - $age`
3345 versuffix
="$major.$age.$revision"
3349 major
=.
`expr $current - $age`
3350 versuffix
=".$current.$age.$revision"
3351 verstring
="$current.$age.$revision"
3353 # Add in all the interfaces that we are compatible with.
3355 while test "$loop" -ne 0; do
3356 iface
=`expr $current - $loop`
3357 loop
=`expr $loop - 1`
3358 verstring
="$verstring:${iface}.0"
3361 # Make executables depend on our current version.
3362 verstring
="$verstring:${current}.0"
3367 versuffix
=".$current.$revision"
3371 # Use '-' rather than '.', since we only want one
3372 # extension on DOS 8.3 filesystems.
3373 major
=`expr $current - $age`
3378 $echo "$modename: unknown library version type \`$version_type'" 1>&2
3379 $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
3384 # Clear the version info if we defaulted, and they specified a release.
3385 if test -z "$vinfo" && test -n "$release"; then
3387 case $version_type in
3389 # we can't check for "0.0" in archive_cmds due to quoting
3390 # problems, so we reset it completely
3397 if test "$need_version" = no
; then
3404 # Remove version info from name if versioning should be avoided
3405 if test "$avoid_version" = yes && test "$need_version" = no
; then
3411 # Check to see if the archive will have undefined symbols.
3412 if test "$allow_undefined" = yes; then
3413 if test "$allow_undefined_flag" = unsupported
; then
3414 $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2
3415 build_libtool_libs
=no
3419 # Don't allow undefined symbols.
3420 allow_undefined_flag
="$no_undefined_flag"
3424 if test "$mode" != relink
; then
3425 # Remove our outputs, but don't remove object files since they
3426 # may have been created when compiling PIC objects.
3428 tempremovelist
=`$echo "$output_objdir/*"`
3429 for p
in $tempremovelist; do
3433 $output_objdir/$outputname |
$output_objdir/$libname.
* |
$output_objdir/${libname}${release}.
*)
3434 removelist
="$removelist $p"
3439 if test -n "$removelist"; then
3440 $show "${rm}r $removelist"
3441 $run ${rm}r
$removelist
3445 # Now set the variables for building old libraries.
3446 if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience
; then
3447 oldlibs
="$oldlibs $output_objdir/$libname.$libext"
3449 # Transform .lo files to .o files.
3450 oldobjs
="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP`
3453 # Eliminate all temporary directories.
3454 for path
in $notinst_path; do
3455 lib_search_path
=`$echo "$lib_search_path " | ${SED} -e 's% $path % %g'`
3456 deplibs
=`$echo "$deplibs " | ${SED} -e 's% -L$path % %g'`
3457 dependency_libs
=`$echo "$dependency_libs " | ${SED} -e 's% -L$path % %g'`
3460 if test -n "$xrpath"; then
3461 # If the user specified any rpath flags, then add them.
3463 for libdir
in $xrpath; do
3464 temp_xrpath
="$temp_xrpath -R$libdir"
3465 case "$finalize_rpath " in
3467 *) finalize_rpath
="$finalize_rpath $libdir" ;;
3470 if test "$hardcode_into_libs" != yes ||
test "$build_old_libs" = yes; then
3471 dependency_libs
="$temp_xrpath $dependency_libs"
3475 # Make sure dlfiles contains only unique files that won't be dlpreopened
3476 old_dlfiles
="$dlfiles"
3478 for lib
in $old_dlfiles; do
3479 case " $dlprefiles $dlfiles " in
3481 *) dlfiles
="$dlfiles $lib" ;;
3485 # Make sure dlprefiles contains only unique files
3486 old_dlprefiles
="$dlprefiles"
3488 for lib
in $old_dlprefiles; do
3489 case "$dlprefiles " in
3491 *) dlprefiles
="$dlprefiles $lib" ;;
3495 if test "$build_libtool_libs" = yes; then
3496 if test -n "$rpath"; then
3498 *-*-cygwin* |
*-*-mingw* |
*-*-pw32* |
*-*-os2* |
*-*-beos*)
3499 # these systems don't actually have a c library (as such)!
3501 *-*-rhapsody* |
*-*-darwin1.
[012])
3502 # Rhapsody C library is in the System framework
3503 deplibs
="$deplibs -framework System"
3506 # Don't link with libc until the a.out ld.so is fixed.
3508 *-*-openbsd* |
*-*-freebsd*)
3509 # Do not include libc due to us having libc/libc_r.
3510 test "X$arg" = "X-lc" && continue
3513 # Add libc to deplibs on all other systems if necessary.
3514 if test "$build_libtool_need_lc" = "yes"; then
3515 deplibs
="$deplibs -lc"
3521 # Transform deplibs into only deplibs that can be linked in shared.
3523 libname_save
=$libname
3524 release_save
=$release
3525 versuffix_save
=$versuffix
3527 # I'm not sure if I'm treating the release correctly. I think
3528 # release should show up in the -l (ie -lgmp5) so we don't want to
3529 # add it in twice. Is that correct?
3535 case $deplibs_check_method in
3537 # Don't check for shared/static. Everything works.
3538 # This might be a little naive. We might want to check
3539 # whether the library exists or not. But this is on
3540 # osf3 & osf4 and I'm not really sure... Just
3541 # implementing what was already the behavior.
3545 # This code stresses the "libraries are programs" paradigm to its
3546 # limits. Maybe even breaks it. We compile a program, linking it
3547 # against the deplibs as a proxy for the library. Then we can check
3548 # whether they linked in statically or dynamically with ldd.
3550 cat > conftest.c
<<EOF
3551 int main() { return 0; }
3554 $LTCC -o conftest conftest.c
$deplibs
3555 if test "$?" -eq 0 ; then
3556 ldd_output
=`ldd conftest`
3557 for i
in $deplibs; do
3558 name
="`expr $i : '-l\(.*\)'`"
3559 # If $name is empty we are operating on a -L argument.
3560 if test "$name" != "" && test "$name" -ne "0"; then
3561 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
3562 case " $predeps $postdeps " in
3564 newdeplibs
="$newdeplibs $i"
3569 if test -n "$i" ; then
3570 libname
=`eval \\$echo \"$libname_spec\"`
3571 deplib_matches
=`eval \\$echo \"$library_names_spec\"`
3572 set dummy
$deplib_matches
3574 if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
3575 newdeplibs
="$newdeplibs $i"
3579 $echo "*** Warning: dynamic linker does not accept needed library $i."
3580 $echo "*** I have the capability to make that library automatically link in when"
3581 $echo "*** you link to this library. But I can only do this if you have a"
3582 $echo "*** shared version of the library, which I believe you do not have"
3583 $echo "*** because a test_compile did reveal that the linker did not use it for"
3584 $echo "*** its dynamic dependency list that programs get resolved with at runtime."
3588 newdeplibs
="$newdeplibs $i"
3592 # Error occurred in the first compile. Let's try to salvage
3593 # the situation: Compile a separate program for each library.
3594 for i
in $deplibs; do
3595 name
="`expr $i : '-l\(.*\)'`"
3596 # If $name is empty we are operating on a -L argument.
3597 if test "$name" != "" && test "$name" != "0"; then
3599 $LTCC -o conftest conftest.c
$i
3601 if test "$?" -eq 0 ; then
3602 ldd_output
=`ldd conftest`
3603 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
3604 case " $predeps $postdeps " in
3606 newdeplibs
="$newdeplibs $i"
3611 if test -n "$i" ; then
3612 libname
=`eval \\$echo \"$libname_spec\"`
3613 deplib_matches
=`eval \\$echo \"$library_names_spec\"`
3614 set dummy
$deplib_matches
3616 if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
3617 newdeplibs
="$newdeplibs $i"
3621 $echo "*** Warning: dynamic linker does not accept needed library $i."
3622 $echo "*** I have the capability to make that library automatically link in when"
3623 $echo "*** you link to this library. But I can only do this if you have a"
3624 $echo "*** shared version of the library, which you do not appear to have"
3625 $echo "*** because a test_compile did reveal that the linker did not use this one"
3626 $echo "*** as a dynamic dependency that programs can get resolved with at runtime."
3632 $echo "*** Warning! Library $i is needed by this library but I was not able to"
3633 $echo "*** make it link in! You will probably need to install it or some"
3634 $echo "*** library that it depends on before this library will be fully"
3635 $echo "*** functional. Installing it before continuing would be even better."
3638 newdeplibs
="$newdeplibs $i"
3644 set dummy
$deplibs_check_method
3645 file_magic_regex
=`expr "$deplibs_check_method" : "$2 \(.*\)"`
3646 for a_deplib
in $deplibs; do
3647 name
="`expr $a_deplib : '-l\(.*\)'`"
3648 # If $name is empty we are operating on a -L argument.
3649 if test "$name" != "" && test "$name" != "0"; then
3650 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
3651 case " $predeps $postdeps " in
3653 newdeplibs
="$newdeplibs $a_deplib"
3658 if test -n "$a_deplib" ; then
3659 libname
=`eval \\$echo \"$libname_spec\"`
3660 for i
in $lib_search_path $sys_lib_search_path $shlib_search_path; do
3661 potential_libs
=`ls $i/$libname[.-]* 2>/dev/null`
3662 for potent_lib
in $potential_libs; do
3663 # Follow soft links.
3664 if ls -lLd "$potent_lib" 2>/dev
/null \
3665 |
grep " -> " >/dev
/null
; then
3668 # The statement above tries to avoid entering an
3669 # endless loop below, in case of cyclic links.
3670 # We might still enter an endless loop, since a link
3671 # loop can be closed while we follow links,
3673 potlib
="$potent_lib"
3674 while test -h "$potlib" 2>/dev
/null
; do
3675 potliblink
=`ls -ld $potlib | ${SED} 's/.* -> //'`
3677 [\\/]* |
[A-Za-z
]:[\\/]*) potlib
="$potliblink";;
3678 *) potlib
=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";;
3681 if eval $file_magic_cmd \"\
$potlib\" 2>/dev
/null \
3683 |
$EGREP "$file_magic_regex" > /dev
/null
; then
3684 newdeplibs
="$newdeplibs $a_deplib"
3691 if test -n "$a_deplib" ; then
3694 $echo "*** Warning: linker path does not have real file for library $a_deplib."
3695 $echo "*** I have the capability to make that library automatically link in when"
3696 $echo "*** you link to this library. But I can only do this if you have a"
3697 $echo "*** shared version of the library, which you do not appear to have"
3698 $echo "*** because I did check the linker path looking for a file starting"
3699 if test -z "$potlib" ; then
3700 $echo "*** with $libname but no candidates were found. (...for file magic test)"
3702 $echo "*** with $libname and none of the candidates passed a file format test"
3703 $echo "*** using a file magic. Last file checked: $potlib"
3707 # Add a -L argument.
3708 newdeplibs
="$newdeplibs $a_deplib"
3710 done # Gone through all deplibs.
3713 set dummy
$deplibs_check_method
3714 match_pattern_regex
=`expr "$deplibs_check_method" : "$2 \(.*\)"`
3715 for a_deplib
in $deplibs; do
3716 name
="`expr $a_deplib : '-l\(.*\)'`"
3717 # If $name is empty we are operating on a -L argument.
3718 if test -n "$name" && test "$name" != "0"; then
3719 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
3720 case " $predeps $postdeps " in
3722 newdeplibs
="$newdeplibs $a_deplib"
3727 if test -n "$a_deplib" ; then
3728 libname
=`eval \\$echo \"$libname_spec\"`
3729 for i
in $lib_search_path $sys_lib_search_path $shlib_search_path; do
3730 potential_libs
=`ls $i/$libname[.-]* 2>/dev/null`
3731 for potent_lib
in $potential_libs; do
3732 potlib
="$potent_lib" # see symlink-check above in file_magic test
3733 if eval $echo \"$potent_lib\" 2>/dev
/null \
3735 |
$EGREP "$match_pattern_regex" > /dev
/null
; then
3736 newdeplibs
="$newdeplibs $a_deplib"
3743 if test -n "$a_deplib" ; then
3746 $echo "*** Warning: linker path does not have real file for library $a_deplib."
3747 $echo "*** I have the capability to make that library automatically link in when"
3748 $echo "*** you link to this library. But I can only do this if you have a"
3749 $echo "*** shared version of the library, which you do not appear to have"
3750 $echo "*** because I did check the linker path looking for a file starting"
3751 if test -z "$potlib" ; then
3752 $echo "*** with $libname but no candidates were found. (...for regex pattern test)"
3754 $echo "*** with $libname and none of the candidates passed a file format test"
3755 $echo "*** using a regex pattern. Last file checked: $potlib"
3759 # Add a -L argument.
3760 newdeplibs
="$newdeplibs $a_deplib"
3762 done # Gone through all deplibs.
3766 tmp_deplibs
=`$echo "X $deplibs" | $Xsed -e 's/ -lc$//' \
3767 -e 's/ -[LR][^ ]*//g'`
3768 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
3769 for i
in $predeps $postdeps ; do
3770 # can't use Xsed below, because $i might contain '/'
3771 tmp_deplibs
=`$echo "X $tmp_deplibs" | ${SED} -e "1s,^X,," -e "s,$i,,"`
3774 if $echo "X $tmp_deplibs" |
$Xsed -e 's/[ ]//g' \
3775 |
grep .
>/dev
/null
; then
3777 if test "X$deplibs_check_method" = "Xnone"; then
3778 $echo "*** Warning: inter-library dependencies are not supported in this platform."
3780 $echo "*** Warning: inter-library dependencies are not known to be supported."
3782 $echo "*** All declared inter-library dependencies are being dropped."
3787 versuffix
=$versuffix_save
3789 release
=$release_save
3790 libname
=$libname_save
3794 *-*-rhapsody* |
*-*-darwin1.
[012])
3795 # On Rhapsody replace the C library is the System framework
3796 newdeplibs
=`$echo "X $newdeplibs" | $Xsed -e 's/ -lc / -framework System /'`
3800 if test "$droppeddeps" = yes; then
3801 if test "$module" = yes; then
3803 $echo "*** Warning: libtool could not satisfy all declared inter-library"
3804 $echo "*** dependencies of module $libname. Therefore, libtool will create"
3805 $echo "*** a static module, that should work as long as the dlopening"
3806 $echo "*** application is linked with the -dlopen flag."
3807 if test -z "$global_symbol_pipe"; then
3809 $echo "*** However, this would only work if libtool was able to extract symbol"
3810 $echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
3811 $echo "*** not find such a program. So, this module is probably useless."
3812 $echo "*** \`nm' from GNU binutils and a full rebuild may help."
3814 if test "$build_old_libs" = no
; then
3815 oldlibs
="$output_objdir/$libname.$libext"
3816 build_libtool_libs
=module
3819 build_libtool_libs
=no
3822 $echo "*** The inter-library dependencies that have been dropped here will be"
3823 $echo "*** automatically added whenever a program is linked with this library"
3824 $echo "*** or is declared to -dlopen it."
3826 if test "$allow_undefined" = no
; then
3828 $echo "*** Since this library must not contain undefined symbols,"
3829 $echo "*** because either the platform does not support them or"
3830 $echo "*** it was explicitly requested with -no-undefined,"
3831 $echo "*** libtool will only create a static version of it."
3832 if test "$build_old_libs" = no
; then
3833 oldlibs
="$output_objdir/$libname.$libext"
3834 build_libtool_libs
=module
3837 build_libtool_libs
=no
3842 # Done checking deplibs!
3846 # All the library-specific variables (install_libdir is set above).
3851 # Test again, we may have decided not to build it any more
3852 if test "$build_libtool_libs" = yes; then
3853 if test "$hardcode_into_libs" = yes; then
3854 # Hardcode the library paths
3857 rpath
="$finalize_rpath"
3858 test "$mode" != relink
&& rpath
="$compile_rpath$rpath"
3859 for libdir
in $rpath; do
3860 if test -n "$hardcode_libdir_flag_spec"; then
3861 if test -n "$hardcode_libdir_separator"; then
3862 if test -z "$hardcode_libdirs"; then
3863 hardcode_libdirs
="$libdir"
3865 # Just accumulate the unique libdirs.
3866 case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
3867 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
3870 hardcode_libdirs
="$hardcode_libdirs$hardcode_libdir_separator$libdir"
3875 eval flag
=\"$hardcode_libdir_flag_spec\"
3876 dep_rpath
="$dep_rpath $flag"
3878 elif test -n "$runpath_var"; then
3879 case "$perm_rpath " in
3881 *) perm_rpath
="$perm_rpath $libdir" ;;
3885 # Substitute the hardcoded libdirs into the rpath.
3886 if test -n "$hardcode_libdir_separator" &&
3887 test -n "$hardcode_libdirs"; then
3888 libdir
="$hardcode_libdirs"
3889 if test -n "$hardcode_libdir_flag_spec_ld"; then
3890 eval dep_rpath
=\"$hardcode_libdir_flag_spec_ld\"
3892 eval dep_rpath
=\"$hardcode_libdir_flag_spec\"
3895 if test -n "$runpath_var" && test -n "$perm_rpath"; then
3896 # We should set the runpath_var.
3898 for dir
in $perm_rpath; do
3901 eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var"
3903 test -n "$dep_rpath" && deplibs
="$dep_rpath $deplibs"
3906 shlibpath
="$finalize_shlibpath"
3907 test "$mode" != relink
&& shlibpath
="$compile_shlibpath$shlibpath"
3908 if test -n "$shlibpath"; then
3909 eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var"
3912 # Get the real and link names of the library.
3913 eval shared_ext
=\"$shrext\"
3914 eval library_names
=\"$library_names_spec\"
3915 set dummy
$library_names
3919 if test -n "$soname_spec"; then
3920 eval soname
=\"$soname_spec\"
3924 if test -z "$dlname"; then
3928 lib
="$output_objdir/$realname"
3931 linknames
="$linknames $link"
3934 # Use standard objects if they are pic
3935 test -z "$pic_flag" && libobjs
=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
3937 # Prepare the list of exported symbols
3938 if test -z "$export_symbols"; then
3939 if test "$always_export_symbols" = yes ||
test -n "$export_symbols_regex"; then
3940 $show "generating symbol list for \`$libname.la'"
3941 export_symbols
="$output_objdir/$libname.exp"
3942 $run $rm $export_symbols
3943 eval cmds
=\"$export_symbols_cmds\"
3944 save_ifs
="$IFS"; IFS
='~'
3945 for cmd
in $cmds; do
3947 if len
=`expr "X$cmd" : ".*"` &&
3948 test "$len" -le "$max_cmd_len" ||
test "$max_cmd_len" -le -1; then
3950 $run eval "$cmd" ||
exit $?
3951 skipped_export
=false
3953 # The command line is too long to execute in one step.
3954 $show "using reloadable object file for export list..."
3959 if test -n "$export_symbols_regex"; then
3960 $show "$EGREP -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\""
3961 $run eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
3962 $show "$mv \"${export_symbols}T\" \"$export_symbols\""
3963 $run eval '$mv "${export_symbols}T" "$export_symbols"'
3968 if test -n "$export_symbols" && test -n "$include_expsyms"; then
3969 $run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"'
3973 for test_deplib
in $deplibs; do
3974 case " $convenience " in
3975 *" $test_deplib "*) ;;
3977 tmp_deplibs
="$tmp_deplibs $test_deplib"
3981 deplibs
="$tmp_deplibs"
3983 if test -n "$convenience"; then
3984 if test -n "$whole_archive_flag_spec"; then
3985 save_libobjs
=$libobjs
3986 eval libobjs
=\"\
$libobjs $whole_archive_flag_spec\"
3988 gentop
="$output_objdir/${outputname}x"
3989 $show "${rm}r $gentop"
3990 $run ${rm}r
"$gentop"
3991 $show "$mkdir $gentop"
3992 $run $mkdir "$gentop"
3994 if test "$status" -ne 0 && test ! -d "$gentop"; then
3997 generated
="$generated $gentop"
3999 for xlib
in $convenience; do
4000 # Extract the objects.
4002 [\\/]* |
[A-Za-z
]:[\\/]*) xabs
="$xlib" ;;
4003 *) xabs
=`pwd`"/$xlib" ;;
4005 xlib
=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
4006 xdir
="$gentop/$xlib"
4008 $show "${rm}r $xdir"
4010 $show "$mkdir $xdir"
4013 if test "$status" -ne 0 && test ! -d "$xdir"; then
4016 # We will extract separately just the conflicting names and we will no
4017 # longer touch any unique names. It is faster to leave these extract
4018 # automatically by $AR in one run.
4019 $show "(cd $xdir && $AR x $xabs)"
4020 $run eval "(cd \$xdir && $AR x \$xabs)" ||
exit $?
4021 if ($AR t
"$xabs" |
sort |
sort -uc >/dev
/null
2>&1); then
4024 $echo "$modename: warning: object name conflicts; renaming object files" 1>&2
4025 $echo "$modename: warning: to ensure that they will not overwrite" 1>&2
4026 $AR t
"$xabs" |
sort |
uniq -cd |
while read -r count name
4029 while test "$i" -le "$count"
4031 # Put our $i before any first dot (extension)
4032 # Never overwrite any file
4034 while test "X$name_to" = "X$name" ||
test -f "$xdir/$name_to"
4036 name_to
=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"`
4038 $show "(cd $xdir && $AR xN $i $xabs '$name' && $mv '$name' '$name_to')"
4039 $run eval "(cd \$xdir && $AR xN $i \$xabs '$name' && $mv '$name' '$name_to')" ||
exit $?
4045 libobjs
="$libobjs "`find $xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
4050 if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
4051 eval flag
=\"$thread_safe_flag_spec\"
4052 linker_flags
="$linker_flags $flag"
4055 # Make a backup of the uninstalled library when relinking
4056 if test "$mode" = relink
; then
4057 $run eval '(cd $output_objdir && $rm ${realname}U && $mv $realname ${realname}U)' ||
exit $?
4060 # Do each of the archive commands.
4061 if test "$module" = yes && test -n "$module_cmds" ; then
4062 if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
4063 eval cmds
=\"$module_expsym_cmds\"
4065 eval cmds
=\"$module_cmds\"
4068 if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
4069 eval cmds
=\"$archive_expsym_cmds\"
4071 eval cmds
=\"$archive_cmds\"
4075 if test "X$skipped_export" != "X:" && len
=`expr "X$cmds" : ".*"` &&
4076 test "$len" -le "$max_cmd_len" ||
test "$max_cmd_len" -le -1; then
4079 # The command line is too long to link in one step, link piecewise.
4080 $echo "creating reloadable object files..."
4082 # Save the value of $output and $libobjs because we want to
4083 # use them later. If we have whole_archive_flag_spec, we
4084 # want to use save_libobjs as it was before
4085 # whole_archive_flag_spec was expanded, because we can't
4086 # assume the linker understands whole_archive_flag_spec.
4087 # This may have to be revisited, in case too many
4088 # convenience libraries get linked in and end up exceeding
4090 if test -z "$convenience" ||
test -z "$whole_archive_flag_spec"; then
4091 save_libobjs
=$libobjs
4095 # Clear the reloadable object creation command queue and
4096 # initialize k to one.
4103 output
=$output_objdir/$save_output-${k}.
$objext
4104 # Loop over the list of objects to be linked.
4105 for obj
in $save_libobjs
4107 eval test_cmds
=\"$reload_cmds $objlist $last_robj\"
4108 if test "X$objlist" = X ||
4109 { len
=`expr "X$test_cmds" : ".*"` &&
4110 test "$len" -le "$max_cmd_len"; }; then
4111 objlist
="$objlist $obj"
4113 # The command $test_cmds is almost too long, add a
4114 # command to the queue.
4115 if test "$k" -eq 1 ; then
4116 # The first file doesn't have a previous command to add.
4117 eval concat_cmds
=\"$reload_cmds $objlist $last_robj\"
4119 # All subsequent reloadable object files will link in
4120 # the last one created.
4121 eval concat_cmds
=\"\
$concat_cmds~
$reload_cmds $objlist $last_robj\"
4123 last_robj
=$output_objdir/$save_output-${k}.
$objext
4125 output
=$output_objdir/$save_output-${k}.
$objext
4130 # Handle the remaining objects by creating one last
4131 # reloadable object file. All subsequent reloadable object
4132 # files will link in the last one created.
4133 test -z "$concat_cmds" || concat_cmds
=$concat_cmds~
4134 eval concat_cmds
=\"\
${concat_cmds}$reload_cmds $objlist $last_robj\"
4136 if ${skipped_export-false}; then
4137 $show "generating symbol list for \`$libname.la'"
4138 export_symbols
="$output_objdir/$libname.exp"
4139 $run $rm $export_symbols
4141 # Append the command to create the export file.
4142 eval concat_cmds
=\"\
$concat_cmds~
$export_symbols_cmds\"
4145 # Set up a command to remove the reloadale object files
4146 # after they are used.
4148 while test "$i" -lt "$k"
4151 delfiles
="$delfiles $output_objdir/$save_output-${i}.$objext"
4154 $echo "creating a temporary reloadable object file: $output"
4156 # Loop through the commands generated above and execute them.
4157 save_ifs
="$IFS"; IFS
='~'
4158 for cmd
in $concat_cmds; do
4161 $run eval "$cmd" ||
exit $?
4166 # Restore the value of output.
4169 if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then
4170 eval libobjs
=\"\
$libobjs $whole_archive_flag_spec\"
4172 # Expand the library linking commands again to reset the
4173 # value of $libobjs for piecewise linking.
4175 # Do each of the archive commands.
4176 if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
4177 eval cmds
=\"$archive_expsym_cmds\"
4179 eval cmds
=\"$archive_cmds\"
4182 # Append the command to remove the reloadable object files
4183 # to the just-reset $cmds.
4184 eval cmds
=\"\
$cmds~
$rm $delfiles\"
4186 save_ifs
="$IFS"; IFS
='~'
4187 for cmd
in $cmds; do
4190 $run eval "$cmd" ||
exit $?
4194 # Restore the uninstalled library and exit
4195 if test "$mode" = relink
; then
4196 $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' ||
exit $?
4200 # Create links to the real library.
4201 for linkname
in $linknames; do
4202 if test "$realname" != "$linkname"; then
4203 $show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)"
4204 $run eval '(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)' ||
exit $?
4208 # If -module or -export-dynamic was specified, set the dlname.
4209 if test "$module" = yes ||
test "$export_dynamic" = yes; then
4210 # On all known operating systems, these are identical.
4217 if test -n "$deplibs"; then
4218 $echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2
4221 if test -n "$dlfiles$dlprefiles" ||
test "$dlself" != no
; then
4222 $echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2
4225 if test -n "$rpath"; then
4226 $echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2
4229 if test -n "$xrpath"; then
4230 $echo "$modename: warning: \`-R' is ignored for objects" 1>&2
4233 if test -n "$vinfo"; then
4234 $echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2
4237 if test -n "$release"; then
4238 $echo "$modename: warning: \`-release' is ignored for objects" 1>&2
4243 if test -n "$objs$old_deplibs"; then
4244 $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2
4248 obj
=`$echo "X$output" | $Xsed -e "$lo2o"`
4256 # Delete the old objects.
4257 $run $rm $obj $libobj
4259 # Objects from convenience libraries. This assumes
4260 # single-version convenience libraries. Whenever we create
4261 # different ones for PIC/non-PIC, this we'll have to duplicate
4265 # reload_cmds runs $LD directly, so let us get rid of
4266 # -Wl from whole_archive_flag_spec
4269 if test -n "$convenience"; then
4270 if test -n "$whole_archive_flag_spec"; then
4271 eval reload_conv_objs
=\"\
$reload_objs $whole_archive_flag_spec\"
4273 gentop
="$output_objdir/${obj}x"
4274 $show "${rm}r $gentop"
4275 $run ${rm}r
"$gentop"
4276 $show "$mkdir $gentop"
4277 $run $mkdir "$gentop"
4279 if test "$status" -ne 0 && test ! -d "$gentop"; then
4282 generated
="$generated $gentop"
4284 for xlib
in $convenience; do
4285 # Extract the objects.
4287 [\\/]* |
[A-Za-z
]:[\\/]*) xabs
="$xlib" ;;
4288 *) xabs
=`pwd`"/$xlib" ;;
4290 xlib
=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
4291 xdir
="$gentop/$xlib"
4293 $show "${rm}r $xdir"
4295 $show "$mkdir $xdir"
4298 if test "$status" -ne 0 && test ! -d "$xdir"; then
4301 # We will extract separately just the conflicting names and we will no
4302 # longer touch any unique names. It is faster to leave these extract
4303 # automatically by $AR in one run.
4304 $show "(cd $xdir && $AR x $xabs)"
4305 $run eval "(cd \$xdir && $AR x \$xabs)" ||
exit $?
4306 if ($AR t
"$xabs" |
sort |
sort -uc >/dev
/null
2>&1); then
4309 $echo "$modename: warning: object name conflicts; renaming object files" 1>&2
4310 $echo "$modename: warning: to ensure that they will not overwrite" 1>&2
4311 $AR t
"$xabs" |
sort |
uniq -cd |
while read -r count name
4314 while test "$i" -le "$count"
4316 # Put our $i before any first dot (extension)
4317 # Never overwrite any file
4319 while test "X$name_to" = "X$name" ||
test -f "$xdir/$name_to"
4321 name_to
=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"`
4323 $show "(cd $xdir && $AR xN $i $xabs '$name' && $mv '$name' '$name_to')"
4324 $run eval "(cd \$xdir && $AR xN $i \$xabs '$name' && $mv '$name' '$name_to')" ||
exit $?
4330 reload_conv_objs
="$reload_objs "`find $xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
4335 # Create the old-style object.
4336 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
4339 eval cmds
=\"$reload_cmds\"
4340 save_ifs
="$IFS"; IFS
='~'
4341 for cmd
in $cmds; do
4344 $run eval "$cmd" ||
exit $?
4348 # Exit if we aren't doing a library object file.
4349 if test -z "$libobj"; then
4350 if test -n "$gentop"; then
4351 $show "${rm}r $gentop"
4358 if test "$build_libtool_libs" != yes; then
4359 if test -n "$gentop"; then
4360 $show "${rm}r $gentop"
4364 # Create an invalid libtool object if no PIC, so that we don't
4365 # accidentally link it into a program.
4366 # $show "echo timestamp > $libobj"
4367 # $run eval "echo timestamp > $libobj" || exit $?
4371 if test -n "$pic_flag" ||
test "$pic_mode" != default
; then
4372 # Only do commands if we really have different PIC objects.
4373 reload_objs
="$libobjs $reload_conv_objs"
4375 eval cmds
=\"$reload_cmds\"
4376 save_ifs
="$IFS"; IFS
='~'
4377 for cmd
in $cmds; do
4380 $run eval "$cmd" ||
exit $?
4385 if test -n "$gentop"; then
4386 $show "${rm}r $gentop"
4395 *cygwin
*) output
=`$echo $output | ${SED} -e 's,.exe$,,;s,$,.exe,'` ;;
4397 if test -n "$vinfo"; then
4398 $echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2
4401 if test -n "$release"; then
4402 $echo "$modename: warning: \`-release' is ignored for programs" 1>&2
4405 if test "$preload" = yes; then
4406 if test "$dlopen_support" = unknown
&& test "$dlopen_self" = unknown
&&
4407 test "$dlopen_self_static" = unknown
; then
4408 $echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support."
4413 *-*-rhapsody* |
*-*-darwin1.
[012])
4414 # On Rhapsody replace the C library is the System framework
4415 compile_deplibs
=`$echo "X $compile_deplibs" | $Xsed -e 's/ -lc / -framework System /'`
4416 finalize_deplibs
=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'`
4422 # Don't allow lazy linking, it breaks C++ global constructors
4423 if test "$tagname" = CXX
; then
4424 compile_command
="$compile_command ${wl}-bind_at_load"
4425 finalize_command
="$finalize_command ${wl}-bind_at_load"
4430 compile_command
="$compile_command $compile_deplibs"
4431 finalize_command
="$finalize_command $finalize_deplibs"
4433 if test -n "$rpath$xrpath"; then
4434 # If the user specified any rpath flags, then add them.
4435 for libdir
in $rpath $xrpath; do
4436 # This is the magic to use -rpath.
4437 case "$finalize_rpath " in
4439 *) finalize_rpath
="$finalize_rpath $libdir" ;;
4444 # Now hardcode the library paths
4447 for libdir
in $compile_rpath $finalize_rpath; do
4448 if test -n "$hardcode_libdir_flag_spec"; then
4449 if test -n "$hardcode_libdir_separator"; then
4450 if test -z "$hardcode_libdirs"; then
4451 hardcode_libdirs
="$libdir"
4453 # Just accumulate the unique libdirs.
4454 case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
4455 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
4458 hardcode_libdirs
="$hardcode_libdirs$hardcode_libdir_separator$libdir"
4463 eval flag
=\"$hardcode_libdir_flag_spec\"
4464 rpath
="$rpath $flag"
4466 elif test -n "$runpath_var"; then
4467 case "$perm_rpath " in
4469 *) perm_rpath
="$perm_rpath $libdir" ;;
4473 *-*-cygwin* |
*-*-mingw* |
*-*-pw32* |
*-*-os2*)
4474 case :$dllsearchpath: in
4476 *) dllsearchpath
="$dllsearchpath:$libdir";;
4481 # Substitute the hardcoded libdirs into the rpath.
4482 if test -n "$hardcode_libdir_separator" &&
4483 test -n "$hardcode_libdirs"; then
4484 libdir
="$hardcode_libdirs"
4485 eval rpath
=\" $hardcode_libdir_flag_spec\"
4487 compile_rpath
="$rpath"
4491 for libdir
in $finalize_rpath; do
4492 if test -n "$hardcode_libdir_flag_spec"; then
4493 if test -n "$hardcode_libdir_separator"; then
4494 if test -z "$hardcode_libdirs"; then
4495 hardcode_libdirs
="$libdir"
4497 # Just accumulate the unique libdirs.
4498 case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
4499 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
4502 hardcode_libdirs
="$hardcode_libdirs$hardcode_libdir_separator$libdir"
4507 eval flag
=\"$hardcode_libdir_flag_spec\"
4508 rpath
="$rpath $flag"
4510 elif test -n "$runpath_var"; then
4511 case "$finalize_perm_rpath " in
4513 *) finalize_perm_rpath
="$finalize_perm_rpath $libdir" ;;
4517 # Substitute the hardcoded libdirs into the rpath.
4518 if test -n "$hardcode_libdir_separator" &&
4519 test -n "$hardcode_libdirs"; then
4520 libdir
="$hardcode_libdirs"
4521 eval rpath
=\" $hardcode_libdir_flag_spec\"
4523 finalize_rpath
="$rpath"
4525 if test -n "$libobjs" && test "$build_old_libs" = yes; then
4526 # Transform all the library objects into standard objects.
4527 compile_command
=`$echo "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
4528 finalize_command
=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
4532 if test -n "$dlfiles$dlprefiles" ||
test "$dlself" != no
; then
4533 if test -n "$NM" && test -n "$global_symbol_pipe"; then
4534 dlsyms
="${outputname}S.c"
4536 $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2
4540 if test -n "$dlsyms"; then
4544 # Discover the nlist of each of the dlfiles.
4545 nlist
="$output_objdir/${outputname}.nm"
4547 $show "$rm $nlist ${nlist}S ${nlist}T"
4548 $run $rm "$nlist" "${nlist}S" "${nlist}T"
4550 # Parse the name list into a source file.
4551 $show "creating $output_objdir/$dlsyms"
4553 test -z "$run" && $echo > "$output_objdir/$dlsyms" "\
4554 /* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */
4555 /* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */
4561 /* Prevent the only kind of declaration conflicts we can make. */
4562 #define lt_preloaded_symbols some_other_symbol
4564 /* External symbol declarations for the compiler. */\
4567 if test "$dlself" = yes; then
4568 $show "generating symbol list for \`$output'"
4570 test -z "$run" && $echo ': @PROGRAM@ ' > "$nlist"
4572 # Add our own program objects to the symbol list.
4573 progfiles
=`$echo "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
4574 for arg
in $progfiles; do
4575 $show "extracting global C symbols from \`$arg'"
4576 $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
4579 if test -n "$exclude_expsyms"; then
4580 $run eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T'
4581 $run eval '$mv "$nlist"T "$nlist"'
4584 if test -n "$export_symbols_regex"; then
4585 $run eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T'
4586 $run eval '$mv "$nlist"T "$nlist"'
4589 # Prepare the list of exported symbols
4590 if test -z "$export_symbols"; then
4591 export_symbols
="$output_objdir/$output.exp"
4592 $run $rm $export_symbols
4593 $run eval "${SED} -n -e '/^: @PROGRAM@$/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
4595 $run eval "${SED} -e 's/\([][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$output.exp"'
4596 $run eval 'grep -f "$output_objdir/$output.exp" < "$nlist" > "$nlist"T'
4597 $run eval 'mv "$nlist"T "$nlist"'
4601 for arg
in $dlprefiles; do
4602 $show "extracting global C symbols from \`$arg'"
4603 name
=`$echo "$arg" | ${SED} -e 's%^.*/%%'`
4604 $run eval '$echo ": $name " >> "$nlist"'
4605 $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
4608 if test -z "$run"; then
4609 # Make sure we have at least an empty file.
4610 test -f "$nlist" ||
: > "$nlist"
4612 if test -n "$exclude_expsyms"; then
4613 $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T
4614 $mv "$nlist"T
"$nlist"
4617 # Try sorting and uniquifying the output.
4618 if grep -v "^: " < "$nlist" |
4619 if sort -k 3 </dev
/null
>/dev
/null
2>&1; then
4624 uniq > "$nlist"S
; then
4627 grep -v "^: " < "$nlist" > "$nlist"S
4630 if test -f "$nlist"S
; then
4631 eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$dlsyms"'
4633 $echo '/* NONE */' >> "$output_objdir/$dlsyms"
4636 $echo >> "$output_objdir/$dlsyms" "\
4638 #undef lt_preloaded_symbols
4640 #if defined (__STDC__) && __STDC__
4641 # define lt_ptr void *
4643 # define lt_ptr char *
4647 /* The mapping between symbol names and symbols. */
4652 lt_preloaded_symbols[] =
4656 eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$dlsyms"
4658 $echo >> "$output_objdir/$dlsyms" "\
4662 /* This works around a problem in FreeBSD linker */
4663 #ifdef FREEBSD_WORKAROUND
4664 static const void *lt_preloaded_setup() {
4665 return lt_preloaded_symbols;
4675 pic_flag_for_symtable
=
4677 # compiling the symbol table file with pic_flag works around
4678 # a FreeBSD bug that causes programs to crash when -lm is
4679 # linked before any other PIC object. But we must not use
4680 # pic_flag when linking with -static. The problem exists in
4681 # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1.
4682 *-*-freebsd2*|
*-*-freebsd3.0
*|
*-*-freebsdelf3.0
*)
4683 case "$compile_command " in
4685 *) pic_flag_for_symtable
=" $pic_flag -DFREEBSD_WORKAROUND";;
4688 case "$compile_command " in
4690 *) pic_flag_for_symtable
=" $pic_flag";;
4694 # Now compile the dynamic symbol file.
4695 $show "(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")"
4696 $run eval '(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' ||
exit $?
4698 # Clean up the generated files.
4699 $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T"
4700 $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T"
4702 # Transform the symbol file into the correct name.
4703 compile_command
=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
4704 finalize_command
=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
4707 $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2
4712 # We keep going just in case the user didn't refer to
4713 # lt_preloaded_symbols. The linker will fail if global_symbol_pipe
4714 # really was required.
4716 # Nullify the symbol file.
4717 compile_command
=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"`
4718 finalize_command
=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"`
4721 if test "$need_relink" = no ||
test "$build_libtool_libs" != yes; then
4722 # Replace the output file specification.
4723 compile_command
=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
4724 link_command
="$compile_command$compile_rpath"
4726 # We have no uninstalled library dependencies, so finalize right now.
4727 $show "$link_command"
4728 $run eval "$link_command"
4731 # Delete the generated files.
4732 if test -n "$dlsyms"; then
4733 $show "$rm $output_objdir/${outputname}S.${objext}"
4734 $run $rm "$output_objdir/${outputname}S.${objext}"
4740 if test -n "$shlibpath_var"; then
4741 # We should set the shlibpath_var
4743 for dir
in $temp_rpath; do
4745 [\\/]* |
[A-Za-z
]:[\\/]*)
4750 # Relative path: add a thisdir entry.
4751 rpath
="$rpath\$thisdir/$dir:"
4758 if test -n "$compile_shlibpath$finalize_shlibpath"; then
4759 compile_command
="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command"
4761 if test -n "$finalize_shlibpath"; then
4762 finalize_command
="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command"
4767 if test -n "$runpath_var"; then
4768 if test -n "$perm_rpath"; then
4769 # We should set the runpath_var.
4771 for dir
in $perm_rpath; do
4774 compile_var
="$runpath_var=\"$rpath\$$runpath_var\" "
4776 if test -n "$finalize_perm_rpath"; then
4777 # We should set the runpath_var.
4779 for dir
in $finalize_perm_rpath; do
4782 finalize_var
="$runpath_var=\"$rpath\$$runpath_var\" "
4786 if test "$no_install" = yes; then
4787 # We don't need to create a wrapper script.
4788 link_command
="$compile_var$compile_command$compile_rpath"
4789 # Replace the output file specification.
4790 link_command
=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
4791 # Delete the old output file.
4793 # Link the executable and exit
4794 $show "$link_command"
4795 $run eval "$link_command" ||
exit $?
4799 if test "$hardcode_action" = relink
; then
4800 # Fast installation is not supported
4801 link_command
="$compile_var$compile_command$compile_rpath"
4802 relink_command
="$finalize_var$finalize_command$finalize_rpath"
4804 $echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2
4805 $echo "$modename: \`$output' will be relinked during installation" 1>&2
4807 if test "$fast_install" != no
; then
4808 link_command
="$finalize_var$compile_command$finalize_rpath"
4809 if test "$fast_install" = yes; then
4810 relink_command
=`$echo "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'`
4812 # fast_install is set to needless
4816 link_command
="$compile_var$compile_command$compile_rpath"
4817 relink_command
="$finalize_var$finalize_command$finalize_rpath"
4821 # Replace the output file specification.
4822 link_command
=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
4824 # Delete the old output files.
4825 $run $rm $output $output_objdir/$outputname $output_objdir/lt-
$outputname
4827 $show "$link_command"
4828 $run eval "$link_command" ||
exit $?
4830 # Now create the wrapper script.
4831 $show "creating $output"
4833 # Quote the relink command for shipping.
4834 if test -n "$relink_command"; then
4835 # Preserve any variables that may affect compiler behavior
4836 for var
in $variables_saved_for_relink; do
4837 if eval test -z \"\
${$var+set}\"; then
4838 relink_command
="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command"
4839 elif eval var_value
=\$
$var; test -z "$var_value"; then
4840 relink_command
="$var=; export $var; $relink_command"
4842 var_value
=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"`
4843 relink_command
="$var=\"$var_value\"; export $var; $relink_command"
4846 relink_command
="(cd `pwd`; $relink_command)"
4847 relink_command
=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
4850 # Quote $echo for shipping.
4851 if test "X$echo" = "X$SHELL $0 --fallback-echo"; then
4853 [\\/]* |
[A-Za-z
]:[\\/]*) qecho
="$SHELL $0 --fallback-echo";;
4854 *) qecho
="$SHELL `pwd`/$0 --fallback-echo";;
4856 qecho
=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"`
4858 qecho
=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"`
4861 # Only actually do things if our run command is non-null.
4862 if test -z "$run"; then
4863 # win32 will think the script is a binary if it has
4864 # a .exe suffix, so we strip it off here.
4866 *.exe
) output
=`$echo $output|${SED} 's,.exe$,,'` ;;
4868 # test for cygwin because mv fails w/o .exe extensions
4872 outputname
=`$echo $outputname|${SED} 's,.exe$,,'` ;;
4876 *cygwin
* |
*mingw
* )
4877 cwrappersource
=`$echo ${objdir}/lt-${output}.c`
4878 cwrapper
=`$echo ${output}.exe`
4879 $rm $cwrappersource $cwrapper
4880 trap "$rm $cwrappersource $cwrapper; exit 1" 1 2 15
4882 cat > $cwrappersource <<EOF
4884 /* $cwrappersource - temporary wrapper executable for $objdir/$outputname
4885 Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
4887 The $output program cannot be directly executed until all the libtool
4888 libraries that it depends on are installed.
4890 This wrapper executable should never be moved out of the build directory.
4891 If it is, it will not operate correctly.
4893 Currently, it simply execs the wrapper *script* "/bin/sh $output",
4894 but could eventually absorb all of the scripts functionality and
4895 exec $objdir/$outputname directly.
4898 cat >> $cwrappersource<<"EOF"
4906 #if defined(PATH_MAX)
4907 # define LT_PATHMAX PATH_MAX
4908 #elif defined(MAXPATHLEN)
4909 # define LT_PATHMAX MAXPATHLEN
4911 # define LT_PATHMAX 1024
4914 #ifndef DIR_SEPARATOR
4915 #define DIR_SEPARATOR '/'
4918 #if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \
4920 #define HAVE_DOS_BASED_FILE_SYSTEM
4921 #ifndef DIR_SEPARATOR_2
4922 #define DIR_SEPARATOR_2 '\\'
4926 #ifndef DIR_SEPARATOR_2
4927 # define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR)
4928 #else /* DIR_SEPARATOR_2 */
4929 # define IS_DIR_SEPARATOR(ch) \
4930 (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2))
4931 #endif /* DIR_SEPARATOR_2 */
4933 #define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type)))
4934 #define XFREE(stale) do { \
4935 if (stale) { free ((void *) stale); stale = 0; } \
4938 const char *program_name = NULL;
4940 void * xmalloc (size_t num);
4941 char * xstrdup (const char *string);
4942 char * basename (const char *name);
4943 char * fnqualify(const char *path);
4944 char * strendzap(char *str, const char *pat);
4945 void lt_fatal (const char *message, ...);
4948 main (int argc, char *argv[])
4953 program_name = (char *) xstrdup ((char *) basename (argv[0]));
4954 newargz = XMALLOC(char *, argc+2);
4957 cat >> $cwrappersource <<EOF
4958 newargz[0] = "$SHELL";
4961 cat >> $cwrappersource <<"EOF"
4962 newargz
[1] = fnqualify
(argv
[0]);
4963 /* we know the
script has the same name
, without the .exe
*/
4964 /* so
make sure newargz
[1] doesn
't end in .exe */
4965 strendzap(newargz[1],".exe");
4966 for (i = 1; i < argc; i++)
4967 newargz[i+1] = xstrdup(argv[i]);
4968 newargz[argc+1] = NULL;
4971 cat >> $cwrappersource <<EOF
4972 execv("$SHELL",newargz);
4975 cat >> $cwrappersource <<"EOF"
4979 xmalloc (size_t num)
4981 void * p = (void *) malloc (num);
4983 lt_fatal ("Memory exhausted");
4989 xstrdup (const char *string)
4991 return string ? strcpy ((char *) xmalloc (strlen (string) + 1), string) : NULL
4996 basename (const char *name)
5000 #if defined (HAVE_DOS_BASED_FILE_SYSTEM)
5001 /* Skip over the disk name in MSDOS pathnames. */
5002 if (isalpha (name[0]) && name[1] == ':')
5006 for (base = name; *name; name++)
5007 if (IS_DIR_SEPARATOR (*name))
5009 return (char *) base;
5013 fnqualify(const char *path)
5017 char tmp[LT_PATHMAX + 1];
5019 assert(path != NULL);
5021 /* Is it qualified already? */
5022 #if defined (HAVE_DOS_BASED_FILE_SYSTEM)
5023 if (isalpha (path[0]) && path[1] == ':')
5024 return xstrdup (path);
5026 if (IS_DIR_SEPARATOR (path[0]))
5027 return xstrdup (path);
5029 /* prepend the current directory */
5030 /* doesn't handle
'~' */
5031 if (getcwd
(tmp
, LT_PATHMAX
) == NULL
)
5032 lt_fatal
("getcwd failed");
5033 size
= strlen
(tmp
) + 1 + strlen
(path
) + 1; /* +2 for '/' and
'\0' */
5034 p
= XMALLOC
(char
, size
);
5035 sprintf
(p
, "%s%c%s", tmp
, DIR_SEPARATOR
, path
);
5040 strendzap
(char
*str
, const char
*pat
)
5044 assert
(str
!= NULL
);
5045 assert
(pat
!= NULL
);
5048 patlen
= strlen
(pat
);
5052 str
+= len
- patlen
;
5053 if (strcmp
(str
, pat
) == 0)
5060 lt_error_core
(int exit_status
, const char
* mode
,
5061 const char
* message
, va_list ap
)
5063 fprintf
(stderr
, "%s: %s: ", program_name
, mode
);
5064 vfprintf
(stderr
, message
, ap
);
5065 fprintf
(stderr
, ".\n");
5067 if (exit_status
>= 0)
5072 lt_fatal
(const char
*message
, ...
)
5075 va_start
(ap
, message
);
5076 lt_error_core
(EXIT_FAILURE
, "FATAL", message
, ap
);
5080 # we should really use a build-platform specific compiler
5081 # here, but OTOH, the wrappers (shell script and this C one)
5082 # are only useful if you want to execute the "real" binary.
5083 # Since the "real" binary is built for $host, then this
5084 # wrapper might as well be built for $host, too.
5085 $run $LTCC -s -o $cwrapper $cwrappersource
5089 trap "$rm $output; exit 1" 1 2 15
5094 # $output - temporary wrapper script for $objdir/$outputname
5095 # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
5097 # The $output program cannot be directly executed until all the libtool
5098 # libraries that it depends on are installed.
5100 # This wrapper script should never be moved out of the build directory.
5101 # If it is, it will not operate correctly.
5103 # Sed substitution that helps us do robust quoting. It backslashifies
5104 # metacharacters that are still active within double-quoted strings.
5105 Xsed='${SED} -e 1s/^X//'
5106 sed_quote_subst='$sed_quote_subst'
5108 # The HP-UX ksh and POSIX shell print the target directory to stdout
5110 if test \"\${CDPATH+set}\" = set; then CDPATH=:; export CDPATH; fi
5112 relink_command=\"$relink_command\"
5114 # This environment variable determines our operation mode.
5115 if test \"\$libtool_install_magic\" = \"$magic\"; then
5116 # install mode needs the following variable:
5117 notinst_deplibs='$notinst_deplibs'
5119 # When we are sourced in execute mode, \$file and \$echo are already set.
5120 if test \"\$libtool_execute_magic\" != \"$magic\"; then
5123 # Make sure echo works.
5124 if test \"X\$1\" = X--no-reexec; then
5125 # Discard the --no-reexec flag, and continue.
5127 elif test \"X\`(\$echo '\t') 2>/dev/null\`\" = 'X\t'; then
5128 # Yippee, \$echo works!
5131 # Restart under the correct shell, and then maybe \$echo will work.
5132 exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"}
5138 # Find the directory that this script lives in.
5139 thisdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\`
5140 test \"x\$thisdir\" = \"x\$file\" && thisdir=.
5142 # Follow symbolic links until we get to the real thisdir.
5143 file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\`
5144 while test -n \"\$file\"; do
5145 destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\`
5147 # If there was a directory component, then change thisdir.
5148 if test \"x\$destdir\" != \"x\$file\"; then
5149 case \"\$destdir\" in
5150 [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;;
5151 *) thisdir=\"\$thisdir/\$destdir\" ;;
5155 file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\`
5156 file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\`
5159 # Try to get the absolute directory name.
5160 absdir=\`cd \"\$thisdir\" && pwd\`
5161 test -n \"\$absdir\" && thisdir=\"\$absdir\"
5164 if test "$fast_install" = yes; then
5166 program=lt-'$outputname'$exeext
5167 progdir=\"\$thisdir/$objdir\"
5169 if test ! -f \"\$progdir/\$program\" || \\
5170 { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\
5171 test \"X\$file\" != \"X\$progdir/\$program\"; }; then
5173 file=\"\$\$-\$program\"
5175 if test ! -d \"\$progdir\"; then
5176 $mkdir \"\$progdir\"
5178 $rm \"\$progdir/\$file\"
5183 # relink executable if necessary
5184 if test -n \"\$relink_command\"; then
5185 if relink_command_output=\`eval \$relink_command 2>&1\`; then :
5187 $echo \"\$relink_command_output\" >&2
5188 $rm \"\$progdir/\$file\"
5193 $mv \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null ||
5194 { $rm \"\$progdir/\$program\";
5195 $mv \"\$progdir/\$file\" \"\$progdir/\$program\"; }
5196 $rm \"\$progdir/\$file\"
5200 program='$outputname'
5201 progdir=\"\$thisdir/$objdir\"
5207 if test -f \"\$progdir/\$program\"; then"
5209 # Export our shlibpath_var if we have one.
5210 if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
5212 # Add our own library path to $shlibpath_var
5213 $shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
5215 # Some systems cannot cope with colon-terminated $shlibpath_var
5216 # The second colon is a workaround for a bug in BeOS R4 sed
5217 $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\`
5219 export $shlibpath_var
5223 # fixup the dll searchpath if we need to.
5224 if test -n "$dllsearchpath"; then
5226 # Add the dll search path components to the executable PATH
5227 PATH=$dllsearchpath:\$PATH
5232 if test \"\$libtool_execute_magic\" != \"$magic\"; then
5233 # Run the actual program with our arguments.
5236 # Backslashes separate directories on plain windows
5237 *-*-mingw |
*-*-os2*)
5239 exec \$progdir\\\\\$program \${1+\"\$@\"}
5245 exec \$progdir/\$program \${1+\"\$@\"}
5250 \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\"
5254 # The program doesn't exist.
5255 \$echo \"\$0: error: \$progdir/\$program does not exist\" 1>&2
5256 \$echo \"This script is just a wrapper for \$program.\" 1>&2
5257 $echo \"See the $PACKAGE documentation for more information.\" 1>&2
5268 # See if we need to build an old-fashioned archive.
5269 for oldlib
in $oldlibs; do
5271 if test "$build_libtool_libs" = convenience
; then
5272 oldobjs
="$libobjs_save"
5273 addlibs
="$convenience"
5274 build_libtool_libs
=no
5276 if test "$build_libtool_libs" = module
; then
5277 oldobjs
="$libobjs_save"
5278 build_libtool_libs
=no
5280 oldobjs
="$old_deplibs $non_pic_objects"
5282 addlibs
="$old_convenience"
5285 if test -n "$addlibs"; then
5286 gentop
="$output_objdir/${outputname}x"
5287 $show "${rm}r $gentop"
5288 $run ${rm}r
"$gentop"
5289 $show "$mkdir $gentop"
5290 $run $mkdir "$gentop"
5292 if test "$status" -ne 0 && test ! -d "$gentop"; then
5295 generated
="$generated $gentop"
5297 # Add in members from convenience archives.
5298 for xlib
in $addlibs; do
5299 # Extract the objects.
5301 [\\/]* |
[A-Za-z
]:[\\/]*) xabs
="$xlib" ;;
5302 *) xabs
=`pwd`"/$xlib" ;;
5304 xlib
=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
5305 xdir
="$gentop/$xlib"
5307 $show "${rm}r $xdir"
5309 $show "$mkdir $xdir"
5312 if test "$status" -ne 0 && test ! -d "$xdir"; then
5315 # We will extract separately just the conflicting names and we will no
5316 # longer touch any unique names. It is faster to leave these extract
5317 # automatically by $AR in one run.
5318 $show "(cd $xdir && $AR x $xabs)"
5319 $run eval "(cd \$xdir && $AR x \$xabs)" ||
exit $?
5320 if ($AR t
"$xabs" |
sort |
sort -uc >/dev
/null
2>&1); then
5323 $echo "$modename: warning: object name conflicts; renaming object files" 1>&2
5324 $echo "$modename: warning: to ensure that they will not overwrite" 1>&2
5325 $AR t
"$xabs" |
sort |
uniq -cd |
while read -r count name
5328 while test "$i" -le "$count"
5330 # Put our $i before any first dot (extension)
5331 # Never overwrite any file
5333 while test "X$name_to" = "X$name" ||
test -f "$xdir/$name_to"
5335 name_to
=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"`
5337 $show "(cd $xdir && $AR xN $i $xabs '$name' && $mv '$name' '$name_to')"
5338 $run eval "(cd \$xdir && $AR xN $i \$xabs '$name' && $mv '$name' '$name_to')" ||
exit $?
5344 oldobjs
="$oldobjs "`find $xdir -name \*.${objext} -print -o -name \*.lo -print | $NL2SP`
5348 # Do each command in the archive commands.
5349 if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
5350 eval cmds
=\"$old_archive_from_new_cmds\"
5352 eval cmds
=\"$old_archive_cmds\"
5354 if len
=`expr "X$cmds" : ".*"` &&
5355 test "$len" -le "$max_cmd_len" ||
test "$max_cmd_len" -le -1; then
5358 # the command line is too long to link in one step, link in parts
5359 $echo "using piecewise archive linking..."
5364 save_oldobjs
=$oldobjs
5365 # GNU ar 2.10+ was changed to match POSIX; thus no paths are
5366 # encoded into archives. This makes 'ar r' malfunction in
5367 # this piecewise linking case whenever conflicting object
5368 # names appear in distinct ar calls; check, warn and compensate.
5369 if (for obj
in $save_oldobjs
5371 $echo "X$obj" |
$Xsed -e 's%^.*/%%'
5372 done |
sort |
sort -uc >/dev
/null
2>&1); then
5375 $echo "$modename: warning: object name conflicts; overriding AR_FLAGS to 'cq'" 1>&2
5376 $echo "$modename: warning: to ensure that POSIX-compatible ar will work" 1>&2
5379 # Is there a better way of finding the last object in the list?
5380 for obj
in $save_oldobjs
5384 for obj
in $save_oldobjs
5386 oldobjs
="$objlist $obj"
5387 objlist
="$objlist $obj"
5388 eval test_cmds
=\"$old_archive_cmds\"
5389 if len
=`expr "X$test_cmds" : ".*"` &&
5390 test "$len" -le "$max_cmd_len"; then
5393 # the above command should be used before it gets too long
5395 if test "$obj" = "$last_oldobj" ; then
5398 test -z "$concat_cmds" || concat_cmds
=$concat_cmds~
5399 eval concat_cmds
=\"\
${concat_cmds}$old_archive_cmds\"
5405 if test "X$oldobjs" = "X" ; then
5406 eval cmds
=\"\
$concat_cmds\"
5408 eval cmds
=\"\
$concat_cmds~
$old_archive_cmds\"
5412 save_ifs
="$IFS"; IFS
='~'
5413 for cmd
in $cmds; do
5416 $run eval "$cmd" ||
exit $?
5421 if test -n "$generated"; then
5422 $show "${rm}r$generated"
5423 $run ${rm}r
$generated
5426 # Now create the libtool archive.
5430 test "$build_old_libs" = yes && old_library
="$libname.$libext"
5431 $show "creating $output"
5433 # Preserve any variables that may affect compiler behavior
5434 for var
in $variables_saved_for_relink; do
5435 if eval test -z \"\
${$var+set}\"; then
5436 relink_command
="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command"
5437 elif eval var_value
=\$
$var; test -z "$var_value"; then
5438 relink_command
="$var=; export $var; $relink_command"
5440 var_value
=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"`
5441 relink_command
="$var=\"$var_value\"; export $var; $relink_command"
5444 # Quote the link command for shipping.
5445 relink_command
="(cd `pwd`; $SHELL $0 $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
5446 relink_command
=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
5447 if test "$hardcode_automatic" = yes ; then
5450 # Only create the output if not a dry run.
5451 if test -z "$run"; then
5452 for installed
in no
yes; do
5453 if test "$installed" = yes; then
5454 if test -z "$install_libdir"; then
5457 output
="$output_objdir/$outputname"i
5458 # Replace all uninstalled libtool libraries with the installed ones
5460 for deplib
in $dependency_libs; do
5463 name
=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'`
5464 eval libdir
=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
5465 if test -z "$libdir"; then
5466 $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
5469 newdependency_libs
="$newdependency_libs $libdir/$name"
5471 *) newdependency_libs
="$newdependency_libs $deplib" ;;
5474 dependency_libs
="$newdependency_libs"
5476 for lib
in $dlfiles; do
5477 name
=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
5478 eval libdir
=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
5479 if test -z "$libdir"; then
5480 $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
5483 newdlfiles
="$newdlfiles $libdir/$name"
5485 dlfiles
="$newdlfiles"
5487 for lib
in $dlprefiles; do
5488 name
=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
5489 eval libdir
=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
5490 if test -z "$libdir"; then
5491 $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
5494 newdlprefiles
="$newdlprefiles $libdir/$name"
5496 dlprefiles
="$newdlprefiles"
5499 for lib
in $dlfiles; do
5501 [\\/]* |
[A-Za-z
]:[\\/]*) abs
="$lib" ;;
5502 *) abs
=`pwd`"/$lib" ;;
5504 newdlfiles
="$newdlfiles $abs"
5506 dlfiles
="$newdlfiles"
5508 for lib
in $dlprefiles; do
5510 [\\/]* |
[A-Za-z
]:[\\/]*) abs
="$lib" ;;
5511 *) abs
=`pwd`"/$lib" ;;
5513 newdlprefiles
="$newdlprefiles $abs"
5515 dlprefiles
="$newdlprefiles"
5518 # place dlname in correct position for cygwin
5520 case $host,$output,$installed,$module,$dlname in
5521 *cygwin
*,*lai
,yes,no
,*.dll |
*mingw
*,*lai
,yes,no
,*.dll
) tdlname
=..
/bin
/$dlname ;;
5524 # $outputname - a libtool library file
5525 # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
5527 # Please DO NOT delete this file!
5528 # It is necessary for linking the library.
5530 # The name that we can dlopen(3).
5533 # Names of this library.
5534 library_names='$library_names'
5536 # The name of the static archive.
5537 old_library='$old_library'
5539 # Libraries that this one depends upon.
5540 dependency_libs='$dependency_libs'
5542 # Version information for $libname.
5547 # Is this an already installed library?
5548 installed=$installed
5550 # Should we warn about portability when linking against -modules?
5551 shouldnotlink=$module
5553 # Files to dlopen/dlpreopen
5555 dlpreopen='$dlprefiles'
5557 # Directory that this library needs to be installed in:
5558 libdir='$install_libdir'"
5559 if test "$installed" = no
&& test "$need_relink" = yes; then
5561 relink_command=\"$relink_command\""
5566 # Do a symbolic link so that the libtool archive can be found in
5567 # LD_LIBRARY_PATH before the program is installed.
5568 $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)"
5569 $run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' ||
exit $?
5575 # libtool install mode
5577 modename
="$modename: install"
5579 # There may be an optional sh(1) argument at the beginning of
5580 # install_prog (especially on Windows NT).
5581 if test "$nonopt" = "$SHELL" ||
test "$nonopt" = /bin
/sh ||
5582 # Allow the use of GNU shtool's install command.
5583 $echo "X$nonopt" |
$Xsed |
grep shtool
> /dev
/null
; then
5584 # Aesthetically quote it.
5585 arg
=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"`
5587 *[\
[\~\
#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
5591 install_prog
="$arg "
5599 # The real first argument should be the name of the installation program.
5600 # Aesthetically quote it.
5601 arg
=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
5603 *[\
[\~\
#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
5607 install_prog
="$install_prog$arg"
5609 # We need to accept at least all the BSD install flags.
5619 if test -n "$dest"; then
5620 files
="$files $dest"
5638 # If the previous option needed an argument, then skip it.
5639 if test -n "$prev"; then
5648 # Aesthetically quote the argument.
5649 arg
=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
5651 *[\
[\~\
#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
5655 install_prog
="$install_prog $arg"
5658 if test -z "$install_prog"; then
5659 $echo "$modename: you must specify an install program" 1>&2
5664 if test -n "$prev"; then
5665 $echo "$modename: the \`$prev' option requires an argument" 1>&2
5670 if test -z "$files"; then
5671 if test -z "$dest"; then
5672 $echo "$modename: no file or destination specified" 1>&2
5674 $echo "$modename: you must specify a destination" 1>&2
5680 # Strip any trailing slash from the destination.
5681 dest
=`$echo "X$dest" | $Xsed -e 's%/$%%'`
5683 # Check to see that the destination is a directory.
5684 test -d "$dest" && isdir
=yes
5685 if test "$isdir" = yes; then
5689 destdir
=`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'`
5690 test "X$destdir" = "X$dest" && destdir
=.
5691 destname
=`$echo "X$dest" | $Xsed -e 's%^.*/%%'`
5693 # Not a directory, so check to see that there is only one file specified.
5695 if test "$#" -gt 2; then
5696 $echo "$modename: \`$dest' is not a directory" 1>&2
5702 [\\/]* |
[A-Za-z
]:[\\/]*) ;;
5704 for file in $files; do
5708 $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2
5717 # This variable tells wrapper scripts just to set variables rather
5718 # than running their programs.
5719 libtool_install_magic
="$magic"
5724 for file in $files; do
5726 # Do each installation.
5729 # Do the static libraries later.
5730 staticlibs
="$staticlibs $file"
5734 # Check to see that this really is a libtool archive.
5735 if (${SED} -e '2q' $file |
grep "^# Generated by .*$PACKAGE") >/dev
/null
2>&1; then :
5737 $echo "$modename: \`$file' is not a valid libtool archive" 1>&2
5745 # If there is no directory component, then add one.
5747 */* |
*\\*) .
$file ;;
5751 # Add the libdir to current_libdirs if it is the destination.
5752 if test "X$destdir" = "X$libdir"; then
5753 case "$current_libdirs " in
5755 *) current_libdirs
="$current_libdirs $libdir" ;;
5758 # Note the libdir as a future libdir.
5759 case "$future_libdirs " in
5761 *) future_libdirs
="$future_libdirs $libdir" ;;
5765 dir
=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/
5766 test "X$dir" = "X$file/" && dir
=
5769 if test -n "$relink_command"; then
5770 # Determine the prefix the user has applied to our future dir.
5771 inst_prefix_dir
=`$echo "$destdir" | $SED "s%$libdir\$%%"`
5773 # Don't allow the user to place us outside of our expected
5774 # location b/c this prevents finding dependent libraries that
5775 # are installed to the same prefix.
5776 # At present, this check doesn't affect windows .dll's that
5777 # are installed into $libdir/../bin (currently, that works fine)
5778 # but it's something to keep an eye on.
5779 if test "$inst_prefix_dir" = "$destdir"; then
5780 $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2
5784 if test -n "$inst_prefix_dir"; then
5785 # Stick the inst_prefix_dir data into the link command.
5786 relink_command
=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"`
5788 relink_command
=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%%"`
5791 $echo "$modename: warning: relinking \`$file'" 1>&2
5792 $show "$relink_command"
5793 if $run eval "$relink_command"; then :
5795 $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
5800 # See the names of the shared library.
5801 set dummy
$library_names
5802 if test -n "$2"; then
5808 test -n "$relink_command" && srcname
="$realname"T
5810 # Install the shared library and build the symlinks.
5811 $show "$install_prog $dir/$srcname $destdir/$realname"
5812 $run eval "$install_prog $dir/$srcname $destdir/$realname" ||
exit $?
5813 if test -n "$stripme" && test -n "$striplib"; then
5814 $show "$striplib $destdir/$realname"
5815 $run eval "$striplib $destdir/$realname" ||
exit $?
5818 if test "$#" -gt 0; then
5819 # Delete the old symlinks, and create new ones.
5822 if test "$linkname" != "$realname"; then
5823 $show "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)"
5824 $run eval "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)"
5829 # Do each command in the postinstall commands.
5830 lib
="$destdir/$realname"
5831 eval cmds
=\"$postinstall_cmds\"
5832 save_ifs
="$IFS"; IFS
='~'
5833 for cmd
in $cmds; do
5836 $run eval "$cmd" ||
exit $?
5841 # Install the pseudo-library for information purposes.
5842 name
=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
5843 instname
="$dir/$name"i
5844 $show "$install_prog $instname $destdir/$name"
5845 $run eval "$install_prog $instname $destdir/$name" ||
exit $?
5847 # Maybe install the static library, too.
5848 test -n "$old_library" && staticlibs
="$staticlibs $dir/$old_library"
5852 # Install (i.e. copy) a libtool object.
5854 # Figure out destination file name, if it wasn't already specified.
5855 if test -n "$destname"; then
5856 destfile
="$destdir/$destname"
5858 destfile
=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
5859 destfile
="$destdir/$destfile"
5862 # Deduce the name of the destination old-style object file.
5865 staticdest
=`$echo "X$destfile" | $Xsed -e "$lo2o"`
5868 staticdest
="$destfile"
5872 $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2
5878 # Install the libtool object if requested.
5879 if test -n "$destfile"; then
5880 $show "$install_prog $file $destfile"
5881 $run eval "$install_prog $file $destfile" ||
exit $?
5884 # Install the old object if enabled.
5885 if test "$build_old_libs" = yes; then
5886 # Deduce the name of the old-style object file.
5887 staticobj
=`$echo "X$file" | $Xsed -e "$lo2o"`
5889 $show "$install_prog $staticobj $staticdest"
5890 $run eval "$install_prog \$staticobj \$staticdest" ||
exit $?
5896 # Figure out destination file name, if it wasn't already specified.
5897 if test -n "$destname"; then
5898 destfile
="$destdir/$destname"
5900 destfile
=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
5901 destfile
="$destdir/$destfile"
5904 # If the file is missing, and there is a .exe on the end, strip it
5905 # because it is most likely a libtool script we actually want to
5910 if test ! -f "$file"; then
5911 file=`$echo $file|${SED} 's,.exe$,,'`
5917 # Do a test to see if this is really a libtool program.
5920 wrapper
=`$echo $file | ${SED} -e 's,.exe$,,'`
5926 if (${SED} -e '4q' $wrapper |
grep "^# Generated by .*$PACKAGE")>/dev
/null
2>&1; then
5930 # To insure that "foo" is sourced, and not "foo.exe",
5931 # finese the cygwin/MSYS system by explicitly sourcing "foo."
5932 # which disallows the automatic-append-.exe behavior.
5934 *cygwin
* |
*mingw
*) wrapperdot
=${wrapper}.
;;
5935 *) wrapperdot
=${wrapper} ;;
5937 # If there is no directory component, then add one.
5939 */* |
*\\*) .
${wrapperdot} ;;
5940 *) . .
/${wrapperdot} ;;
5943 # Check the variables that should have been set.
5944 if test -z "$notinst_deplibs"; then
5945 $echo "$modename: invalid libtool wrapper script \`$wrapper'" 1>&2
5950 for lib
in $notinst_deplibs; do
5951 # Check to see that each library is installed.
5953 if test -f "$lib"; then
5954 # If there is no directory component, then add one.
5956 */* |
*\\*) .
$lib ;;
5960 libfile
="$libdir/"`$echo "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test
5961 if test -n "$libdir" && test ! -f "$libfile"; then
5962 $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2
5968 # To insure that "foo" is sourced, and not "foo.exe",
5969 # finese the cygwin/MSYS system by explicitly sourcing "foo."
5970 # which disallows the automatic-append-.exe behavior.
5972 *cygwin
* |
*mingw
*) wrapperdot
=${wrapper}.
;;
5973 *) wrapperdot
=${wrapper} ;;
5975 # If there is no directory component, then add one.
5977 */* |
*\\*) .
${wrapperdot} ;;
5978 *) . .
/${wrapperdot} ;;
5982 if test "$fast_install" = no
&& test -n "$relink_command"; then
5983 if test "$finalize" = yes && test -z "$run"; then
5985 test -n "$TMPDIR" && tmpdir
="$TMPDIR"
5986 tmpdir
="$tmpdir/libtool-$$"
5987 if $mkdir "$tmpdir" && chmod 700 "$tmpdir"; then :
5989 $echo "$modename: error: cannot create temporary directory \`$tmpdir'" 1>&2
5992 file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'`
5993 outputname
="$tmpdir/$file"
5994 # Replace the output file specification.
5995 relink_command
=`$echo "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'`
5997 $show "$relink_command"
5998 if $run eval "$relink_command"; then :
6000 $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
6006 $echo "$modename: warning: cannot relink \`$file'" 1>&2
6009 # Install the binary that we compiled earlier.
6010 file=`$echo "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"`
6014 # remove .exe since cygwin /usr/bin/install will append another
6016 case $install_prog,$host in
6017 */usr
/bin
/install*,*cygwin
*)
6018 case $file:$destfile in
6023 destfile
=$destfile.exe
6026 destfile
=`$echo $destfile | ${SED} -e 's,.exe$,,'`
6031 $show "$install_prog$stripme $file $destfile"
6032 $run eval "$install_prog\$stripme \$file \$destfile" ||
exit $?
6033 test -n "$outputname" && ${rm}r
"$tmpdir"
6038 for file in $staticlibs; do
6039 name
=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
6041 # Set up the ranlib parameters.
6042 oldlib
="$destdir/$name"
6044 $show "$install_prog $file $oldlib"
6045 $run eval "$install_prog \$file \$oldlib" ||
exit $?
6047 if test -n "$stripme" && test -n "$striplib"; then
6048 $show "$old_striplib $oldlib"
6049 $run eval "$old_striplib $oldlib" ||
exit $?
6052 # Do each command in the postinstall commands.
6053 eval cmds
=\"$old_postinstall_cmds\"
6054 save_ifs
="$IFS"; IFS
='~'
6055 for cmd
in $cmds; do
6058 $run eval "$cmd" ||
exit $?
6063 if test -n "$future_libdirs"; then
6064 $echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2
6067 if test -n "$current_libdirs"; then
6068 # Maybe just do a dry run.
6069 test -n "$run" && current_libdirs
=" -n$current_libdirs"
6070 exec_cmd
='$SHELL $0 $preserve_args --finish$current_libdirs'
6076 # libtool finish mode
6078 modename
="$modename: finish"
6082 if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
6085 libdirs
="$libdirs $dir"
6088 for libdir
in $libdirs; do
6089 if test -n "$finish_cmds"; then
6090 # Do each command in the finish commands.
6091 eval cmds
=\"$finish_cmds\"
6092 save_ifs
="$IFS"; IFS
='~'
6093 for cmd
in $cmds; do
6096 $run eval "$cmd" || admincmds
="$admincmds
6101 if test -n "$finish_eval"; then
6102 # Do the single finish_eval.
6103 eval cmds
=\"$finish_eval\"
6104 $run eval "$cmds" || admincmds
="$admincmds
6110 # Exit here if they wanted silent mode.
6111 test "$show" = : && exit 0
6113 $echo "----------------------------------------------------------------------"
6114 $echo "Libraries have been installed in:"
6115 for libdir
in $libdirs; do
6119 $echo "If you ever happen to want to link against installed libraries"
6120 $echo "in a given directory, LIBDIR, you must either use libtool, and"
6121 $echo "specify the full pathname of the library, or use the \`-LLIBDIR'"
6122 $echo "flag during linking and do at least one of the following:"
6123 if test -n "$shlibpath_var"; then
6124 $echo " - add LIBDIR to the \`$shlibpath_var' environment variable"
6125 $echo " during execution"
6127 if test -n "$runpath_var"; then
6128 $echo " - add LIBDIR to the \`$runpath_var' environment variable"
6129 $echo " during linking"
6131 if test -n "$hardcode_libdir_flag_spec"; then
6133 eval flag
=\"$hardcode_libdir_flag_spec\"
6135 $echo " - use the \`$flag' linker flag"
6137 if test -n "$admincmds"; then
6138 $echo " - have your system administrator run these commands:$admincmds"
6140 if test -f /etc
/ld.so.conf
; then
6141 $echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
6144 $echo "See any operating system documentation about shared libraries for"
6145 $echo "more information, such as the ld(1) and ld.so(8) manual pages."
6146 $echo "----------------------------------------------------------------------"
6150 # libtool execute mode
6152 modename
="$modename: execute"
6154 # The first argument is the command name.
6156 if test -z "$cmd"; then
6157 $echo "$modename: you must specify a COMMAND" 1>&2
6162 # Handle -dlopen flags immediately.
6163 for file in $execute_dlfiles; do
6164 if test ! -f "$file"; then
6165 $echo "$modename: \`$file' is not a file" 1>&2
6173 # Check to see that this really is a libtool archive.
6174 if (${SED} -e '2q' $file |
grep "^# Generated by .*$PACKAGE") >/dev
/null
2>&1; then :
6176 $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
6181 # Read the libtool library.
6185 # If there is no directory component, then add one.
6187 */* |
*\\*) .
$file ;;
6191 # Skip this library if it cannot be dlopened.
6192 if test -z "$dlname"; then
6193 # Warn if it was a shared library.
6194 test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'"
6198 dir
=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
6199 test "X$dir" = "X$file" && dir
=.
6201 if test -f "$dir/$objdir/$dlname"; then
6204 $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2
6210 # Just add the directory containing the .lo file.
6211 dir
=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
6212 test "X$dir" = "X$file" && dir
=.
6216 $echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2
6221 # Get the absolute pathname.
6222 absdir
=`cd "$dir" && pwd`
6223 test -n "$absdir" && dir
="$absdir"
6225 # Now add the directory to shlibpath_var.
6226 if eval "test -z \"\$$shlibpath_var\""; then
6227 eval "$shlibpath_var=\"\$dir\""
6229 eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\""
6233 # This variable tells wrapper scripts just to set shlibpath_var
6234 # rather than running their programs.
6235 libtool_execute_magic
="$magic"
6237 # Check if any of the arguments is a wrapper script.
6244 # Do a test to see if this is really a libtool program.
6245 if (${SED} -e '4q' $file |
grep "^# Generated by .*$PACKAGE") >/dev
/null
2>&1; then
6246 # If there is no directory component, then add one.
6248 */* |
*\\*) .
$file ;;
6252 # Transform arg to wrapped name.
6253 file="$progdir/$program"
6257 # Quote arguments (to preserve shell metacharacters).
6258 file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"`
6259 args
="$args \"$file\""
6262 if test -z "$run"; then
6263 if test -n "$shlibpath_var"; then
6264 # Export the shlibpath_var.
6265 eval "export $shlibpath_var"
6268 # Restore saved environment variables
6269 if test "${save_LC_ALL+set}" = set; then
6270 LC_ALL
="$save_LC_ALL"; export LC_ALL
6272 if test "${save_LANG+set}" = set; then
6273 LANG
="$save_LANG"; export LANG
6276 # Now prepare to actually exec the command.
6277 exec_cmd
="\$cmd$args"
6279 # Display what would be done.
6280 if test -n "$shlibpath_var"; then
6281 eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\""
6282 $echo "export $shlibpath_var"
6289 # libtool clean and uninstall mode
6291 modename
="$modename: $mode"
6297 # This variable tells wrapper scripts just to set variables rather
6298 # than running their programs.
6299 libtool_install_magic
="$magic"
6304 -f) rm="$rm $arg"; rmforce
=yes ;;
6305 -*) rm="$rm $arg" ;;
6306 *) files
="$files $arg" ;;
6310 if test -z "$rm"; then
6311 $echo "$modename: you must specify an RM program" 1>&2
6318 origobjdir
="$objdir"
6319 for file in $files; do
6320 dir
=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
6321 if test "X$dir" = "X$file"; then
6323 objdir
="$origobjdir"
6325 objdir
="$dir/$origobjdir"
6327 name
=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
6328 test "$mode" = uninstall
&& objdir
="$dir"
6330 # Remember objdir for removal later, being careful to avoid duplicates
6331 if test "$mode" = clean
; then
6334 *) rmdirs
="$rmdirs $objdir" ;;
6338 # Don't error if the file doesn't exist and rm -f was used.
6339 if (test -L "$file") >/dev
/null
2>&1 \
6340 ||
(test -h "$file") >/dev
/null
2>&1 \
6341 ||
test -f "$file"; then
6343 elif test -d "$file"; then
6346 elif test "$rmforce" = yes; then
6354 # Possibly a libtool archive, so verify it.
6355 if (${SED} -e '2q' $file |
grep "^# Generated by .*$PACKAGE") >/dev
/null
2>&1; then
6358 # Delete the libtool libraries and symlinks.
6359 for n
in $library_names; do
6360 rmfiles
="$rmfiles $objdir/$n"
6362 test -n "$old_library" && rmfiles
="$rmfiles $objdir/$old_library"
6363 test "$mode" = clean
&& rmfiles
="$rmfiles $objdir/$name $objdir/${name}i"
6365 if test "$mode" = uninstall
; then
6366 if test -n "$library_names"; then
6367 # Do each command in the postuninstall commands.
6368 eval cmds
=\"$postuninstall_cmds\"
6369 save_ifs
="$IFS"; IFS
='~'
6370 for cmd
in $cmds; do
6374 if test "$?" -ne 0 && test "$rmforce" != yes; then
6381 if test -n "$old_library"; then
6382 # Do each command in the old_postuninstall commands.
6383 eval cmds
=\"$old_postuninstall_cmds\"
6384 save_ifs
="$IFS"; IFS
='~'
6385 for cmd
in $cmds; do
6389 if test "$?" -ne 0 && test "$rmforce" != yes; then
6395 # FIXME: should reinstall the best remaining shared library.
6401 # Possibly a libtool object, so verify it.
6402 if (${SED} -e '2q' $file |
grep "^# Generated by .*$PACKAGE") >/dev
/null
2>&1; then
6407 # Add PIC object to the list of files to remove.
6408 if test -n "$pic_object" \
6409 && test "$pic_object" != none
; then
6410 rmfiles
="$rmfiles $dir/$pic_object"
6413 # Add non-PIC object to the list of files to remove.
6414 if test -n "$non_pic_object" \
6415 && test "$non_pic_object" != none
; then
6416 rmfiles
="$rmfiles $dir/$non_pic_object"
6422 if test "$mode" = clean
; then
6426 file=`$echo $file|${SED} 's,.exe$,,'`
6427 noexename
=`$echo $name|${SED} 's,.exe$,,'`
6428 # $file with .exe has already been added to rmfiles,
6429 # add $file without .exe
6430 rmfiles
="$rmfiles $file"
6433 # Do a test to see if this is a libtool program.
6434 if (${SED} -e '4q' $file |
grep "^# Generated by .*$PACKAGE") >/dev
/null
2>&1; then
6438 # note $name still contains .exe if it was in $file originally
6439 # as does the version of $file that was added into $rmfiles
6440 rmfiles
="$rmfiles $objdir/$name $objdir/${name}S.${objext}"
6441 if test "$fast_install" = yes && test -n "$relink_command"; then
6442 rmfiles
="$rmfiles $objdir/lt-$name"
6444 if test "X$noexename" != "X$name" ; then
6445 rmfiles
="$rmfiles $objdir/lt-${noexename}.c"
6451 $show "$rm $rmfiles"
6452 $run $rm $rmfiles || exit_status
=1
6454 objdir
="$origobjdir"
6456 # Try to remove the ${objdir}s in the directories where we deleted files
6457 for dir
in $rmdirs; do
6458 if test -d "$dir"; then
6460 $run rmdir $dir >/dev
/null
2>&1
6468 $echo "$modename: you must specify a MODE" 1>&2
6469 $echo "$generic_help" 1>&2
6474 if test -z "$exec_cmd"; then
6475 $echo "$modename: invalid operation mode \`$mode'" 1>&2
6476 $echo "$generic_help" 1>&2
6479 fi # test -z "$show_help"
6481 if test -n "$exec_cmd"; then
6486 # We need to display help for each of the modes.
6489 "Usage: $modename [OPTION]... [MODE-ARG]...
6491 Provide generalized library-building support services.
6493 --config show all configuration variables
6494 --debug enable verbose shell tracing
6495 -n, --dry-run display commands without modifying any files
6496 --features display basic configuration information and exit
6497 --finish same as \`--mode=finish'
6498 --help display this help message and exit
6499 --mode=MODE use operation mode MODE [default=inferred from MODE-ARGS]
6500 --quiet same as \`--silent'
6501 --silent don't print informational messages
6502 --tag=TAG use configuration variables from tag TAG
6503 --version print version information
6505 MODE must be one of the following:
6507 clean remove files from the build directory
6508 compile compile a source file into a libtool object
6509 execute automatically set library path, then run a program
6510 finish complete the installation of libtool libraries
6511 install install libraries or executables
6512 link create a library or an executable
6513 uninstall remove libraries from an installed directory
6515 MODE-ARGS vary depending on the MODE. Try \`$modename --help --mode=MODE' for
6516 a more detailed description of MODE.
6518 Report bugs to <bug-libtool@gnu.org>."
6524 "Usage: $modename [OPTION]... --mode=clean RM [RM-OPTION]... FILE...
6526 Remove files from the build directory.
6528 RM is the name of the program to use to delete files associated with each FILE
6529 (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed
6532 If FILE is a libtool library, object or program, all the files associated
6533 with it are deleted. Otherwise, only FILE itself is deleted using RM."
6538 "Usage: $modename [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE
6540 Compile a source file into a libtool library object.
6542 This mode accepts the following additional options:
6544 -o OUTPUT-FILE set the output file name to OUTPUT-FILE
6545 -prefer-pic try to building PIC objects only
6546 -prefer-non-pic try to building non-PIC objects only
6547 -static always build a \`.o' file suitable for static linking
6549 COMPILE-COMMAND is a command to be used in creating a \`standard' object file
6550 from the given SOURCEFILE.
6552 The output file name is determined by removing the directory component from
6553 SOURCEFILE, then substituting the C source code suffix \`.c' with the
6554 library object suffix, \`.lo'."
6559 "Usage: $modename [OPTION]... --mode=execute COMMAND [ARGS]...
6561 Automatically set library path, then run a program.
6563 This mode accepts the following additional options:
6565 -dlopen FILE add the directory containing FILE to the library path
6567 This mode sets the library path environment variable according to \`-dlopen'
6570 If any of the ARGS are libtool executable wrappers, then they are translated
6571 into their corresponding uninstalled binary, and any of their required library
6572 directories are added to the library path.
6574 Then, COMMAND is executed, with ARGS as arguments."
6579 "Usage: $modename [OPTION]... --mode=finish [LIBDIR]...
6581 Complete the installation of libtool libraries.
6583 Each LIBDIR is a directory that contains libtool libraries.
6585 The commands that this mode executes may require superuser privileges. Use
6586 the \`--dry-run' option if you just want to see what would be executed."
6591 "Usage: $modename [OPTION]... --mode=install INSTALL-COMMAND...
6593 Install executables or libraries.
6595 INSTALL-COMMAND is the installation command. The first component should be
6596 either the \`install' or \`cp' program.
6598 The rest of the components are interpreted as arguments to that command (only
6599 BSD-compatible install options are recognized)."
6604 "Usage: $modename [OPTION]... --mode=link LINK-COMMAND...
6606 Link object files or libraries together to form another library, or to
6607 create an executable program.
6609 LINK-COMMAND is a command using the C compiler that you would use to create
6610 a program from several object files.
6612 The following components of LINK-COMMAND are treated specially:
6614 -all-static do not do any dynamic linking at all
6615 -avoid-version do not add a version suffix if possible
6616 -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime
6617 -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols
6618 -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
6619 -export-symbols SYMFILE
6620 try to export only the symbols listed in SYMFILE
6621 -export-symbols-regex REGEX
6622 try to export only the symbols matching REGEX
6623 -LLIBDIR search LIBDIR for required installed libraries
6624 -lNAME OUTPUT-FILE requires the installed library libNAME
6625 -module build a library that can dlopened
6626 -no-fast-install disable the fast-install mode
6627 -no-install link a not-installable executable
6628 -no-undefined declare that a library does not refer to external symbols
6629 -o OUTPUT-FILE create OUTPUT-FILE from the specified objects
6630 -objectlist FILE Use a list of object files found in FILE to specify objects
6631 -release RELEASE specify package release information
6632 -rpath LIBDIR the created library will eventually be installed in LIBDIR
6633 -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries
6634 -static do not do any dynamic linking of libtool libraries
6635 -version-info CURRENT[:REVISION[:AGE]]
6636 specify library version info [each variable defaults to 0]
6638 All other options (arguments beginning with \`-') are ignored.
6640 Every other argument is treated as a filename. Files ending in \`.la' are
6641 treated as uninstalled libtool libraries, other files are standard or library
6644 If the OUTPUT-FILE ends in \`.la', then a libtool library is created,
6645 only library objects (\`.lo' files) may be specified, and \`-rpath' is
6646 required, except when creating a convenience library.
6648 If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created
6649 using \`ar' and \`ranlib', or on Windows using \`lib'.
6651 If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file
6652 is created, otherwise an executable program is created."
6657 "Usage: $modename [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE...
6659 Remove libraries from an installation directory.
6661 RM is the name of the program to use to delete files associated with each FILE
6662 (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed
6665 If FILE is a libtool library, all the files associated with it are deleted.
6666 Otherwise, only FILE itself is deleted using RM."
6670 $echo "$modename: invalid operation mode \`$mode'" 1>&2
6677 $echo "Try \`$modename --help' for more information about other modes."
6681 # The TAGs below are defined such that we never get into a situation
6682 # in which we disable both kinds of libraries. Given conflicting
6683 # choices, we go for a static library, that is the most portable,
6684 # since we can't tell whether shared libraries were disabled because
6685 # the user asked for that or because the platform doesn't support
6686 # them. This is particularly important on AIX, because we don't
6687 # support having both static and shared libraries enabled at the same
6688 # time on that platform, so we default to a shared-only configuration.
6689 # If a disable-shared tag is given, we'll fallback to a static-only
6690 # configuration. But we'll never go from static-only to shared-only.
6692 # ### BEGIN LIBTOOL TAG CONFIG: disable-shared
6693 build_libtool_libs
=no
6695 # ### END LIBTOOL TAG CONFIG: disable-shared
6697 # ### BEGIN LIBTOOL TAG CONFIG: disable-static
6698 build_old_libs
=`case $build_libtool_libs in yes) $echo no;; *) $echo yes;; esac`
6699 # ### END LIBTOOL TAG CONFIG: disable-static
6705 # ### BEGIN LIBTOOL TAG CONFIG: CXX
6707 # Libtool was configured on host carpe-diem:
6709 # Shell to use when invoking shell scripts.
6712 # Whether or not to build shared libraries.
6713 build_libtool_libs
=yes
6715 # Whether or not to build static libraries.
6718 # Whether or not to add -lc for building shared libraries.
6719 build_libtool_need_lc
=no
6721 # Whether or not to disallow shared libs when runtime libs are static
6722 allow_libtool_libs_with_static_runtimes
=no
6724 # Whether or not to optimize for fast installation.
6729 host=i686-pc-linux-gnu
6731 # An echo program that does not interpret backslashes.
6741 # A language-specific compiler.
6744 # Is the compiler the GNU C compiler?
6750 # The linker used to build libraries.
6753 # Whether we need hard or soft links.
6756 # A BSD-compatible nm program.
6759 # A symbol stripping program
6762 # Used to examine libraries when file_magic_cmd begins "file"
6765 # Used on cygwin: DLL creation program.
6768 # Used on cygwin: object dumper.
6771 # Used on cygwin: assembler.
6774 # The name of the directory that contains temporary libtool files.
6777 # How to create reloadable object files.
6779 reload_cmds
="\$LD\$reload_flag -o \$output\$reload_objs"
6781 # How to pass a linker flag through the compiler.
6784 # Object file suffix (normally "o").
6787 # Old archive suffix (normally "a").
6790 # Shared library suffix (normally ".so").
6793 # Executable file suffix (normally "").
6796 # Additional compiler flags for building library objects.
6797 pic_flag
=" -fPIC -DPIC"
6800 # What is the maximum length of a command?
6803 # Does compiler simultaneously support -c and -o options?
6806 # Must we lock files when doing compilation ?
6809 # Do we need the lib prefix for modules?
6812 # Do we need a version for libraries?
6815 # Whether dlopen is supported.
6816 dlopen_support
=unknown
6818 # Whether dlopen of programs is supported.
6821 # Whether dlopen of statically linked programs is supported.
6822 dlopen_self_static
=unknown
6824 # Compiler flag to prevent dynamic linking.
6825 link_static_flag
="-static"
6827 # Compiler flag to turn off builtin functions.
6828 no_builtin_flag
=" -fno-builtin"
6830 # Compiler flag to allow reflexive dlopens.
6831 export_dynamic_flag_spec
="\${wl}--export-dynamic"
6833 # Compiler flag to generate shared objects directly from archives.
6834 whole_archive_flag_spec
="\${wl}--whole-archive\$convenience \${wl}--no-whole-archive"
6836 # Compiler flag to generate thread-safe objects.
6837 thread_safe_flag_spec
=""
6839 # Library versioning type.
6842 # Format of library name prefix.
6843 libname_spec
="lib\$name"
6845 # List of archive names. First name is the real one, the rest are links.
6846 # The last name is the one that the linker finds with -lNAME.
6847 library_names_spec
="\${libname}\${release}\${shared_ext}\$versuffix \${libname}\${release}\${shared_ext}\$major \$libname\${shared_ext}"
6849 # The coded name of the library, if different from the real name.
6850 soname_spec
="\${libname}\${release}\${shared_ext}\$major"
6852 # Commands used to build and install an old-style archive.
6854 old_archive_cmds
="\$AR \$AR_FLAGS \$oldlib\$oldobjs\$old_deplibs~\$RANLIB \$oldlib"
6855 old_postinstall_cmds
="\$RANLIB \$oldlib~chmod 644 \$oldlib"
6856 old_postuninstall_cmds
=""
6858 # Create an old-style archive from a shared archive.
6859 old_archive_from_new_cmds
=""
6861 # Create a temporary old-style archive to link instead of a shared archive.
6862 old_archive_from_expsyms_cmds
=""
6864 # Commands used to build and install a shared archive.
6865 archive_cmds
="\$CC -shared -nostdlib \$predep_objects \$libobjs \$deplibs \$postdep_objects \$compiler_flags \${wl}-soname \$wl\$soname -o \$lib"
6866 archive_expsym_cmds
="\$CC -shared -nostdlib \$predep_objects \$libobjs \$deplibs \$postdep_objects \$compiler_flags \${wl}-soname \$wl\$soname \${wl}-retain-symbols-file \$wl\$export_symbols -o \$lib"
6868 postuninstall_cmds
=""
6870 # Commands used to build a loadable module (assumed same as above if empty)
6872 module_expsym_cmds
=""
6874 # Commands to strip libraries.
6875 old_striplib
="strip --strip-debug"
6876 striplib
="strip --strip-unneeded"
6878 # Dependencies to place before the objects being linked to create a
6880 predep_objects
="/usr/lib/gcc-lib/i386-linux/3.2.3/../../../crti.o /usr/lib/gcc-lib/i386-linux/3.2.3/crtbeginS.o"
6882 # Dependencies to place after the objects being linked to create a
6884 postdep_objects
="/usr/lib/gcc-lib/i386-linux/3.2.3/crtendS.o /usr/lib/gcc-lib/i386-linux/3.2.3/../../../crtn.o"
6886 # Dependencies to place before the objects being linked to create a
6890 # Dependencies to place after the objects being linked to create a
6892 postdeps
="-lstdc++ -lm -lgcc_s -lc -lgcc_s"
6894 # The library search path used internally by the compiler when linking
6896 compiler_lib_search_path
="-L/usr/lib/gcc-lib/i386-linux/3.2.3 -L/usr/lib/gcc-lib/i386-linux/3.2.3/../../.."
6898 # Method to check whether dependent libraries are shared objects.
6899 deplibs_check_method
="pass_all"
6901 # Command to use when deplibs_check_method == file_magic.
6902 file_magic_cmd
="\$MAGIC_CMD"
6904 # Flag that allows shared libraries with undefined symbols to be built.
6905 allow_undefined_flag
=""
6907 # Flag that forces no undefined symbols.
6908 no_undefined_flag
=""
6910 # Commands used to finish a libtool library installation in a directory.
6911 finish_cmds
="PATH=\\\"\\\$PATH:/sbin\\\" ldconfig -n \$libdir"
6913 # Same as above, but a single script fragment to be evaled but not shown.
6916 # Take the output of nm and produce a listing of raw symbols and C names.
6917 global_symbol_pipe
="sed -n -e 's/^.*[ ]\\([ABCDGIRSTW][ABCDGIRSTW]*\\)[ ][ ]*\\(\\)\\([_A-Za-z][_A-Za-z0-9]*\\)\$/\\1 \\2\\3 \\3/p'"
6919 # Transform the output of nm in a proper C declaration
6920 global_symbol_to_cdecl
="sed -n -e 's/^. .* \\(.*\\)\$/extern int \\1;/p'"
6922 # Transform the output of nm in a C name address pair
6923 global_symbol_to_c_name_address
="sed -n -e 's/^: \\([^ ]*\\) \$/ {\\\"\\1\\\", (lt_ptr) 0},/p' -e 's/^[BCDEGRST] \\([^ ]*\\) \\([^ ]*\\)\$/ {\"\\2\", (lt_ptr) \\&\\2},/p'"
6925 # This is the shared library runtime path variable.
6926 runpath_var
=LD_RUN_PATH
6928 # This is the shared library path variable.
6929 shlibpath_var
=LD_LIBRARY_PATH
6931 # Is shlibpath searched before the hard-coded library search path?
6932 shlibpath_overrides_runpath
=no
6934 # How to hardcode a shared library path into an executable.
6935 hardcode_action
=immediate
6937 # Whether we should hardcode library paths into libraries.
6938 hardcode_into_libs
=yes
6940 # Flag to hardcode $libdir into a binary during linking.
6941 # This must work even if $libdir does not exist.
6942 hardcode_libdir_flag_spec
="\${wl}--rpath \${wl}\$libdir"
6944 # If ld is used when linking, flag to hardcode $libdir into
6945 # a binary during linking. This must work even if $libdir does
6947 hardcode_libdir_flag_spec_ld
=""
6949 # Whether we need a single -rpath flag with a separated argument.
6950 hardcode_libdir_separator
=""
6952 # Set to yes if using DIR/libNAME during linking hardcodes DIR into the
6956 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
6960 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
6961 # the resulting binary.
6962 hardcode_shlibpath_var
=
6964 # Set to yes if building a shared library automatically hardcodes DIR into the library
6965 # and all subsequent libraries and executables linked against it.
6966 hardcode_automatic
=no
6968 # Variables whose values should be saved in libtool wrapper scripts and
6969 # restored at relink time.
6970 variables_saved_for_relink
="PATH LD_LIBRARY_PATH LD_RUN_PATH GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
6972 # Whether libtool must link a program against all its dependency libraries.
6973 link_all_deplibs
=unknown
6975 # Compile-time system search path for libraries
6976 sys_lib_search_path_spec
=" /usr/lib/gcc-lib/i386-linux/3.2.3/ /usr/lib/gcc/i386-linux/3.2.3/ /usr/lib/gcc-lib/i386-linux/3.2.3/../../../../i386-linux/lib/i386-linux/3.2.3/ /usr/lib/gcc-lib/i386-linux/3.2.3/../../../../i386-linux/lib/ /usr/lib/gcc-lib/i386-linux/3.2.3/../../../i386-linux/3.2.3/ /usr/lib/gcc-lib/i386-linux/3.2.3/../../../ /lib/i386-linux/3.2.3/ /lib/ /usr/lib/i386-linux/3.2.3/ /usr/lib/"
6978 # Run-time system search path for libraries
6979 sys_lib_dlsearch_path_spec
="/lib /usr/lib /lib
6982 /usr/i486-linuxlibc1/lib
6983 /usr/local/lib/gaim"
6985 # Fix the shell variable $srcfile for the compiler.
6988 # Set to yes if exported symbols are required.
6989 always_export_symbols
=no
6991 # The commands to list exported symbols.
6992 export_symbols_cmds
="\$NM \$libobjs \$convenience | \$global_symbol_pipe | \$SED 's/.* //' | sort | uniq > \$export_symbols"
6994 # The commands to extract the exported symbol list from a shared archive.
6995 extract_expsyms_cmds
=""
6997 # Symbols that should not be listed in the preloaded symbols.
7000 # Symbols that must always be exported.
7003 # ### END LIBTOOL TAG CONFIG: CXX