3 # libtoolT - Provide generalized library-building support services.
4 # Generated automatically by (GNU libltdl 1.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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
27 # As a special exception to the GNU General Public License, if you
28 # distribute this file as part of a program that contains a
29 # configuration script generated by Autoconf, you may include it under
30 # the same distribution terms that you use for the rest of that program.
32 # A sed program that does not truncate output.
35 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
36 Xsed
="/usr/bin/sed -e 1s/^X//"
38 # The HP-UX ksh and POSIX shell print the target directory to stdout
40 (unset CDPATH
) >/dev
/null
2>&1 && unset CDPATH
42 # The names of the tagged configurations supported by this script.
43 available_tags
=" CXX F77"
45 # ### BEGIN LIBTOOL CONFIG
47 # Libtool was configured on host atlas:
49 # Shell to use when invoking shell scripts.
52 # Whether or not to build shared libraries.
53 build_libtool_libs
=yes
55 # Whether or not to build static libraries.
58 # Whether or not to add -lc for building shared libraries.
59 build_libtool_need_lc
=no
61 # Whether or not to disallow shared libs when runtime libs are static
62 allow_libtool_libs_with_static_runtimes
=no
64 # Whether or not to optimize for fast installation.
69 host=i686-pc-linux-gnu
74 build
=i686-pc-linux-gnu
77 # An echo program that does not interpret backslashes.
87 # A language-specific compiler.
90 # Is the compiler the GNU C compiler?
96 # The linker used to build libraries.
97 LD
="/usr/i586-suse-linux/bin/ld"
99 # Whether we need hard or soft links.
102 # A BSD-compatible nm program.
105 # A symbol stripping program
108 # Used to examine libraries when file_magic_cmd begins "file"
111 # Used on cygwin: DLL creation program.
114 # Used on cygwin: object dumper.
117 # Used on cygwin: assembler.
120 # The name of the directory that contains temporary libtool files.
123 # How to create reloadable object files.
125 reload_cmds
="\$LD\$reload_flag -o \$output\$reload_objs"
127 # How to pass a linker flag through the compiler.
130 # Object file suffix (normally "o").
133 # Old archive suffix (normally "a").
136 # Shared library suffix (normally ".so").
139 # Executable file suffix (normally "").
142 # Additional compiler flags for building library objects.
143 pic_flag
=" -fPIC -DPIC"
146 # What is the maximum length of a command?
149 # Does compiler simultaneously support -c and -o options?
152 # Must we lock files when doing compilation?
155 # Do we need the lib prefix for modules?
158 # Do we need a version for libraries?
161 # Whether dlopen is supported.
162 dlopen_support
=unknown
164 # Whether dlopen of programs is supported.
167 # Whether dlopen of statically linked programs is supported.
168 dlopen_self_static
=unknown
170 # Compiler flag to prevent dynamic linking.
171 link_static_flag
="-static"
173 # Compiler flag to turn off builtin functions.
174 no_builtin_flag
=" -fno-builtin"
176 # Compiler flag to allow reflexive dlopens.
177 export_dynamic_flag_spec
="\${wl}--export-dynamic"
179 # Compiler flag to generate shared objects directly from archives.
180 whole_archive_flag_spec
="\${wl}--whole-archive\$convenience \${wl}--no-whole-archive"
182 # Compiler flag to generate thread-safe objects.
183 thread_safe_flag_spec
=""
185 # Library versioning type.
188 # Format of library name prefix.
189 libname_spec
="lib\$name"
191 # List of archive names. First name is the real one, the rest are links.
192 # The last name is the one that the linker finds with -lNAME.
193 library_names_spec
="\${libname}\${release}\${shared_ext}\$versuffix \${libname}\${release}\${shared_ext}\$major \$libname\${shared_ext}"
195 # The coded name of the library, if different from the real name.
196 soname_spec
="\${libname}\${release}\${shared_ext}\$major"
198 # Commands used to build and install an old-style archive.
200 old_archive_cmds
="\$AR \$AR_FLAGS \$oldlib\$oldobjs\$old_deplibs~\$RANLIB \$oldlib"
201 old_postinstall_cmds
="\$RANLIB \$oldlib~chmod 644 \$oldlib"
202 old_postuninstall_cmds
=""
204 # Create an old-style archive from a shared archive.
205 old_archive_from_new_cmds
=""
207 # Create a temporary old-style archive to link instead of a shared archive.
208 old_archive_from_expsyms_cmds
=""
210 # Commands used to build and install a shared archive.
211 archive_cmds
="\$CC -shared \$libobjs \$deplibs \$compiler_flags \${wl}-soname \$wl\$soname -o \$lib"
212 archive_expsym_cmds
="\$echo \\\"{ global:\\\" > \$output_objdir/\$libname.ver~
213 cat \$export_symbols | sed -e \\\"s/\\\\(.*\\\\)/\\\\1;/\\\" >> \$output_objdir/\$libname.ver~
214 \$echo \\\"local: *; };\\\" >> \$output_objdir/\$libname.ver~
215 \$CC -shared \$libobjs \$deplibs \$compiler_flags \${wl}-soname \$wl\$soname \${wl}-version-script \${wl}\$output_objdir/\$libname.ver -o \$lib"
217 postuninstall_cmds
=""
219 # Commands used to build a loadable module (assumed same as above if empty)
221 module_expsym_cmds
=""
223 # Commands to strip libraries.
224 old_striplib
="strip --strip-debug"
225 striplib
="strip --strip-unneeded"
227 # Dependencies to place before the objects being linked to create a
231 # Dependencies to place after the objects being linked to create a
235 # Dependencies to place before the objects being linked to create a
239 # Dependencies to place after the objects being linked to create a
243 # The library search path used internally by the compiler when linking
245 compiler_lib_search_path
=""
247 # Method to check whether dependent libraries are shared objects.
248 deplibs_check_method
="pass_all"
250 # Command to use when deplibs_check_method == file_magic.
251 file_magic_cmd
="\$MAGIC_CMD"
253 # Flag that allows shared libraries with undefined symbols to be built.
254 allow_undefined_flag
=""
256 # Flag that forces no undefined symbols.
259 # Commands used to finish a libtool library installation in a directory.
260 finish_cmds
="PATH=\\\"\\\$PATH:/sbin\\\" ldconfig -n \$libdir"
262 # Same as above, but a single script fragment to be evaled but not shown.
265 # Take the output of nm and produce a listing of raw symbols and C names.
266 global_symbol_pipe
="sed -n -e 's/^.*[ ]\\([ABCDGIRSTW][ABCDGIRSTW]*\\)[ ][ ]*\\([_A-Za-z][_A-Za-z0-9]*\\)\$/\\1 \\2 \\2/p'"
268 # Transform the output of nm in a proper C declaration
269 global_symbol_to_cdecl
="sed -n -e 's/^. .* \\(.*\\)\$/extern int \\1;/p'"
271 # Transform the output of nm in a C name address pair
272 global_symbol_to_c_name_address
="sed -n -e 's/^: \\([^ ]*\\) \$/ {\\\"\\1\\\", (lt_ptr) 0},/p' -e 's/^[BCDEGRST] \\([^ ]*\\) \\([^ ]*\\)\$/ {\"\\2\", (lt_ptr) \\&\\2},/p'"
274 # This is the shared library runtime path variable.
275 runpath_var
=LD_RUN_PATH
277 # This is the shared library path variable.
278 shlibpath_var
=LD_LIBRARY_PATH
280 # Is shlibpath searched before the hard-coded library search path?
281 shlibpath_overrides_runpath
=no
283 # How to hardcode a shared library path into an executable.
284 hardcode_action
=immediate
286 # Whether we should hardcode library paths into libraries.
287 hardcode_into_libs
=yes
289 # Flag to hardcode $libdir into a binary during linking.
290 # This must work even if $libdir does not exist.
291 hardcode_libdir_flag_spec
="\${wl}--rpath \${wl}\$libdir"
293 # If ld is used when linking, flag to hardcode $libdir into
294 # a binary during linking. This must work even if $libdir does
296 hardcode_libdir_flag_spec_ld
=""
298 # Whether we need a single -rpath flag with a separated argument.
299 hardcode_libdir_separator
=""
301 # Set to yes if using DIR/libNAME during linking hardcodes DIR into the
305 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
309 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
310 # the resulting binary.
311 hardcode_shlibpath_var
=unsupported
313 # Set to yes if building a shared library automatically hardcodes DIR into the library
314 # and all subsequent libraries and executables linked against it.
315 hardcode_automatic
=no
317 # Variables whose values should be saved in libtool wrapper scripts and
318 # restored at relink time.
319 variables_saved_for_relink
="PATH LD_RUN_PATH GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
321 # Whether libtool must link a program against all its dependency libraries.
322 link_all_deplibs
=unknown
324 # Compile-time system search path for libraries
325 sys_lib_search_path_spec
=" /usr/lib/gcc/i586-suse-linux/4.0.2/ /usr/lib/gcc/i586-suse-linux/4.0.2/ /usr/lib/gcc/i586-suse-linux/4.0.2/../../../../i586-suse-linux/lib/i586-suse-linux/4.0.2/ /usr/lib/gcc/i586-suse-linux/4.0.2/../../../../i586-suse-linux/lib/ /usr/lib/gcc/i586-suse-linux/4.0.2/../../../i586-suse-linux/4.0.2/ /usr/lib/gcc/i586-suse-linux/4.0.2/../../../ /lib/i586-suse-linux/4.0.2/ /lib/ /usr/lib/i586-suse-linux/4.0.2/ /usr/lib/"
327 # Run-time system search path for libraries
328 sys_lib_dlsearch_path_spec
="/lib /usr/lib /usr/X11R6/lib/Xaw95 /usr/X11R6/lib/Xaw3d /usr/X11R6/lib /usr/i486-linux/lib /usr/i486-linux-libc5/lib /usr/i486-linux-libc6/lib /usr/i486-linuxaout/lib /usr/i386-suse-linux/lib /usr/local/lib /usr/openwin/lib /opt/kde/lib /opt/kde2/lib /opt/kde3/lib /opt/gnome/lib /opt/gnome2/lib "
330 # Fix the shell variable $srcfile for the compiler.
333 # Set to yes if exported symbols are required.
334 always_export_symbols
=no
336 # The commands to list exported symbols.
337 export_symbols_cmds
="\$NM \$libobjs \$convenience | \$global_symbol_pipe | \$SED 's/.* //' | sort | uniq > \$export_symbols"
339 # The commands to extract the exported symbol list from a shared archive.
340 extract_expsyms_cmds
=""
342 # Symbols that should not be listed in the preloaded symbols.
343 exclude_expsyms
="_GLOBAL_OFFSET_TABLE_"
345 # Symbols that must always be exported.
348 # ### END LIBTOOL CONFIG
350 # ltmain.sh - Provide generalized library-building support services.
351 # NOTE: Changing this file will not affect anything until you rerun configure.
353 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005
354 # Free Software Foundation, Inc.
355 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
357 # This program is free software; you can redistribute it and/or modify
358 # it under the terms of the GNU General Public License as published by
359 # the Free Software Foundation; either version 2 of the License, or
360 # (at your option) any later version.
362 # This program is distributed in the hope that it will be useful, but
363 # WITHOUT ANY WARRANTY; without even the implied warranty of
364 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
365 # General Public License for more details.
367 # You should have received a copy of the GNU General Public License
368 # along with this program; if not, write to the Free Software
369 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
371 # As a special exception to the GNU General Public License, if you
372 # distribute this file as part of a program that contains a
373 # configuration script generated by Autoconf, you may include it under
374 # the same distribution terms that you use for the rest of that program.
378 # Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
379 # is ksh but when the shell is invoked as "sh" and the current value of
380 # the _XPG environment variable is not equal to 1 (one), the special
381 # positional parameter $0, within a function call, is the name of the
385 # The name of this program:
386 progname
=`echo "$progpath" | $SED $basename`
396 TIMESTAMP
=" (1.1220.2.287 2005/08/31 18:54:15)"
398 # See if we are running on zsh, and set the options which allow our
399 # commands through without removal of \ escapes.
400 if test -n "${ZSH_VERSION+set}" ; then
404 # Check that we have a working $echo.
405 if test "X$1" = X--no-reexec
; then
406 # Discard the --no-reexec flag, and continue.
408 elif test "X$1" = X--fallback-echo
; then
409 # Avoid inline document here, it may be left over
411 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
412 # Yippee, $echo works!
415 # Restart under the correct shell, and then maybe $echo will work.
416 exec $SHELL "$progpath" --no-reexec ${1+"$@"}
419 if test "X$1" = X--fallback-echo
; then
420 # used as fallback echo
429 help="Try \`$progname --help' for more information."
430 magic
="%%%MAGIC variable%%%"
435 # Sed substitution that helps us do robust quoting. It backslashifies
436 # metacharacters that are still active within double-quoted strings.
437 Xsed
="${SED}"' -e 1s/^X//'
438 sed_quote_subst
='s/\([\\`\\"$\\\\]\)/\\\1/g'
439 # test EBCDIC or ASCII
440 case `echo X|tr X '\101'` in
441 A
) # ASCII based system
442 # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
444 NL2SP
='tr \015\012 \040\040'
446 *) # EBCDIC based system
448 NL2SP
='tr \r\n \100\100'
453 # Only set LANG and LC_ALL to C if already set.
454 # These must not be set unconditionally because not all systems understand
455 # e.g. LANG=C (notably SCO).
456 # We save the old values to restore during execute mode.
457 if test "${LC_ALL+set}" = set; then
458 save_LC_ALL
="$LC_ALL"; LC_ALL
=C
; export LC_ALL
460 if test "${LANG+set}" = set; then
461 save_LANG
="$LANG"; LANG
=C
; export LANG
464 # Make sure IFS has a sensible default
469 if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
470 $echo "$modename: not configured to build any kind of library" 1>&2
471 $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
484 lo2o
="s/\\.lo\$/.${objext}/"
485 o2lo
="s/\\.${objext}\$/.lo/"
487 #####################################
488 # Shell function definitions:
489 # This seems to be the best place for them
491 # func_win32_libid arg
492 # return the library type of file 'arg'
494 # Need a lot of goo to handle *both* DLLs and import libs
495 # Has to be a shell function in order to 'eat' the argument
496 # that is supplied when $file_magic_command is called.
499 win32_libid_type
="unknown"
500 win32_fileres
=`file -L $1 2>/dev/null`
501 case $win32_fileres in
502 *ar\ archive\ import\ library
*) # definitely import
503 win32_libid_type
="x86 archive import"
505 *ar\ archive
*) # could be an import, or static
506 if eval $OBJDUMP -f $1 |
$SED -e '10q' 2>/dev
/null | \
507 $EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev
/null
; then
508 win32_nmres
=`eval $NM -f posix -A $1 | \
509 sed -n -e '1,100{/ I /{x;/import/!{s/^/import/;h;p;};x;};}'`
510 if test "X$win32_nmres" = "Ximport" ; then
511 win32_libid_type
="x86 archive import"
513 win32_libid_type
="x86 archive static"
518 win32_libid_type
="x86 DLL"
520 *executable
*) # but shell scripts are "executable" too...
521 case $win32_fileres in
522 *MS\ Windows\ PE\ Intel
*)
523 win32_libid_type
="x86 DLL"
528 $echo $win32_libid_type
533 # Infer tagged configuration to use if any are available and
534 # if one wasn't chosen via the "--tag" command line option.
535 # Only attempt this if the compiler in the base compile
536 # command doesn't match the default compiler.
537 # arg is usually of the form 'gcc ...'
540 if test -n "$available_tags" && test -z "$tagname"; then
544 *[\
[\~\
#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
548 CC_quoted
="$CC_quoted $arg"
551 # Blanks in the command may have been stripped by the calling shell,
552 # but not from the CC environment variable when configure was run.
553 " $CC "* |
"$CC "* |
" `$echo $CC` "* |
"`$echo $CC` "* |
" $CC_quoted"* |
"$CC_quoted "* |
" `$echo $CC_quoted` "* |
"`$echo $CC_quoted` "*) ;;
554 # Blanks at the start of $base_compile will cause this to fail
555 # if we don't check for them as well.
557 for z
in $available_tags; do
558 if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev
/null
; then
559 # Evaluate the configuration.
560 eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`"
563 # Double-quote args containing other shell metacharacters.
565 *[\
[\~\
#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
569 CC_quoted
="$CC_quoted $arg"
572 " $CC "* |
"$CC "* |
" `$echo $CC` "* |
"`$echo $CC` "* |
" $CC_quoted"* |
"$CC_quoted "* |
" `$echo $CC_quoted` "* |
"`$echo $CC_quoted` "*)
573 # The compiler in the base compile command matches
574 # the one in the tagged configuration.
575 # Assume this is the tagged configuration we want.
582 # If $tagname still isn't set, then no tagged configuration
583 # was found and let the user know that the "--tag" command
584 # line option must be used.
585 if test -z "$tagname"; then
586 $echo "$modename: unable to infer tagged configuration"
587 $echo "$modename: specify a tag with \`--tag'" 1>&2
590 # $echo "$modename: using $tagname tagged configuration"
598 # func_extract_an_archive dir oldlib
599 func_extract_an_archive
()
601 f_ex_an_ar_dir
="$1"; shift
602 f_ex_an_ar_oldlib
="$1"
604 $show "(cd $f_ex_an_ar_dir && $AR x $f_ex_an_ar_oldlib)"
605 $run eval "(cd \$f_ex_an_ar_dir && $AR x \$f_ex_an_ar_oldlib)" ||
exit $?
606 if ($AR t
"$f_ex_an_ar_oldlib" |
sort |
sort -uc >/dev
/null
2>&1); then
609 $echo "$modename: ERROR: object name conflicts: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" 1>&2
614 # func_extract_archives gentop oldlib ...
615 func_extract_archives
()
617 my_gentop
="$1"; shift
625 $show "${rm}r $my_gentop"
626 $run ${rm}r
"$my_gentop"
627 $show "$mkdir $my_gentop"
628 $run $mkdir "$my_gentop"
630 if test "$my_status" -ne 0 && test ! -d "$my_gentop"; then
634 for my_xlib
in $my_oldlibs; do
635 # Extract the objects.
637 [\\/]* |
[A-Za-z
]:[\\/]*) my_xabs
="$my_xlib" ;;
638 *) my_xabs
=`pwd`"/$my_xlib" ;;
640 my_xlib
=`$echo "X$my_xlib" | $Xsed -e 's%^.*/%%'`
641 my_xdir
="$my_gentop/$my_xlib"
643 $show "${rm}r $my_xdir"
644 $run ${rm}r
"$my_xdir"
645 $show "$mkdir $my_xdir"
646 $run $mkdir "$my_xdir"
648 if test "$status" -ne 0 && test ! -d "$my_xdir"; then
653 $show "Extracting $my_xabs"
654 # Do not bother doing anything if just a dry run
655 if test -z "$run"; then
656 darwin_orig_dir
=`pwd`
657 cd $my_xdir ||
exit $?
658 darwin_archive
=$my_xabs
660 darwin_base_archive
=`$echo "X$darwin_archive" | $Xsed -e 's%^.*/%%'`
661 darwin_arches
=`lipo -info "$darwin_archive" 2>/dev/null | $EGREP Architectures 2>/dev/null`
662 if test -n "$darwin_arches"; then
663 darwin_arches
=`echo "$darwin_arches" | $SED -e 's/.*are://'`
665 $show "$darwin_base_archive has multiple architectures $darwin_arches"
666 for darwin_arch
in $darwin_arches ; do
667 mkdir
-p "unfat-$$/${darwin_base_archive}-${darwin_arch}"
668 lipo
-thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}"
669 cd "unfat-$$/${darwin_base_archive}-${darwin_arch}"
670 func_extract_an_archive
"`pwd`" "${darwin_base_archive}"
672 $rm "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}"
673 done # $darwin_arches
674 ## Okay now we have a bunch of thin objects, gotta fatten them up :)
675 darwin_filelist
=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print| xargs basename | sort -u | $NL2SP`
678 for darwin_file
in $darwin_filelist; do
679 darwin_files
=`find unfat-$$ -name $darwin_file -print | $NL2SP`
680 lipo
-create -output "$darwin_file" $darwin_files
681 done # $darwin_filelist
683 cd "$darwin_orig_dir"
685 cd "$darwin_orig_dir"
686 func_extract_an_archive
"$my_xdir" "$my_xabs"
691 func_extract_an_archive
"$my_xdir" "$my_xabs"
694 my_oldobjs
="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
696 func_extract_archives_result
="$my_oldobjs"
698 # End of Shell function definitions
699 #####################################
702 eval std_shrext
=\"$shrext_cmds\"
704 # Parse our command line options once, thoroughly.
705 while test "$#" -gt 0
711 -*=*) optarg
=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;;
715 # If the previous option needs an argument, assign it.
716 if test -n "$prev"; then
719 execute_dlfiles
="$execute_dlfiles $arg"
723 preserve_args
="${preserve_args}=$arg"
725 # Check whether tagname contains only valid characters
728 $echo "$progname: invalid tag name: $tagname" 1>&2
735 # Don't test for the "default" C tag, as we know, it's there, but
736 # not specially marked.
739 if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$progpath" > /dev
/null
; then
740 taglist
="$taglist $tagname"
741 # Evaluate the configuration.
742 eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^# ### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $progpath`"
744 $echo "$progname: ignoring unknown tag $tagname" 1>&2
759 # Have we seen a non-optional argument yet?
766 $echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP"
768 $echo "Copyright (C) 2005 Free Software Foundation, Inc."
769 $echo "This is free software; see the source for copying conditions. There is NO"
770 $echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
775 ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $progpath
776 # Now print the configurations for the tags.
777 for tagname
in $taglist; do
778 ${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$progpath"
784 $echo "$progname: enabling shell trace mode"
786 preserve_args
="$preserve_args $arg"
795 if test "$build_libtool_libs" = yes; then
796 $echo "enable shared libraries"
798 $echo "disable shared libraries"
800 if test "$build_old_libs" = yes; then
801 $echo "enable static libraries"
803 $echo "disable static libraries"
808 --finish) mode
="finish" ;;
810 --mode) prevopt
="--mode" prev
=mode
;;
811 --mode=*) mode
="$optarg" ;;
813 --preserve-dup-deps) duplicate_deps
="yes" ;;
817 preserve_args
="$preserve_args $arg"
820 --tag) prevopt
="--tag" prev
=tag
;;
822 set tag
"$optarg" ${1+"$@"}
825 preserve_args
="$preserve_args --tag"
834 $echo "$modename: unrecognized option \`$arg'" 1>&2
846 if test -n "$prevopt"; then
847 $echo "$modename: option \`$prevopt' requires an argument" 1>&2
852 # If this variable is set in any of the actions, the command in it
853 # will be execed at the end. This prevents here-documents from being
854 # left over by shells.
857 if test -z "$show_help"; then
859 # Infer the operation mode.
860 if test -z "$mode"; then
861 $echo "*** Warning: inferring the mode of operation is deprecated." 1>&2
862 $echo "*** Future versions of Libtool will require --mode=MODE be specified." 1>&2
864 *cc | cc
* |
*++ | gcc
* |
*-gcc* | g
++* | xlc
*)
876 *db |
*dbx |
*strace |
*truss
)
886 # If we have no mode, but dlfiles were specified, then do execute mode.
887 test -n "$execute_dlfiles" && mode
=execute
889 # Just use the default operation mode.
890 if test -z "$mode"; then
891 if test -n "$nonopt"; then
892 $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2
894 $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2
901 # Only execute mode is allowed to have -dlopen flags.
902 if test -n "$execute_dlfiles" && test "$mode" != execute
; then
903 $echo "$modename: unrecognized option \`-dlopen'" 1>&2
908 # Change the help message to a mode-specific one.
910 help="Try \`$modename --help --mode=$mode' for more information."
912 # These modes are in order of execution frequency so that they run quickly.
914 # libtool compile mode
916 modename
="$modename: compile"
917 # Get the compilation command and the source file.
919 srcfile
="$nonopt" # always keep a non-empty value in "srcfile"
930 # do not "continue". Instead, add this to base_compile
942 # Accept any command-line options.
945 if test -n "$libobj" ; then
946 $echo "$modename: you cannot specify \`-o' more than once" 1>&2
953 -static |
-prefer-pic |
-prefer-non-pic)
964 arg_mode
=arg
# the next one goes into the "base_compile" arg list
965 continue # The current "srcfile" will either be retained or
966 ;; # replaced later. I would guess that would be a bug.
969 args
=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"`
971 save_ifs
="$IFS"; IFS
=','
975 # Double-quote args containing other shell metacharacters.
976 # Many Bourne shells cannot handle close brackets correctly
977 # in scan sets, so we specify it separately.
979 *[\
[\~\
#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
983 lastarg
="$lastarg $arg"
986 lastarg
=`$echo "X$lastarg" | $Xsed -e "s/^ //"`
988 # Add the arguments to base_compile.
989 base_compile
="$base_compile $lastarg"
994 # Accept the current argument as the source file.
995 # The previous "srcfile" becomes the current argument.
1002 esac # case $arg_mode
1004 # Aesthetically quote the previous argument.
1005 lastarg
=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"`
1008 # Double-quote args containing other shell metacharacters.
1009 # Many Bourne shells cannot handle close brackets correctly
1010 # in scan sets, and some SunOS ksh mistreat backslash-escaping
1011 # in scan sets (worked around with variable expansion),
1012 # and furthermore cannot handle '|' '&' '(' ')' in scan sets
1013 # at all, so we specify them separately.
1014 *[\
[\~\
#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
1015 lastarg
="\"$lastarg\""
1019 base_compile
="$base_compile $lastarg"
1024 $echo "$modename: you must specify an argument for -Xcompile"
1028 $echo "$modename: you must specify a target with \`-o'" 1>&2
1032 # Get the name of the library object.
1033 [ -z "$libobj" ] && libobj
=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'`
1037 # Recognize several different file suffixes.
1038 # If the user specifies -o file.o, it is replaced with file.lo
1048 *.class
) xform
=class
;;
1053 *.java
) xform
=java
;;
1056 libobj
=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"`
1059 *.lo
) obj
=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;;
1061 $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2
1066 func_infer_tag
$base_compile
1068 for arg
in $later; do
1087 qlibobj
=`$echo "X$libobj" | $Xsed -e "$sed_quote_subst"`
1089 *[\
[\~\
#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
1090 qlibobj
="\"$qlibobj\"" ;;
1092 test "X$libobj" != "X$qlibobj" \
1093 && $echo "X$libobj" |
grep '[]~#^*{};<>?"'"'"' &()|`$[]' \
1094 && $echo "$modename: libobj name \`$libobj' may not contain shell special characters."
1095 objname
=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
1096 xdir
=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'`
1097 if test "X$xdir" = "X$obj"; then
1102 lobj
=${xdir}$objdir/$objname
1104 if test -z "$base_compile"; then
1105 $echo "$modename: you must specify a compilation command" 1>&2
1110 # Delete any leftover library objects.
1111 if test "$build_old_libs" = yes; then
1112 removelist
="$obj $lobj $libobj ${libobj}T"
1114 removelist
="$lobj $libobj ${libobj}T"
1117 $run $rm $removelist
1118 trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15
1120 # On Cygwin there's no "real" PIC flag so we must build both object types
1122 cygwin
* | mingw
* | pw32
* | os2
*)
1126 if test "$pic_mode" = no
&& test "$deplibs_check_method" != pass_all
; then
1127 # non-PIC code in shared libraries is not supported
1131 # Calculate the filename of the output object if compiler does
1132 # not support -o with -c
1133 if test "$compiler_c_o" = no
; then
1134 output_obj
=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.
${objext}
1135 lockfile
="$output_obj.lock"
1136 removelist
="$removelist $output_obj $lockfile"
1137 trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15
1144 # Lock this critical section if it is needed
1145 # We use this script file to make the link, it avoids creating a new file
1146 if test "$need_locks" = yes; then
1147 until $run ln "$progpath" "$lockfile" 2>/dev
/null
; do
1148 $show "Waiting for $lockfile to be removed"
1151 elif test "$need_locks" = warn
; then
1152 if test -f "$lockfile"; then
1154 *** ERROR, $lockfile exists and contains:
1155 `cat $lockfile 2>/dev/null`
1157 This indicates that another process is trying to use the same
1158 temporary object file, and libtool could not work around it because
1159 your compiler does not support \`-c' and \`-o' together. If you
1160 repeat this compilation, it may succeed, by chance, but you had better
1161 avoid parallel builds (make -j) in this platform, or get a better
1164 $run $rm $removelist
1167 $echo "$srcfile" > "$lockfile"
1170 if test -n "$fix_srcfile_path"; then
1171 eval srcfile
=\"$fix_srcfile_path\"
1173 qsrcfile
=`$echo "X$srcfile" | $Xsed -e "$sed_quote_subst"`
1175 *[\
[\~\
#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
1176 qsrcfile
="\"$qsrcfile\"" ;;
1179 $run $rm "$libobj" "${libobj}T"
1181 # Create a libtool object file (analogous to a ".la" file),
1182 # but don't create it if we're doing a dry run.
1183 test -z "$run" && cat > ${libobj}T
<<EOF
1184 # $libobj - a libtool object file
1185 # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
1187 # Please DO NOT delete this file!
1188 # It is necessary for linking the library.
1190 # Name of the PIC object.
1193 # Only build a PIC object if we are building libtool libraries.
1194 if test "$build_libtool_libs" = yes; then
1195 # Without this assignment, base_compile gets emptied.
1196 fbsd_hideous_sh_bug
=$base_compile
1198 if test "$pic_mode" != no
; then
1199 command="$base_compile $qsrcfile $pic_flag"
1201 # Don't build PIC code
1202 command="$base_compile $qsrcfile"
1205 if test ! -d "${xdir}$objdir"; then
1206 $show "$mkdir ${xdir}$objdir"
1207 $run $mkdir ${xdir}$objdir
1209 if test "$status" -ne 0 && test ! -d "${xdir}$objdir"; then
1214 if test -z "$output_obj"; then
1215 # Place PIC objects in $objdir
1216 command="$command -o $lobj"
1219 $run $rm "$lobj" "$output_obj"
1222 if $run eval "$command"; then :
1224 test -n "$output_obj" && $run $rm $removelist
1228 if test "$need_locks" = warn
&&
1229 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
1231 *** ERROR, $lockfile contains:
1232 `cat $lockfile 2>/dev/null`
1234 but it should contain:
1237 This indicates that another process is trying to use the same
1238 temporary object file, and libtool could not work around it because
1239 your compiler does not support \`-c' and \`-o' together. If you
1240 repeat this compilation, it may succeed, by chance, but you had better
1241 avoid parallel builds (make -j) in this platform, or get a better
1244 $run $rm $removelist
1248 # Just move the object if needed, then go on to compile the next one
1249 if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then
1250 $show "$mv $output_obj $lobj"
1251 if $run $mv $output_obj $lobj; then :
1254 $run $rm $removelist
1259 # Append the name of the PIC object to the libtool object file.
1260 test -z "$run" && cat >> ${libobj}T
<<EOF
1261 pic_object='$objdir/$objname'
1265 # Allow error messages only from the first compilation.
1266 if test "$suppress_opt" = yes; then
1267 suppress_output
=' >/dev/null 2>&1'
1270 # No PIC object so indicate it doesn't exist in the libtool
1272 test -z "$run" && cat >> ${libobj}T
<<EOF
1278 # Only build a position-dependent object if we build old libraries.
1279 if test "$build_old_libs" = yes; then
1280 if test "$pic_mode" != yes; then
1281 # Don't build PIC code
1282 command="$base_compile $qsrcfile"
1284 command="$base_compile $qsrcfile $pic_flag"
1286 if test "$compiler_c_o" = yes; then
1287 command="$command -o $obj"
1290 # Suppress compiler output if we already did a PIC compilation.
1291 command="$command$suppress_output"
1292 $run $rm "$obj" "$output_obj"
1294 if $run eval "$command"; then :
1296 $run $rm $removelist
1300 if test "$need_locks" = warn
&&
1301 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
1303 *** ERROR, $lockfile contains:
1304 `cat $lockfile 2>/dev/null`
1306 but it should contain:
1309 This indicates that another process is trying to use the same
1310 temporary object file, and libtool could not work around it because
1311 your compiler does not support \`-c' and \`-o' together. If you
1312 repeat this compilation, it may succeed, by chance, but you had better
1313 avoid parallel builds (make -j) in this platform, or get a better
1316 $run $rm $removelist
1320 # Just move the object if needed
1321 if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then
1322 $show "$mv $output_obj $obj"
1323 if $run $mv $output_obj $obj; then :
1326 $run $rm $removelist
1331 # Append the name of the non-PIC object the libtool object file.
1332 # Only append if the libtool object file exists.
1333 test -z "$run" && cat >> ${libobj}T
<<EOF
1334 # Name of the non-PIC object.
1335 non_pic_object='$objname'
1339 # Append the name of the non-PIC object the libtool object file.
1340 # Only append if the libtool object file exists.
1341 test -z "$run" && cat >> ${libobj}T
<<EOF
1342 # Name of the non-PIC object.
1348 $run $mv "${libobj}T" "${libobj}"
1350 # Unlock the critical section if it was locked
1351 if test "$need_locks" != no
; then
1352 $run $rm "$lockfile"
1360 modename
="$modename: link"
1362 *-*-cygwin* |
*-*-mingw* |
*-*-pw32* |
*-*-os2*)
1363 # It is impossible to link a dll without this setting, and
1364 # we shouldn't force the makefile maintainer to figure out
1365 # which system we are compiling for in order to pass an extra
1366 # flag for every libtool invocation.
1367 # allow_undefined=no
1369 # FIXME: Unfortunately, there are problems with the above when trying
1370 # to make a dll which has undefined symbols, in which case not
1371 # even a static library is built. For now, we need to specify
1372 # -no-undefined on the libtool link line when we can be certain
1373 # that all symbols are satisfied, otherwise we get a static library.
1380 libtool_args
="$nonopt"
1381 base_compile
="$nonopt $@"
1382 compile_command
="$nonopt"
1383 finalize_command
="$nonopt"
1396 lib_search_path
=`pwd`
1405 export_symbols_regex
=
1413 precious_files_regex
=
1414 prefer_static_libs
=no
1427 func_infer_tag
$base_compile
1429 # We need to know -static, to get the right output filenames.
1433 -all-static |
-static)
1434 if test "X$arg" = "X-all-static"; then
1435 if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
1436 $echo "$modename: warning: complete static linking is impossible in this configuration" 1>&2
1438 if test -n "$link_static_flag"; then
1439 dlopen_self
=$dlopen_self_static
1442 if test -z "$pic_flag" && test -n "$link_static_flag"; then
1443 dlopen_self
=$dlopen_self_static
1446 build_libtool_libs
=no
1448 prefer_static_libs
=yes
1454 # See if our shared archives depend on static archives.
1455 test -n "$old_archive_from_new_cmds" && build_old_libs
=yes
1457 # Go through the arguments, transforming them on the way.
1458 while test "$#" -gt 0; do
1462 *[\
[\~\
#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
1463 qarg
=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test
1467 libtool_args
="$libtool_args $qarg"
1469 # If the previous option needs an argument, assign it.
1470 if test -n "$prev"; then
1473 compile_command
="$compile_command @OUTPUT@"
1474 finalize_command
="$finalize_command @OUTPUT@"
1480 if test "$preload" = no
; then
1481 # Add the symbol object into the linking commands.
1482 compile_command
="$compile_command @SYMFILE@"
1483 finalize_command
="$finalize_command @SYMFILE@"
1487 *.la |
*.lo
) ;; # We handle these cases below.
1489 if test "$dlself" = no
; then
1497 if test "$prev" = dlprefiles
; then
1499 elif test "$prev" = dlfiles
&& test "$dlopen_self" != yes; then
1509 if test "$prev" = dlfiles
; then
1510 dlfiles
="$dlfiles $arg"
1512 dlprefiles
="$dlprefiles $arg"
1520 export_symbols
="$arg"
1521 if test ! -f "$arg"; then
1522 $echo "$modename: symbol file \`$arg' does not exist"
1529 export_symbols_regex
="$arg"
1534 inst_prefix_dir
="$arg"
1539 precious_files_regex
="$arg"
1549 if test -f "$arg"; then
1552 for fil
in `cat $save_arg`
1554 # moreargs="$moreargs $fil"
1556 # A libtool-controlled object.
1558 # Check to see that this really is a libtool object.
1559 if (${SED} -e '2q' $arg |
grep "^# Generated by .*$PACKAGE") >/dev
/null
2>&1; then
1564 # If there is no directory component, then add one.
1566 */* |
*\\*) .
$arg ;;
1570 if test -z "$pic_object" || \
1571 test -z "$non_pic_object" ||
1572 test "$pic_object" = none
&& \
1573 test "$non_pic_object" = none
; then
1574 $echo "$modename: cannot find name of object for \`$arg'" 1>&2
1578 # Extract subdirectory from the argument.
1579 xdir
=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
1580 if test "X$xdir" = "X$arg"; then
1586 if test "$pic_object" != none
; then
1587 # Prepend the subdirectory the object is found in.
1588 pic_object
="$xdir$pic_object"
1590 if test "$prev" = dlfiles
; then
1591 if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
1592 dlfiles
="$dlfiles $pic_object"
1596 # If libtool objects are unsupported, then we need to preload.
1601 # CHECK ME: I think I busted this. -Ossama
1602 if test "$prev" = dlprefiles
; then
1603 # Preload the old-style object.
1604 dlprefiles
="$dlprefiles $pic_object"
1609 libobjs
="$libobjs $pic_object"
1614 if test "$non_pic_object" != none
; then
1615 # Prepend the subdirectory the object is found in.
1616 non_pic_object
="$xdir$non_pic_object"
1618 # A standard non-PIC object
1619 non_pic_objects
="$non_pic_objects $non_pic_object"
1620 if test -z "$pic_object" ||
test "$pic_object" = none
; then
1621 arg
="$non_pic_object"
1625 # Only an error if not doing a dry-run.
1626 if test -z "$run"; then
1627 $echo "$modename: \`$arg' is not a valid libtool object" 1>&2
1632 # Extract subdirectory from the argument.
1633 xdir
=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
1634 if test "X$xdir" = "X$arg"; then
1640 pic_object
=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"`
1641 non_pic_object
=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"`
1642 libobjs
="$libobjs $pic_object"
1643 non_pic_objects
="$non_pic_objects $non_pic_object"
1648 $echo "$modename: link input file \`$save_arg' does not exist"
1656 # We need an absolute path.
1658 [\\/]* |
[A-Za-z
]:[\\/]*) ;;
1660 $echo "$modename: only absolute run-paths are allowed" 1>&2
1664 if test "$prev" = rpath
; then
1667 *) rpath
="$rpath $arg" ;;
1672 *) xrpath
="$xrpath $arg" ;;
1679 compiler_flags
="$compiler_flags $qarg"
1681 compile_command
="$compile_command $qarg"
1682 finalize_command
="$finalize_command $qarg"
1686 linker_flags
="$linker_flags $qarg"
1687 compiler_flags
="$compiler_flags $wl$qarg"
1689 compile_command
="$compile_command $wl$qarg"
1690 finalize_command
="$finalize_command $wl$qarg"
1694 linker_flags
="$linker_flags $qarg"
1695 compiler_flags
="$compiler_flags $qarg"
1697 compile_command
="$compile_command $qarg"
1698 finalize_command
="$finalize_command $qarg"
1707 compiler_flags
="$compiler_flags $arg"
1708 compile_command
="$compile_command $arg"
1709 finalize_command
="$finalize_command $arg"
1714 eval "$prev=\"\$arg\""
1719 fi # test -n "$prev"
1725 if test -n "$link_static_flag"; then
1726 compile_command
="$compile_command $link_static_flag"
1727 finalize_command
="$finalize_command $link_static_flag"
1733 # FIXME: remove this flag sometime in the future.
1734 $echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2
1758 -export-symbols |
-export-symbols-regex)
1759 if test -n "$export_symbols" ||
test -n "$export_symbols_regex"; then
1760 $echo "$modename: more than one -exported-symbols argument is not allowed"
1763 if test "X$arg" = "X-export-symbols"; then
1772 prev
=darwin_framework
1773 compiler_flags
="$compiler_flags $arg"
1774 compile_command
="$compile_command $arg"
1775 finalize_command
="$finalize_command $arg"
1784 # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:*
1785 # so, if we see these flags be careful not to treat them like -L
1787 case $with_gcc/$host in
1788 no
/*-*-irix* |
/*-*-irix*)
1789 compile_command
="$compile_command $arg"
1790 finalize_command
="$finalize_command $arg"
1797 dir
=`$echo "X$arg" | $Xsed -e 's/^-L//'`
1798 # We need an absolute path.
1800 [\\/]* |
[A-Za-z
]:[\\/]*) ;;
1802 absdir
=`cd "$dir" && pwd`
1803 if test -z "$absdir"; then
1804 $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2
1813 deplibs
="$deplibs -L$dir"
1814 lib_search_path
="$lib_search_path $dir"
1818 *-*-cygwin* |
*-*-mingw* |
*-*-pw32* |
*-*-os2*)
1819 case :$dllsearchpath: in
1821 *) dllsearchpath
="$dllsearchpath:$dir";;
1829 if test "X$arg" = "X-lc" ||
test "X$arg" = "X-lm"; then
1831 *-*-cygwin* |
*-*-pw32* |
*-*-beos*)
1832 # These systems don't actually have a C or math library (as such)
1835 *-*-mingw* |
*-*-os2*)
1836 # These systems don't actually have a C library (as such)
1837 test "X$arg" = "X-lc" && continue
1839 *-*-openbsd* |
*-*-freebsd* |
*-*-dragonfly*)
1840 # Do not include libc due to us having libc/libc_r.
1841 test "X$arg" = "X-lc" && continue
1843 *-*-rhapsody* |
*-*-darwin1.
[012])
1844 # Rhapsody C and math libraries are in the System framework
1845 deplibs
="$deplibs -framework System"
1848 elif test "X$arg" = "X-lc_r"; then
1850 *-*-openbsd* |
*-*-freebsd* |
*-*-dragonfly*)
1851 # Do not include libc_r directly, use -pthread flag.
1856 deplibs
="$deplibs $arg"
1860 # Tru64 UNIX uses -model [arg] to determine the layout of C++
1861 # classes, name mangling, and exception handling.
1863 compile_command
="$compile_command $arg"
1864 compiler_flags
="$compiler_flags $arg"
1865 finalize_command
="$finalize_command $arg"
1870 -mt|
-mthreads|
-kthread|
-Kthread|
-pthread|
-pthreads|
--thread-safe)
1871 compiler_flags
="$compiler_flags $arg"
1872 compile_command
="$compile_command $arg"
1873 finalize_command
="$finalize_command $arg"
1882 # -64, -mips[0-9] enable 64-bit mode on the SGI compiler
1883 # -r[0-9][0-9]* specifies the processor on the SGI compiler
1884 # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler
1885 # +DA*, +DD* enable 64-bit mode on the HP compiler
1886 # -q* pass through compiler args for the IBM compiler
1887 # -m* pass through architecture-specific compiler args for GCC
1888 -64|
-mips[0-9]|
-r[0-9][0-9]*|
-xarch=*|
-xtarget=*|
+DA
*|
+DD
*|
-q*|
-m*)
1890 # Unknown arguments in both finalize_command and compile_command need
1891 # to be aesthetically quoted because they are evaled later.
1892 arg
=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
1894 *[\
[\~\
#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
1898 compile_command
="$compile_command $arg"
1899 finalize_command
="$finalize_command $arg"
1900 if test "$with_gcc" = "yes" ; then
1901 compiler_flags
="$compiler_flags $arg"
1918 *-*-cygwin* |
*-*-mingw* |
*-*-pw32* |
*-*-os2*)
1919 # The PATH hackery in wrapper scripts is required on Windows
1920 # in order for the loader to find any dlls it needs.
1921 $echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2
1922 $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2
1925 *) no_install
=yes ;;
1942 -precious-files-regex)
1963 dir
=`$echo "X$arg" | $Xsed -e 's/^-R//'`
1964 # We need an absolute path.
1966 [\\/]* |
[A-Za-z
]:[\\/]*) ;;
1968 $echo "$modename: only absolute run-paths are allowed" 1>&2
1974 *) xrpath
="$xrpath $dir" ;;
1980 # The effects of -static are defined in a previous loop.
1981 # We used to do the same as -all-static on platforms that
1982 # didn't have a PIC flag, but the assumption that the effects
1983 # would be equivalent was wrong. It would break on at least
1984 # Digital Unix and AIX.
2004 args
=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'`
2006 save_ifs
="$IFS"; IFS
=','
2007 for flag
in $args; do
2010 *[\
[\~\
#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
2015 compiler_flags
="$compiler_flags $flag"
2018 arg
=`$echo "X$arg" | $Xsed -e "s/^ //"`
2022 args
=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'`
2024 save_ifs
="$IFS"; IFS
=','
2025 for flag
in $args; do
2028 *[\
[\~\
#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
2033 compiler_flags
="$compiler_flags $wl$flag"
2034 linker_flags
="$linker_flags $flag"
2037 arg
=`$echo "X$arg" | $Xsed -e "s/^ //"`
2055 # Some other compiler flag.
2057 # Unknown arguments in both finalize_command and compile_command need
2058 # to be aesthetically quoted because they are evaled later.
2059 arg
=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
2061 *[\
[\~\
#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
2068 # A standard object.
2073 # A libtool-controlled object.
2075 # Check to see that this really is a libtool object.
2076 if (${SED} -e '2q' $arg |
grep "^# Generated by .*$PACKAGE") >/dev
/null
2>&1; then
2081 # If there is no directory component, then add one.
2083 */* |
*\\*) .
$arg ;;
2087 if test -z "$pic_object" || \
2088 test -z "$non_pic_object" ||
2089 test "$pic_object" = none
&& \
2090 test "$non_pic_object" = none
; then
2091 $echo "$modename: cannot find name of object for \`$arg'" 1>&2
2095 # Extract subdirectory from the argument.
2096 xdir
=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
2097 if test "X$xdir" = "X$arg"; then
2103 if test "$pic_object" != none
; then
2104 # Prepend the subdirectory the object is found in.
2105 pic_object
="$xdir$pic_object"
2107 if test "$prev" = dlfiles
; then
2108 if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
2109 dlfiles
="$dlfiles $pic_object"
2113 # If libtool objects are unsupported, then we need to preload.
2118 # CHECK ME: I think I busted this. -Ossama
2119 if test "$prev" = dlprefiles
; then
2120 # Preload the old-style object.
2121 dlprefiles
="$dlprefiles $pic_object"
2126 libobjs
="$libobjs $pic_object"
2131 if test "$non_pic_object" != none
; then
2132 # Prepend the subdirectory the object is found in.
2133 non_pic_object
="$xdir$non_pic_object"
2135 # A standard non-PIC object
2136 non_pic_objects
="$non_pic_objects $non_pic_object"
2137 if test -z "$pic_object" ||
test "$pic_object" = none
; then
2138 arg
="$non_pic_object"
2142 # Only an error if not doing a dry-run.
2143 if test -z "$run"; then
2144 $echo "$modename: \`$arg' is not a valid libtool object" 1>&2
2149 # Extract subdirectory from the argument.
2150 xdir
=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
2151 if test "X$xdir" = "X$arg"; then
2157 pic_object
=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"`
2158 non_pic_object
=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"`
2159 libobjs
="$libobjs $pic_object"
2160 non_pic_objects
="$non_pic_objects $non_pic_object"
2167 deplibs
="$deplibs $arg"
2168 old_deplibs
="$old_deplibs $arg"
2173 # A libtool-controlled library.
2175 if test "$prev" = dlfiles
; then
2176 # This library was specified with -dlopen.
2177 dlfiles
="$dlfiles $arg"
2179 elif test "$prev" = dlprefiles
; then
2180 # The library was specified with -dlpreopen.
2181 dlprefiles
="$dlprefiles $arg"
2184 deplibs
="$deplibs $arg"
2189 # Some other compiler argument.
2191 # Unknown arguments in both finalize_command and compile_command need
2192 # to be aesthetically quoted because they are evaled later.
2193 arg
=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
2195 *[\
[\~\
#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
2202 # Now actually substitute the argument into the commands.
2203 if test -n "$arg"; then
2204 compile_command
="$compile_command $arg"
2205 finalize_command
="$finalize_command $arg"
2207 done # argument parsing loop
2209 if test -n "$prev"; then
2210 $echo "$modename: the \`$prevarg' option requires an argument" 1>&2
2215 if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then
2216 eval arg
=\"$export_dynamic_flag_spec\"
2217 compile_command
="$compile_command $arg"
2218 finalize_command
="$finalize_command $arg"
2222 # calculate the name of the file, without its directory
2223 outputname
=`$echo "X$output" | $Xsed -e 's%^.*/%%'`
2224 libobjs_save
="$libobjs"
2226 if test -n "$shlibpath_var"; then
2227 # get the directories listed in $shlibpath_var
2228 eval shlib_search_path
=\
`\$echo \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\`
2232 eval sys_lib_search_path
=\"$sys_lib_search_path_spec\"
2233 eval sys_lib_dlsearch_path
=\"$sys_lib_dlsearch_path_spec\"
2235 output_objdir
=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'`
2236 if test "X$output_objdir" = "X$output"; then
2237 output_objdir
="$objdir"
2239 output_objdir
="$output_objdir/$objdir"
2241 # Create the object directory.
2242 if test ! -d "$output_objdir"; then
2243 $show "$mkdir $output_objdir"
2244 $run $mkdir $output_objdir
2246 if test "$status" -ne 0 && test ! -d "$output_objdir"; then
2251 # Determine the type of output
2254 $echo "$modename: you must specify an output file" 1>&2
2258 *.
$libext) linkmode
=oldlib
;;
2259 *.lo |
*.
$objext) linkmode
=obj
;;
2260 *.la
) linkmode
=lib
;;
2261 *) linkmode
=prog
;; # Anything else should be a program.
2265 *cygwin
* |
*mingw
* |
*pw32
*)
2266 # don't eliminate duplications in $postdeps and $predeps
2267 duplicate_compiler_generated_deps
=yes
2270 duplicate_compiler_generated_deps
=$duplicate_deps
2276 # Find all interdependent deplibs by searching for libraries
2277 # that are linked more than once (e.g. -la -lb -la)
2278 for deplib
in $deplibs; do
2279 if test "X$duplicate_deps" = "Xyes" ; then
2281 *" $deplib "*) specialdeplibs
="$specialdeplibs $deplib" ;;
2284 libs
="$libs $deplib"
2287 if test "$linkmode" = lib
; then
2288 libs
="$predeps $libs $compiler_lib_search_path $postdeps"
2290 # Compute libraries that are listed more than once in $predeps
2291 # $postdeps and mark them as special (i.e., whose duplicates are
2292 # not to be eliminated).
2294 if test "X$duplicate_compiler_generated_deps" = "Xyes" ; then
2295 for pre_post_dep
in $predeps $postdeps; do
2296 case "$pre_post_deps " in
2297 *" $pre_post_dep "*) specialdeplibs
="$specialdeplibs $pre_post_deps" ;;
2299 pre_post_deps
="$pre_post_deps $pre_post_dep"
2308 need_relink
=no
# whether we're linking any uninstalled libtool libraries
2309 notinst_deplibs
= # not-installed libtool libraries
2310 notinst_path
= # paths that contain not-installed libtool libraries
2314 for file in $dlfiles $dlprefiles; do
2318 $echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2
2330 passes
="conv scan dlopen dlpreopen link"
2335 for pass
in $passes; do
2336 if test "$linkmode,$pass" = "lib,link" ||
2337 test "$linkmode,$pass" = "prog,scan"; then
2341 if test "$linkmode" = prog
; then
2343 dlopen
) libs
="$dlfiles" ;;
2344 dlpreopen
) libs
="$dlprefiles" ;;
2345 link
) libs
="$deplibs %DEPLIBS% $dependency_libs" ;;
2348 if test "$pass" = dlopen
; then
2349 # Collect dlpreopened libraries
2350 save_deplibs
="$deplibs"
2353 for deplib
in $libs; do
2357 -mt|
-mthreads|
-kthread|
-Kthread|
-pthread|
-pthreads|
--thread-safe)
2358 if test "$linkmode,$pass" = "prog,link"; then
2359 compile_deplibs
="$deplib $compile_deplibs"
2360 finalize_deplibs
="$deplib $finalize_deplibs"
2362 compiler_flags
="$compiler_flags $deplib"
2367 if test "$linkmode" != lib
&& test "$linkmode" != prog
; then
2368 $echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2
2371 name
=`$echo "X$deplib" | $Xsed -e 's/^-l//'`
2372 for searchdir
in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do
2373 for search_ext
in .la
$std_shrext .so .a
; do
2374 # Search the libtool library
2375 lib
="$searchdir/lib${name}${search_ext}"
2376 if test -f "$lib"; then
2377 if test "$search_ext" = ".la"; then
2386 if test "$found" != yes; then
2387 # deplib doesn't seem to be a libtool library
2388 if test "$linkmode,$pass" = "prog,link"; then
2389 compile_deplibs
="$deplib $compile_deplibs"
2390 finalize_deplibs
="$deplib $finalize_deplibs"
2392 deplibs
="$deplib $deplibs"
2393 test "$linkmode" = lib
&& newdependency_libs
="$deplib $newdependency_libs"
2396 else # deplib is a libtool library
2397 # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib,
2398 # We need to do some special things here, and not later.
2399 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
2400 case " $predeps $postdeps " in
2402 if (${SED} -e '2q' $lib |
2403 grep "^# Generated by .*$PACKAGE") >/dev
/null
2>&1; then
2407 */* |
*\\*) .
$lib ;;
2410 for l
in $old_library $library_names; do
2413 if test "X$ll" = "X$old_library" ; then # only static version available
2415 ladir
=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'`
2416 test "X$ladir" = "X$lib" && ladir
="."
2417 lib
=$ladir/$old_library
2418 if test "$linkmode,$pass" = "prog,link"; then
2419 compile_deplibs
="$deplib $compile_deplibs"
2420 finalize_deplibs
="$deplib $finalize_deplibs"
2422 deplibs
="$deplib $deplibs"
2423 test "$linkmode" = lib
&& newdependency_libs
="$deplib $newdependency_libs"
2437 deplibs
="$deplib $deplibs"
2438 test "$pass" = conv
&& continue
2439 newdependency_libs
="$deplib $newdependency_libs"
2440 newlib_search_path
="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
2443 if test "$pass" = conv
; then
2444 deplibs
="$deplib $deplibs"
2447 if test "$pass" = scan
; then
2448 deplibs
="$deplib $deplibs"
2450 compile_deplibs
="$deplib $compile_deplibs"
2451 finalize_deplibs
="$deplib $finalize_deplibs"
2453 newlib_search_path
="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
2456 $echo "$modename: warning: \`-L' is ignored for archives/objects" 1>&2
2462 if test "$pass" = link
; then
2463 dir
=`$echo "X$deplib" | $Xsed -e 's/^-R//'`
2464 # Make sure the xrpath contains only unique directories.
2467 *) xrpath
="$xrpath $dir" ;;
2470 deplibs
="$deplib $deplibs"
2473 *.la
) lib
="$deplib" ;;
2475 if test "$pass" = conv
; then
2476 deplibs
="$deplib $deplibs"
2482 case $deplibs_check_method in
2484 set dummy
$deplibs_check_method
2485 match_pattern_regex
=`expr "$deplibs_check_method" : "$2 \(.*\)"`
2486 if eval $echo \"$deplib\" 2>/dev
/null \
2488 |
$EGREP "$match_pattern_regex" > /dev
/null
; then
2496 if test "$valid_a_lib" != yes; then
2498 $echo "*** Warning: Trying to link with static lib archive $deplib."
2499 $echo "*** I have the capability to make that library automatically link in when"
2500 $echo "*** you link to this library. But I can only do this if you have a"
2501 $echo "*** shared version of the library, which you do not appear to have"
2502 $echo "*** because the file extensions .$libext of this argument makes me believe"
2503 $echo "*** that it is just a static archive that I should not used here."
2506 $echo "*** Warning: Linking the shared library $output against the"
2507 $echo "*** static library $deplib is not portable!"
2508 deplibs
="$deplib $deplibs"
2513 if test "$pass" != link
; then
2514 deplibs
="$deplib $deplibs"
2516 compile_deplibs
="$deplib $compile_deplibs"
2517 finalize_deplibs
="$deplib $finalize_deplibs"
2524 if test "$pass" = conv
; then
2525 deplibs
="$deplib $deplibs"
2526 elif test "$linkmode" = prog
; then
2527 if test "$pass" = dlpreopen ||
test "$dlopen_support" != yes ||
test "$build_libtool_libs" = no
; then
2528 # If there is no dlopen support or we're linking statically,
2529 # we need to preload.
2530 newdlprefiles
="$newdlprefiles $deplib"
2531 compile_deplibs
="$deplib $compile_deplibs"
2532 finalize_deplibs
="$deplib $finalize_deplibs"
2534 newdlfiles
="$newdlfiles $deplib"
2544 if test "$found" = yes ||
test -f "$lib"; then :
2546 $echo "$modename: cannot find the library \`$lib'" 1>&2
2550 # Check to see that this really is a libtool archive.
2551 if (${SED} -e '2q' $lib |
grep "^# Generated by .*$PACKAGE") >/dev
/null
2>&1; then :
2553 $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
2557 ladir
=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'`
2558 test "X$ladir" = "X$lib" && ladir
="."
2566 # If the library was installed with an old release of libtool,
2567 # it will not redefine variables installed, or shouldnotlink
2575 */* |
*\\*) .
$lib ;;
2579 if test "$linkmode,$pass" = "lib,link" ||
2580 test "$linkmode,$pass" = "prog,scan" ||
2581 { test "$linkmode" != prog
&& test "$linkmode" != lib
; }; then
2582 test -n "$dlopen" && dlfiles
="$dlfiles $dlopen"
2583 test -n "$dlpreopen" && dlprefiles
="$dlprefiles $dlpreopen"
2586 if test "$pass" = conv
; then
2587 # Only check for convenience libraries
2588 deplibs
="$lib $deplibs"
2589 if test -z "$libdir"; then
2590 if test -z "$old_library"; then
2591 $echo "$modename: cannot find name of link library for \`$lib'" 1>&2
2594 # It is a libtool convenience library, so add in its objects.
2595 convenience
="$convenience $ladir/$objdir/$old_library"
2596 old_convenience
="$old_convenience $ladir/$objdir/$old_library"
2598 for deplib
in $dependency_libs; do
2599 deplibs
="$deplib $deplibs"
2600 if test "X$duplicate_deps" = "Xyes" ; then
2601 case "$tmp_libs " in
2602 *" $deplib "*) specialdeplibs
="$specialdeplibs $deplib" ;;
2605 tmp_libs
="$tmp_libs $deplib"
2607 elif test "$linkmode" != prog
&& test "$linkmode" != lib
; then
2608 $echo "$modename: \`$lib' is not a convenience library" 1>&2
2615 # Get the name of the library we link against.
2617 for l
in $old_library $library_names; do
2620 if test -z "$linklib"; then
2621 $echo "$modename: cannot find name of link library for \`$lib'" 1>&2
2625 # This library was specified with -dlopen.
2626 if test "$pass" = dlopen
; then
2627 if test -z "$libdir"; then
2628 $echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2
2631 if test -z "$dlname" ||
2632 test "$dlopen_support" != yes ||
2633 test "$build_libtool_libs" = no
; then
2634 # If there is no dlname, no dlopen support or we're linking
2635 # statically, we need to preload. We also need to preload any
2636 # dependent libraries so libltdl's deplib preloader doesn't
2637 # bomb out in the load deplibs phase.
2638 dlprefiles
="$dlprefiles $lib $dependency_libs"
2640 newdlfiles
="$newdlfiles $lib"
2645 # We need an absolute path.
2647 [\\/]* |
[A-Za-z
]:[\\/]*) abs_ladir
="$ladir" ;;
2649 abs_ladir
=`cd "$ladir" && pwd`
2650 if test -z "$abs_ladir"; then
2651 $echo "$modename: warning: cannot determine absolute directory name of \`$ladir'" 1>&2
2652 $echo "$modename: passing it literally to the linker, although it might fail" 1>&2
2657 laname
=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
2659 # Find the relevant object directory and library name.
2660 if test "X$installed" = Xyes
; then
2661 if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then
2662 $echo "$modename: warning: library \`$lib' was moved." 1>&2
2670 test "X$hardcode_automatic" = Xyes
&& avoidtemprpath
=yes
2672 if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then
2675 # Remove this search path later
2676 notinst_path
="$notinst_path $abs_ladir"
2678 dir
="$ladir/$objdir"
2679 absdir
="$abs_ladir/$objdir"
2680 # Remove this search path later
2681 notinst_path
="$notinst_path $abs_ladir"
2683 fi # $installed = yes
2684 name
=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
2686 # This library was specified with -dlpreopen.
2687 if test "$pass" = dlpreopen
; then
2688 if test -z "$libdir"; then
2689 $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2
2692 # Prefer using a static library (so that no silly _DYNAMIC symbols
2693 # are required to link).
2694 if test -n "$old_library"; then
2695 newdlprefiles
="$newdlprefiles $dir/$old_library"
2696 # Otherwise, use the dlname, so that lt_dlopen finds it.
2697 elif test -n "$dlname"; then
2698 newdlprefiles
="$newdlprefiles $dir/$dlname"
2700 newdlprefiles
="$newdlprefiles $dir/$linklib"
2702 fi # $pass = dlpreopen
2704 if test -z "$libdir"; then
2705 # Link the convenience library
2706 if test "$linkmode" = lib
; then
2707 deplibs
="$dir/$old_library $deplibs"
2708 elif test "$linkmode,$pass" = "prog,link"; then
2709 compile_deplibs
="$dir/$old_library $compile_deplibs"
2710 finalize_deplibs
="$dir/$old_library $finalize_deplibs"
2712 deplibs
="$lib $deplibs" # used for prog,scan pass
2718 if test "$linkmode" = prog
&& test "$pass" != link
; then
2719 newlib_search_path
="$newlib_search_path $ladir"
2720 deplibs
="$lib $deplibs"
2723 if test "$link_all_deplibs" != no ||
test -z "$library_names" ||
2724 test "$build_libtool_libs" = no
; then
2729 for deplib
in $dependency_libs; do
2731 -L*) newlib_search_path
="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test
2733 # Need to link against all dependency_libs?
2734 if test "$linkalldeplibs" = yes; then
2735 deplibs
="$deplib $deplibs"
2737 # Need to hardcode shared library paths
2738 # or/and link against static libraries
2739 newdependency_libs
="$deplib $newdependency_libs"
2741 if test "X$duplicate_deps" = "Xyes" ; then
2742 case "$tmp_libs " in
2743 *" $deplib "*) specialdeplibs
="$specialdeplibs $deplib" ;;
2746 tmp_libs
="$tmp_libs $deplib"
2749 fi # $linkmode = prog...
2751 if test "$linkmode,$pass" = "prog,link"; then
2752 if test -n "$library_names" &&
2753 { test "$prefer_static_libs" = no ||
test -z "$old_library"; }; then
2754 # We need to hardcode the library path
2755 if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then
2756 # Make sure the rpath contains only unique directories.
2757 case "$temp_rpath " in
2760 *) temp_rpath
="$temp_rpath $absdir" ;;
2764 # Hardcode the library path.
2765 # Skip directories that are in the system default run-time
2767 case " $sys_lib_dlsearch_path " in
2770 case "$compile_rpath " in
2772 *) compile_rpath
="$compile_rpath $absdir"
2776 case " $sys_lib_dlsearch_path " in
2779 case "$finalize_rpath " in
2781 *) finalize_rpath
="$finalize_rpath $libdir"
2785 fi # $linkmode,$pass = prog,link...
2787 if test "$alldeplibs" = yes &&
2788 { test "$deplibs_check_method" = pass_all ||
2789 { test "$build_libtool_libs" = yes &&
2790 test -n "$library_names"; }; }; then
2791 # We only need to search for static libraries
2796 link_static
=no
# Whether the deplib will be linked statically
2797 if test -n "$library_names" &&
2798 { test "$prefer_static_libs" = no ||
test -z "$old_library"; }; then
2799 if test "$installed" = no
; then
2800 notinst_deplibs
="$notinst_deplibs $lib"
2803 # This is a shared library
2805 # Warn about portability, can't link against -module's on
2806 # some systems (darwin)
2807 if test "$shouldnotlink" = yes && test "$pass" = link
; then
2809 if test "$linkmode" = prog
; then
2810 $echo "*** Warning: Linking the executable $output against the loadable module"
2812 $echo "*** Warning: Linking the shared library $output against the loadable module"
2814 $echo "*** $linklib is not portable!"
2816 if test "$linkmode" = lib
&&
2817 test "$hardcode_into_libs" = yes; then
2818 # Hardcode the library path.
2819 # Skip directories that are in the system default run-time
2821 case " $sys_lib_dlsearch_path " in
2824 case "$compile_rpath " in
2826 *) compile_rpath
="$compile_rpath $absdir"
2830 case " $sys_lib_dlsearch_path " in
2833 case "$finalize_rpath " in
2835 *) finalize_rpath
="$finalize_rpath $libdir"
2841 if test -n "$old_archive_from_expsyms_cmds"; then
2842 # figure out the soname
2843 set dummy
$library_names
2846 libname
=`eval \\$echo \"$libname_spec\"`
2847 # use dlname if we got it. it's perfectly good, no?
2848 if test -n "$dlname"; then
2850 elif test -n "$soname_spec"; then
2854 major
=`expr $current - $age`
2858 eval soname
=\"$soname_spec\"
2863 # Make a new name for the extract_expsyms_cmds to use
2865 soname
=`$echo $soroot | ${SED} -e 's/^.*\///'`
2866 newlib
="libimp-`$echo $soname | ${SED} 's/^lib//;s/\.dll$//'`.a"
2868 # If the library has no export list, then create one now
2869 if test -f "$output_objdir/$soname-def"; then :
2871 $show "extracting exported symbol list from \`$soname'"
2872 save_ifs
="$IFS"; IFS
='~'
2873 cmds
=$extract_expsyms_cmds
2874 for cmd
in $cmds; do
2878 $run eval "$cmd" ||
exit $?
2884 if test -f "$output_objdir/$newlib"; then :; else
2885 $show "generating import library for \`$soname'"
2886 save_ifs
="$IFS"; IFS
='~'
2887 cmds
=$old_archive_from_expsyms_cmds
2888 for cmd
in $cmds; do
2892 $run eval "$cmd" ||
exit $?
2896 # make sure the library variables are pointing to the new library
2899 fi # test -n "$old_archive_from_expsyms_cmds"
2901 if test "$linkmode" = prog ||
test "$mode" != relink
; then
2906 case $hardcode_action in
2907 immediate | unsupported
)
2908 if test "$hardcode_direct" = no
; then
2911 *-*-sco3.2v5
* ) add_dir
="-L$dir" ;;
2913 # if the lib is a module then we can not link against
2914 # it, someone is ignoring the new warnings I added
2915 if /usr
/bin
/file -L $add 2> /dev
/null |
$EGREP "bundle" >/dev
/null
; then
2916 $echo "** Warning, lib $linklib is a module, not a shared library"
2917 if test -z "$old_library" ; then
2919 $echo "** And there doesn't seem to be a static archive available"
2920 $echo "** The link will probably fail, sorry"
2922 add
="$dir/$old_library"
2926 elif test "$hardcode_minus_L" = no
; then
2928 *-*-sunos*) add_shlibpath
="$dir" ;;
2932 elif test "$hardcode_shlibpath_var" = no
; then
2933 add_shlibpath
="$dir"
2940 if test "$hardcode_direct" = yes; then
2942 elif test "$hardcode_minus_L" = yes; then
2944 # Try looking first in the location we're being installed to.
2945 if test -n "$inst_prefix_dir"; then
2948 add_dir
="$add_dir -L$inst_prefix_dir$libdir"
2953 elif test "$hardcode_shlibpath_var" = yes; then
2954 add_shlibpath
="$dir"
2963 if test "$lib_linked" != yes; then
2964 $echo "$modename: configuration error: unsupported hardcode properties"
2968 if test -n "$add_shlibpath"; then
2969 case :$compile_shlibpath: in
2970 *":$add_shlibpath:"*) ;;
2971 *) compile_shlibpath
="$compile_shlibpath$add_shlibpath:" ;;
2974 if test "$linkmode" = prog
; then
2975 test -n "$add_dir" && compile_deplibs
="$add_dir $compile_deplibs"
2976 test -n "$add" && compile_deplibs
="$add $compile_deplibs"
2978 test -n "$add_dir" && deplibs
="$add_dir $deplibs"
2979 test -n "$add" && deplibs
="$add $deplibs"
2980 if test "$hardcode_direct" != yes && \
2981 test "$hardcode_minus_L" != yes && \
2982 test "$hardcode_shlibpath_var" = yes; then
2983 case :$finalize_shlibpath: in
2985 *) finalize_shlibpath
="$finalize_shlibpath$libdir:" ;;
2991 if test "$linkmode" = prog ||
test "$mode" = relink
; then
2995 # Finalize command for both is simple: just hardcode it.
2996 if test "$hardcode_direct" = yes; then
2997 add
="$libdir/$linklib"
2998 elif test "$hardcode_minus_L" = yes; then
3001 elif test "$hardcode_shlibpath_var" = yes; then
3002 case :$finalize_shlibpath: in
3004 *) finalize_shlibpath
="$finalize_shlibpath$libdir:" ;;
3007 elif test "$hardcode_automatic" = yes; then
3008 if test -n "$inst_prefix_dir" &&
3009 test -f "$inst_prefix_dir$libdir/$linklib" ; then
3010 add
="$inst_prefix_dir$libdir/$linklib"
3012 add
="$libdir/$linklib"
3015 # We cannot seem to hardcode it, guess we'll fake it.
3017 # Try looking first in the location we're being installed to.
3018 if test -n "$inst_prefix_dir"; then
3021 add_dir
="$add_dir -L$inst_prefix_dir$libdir"
3028 if test "$linkmode" = prog
; then
3029 test -n "$add_dir" && finalize_deplibs
="$add_dir $finalize_deplibs"
3030 test -n "$add" && finalize_deplibs
="$add $finalize_deplibs"
3032 test -n "$add_dir" && deplibs
="$add_dir $deplibs"
3033 test -n "$add" && deplibs
="$add $deplibs"
3036 elif test "$linkmode" = prog
; then
3037 # Here we assume that one of hardcode_direct or hardcode_minus_L
3038 # is not unsupported. This is valid on all known static and
3040 if test "$hardcode_direct" != unsupported
; then
3041 test -n "$old_library" && linklib
="$old_library"
3042 compile_deplibs
="$dir/$linklib $compile_deplibs"
3043 finalize_deplibs
="$dir/$linklib $finalize_deplibs"
3045 compile_deplibs
="-l$name -L$dir $compile_deplibs"
3046 finalize_deplibs
="-l$name -L$dir $finalize_deplibs"
3048 elif test "$build_libtool_libs" = yes; then
3049 # Not a shared library
3050 if test "$deplibs_check_method" != pass_all
; then
3051 # We're trying link a shared library against a static one
3052 # but the system doesn't support it.
3054 # Just print a warning and add the library to dependency_libs so
3055 # that the program can be linked against the static library.
3057 $echo "*** Warning: This system can not link to static lib archive $lib."
3058 $echo "*** I have the capability to make that library automatically link in when"
3059 $echo "*** you link to this library. But I can only do this if you have a"
3060 $echo "*** shared version of the library, which you do not appear to have."
3061 if test "$module" = yes; then
3062 $echo "*** But as you try to build a module library, libtool will still create "
3063 $echo "*** a static module, that should work as long as the dlopening application"
3064 $echo "*** is linked with the -dlopen flag to resolve symbols at runtime."
3065 if test -z "$global_symbol_pipe"; then
3067 $echo "*** However, this would only work if libtool was able to extract symbol"
3068 $echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
3069 $echo "*** not find such a program. So, this module is probably useless."
3070 $echo "*** \`nm' from GNU binutils and a full rebuild may help."
3072 if test "$build_old_libs" = no
; then
3073 build_libtool_libs
=module
3076 build_libtool_libs
=no
3080 deplibs
="$dir/$old_library $deplibs"
3083 fi # link shared/static library?
3085 if test "$linkmode" = lib
; then
3086 if test -n "$dependency_libs" &&
3087 { test "$hardcode_into_libs" != yes ||
3088 test "$build_old_libs" = yes ||
3089 test "$link_static" = yes; }; then
3090 # Extract -R from dependency_libs
3092 for libdir
in $dependency_libs; do
3094 -R*) temp_xrpath
=`$echo "X$libdir" | $Xsed -e 's/^-R//'`
3096 *" $temp_xrpath "*) ;;
3097 *) xrpath
="$xrpath $temp_xrpath";;
3099 *) temp_deplibs
="$temp_deplibs $libdir";;
3102 dependency_libs
="$temp_deplibs"
3105 newlib_search_path
="$newlib_search_path $absdir"
3106 # Link against this library
3107 test "$link_static" = no
&& newdependency_libs
="$abs_ladir/$laname $newdependency_libs"
3108 # ... and its dependency_libs
3110 for deplib
in $dependency_libs; do
3111 newdependency_libs
="$deplib $newdependency_libs"
3112 if test "X$duplicate_deps" = "Xyes" ; then
3113 case "$tmp_libs " in
3114 *" $deplib "*) specialdeplibs
="$specialdeplibs $deplib" ;;
3117 tmp_libs
="$tmp_libs $deplib"
3120 if test "$link_all_deplibs" != no
; then
3121 # Add the search paths of all dependency libraries
3122 for deplib
in $dependency_libs; do
3124 -L*) path
="$deplib" ;;
3126 dir
=`$echo "X$deplib" | $Xsed -e 's%/[^/]*$%%'`
3127 test "X$dir" = "X$deplib" && dir
="."
3128 # We need an absolute path.
3130 [\\/]* |
[A-Za-z
]:[\\/]*) absdir
="$dir" ;;
3132 absdir
=`cd "$dir" && pwd`
3133 if test -z "$absdir"; then
3134 $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2
3139 if grep "^installed=no" $deplib > /dev
/null
; then
3140 path
="$absdir/$objdir"
3142 eval libdir
=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
3143 if test -z "$libdir"; then
3144 $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
3147 if test "$absdir" != "$libdir"; then
3148 $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2
3155 # we do not want to link against static libs,
3156 # but need to link against shared
3157 eval deplibrary_names
=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib`
3158 if test -n "$deplibrary_names" ; then
3159 for tmp
in $deplibrary_names ; do
3162 if test -f "$path/$depdepl" ; then
3163 depdepl
="$path/$depdepl"
3165 # do not add paths which are already there
3166 case " $newlib_search_path " in
3168 *) newlib_search_path
="$newlib_search_path $path";;
3181 # Again, we only want to link against shared libraries
3182 eval tmp_libs
=`$echo "X$deplib" | $Xsed -e "s,^\-l,,"`
3183 for tmp
in $newlib_search_path ; do
3184 if test -f "$tmp/lib$tmp_libs.dylib" ; then
3185 eval depdepl
="$tmp/lib$tmp_libs.dylib"
3196 case " $deplibs " in
3198 *) deplibs
="$path $deplibs" ;;
3200 case " $deplibs " in
3202 *) deplibs
="$depdepl $deplibs" ;;
3205 fi # link_all_deplibs != no
3207 done # for deplib in $libs
3208 dependency_libs
="$newdependency_libs"
3209 if test "$pass" = dlpreopen
; then
3210 # Link the dlpreopened libraries before other libraries
3211 for deplib
in $save_deplibs; do
3212 deplibs
="$deplib $deplibs"
3215 if test "$pass" != dlopen
; then
3216 if test "$pass" != conv
; then
3217 # Make sure lib_search_path contains only unique directories.
3219 for dir
in $newlib_search_path; do
3220 case "$lib_search_path " in
3222 *) lib_search_path
="$lib_search_path $dir" ;;
3228 if test "$linkmode,$pass" != "prog,link"; then
3231 vars
="compile_deplibs finalize_deplibs"
3233 for var
in $vars dependency_libs
; do
3234 # Add libraries to $var in reverse order
3235 eval tmp_libs
=\"\$
$var\"
3237 for deplib
in $tmp_libs; do
3238 # FIXME: Pedantically, this is the right thing to do, so
3239 # that some nasty dependency loop isn't accidentally
3241 #new_libs="$deplib $new_libs"
3242 # Pragmatically, this seems to cause very few problems in
3245 -L*) new_libs
="$deplib $new_libs" ;;
3248 # And here is the reason: when a library appears more
3249 # than once as an explicit dependence of a library, or
3250 # is implicitly linked in more than once by the
3251 # compiler, it is considered special, and multiple
3252 # occurrences thereof are not removed. Compare this
3253 # with having the same library being listed as a
3254 # dependency of multiple other libraries: in this case,
3255 # we know (pedantically, we assume) the library does not
3256 # need to be listed more than once, so we keep only the
3257 # last copy. This is not always right, but it is rare
3258 # enough that we require users that really mean to play
3259 # such unportable linking tricks to link the library
3260 # using -Wl,-lname, so that libtool does not consider it
3261 # for duplicate removal.
3262 case " $specialdeplibs " in
3263 *" $deplib "*) new_libs
="$deplib $new_libs" ;;
3265 case " $new_libs " in
3267 *) new_libs
="$deplib $new_libs" ;;
3275 for deplib
in $new_libs; do
3278 case " $tmp_libs " in
3280 *) tmp_libs
="$tmp_libs $deplib" ;;
3283 *) tmp_libs
="$tmp_libs $deplib" ;;
3286 eval $var=\"$tmp_libs\"
3289 # Last step: remove runtime libs from dependency_libs
3290 # (they stay in deplibs)
3292 for i
in $dependency_libs ; do
3293 case " $predeps $postdeps $compiler_lib_search_path " in
3298 if test -n "$i" ; then
3299 tmp_libs
="$tmp_libs $i"
3302 dependency_libs
=$tmp_libs
3304 if test "$linkmode" = prog
; then
3305 dlfiles
="$newdlfiles"
3306 dlprefiles
="$newdlprefiles"
3311 if test -n "$deplibs"; then
3312 $echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2
3315 if test -n "$dlfiles$dlprefiles" ||
test "$dlself" != no
; then
3316 $echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2
3319 if test -n "$rpath"; then
3320 $echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2
3323 if test -n "$xrpath"; then
3324 $echo "$modename: warning: \`-R' is ignored for archives" 1>&2
3327 if test -n "$vinfo"; then
3328 $echo "$modename: warning: \`-version-info/-version-number' is ignored for archives" 1>&2
3331 if test -n "$release"; then
3332 $echo "$modename: warning: \`-release' is ignored for archives" 1>&2
3335 if test -n "$export_symbols" ||
test -n "$export_symbols_regex"; then
3336 $echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2
3339 # Now set the variables for building old libraries.
3340 build_libtool_libs
=no
3342 objs
="$objs$old_deplibs"
3346 # Make sure we only generate libraries of the form `libNAME.la'.
3349 name
=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
3350 eval shared_ext
=\"$shrext_cmds\"
3351 eval libname
=\"$libname_spec\"
3354 if test "$module" = no
; then
3355 $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2
3359 if test "$need_lib_prefix" != no
; then
3360 # Add the "lib" prefix for modules if required
3361 name
=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
3362 eval shared_ext
=\"$shrext_cmds\"
3363 eval libname
=\"$libname_spec\"
3365 libname
=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
3370 if test -n "$objs"; then
3371 if test "$deplibs_check_method" != pass_all
; then
3372 $echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1
3376 $echo "*** Warning: Linking the shared library $output against the non-libtool"
3377 $echo "*** objects $objs is not portable!"
3378 libobjs
="$libobjs $objs"
3382 if test "$dlself" != no
; then
3383 $echo "$modename: warning: \`-dlopen self' is ignored for libtool libraries" 1>&2
3387 if test "$#" -gt 2; then
3388 $echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2
3393 if test -z "$rpath"; then
3394 if test "$build_libtool_libs" = yes; then
3395 # Building a libtool convenience library.
3396 # Some compilers have problems with a `.al' extension so
3397 # convenience libraries should have the same extension an
3398 # archive normally would.
3399 oldlibs
="$output_objdir/$libname.$libext $oldlibs"
3400 build_libtool_libs
=convenience
3404 if test -n "$vinfo"; then
3405 $echo "$modename: warning: \`-version-info/-version-number' is ignored for convenience libraries" 1>&2
3408 if test -n "$release"; then
3409 $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2
3413 # Parse the version information argument.
3414 save_ifs
="$IFS"; IFS
=':'
3415 set dummy
$vinfo 0 0 0
3418 if test -n "$8"; then
3419 $echo "$modename: too many parameters to \`-version-info'" 1>&2
3424 # convert absolute version numbers to libtool ages
3425 # this retains compatibility with .la files and attempts
3426 # to make the code below a bit more comprehensible
3428 case $vinfo_number in
3432 number_revision
="$4"
3434 # There are really only two kinds -- those that
3435 # use the current revision as the major version
3436 # and those that subtract age and use age as
3437 # a minor version. But, then there is irix
3438 # which has an extra 1 added just for fun
3440 case $version_type in
3441 darwin|linux|osf|windows
)
3442 current
=`expr $number_major + $number_minor`
3444 revision
="$number_revision"
3446 freebsd-aout|freebsd-elf|sunos
)
3447 current
="$number_major"
3448 revision
="$number_minor"
3452 current
=`expr $number_major + $number_minor - 1`
3454 revision
="$number_minor"
3465 # Check that each of the things are valid numbers.
3467 0|
[1-9]|
[1-9][0-9]|
[1-9][0-9][0-9]|
[1-9][0-9][0-9][0-9]|
[1-9][0-9][0-9][0-9][0-9]) ;;
3469 $echo "$modename: CURRENT \`$current' must be a nonnegative integer" 1>&2
3470 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
3476 0|
[1-9]|
[1-9][0-9]|
[1-9][0-9][0-9]|
[1-9][0-9][0-9][0-9]|
[1-9][0-9][0-9][0-9][0-9]) ;;
3478 $echo "$modename: REVISION \`$revision' must be a nonnegative integer" 1>&2
3479 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
3485 0|
[1-9]|
[1-9][0-9]|
[1-9][0-9][0-9]|
[1-9][0-9][0-9][0-9]|
[1-9][0-9][0-9][0-9][0-9]) ;;
3487 $echo "$modename: AGE \`$age' must be a nonnegative integer" 1>&2
3488 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
3493 if test "$age" -gt "$current"; then
3494 $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2
3495 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
3499 # Calculate the version variables.
3503 case $version_type in
3507 # Like Linux, but with the current version available in
3508 # verstring for coding it into the library header
3509 major
=.
`expr $current - $age`
3510 versuffix
="$major.$age.$revision"
3511 # Darwin ld doesn't like 0 for these options...
3512 minor_current
=`expr $current + 1`
3513 verstring
="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision"
3518 versuffix
=".$current.$revision";
3523 versuffix
=".$current";
3527 major
=`expr $current - $age + 1`
3529 case $version_type in
3530 nonstopux
) verstring_prefix
=nonstopux
;;
3531 *) verstring_prefix
=sgi
;;
3533 verstring
="$verstring_prefix$major.$revision"
3535 # Add in all the interfaces that we are compatible with.
3537 while test "$loop" -ne 0; do
3538 iface
=`expr $revision - $loop`
3539 loop
=`expr $loop - 1`
3540 verstring
="$verstring_prefix$major.$iface:$verstring"
3543 # Before this point, $major must not contain `.'.
3545 versuffix
="$major.$revision"
3549 major
=.
`expr $current - $age`
3550 versuffix
="$major.$age.$revision"
3554 major
=.
`expr $current - $age`
3555 versuffix
=".$current.$age.$revision"
3556 verstring
="$current.$age.$revision"
3558 # Add in all the interfaces that we are compatible with.
3560 while test "$loop" -ne 0; do
3561 iface
=`expr $current - $loop`
3562 loop
=`expr $loop - 1`
3563 verstring
="$verstring:${iface}.0"
3566 # Make executables depend on our current version.
3567 verstring
="$verstring:${current}.0"
3572 versuffix
=".$current.$revision"
3576 # Use '-' rather than '.', since we only want one
3577 # extension on DOS 8.3 filesystems.
3578 major
=`expr $current - $age`
3583 $echo "$modename: unknown library version type \`$version_type'" 1>&2
3584 $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
3589 # Clear the version info if we defaulted, and they specified a release.
3590 if test -z "$vinfo" && test -n "$release"; then
3592 case $version_type in
3594 # we can't check for "0.0" in archive_cmds due to quoting
3595 # problems, so we reset it completely
3602 if test "$need_version" = no
; then
3609 # Remove version info from name if versioning should be avoided
3610 if test "$avoid_version" = yes && test "$need_version" = no
; then
3616 # Check to see if the archive will have undefined symbols.
3617 if test "$allow_undefined" = yes; then
3618 if test "$allow_undefined_flag" = unsupported
; then
3619 $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2
3620 build_libtool_libs
=no
3624 # Don't allow undefined symbols.
3625 allow_undefined_flag
="$no_undefined_flag"
3629 if test "$mode" != relink
; then
3630 # Remove our outputs, but don't remove object files since they
3631 # may have been created when compiling PIC objects.
3633 tempremovelist
=`$echo "$output_objdir/*"`
3634 for p
in $tempremovelist; do
3638 $output_objdir/$outputname |
$output_objdir/$libname.
* |
$output_objdir/${libname}${release}.
*)
3639 if test "X$precious_files_regex" != "X"; then
3640 if echo $p |
$EGREP -e "$precious_files_regex" >/dev
/null
2>&1
3645 removelist
="$removelist $p"
3650 if test -n "$removelist"; then
3651 $show "${rm}r $removelist"
3652 $run ${rm}r
$removelist
3656 # Now set the variables for building old libraries.
3657 if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience
; then
3658 oldlibs
="$oldlibs $output_objdir/$libname.$libext"
3660 # Transform .lo files to .o files.
3661 oldobjs
="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP`
3664 # Eliminate all temporary directories.
3665 for path
in $notinst_path; do
3666 lib_search_path
=`$echo "$lib_search_path " | ${SED} -e 's% $path % %g'`
3667 deplibs
=`$echo "$deplibs " | ${SED} -e 's% -L$path % %g'`
3668 dependency_libs
=`$echo "$dependency_libs " | ${SED} -e 's% -L$path % %g'`
3671 if test -n "$xrpath"; then
3672 # If the user specified any rpath flags, then add them.
3674 for libdir
in $xrpath; do
3675 temp_xrpath
="$temp_xrpath -R$libdir"
3676 case "$finalize_rpath " in
3678 *) finalize_rpath
="$finalize_rpath $libdir" ;;
3681 if test "$hardcode_into_libs" != yes ||
test "$build_old_libs" = yes; then
3682 dependency_libs
="$temp_xrpath $dependency_libs"
3686 # Make sure dlfiles contains only unique files that won't be dlpreopened
3687 old_dlfiles
="$dlfiles"
3689 for lib
in $old_dlfiles; do
3690 case " $dlprefiles $dlfiles " in
3692 *) dlfiles
="$dlfiles $lib" ;;
3696 # Make sure dlprefiles contains only unique files
3697 old_dlprefiles
="$dlprefiles"
3699 for lib
in $old_dlprefiles; do
3700 case "$dlprefiles " in
3702 *) dlprefiles
="$dlprefiles $lib" ;;
3706 if test "$build_libtool_libs" = yes; then
3707 if test -n "$rpath"; then
3709 *-*-cygwin* |
*-*-mingw* |
*-*-pw32* |
*-*-os2* |
*-*-beos*)
3710 # these systems don't actually have a c library (as such)!
3712 *-*-rhapsody* |
*-*-darwin1.
[012])
3713 # Rhapsody C library is in the System framework
3714 deplibs
="$deplibs -framework System"
3717 # Don't link with libc until the a.out ld.so is fixed.
3719 *-*-openbsd* |
*-*-freebsd* |
*-*-dragonfly*)
3720 # Do not include libc due to us having libc/libc_r.
3721 test "X$arg" = "X-lc" && continue
3724 # Add libc to deplibs on all other systems if necessary.
3725 if test "$build_libtool_need_lc" = "yes"; then
3726 deplibs
="$deplibs -lc"
3732 # Transform deplibs into only deplibs that can be linked in shared.
3734 libname_save
=$libname
3735 release_save
=$release
3736 versuffix_save
=$versuffix
3738 # I'm not sure if I'm treating the release correctly. I think
3739 # release should show up in the -l (ie -lgmp5) so we don't want to
3740 # add it in twice. Is that correct?
3746 case $deplibs_check_method in
3748 # Don't check for shared/static. Everything works.
3749 # This might be a little naive. We might want to check
3750 # whether the library exists or not. But this is on
3751 # osf3 & osf4 and I'm not really sure... Just
3752 # implementing what was already the behavior.
3756 # This code stresses the "libraries are programs" paradigm to its
3757 # limits. Maybe even breaks it. We compile a program, linking it
3758 # against the deplibs as a proxy for the library. Then we can check
3759 # whether they linked in statically or dynamically with ldd.
3761 cat > conftest.c
<<EOF
3762 int main() { return 0; }
3765 $LTCC -o conftest conftest.c
$deplibs
3766 if test "$?" -eq 0 ; then
3767 ldd_output
=`ldd conftest`
3768 for i
in $deplibs; do
3769 name
=`expr $i : '-l\(.*\)'`
3770 # If $name is empty we are operating on a -L argument.
3771 if test "$name" != "" && test "$name" -ne "0"; then
3772 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
3773 case " $predeps $postdeps " in
3775 newdeplibs
="$newdeplibs $i"
3780 if test -n "$i" ; then
3781 libname
=`eval \\$echo \"$libname_spec\"`
3782 deplib_matches
=`eval \\$echo \"$library_names_spec\"`
3783 set dummy
$deplib_matches
3785 if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
3786 newdeplibs
="$newdeplibs $i"
3790 $echo "*** Warning: dynamic linker does not accept needed library $i."
3791 $echo "*** I have the capability to make that library automatically link in when"
3792 $echo "*** you link to this library. But I can only do this if you have a"
3793 $echo "*** shared version of the library, which I believe you do not have"
3794 $echo "*** because a test_compile did reveal that the linker did not use it for"
3795 $echo "*** its dynamic dependency list that programs get resolved with at runtime."
3799 newdeplibs
="$newdeplibs $i"
3803 # Error occurred in the first compile. Let's try to salvage
3804 # the situation: Compile a separate program for each library.
3805 for i
in $deplibs; do
3806 name
=`expr $i : '-l\(.*\)'`
3807 # If $name is empty we are operating on a -L argument.
3808 if test "$name" != "" && test "$name" != "0"; then
3810 $LTCC -o conftest conftest.c
$i
3812 if test "$?" -eq 0 ; then
3813 ldd_output
=`ldd conftest`
3814 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
3815 case " $predeps $postdeps " in
3817 newdeplibs
="$newdeplibs $i"
3822 if test -n "$i" ; then
3823 libname
=`eval \\$echo \"$libname_spec\"`
3824 deplib_matches
=`eval \\$echo \"$library_names_spec\"`
3825 set dummy
$deplib_matches
3827 if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
3828 newdeplibs
="$newdeplibs $i"
3832 $echo "*** Warning: dynamic linker does not accept needed library $i."
3833 $echo "*** I have the capability to make that library automatically link in when"
3834 $echo "*** you link to this library. But I can only do this if you have a"
3835 $echo "*** shared version of the library, which you do not appear to have"
3836 $echo "*** because a test_compile did reveal that the linker did not use this one"
3837 $echo "*** as a dynamic dependency that programs can get resolved with at runtime."
3843 $echo "*** Warning! Library $i is needed by this library but I was not able to"
3844 $echo "*** make it link in! You will probably need to install it or some"
3845 $echo "*** library that it depends on before this library will be fully"
3846 $echo "*** functional. Installing it before continuing would be even better."
3849 newdeplibs
="$newdeplibs $i"
3855 set dummy
$deplibs_check_method
3856 file_magic_regex
=`expr "$deplibs_check_method" : "$2 \(.*\)"`
3857 for a_deplib
in $deplibs; do
3858 name
=`expr $a_deplib : '-l\(.*\)'`
3859 # If $name is empty we are operating on a -L argument.
3860 if test "$name" != "" && test "$name" != "0"; then
3861 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
3862 case " $predeps $postdeps " in
3864 newdeplibs
="$newdeplibs $a_deplib"
3869 if test -n "$a_deplib" ; then
3870 libname
=`eval \\$echo \"$libname_spec\"`
3871 for i
in $lib_search_path $sys_lib_search_path $shlib_search_path; do
3872 potential_libs
=`ls $i/$libname[.-]* 2>/dev/null`
3873 for potent_lib
in $potential_libs; do
3874 # Follow soft links.
3875 if ls -lLd "$potent_lib" 2>/dev
/null \
3876 |
grep " -> " >/dev
/null
; then
3879 # The statement above tries to avoid entering an
3880 # endless loop below, in case of cyclic links.
3881 # We might still enter an endless loop, since a link
3882 # loop can be closed while we follow links,
3884 potlib
="$potent_lib"
3885 while test -h "$potlib" 2>/dev
/null
; do
3886 potliblink
=`ls -ld $potlib | ${SED} 's/.* -> //'`
3888 [\\/]* |
[A-Za-z
]:[\\/]*) potlib
="$potliblink";;
3889 *) potlib
=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";;
3892 if eval $file_magic_cmd \"\
$potlib\" 2>/dev
/null \
3894 |
$EGREP "$file_magic_regex" > /dev
/null
; then
3895 newdeplibs
="$newdeplibs $a_deplib"
3902 if test -n "$a_deplib" ; then
3905 $echo "*** Warning: linker path does not have real file for library $a_deplib."
3906 $echo "*** I have the capability to make that library automatically link in when"
3907 $echo "*** you link to this library. But I can only do this if you have a"
3908 $echo "*** shared version of the library, which you do not appear to have"
3909 $echo "*** because I did check the linker path looking for a file starting"
3910 if test -z "$potlib" ; then
3911 $echo "*** with $libname but no candidates were found. (...for file magic test)"
3913 $echo "*** with $libname and none of the candidates passed a file format test"
3914 $echo "*** using a file magic. Last file checked: $potlib"
3918 # Add a -L argument.
3919 newdeplibs
="$newdeplibs $a_deplib"
3921 done # Gone through all deplibs.
3924 set dummy
$deplibs_check_method
3925 match_pattern_regex
=`expr "$deplibs_check_method" : "$2 \(.*\)"`
3926 for a_deplib
in $deplibs; do
3927 name
=`expr $a_deplib : '-l\(.*\)'`
3928 # If $name is empty we are operating on a -L argument.
3929 if test -n "$name" && test "$name" != "0"; then
3930 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
3931 case " $predeps $postdeps " in
3933 newdeplibs
="$newdeplibs $a_deplib"
3938 if test -n "$a_deplib" ; then
3939 libname
=`eval \\$echo \"$libname_spec\"`
3940 for i
in $lib_search_path $sys_lib_search_path $shlib_search_path; do
3941 potential_libs
=`ls $i/$libname[.-]* 2>/dev/null`
3942 for potent_lib
in $potential_libs; do
3943 potlib
="$potent_lib" # see symlink-check above in file_magic test
3944 if eval $echo \"$potent_lib\" 2>/dev
/null \
3946 |
$EGREP "$match_pattern_regex" > /dev
/null
; then
3947 newdeplibs
="$newdeplibs $a_deplib"
3954 if test -n "$a_deplib" ; then
3957 $echo "*** Warning: linker path does not have real file for library $a_deplib."
3958 $echo "*** I have the capability to make that library automatically link in when"
3959 $echo "*** you link to this library. But I can only do this if you have a"
3960 $echo "*** shared version of the library, which you do not appear to have"
3961 $echo "*** because I did check the linker path looking for a file starting"
3962 if test -z "$potlib" ; then
3963 $echo "*** with $libname but no candidates were found. (...for regex pattern test)"
3965 $echo "*** with $libname and none of the candidates passed a file format test"
3966 $echo "*** using a regex pattern. Last file checked: $potlib"
3970 # Add a -L argument.
3971 newdeplibs
="$newdeplibs $a_deplib"
3973 done # Gone through all deplibs.
3977 tmp_deplibs
=`$echo "X $deplibs" | $Xsed -e 's/ -lc$//' \
3978 -e 's/ -[LR][^ ]*//g'`
3979 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
3980 for i
in $predeps $postdeps ; do
3981 # can't use Xsed below, because $i might contain '/'
3982 tmp_deplibs
=`$echo "X $tmp_deplibs" | ${SED} -e "1s,^X,," -e "s,$i,,"`
3985 if $echo "X $tmp_deplibs" |
$Xsed -e 's/[ ]//g' \
3986 |
grep .
>/dev
/null
; then
3988 if test "X$deplibs_check_method" = "Xnone"; then
3989 $echo "*** Warning: inter-library dependencies are not supported in this platform."
3991 $echo "*** Warning: inter-library dependencies are not known to be supported."
3993 $echo "*** All declared inter-library dependencies are being dropped."
3998 versuffix
=$versuffix_save
4000 release
=$release_save
4001 libname
=$libname_save
4005 *-*-rhapsody* |
*-*-darwin1.
[012])
4006 # On Rhapsody replace the C library is the System framework
4007 newdeplibs
=`$echo "X $newdeplibs" | $Xsed -e 's/ -lc / -framework System /'`
4011 if test "$droppeddeps" = yes; then
4012 if test "$module" = yes; then
4014 $echo "*** Warning: libtool could not satisfy all declared inter-library"
4015 $echo "*** dependencies of module $libname. Therefore, libtool will create"
4016 $echo "*** a static module, that should work as long as the dlopening"
4017 $echo "*** application is linked with the -dlopen flag."
4018 if test -z "$global_symbol_pipe"; then
4020 $echo "*** However, this would only work if libtool was able to extract symbol"
4021 $echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
4022 $echo "*** not find such a program. So, this module is probably useless."
4023 $echo "*** \`nm' from GNU binutils and a full rebuild may help."
4025 if test "$build_old_libs" = no
; then
4026 oldlibs
="$output_objdir/$libname.$libext"
4027 build_libtool_libs
=module
4030 build_libtool_libs
=no
4033 $echo "*** The inter-library dependencies that have been dropped here will be"
4034 $echo "*** automatically added whenever a program is linked with this library"
4035 $echo "*** or is declared to -dlopen it."
4037 if test "$allow_undefined" = no
; then
4039 $echo "*** Since this library must not contain undefined symbols,"
4040 $echo "*** because either the platform does not support them or"
4041 $echo "*** it was explicitly requested with -no-undefined,"
4042 $echo "*** libtool will only create a static version of it."
4043 if test "$build_old_libs" = no
; then
4044 oldlibs
="$output_objdir/$libname.$libext"
4045 build_libtool_libs
=module
4048 build_libtool_libs
=no
4053 # Done checking deplibs!
4057 # All the library-specific variables (install_libdir is set above).
4062 # Test again, we may have decided not to build it any more
4063 if test "$build_libtool_libs" = yes; then
4064 if test "$hardcode_into_libs" = yes; then
4065 # Hardcode the library paths
4068 rpath
="$finalize_rpath"
4069 test "$mode" != relink
&& rpath
="$compile_rpath$rpath"
4070 for libdir
in $rpath; do
4071 if test -n "$hardcode_libdir_flag_spec"; then
4072 if test -n "$hardcode_libdir_separator"; then
4073 if test -z "$hardcode_libdirs"; then
4074 hardcode_libdirs
="$libdir"
4076 # Just accumulate the unique libdirs.
4077 case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
4078 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
4081 hardcode_libdirs
="$hardcode_libdirs$hardcode_libdir_separator$libdir"
4086 eval flag
=\"$hardcode_libdir_flag_spec\"
4087 dep_rpath
="$dep_rpath $flag"
4089 elif test -n "$runpath_var"; then
4090 case "$perm_rpath " in
4092 *) perm_rpath
="$perm_rpath $libdir" ;;
4096 # Substitute the hardcoded libdirs into the rpath.
4097 if test -n "$hardcode_libdir_separator" &&
4098 test -n "$hardcode_libdirs"; then
4099 libdir
="$hardcode_libdirs"
4100 if test -n "$hardcode_libdir_flag_spec_ld"; then
4101 eval dep_rpath
=\"$hardcode_libdir_flag_spec_ld\"
4103 eval dep_rpath
=\"$hardcode_libdir_flag_spec\"
4106 if test -n "$runpath_var" && test -n "$perm_rpath"; then
4107 # We should set the runpath_var.
4109 for dir
in $perm_rpath; do
4112 eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var"
4114 test -n "$dep_rpath" && deplibs
="$dep_rpath $deplibs"
4117 shlibpath
="$finalize_shlibpath"
4118 test "$mode" != relink
&& shlibpath
="$compile_shlibpath$shlibpath"
4119 if test -n "$shlibpath"; then
4120 eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var"
4123 # Get the real and link names of the library.
4124 eval shared_ext
=\"$shrext_cmds\"
4125 eval library_names
=\"$library_names_spec\"
4126 set dummy
$library_names
4130 if test -n "$soname_spec"; then
4131 eval soname
=\"$soname_spec\"
4135 if test -z "$dlname"; then
4139 lib
="$output_objdir/$realname"
4142 linknames
="$linknames $link"
4145 # Use standard objects if they are pic
4146 test -z "$pic_flag" && libobjs
=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
4148 # Prepare the list of exported symbols
4149 if test -z "$export_symbols"; then
4150 if test "$always_export_symbols" = yes ||
test -n "$export_symbols_regex"; then
4151 $show "generating symbol list for \`$libname.la'"
4152 export_symbols
="$output_objdir/$libname.exp"
4153 $run $rm $export_symbols
4154 cmds
=$export_symbols_cmds
4155 save_ifs
="$IFS"; IFS
='~'
4156 for cmd
in $cmds; do
4159 if len
=`expr "X$cmd" : ".*"` &&
4160 test "$len" -le "$max_cmd_len" ||
test "$max_cmd_len" -le -1; then
4162 $run eval "$cmd" ||
exit $?
4163 skipped_export
=false
4165 # The command line is too long to execute in one step.
4166 $show "using reloadable object file for export list..."
4168 # Break out early, otherwise skipped_export may be
4169 # set to false by a later but shorter cmd.
4174 if test -n "$export_symbols_regex"; then
4175 $show "$EGREP -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\""
4176 $run eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
4177 $show "$mv \"${export_symbols}T\" \"$export_symbols\""
4178 $run eval '$mv "${export_symbols}T" "$export_symbols"'
4183 if test -n "$export_symbols" && test -n "$include_expsyms"; then
4184 $run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"'
4188 for test_deplib
in $deplibs; do
4189 case " $convenience " in
4190 *" $test_deplib "*) ;;
4192 tmp_deplibs
="$tmp_deplibs $test_deplib"
4196 deplibs
="$tmp_deplibs"
4198 if test -n "$convenience"; then
4199 if test -n "$whole_archive_flag_spec"; then
4200 save_libobjs
=$libobjs
4201 eval libobjs
=\"\
$libobjs $whole_archive_flag_spec\"
4203 gentop
="$output_objdir/${outputname}x"
4204 generated
="$generated $gentop"
4206 func_extract_archives
$gentop $convenience
4207 libobjs
="$libobjs $func_extract_archives_result"
4211 if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
4212 eval flag
=\"$thread_safe_flag_spec\"
4213 linker_flags
="$linker_flags $flag"
4216 # Make a backup of the uninstalled library when relinking
4217 if test "$mode" = relink
; then
4218 $run eval '(cd $output_objdir && $rm ${realname}U && $mv $realname ${realname}U)' ||
exit $?
4221 # Do each of the archive commands.
4222 if test "$module" = yes && test -n "$module_cmds" ; then
4223 if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
4224 eval test_cmds
=\"$module_expsym_cmds\"
4225 cmds
=$module_expsym_cmds
4227 eval test_cmds
=\"$module_cmds\"
4231 if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
4232 eval test_cmds
=\"$archive_expsym_cmds\"
4233 cmds
=$archive_expsym_cmds
4235 eval test_cmds
=\"$archive_cmds\"
4240 if test "X$skipped_export" != "X:" &&
4241 len
=`expr "X$test_cmds" : ".*" 2>/dev/null` &&
4242 test "$len" -le "$max_cmd_len" ||
test "$max_cmd_len" -le -1; then
4245 # The command line is too long to link in one step, link piecewise.
4246 $echo "creating reloadable object files..."
4248 # Save the value of $output and $libobjs because we want to
4249 # use them later. If we have whole_archive_flag_spec, we
4250 # want to use save_libobjs as it was before
4251 # whole_archive_flag_spec was expanded, because we can't
4252 # assume the linker understands whole_archive_flag_spec.
4253 # This may have to be revisited, in case too many
4254 # convenience libraries get linked in and end up exceeding
4256 if test -z "$convenience" ||
test -z "$whole_archive_flag_spec"; then
4257 save_libobjs
=$libobjs
4260 output_la
=`$echo "X$output" | $Xsed -e "$basename"`
4262 # Clear the reloadable object creation command queue and
4263 # initialize k to one.
4270 output
=$output_objdir/$output_la-${k}.
$objext
4271 # Loop over the list of objects to be linked.
4272 for obj
in $save_libobjs
4274 eval test_cmds
=\"$reload_cmds $objlist $last_robj\"
4275 if test "X$objlist" = X ||
4276 { len
=`expr "X$test_cmds" : ".*" 2>/dev/null` &&
4277 test "$len" -le "$max_cmd_len"; }; then
4278 objlist
="$objlist $obj"
4280 # The command $test_cmds is almost too long, add a
4281 # command to the queue.
4282 if test "$k" -eq 1 ; then
4283 # The first file doesn't have a previous command to add.
4284 eval concat_cmds
=\"$reload_cmds $objlist $last_robj\"
4286 # All subsequent reloadable object files will link in
4287 # the last one created.
4288 eval concat_cmds
=\"\
$concat_cmds~
$reload_cmds $objlist $last_robj\"
4290 last_robj
=$output_objdir/$output_la-${k}.
$objext
4292 output
=$output_objdir/$output_la-${k}.
$objext
4297 # Handle the remaining objects by creating one last
4298 # reloadable object file. All subsequent reloadable object
4299 # files will link in the last one created.
4300 test -z "$concat_cmds" || concat_cmds
=$concat_cmds~
4301 eval concat_cmds
=\"\
${concat_cmds}$reload_cmds $objlist $last_robj\"
4303 if ${skipped_export-false}; then
4304 $show "generating symbol list for \`$libname.la'"
4305 export_symbols
="$output_objdir/$libname.exp"
4306 $run $rm $export_symbols
4308 # Append the command to create the export file.
4309 eval concat_cmds
=\"\
$concat_cmds~
$export_symbols_cmds\"
4312 # Set up a command to remove the reloadable object files
4313 # after they are used.
4315 while test "$i" -lt "$k"
4318 delfiles
="$delfiles $output_objdir/$output_la-${i}.$objext"
4321 $echo "creating a temporary reloadable object file: $output"
4323 # Loop through the commands generated above and execute them.
4324 save_ifs
="$IFS"; IFS
='~'
4325 for cmd
in $concat_cmds; do
4328 $run eval "$cmd" ||
exit $?
4333 # Restore the value of output.
4336 if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then
4337 eval libobjs
=\"\
$libobjs $whole_archive_flag_spec\"
4339 # Expand the library linking commands again to reset the
4340 # value of $libobjs for piecewise linking.
4342 # Do each of the archive commands.
4343 if test "$module" = yes && test -n "$module_cmds" ; then
4344 if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
4345 cmds
=$module_expsym_cmds
4350 if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
4351 cmds
=$archive_expsym_cmds
4357 # Append the command to remove the reloadable object files
4358 # to the just-reset $cmds.
4359 eval cmds
=\"\
$cmds~\
$rm $delfiles\"
4361 save_ifs
="$IFS"; IFS
='~'
4362 for cmd
in $cmds; do
4366 $run eval "$cmd" ||
{
4369 # Restore the uninstalled library and exit
4370 if test "$mode" = relink
; then
4371 $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)'
4379 # Restore the uninstalled library and exit
4380 if test "$mode" = relink
; then
4381 $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' ||
exit $?
4383 if test -n "$convenience"; then
4384 if test -z "$whole_archive_flag_spec"; then
4385 $show "${rm}r $gentop"
4386 $run ${rm}r
"$gentop"
4393 # Create links to the real library.
4394 for linkname
in $linknames; do
4395 if test "$realname" != "$linkname"; then
4396 $show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)"
4397 $run eval '(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)' ||
exit $?
4401 # If -module or -export-dynamic was specified, set the dlname.
4402 if test "$module" = yes ||
test "$export_dynamic" = yes; then
4403 # On all known operating systems, these are identical.
4410 if test -n "$deplibs"; then
4411 $echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2
4414 if test -n "$dlfiles$dlprefiles" ||
test "$dlself" != no
; then
4415 $echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2
4418 if test -n "$rpath"; then
4419 $echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2
4422 if test -n "$xrpath"; then
4423 $echo "$modename: warning: \`-R' is ignored for objects" 1>&2
4426 if test -n "$vinfo"; then
4427 $echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2
4430 if test -n "$release"; then
4431 $echo "$modename: warning: \`-release' is ignored for objects" 1>&2
4436 if test -n "$objs$old_deplibs"; then
4437 $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2
4441 obj
=`$echo "X$output" | $Xsed -e "$lo2o"`
4449 # Delete the old objects.
4450 $run $rm $obj $libobj
4452 # Objects from convenience libraries. This assumes
4453 # single-version convenience libraries. Whenever we create
4454 # different ones for PIC/non-PIC, this we'll have to duplicate
4458 # reload_cmds runs $LD directly, so let us get rid of
4459 # -Wl from whole_archive_flag_spec
4462 if test -n "$convenience"; then
4463 if test -n "$whole_archive_flag_spec"; then
4464 eval reload_conv_objs
=\"\
$reload_objs $whole_archive_flag_spec\"
4466 gentop
="$output_objdir/${obj}x"
4467 generated
="$generated $gentop"
4469 func_extract_archives
$gentop $convenience
4470 reload_conv_objs
="$reload_objs $func_extract_archives_result"
4474 # Create the old-style object.
4475 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
4479 save_ifs
="$IFS"; IFS
='~'
4480 for cmd
in $cmds; do
4484 $run eval "$cmd" ||
exit $?
4488 # Exit if we aren't doing a library object file.
4489 if test -z "$libobj"; then
4490 if test -n "$gentop"; then
4491 $show "${rm}r $gentop"
4498 if test "$build_libtool_libs" != yes; then
4499 if test -n "$gentop"; then
4500 $show "${rm}r $gentop"
4504 # Create an invalid libtool object if no PIC, so that we don't
4505 # accidentally link it into a program.
4506 # $show "echo timestamp > $libobj"
4507 # $run eval "echo timestamp > $libobj" || exit $?
4511 if test -n "$pic_flag" ||
test "$pic_mode" != default
; then
4512 # Only do commands if we really have different PIC objects.
4513 reload_objs
="$libobjs $reload_conv_objs"
4516 save_ifs
="$IFS"; IFS
='~'
4517 for cmd
in $cmds; do
4521 $run eval "$cmd" ||
exit $?
4526 if test -n "$gentop"; then
4527 $show "${rm}r $gentop"
4536 *cygwin
*) output
=`$echo $output | ${SED} -e 's,.exe$,,;s,$,.exe,'` ;;
4538 if test -n "$vinfo"; then
4539 $echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2
4542 if test -n "$release"; then
4543 $echo "$modename: warning: \`-release' is ignored for programs" 1>&2
4546 if test "$preload" = yes; then
4547 if test "$dlopen_support" = unknown
&& test "$dlopen_self" = unknown
&&
4548 test "$dlopen_self_static" = unknown
; then
4549 $echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support."
4554 *-*-rhapsody* |
*-*-darwin1.
[012])
4555 # On Rhapsody replace the C library is the System framework
4556 compile_deplibs
=`$echo "X $compile_deplibs" | $Xsed -e 's/ -lc / -framework System /'`
4557 finalize_deplibs
=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'`
4563 # Don't allow lazy linking, it breaks C++ global constructors
4564 if test "$tagname" = CXX
; then
4565 compile_command
="$compile_command ${wl}-bind_at_load"
4566 finalize_command
="$finalize_command ${wl}-bind_at_load"
4571 compile_command
="$compile_command $compile_deplibs"
4572 finalize_command
="$finalize_command $finalize_deplibs"
4574 if test -n "$rpath$xrpath"; then
4575 # If the user specified any rpath flags, then add them.
4576 for libdir
in $rpath $xrpath; do
4577 # This is the magic to use -rpath.
4578 case "$finalize_rpath " in
4580 *) finalize_rpath
="$finalize_rpath $libdir" ;;
4585 # Now hardcode the library paths
4588 for libdir
in $compile_rpath $finalize_rpath; do
4589 if test -n "$hardcode_libdir_flag_spec"; then
4590 if test -n "$hardcode_libdir_separator"; then
4591 if test -z "$hardcode_libdirs"; then
4592 hardcode_libdirs
="$libdir"
4594 # Just accumulate the unique libdirs.
4595 case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
4596 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
4599 hardcode_libdirs
="$hardcode_libdirs$hardcode_libdir_separator$libdir"
4604 eval flag
=\"$hardcode_libdir_flag_spec\"
4605 rpath
="$rpath $flag"
4607 elif test -n "$runpath_var"; then
4608 case "$perm_rpath " in
4610 *) perm_rpath
="$perm_rpath $libdir" ;;
4614 *-*-cygwin* |
*-*-mingw* |
*-*-pw32* |
*-*-os2*)
4615 case :$dllsearchpath: in
4617 *) dllsearchpath
="$dllsearchpath:$libdir";;
4622 # Substitute the hardcoded libdirs into the rpath.
4623 if test -n "$hardcode_libdir_separator" &&
4624 test -n "$hardcode_libdirs"; then
4625 libdir
="$hardcode_libdirs"
4626 eval rpath
=\" $hardcode_libdir_flag_spec\"
4628 compile_rpath
="$rpath"
4632 for libdir
in $finalize_rpath; do
4633 if test -n "$hardcode_libdir_flag_spec"; then
4634 if test -n "$hardcode_libdir_separator"; then
4635 if test -z "$hardcode_libdirs"; then
4636 hardcode_libdirs
="$libdir"
4638 # Just accumulate the unique libdirs.
4639 case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
4640 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
4643 hardcode_libdirs
="$hardcode_libdirs$hardcode_libdir_separator$libdir"
4648 eval flag
=\"$hardcode_libdir_flag_spec\"
4649 rpath
="$rpath $flag"
4651 elif test -n "$runpath_var"; then
4652 case "$finalize_perm_rpath " in
4654 *) finalize_perm_rpath
="$finalize_perm_rpath $libdir" ;;
4658 # Substitute the hardcoded libdirs into the rpath.
4659 if test -n "$hardcode_libdir_separator" &&
4660 test -n "$hardcode_libdirs"; then
4661 libdir
="$hardcode_libdirs"
4662 eval rpath
=\" $hardcode_libdir_flag_spec\"
4664 finalize_rpath
="$rpath"
4666 if test -n "$libobjs" && test "$build_old_libs" = yes; then
4667 # Transform all the library objects into standard objects.
4668 compile_command
=`$echo "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
4669 finalize_command
=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
4673 if test -n "$dlfiles$dlprefiles" ||
test "$dlself" != no
; then
4674 if test -n "$NM" && test -n "$global_symbol_pipe"; then
4675 dlsyms
="${outputname}S.c"
4677 $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2
4681 if test -n "$dlsyms"; then
4685 # Discover the nlist of each of the dlfiles.
4686 nlist
="$output_objdir/${outputname}.nm"
4688 $show "$rm $nlist ${nlist}S ${nlist}T"
4689 $run $rm "$nlist" "${nlist}S" "${nlist}T"
4691 # Parse the name list into a source file.
4692 $show "creating $output_objdir/$dlsyms"
4694 test -z "$run" && $echo > "$output_objdir/$dlsyms" "\
4695 /* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */
4696 /* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */
4702 /* Prevent the only kind of declaration conflicts we can make. */
4703 #define lt_preloaded_symbols some_other_symbol
4705 /* External symbol declarations for the compiler. */\
4708 if test "$dlself" = yes; then
4709 $show "generating symbol list for \`$output'"
4711 test -z "$run" && $echo ': @PROGRAM@ ' > "$nlist"
4713 # Add our own program objects to the symbol list.
4714 progfiles
=`$echo "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
4715 for arg
in $progfiles; do
4716 $show "extracting global C symbols from \`$arg'"
4717 $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
4720 if test -n "$exclude_expsyms"; then
4721 $run eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T'
4722 $run eval '$mv "$nlist"T "$nlist"'
4725 if test -n "$export_symbols_regex"; then
4726 $run eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T'
4727 $run eval '$mv "$nlist"T "$nlist"'
4730 # Prepare the list of exported symbols
4731 if test -z "$export_symbols"; then
4732 export_symbols
="$output_objdir/$outputname.exp"
4733 $run $rm $export_symbols
4734 $run eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
4736 $run eval "${SED} -e 's/\([ ][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"'
4737 $run eval 'grep -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T'
4738 $run eval 'mv "$nlist"T "$nlist"'
4742 for arg
in $dlprefiles; do
4743 $show "extracting global C symbols from \`$arg'"
4744 name
=`$echo "$arg" | ${SED} -e 's%^.*/%%'`
4745 $run eval '$echo ": $name " >> "$nlist"'
4746 $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
4749 if test -z "$run"; then
4750 # Make sure we have at least an empty file.
4751 test -f "$nlist" ||
: > "$nlist"
4753 if test -n "$exclude_expsyms"; then
4754 $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T
4755 $mv "$nlist"T
"$nlist"
4758 # Try sorting and uniquifying the output.
4759 if grep -v "^: " < "$nlist" |
4760 if sort -k 3 </dev
/null
>/dev
/null
2>&1; then
4765 uniq > "$nlist"S
; then
4768 grep -v "^: " < "$nlist" > "$nlist"S
4771 if test -f "$nlist"S
; then
4772 eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$dlsyms"'
4774 $echo '/* NONE */' >> "$output_objdir/$dlsyms"
4777 $echo >> "$output_objdir/$dlsyms" "\
4779 #undef lt_preloaded_symbols
4781 #if defined (__STDC__) && __STDC__
4782 # define lt_ptr void *
4784 # define lt_ptr char *
4788 /* The mapping between symbol names and symbols. */
4792 *cygwin
* |
*mingw
* )
4793 $echo >> "$output_objdir/$dlsyms" "\
4794 /* DATA imports from DLLs on WIN32 can't be const, because
4795 runtime relocations are performed -- see ld's documentation
4801 $echo >> "$output_objdir/$dlsyms" "\
4808 $echo >> "$output_objdir/$dlsyms" "\
4812 lt_preloaded_symbols[] =
4816 eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$dlsyms"
4818 $echo >> "$output_objdir/$dlsyms" "\
4822 /* This works around a problem in FreeBSD linker */
4823 #ifdef FREEBSD_WORKAROUND
4824 static const void *lt_preloaded_setup() {
4825 return lt_preloaded_symbols;
4835 pic_flag_for_symtable
=
4837 # compiling the symbol table file with pic_flag works around
4838 # a FreeBSD bug that causes programs to crash when -lm is
4839 # linked before any other PIC object. But we must not use
4840 # pic_flag when linking with -static. The problem exists in
4841 # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1.
4842 *-*-freebsd2*|
*-*-freebsd3.0
*|
*-*-freebsdelf3.0
*)
4843 case "$compile_command " in
4845 *) pic_flag_for_symtable
=" $pic_flag -DFREEBSD_WORKAROUND";;
4848 case "$compile_command " in
4850 *) pic_flag_for_symtable
=" $pic_flag";;
4854 # Now compile the dynamic symbol file.
4855 $show "(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")"
4856 $run eval '(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' ||
exit $?
4858 # Clean up the generated files.
4859 $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T"
4860 $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T"
4862 # Transform the symbol file into the correct name.
4863 compile_command
=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
4864 finalize_command
=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
4867 $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2
4872 # We keep going just in case the user didn't refer to
4873 # lt_preloaded_symbols. The linker will fail if global_symbol_pipe
4874 # really was required.
4876 # Nullify the symbol file.
4877 compile_command
=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"`
4878 finalize_command
=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"`
4881 if test "$need_relink" = no ||
test "$build_libtool_libs" != yes; then
4882 # Replace the output file specification.
4883 compile_command
=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
4884 link_command
="$compile_command$compile_rpath"
4886 # We have no uninstalled library dependencies, so finalize right now.
4887 $show "$link_command"
4888 $run eval "$link_command"
4891 # Delete the generated files.
4892 if test -n "$dlsyms"; then
4893 $show "$rm $output_objdir/${outputname}S.${objext}"
4894 $run $rm "$output_objdir/${outputname}S.${objext}"
4900 if test -n "$shlibpath_var"; then
4901 # We should set the shlibpath_var
4903 for dir
in $temp_rpath; do
4905 [\\/]* |
[A-Za-z
]:[\\/]*)
4910 # Relative path: add a thisdir entry.
4911 rpath
="$rpath\$thisdir/$dir:"
4918 if test -n "$compile_shlibpath$finalize_shlibpath"; then
4919 compile_command
="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command"
4921 if test -n "$finalize_shlibpath"; then
4922 finalize_command
="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command"
4927 if test -n "$runpath_var"; then
4928 if test -n "$perm_rpath"; then
4929 # We should set the runpath_var.
4931 for dir
in $perm_rpath; do
4934 compile_var
="$runpath_var=\"$rpath\$$runpath_var\" "
4936 if test -n "$finalize_perm_rpath"; then
4937 # We should set the runpath_var.
4939 for dir
in $finalize_perm_rpath; do
4942 finalize_var
="$runpath_var=\"$rpath\$$runpath_var\" "
4946 if test "$no_install" = yes; then
4947 # We don't need to create a wrapper script.
4948 link_command
="$compile_var$compile_command$compile_rpath"
4949 # Replace the output file specification.
4950 link_command
=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
4951 # Delete the old output file.
4953 # Link the executable and exit
4954 $show "$link_command"
4955 $run eval "$link_command" ||
exit $?
4959 if test "$hardcode_action" = relink
; then
4960 # Fast installation is not supported
4961 link_command
="$compile_var$compile_command$compile_rpath"
4962 relink_command
="$finalize_var$finalize_command$finalize_rpath"
4964 $echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2
4965 $echo "$modename: \`$output' will be relinked during installation" 1>&2
4967 if test "$fast_install" != no
; then
4968 link_command
="$finalize_var$compile_command$finalize_rpath"
4969 if test "$fast_install" = yes; then
4970 relink_command
=`$echo "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'`
4972 # fast_install is set to needless
4976 link_command
="$compile_var$compile_command$compile_rpath"
4977 relink_command
="$finalize_var$finalize_command$finalize_rpath"
4981 # Replace the output file specification.
4982 link_command
=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
4984 # Delete the old output files.
4985 $run $rm $output $output_objdir/$outputname $output_objdir/lt-
$outputname
4987 $show "$link_command"
4988 $run eval "$link_command" ||
exit $?
4990 # Now create the wrapper script.
4991 $show "creating $output"
4993 # Quote the relink command for shipping.
4994 if test -n "$relink_command"; then
4995 # Preserve any variables that may affect compiler behavior
4996 for var
in $variables_saved_for_relink; do
4997 if eval test -z \"\
${$var+set}\"; then
4998 relink_command
="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command"
4999 elif eval var_value
=\$
$var; test -z "$var_value"; then
5000 relink_command
="$var=; export $var; $relink_command"
5002 var_value
=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"`
5003 relink_command
="$var=\"$var_value\"; export $var; $relink_command"
5006 relink_command
="(cd `pwd`; $relink_command)"
5007 relink_command
=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
5010 # Quote $echo for shipping.
5011 if test "X$echo" = "X$SHELL $progpath --fallback-echo"; then
5013 [\\/]* |
[A-Za-z
]:[\\/]*) qecho
="$SHELL $progpath --fallback-echo";;
5014 *) qecho
="$SHELL `pwd`/$progpath --fallback-echo";;
5016 qecho
=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"`
5018 qecho
=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"`
5021 # Only actually do things if our run command is non-null.
5022 if test -z "$run"; then
5023 # win32 will think the script is a binary if it has
5024 # a .exe suffix, so we strip it off here.
5026 *.exe
) output
=`$echo $output|${SED} 's,.exe$,,'` ;;
5028 # test for cygwin because mv fails w/o .exe extensions
5032 outputname
=`$echo $outputname|${SED} 's,.exe$,,'` ;;
5036 *cygwin
* |
*mingw
* )
5037 cwrappersource
=`$echo ${objdir}/lt-${outputname}.c`
5038 cwrapper
=`$echo ${output}.exe`
5039 $rm $cwrappersource $cwrapper
5040 trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15
5042 cat > $cwrappersource <<EOF
5044 /* $cwrappersource - temporary wrapper executable for $objdir/$outputname
5045 Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
5047 The $output program cannot be directly executed until all the libtool
5048 libraries that it depends on are installed.
5050 This wrapper executable should never be moved out of the build directory.
5051 If it is, it will not operate correctly.
5053 Currently, it simply execs the wrapper *script* "/bin/sh $output",
5054 but could eventually absorb all of the scripts functionality and
5055 exec $objdir/$outputname directly.
5058 cat >> $cwrappersource<<"EOF"
5066 #if defined(PATH_MAX)
5067 # define LT_PATHMAX PATH_MAX
5068 #elif defined(MAXPATHLEN)
5069 # define LT_PATHMAX MAXPATHLEN
5071 # define LT_PATHMAX 1024
5074 #ifndef DIR_SEPARATOR
5075 #define DIR_SEPARATOR '/'
5078 #if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \
5080 #define HAVE_DOS_BASED_FILE_SYSTEM
5081 #ifndef DIR_SEPARATOR_2
5082 #define DIR_SEPARATOR_2 '\\'
5086 #ifndef DIR_SEPARATOR_2
5087 # define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR)
5088 #else /* DIR_SEPARATOR_2 */
5089 # define IS_DIR_SEPARATOR(ch) \
5090 (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2))
5091 #endif /* DIR_SEPARATOR_2 */
5093 #define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type)))
5094 #define XFREE(stale) do { \
5095 if (stale) { free ((void *) stale); stale = 0; } \
5098 const char *program_name = NULL;
5100 void * xmalloc (size_t num);
5101 char * xstrdup (const char *string);
5102 char * basename (const char *name);
5103 char * fnqualify(const char *path);
5104 char * strendzap(char *str, const char *pat);
5105 void lt_fatal (const char *message, ...);
5108 main (int argc, char *argv[])
5113 program_name = (char *) xstrdup ((char *) basename (argv[0]));
5114 newargz = XMALLOC(char *, argc+2);
5117 cat >> $cwrappersource <<EOF
5118 newargz[0] = "$SHELL";
5121 cat >> $cwrappersource <<"EOF"
5122 newargz
[1] = fnqualify
(argv
[0]);
5123 /* we know the
script has the same name
, without the .exe
*/
5124 /* so
make sure newargz
[1] doesn
't end in .exe */
5125 strendzap(newargz[1],".exe");
5126 for (i = 1; i < argc; i++)
5127 newargz[i+1] = xstrdup(argv[i]);
5128 newargz[argc+1] = NULL;
5131 cat >> $cwrappersource <<EOF
5132 execv("$SHELL",newargz);
5135 cat >> $cwrappersource <<"EOF"
5140 xmalloc (size_t num)
5142 void * p = (void *) malloc (num);
5144 lt_fatal ("Memory exhausted");
5150 xstrdup (const char *string)
5152 return string ? strcpy ((char *) xmalloc (strlen (string) + 1), string) : NULL
5157 basename (const char *name)
5161 #if defined (HAVE_DOS_BASED_FILE_SYSTEM)
5162 /* Skip over the disk name in MSDOS pathnames. */
5163 if (isalpha (name[0]) && name[1] == ':')
5167 for (base = name; *name; name++)
5168 if (IS_DIR_SEPARATOR (*name))
5170 return (char *) base;
5174 fnqualify(const char *path)
5178 char tmp[LT_PATHMAX + 1];
5180 assert(path != NULL);
5182 /* Is it qualified already? */
5183 #if defined (HAVE_DOS_BASED_FILE_SYSTEM)
5184 if (isalpha (path[0]) && path[1] == ':')
5185 return xstrdup (path);
5187 if (IS_DIR_SEPARATOR (path[0]))
5188 return xstrdup (path);
5190 /* prepend the current directory */
5191 /* doesn't handle
'~' */
5192 if (getcwd
(tmp
, LT_PATHMAX
) == NULL
)
5193 lt_fatal
("getcwd failed");
5194 size
= strlen
(tmp
) + 1 + strlen
(path
) + 1; /* +2 for '/' and
'\0' */
5195 p
= XMALLOC
(char
, size
);
5196 sprintf
(p
, "%s%c%s", tmp
, DIR_SEPARATOR
, path
);
5201 strendzap
(char
*str
, const char
*pat
)
5205 assert
(str
!= NULL
);
5206 assert
(pat
!= NULL
);
5209 patlen
= strlen
(pat
);
5213 str
+= len
- patlen
;
5214 if (strcmp
(str
, pat
) == 0)
5221 lt_error_core
(int exit_status
, const char
* mode
,
5222 const char
* message
, va_list ap
)
5224 fprintf
(stderr
, "%s: %s: ", program_name
, mode
);
5225 vfprintf
(stderr
, message
, ap
);
5226 fprintf
(stderr
, ".\n");
5228 if (exit_status
>= 0)
5233 lt_fatal
(const char
*message
, ...
)
5236 va_start
(ap
, message
);
5237 lt_error_core
(EXIT_FAILURE
, "FATAL", message
, ap
);
5241 # we should really use a build-platform specific compiler
5242 # here, but OTOH, the wrappers (shell script and this C one)
5243 # are only useful if you want to execute the "real" binary.
5244 # Since the "real" binary is built for $host, then this
5245 # wrapper might as well be built for $host, too.
5246 $run $LTCC -s -o $cwrapper $cwrappersource
5250 trap "$rm $output; exit $EXIT_FAILURE" 1 2 15
5255 # $output - temporary wrapper script for $objdir/$outputname
5256 # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
5258 # The $output program cannot be directly executed until all the libtool
5259 # libraries that it depends on are installed.
5261 # This wrapper script should never be moved out of the build directory.
5262 # If it is, it will not operate correctly.
5264 # Sed substitution that helps us do robust quoting. It backslashifies
5265 # metacharacters that are still active within double-quoted strings.
5266 Xsed='${SED} -e 1s/^X//'
5267 sed_quote_subst='$sed_quote_subst'
5269 # The HP-UX ksh and POSIX shell print the target directory to stdout
5271 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
5273 relink_command=\"$relink_command\"
5275 # This environment variable determines our operation mode.
5276 if test \"\$libtool_install_magic\" = \"$magic\"; then
5277 # install mode needs the following variable:
5278 notinst_deplibs='$notinst_deplibs'
5280 # When we are sourced in execute mode, \$file and \$echo are already set.
5281 if test \"\$libtool_execute_magic\" != \"$magic\"; then
5284 # Make sure echo works.
5285 if test \"X\$1\" = X--no-reexec; then
5286 # Discard the --no-reexec flag, and continue.
5288 elif test \"X\`(\$echo '\t') 2>/dev/null\`\" = 'X\t'; then
5289 # Yippee, \$echo works!
5292 # Restart under the correct shell, and then maybe \$echo will work.
5293 exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"}
5299 # Find the directory that this script lives in.
5300 thisdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\`
5301 test \"x\$thisdir\" = \"x\$file\" && thisdir=.
5303 # Follow symbolic links until we get to the real thisdir.
5304 file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\`
5305 while test -n \"\$file\"; do
5306 destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\`
5308 # If there was a directory component, then change thisdir.
5309 if test \"x\$destdir\" != \"x\$file\"; then
5310 case \"\$destdir\" in
5311 [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;;
5312 *) thisdir=\"\$thisdir/\$destdir\" ;;
5316 file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\`
5317 file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\`
5320 # Try to get the absolute directory name.
5321 absdir=\`cd \"\$thisdir\" && pwd\`
5322 test -n \"\$absdir\" && thisdir=\"\$absdir\"
5325 if test "$fast_install" = yes; then
5327 program=lt-'$outputname'$exeext
5328 progdir=\"\$thisdir/$objdir\"
5330 if test ! -f \"\$progdir/\$program\" || \\
5331 { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\
5332 test \"X\$file\" != \"X\$progdir/\$program\"; }; then
5334 file=\"\$\$-\$program\"
5336 if test ! -d \"\$progdir\"; then
5337 $mkdir \"\$progdir\"
5339 $rm \"\$progdir/\$file\"
5344 # relink executable if necessary
5345 if test -n \"\$relink_command\"; then
5346 if relink_command_output=\`eval \$relink_command 2>&1\`; then :
5348 $echo \"\$relink_command_output\" >&2
5349 $rm \"\$progdir/\$file\"
5354 $mv \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null ||
5355 { $rm \"\$progdir/\$program\";
5356 $mv \"\$progdir/\$file\" \"\$progdir/\$program\"; }
5357 $rm \"\$progdir/\$file\"
5361 program='$outputname'
5362 progdir=\"\$thisdir/$objdir\"
5368 if test -f \"\$progdir/\$program\"; then"
5370 # Export our shlibpath_var if we have one.
5371 if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
5373 # Add our own library path to $shlibpath_var
5374 $shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
5376 # Some systems cannot cope with colon-terminated $shlibpath_var
5377 # The second colon is a workaround for a bug in BeOS R4 sed
5378 $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\`
5380 export $shlibpath_var
5384 # fixup the dll searchpath if we need to.
5385 if test -n "$dllsearchpath"; then
5387 # Add the dll search path components to the executable PATH
5388 PATH=$dllsearchpath:\$PATH
5393 if test \"\$libtool_execute_magic\" != \"$magic\"; then
5394 # Run the actual program with our arguments.
5397 # Backslashes separate directories on plain windows
5398 *-*-mingw |
*-*-os2*)
5400 exec \"\$progdir\\\\\$program\" \${1+\"\$@\"}
5406 exec \"\$progdir/\$program\" \${1+\"\$@\"}
5411 \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\"
5415 # The program doesn't exist.
5416 \$echo \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2
5417 \$echo \"This script is just a wrapper for \$program.\" 1>&2
5418 $echo \"See the $PACKAGE documentation for more information.\" 1>&2
5429 # See if we need to build an old-fashioned archive.
5430 for oldlib
in $oldlibs; do
5432 if test "$build_libtool_libs" = convenience
; then
5433 oldobjs
="$libobjs_save"
5434 addlibs
="$convenience"
5435 build_libtool_libs
=no
5437 if test "$build_libtool_libs" = module
; then
5438 oldobjs
="$libobjs_save"
5439 build_libtool_libs
=no
5441 oldobjs
="$old_deplibs $non_pic_objects"
5443 addlibs
="$old_convenience"
5446 if test -n "$addlibs"; then
5447 gentop
="$output_objdir/${outputname}x"
5448 generated
="$generated $gentop"
5450 func_extract_archives
$gentop $addlibs
5451 oldobjs
="$oldobjs $func_extract_archives_result"
5454 # Do each command in the archive commands.
5455 if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
5456 cmds
=$old_archive_from_new_cmds
5458 # POSIX demands no paths to be encoded in archives. We have
5459 # to avoid creating archives with duplicate basenames if we
5460 # might have to extract them afterwards, e.g., when creating a
5461 # static archive out of a convenience library, or when linking
5462 # the entirety of a libtool archive into another (currently
5463 # not supported by libtool).
5464 if (for obj
in $oldobjs
5466 $echo "X$obj" |
$Xsed -e 's%^.*/%%'
5467 done |
sort |
sort -uc >/dev
/null
2>&1); then
5470 $echo "copying selected object files to avoid basename conflicts..."
5472 if test -z "$gentop"; then
5473 gentop
="$output_objdir/${outputname}x"
5474 generated
="$generated $gentop"
5476 $show "${rm}r $gentop"
5477 $run ${rm}r
"$gentop"
5478 $show "$mkdir $gentop"
5479 $run $mkdir "$gentop"
5481 if test "$status" -ne 0 && test ! -d "$gentop"; then
5486 save_oldobjs
=$oldobjs
5489 for obj
in $save_oldobjs
5491 objbase
=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
5492 case " $oldobjs " in
5493 " ") oldobjs
=$obj ;;
5496 # Make sure we don't pick an alternate name that also
5498 newobj
=lt
$counter-$objbase
5499 counter
=`expr $counter + 1`
5500 case " $oldobjs " in
5501 *[\
/]"$newobj "*) ;;
5502 *) if test ! -f "$gentop/$newobj"; then break; fi ;;
5505 $show "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj"
5506 $run ln "$obj" "$gentop/$newobj" ||
5507 $run cp "$obj" "$gentop/$newobj"
5508 oldobjs
="$oldobjs $gentop/$newobj"
5510 *) oldobjs
="$oldobjs $obj" ;;
5515 eval cmds
=\"$old_archive_cmds\"
5517 if len
=`expr "X$cmds" : ".*"` &&
5518 test "$len" -le "$max_cmd_len" ||
test "$max_cmd_len" -le -1; then
5519 cmds
=$old_archive_cmds
5521 # the command line is too long to link in one step, link in parts
5522 $echo "using piecewise archive linking..."
5527 save_oldobjs
=$oldobjs
5529 # Is there a better way of finding the last object in the list?
5530 for obj
in $save_oldobjs
5534 for obj
in $save_oldobjs
5536 oldobjs
="$objlist $obj"
5537 objlist
="$objlist $obj"
5538 eval test_cmds
=\"$old_archive_cmds\"
5539 if len
=`expr "X$test_cmds" : ".*" 2>/dev/null` &&
5540 test "$len" -le "$max_cmd_len"; then
5543 # the above command should be used before it gets too long
5545 if test "$obj" = "$last_oldobj" ; then
5548 test -z "$concat_cmds" || concat_cmds
=$concat_cmds~
5549 eval concat_cmds
=\"\
${concat_cmds}$old_archive_cmds\"
5555 if test "X$oldobjs" = "X" ; then
5556 eval cmds
=\"\
$concat_cmds\"
5558 eval cmds
=\"\
$concat_cmds~\
$old_archive_cmds\"
5562 save_ifs
="$IFS"; IFS
='~'
5563 for cmd
in $cmds; do
5567 $run eval "$cmd" ||
exit $?
5572 if test -n "$generated"; then
5573 $show "${rm}r$generated"
5574 $run ${rm}r
$generated
5577 # Now create the libtool archive.
5581 test "$build_old_libs" = yes && old_library
="$libname.$libext"
5582 $show "creating $output"
5584 # Preserve any variables that may affect compiler behavior
5585 for var
in $variables_saved_for_relink; do
5586 if eval test -z \"\
${$var+set}\"; then
5587 relink_command
="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command"
5588 elif eval var_value
=\$
$var; test -z "$var_value"; then
5589 relink_command
="$var=; export $var; $relink_command"
5591 var_value
=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"`
5592 relink_command
="$var=\"$var_value\"; export $var; $relink_command"
5595 # Quote the link command for shipping.
5596 relink_command
="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
5597 relink_command
=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
5598 if test "$hardcode_automatic" = yes ; then
5603 # Only create the output if not a dry run.
5604 if test -z "$run"; then
5605 for installed
in no
yes; do
5606 if test "$installed" = yes; then
5607 if test -z "$install_libdir"; then
5610 output
="$output_objdir/$outputname"i
5611 # Replace all uninstalled libtool libraries with the installed ones
5613 for deplib
in $dependency_libs; do
5616 name
=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'`
5617 eval libdir
=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
5618 if test -z "$libdir"; then
5619 $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
5622 newdependency_libs
="$newdependency_libs $libdir/$name"
5624 *) newdependency_libs
="$newdependency_libs $deplib" ;;
5627 dependency_libs
="$newdependency_libs"
5629 for lib
in $dlfiles; do
5630 name
=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
5631 eval libdir
=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
5632 if test -z "$libdir"; then
5633 $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
5636 newdlfiles
="$newdlfiles $libdir/$name"
5638 dlfiles
="$newdlfiles"
5640 for lib
in $dlprefiles; do
5641 name
=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
5642 eval libdir
=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
5643 if test -z "$libdir"; then
5644 $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
5647 newdlprefiles
="$newdlprefiles $libdir/$name"
5649 dlprefiles
="$newdlprefiles"
5652 for lib
in $dlfiles; do
5654 [\\/]* |
[A-Za-z
]:[\\/]*) abs
="$lib" ;;
5655 *) abs
=`pwd`"/$lib" ;;
5657 newdlfiles
="$newdlfiles $abs"
5659 dlfiles
="$newdlfiles"
5661 for lib
in $dlprefiles; do
5663 [\\/]* |
[A-Za-z
]:[\\/]*) abs
="$lib" ;;
5664 *) abs
=`pwd`"/$lib" ;;
5666 newdlprefiles
="$newdlprefiles $abs"
5668 dlprefiles
="$newdlprefiles"
5671 # place dlname in correct position for cygwin
5673 case $host,$output,$installed,$module,$dlname in
5674 *cygwin
*,*lai
,yes,no
,*.dll |
*mingw
*,*lai
,yes,no
,*.dll
) tdlname
=..
/bin
/$dlname ;;
5677 # $outputname - a libtool library file
5678 # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
5680 # Please DO NOT delete this file!
5681 # It is necessary for linking the library.
5683 # The name that we can dlopen(3).
5686 # Names of this library.
5687 library_names='$library_names'
5689 # The name of the static archive.
5690 old_library='$old_library'
5692 # Libraries that this one depends upon.
5693 dependency_libs='$dependency_libs'
5695 # Version information for $libname.
5700 # Is this an already installed library?
5701 installed=$installed
5703 # Should we warn about portability when linking against -modules?
5704 shouldnotlink=$module
5706 # Files to dlopen/dlpreopen
5708 dlpreopen='$dlprefiles'
5710 # Directory that this library needs to be installed in:
5711 libdir='$install_libdir'"
5712 if test "$installed" = no
&& test "$need_relink" = yes; then
5714 relink_command=\"$relink_command\""
5719 # Do a symbolic link so that the libtool archive can be found in
5720 # LD_LIBRARY_PATH before the program is installed.
5721 $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)"
5722 $run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' ||
exit $?
5728 # libtool install mode
5730 modename
="$modename: install"
5732 # There may be an optional sh(1) argument at the beginning of
5733 # install_prog (especially on Windows NT).
5734 if test "$nonopt" = "$SHELL" ||
test "$nonopt" = /bin
/sh ||
5735 # Allow the use of GNU shtool's install command.
5736 $echo "X$nonopt" |
grep shtool
> /dev
/null
; then
5737 # Aesthetically quote it.
5738 arg
=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"`
5740 *[\
[\~\
#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
5744 install_prog
="$arg "
5752 # The real first argument should be the name of the installation program.
5753 # Aesthetically quote it.
5754 arg
=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
5756 *[\
[\~\
#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
5760 install_prog
="$install_prog$arg"
5762 # We need to accept at least all the BSD install flags.
5772 if test -n "$dest"; then
5773 files
="$files $dest"
5781 case " $install_prog " in
5786 -g |
-m |
-o) prev
=$arg ;;
5794 # If the previous option needed an argument, then skip it.
5795 if test -n "$prev"; then
5804 # Aesthetically quote the argument.
5805 arg
=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
5807 *[\
[\~\
#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
5811 install_prog
="$install_prog $arg"
5814 if test -z "$install_prog"; then
5815 $echo "$modename: you must specify an install program" 1>&2
5820 if test -n "$prev"; then
5821 $echo "$modename: the \`$prev' option requires an argument" 1>&2
5826 if test -z "$files"; then
5827 if test -z "$dest"; then
5828 $echo "$modename: no file or destination specified" 1>&2
5830 $echo "$modename: you must specify a destination" 1>&2
5836 # Strip any trailing slash from the destination.
5837 dest
=`$echo "X$dest" | $Xsed -e 's%/$%%'`
5839 # Check to see that the destination is a directory.
5840 test -d "$dest" && isdir
=yes
5841 if test "$isdir" = yes; then
5845 destdir
=`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'`
5846 test "X$destdir" = "X$dest" && destdir
=.
5847 destname
=`$echo "X$dest" | $Xsed -e 's%^.*/%%'`
5849 # Not a directory, so check to see that there is only one file specified.
5851 if test "$#" -gt 2; then
5852 $echo "$modename: \`$dest' is not a directory" 1>&2
5858 [\\/]* |
[A-Za-z
]:[\\/]*) ;;
5860 for file in $files; do
5864 $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2
5873 # This variable tells wrapper scripts just to set variables rather
5874 # than running their programs.
5875 libtool_install_magic
="$magic"
5880 for file in $files; do
5882 # Do each installation.
5885 # Do the static libraries later.
5886 staticlibs
="$staticlibs $file"
5890 # Check to see that this really is a libtool archive.
5891 if (${SED} -e '2q' $file |
grep "^# Generated by .*$PACKAGE") >/dev
/null
2>&1; then :
5893 $echo "$modename: \`$file' is not a valid libtool archive" 1>&2
5901 # If there is no directory component, then add one.
5903 */* |
*\\*) .
$file ;;
5907 # Add the libdir to current_libdirs if it is the destination.
5908 if test "X$destdir" = "X$libdir"; then
5909 case "$current_libdirs " in
5911 *) current_libdirs
="$current_libdirs $libdir" ;;
5914 # Note the libdir as a future libdir.
5915 case "$future_libdirs " in
5917 *) future_libdirs
="$future_libdirs $libdir" ;;
5921 dir
=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/
5922 test "X$dir" = "X$file/" && dir
=
5925 if test -n "$relink_command"; then
5926 # Determine the prefix the user has applied to our future dir.
5927 inst_prefix_dir
=`$echo "$destdir" | $SED "s%$libdir\$%%"`
5929 # Don't allow the user to place us outside of our expected
5930 # location b/c this prevents finding dependent libraries that
5931 # are installed to the same prefix.
5932 # At present, this check doesn't affect windows .dll's that
5933 # are installed into $libdir/../bin (currently, that works fine)
5934 # but it's something to keep an eye on.
5935 if test "$inst_prefix_dir" = "$destdir"; then
5936 $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2
5940 if test -n "$inst_prefix_dir"; then
5941 # Stick the inst_prefix_dir data into the link command.
5942 relink_command
=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"`
5944 relink_command
=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%%"`
5947 $echo "$modename: warning: relinking \`$file'" 1>&2
5948 $show "$relink_command"
5949 if $run eval "$relink_command"; then :
5951 $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
5956 # See the names of the shared library.
5957 set dummy
$library_names
5958 if test -n "$2"; then
5964 test -n "$relink_command" && srcname
="$realname"T
5966 # Install the shared library and build the symlinks.
5967 $show "$install_prog $dir/$srcname $destdir/$realname"
5968 $run eval "$install_prog $dir/$srcname $destdir/$realname" ||
exit $?
5969 if test -n "$stripme" && test -n "$striplib"; then
5970 $show "$striplib $destdir/$realname"
5971 $run eval "$striplib $destdir/$realname" ||
exit $?
5974 if test "$#" -gt 0; then
5975 # Delete the old symlinks, and create new ones.
5976 # Try `ln -sf' first, because the `ln' binary might depend on
5977 # the symlink we replace! Solaris /bin/ln does not understand -f,
5978 # so we also need to try rm && ln -s.
5981 if test "$linkname" != "$realname"; then
5982 $show "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })"
5983 $run eval "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })"
5988 # Do each command in the postinstall commands.
5989 lib
="$destdir/$realname"
5990 cmds
=$postinstall_cmds
5991 save_ifs
="$IFS"; IFS
='~'
5992 for cmd
in $cmds; do
5996 $run eval "$cmd" ||
{
5999 # Restore the uninstalled library and exit
6000 if test "$mode" = relink
; then
6001 $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)'
6010 # Install the pseudo-library for information purposes.
6011 name
=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
6012 instname
="$dir/$name"i
6013 $show "$install_prog $instname $destdir/$name"
6014 $run eval "$install_prog $instname $destdir/$name" ||
exit $?
6016 # Maybe install the static library, too.
6017 test -n "$old_library" && staticlibs
="$staticlibs $dir/$old_library"
6021 # Install (i.e. copy) a libtool object.
6023 # Figure out destination file name, if it wasn't already specified.
6024 if test -n "$destname"; then
6025 destfile
="$destdir/$destname"
6027 destfile
=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
6028 destfile
="$destdir/$destfile"
6031 # Deduce the name of the destination old-style object file.
6034 staticdest
=`$echo "X$destfile" | $Xsed -e "$lo2o"`
6037 staticdest
="$destfile"
6041 $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2
6047 # Install the libtool object if requested.
6048 if test -n "$destfile"; then
6049 $show "$install_prog $file $destfile"
6050 $run eval "$install_prog $file $destfile" ||
exit $?
6053 # Install the old object if enabled.
6054 if test "$build_old_libs" = yes; then
6055 # Deduce the name of the old-style object file.
6056 staticobj
=`$echo "X$file" | $Xsed -e "$lo2o"`
6058 $show "$install_prog $staticobj $staticdest"
6059 $run eval "$install_prog \$staticobj \$staticdest" ||
exit $?
6065 # Figure out destination file name, if it wasn't already specified.
6066 if test -n "$destname"; then
6067 destfile
="$destdir/$destname"
6069 destfile
=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
6070 destfile
="$destdir/$destfile"
6073 # If the file is missing, and there is a .exe on the end, strip it
6074 # because it is most likely a libtool script we actually want to
6079 if test ! -f "$file"; then
6080 file=`$echo $file|${SED} 's,.exe$,,'`
6086 # Do a test to see if this is really a libtool program.
6089 wrapper
=`$echo $file | ${SED} -e 's,.exe$,,'`
6095 if (${SED} -e '4q' $wrapper |
grep "^# Generated by .*$PACKAGE")>/dev
/null
2>&1; then
6099 # Note that it is not necessary on cygwin/mingw to append a dot to
6100 # foo even if both foo and FILE.exe exist: automatic-append-.exe
6101 # behavior happens only for exec(3), not for open(2)! Also, sourcing
6102 # `FILE.' does not work on cygwin managed mounts.
6104 # If there is no directory component, then add one.
6106 */* |
*\\*) .
${wrapper} ;;
6107 *) . .
/${wrapper} ;;
6110 # Check the variables that should have been set.
6111 if test -z "$notinst_deplibs"; then
6112 $echo "$modename: invalid libtool wrapper script \`$wrapper'" 1>&2
6117 for lib
in $notinst_deplibs; do
6118 # Check to see that each library is installed.
6120 if test -f "$lib"; then
6121 # If there is no directory component, then add one.
6123 */* |
*\\*) .
$lib ;;
6127 libfile
="$libdir/"`$echo "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test
6128 if test -n "$libdir" && test ! -f "$libfile"; then
6129 $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2
6135 # Note that it is not necessary on cygwin/mingw to append a dot to
6136 # foo even if both foo and FILE.exe exist: automatic-append-.exe
6137 # behavior happens only for exec(3), not for open(2)! Also, sourcing
6138 # `FILE.' does not work on cygwin managed mounts.
6140 # If there is no directory component, then add one.
6142 */* |
*\\*) .
${wrapper} ;;
6143 *) . .
/${wrapper} ;;
6147 if test "$fast_install" = no
&& test -n "$relink_command"; then
6148 if test "$finalize" = yes && test -z "$run"; then
6150 test -n "$TMPDIR" && tmpdir
="$TMPDIR"
6151 tmpdir
="$tmpdir/libtool-$$"
6154 if $mkdir "$tmpdir"; then
6158 $echo "$modename: error: cannot create temporary directory \`$tmpdir'" 1>&2
6161 file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'`
6162 outputname
="$tmpdir/$file"
6163 # Replace the output file specification.
6164 relink_command
=`$echo "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'`
6166 $show "$relink_command"
6167 if $run eval "$relink_command"; then :
6169 $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
6175 $echo "$modename: warning: cannot relink \`$file'" 1>&2
6178 # Install the binary that we compiled earlier.
6179 file=`$echo "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"`
6183 # remove .exe since cygwin /usr/bin/install will append another
6185 case $install_prog,$host in
6186 */usr
/bin
/install*,*cygwin
*)
6187 case $file:$destfile in
6192 destfile
=$destfile.exe
6195 destfile
=`$echo $destfile | ${SED} -e 's,.exe$,,'`
6200 $show "$install_prog$stripme $file $destfile"
6201 $run eval "$install_prog\$stripme \$file \$destfile" ||
exit $?
6202 test -n "$outputname" && ${rm}r
"$tmpdir"
6207 for file in $staticlibs; do
6208 name
=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
6210 # Set up the ranlib parameters.
6211 oldlib
="$destdir/$name"
6213 $show "$install_prog $file $oldlib"
6214 $run eval "$install_prog \$file \$oldlib" ||
exit $?
6216 if test -n "$stripme" && test -n "$old_striplib"; then
6217 $show "$old_striplib $oldlib"
6218 $run eval "$old_striplib $oldlib" ||
exit $?
6221 # Do each command in the postinstall commands.
6222 cmds
=$old_postinstall_cmds
6223 save_ifs
="$IFS"; IFS
='~'
6224 for cmd
in $cmds; do
6228 $run eval "$cmd" ||
exit $?
6233 if test -n "$future_libdirs"; then
6234 $echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2
6237 if test -n "$current_libdirs"; then
6238 # Maybe just do a dry run.
6239 test -n "$run" && current_libdirs
=" -n$current_libdirs"
6240 exec_cmd
='$SHELL $progpath $preserve_args --finish$current_libdirs'
6246 # libtool finish mode
6248 modename
="$modename: finish"
6252 if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
6255 libdirs
="$libdirs $dir"
6258 for libdir
in $libdirs; do
6259 if test -n "$finish_cmds"; then
6260 # Do each command in the finish commands.
6262 save_ifs
="$IFS"; IFS
='~'
6263 for cmd
in $cmds; do
6267 $run eval "$cmd" || admincmds
="$admincmds
6272 if test -n "$finish_eval"; then
6273 # Do the single finish_eval.
6274 eval cmds
=\"$finish_eval\"
6275 $run eval "$cmds" || admincmds
="$admincmds
6281 # Exit here if they wanted silent mode.
6282 test "$show" = : && exit $EXIT_SUCCESS
6284 $echo "----------------------------------------------------------------------"
6285 $echo "Libraries have been installed in:"
6286 for libdir
in $libdirs; do
6290 $echo "If you ever happen to want to link against installed libraries"
6291 $echo "in a given directory, LIBDIR, you must either use libtool, and"
6292 $echo "specify the full pathname of the library, or use the \`-LLIBDIR'"
6293 $echo "flag during linking and do at least one of the following:"
6294 if test -n "$shlibpath_var"; then
6295 $echo " - add LIBDIR to the \`$shlibpath_var' environment variable"
6296 $echo " during execution"
6298 if test -n "$runpath_var"; then
6299 $echo " - add LIBDIR to the \`$runpath_var' environment variable"
6300 $echo " during linking"
6302 if test -n "$hardcode_libdir_flag_spec"; then
6304 eval flag
=\"$hardcode_libdir_flag_spec\"
6306 $echo " - use the \`$flag' linker flag"
6308 if test -n "$admincmds"; then
6309 $echo " - have your system administrator run these commands:$admincmds"
6311 if test -f /etc
/ld.so.conf
; then
6312 $echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
6315 $echo "See any operating system documentation about shared libraries for"
6316 $echo "more information, such as the ld(1) and ld.so(8) manual pages."
6317 $echo "----------------------------------------------------------------------"
6321 # libtool execute mode
6323 modename
="$modename: execute"
6325 # The first argument is the command name.
6327 if test -z "$cmd"; then
6328 $echo "$modename: you must specify a COMMAND" 1>&2
6333 # Handle -dlopen flags immediately.
6334 for file in $execute_dlfiles; do
6335 if test ! -f "$file"; then
6336 $echo "$modename: \`$file' is not a file" 1>&2
6344 # Check to see that this really is a libtool archive.
6345 if (${SED} -e '2q' $file |
grep "^# Generated by .*$PACKAGE") >/dev
/null
2>&1; then :
6347 $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
6352 # Read the libtool library.
6356 # If there is no directory component, then add one.
6358 */* |
*\\*) .
$file ;;
6362 # Skip this library if it cannot be dlopened.
6363 if test -z "$dlname"; then
6364 # Warn if it was a shared library.
6365 test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'"
6369 dir
=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
6370 test "X$dir" = "X$file" && dir
=.
6372 if test -f "$dir/$objdir/$dlname"; then
6375 $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2
6381 # Just add the directory containing the .lo file.
6382 dir
=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
6383 test "X$dir" = "X$file" && dir
=.
6387 $echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2
6392 # Get the absolute pathname.
6393 absdir
=`cd "$dir" && pwd`
6394 test -n "$absdir" && dir
="$absdir"
6396 # Now add the directory to shlibpath_var.
6397 if eval "test -z \"\$$shlibpath_var\""; then
6398 eval "$shlibpath_var=\"\$dir\""
6400 eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\""
6404 # This variable tells wrapper scripts just to set shlibpath_var
6405 # rather than running their programs.
6406 libtool_execute_magic
="$magic"
6408 # Check if any of the arguments is a wrapper script.
6415 # Do a test to see if this is really a libtool program.
6416 if (${SED} -e '4q' $file |
grep "^# Generated by .*$PACKAGE") >/dev
/null
2>&1; then
6417 # If there is no directory component, then add one.
6419 */* |
*\\*) .
$file ;;
6423 # Transform arg to wrapped name.
6424 file="$progdir/$program"
6428 # Quote arguments (to preserve shell metacharacters).
6429 file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"`
6430 args
="$args \"$file\""
6433 if test -z "$run"; then
6434 if test -n "$shlibpath_var"; then
6435 # Export the shlibpath_var.
6436 eval "export $shlibpath_var"
6439 # Restore saved environment variables
6440 if test "${save_LC_ALL+set}" = set; then
6441 LC_ALL
="$save_LC_ALL"; export LC_ALL
6443 if test "${save_LANG+set}" = set; then
6444 LANG
="$save_LANG"; export LANG
6447 # Now prepare to actually exec the command.
6448 exec_cmd
="\$cmd$args"
6450 # Display what would be done.
6451 if test -n "$shlibpath_var"; then
6452 eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\""
6453 $echo "export $shlibpath_var"
6460 # libtool clean and uninstall mode
6462 modename
="$modename: $mode"
6468 # This variable tells wrapper scripts just to set variables rather
6469 # than running their programs.
6470 libtool_install_magic
="$magic"
6475 -f) rm="$rm $arg"; rmforce
=yes ;;
6476 -*) rm="$rm $arg" ;;
6477 *) files
="$files $arg" ;;
6481 if test -z "$rm"; then
6482 $echo "$modename: you must specify an RM program" 1>&2
6489 origobjdir
="$objdir"
6490 for file in $files; do
6491 dir
=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
6492 if test "X$dir" = "X$file"; then
6494 objdir
="$origobjdir"
6496 objdir
="$dir/$origobjdir"
6498 name
=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
6499 test "$mode" = uninstall
&& objdir
="$dir"
6501 # Remember objdir for removal later, being careful to avoid duplicates
6502 if test "$mode" = clean
; then
6505 *) rmdirs
="$rmdirs $objdir" ;;
6509 # Don't error if the file doesn't exist and rm -f was used.
6510 if (test -L "$file") >/dev
/null
2>&1 \
6511 ||
(test -h "$file") >/dev
/null
2>&1 \
6512 ||
test -f "$file"; then
6514 elif test -d "$file"; then
6517 elif test "$rmforce" = yes; then
6525 # Possibly a libtool archive, so verify it.
6526 if (${SED} -e '2q' $file |
grep "^# Generated by .*$PACKAGE") >/dev
/null
2>&1; then
6529 # Delete the libtool libraries and symlinks.
6530 for n
in $library_names; do
6531 rmfiles
="$rmfiles $objdir/$n"
6533 test -n "$old_library" && rmfiles
="$rmfiles $objdir/$old_library"
6534 test "$mode" = clean
&& rmfiles
="$rmfiles $objdir/$name $objdir/${name}i"
6536 if test "$mode" = uninstall
; then
6537 if test -n "$library_names"; then
6538 # Do each command in the postuninstall commands.
6539 cmds
=$postuninstall_cmds
6540 save_ifs
="$IFS"; IFS
='~'
6541 for cmd
in $cmds; do
6546 if test "$?" -ne 0 && test "$rmforce" != yes; then
6553 if test -n "$old_library"; then
6554 # Do each command in the old_postuninstall commands.
6555 cmds
=$old_postuninstall_cmds
6556 save_ifs
="$IFS"; IFS
='~'
6557 for cmd
in $cmds; do
6562 if test "$?" -ne 0 && test "$rmforce" != yes; then
6568 # FIXME: should reinstall the best remaining shared library.
6574 # Possibly a libtool object, so verify it.
6575 if (${SED} -e '2q' $file |
grep "^# Generated by .*$PACKAGE") >/dev
/null
2>&1; then
6580 # Add PIC object to the list of files to remove.
6581 if test -n "$pic_object" \
6582 && test "$pic_object" != none
; then
6583 rmfiles
="$rmfiles $dir/$pic_object"
6586 # Add non-PIC object to the list of files to remove.
6587 if test -n "$non_pic_object" \
6588 && test "$non_pic_object" != none
; then
6589 rmfiles
="$rmfiles $dir/$non_pic_object"
6595 if test "$mode" = clean
; then
6599 file=`$echo $file|${SED} 's,.exe$,,'`
6600 noexename
=`$echo $name|${SED} 's,.exe$,,'`
6601 # $file with .exe has already been added to rmfiles,
6602 # add $file without .exe
6603 rmfiles
="$rmfiles $file"
6606 # Do a test to see if this is a libtool program.
6607 if (${SED} -e '4q' $file |
grep "^# Generated by .*$PACKAGE") >/dev
/null
2>&1; then
6611 # note $name still contains .exe if it was in $file originally
6612 # as does the version of $file that was added into $rmfiles
6613 rmfiles
="$rmfiles $objdir/$name $objdir/${name}S.${objext}"
6614 if test "$fast_install" = yes && test -n "$relink_command"; then
6615 rmfiles
="$rmfiles $objdir/lt-$name"
6617 if test "X$noexename" != "X$name" ; then
6618 rmfiles
="$rmfiles $objdir/lt-${noexename}.c"
6624 $show "$rm $rmfiles"
6625 $run $rm $rmfiles || exit_status
=1
6627 objdir
="$origobjdir"
6629 # Try to remove the ${objdir}s in the directories where we deleted files
6630 for dir
in $rmdirs; do
6631 if test -d "$dir"; then
6633 $run rmdir $dir >/dev
/null
2>&1
6641 $echo "$modename: you must specify a MODE" 1>&2
6642 $echo "$generic_help" 1>&2
6647 if test -z "$exec_cmd"; then
6648 $echo "$modename: invalid operation mode \`$mode'" 1>&2
6649 $echo "$generic_help" 1>&2
6652 fi # test -z "$show_help"
6654 if test -n "$exec_cmd"; then
6659 # We need to display help for each of the modes.
6662 "Usage: $modename [OPTION]... [MODE-ARG]...
6664 Provide generalized library-building support services.
6666 --config show all configuration variables
6667 --debug enable verbose shell tracing
6668 -n, --dry-run display commands without modifying any files
6669 --features display basic configuration information and exit
6670 --finish same as \`--mode=finish'
6671 --help display this help message and exit
6672 --mode=MODE use operation mode MODE [default=inferred from MODE-ARGS]
6673 --quiet same as \`--silent'
6674 --silent don't print informational messages
6675 --tag=TAG use configuration variables from tag TAG
6676 --version print version information
6678 MODE must be one of the following:
6680 clean remove files from the build directory
6681 compile compile a source file into a libtool object
6682 execute automatically set library path, then run a program
6683 finish complete the installation of libtool libraries
6684 install install libraries or executables
6685 link create a library or an executable
6686 uninstall remove libraries from an installed directory
6688 MODE-ARGS vary depending on the MODE. Try \`$modename --help --mode=MODE' for
6689 a more detailed description of MODE.
6691 Report bugs to <bug-libtool@gnu.org>."
6697 "Usage: $modename [OPTION]... --mode=clean RM [RM-OPTION]... FILE...
6699 Remove files from the build directory.
6701 RM is the name of the program to use to delete files associated with each FILE
6702 (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed
6705 If FILE is a libtool library, object or program, all the files associated
6706 with it are deleted. Otherwise, only FILE itself is deleted using RM."
6711 "Usage: $modename [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE
6713 Compile a source file into a libtool library object.
6715 This mode accepts the following additional options:
6717 -o OUTPUT-FILE set the output file name to OUTPUT-FILE
6718 -prefer-pic try to building PIC objects only
6719 -prefer-non-pic try to building non-PIC objects only
6720 -static always build a \`.o' file suitable for static linking
6722 COMPILE-COMMAND is a command to be used in creating a \`standard' object file
6723 from the given SOURCEFILE.
6725 The output file name is determined by removing the directory component from
6726 SOURCEFILE, then substituting the C source code suffix \`.c' with the
6727 library object suffix, \`.lo'."
6732 "Usage: $modename [OPTION]... --mode=execute COMMAND [ARGS]...
6734 Automatically set library path, then run a program.
6736 This mode accepts the following additional options:
6738 -dlopen FILE add the directory containing FILE to the library path
6740 This mode sets the library path environment variable according to \`-dlopen'
6743 If any of the ARGS are libtool executable wrappers, then they are translated
6744 into their corresponding uninstalled binary, and any of their required library
6745 directories are added to the library path.
6747 Then, COMMAND is executed, with ARGS as arguments."
6752 "Usage: $modename [OPTION]... --mode=finish [LIBDIR]...
6754 Complete the installation of libtool libraries.
6756 Each LIBDIR is a directory that contains libtool libraries.
6758 The commands that this mode executes may require superuser privileges. Use
6759 the \`--dry-run' option if you just want to see what would be executed."
6764 "Usage: $modename [OPTION]... --mode=install INSTALL-COMMAND...
6766 Install executables or libraries.
6768 INSTALL-COMMAND is the installation command. The first component should be
6769 either the \`install' or \`cp' program.
6771 The rest of the components are interpreted as arguments to that command (only
6772 BSD-compatible install options are recognized)."
6777 "Usage: $modename [OPTION]... --mode=link LINK-COMMAND...
6779 Link object files or libraries together to form another library, or to
6780 create an executable program.
6782 LINK-COMMAND is a command using the C compiler that you would use to create
6783 a program from several object files.
6785 The following components of LINK-COMMAND are treated specially:
6787 -all-static do not do any dynamic linking at all
6788 -avoid-version do not add a version suffix if possible
6789 -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime
6790 -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols
6791 -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
6792 -export-symbols SYMFILE
6793 try to export only the symbols listed in SYMFILE
6794 -export-symbols-regex REGEX
6795 try to export only the symbols matching REGEX
6796 -LLIBDIR search LIBDIR for required installed libraries
6797 -lNAME OUTPUT-FILE requires the installed library libNAME
6798 -module build a library that can dlopened
6799 -no-fast-install disable the fast-install mode
6800 -no-install link a not-installable executable
6801 -no-undefined declare that a library does not refer to external symbols
6802 -o OUTPUT-FILE create OUTPUT-FILE from the specified objects
6803 -objectlist FILE Use a list of object files found in FILE to specify objects
6804 -precious-files-regex REGEX
6805 don't remove output files matching REGEX
6806 -release RELEASE specify package release information
6807 -rpath LIBDIR the created library will eventually be installed in LIBDIR
6808 -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries
6809 -static do not do any dynamic linking of libtool libraries
6810 -version-info CURRENT[:REVISION[:AGE]]
6811 specify library version info [each variable defaults to 0]
6813 All other options (arguments beginning with \`-') are ignored.
6815 Every other argument is treated as a filename. Files ending in \`.la' are
6816 treated as uninstalled libtool libraries, other files are standard or library
6819 If the OUTPUT-FILE ends in \`.la', then a libtool library is created,
6820 only library objects (\`.lo' files) may be specified, and \`-rpath' is
6821 required, except when creating a convenience library.
6823 If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created
6824 using \`ar' and \`ranlib', or on Windows using \`lib'.
6826 If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file
6827 is created, otherwise an executable program is created."
6832 "Usage: $modename [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE...
6834 Remove libraries from an installation directory.
6836 RM is the name of the program to use to delete files associated with each FILE
6837 (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed
6840 If FILE is a libtool library, all the files associated with it are deleted.
6841 Otherwise, only FILE itself is deleted using RM."
6845 $echo "$modename: invalid operation mode \`$mode'" 1>&2
6852 $echo "Try \`$modename --help' for more information about other modes."
6856 # The TAGs below are defined such that we never get into a situation
6857 # in which we disable both kinds of libraries. Given conflicting
6858 # choices, we go for a static library, that is the most portable,
6859 # since we can't tell whether shared libraries were disabled because
6860 # the user asked for that or because the platform doesn't support
6861 # them. This is particularly important on AIX, because we don't
6862 # support having both static and shared libraries enabled at the same
6863 # time on that platform, so we default to a shared-only configuration.
6864 # If a disable-shared tag is given, we'll fallback to a static-only
6865 # configuration. But we'll never go from static-only to shared-only.
6867 # ### BEGIN LIBTOOL TAG CONFIG: disable-shared
6868 build_libtool_libs
=no
6870 # ### END LIBTOOL TAG CONFIG: disable-shared
6872 # ### BEGIN LIBTOOL TAG CONFIG: disable-static
6873 build_old_libs
=`case $build_libtool_libs in yes) $echo no;; *) $echo yes;; esac`
6874 # ### END LIBTOOL TAG CONFIG: disable-static
6880 # ### BEGIN LIBTOOL TAG CONFIG: CXX
6882 # Libtool was configured on host atlas:
6884 # Shell to use when invoking shell scripts.
6887 # Whether or not to build shared libraries.
6888 build_libtool_libs
=yes
6890 # Whether or not to build static libraries.
6893 # Whether or not to add -lc for building shared libraries.
6894 build_libtool_need_lc
=no
6896 # Whether or not to disallow shared libs when runtime libs are static
6897 allow_libtool_libs_with_static_runtimes
=no
6899 # Whether or not to optimize for fast installation.
6904 host=i686-pc-linux-gnu
6909 build
=i686-pc-linux-gnu
6912 # An echo program that does not interpret backslashes.
6922 # A language-specific compiler.
6925 # Is the compiler the GNU C compiler?
6931 # The linker used to build libraries.
6932 LD
="/usr/i586-suse-linux/bin/ld"
6934 # Whether we need hard or soft links.
6937 # A BSD-compatible nm program.
6940 # A symbol stripping program
6943 # Used to examine libraries when file_magic_cmd begins "file"
6946 # Used on cygwin: DLL creation program.
6949 # Used on cygwin: object dumper.
6952 # Used on cygwin: assembler.
6955 # The name of the directory that contains temporary libtool files.
6958 # How to create reloadable object files.
6960 reload_cmds
="\$LD\$reload_flag -o \$output\$reload_objs"
6962 # How to pass a linker flag through the compiler.
6965 # Object file suffix (normally "o").
6968 # Old archive suffix (normally "a").
6971 # Shared library suffix (normally ".so").
6974 # Executable file suffix (normally "").
6977 # Additional compiler flags for building library objects.
6978 pic_flag
=" -fPIC -DPIC"
6981 # What is the maximum length of a command?
6984 # Does compiler simultaneously support -c and -o options?
6987 # Must we lock files when doing compilation?
6990 # Do we need the lib prefix for modules?
6993 # Do we need a version for libraries?
6996 # Whether dlopen is supported.
6997 dlopen_support
=unknown
6999 # Whether dlopen of programs is supported.
7002 # Whether dlopen of statically linked programs is supported.
7003 dlopen_self_static
=unknown
7005 # Compiler flag to prevent dynamic linking.
7006 link_static_flag
="-static"
7008 # Compiler flag to turn off builtin functions.
7009 no_builtin_flag
=" -fno-builtin"
7011 # Compiler flag to allow reflexive dlopens.
7012 export_dynamic_flag_spec
="\${wl}--export-dynamic"
7014 # Compiler flag to generate shared objects directly from archives.
7015 whole_archive_flag_spec
="\${wl}--whole-archive\$convenience \${wl}--no-whole-archive"
7017 # Compiler flag to generate thread-safe objects.
7018 thread_safe_flag_spec
=""
7020 # Library versioning type.
7023 # Format of library name prefix.
7024 libname_spec
="lib\$name"
7026 # List of archive names. First name is the real one, the rest are links.
7027 # The last name is the one that the linker finds with -lNAME.
7028 library_names_spec
="\${libname}\${release}\${shared_ext}\$versuffix \${libname}\${release}\${shared_ext}\$major \$libname\${shared_ext}"
7030 # The coded name of the library, if different from the real name.
7031 soname_spec
="\${libname}\${release}\${shared_ext}\$major"
7033 # Commands used to build and install an old-style archive.
7035 old_archive_cmds
="\$AR \$AR_FLAGS \$oldlib\$oldobjs\$old_deplibs~\$RANLIB \$oldlib"
7036 old_postinstall_cmds
="\$RANLIB \$oldlib~chmod 644 \$oldlib"
7037 old_postuninstall_cmds
=""
7039 # Create an old-style archive from a shared archive.
7040 old_archive_from_new_cmds
=""
7042 # Create a temporary old-style archive to link instead of a shared archive.
7043 old_archive_from_expsyms_cmds
=""
7045 # Commands used to build and install a shared archive.
7046 archive_cmds
="\$CC -shared -nostdlib \$predep_objects \$libobjs \$deplibs \$postdep_objects \$compiler_flags \${wl}-soname \$wl\$soname -o \$lib"
7047 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"
7049 postuninstall_cmds
=""
7051 # Commands used to build a loadable module (assumed same as above if empty)
7053 module_expsym_cmds
=""
7055 # Commands to strip libraries.
7056 old_striplib
="strip --strip-debug"
7057 striplib
="strip --strip-unneeded"
7059 # Dependencies to place before the objects being linked to create a
7061 predep_objects
="/usr/lib/gcc/i586-suse-linux/4.0.2/../../../crti.o /usr/lib/gcc/i586-suse-linux/4.0.2/crtbeginS.o"
7063 # Dependencies to place after the objects being linked to create a
7065 postdep_objects
="/usr/lib/gcc/i586-suse-linux/4.0.2/crtendS.o /usr/lib/gcc/i586-suse-linux/4.0.2/../../../crtn.o"
7067 # Dependencies to place before the objects being linked to create a
7071 # Dependencies to place after the objects being linked to create a
7073 postdeps
="-lstdc++ -lm -lgcc_s -lc -lgcc_s"
7075 # The library search path used internally by the compiler when linking
7077 compiler_lib_search_path
="-L/usr/lib/gcc/i586-suse-linux/4.0.2 -L/usr/lib/gcc/i586-suse-linux/4.0.2 -L/usr/lib/gcc/i586-suse-linux/4.0.2/../../../../i586-suse-linux/lib -L/usr/lib/gcc/i586-suse-linux/4.0.2/../../.."
7079 # Method to check whether dependent libraries are shared objects.
7080 deplibs_check_method
="pass_all"
7082 # Command to use when deplibs_check_method == file_magic.
7083 file_magic_cmd
="\$MAGIC_CMD"
7085 # Flag that allows shared libraries with undefined symbols to be built.
7086 allow_undefined_flag
=""
7088 # Flag that forces no undefined symbols.
7089 no_undefined_flag
=""
7091 # Commands used to finish a libtool library installation in a directory.
7092 finish_cmds
="PATH=\\\"\\\$PATH:/sbin\\\" ldconfig -n \$libdir"
7094 # Same as above, but a single script fragment to be evaled but not shown.
7097 # Take the output of nm and produce a listing of raw symbols and C names.
7098 global_symbol_pipe
="sed -n -e 's/^.*[ ]\\([ABCDGIRSTW][ABCDGIRSTW]*\\)[ ][ ]*\\([_A-Za-z][_A-Za-z0-9]*\\)\$/\\1 \\2 \\2/p'"
7100 # Transform the output of nm in a proper C declaration
7101 global_symbol_to_cdecl
="sed -n -e 's/^. .* \\(.*\\)\$/extern int \\1;/p'"
7103 # Transform the output of nm in a C name address pair
7104 global_symbol_to_c_name_address
="sed -n -e 's/^: \\([^ ]*\\) \$/ {\\\"\\1\\\", (lt_ptr) 0},/p' -e 's/^[BCDEGRST] \\([^ ]*\\) \\([^ ]*\\)\$/ {\"\\2\", (lt_ptr) \\&\\2},/p'"
7106 # This is the shared library runtime path variable.
7107 runpath_var
=LD_RUN_PATH
7109 # This is the shared library path variable.
7110 shlibpath_var
=LD_LIBRARY_PATH
7112 # Is shlibpath searched before the hard-coded library search path?
7113 shlibpath_overrides_runpath
=no
7115 # How to hardcode a shared library path into an executable.
7116 hardcode_action
=immediate
7118 # Whether we should hardcode library paths into libraries.
7119 hardcode_into_libs
=yes
7121 # Flag to hardcode $libdir into a binary during linking.
7122 # This must work even if $libdir does not exist.
7123 hardcode_libdir_flag_spec
="\${wl}--rpath \${wl}\$libdir"
7125 # If ld is used when linking, flag to hardcode $libdir into
7126 # a binary during linking. This must work even if $libdir does
7128 hardcode_libdir_flag_spec_ld
=""
7130 # Whether we need a single -rpath flag with a separated argument.
7131 hardcode_libdir_separator
=""
7133 # Set to yes if using DIR/libNAME during linking hardcodes DIR into the
7137 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
7141 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
7142 # the resulting binary.
7143 hardcode_shlibpath_var
=
7145 # Set to yes if building a shared library automatically hardcodes DIR into the library
7146 # and all subsequent libraries and executables linked against it.
7147 hardcode_automatic
=no
7149 # Variables whose values should be saved in libtool wrapper scripts and
7150 # restored at relink time.
7151 variables_saved_for_relink
="PATH LD_LIBRARY_PATH LD_RUN_PATH GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
7153 # Whether libtool must link a program against all its dependency libraries.
7154 link_all_deplibs
=unknown
7156 # Compile-time system search path for libraries
7157 sys_lib_search_path_spec
=" /usr/lib/gcc/i586-suse-linux/4.0.2/ /usr/lib/gcc/i586-suse-linux/4.0.2/ /usr/lib/gcc/i586-suse-linux/4.0.2/../../../../i586-suse-linux/lib/i586-suse-linux/4.0.2/ /usr/lib/gcc/i586-suse-linux/4.0.2/../../../../i586-suse-linux/lib/ /usr/lib/gcc/i586-suse-linux/4.0.2/../../../i586-suse-linux/4.0.2/ /usr/lib/gcc/i586-suse-linux/4.0.2/../../../ /lib/i586-suse-linux/4.0.2/ /lib/ /usr/lib/i586-suse-linux/4.0.2/ /usr/lib/"
7159 # Run-time system search path for libraries
7160 sys_lib_dlsearch_path_spec
="/lib /usr/lib /usr/X11R6/lib/Xaw95 /usr/X11R6/lib/Xaw3d /usr/X11R6/lib /usr/i486-linux/lib /usr/i486-linux-libc5/lib /usr/i486-linux-libc6/lib /usr/i486-linuxaout/lib /usr/i386-suse-linux/lib /usr/local/lib /usr/openwin/lib /opt/kde/lib /opt/kde2/lib /opt/kde3/lib /opt/gnome/lib /opt/gnome2/lib "
7162 # Fix the shell variable $srcfile for the compiler.
7165 # Set to yes if exported symbols are required.
7166 always_export_symbols
=no
7168 # The commands to list exported symbols.
7169 export_symbols_cmds
="\$NM \$libobjs \$convenience | \$global_symbol_pipe | \$SED 's/.* //' | sort | uniq > \$export_symbols"
7171 # The commands to extract the exported symbol list from a shared archive.
7172 extract_expsyms_cmds
=""
7174 # Symbols that should not be listed in the preloaded symbols.
7177 # Symbols that must always be exported.
7180 # ### END LIBTOOL TAG CONFIG: CXX
7182 # ### BEGIN LIBTOOL TAG CONFIG: F77
7184 # Libtool was configured on host atlas:
7186 # Shell to use when invoking shell scripts.
7189 # Whether or not to build shared libraries.
7190 build_libtool_libs
=yes
7192 # Whether or not to build static libraries.
7195 # Whether or not to add -lc for building shared libraries.
7196 build_libtool_need_lc
=no
7198 # Whether or not to disallow shared libs when runtime libs are static
7199 allow_libtool_libs_with_static_runtimes
=no
7201 # Whether or not to optimize for fast installation.
7206 host=i686-pc-linux-gnu
7211 build
=i686-pc-linux-gnu
7214 # An echo program that does not interpret backslashes.
7224 # A language-specific compiler.
7227 # Is the compiler the GNU C compiler?
7233 # The linker used to build libraries.
7234 LD
="/usr/i586-suse-linux/bin/ld"
7236 # Whether we need hard or soft links.
7239 # A BSD-compatible nm program.
7242 # A symbol stripping program
7245 # Used to examine libraries when file_magic_cmd begins "file"
7248 # Used on cygwin: DLL creation program.
7251 # Used on cygwin: object dumper.
7254 # Used on cygwin: assembler.
7257 # The name of the directory that contains temporary libtool files.
7260 # How to create reloadable object files.
7262 reload_cmds
="\$LD\$reload_flag -o \$output\$reload_objs"
7264 # How to pass a linker flag through the compiler.
7267 # Object file suffix (normally "o").
7270 # Old archive suffix (normally "a").
7273 # Shared library suffix (normally ".so").
7276 # Executable file suffix (normally "").
7279 # Additional compiler flags for building library objects.
7283 # What is the maximum length of a command?
7286 # Does compiler simultaneously support -c and -o options?
7289 # Must we lock files when doing compilation?
7292 # Do we need the lib prefix for modules?
7295 # Do we need a version for libraries?
7298 # Whether dlopen is supported.
7299 dlopen_support
=unknown
7301 # Whether dlopen of programs is supported.
7304 # Whether dlopen of statically linked programs is supported.
7305 dlopen_self_static
=unknown
7307 # Compiler flag to prevent dynamic linking.
7308 link_static_flag
="-static"
7310 # Compiler flag to turn off builtin functions.
7313 # Compiler flag to allow reflexive dlopens.
7314 export_dynamic_flag_spec
="\${wl}--export-dynamic"
7316 # Compiler flag to generate shared objects directly from archives.
7317 whole_archive_flag_spec
="\${wl}--whole-archive\$convenience \${wl}--no-whole-archive"
7319 # Compiler flag to generate thread-safe objects.
7320 thread_safe_flag_spec
=""
7322 # Library versioning type.
7325 # Format of library name prefix.
7326 libname_spec
="lib\$name"
7328 # List of archive names. First name is the real one, the rest are links.
7329 # The last name is the one that the linker finds with -lNAME.
7330 library_names_spec
="\${libname}\${release}\${shared_ext}\$versuffix \${libname}\${release}\${shared_ext}\$major \$libname\${shared_ext}"
7332 # The coded name of the library, if different from the real name.
7333 soname_spec
="\${libname}\${release}\${shared_ext}\$major"
7335 # Commands used to build and install an old-style archive.
7337 old_archive_cmds
="\$AR \$AR_FLAGS \$oldlib\$oldobjs\$old_deplibs~\$RANLIB \$oldlib"
7338 old_postinstall_cmds
="\$RANLIB \$oldlib~chmod 644 \$oldlib"
7339 old_postuninstall_cmds
=""
7341 # Create an old-style archive from a shared archive.
7342 old_archive_from_new_cmds
=""
7344 # Create a temporary old-style archive to link instead of a shared archive.
7345 old_archive_from_expsyms_cmds
=""
7347 # Commands used to build and install a shared archive.
7348 archive_cmds
="\$CC -shared \$libobjs \$deplibs \$compiler_flags \${wl}-soname \$wl\$soname -o \$lib"
7349 archive_expsym_cmds
="\$echo \\\"{ global:\\\" > \$output_objdir/\$libname.ver~
7350 cat \$export_symbols | sed -e \\\"s/\\\\(.*\\\\)/\\\\1;/\\\" >> \$output_objdir/\$libname.ver~
7351 \$echo \\\"local: *; };\\\" >> \$output_objdir/\$libname.ver~
7352 \$CC -shared \$libobjs \$deplibs \$compiler_flags \${wl}-soname \$wl\$soname \${wl}-version-script \${wl}\$output_objdir/\$libname.ver -o \$lib"
7354 postuninstall_cmds
=""
7356 # Commands used to build a loadable module (assumed same as above if empty)
7358 module_expsym_cmds
=""
7360 # Commands to strip libraries.
7361 old_striplib
="strip --strip-debug"
7362 striplib
="strip --strip-unneeded"
7364 # Dependencies to place before the objects being linked to create a
7368 # Dependencies to place after the objects being linked to create a
7372 # Dependencies to place before the objects being linked to create a
7376 # Dependencies to place after the objects being linked to create a
7380 # The library search path used internally by the compiler when linking
7382 compiler_lib_search_path
=""
7384 # Method to check whether dependent libraries are shared objects.
7385 deplibs_check_method
="pass_all"
7387 # Command to use when deplibs_check_method == file_magic.
7388 file_magic_cmd
="\$MAGIC_CMD"
7390 # Flag that allows shared libraries with undefined symbols to be built.
7391 allow_undefined_flag
=""
7393 # Flag that forces no undefined symbols.
7394 no_undefined_flag
=""
7396 # Commands used to finish a libtool library installation in a directory.
7397 finish_cmds
="PATH=\\\"\\\$PATH:/sbin\\\" ldconfig -n \$libdir"
7399 # Same as above, but a single script fragment to be evaled but not shown.
7402 # Take the output of nm and produce a listing of raw symbols and C names.
7403 global_symbol_pipe
="sed -n -e 's/^.*[ ]\\([ABCDGIRSTW][ABCDGIRSTW]*\\)[ ][ ]*\\([_A-Za-z][_A-Za-z0-9]*\\)\$/\\1 \\2 \\2/p'"
7405 # Transform the output of nm in a proper C declaration
7406 global_symbol_to_cdecl
="sed -n -e 's/^. .* \\(.*\\)\$/extern int \\1;/p'"
7408 # Transform the output of nm in a C name address pair
7409 global_symbol_to_c_name_address
="sed -n -e 's/^: \\([^ ]*\\) \$/ {\\\"\\1\\\", (lt_ptr) 0},/p' -e 's/^[BCDEGRST] \\([^ ]*\\) \\([^ ]*\\)\$/ {\"\\2\", (lt_ptr) \\&\\2},/p'"
7411 # This is the shared library runtime path variable.
7412 runpath_var
=LD_RUN_PATH
7414 # This is the shared library path variable.
7415 shlibpath_var
=LD_LIBRARY_PATH
7417 # Is shlibpath searched before the hard-coded library search path?
7418 shlibpath_overrides_runpath
=no
7420 # How to hardcode a shared library path into an executable.
7421 hardcode_action
=immediate
7423 # Whether we should hardcode library paths into libraries.
7424 hardcode_into_libs
=yes
7426 # Flag to hardcode $libdir into a binary during linking.
7427 # This must work even if $libdir does not exist.
7428 hardcode_libdir_flag_spec
="\${wl}--rpath \${wl}\$libdir"
7430 # If ld is used when linking, flag to hardcode $libdir into
7431 # a binary during linking. This must work even if $libdir does
7433 hardcode_libdir_flag_spec_ld
=""
7435 # Whether we need a single -rpath flag with a separated argument.
7436 hardcode_libdir_separator
=""
7438 # Set to yes if using DIR/libNAME during linking hardcodes DIR into the
7442 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
7446 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
7447 # the resulting binary.
7448 hardcode_shlibpath_var
=unsupported
7450 # Set to yes if building a shared library automatically hardcodes DIR into the library
7451 # and all subsequent libraries and executables linked against it.
7452 hardcode_automatic
=no
7454 # Variables whose values should be saved in libtool wrapper scripts and
7455 # restored at relink time.
7456 variables_saved_for_relink
="PATH LD_LIBRARY_PATH LD_RUN_PATH GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
7458 # Whether libtool must link a program against all its dependency libraries.
7459 link_all_deplibs
=unknown
7461 # Compile-time system search path for libraries
7462 sys_lib_search_path_spec
=" /usr/lib/gcc/i586-suse-linux/4.0.2/ /usr/lib/gcc/i586-suse-linux/4.0.2/ /usr/lib/gcc/i586-suse-linux/4.0.2/../../../../i586-suse-linux/lib/i586-suse-linux/4.0.2/ /usr/lib/gcc/i586-suse-linux/4.0.2/../../../../i586-suse-linux/lib/ /usr/lib/gcc/i586-suse-linux/4.0.2/../../../i586-suse-linux/4.0.2/ /usr/lib/gcc/i586-suse-linux/4.0.2/../../../ /lib/i586-suse-linux/4.0.2/ /lib/ /usr/lib/i586-suse-linux/4.0.2/ /usr/lib/"
7464 # Run-time system search path for libraries
7465 sys_lib_dlsearch_path_spec
="/lib /usr/lib /usr/X11R6/lib/Xaw95 /usr/X11R6/lib/Xaw3d /usr/X11R6/lib /usr/i486-linux/lib /usr/i486-linux-libc5/lib /usr/i486-linux-libc6/lib /usr/i486-linuxaout/lib /usr/i386-suse-linux/lib /usr/local/lib /usr/openwin/lib /opt/kde/lib /opt/kde2/lib /opt/kde3/lib /opt/gnome/lib /opt/gnome2/lib "
7467 # Fix the shell variable $srcfile for the compiler.
7470 # Set to yes if exported symbols are required.
7471 always_export_symbols
=no
7473 # The commands to list exported symbols.
7474 export_symbols_cmds
="\$NM \$libobjs \$convenience | \$global_symbol_pipe | \$SED 's/.* //' | sort | uniq > \$export_symbols"
7476 # The commands to extract the exported symbol list from a shared archive.
7477 extract_expsyms_cmds
=""
7479 # Symbols that should not be listed in the preloaded symbols.
7480 exclude_expsyms
="_GLOBAL_OFFSET_TABLE_"
7482 # Symbols that must always be exported.
7485 # ### END LIBTOOL TAG CONFIG: F77